A window that belongs to the notification layer within the Tizen window layer hierarchy is called a "notification window". You can create notification windows and access their current notification levels (as long as they are of the EFL window type) using the EFL UTIL API (for mobile and wearable applications).

Window Layers and Notification Levels

Tizen windows have a layer hierarchy. Window layers are logical containers used to control the window stack order. Each window belongs to 1 layer and can change the stack order in the layer. Windows in same layer are always placed on or under a window in another layer. In addition to the default "normal layer", there exists a "notification layer", which is always placed above the normal layer.

Figure: Window layers

Each window is set to a specific layer according to its type or properties. Most application windows belong to the normal layer. However, for an important alarm or other information crucial to the user, you can set the window to belong to the notification layer. This ensures that the user notices the information immediately, because the window belonging to the notification layer is always shown above the windows in the normal layer.

The notification layer contains 4 levels, which define the priority of a notification window:

EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT: Default level, to which most windows are set. It is used as a normal notification popup.

EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM: Higher level than default; the windows on this level are always on top of the default level windows. It is used for the lock screen window in general.

EFL_UTIL_NOTIFICATION_LEVEL_HIGH: Higher level than medium; the windows on this level are always on top of the medium windows.

EFL_UTIL_NOTIFICATION_LEVEL_TOP: Highest level, which very few applications can use. It is used in case the user needs to be notified in any circumstances. For example, the incoming call popup uses this level.

Figure: Notification levels

Global Gestures

Normal touch events are delivered to the active, visible window. Global gestures intercept these touch events and generate gesture events instead of propagating the touch events. Gestures can be recognized and delivered in 2 ways:

Touch cancel method

The server sends all touch events to the client immediately. When the server recognizes a touch event sequence as a global gesture, it sends a touch cancel event to the client. Based on the touch cancel event, the client cancels the already-received touch events.

Keep and drop method

The server keeps all touch events until it can determine whether they form a global gesture sequence. If the touch events are recognized as a gesture, the server drops the touch events. If no gesture is recognized, the server flushes and propagates the touch events to the client.

Figure: Global gesture event propagation methods

After gesture recognition, the server sends no further touch events until all fingers are released. The server renews the gesture recognition state only after all fingers are released.

Figure: Global gesture life cycle

Global gesture events are generated based on user touch behavior. Gestures have various states:

EFL_UTIL_GESTURE_MODE_BEGIN: Begin a continuous gesture event.

EFL_UTIL_GESTURE_MODE_UPDATE: Update a continuous gesture event.

EFL_UTIL_GESTURE_MODE_END: End a continuous gesture event.

EFL_UTIL_GESTURE_MODE_DONE: A non-continuous gesture event occurs.

Continuous gestures generate events in the begin, update, and end states, while non-continuous gestures generate events in the done state.

You can implement the following gesture types:

EFL_UTIL_GESTURE_TYPE_EDGE_SWIPE: The user touches near a screen edge and moves the finger quickly toward the opposite side. Edge swipe is a non-continuous gesture.

Figure: Top edge 1-finger swipe gesture

EFL_UTIL_GESTURE_TYPE_EDGE_DRAG: The user touches near a screen edge and drags the finger toward the opposite side. Edge drag is a continuous gesture.

Figure: Top edge 1-finger drag gesture

EFL_UTIL_GESTURE_TYPE_TAP: The user touches the screen with their finger and quickly releases it. Tap is a non-continuous gesture.

Figure: 2-finger double tap gesture

EFL_UTIL_GESTURE_TYPE_PALM_COVER: The user places their palm over the screen. Palm cover is a continuous gesture.

Figure: Palm cover gesture

EFL_UTIL_GESTURE_TYPE_PAN: The user touches the screen with 2 or more fingers and moves them in the same direction. Pan is a continuous gesture.

Figure: 2-finger pan gesture

EFL_UTIL_GESTURE_TYPE_PINCH: The user touches the screen with 2 or more fingers and moves the fingers away from or toward each other. Pinch is a continuous gesture.

Figure: 2-finger pinch gesture

EFL_UTIL_GESTURE_TYPE_PALM_SWIPE: The user places their palm at a screen edge and swipes to the opposite side. Palm swipe is a non-continuous gesture.

Figure: Palm swipe gesture

Prerequisites

To use the functions and data types of the EFL UTIL API (in mobile and wearable applications), include the <efl_util.h> header file in your application:

#include <efl_util.h>

Managing Notification Windows

To create notification windows and access the current notification level of an existing notification window:

Create a notification window with the default notification level (EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT):

To create a new window and give it the NOTIFICATION type, call the elm_win_add() function with the third parameter set to ELM_WIN_NOTIFICATION:

To set the notification level, call the efl_util_set_notification_window_level() function.

If the window is not of the notification type, the function returns the EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE error. If the application does not have a permission to set a notification level, the function returns the TIZEN_ERROR_PERMISSION_DENIED error.

Grabbing Gestures

To receive global gesture events, you must grab the gestures that you want. You can grab gestures in the background (without a window). Each gesture can only be grabbed by 1 client at a time. For example, if a client grabs a 2-finger double tap gesture, other clients cannot grab the same gesture but can grab a 2-finger triple tap gesture. You can grab edge swipe, edge drag, tap, and palm cover gestures.

Selecting Gestures

Unlike grabbing, selecting a gesture requires a window. By selecting a gesture, you can detect gesture events when the selected window is active. Selecting has a higher priority than grabbing. Only the palm cover gesture can be selected.