Handle continuation lines in fvwm-convert-2.6.
[fvwm.git] / fvwm / execcontext.h
blobb97a21fff652790f454fbe3c906ed8bff756193c
1 /* -*-c-*- */
3 #ifndef EXECCONTEXT_H
4 #define EXECCONTEXT_H
6 /* ---------------------------- included header files ---------------------- */
8 /* ---------------------------- global definitions ------------------------- */
10 /* ---------------------------- global macros ------------------------------ */
12 /* ---------------------------- type definitions --------------------------- */
14 /* Inernal types */
15 typedef struct
17 XEvent te;
18 } exec_context_privileged_t;
20 /* Interface types */
21 typedef enum
23 EXCT_NULL = '-',
24 EXCT_INIT = 'I',
25 EXCT_RESTART = 'R',
26 EXCT_QUIT = 'Q',
27 EXCT_TORESTART = 'r',
28 EXCT_EVENT ='E',
29 EXCT_MODULE ='M',
30 EXCT_MENULOOP ='m',
31 EXCT_PAGING = 'P',
32 EXCT_SCHEDULE = 'S'
33 } exec_context_type_t;
35 typedef struct
37 XEvent *etrigger;
38 XEvent *elast;
39 } x_context_t;
41 typedef struct
43 FvwmWindow *fw;
44 Window w;
45 unsigned long wcontext;
46 } window_context_t;
48 struct fmodule;
49 typedef struct
51 struct fmodule *module;
52 } module_context_t;
54 typedef struct
56 exec_context_type_t type;
57 x_context_t x;
58 window_context_t w;
59 module_context_t m;
60 /* for internal use *only*. *Never* acces this from outside! */
61 exec_context_privileged_t private_data;
62 } exec_context_t;
64 typedef enum
66 ECC_TYPE = 0x1,
67 ECC_ETRIGGER = 0x2,
68 ECC_FW = 0x4,
69 ECC_W = 0x8,
70 ECC_WCONTEXT = 0x10,
71 ECC_MODULE = 0x20
72 } exec_context_change_mask_t;
74 typedef struct
76 exec_context_type_t type;
77 x_context_t x;
78 window_context_t w;
79 module_context_t m;
80 } exec_context_changes_t;
82 /* ---------------------------- forward declarations ----------------------- */
84 /* ---------------------------- exported variables (globals) --------------- */
86 /* ---------------------------- interface functions ------------------------ */
88 /* Creates a new exec_context from the passed in arguments in malloc'ed memory.
89 * The context must later be destroyed with exc_destroy_context().
91 * Args:
92 * ecc
93 * Pointer to a structure which specifies the initial values of the struct
94 * members.
95 * mask
96 * The mask of members in ecc to use.
98 const exec_context_t *exc_create_context(
99 exec_context_changes_t *ecc, exec_context_change_mask_t mask);
101 /* Similar to exc_create_context(), but the created context contains only dummy
102 * information. */
103 const exec_context_t *exc_create_null_context(void);
105 /* Works like exc_create_context(), but initialises all values with the data
106 * from excin. The ecc/mask pair overrides these values. */
107 const exec_context_t *exc_clone_context(
108 const exec_context_t *excin, exec_context_changes_t *ecc,
109 exec_context_change_mask_t mask);
111 /* Destroys an exec_context structure that was created with
112 * exc_create_context(). */
113 void exc_destroy_context(const exec_context_t *exc);
115 #endif /* EXECCONTEXT_H */