1 #ifdef E_TYPEDEFS
2 
3 typedef struct _E_Action             E_Action;
4 typedef struct _E_Action_Description E_Action_Description;
5 typedef struct _E_Action_Group       E_Action_Group;
6 
7 #else
8 #ifndef E_ACTIONS_H
9 #define E_ACTIONS_H
10 
11 #define E_ACTION_TYPE 0xE0b01010
12 
13 struct _E_Action
14 {
15    E_Object    e_obj_inherit;
16 
17    const char *name;
18    struct
19    {
20       void (*go)(E_Object *obj, const char *params);
21       Eina_Bool (*go_mouse)(E_Object *obj, const char *params, E_Binding_Event_Mouse_Button *ev);
22       Eina_Bool (*go_wheel)(E_Object *obj, const char *params, E_Binding_Event_Wheel *ev);
23       void (*go_edge)(E_Object *obj, const char *params, E_Event_Zone_Edge *ev);
24       void (*go_key)(E_Object *obj, const char *params, Ecore_Event_Key *ev);
25       void (*go_signal)(E_Object *obj, const char *params, const char *sig, const char *src);
26       void (*go_acpi)(E_Object *obj, const char *params, E_Event_Acpi *ev);
27       void (*end)(E_Object *obj, const char *params);
28       Eina_Bool (*end_mouse)(E_Object *obj, const char *params, E_Binding_Event_Mouse_Button *ev);
29       void (*end_key)(E_Object *obj, const char *params, Ecore_Event_Key *ev);
30    } func;
31 };
32 
33 struct _E_Action_Description
34 {
35    const char *act_name;
36    const char *act_cmd;
37    const char *act_params;
38    const char *param_example;
39    int         editable;
40 };
41 
42 struct _E_Action_Group
43 {
44    const char *act_grp;
45    Eina_List  *acts;
46 };
47 
48 EINTERN int      e_actions_init(void);
49 EINTERN int      e_actions_shutdown(void);
50 
51 E_API Eina_List  *e_action_name_list(void);
52 E_API E_Action   *e_action_add(const char *name);
53 /* e_action_del allows, for example, modules to define their own actions dynamically. */
54 E_API void        e_action_del(const char *name);
55 E_API E_Action   *e_action_find(const char *name);
56 
57 E_API const char *e_action_predef_label_get(const char *action, const char *params);
58 E_API void        e_action_predef_name_set(const char *act_grp, const char *act_name, const char *act_cmd, const char *act_params, const char *param_example, int editable);
59 E_API void        e_action_predef_name_del(const char *act_grp, const char *act_name);
60 E_API void        e_action_predef_name_all_del(void);
61 E_API Eina_List  *e_action_groups_get(void);
62 
63 #endif
64 #endif
65