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
19 struct FvwmFunction
; /* forward declaration */
21 typedef struct FunctionItem
23 struct FvwmFunction
*func
; /* the function this item is in */
24 struct FunctionItem
*next_item
; /* next function item */
25 char condition
; /* the character string displayed on left*/
26 char *action
; /* action to be performed */
27 short type
; /* type of built in function */
31 typedef struct FvwmFunction
33 struct FvwmFunction
*next_func
; /* next in list of root menus */
34 FunctionItem
*first_item
; /* first item in function */
35 FunctionItem
*last_item
; /* last item in function */
36 char *name
; /* function name */
37 unsigned int use_depth
;
40 /* used for parsing commands*/
45 void (*action
)(XEvent
*,Window
,FvwmWindow
*, unsigned long,char *, int *);
53 /* Bits for the function flag byte. */
54 #define FUNC_NEEDS_WINDOW 0x01
55 #define FUNC_DONT_REPEAT 0x02
56 #define FUNC_ADD_TO 0x04
57 #define FUNC_DECOR 0x08
59 /* Types of events for the FUNCTION builtin */
66 CF_DOUBLE_CLICK
= 'd',
70 /* for exec_flags parameter of ExecuteFunction */
71 #define FUNC_DONT_EXPAND_COMMAND 0x01
72 #define FUNC_DO_SYNC_BUTTONS 0x02
74 void find_func_type(char *action
, short *func_type
, unsigned char *flags
);
75 FvwmFunction
*FindFunction(const char *function_name
);
76 extern FvwmFunction
*NewFvwmFunction(const char *name
);
77 void DestroyFunction(FvwmFunction
*func
);
78 extern int DeferExecution(XEvent
*, Window
*,FvwmWindow
**, unsigned long *,
81 char *Action
, FvwmWindow
*tmp_win
, XEvent
*eventp
, unsigned long context
,
82 int Module
, unsigned int exec_flags
, char *args
[]);
83 void ExecuteFunctionSaveTmpWin(
84 char *Action
, FvwmWindow
*tmp_win
, XEvent
*eventp
, unsigned long context
,
85 int Module
, unsigned int exec_flags
, char *args
[]);
86 void AddToFunction(FvwmFunction
*func
, char *action
);
92 /* functions that need no window */
181 STROKE_ARG(F_STROKE_FUNC
)
192 /* functions that need a window to operate on */
227 /* Functions for use by modules only! */
228 F_SEND_WINDOW_LIST
= 1000
231 #endif /* _FUNCTIONS_ */