~ctwm/ctwm/trunk

528.1.39 by Matthew Fuller
Setup macros for the definition and calling of these function
1
/*
2
 * Internal bits for function handling
3
 */
4
5
#ifndef _CTWM_FUNCTIONS_INTERNAL_H
6
#define _CTWM_FUNCTIONS_INTERNAL_H
7
8
9
/* Keep in sync with ExecuteFunction() in external functions.h */
10
#define EF_FULLPROTO \
11
      int   func,   void *  action,   Window   w,   TwmWindow *  tmp_win, \
12
      XEvent *  eventp,   int   context,   bool   pulldown
13
#define EF_ARGS \
14
    /*int */func, /*void **/action, /*Window */w, /*TwmWindow **/tmp_win, \
15
    /*XEvent **/eventp, /*int */context, /*bool */pulldown
16
535.1.1 by Matthew Fuller
Create a typedef for these execute function bits and use it for
17
typedef void (ExFunc)(EF_FULLPROTO);
18
535.1.3 by Matthew Fuller
Add some stub implementations for f.nop, title, deltastop, and
19
#define DFHANDLER(func) void f_##func##_impl(EF_FULLPROTO)
20
528.1.39 by Matthew Fuller
Setup macros for the definition and calling of these function
21
535.1.11 by Matthew Fuller
Create a separate file for iconmgr/wsmgr functions, and move the first
22
/*
23
 * Various handlers
24
 */
25
26
/* functions_icmgr_wsmgr.c */
27
DFHANDLER(upiconmgr);
28
DFHANDLER(downiconmgr);
29
DFHANDLER(lefticonmgr);
30
DFHANDLER(righticonmgr);
31
DFHANDLER(forwiconmgr);
32
DFHANDLER(backiconmgr);
33
DFHANDLER(forwmapiconmgr);
34
DFHANDLER(backmapiconmgr);
35
DFHANDLER(nexticonmgr);
36
DFHANDLER(previconmgr);
535.1.13 by Matthew Fuller
Split out show/hideiconmgr into handler functions. The internals of
37
DFHANDLER(showiconmgr);
38
DFHANDLER(hideiconmgr);
535.1.14 by Matthew Fuller
And pull out f.sorticonmgr.
39
DFHANDLER(sorticonmgr);
40
535.1.21 by Matthew Fuller
Migrate these workspacemanager handling things into named and
41
DFHANDLER(showworkspacemgr);
42
DFHANDLER(hideworkspacemgr);
43
DFHANDLER(toggleworkspacemgr);
44
DFHANDLER(togglestate);
45
DFHANDLER(setbuttonsstate);
46
DFHANDLER(setmapstate);
47
48
535.1.24 by Matthew Fuller
Pull the first few window move/resize related funcs out into a new
49
/* functions_win_moveresize.c */
535.1.25 by Matthew Fuller
Move the geometry save/restore and the various window move functions
50
DFHANDLER(move);
51
DFHANDLER(forcemove);
52
DFHANDLER(movepack);
53
DFHANDLER(movepush);
535.1.39 by Matthew Fuller
Rearrange these prototypes to match their order in the file.
54
DFHANDLER(pack);
55
DFHANDLER(jumpleft);
56
DFHANDLER(jumpright);
57
DFHANDLER(jumpdown);
58
DFHANDLER(jumpup);
59
DFHANDLER(resize);
535.1.28 by Matthew Fuller
Pull out the zooming resize funcs.
60
DFHANDLER(zoom);
61
DFHANDLER(horizoom);
62
DFHANDLER(fullzoom);
63
DFHANDLER(fullscreenzoom);
64
DFHANDLER(leftzoom);
65
DFHANDLER(rightzoom);
66
DFHANDLER(topzoom);
67
DFHANDLER(bottomzoom);
535.1.33 by Matthew Fuller
Pull out f.fill and its backing func.
68
DFHANDLER(fill);
535.1.39 by Matthew Fuller
Rearrange these prototypes to match their order in the file.
69
DFHANDLER(initsize);
70
DFHANDLER(moveresize);
71
DFHANDLER(changesize);
72
DFHANDLER(savegeometry);
73
DFHANDLER(restoregeometry);
535.1.24 by Matthew Fuller
Pull the first few window move/resize related funcs out into a new
74
75
535.1.42 by Matthew Fuller
Grab a block of workspaces/occupation functions, move them off into
76
/* functions_workspaces.c */
535.1.45 by Matthew Fuller
Reorder and comment so these are grouped a little better.
77
DFHANDLER(occupy);
78
DFHANDLER(occupyall);
535.1.42 by Matthew Fuller
Grab a block of workspaces/occupation functions, move them off into
79
DFHANDLER(addtoworkspace);
80
DFHANDLER(removefromworkspace);
81
DFHANDLER(toggleoccupation);
535.1.45 by Matthew Fuller
Reorder and comment so these are grouped a little better.
82
DFHANDLER(vanish);
83
DFHANDLER(warphere);
535.1.42 by Matthew Fuller
Grab a block of workspaces/occupation functions, move them off into
84
DFHANDLER(movetonextworkspace);
85
DFHANDLER(movetoprevworkspace);
86
DFHANDLER(movetonextworkspaceandfollow);
87
DFHANDLER(movetoprevworkspaceandfollow);
535.1.44 by Matthew Fuller
Pull out the next block of occupation/workspace bits.
88
DFHANDLER(gotoworkspace);
89
DFHANDLER(prevworkspace);
90
DFHANDLER(nextworkspace);
91
DFHANDLER(rightworkspace);
92
DFHANDLER(leftworkspace);
93
DFHANDLER(upworkspace);
94
DFHANDLER(downworkspace);
535.1.42 by Matthew Fuller
Grab a block of workspaces/occupation functions, move them off into
95
96
535.1.46 by Matthew Fuller
Pull out the captive-related functions.
97
/* functions_captive.c */
98
DFHANDLER(adoptwindow);
99
DFHANDLER(hypermove);
100
101
535.1.49 by Matthew Fuller
Move f.identify/f.version handlers into dispatched functions in their
102
/* functions_identify.c */
103
DFHANDLER(identify);
104
DFHANDLER(version);
105
106
535.1.50 by Matthew Fuller
Pull most of the rest of the window-related functions out into a
107
/* functions_win.c */
108
DFHANDLER(autoraise);
109
DFHANDLER(autolower);
535.1.52 by Matthew Fuller
Reorder and sectionalize functions_win.c so they're organized a bit
110
DFHANDLER(raise);
111
DFHANDLER(raiseorsqueeze);
112
DFHANDLER(lower);
535.1.50 by Matthew Fuller
Pull most of the rest of the window-related functions out into a
113
DFHANDLER(raiselower);
114
DFHANDLER(tinyraise);
115
DFHANDLER(tinylower);
535.1.52 by Matthew Fuller
Reorder and sectionalize functions_win.c so they're organized a bit
116
DFHANDLER(circleup);
117
DFHANDLER(circledown);
118
DFHANDLER(deiconify);
119
DFHANDLER(iconify);
535.1.59 by Matthew Fuller
f.popup is pretty much a variant of f.deiconify, so let's move it over
120
DFHANDLER(popup);
535.1.50 by Matthew Fuller
Pull most of the rest of the window-related functions out into a
121
DFHANDLER(focus);
535.1.52 by Matthew Fuller
Reorder and sectionalize functions_win.c so they're organized a bit
122
DFHANDLER(unfocus);
123
DFHANDLER(delete);
535.1.50 by Matthew Fuller
Pull most of the rest of the window-related functions out into a
124
DFHANDLER(destroy);
125
DFHANDLER(deleteordestroy);
535.1.52 by Matthew Fuller
Reorder and sectionalize functions_win.c so they're organized a bit
126
DFHANDLER(priorityswitching);
127
DFHANDLER(switchpriority);
128
DFHANDLER(setpriority);
129
DFHANDLER(changepriority);
535.1.50 by Matthew Fuller
Pull most of the rest of the window-related functions out into a
130
DFHANDLER(saveyourself);
131
DFHANDLER(colormap);
132
DFHANDLER(refresh);
133
DFHANDLER(winrefresh);
535.1.52 by Matthew Fuller
Reorder and sectionalize functions_win.c so they're organized a bit
134
DFHANDLER(squeeze);
135
DFHANDLER(unsqueeze);
136
DFHANDLER(movetitlebar);
535.1.50 by Matthew Fuller
Pull most of the rest of the window-related functions out into a
137
535.1.13 by Matthew Fuller
Split out show/hideiconmgr into handler functions. The internals of
138
535.1.53 by Matthew Fuller
Pull out warping funcs to their own file.
139
/* functions_warp.c */
140
DFHANDLER(warpto);
141
DFHANDLER(warptoiconmgr);
142
DFHANDLER(ring);
143
DFHANDLER(warpring);
144
DFHANDLER(winwarp);
145
146
535.1.57 by Matthew Fuller
Pull remaining funcs out of the switch and into dispatched functions
147
/* functions_misc.c */
148
DFHANDLER(startanimation);
149
DFHANDLER(stopanimation);
150
DFHANDLER(speedupanimation);
151
DFHANDLER(slowdownanimation);
535.1.61 by Matthew Fuller
Rearrange prototypes so they match the file.
152
DFHANDLER(menu);
535.1.57 by Matthew Fuller
Pull remaining funcs out of the switch and into dispatched functions
153
DFHANDLER(pin);
154
DFHANDLER(altkeymap);
155
DFHANDLER(altcontext);
535.1.61 by Matthew Fuller
Rearrange prototypes so they match the file.
156
DFHANDLER(quit);
157
DFHANDLER(restart);
535.1.57 by Matthew Fuller
Pull remaining funcs out of the switch and into dispatched functions
158
DFHANDLER(beep);
535.1.61 by Matthew Fuller
Rearrange prototypes so they match the file.
159
DFHANDLER(trace);
160
DFHANDLER(fittocontent);
535.1.57 by Matthew Fuller
Pull remaining funcs out of the switch and into dispatched functions
161
DFHANDLER(showbackground);
162
DFHANDLER(raiseicons);
535.1.61 by Matthew Fuller
Rearrange prototypes so they match the file.
163
DFHANDLER(rescuewindows);
164
DFHANDLER(warptoscreen);
535.1.65 by Matthew Fuller
These sound handling funcs are real, so move them into functions_misc.
165
#ifdef SOUNDS
166
DFHANDLER(togglesound);
167
DFHANDLER(rereadsounds);
168
#endif
535.1.57 by Matthew Fuller
Pull remaining funcs out of the switch and into dispatched functions
169
DFHANDLER(exec);
170
171
535.1.62 by Matthew Fuller
Whitespace tweak.
172
535.1.13 by Matthew Fuller
Split out show/hideiconmgr into handler functions. The internals of
173
/*
174
 * Extra exported from functions_icmgr_wsmgr.c for use in
175
 * f.delete{,ordestroy}.
176
 */
177
void HideIconManager(void);
178
535.1.11 by Matthew Fuller
Create a separate file for iconmgr/wsmgr functions, and move the first
179
535.1.51 by Matthew Fuller
It's not really temporary that we're having to share last_time around,
180
/* Several different sections of window handling need this */
181
extern Time last_time;
182
535.1.63 by Matthew Fuller
We do need func_reset_cursor in several of the implementation files,
183
/* Several places need to frob this to leave the cursor alone */
184
extern bool func_reset_cursor;
185
535.1.11 by Matthew Fuller
Create a separate file for iconmgr/wsmgr functions, and move the first
186
528.1.39 by Matthew Fuller
Setup macros for the definition and calling of these function
187
#endif /* _CTWM_FUNCTIONS_INTERNAL_H */