aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/e_sys.h
blob: 6b85c0f212c6dc2067a70eff9eed9749169ed410 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifdef E_TYPEDEFS

typedef struct _E_Sys_Con_Action E_Sys_Con_Action;

typedef enum _E_Sys_Action
{
   E_SYS_NONE,
   E_SYS_EXIT,
   E_SYS_RESTART,
   E_SYS_EXIT_NOW,
   E_SYS_LOGOUT,
   E_SYS_HALT,
   E_SYS_HALT_NOW,
   E_SYS_REBOOT,
   E_SYS_SUSPEND,
   E_SYS_HIBERNATE
} E_Sys_Action;

struct _E_Sys_Con_Action
{
   const char *label;
   const char *icon_group;
   const char *button_name;
   void (*func) (void *data);
   const void *data;
   Eina_Bool disabled E_BITFIELD;
};

#else
#ifndef E_SYS_H
#define E_SYS_H

E_API extern int E_EVENT_SYS_SUSPEND;
E_API extern int E_EVENT_SYS_HIBERNATE;
E_API extern int E_EVENT_SYS_RESUME;

EINTERN int e_sys_init(void);
EINTERN int e_sys_shutdown(void);
E_API int e_sys_action_possible_get(E_Sys_Action a);
E_API int e_sys_action_do(E_Sys_Action a, char *param);
E_API int e_sys_action_raw_do(E_Sys_Action a, char *param);

E_API E_Sys_Con_Action *e_sys_con_extra_action_register(const char *label,
                                                       const char *icon_group,
                                                       const char *button_name,
                                                       void (*func) (void *data),
                                                       const void *data);
E_API void e_sys_con_extra_action_unregister(E_Sys_Con_Action *sca);
E_API const Eina_List *e_sys_con_extra_action_list_get(void);

#endif
#endif