chiark / gitweb /
Imported Debian patch 1.0.0-6
[e16] / src / emodule.h
1 /*
2  * Copyright (C) 2003-2008 Kim Woelders
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to
6  * deal in the Software without restriction, including without limitation the
7  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8  * sell copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies of the Software, its documentation and marketing & publicity
13  * materials, and acknowledgment shall be given in the documentation, materials
14  * and software packages that this Software was used.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22  */
23 #ifndef _EMODULE_H_
24 #define _EMODULE_H_
25
26 #include "econfig.h"
27 #include "ipc.h"
28
29 typedef struct {
30    const char         *name;
31    const char         *nick;
32    void                (*Signal) (int sig, void *prm);
33    IpcItemList         ipc;
34    CfgItemList         cfg;
35 } EModule;
36
37 typedef enum {
38    ESIGNAL_NONE,
39    ESIGNAL_INIT,
40    ESIGNAL_CONFIGURE,
41    ESIGNAL_START,
42    ESIGNAL_EXIT,
43    ESIGNAL_AREA_CONFIGURED,
44    ESIGNAL_AREA_SWITCH_START,
45    ESIGNAL_AREA_SWITCH_DONE,
46    ESIGNAL_DESK_ADDED,
47    ESIGNAL_DESK_REMOVED,
48    ESIGNAL_DESK_SWITCH_START,
49    ESIGNAL_DESK_SWITCH_DONE,
50    ESIGNAL_DESK_RESIZE,
51    ESIGNAL_BACKGROUND_CHANGE,
52    ESIGNAL_ANIMATION_SUSPEND,
53    ESIGNAL_ANIMATION_RESUME,
54    ESIGNAL_EWIN_CREATE,
55    ESIGNAL_EWIN_DESTROY,
56    ESIGNAL_EWIN_UNMAP,
57    ESIGNAL_EWIN_ICONIFY,
58    ESIGNAL_EWIN_DEICONIFY,
59    ESIGNAL_EWIN_CHANGE_ICON,
60    ESIGNAL_EWIN_CHANGE,
61    ESIGNAL_EWIN_DAMAGE,
62    ESIGNAL_THEME_TRANS_CHANGE,
63 } e_signal_t;
64
65 #if 0                           /* Maybe later */
66 void                EModuleRegister(EModule * em);
67 #endif
68
69 extern const EModule *p_modules[];
70 extern int          n_modules;
71
72 const EModule     **ModuleListGet(int *num);
73 void                ModuleListFree(const EModule ** lst);
74
75 int                 ModuleConfigSet(const char *name, const char *item,
76                                     const char *params);
77 int                 ModuleConfigShow(const char *name, const char *item);
78
79 void                ModulesSignal(int signal, void *prm);
80 void                ModulesConfigShow(void);
81
82 #if 0
83 void                ModulesGetCfgItems(const CfgItem *** pi, int *ni);
84 #endif
85 void                ModulesGetIpcItems(const IpcItem *** pi, int *ni);
86
87 #endif /* _EMODULE_H_ */