Tizen Native API
|
Functions | |
void | evas_event_default_flags_set (Evas_Canvas *obj, Evas_Event_Flags flags) |
Set the default set of flags an event begins with. | |
Evas_Event_Flags | evas_event_default_flags_get (const Evas_Canvas *obj) |
Get the default set of flags an event begins with. | |
void | evas_event_freeze (Evas *e) |
Freeze all input events processing. | |
void | evas_event_thaw (Evas *e) |
Thaw a canvas out after freezing (for input events). | |
int | evas_event_freeze_get (const Evas *e) |
Return the freeze count on input events of a given canvas. | |
void | evas_event_thaw_eval (Evas *e) |
After thaw of a canvas, evaluate the state of objects and call callbacks. |
Functions that deal with the freezing of input event processing of an Evas canvas.
There might be scenarios during a graphical user interface program's use when the developer wishes the users wouldn't be able to deliver input events to this application. It may, for example, be the time for it to populate a view or to change some layout. Assuming proper behavior with user interaction during this exact time would be hard, as things are in a changing state. The programmer can then tell the canvas to ignore input events, bringing it back to normal behavior when he/she wants.
Most of the time use of freezing events is done like this:
evas_event_freeze(my_evas_canvas); function_that_does_work_which_cant_be_interrupted_by_events(); evas_event_thaw(my_evas_canvas);
Some of the functions in this group are exemplified Evas events (canvas and object ones) and some canvas operations example here.
Function Documentation
Evas_Event_Flags evas_event_default_flags_get | ( | const Evas_Canvas * | obj | ) |
Get the default set of flags an event begins with.
- Since :
- 2.3
- Returns:
- The default event flags for that canvas
- Remarks:
- This gets the default event flags events are produced with when fed in.
- See also:
- evas_event_default_flags_set()
- Since (EFL) :
- 1.2
- Parameters:
-
[in] obj The canvas object
void evas_event_default_flags_set | ( | Evas_Canvas * | obj, |
Evas_Event_Flags | flags | ||
) |
Set the default set of flags an event begins with.
- Since :
- 2.3
- Remarks:
- Events in evas can have an event_flags member. This starts out with and initial value (no flags). This lets you set the default flags that an event begins with to be
flags
- Since (EFL) :
- 1.2
- Parameters:
-
[in] obj The canvas object [in] flags The default flags to use
void evas_event_freeze | ( | Evas * | e | ) |
Freeze all input events processing.
- Since :
- 2.3
- Parameters:
-
[in] e The canvas to freeze input events processing on.
- Remarks:
- This function will indicate to Evas that the canvas
e
is to have all input event processing frozen until a matching evas_event_thaw() function is called on the same canvas. All events of this kind during the freeze will get discarded. Every freeze call must be matched by a thaw call in order to completely thaw out a canvas (i.e. these calls may be nested). The most common use is when you don't want the user to interact with your user interface when you're populating a view or changing the layout. -
Example:
- See the full example.
- If you run that example, you'll see the canvas ignoring all input events for 3 seconds, when the "f" key is pressed. In a more realistic code we would be freezing while a toolkit or Edje was doing some UI changes, thawing it back afterwards.
int evas_event_freeze_get | ( | const Evas * | e | ) |
Return the freeze count on input events of a given canvas.
- Since :
- 2.3
- Parameters:
-
[in] e The canvas to fetch the freeze count from.
- Remarks:
- This returns the number of times the canvas has been told to freeze input events. It is possible to call evas_event_freeze() multiple times, and these must be matched by evas_event_thaw() calls. This call allows the program to discover just how many times things have been frozen in case it may want to break out of a deep freeze state where the count is high.
-
Example:
extern Evas *evas; while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas);
void evas_event_thaw | ( | Evas * | e | ) |
Thaw a canvas out after freezing (for input events).
- Since :
- 2.3
- Parameters:
-
[in] e The canvas to thaw out.
- Remarks:
- This will thaw out a canvas after a matching evas_event_freeze() call. If this call completely thaws out a canvas, i.e., there's no other unbalanced call to evas_event_freeze(), events will start to be processed again, but any "missed" events will not be evaluated.
- See evas_event_freeze() for an example.
void evas_event_thaw_eval | ( | Evas * | e | ) |
After thaw of a canvas, evaluate the state of objects and call callbacks.
- Since :
- 2.3
- Parameters:
-
[in] e The canvas to evaluate after a thaw
- Remarks:
- This is normally called after evas_event_thaw() to evaluate mouse containment and other states and thus also call callbacks for mouse in and out on new objects if the state change demands it. This will re-evaluate the states of objects and call callbacks, because this is normally called after evas_event_thaw(), and the evas_event_thaw() evaluates interally.