]> Dogcows Code - chaz/openbox/blob - openbox/action.h
add the client_set_focused function.
[chaz/openbox] / openbox / action.h
1 #ifndef __action_h
2 #define __action_h
3
4 #include "client.h"
5
6 /* These have to all have a Client* at the top even if they don't use it, so
7 that I can set it blindly later on. So every function will have a Client*
8 available (possibly NULL though) if it wants it.
9 */
10
11 struct AnyAction {
12 Client *c;
13 };
14
15 struct Execute {
16 Client *c;
17 char *path;
18 };
19
20 struct ClientAction {
21 Client *c;
22 };
23
24 struct MoveResizeRelative {
25 Client *c;
26 int dx;
27 int dy;
28 };
29
30 struct SendToDesktop {
31 Client *c;
32 guint desktop;
33 };
34
35 struct SendToNextPreviousDesktop {
36 Client *c;
37 gboolean wrap;
38 gboolean follow;
39 };
40
41 struct Desktop {
42 Client *c;
43 guint desk;
44 };
45
46 struct NextPreviousDesktop {
47 Client *c;
48 gboolean wrap;
49 };
50
51 struct Move {
52 Client *c;
53 int x;
54 int y;
55 gboolean final;
56 };
57
58 struct Resize {
59 Client *c;
60 int x;
61 int y;
62 gboolean final;
63 Corner corner;
64 };
65
66 union ActionData {
67 struct AnyAction any;
68 struct Execute execute;
69 struct ClientAction client;
70 struct MoveResizeRelative relative;
71 struct SendToDesktop sendto;
72 struct SendToNextPreviousDesktop sendtonextprev;
73 struct Desktop desktop;
74 struct NextPreviousDesktop nextprevdesktop;
75 struct Move move;
76 struct Resize resize;
77 };
78
79 typedef struct {
80 /* The func member acts like an enum to tell which one of the structs in
81 the data union are valid.
82 */
83 void (*func)(union ActionData *data);
84 union ActionData data;
85 } Action;
86
87 Action *action_new(void (*func)(union ActionData *data));
88 void action_free(Action *a);
89
90 /* Execute */
91 void action_execute(union ActionData *data);
92 /* ClientAction */
93 void action_focus(union ActionData *data);
94 /* ClientAction */
95 void action_unfocus(union ActionData *data);
96 /* ClientAction */
97 void action_iconify(union ActionData *data);
98 /* ClientAction */
99 void action_raise(union ActionData *data);
100 /* ClientAction */
101 void action_lower(union ActionData *data);
102 /* ClientAction */
103 void action_focusraise(union ActionData *data);
104 /* ClientAction */
105 void action_close(union ActionData *data);
106 /* ClientAction */
107 void action_shade(union ActionData *data);
108 /* ClientAction */
109 void action_unshade(union ActionData *data);
110 /* ClientAction */
111 void action_toggle_shade(union ActionData *data);
112 /* ClientAction */
113 void action_toggle_omnipresent(union ActionData *data);
114 /* MoveResizeRelative */
115 void action_move_relative(union ActionData *data);
116 /* MoveResizeRelative */
117 void action_resize_relative(union ActionData *data);
118 /* ClientAction */
119 void action_maximize_full(union ActionData *data);
120 /* ClientAction */
121 void action_unmaximize_full(union ActionData *data);
122 /* ClientAction */
123 void action_toggle_maximize_full(union ActionData *data);
124 /* ClientAction */
125 void action_maximize_horz(union ActionData *data);
126 /* ClientAction */
127 void action_unmaximize_horz(union ActionData *data);
128 /* ClientAction */
129 void action_toggle_maximize_horz(union ActionData *data);
130 /* ClientAction */
131 void action_maximize_vert(union ActionData *data);
132 /* ClientAction */
133 void action_unmaximize_vert(union ActionData *data);
134 /* ClientAction */
135 void action_toggle_maximize_vert(union ActionData *data);
136 /* SendToDesktop */
137 void action_send_to_desktop(union ActionData *data);
138 /* SendToNextPreviousDesktop */
139 void action_send_to_next_desktop(union ActionData *data);
140 /* SendToNextPreviousDesktop */
141 void action_send_to_previous_desktop(union ActionData *data);
142 /* Desktop */
143 void action_desktop(union ActionData *data);
144 /* NextPreviousDesktop */
145 void action_next_desktop(union ActionData *data);
146 /* NextPreviousDesktop */
147 void action_previous_desktop(union ActionData *data);
148 /* NextPreviousDesktop */
149 void action_next_desktop_column(union ActionData *data);
150 /* NextPreviousDesktop */
151 void action_previous_desktop_column(union ActionData *data);
152 /* NextPreviousDesktop */
153 void action_next_desktop_row(union ActionData *data);
154 /* NextPreviousDesktop */
155 void action_previous_desktop_row(union ActionData *data);
156 /* ClientAction */
157 void action_toggle_decorations(union ActionData *data);
158 /* Move */
159 void action_move(union ActionData *data);
160 /* Resize */
161 void action_resize(union ActionData *data);
162
163 #endif
This page took 0.045379 seconds and 4 git commands to generate.