add tests for menu and menustyle commands.
[fvwm.git] / fvwm / module_interface.h
blob58ea715aa83a94cac6f5e028f52bc905e33e59f5
1 /* This program is free software; you can redistribute it and/or modify
2 * it under the terms of the GNU General Public License as published by
3 * the Free Software Foundation; either version 2 of the License, or
4 * (at your option) any later version.
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
11 * You should have received a copy of the GNU General Public License
12 * along with this program; if not, write to the Free Software
13 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 #ifndef FVWM_MODULE_INTERFACE_H
17 #define FVWM_MODULE_INTERFACE_H
19 #include "Module.h"
22 struct queue_buff_struct
24 struct queue_buff_struct *next;
25 unsigned long *data;
26 int size;
27 int done;
30 extern int npipes;
31 extern int *readPipes;
32 extern int *writePipes;
33 extern struct queue_buff_struct **pipeQueue;
38 * MAX_MASK is used to initialize the pipeMask array. In a few places
39 * this is used along with other module arrays to see if a pipe is
40 * active.
42 * The stuff about not turning on lock on send is from Afterstep.
44 * I needed sendconfig off to identify open pipes that want config
45 * info messages while active.
47 * There really should be a module structure. Ie. the "readPipes",
48 * "writePipes", "pipeName", arrays should be members of a structure.
49 * Probably a linklist of structures. Note that if the OS number of file
50 * descriptors gets really large, the current architecture starts
51 * creating and looping over large arrays. The impact seems to be in
52 * module.c, modconf.c and event.c. dje 10/2/98
54 /* this is a bit long winded to allow MAX_MESSAGE to be 32 and not get an
55 * integer overflow with (1 << MAX_MESSAGES) */
56 #define MAX_MASK ((((1<<(MAX_MESSAGES-1))-1)+(1<<(MAX_MESSAGES-1)))\
57 &~(M_NOTUSED + M_SENDCONFIG))
61 * M_NOTUSED is not used. It was M_LOCKONSEND which is not more needed: it
62 * has been replaced by a separated mask which defines on which messages
63 * the fvwm-to-module communication need to be lock. olicha Nov 13 1999.
65 * M_SENDCONFIG for modules to tell fvwm that they want to see each
66 * module configuration command as it is entered. Causes modconf.c to
67 * look at each active module, find the ones that sent M_SENDCONFIG, and
68 * send a copy of the command in an M_CONFIG_INFO command.
71 void module_zapper(F_CMD_ARGS);
72 void executeModule(F_CMD_ARGS);
73 int executeModuleDesperate(F_CMD_ARGS);
74 void executeModuleSync(F_CMD_ARGS);
75 void initModules(void);
76 void ExecuteModuleCommand(Window w, int channel, char *command);
77 Bool HandleModuleInput(Window w, int channel, char *expect, Bool queue);
78 void KillModule(int channel);
79 void ClosePipes(void);
80 void BroadcastPacket(unsigned long event_type, unsigned long num_datum, ...);
81 void BroadcastConfig(unsigned long event_type, const FvwmWindow *t);
82 void BroadcastName(unsigned long event_type, unsigned long data1,
83 unsigned long data2, unsigned long data3, const char *name);
84 void BroadcastMiniIcon(unsigned long event_type,
85 unsigned long data1, unsigned long data2,
86 unsigned long data3, unsigned long data4,
87 unsigned long data5, unsigned long data6,
88 unsigned long data7, unsigned long data8,
89 const char *name);
90 void BroadcastColorset(int n);
91 void SendPacket(int channel, unsigned long event_type,
92 unsigned long num_datum, ...);
93 void SendConfig(int Module, unsigned long event_type, const FvwmWindow *t);
94 void SendName(int channel, unsigned long event_type, unsigned long data1,
95 unsigned long data2, unsigned long data3, const char *name);
96 void SendStrToModule(F_CMD_ARGS);
97 void send_list_func(F_CMD_ARGS);
98 void FlushAllMessageQueues(void);
99 void FlushMessageQueue(int Module);
100 void ExecuteCommandQueue(void);
101 void PositiveWrite(int module, unsigned long *ptr, int size);
102 RETSIGTYPE DeadPipe(int nonsense);
103 void set_mask_function(F_CMD_ARGS);
104 void setSyncMaskFunc(F_CMD_ARGS);
105 void setNoGrabMaskFunc(F_CMD_ARGS);
106 char *skipModuleAliasToken(const char *string);
108 #endif /* MODULE_H */