1 #ifdef E_TYPEDEFS
2 
3 typedef struct _E_Exec_Instance E_Exec_Instance;
4 
5 #else
6 #ifndef E_EXEC_H
7 #define E_EXEC_H
8 
9 struct _E_Exec_Instance
10 {
11    Efreet_Desktop *desktop;
12    Eina_List      *clients;
13    const char     *key;
14    Ecore_Exe      *exe;
15    int             startup_id;
16    double          launch_time;
17    Ecore_Timer    *expire_timer;
18    int             screen;
19    int             desk_x, desk_y;
20    int             used;
21    int             ref;
22    Eina_List      *watchers;
23    Eina_Bool       phony E_BITFIELD;
24    Eina_Bool       deleted E_BITFIELD;
25 };
26 
27 typedef enum
28 {
29    E_EXEC_WATCH_STARTED,
30    E_EXEC_WATCH_STOPPED,
31    E_EXEC_WATCH_TIMEOUT
32 } E_Exec_Watch_Type;
33 
34 EINTERN int  e_exec_init(void);
35 EINTERN int  e_exec_shutdown(void);
36 E_API void e_exec_executor_set(E_Exec_Instance *(*func) (void *data, E_Zone *zone, Efreet_Desktop *desktop, const char *exec, Eina_List *files, const char *launch_method), const void *data);
37 E_API E_Exec_Instance *e_exec(E_Zone *zone, Efreet_Desktop *desktop, const char *exec, Eina_List *files, const char *launch_method);
38 E_API E_Exec_Instance *e_exec_phony(E_Client *ec);
39 E_API Eina_Bool e_exec_phony_del(E_Exec_Instance *inst);
40 E_API E_Exec_Instance *e_exec_startup_id_pid_instance_find(int id, pid_t pid);
41 E_API Efreet_Desktop *e_exec_startup_id_pid_find(int startup_id, pid_t pid);
42 E_API E_Exec_Instance *e_exec_startup_desktop_instance_find(Efreet_Desktop *desktop);
43 E_API void e_exec_instance_found(E_Exec_Instance *inst);
44 E_API void e_exec_instance_watcher_add(E_Exec_Instance *inst, void (*func) (void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type), const void *data);
45 E_API void e_exec_instance_watcher_del(E_Exec_Instance *inst, void (*func) (void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type), const void *data);
46 E_API const Eina_List *e_exec_desktop_instances_find(const Efreet_Desktop *desktop);
47 
48 E_API const Eina_Hash *e_exec_instances_get(void);
49 E_API void e_exec_instance_client_add(E_Exec_Instance *inst, E_Client *ec);
50 
51 /* sends E_Exec_Instance */
52 E_API extern int E_EVENT_EXEC_NEW;
53 E_API extern int E_EVENT_EXEC_NEW_CLIENT;
54 E_API extern int E_EVENT_EXEC_DEL;
55 
56 #endif
57 #endif
58