Fix segfault setting MenuFace pixmap style for menus.
[fvwm.git] / fvwm / functions.h
blob331d4af47aad7708b9fcd759b0eb3a4af4a68f5f
1 /* -*-c-*- */
3 #ifndef FUNCTIONS_H
4 #define FUNCTIONS_H
6 /* ---------------------------- included header files ---------------------- */
8 #include "execcontext.h"
10 /* ---------------------------- global definitions ------------------------- */
12 /* Bits for the function flag byte. */
13 typedef enum
15 FUNC_NEEDS_WINDOW = 0x01,
16 FUNC_DONT_REPEAT = 0x02,
17 FUNC_ADD_TO = 0x04,
18 FUNC_DECOR = 0x08,
19 FUNC_ALLOW_UNMANAGED = 0x10,
20 /* only to be passed to execute_function() */
21 FUNC_IS_UNMANAGED = 0x20,
22 FUNC_DONT_EXPAND_COMMAND = 0x40,
23 FUNC_DONT_DEFER = 0x80,
25 /* The values are not used internally but by external scripts parsing
26 * functable. Hence all the values below are 0
28 /* tagging used only for building the documentation */
29 FUNC_OBSOLETE = 0,
30 FUNC_DEPRECATED = 0,
31 /* command grouping (used only for building the documentation) */
32 /*!!!*/
33 FG_BINDING = 0,
34 FG_MODULE = 0,
35 FG_MENU = 0,
36 FG_SESSION = 0,
37 FG_STYLE = 0,
38 FG_MOVE = 0,
39 FG_STATE = 0,
40 FG_COND = 0,
41 FG_USER = 0,
42 FG_COLOR = 0,
43 FG_EWMH_GNOME = 0,
44 FG_VIRTUAL = 0,
45 FG_FOCUS = 0,
46 FG_MISC = 0,
47 FG_OLD = 0
48 } execute_flags_t;
50 /* ---------------------------- global macros ------------------------------ */
52 /* ---------------------------- type definitions --------------------------- */
54 /* used for parsing commands*/
55 typedef struct
57 char *keyword;
58 #ifdef __STDC__
59 void (*action)(F_CMD_ARGS);
60 #else
61 void (*action)();
62 #endif
63 short func_t;
64 FUNC_FLAGS_TYPE flags;
65 int cursor;
66 } func_t;
68 /* ---------------------------- exported variables (globals) --------------- */
70 /* ---------------------------- interface functions ------------------------ */
72 void find_func_t(
73 char *action, short *func_t, FUNC_FLAGS_TYPE *flags);
74 Bool functions_is_complex_function(
75 const char *function_name);
76 void execute_function(
77 cond_rc_t *cond_rc, const exec_context_t *exc, char *action,
78 FUNC_FLAGS_TYPE exec_flags);
79 void execute_function_override_wcontext(
80 cond_rc_t *cond_rc, const exec_context_t *exc, char *action,
81 FUNC_FLAGS_TYPE exec_flags, int wcontext);
82 void execute_function_override_window(
83 cond_rc_t *cond_rc, const exec_context_t *exc, char *action,
84 FUNC_FLAGS_TYPE exec_flags, FvwmWindow *fw);
86 #endif /* FUNCTIONS_H */