Ecore Input Method Context Evas Helper Functions
Ecore » Ecore_IMF - Ecore Input Method Library Functions

Helper functions to make it easy to use Evas with Ecore_IMF. More...

## Functions

EAPI void | ecore_imf_evas_event_mouse_in_wrap (Evas_Event_Mouse_In *evas_event, Ecore_IMF_Event_Mouse_In *imf_event)
| Converts a "mouse_in" event from Evas to the corresponding event of Ecore_IMF.
EAPI void | ecore_imf_evas_event_mouse_out_wrap (Evas_Event_Mouse_Out *evas_event, Ecore_IMF_Event_Mouse_Out *imf_event)
| Converts a "mouse_out" event from Evas to the corresponding event of Ecore_IMF.
EAPI void | ecore_imf_evas_event_mouse_move_wrap (Evas_Event_Mouse_Move *evas_event, Ecore_IMF_Event_Mouse_Move *imf_event)
| Converts a "mouse_move" event from Evas to the corresponding event of Ecore_IMF.
EAPI void | ecore_imf_evas_event_mouse_down_wrap (Evas_Event_Mouse_Down *evas_event, Ecore_IMF_Event_Mouse_Down *imf_event)
| Converts a "mouse_down" event from Evas to the corresponding event of Ecore_IMF.
EAPI void | ecore_imf_evas_event_mouse_up_wrap (Evas_Event_Mouse_Up *evas_event, Ecore_IMF_Event_Mouse_Up *imf_event)
| Converts a "mouse_up" event from Evas to the corresponding event of Ecore_IMF.
EAPI void | ecore_imf_evas_event_mouse_wheel_wrap (Evas_Event_Mouse_Wheel *evas_event, Ecore_IMF_Event_Mouse_Wheel *imf_event)
| Converts a "mouse_wheel" event from Evas to the corresponding event of Ecore_IMF.
EAPI void | ecore_imf_evas_event_key_down_wrap (Evas_Event_Key_Down *evas_event, Ecore_IMF_Event_Key_Down *imf_event)
| Converts a "key_down" event from Evas to the corresponding event of Ecore_IMF.
EAPI void | ecore_imf_evas_event_key_up_wrap (Evas_Event_Key_Up *evas_event, Ecore_IMF_Event_Key_Up *imf_event)
| Converts a "key_up" event from Evas to the corresponding event of Ecore_IMF.

## Detailed Description

Helper functions to make it easy to use Evas with Ecore_IMF.

Converts each event from Evas to the corresponding event of Ecore_IMF.

An example of usage of these functions can be found at:

- ecore_imf - How to handle preedit and commit string from Input Method Framework

## Function Documentation

## ecore_imf_evas_event_mouse_in_wrap()

EAPI void ecore_imf_evas_event_mouse_in_wrap | ( | Evas_Event_Mouse_In * | evas_event,
|  | Ecore_IMF_Event_Mouse_In * | imf_event )

Converts a "mouse_in" event from Evas to the corresponding event of Ecore_IMF.

Parameters

  evas_event | The received Evas event.
  imf_event | The location to store the converted Ecore_IMF event.

References _Evas_Event_Mouse_In::buttons, _Evas_Event_Mouse_In::canvas, _Ecore_IMF_Event_Mouse_In::locks, _Ecore_IMF_Event_Mouse_In::modifiers, _Evas_Event_Mouse_In::modifiers, _Evas_Event_Mouse_In::output, _Ecore_IMF_Event_Mouse_In::timestamp, _Evas_Coord_Point::x, _Evas_Point::x, _Evas_Coord_Point::y, and _Evas_Point::y.

## ecore_imf_evas_event_mouse_out_wrap()

EAPI void ecore_imf_evas_event_mouse_out_wrap | ( | Evas_Event_Mouse_Out * | evas_event,
|  | Ecore_IMF_Event_Mouse_Out * | imf_event )

Converts a "mouse_out" event from Evas to the corresponding event of Ecore_IMF.

Parameters

  evas_event | The received Evas event.
  imf_event | The location to store the converted Ecore_IMF event.

References _Evas_Event_Mouse_Out::buttons, _Evas_Event_Mouse_Out::canvas, _Ecore_IMF_Event_Mouse_Out::locks, _Ecore_IMF_Event_Mouse_Out::modifiers, _Evas_Event_Mouse_Out::modifiers, _Evas_Event_Mouse_Out::output, _Ecore_IMF_Event_Mouse_Out::timestamp, _Evas_Coord_Point::x, _Evas_Point::x, _Evas_Coord_Point::y, and _Evas_Point::y.

## ecore_imf_evas_event_mouse_move_wrap()

EAPI void ecore_imf_evas_event_mouse_move_wrap | ( | Evas_Event_Mouse_Move * | evas_event,
|  | Ecore_IMF_Event_Mouse_Move * | imf_event )

Converts a "mouse_move" event from Evas to the corresponding event of Ecore_IMF.

Parameters

  evas_event | The received Evas event.
  imf_event | The location to store the converted Ecore_IMF event.

References _Evas_Event_Mouse_Move::buttons, _Evas_Position::canvas, _Evas_Event_Mouse_Move::cur, _Ecore_IMF_Event_Mouse_Move::locks, _Ecore_IMF_Event_Mouse_Move::modifiers, _Evas_Event_Mouse_Move::modifiers, _Evas_Position::output, _Evas_Event_Mouse_Move::prev, _Ecore_IMF_Event_Mouse_Move::timestamp, _Evas_Coord_Point::x, _Evas_Point::x, _Evas_Coord_Point::y, and _Evas_Point::y.

## ecore_imf_evas_event_mouse_down_wrap()

EAPI void ecore_imf_evas_event_mouse_down_wrap | ( | Evas_Event_Mouse_Down * | evas_event,
|  | Ecore_IMF_Event_Mouse_Down * | imf_event )

Converts a "mouse_down" event from Evas to the corresponding event of Ecore_IMF.

Parameters

  evas_event | The received Evas event.
  imf_event | The location to store the converted Ecore_IMF event.

References _Ecore_IMF_Event_Mouse_Down::button, _Evas_Event_Mouse_Down::button, _Evas_Event_Mouse_Down::canvas, _Ecore_IMF_Event_Mouse_Down::flags, _Evas_Event_Mouse_Down::flags, _Ecore_IMF_Event_Mouse_Down::locks, _Ecore_IMF_Event_Mouse_Down::modifiers, _Evas_Event_Mouse_Down::modifiers, _Evas_Event_Mouse_Down::output, _Ecore_IMF_Event_Mouse_Down::timestamp, _Evas_Coord_Point::x, _Evas_Point::x, _Evas_Coord_Point::y, and _Evas_Point::y.

## ecore_imf_evas_event_mouse_up_wrap()

EAPI void ecore_imf_evas_event_mouse_up_wrap | ( | Evas_Event_Mouse_Up * | evas_event,
|  | Ecore_IMF_Event_Mouse_Up * | imf_event )

Converts a "mouse_up" event from Evas to the corresponding event of Ecore_IMF.

Parameters

  evas_event | The received Evas event.
  imf_event | The location to store the converted Ecore_IMF event.

References _Ecore_IMF_Event_Mouse_Up::button, _Evas_Event_Mouse_Up::button, _Evas_Event_Mouse_Up::canvas, _Ecore_IMF_Event_Mouse_Up::flags, _Evas_Event_Mouse_Up::flags, _Ecore_IMF_Event_Mouse_Up::locks, _Ecore_IMF_Event_Mouse_Up::modifiers, _Evas_Event_Mouse_Up::modifiers, _Evas_Event_Mouse_Up::output, _Ecore_IMF_Event_Mouse_Up::timestamp, _Evas_Coord_Point::x, _Evas_Point::x, _Evas_Coord_Point::y, and _Evas_Point::y.

## ecore_imf_evas_event_mouse_wheel_wrap()

EAPI void ecore_imf_evas_event_mouse_wheel_wrap | ( | Evas_Event_Mouse_Wheel * | evas_event,
|  | Ecore_IMF_Event_Mouse_Wheel * | imf_event )

Converts a "mouse_wheel" event from Evas to the corresponding event of Ecore_IMF.

Parameters

  evas_event | The received Evas event.
  imf_event | The location to store the converted Ecore_IMF event.

References _Evas_Event_Mouse_Wheel::canvas, _Evas_Event_Mouse_Wheel::direction, _Ecore_IMF_Event_Mouse_Wheel::locks, _Ecore_IMF_Event_Mouse_Wheel::modifiers, _Evas_Event_Mouse_Wheel::modifiers, _Evas_Event_Mouse_Wheel::output, _Ecore_IMF_Event_Mouse_Wheel::timestamp, _Evas_Coord_Point::x, _Evas_Point::x, _Evas_Coord_Point::y, _Evas_Point::y, and _Evas_Event_Mouse_Wheel::z.

## ecore_imf_evas_event_key_down_wrap()

EAPI void ecore_imf_evas_event_key_down_wrap | ( | Evas_Event_Key_Down * | evas_event,
|  | Ecore_IMF_Event_Key_Down * | imf_event )

Converts a "key_down" event from Evas to the corresponding event of Ecore_IMF.

Parameters

  evas_event | The received Evas event.
  imf_event | The location to store the converted Ecore_IMF event.

Example

static void
_key_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Evas_Event_Key_Down *ev = event_info;
if (!ev->key) return;
if (imf_context)
{
Ecore_IMF_Event_Key_Down ecore_ev;
ecore_imf_evas_event_key_down_wrap(ev, &ecore_ev);
if (ecore_imf_context_filter_event(imf_context,
ECORE_IMF_EVENT_KEY_DOWN,
(Ecore_IMF_Event *)&ecore_ev))
return;
}
}
evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_DOWN, _key_down_cb, data);
EVAS_CALLBACK_KEY_DOWN
@ EVAS_CALLBACK_KEY_DOWN
Key Press Event.
Definition Evas_Common.h:430
ecore_imf_context_filter_event
EAPI Eina_Bool ecore_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event)
Allows an Ecore Input Context to internally handle an event.
Definition ecore_imf_context.c:544
ECORE_IMF_EVENT_KEY_DOWN
@ ECORE_IMF_EVENT_KEY_DOWN
Key Down event.
Definition Ecore_IMF.h:256
ecore_imf_evas_event_key_down_wrap
EAPI void ecore_imf_evas_event_key_down_wrap(Evas_Event_Key_Down *evas_event, Ecore_IMF_Event_Key_Down *imf_event)
Converts a "key_down" event from Evas to the corresponding event of Ecore_IMF.
Definition ecore_imf_evas.c:176
Evas_Event_Key_Down
struct _Evas_Event_Key_Down Evas_Event_Key_Down
Event structure for EVAS_CALLBACK_KEY_DOWN event callbacks.
Definition Evas_Legacy.h:154
Evas
Eo Evas
An opaque handle to an Evas canvas.
Definition Evas_Common.h:163
evas_object_event_callback_add
EVAS_API void evas_object_event_callback_add(Evas_Object *eo_obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
Add (register) a callback function to a given Evas object event.
Definition evas_callbacks.c:478
Evas_Object
Efl_Canvas_Object Evas_Object
An Evas Object handle.
Definition Evas_Common.h:185
_Evas_Event_Key_Down::key
const char * key
The logical key : (eg shift+1 == exclamation).
Definition Evas_Legacy.h:320

References _Ecore_IMF_Event_Key_Down::compose, _Evas_Event_Key_Down::compose, _Ecore_IMF_Event_Key_Down::dev_class, _Ecore_IMF_Event_Key_Down::dev_name, _Ecore_IMF_Event_Key_Down::dev_subclass, ECORE_IMF_DEVICE_CLASS_NONE, ECORE_IMF_DEVICE_SUBCLASS_NONE, evas_device_class_get(), evas_device_name_get(), evas_device_subclass_get(), _Ecore_IMF_Event_Key_Down::key, _Evas_Event_Key_Down::key, _Ecore_IMF_Event_Key_Down::keycode, _Evas_Event_Key_Down::keycode, _Ecore_IMF_Event_Key_Down::keyname, _Evas_Event_Key_Down::keyname, _Ecore_IMF_Event_Key_Down::locks, _Ecore_IMF_Event_Key_Down::modifiers, _Evas_Event_Key_Down::modifiers, _Ecore_IMF_Event_Key_Down::string, _Evas_Event_Key_Down::string, and _Ecore_IMF_Event_Key_Down::timestamp.

## ecore_imf_evas_event_key_up_wrap()

EAPI void ecore_imf_evas_event_key_up_wrap | ( | Evas_Event_Key_Up * | evas_event,
|  | Ecore_IMF_Event_Key_Up * | imf_event )

Converts a "key_up" event from Evas to the corresponding event of Ecore_IMF.

Parameters

  evas_event | The received Evas event.
  imf_event | The location to store the converted Ecore_IMF event.

Example

static void
_key_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Evas_Event_Key_Up *ev = event_info;
if (!ev->key) return;
if (imf_context)
{
Ecore_IMF_Event_Key_Up ecore_ev;
ecore_imf_evas_event_key_up_wrap(ev, &ecore_ev);
if (ecore_imf_context_filter_event(imf_context,
ECORE_IMF_EVENT_KEY_UP,
(Ecore_IMF_Event *)&ecore_ev))
return;
}
}
evas_object_event_callback_add(obj, EVAS_CALLBACK_KEY_UP, _key_up_cb, data);
EVAS_CALLBACK_KEY_UP
@ EVAS_CALLBACK_KEY_UP
Key Release Event.
Definition Evas_Common.h:431
ECORE_IMF_EVENT_KEY_UP
@ ECORE_IMF_EVENT_KEY_UP
Key Up event.
Definition Ecore_IMF.h:257
ecore_imf_evas_event_key_up_wrap
EAPI void ecore_imf_evas_event_key_up_wrap(Evas_Event_Key_Up *evas_event, Ecore_IMF_Event_Key_Up *imf_event)
Converts a "key_up" event from Evas to the corresponding event of Ecore_IMF.
Definition ecore_imf_evas.c:207
Evas_Event_Key_Up
struct _Evas_Event_Key_Up Evas_Event_Key_Up
Event structure for EVAS_CALLBACK_KEY_UP event callbacks.
Definition Evas_Legacy.h:155
_Evas_Event_Key_Up::key
const char * key
The logical key : (eg shift+1 == exclamation).
Definition Evas_Legacy.h:337

References _Ecore_IMF_Event_Key_Up::compose, _Evas_Event_Key_Up::compose, _Ecore_IMF_Event_Key_Up::dev_class, _Ecore_IMF_Event_Key_Up::dev_name, _Ecore_IMF_Event_Key_Up::dev_subclass, ECORE_IMF_DEVICE_CLASS_NONE, ECORE_IMF_DEVICE_SUBCLASS_NONE, EINA_LOG_ERR, evas_device_class_get(), evas_device_name_get(), evas_device_subclass_get(), _Ecore_IMF_Event_Key_Up::key, _Evas_Event_Key_Up::key, _Ecore_IMF_Event_Key_Up::keycode, _Evas_Event_Key_Up::keycode, _Ecore_IMF_Event_Key_Up::keyname, _Evas_Event_Key_Up::keyname, _Ecore_IMF_Event_Key_Up::locks, _Ecore_IMF_Event_Key_Up::modifiers, _Evas_Event_Key_Up::modifiers, _Ecore_IMF_Event_Key_Up::string, _Evas_Event_Key_Up::string, and _Ecore_IMF_Event_Key_Up::timestamp.