2004-12-28 15:46:49 -08:00
|
|
|
/*
|
2008-01-26 03:45:33 -08:00
|
|
|
* Copyright (C) 2003-2008 Kim Woelders
|
2004-12-28 15:46:49 -08:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to
|
|
|
|
* deal in the Software without restriction, including without limitation the
|
|
|
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
|
|
* sell copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies of the Software, its documentation and marketing & publicity
|
|
|
|
* materials, and acknowledgment shall be given in the documentation, materials
|
|
|
|
* and software packages that this Software was used.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
|
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
#ifndef _EMODULE_H_
|
|
|
|
#define _EMODULE_H_
|
|
|
|
|
|
|
|
#include "econfig.h"
|
2007-05-18 01:25:06 -07:00
|
|
|
#include "ipc.h"
|
2004-12-28 15:46:49 -08:00
|
|
|
|
2008-03-23 04:54:24 -07:00
|
|
|
typedef struct {
|
2004-12-28 15:46:49 -08:00
|
|
|
const char *name;
|
|
|
|
const char *nick;
|
|
|
|
void (*Signal) (int sig, void *prm);
|
2006-04-21 15:52:59 -07:00
|
|
|
IpcItemList ipc;
|
|
|
|
CfgItemList cfg;
|
2004-12-28 15:46:49 -08:00
|
|
|
} EModule;
|
|
|
|
|
2008-03-23 04:54:24 -07:00
|
|
|
typedef enum {
|
2004-12-28 15:46:49 -08:00
|
|
|
ESIGNAL_NONE,
|
|
|
|
ESIGNAL_INIT,
|
|
|
|
ESIGNAL_CONFIGURE,
|
|
|
|
ESIGNAL_START,
|
|
|
|
ESIGNAL_EXIT,
|
|
|
|
ESIGNAL_AREA_CONFIGURED,
|
|
|
|
ESIGNAL_AREA_SWITCH_START,
|
|
|
|
ESIGNAL_AREA_SWITCH_DONE,
|
|
|
|
ESIGNAL_DESK_ADDED,
|
|
|
|
ESIGNAL_DESK_REMOVED,
|
|
|
|
ESIGNAL_DESK_SWITCH_START,
|
|
|
|
ESIGNAL_DESK_SWITCH_DONE,
|
2005-01-31 10:52:18 -08:00
|
|
|
ESIGNAL_DESK_RESIZE,
|
2004-12-28 15:46:49 -08:00
|
|
|
ESIGNAL_BACKGROUND_CHANGE,
|
2005-07-19 15:33:30 -07:00
|
|
|
ESIGNAL_ANIMATION_SUSPEND,
|
|
|
|
ESIGNAL_ANIMATION_RESUME,
|
2004-12-28 15:46:49 -08:00
|
|
|
ESIGNAL_EWIN_CREATE,
|
|
|
|
ESIGNAL_EWIN_DESTROY,
|
|
|
|
ESIGNAL_EWIN_UNMAP,
|
|
|
|
ESIGNAL_EWIN_ICONIFY,
|
|
|
|
ESIGNAL_EWIN_DEICONIFY,
|
|
|
|
ESIGNAL_EWIN_CHANGE_ICON,
|
|
|
|
ESIGNAL_EWIN_CHANGE,
|
2008-01-26 03:45:33 -08:00
|
|
|
ESIGNAL_EWIN_DAMAGE,
|
2005-06-04 16:58:08 -07:00
|
|
|
ESIGNAL_THEME_TRANS_CHANGE,
|
2004-12-28 15:46:49 -08:00
|
|
|
} e_signal_t;
|
|
|
|
|
|
|
|
#if 0 /* Maybe later */
|
|
|
|
void EModuleRegister(EModule * em);
|
|
|
|
#endif
|
|
|
|
|
2009-09-13 06:45:41 -07:00
|
|
|
extern const EModule *const p_modules[];
|
2004-12-28 15:46:49 -08:00
|
|
|
extern int n_modules;
|
|
|
|
|
2009-09-13 06:45:41 -07:00
|
|
|
const EModule *const *ModuleListGet(int *num);
|
|
|
|
void ModuleListFree(const EModule * const *lst);
|
2004-12-28 15:46:49 -08:00
|
|
|
|
|
|
|
int ModuleConfigSet(const char *name, const char *item,
|
|
|
|
const char *params);
|
|
|
|
int ModuleConfigShow(const char *name, const char *item);
|
|
|
|
|
|
|
|
void ModulesSignal(int signal, void *prm);
|
|
|
|
void ModulesConfigShow(void);
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
void ModulesGetCfgItems(const CfgItem *** pi, int *ni);
|
|
|
|
#endif
|
|
|
|
void ModulesGetIpcItems(const IpcItem *** pi, int *ni);
|
|
|
|
|
|
|
|
#endif /* _EMODULE_H_ */
|