~ubuntu-branches/ubuntu/lucid/compiz-fusion-plugins-extra/lucid

« back to all changes in this revision

Viewing changes to src/group/group_options.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2007-12-05 22:48:25 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20071205224825-yhfs0zm2evj7ca3x
Tags: 0.6.99+git20071127-0ubuntu1
new git HEAD snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#include <stdlib.h>
14
14
#include <string.h>
15
15
 
16
 
#include <compiz.h>
 
16
#include <compiz-core.h>
17
17
 
18
 
#define _GROUP_OPTIONS_INTERNAL
19
18
#include "group_options.h"
20
19
 
21
20
static int displayPrivateIndex;
26
25
CompPluginVTable groupOptionsVTable;
27
26
 
28
27
#define GET_GROUP_OPTIONS_DISPLAY(d) \
29
 
        ((GroupOptionsDisplay *) (d)->privates[displayPrivateIndex].ptr)
 
28
        ((GroupOptionsDisplay *) (d)->base.privates[displayPrivateIndex].ptr)
30
29
 
31
30
#define GROUP_OPTIONS_DISPLAY(d) \
32
31
        GroupOptionsDisplay *od = GET_GROUP_OPTIONS_DISPLAY (d)
33
32
 
34
33
#define GET_GROUP_OPTIONS_SCREEN(s, od) \
35
 
        ((GroupOptionsScreen *) (s)->privates[(od)->screenPrivateIndex].ptr)
 
34
        ((GroupOptionsScreen *) (s)->base.privates[(od)->screenPrivateIndex].ptr)
36
35
 
37
36
#define GROUP_OPTIONS_SCREEN(s) \
38
37
        GroupOptionsScreen *os = GET_GROUP_OPTIONS_SCREEN (s, GET_GROUP_OPTIONS_DISPLAY (s->display))
51
50
    groupScreenOptionChangeNotifyProc notify[GroupScreenOptionNum];
52
51
} GroupOptionsScreen;
53
52
 
54
 
CompAction * groupGetSelect (CompDisplay *d)
55
 
{
56
 
    GROUP_OPTIONS_DISPLAY(d);
57
 
    return &od->opt[GroupDisplayOptionSelect].value.action;
58
 
}
59
 
 
60
 
void groupSetSelectInitiate (CompDisplay *d, CompActionCallBackProc init)
61
 
{
62
 
    GROUP_OPTIONS_DISPLAY(d);
63
 
    od->opt[GroupDisplayOptionSelect].value.action.initiate = init;
64
 
}
65
 
 
66
 
void groupSetSelectTerminate (CompDisplay *d, CompActionCallBackProc term)
67
 
{
68
 
    GROUP_OPTIONS_DISPLAY(d);
69
 
    od->opt[GroupDisplayOptionSelect].value.action.terminate = term;
70
 
}
71
 
 
72
 
CompOption * groupGetSelectOption (CompDisplay *d)
73
 
{
74
 
    GROUP_OPTIONS_DISPLAY(d);
75
 
    return &od->opt[GroupDisplayOptionSelect];
76
 
}
77
 
 
78
 
void groupSetSelectNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
79
 
{
80
 
    GROUP_OPTIONS_DISPLAY(d);
81
 
    od->notify[GroupDisplayOptionSelect] = notify;
82
 
}
83
 
 
84
 
CompAction * groupGetSelectSingle (CompDisplay *d)
85
 
{
86
 
    GROUP_OPTIONS_DISPLAY(d);
87
 
    return &od->opt[GroupDisplayOptionSelectSingle].value.action;
88
 
}
89
 
 
90
 
void groupSetSelectSingleInitiate (CompDisplay *d, CompActionCallBackProc init)
91
 
{
92
 
    GROUP_OPTIONS_DISPLAY(d);
93
 
    od->opt[GroupDisplayOptionSelectSingle].value.action.initiate = init;
94
 
}
95
 
 
96
 
void groupSetSelectSingleTerminate (CompDisplay *d, CompActionCallBackProc term)
97
 
{
98
 
    GROUP_OPTIONS_DISPLAY(d);
99
 
    od->opt[GroupDisplayOptionSelectSingle].value.action.terminate = term;
100
 
}
101
 
 
102
 
CompOption * groupGetSelectSingleOption (CompDisplay *d)
103
 
{
104
 
    GROUP_OPTIONS_DISPLAY(d);
105
 
    return &od->opt[GroupDisplayOptionSelectSingle];
106
 
}
107
 
 
108
 
void groupSetSelectSingleNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
109
 
{
110
 
    GROUP_OPTIONS_DISPLAY(d);
111
 
    od->notify[GroupDisplayOptionSelectSingle] = notify;
112
 
}
113
 
 
114
 
CompAction * groupGetGroup (CompDisplay *d)
115
 
{
116
 
    GROUP_OPTIONS_DISPLAY(d);
117
 
    return &od->opt[GroupDisplayOptionGroup].value.action;
118
 
}
119
 
 
120
 
void groupSetGroupInitiate (CompDisplay *d, CompActionCallBackProc init)
121
 
{
122
 
    GROUP_OPTIONS_DISPLAY(d);
123
 
    od->opt[GroupDisplayOptionGroup].value.action.initiate = init;
124
 
}
125
 
 
126
 
void groupSetGroupTerminate (CompDisplay *d, CompActionCallBackProc term)
127
 
{
128
 
    GROUP_OPTIONS_DISPLAY(d);
129
 
    od->opt[GroupDisplayOptionGroup].value.action.terminate = term;
130
 
}
131
 
 
132
 
CompOption * groupGetGroupOption (CompDisplay *d)
133
 
{
134
 
    GROUP_OPTIONS_DISPLAY(d);
135
 
    return &od->opt[GroupDisplayOptionGroup];
136
 
}
137
 
 
138
 
void groupSetGroupNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
139
 
{
140
 
    GROUP_OPTIONS_DISPLAY(d);
141
 
    od->notify[GroupDisplayOptionGroup] = notify;
142
 
}
143
 
 
144
 
CompAction * groupGetUngroup (CompDisplay *d)
145
 
{
146
 
    GROUP_OPTIONS_DISPLAY(d);
147
 
    return &od->opt[GroupDisplayOptionUngroup].value.action;
148
 
}
149
 
 
150
 
void groupSetUngroupInitiate (CompDisplay *d, CompActionCallBackProc init)
151
 
{
152
 
    GROUP_OPTIONS_DISPLAY(d);
153
 
    od->opt[GroupDisplayOptionUngroup].value.action.initiate = init;
154
 
}
155
 
 
156
 
void groupSetUngroupTerminate (CompDisplay *d, CompActionCallBackProc term)
157
 
{
158
 
    GROUP_OPTIONS_DISPLAY(d);
159
 
    od->opt[GroupDisplayOptionUngroup].value.action.terminate = term;
160
 
}
161
 
 
162
 
CompOption * groupGetUngroupOption (CompDisplay *d)
163
 
{
164
 
    GROUP_OPTIONS_DISPLAY(d);
165
 
    return &od->opt[GroupDisplayOptionUngroup];
166
 
}
167
 
 
168
 
void groupSetUngroupNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
169
 
{
170
 
    GROUP_OPTIONS_DISPLAY(d);
171
 
    od->notify[GroupDisplayOptionUngroup] = notify;
172
 
}
173
 
 
174
 
CompAction * groupGetRemove (CompDisplay *d)
175
 
{
176
 
    GROUP_OPTIONS_DISPLAY(d);
177
 
    return &od->opt[GroupDisplayOptionRemove].value.action;
178
 
}
179
 
 
180
 
void groupSetRemoveInitiate (CompDisplay *d, CompActionCallBackProc init)
181
 
{
182
 
    GROUP_OPTIONS_DISPLAY(d);
183
 
    od->opt[GroupDisplayOptionRemove].value.action.initiate = init;
184
 
}
185
 
 
186
 
void groupSetRemoveTerminate (CompDisplay *d, CompActionCallBackProc term)
187
 
{
188
 
    GROUP_OPTIONS_DISPLAY(d);
189
 
    od->opt[GroupDisplayOptionRemove].value.action.terminate = term;
190
 
}
191
 
 
192
 
CompOption * groupGetRemoveOption (CompDisplay *d)
193
 
{
194
 
    GROUP_OPTIONS_DISPLAY(d);
195
 
    return &od->opt[GroupDisplayOptionRemove];
196
 
}
197
 
 
198
 
void groupSetRemoveNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
199
 
{
200
 
    GROUP_OPTIONS_DISPLAY(d);
201
 
    od->notify[GroupDisplayOptionRemove] = notify;
202
 
}
203
 
 
204
 
CompAction * groupGetClose (CompDisplay *d)
205
 
{
206
 
    GROUP_OPTIONS_DISPLAY(d);
207
 
    return &od->opt[GroupDisplayOptionClose].value.action;
208
 
}
209
 
 
210
 
void groupSetCloseInitiate (CompDisplay *d, CompActionCallBackProc init)
211
 
{
212
 
    GROUP_OPTIONS_DISPLAY(d);
213
 
    od->opt[GroupDisplayOptionClose].value.action.initiate = init;
214
 
}
215
 
 
216
 
void groupSetCloseTerminate (CompDisplay *d, CompActionCallBackProc term)
217
 
{
218
 
    GROUP_OPTIONS_DISPLAY(d);
219
 
    od->opt[GroupDisplayOptionClose].value.action.terminate = term;
220
 
}
221
 
 
222
 
CompOption * groupGetCloseOption (CompDisplay *d)
223
 
{
224
 
    GROUP_OPTIONS_DISPLAY(d);
225
 
    return &od->opt[GroupDisplayOptionClose];
226
 
}
227
 
 
228
 
void groupSetCloseNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
229
 
{
230
 
    GROUP_OPTIONS_DISPLAY(d);
231
 
    od->notify[GroupDisplayOptionClose] = notify;
232
 
}
233
 
 
234
 
CompAction * groupGetIgnore (CompDisplay *d)
235
 
{
236
 
    GROUP_OPTIONS_DISPLAY(d);
237
 
    return &od->opt[GroupDisplayOptionIgnore].value.action;
238
 
}
239
 
 
240
 
void groupSetIgnoreInitiate (CompDisplay *d, CompActionCallBackProc init)
241
 
{
242
 
    GROUP_OPTIONS_DISPLAY(d);
243
 
    od->opt[GroupDisplayOptionIgnore].value.action.initiate = init;
244
 
}
245
 
 
246
 
void groupSetIgnoreTerminate (CompDisplay *d, CompActionCallBackProc term)
247
 
{
248
 
    GROUP_OPTIONS_DISPLAY(d);
249
 
    od->opt[GroupDisplayOptionIgnore].value.action.terminate = term;
250
 
}
251
 
 
252
 
CompOption * groupGetIgnoreOption (CompDisplay *d)
253
 
{
254
 
    GROUP_OPTIONS_DISPLAY(d);
255
 
    return &od->opt[GroupDisplayOptionIgnore];
256
 
}
257
 
 
258
 
void groupSetIgnoreNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
259
 
{
260
 
    GROUP_OPTIONS_DISPLAY(d);
261
 
    od->notify[GroupDisplayOptionIgnore] = notify;
262
 
}
263
 
 
264
 
CompAction * groupGetTabmode (CompDisplay *d)
265
 
{
266
 
    GROUP_OPTIONS_DISPLAY(d);
267
 
    return &od->opt[GroupDisplayOptionTabmode].value.action;
268
 
}
269
 
 
270
 
void groupSetTabmodeInitiate (CompDisplay *d, CompActionCallBackProc init)
271
 
{
272
 
    GROUP_OPTIONS_DISPLAY(d);
273
 
    od->opt[GroupDisplayOptionTabmode].value.action.initiate = init;
274
 
}
275
 
 
276
 
void groupSetTabmodeTerminate (CompDisplay *d, CompActionCallBackProc term)
277
 
{
278
 
    GROUP_OPTIONS_DISPLAY(d);
279
 
    od->opt[GroupDisplayOptionTabmode].value.action.terminate = term;
280
 
}
281
 
 
282
 
CompOption * groupGetTabmodeOption (CompDisplay *d)
283
 
{
284
 
    GROUP_OPTIONS_DISPLAY(d);
285
 
    return &od->opt[GroupDisplayOptionTabmode];
286
 
}
287
 
 
288
 
void groupSetTabmodeNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
289
 
{
290
 
    GROUP_OPTIONS_DISPLAY(d);
291
 
    od->notify[GroupDisplayOptionTabmode] = notify;
292
 
}
293
 
 
294
 
CompAction * groupGetChangeTabLeft (CompDisplay *d)
295
 
{
296
 
    GROUP_OPTIONS_DISPLAY(d);
297
 
    return &od->opt[GroupDisplayOptionChangeTabLeft].value.action;
298
 
}
299
 
 
300
 
void groupSetChangeTabLeftInitiate (CompDisplay *d, CompActionCallBackProc init)
301
 
{
302
 
    GROUP_OPTIONS_DISPLAY(d);
303
 
    od->opt[GroupDisplayOptionChangeTabLeft].value.action.initiate = init;
304
 
}
305
 
 
306
 
void groupSetChangeTabLeftTerminate (CompDisplay *d, CompActionCallBackProc term)
307
 
{
308
 
    GROUP_OPTIONS_DISPLAY(d);
309
 
    od->opt[GroupDisplayOptionChangeTabLeft].value.action.terminate = term;
310
 
}
311
 
 
312
 
CompOption * groupGetChangeTabLeftOption (CompDisplay *d)
313
 
{
314
 
    GROUP_OPTIONS_DISPLAY(d);
315
 
    return &od->opt[GroupDisplayOptionChangeTabLeft];
316
 
}
317
 
 
318
 
void groupSetChangeTabLeftNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
319
 
{
320
 
    GROUP_OPTIONS_DISPLAY(d);
321
 
    od->notify[GroupDisplayOptionChangeTabLeft] = notify;
322
 
}
323
 
 
324
 
CompAction * groupGetChangeTabRight (CompDisplay *d)
325
 
{
326
 
    GROUP_OPTIONS_DISPLAY(d);
327
 
    return &od->opt[GroupDisplayOptionChangeTabRight].value.action;
328
 
}
329
 
 
330
 
void groupSetChangeTabRightInitiate (CompDisplay *d, CompActionCallBackProc init)
331
 
{
332
 
    GROUP_OPTIONS_DISPLAY(d);
333
 
    od->opt[GroupDisplayOptionChangeTabRight].value.action.initiate = init;
334
 
}
335
 
 
336
 
void groupSetChangeTabRightTerminate (CompDisplay *d, CompActionCallBackProc term)
337
 
{
338
 
    GROUP_OPTIONS_DISPLAY(d);
339
 
    od->opt[GroupDisplayOptionChangeTabRight].value.action.terminate = term;
340
 
}
341
 
 
342
 
CompOption * groupGetChangeTabRightOption (CompDisplay *d)
343
 
{
344
 
    GROUP_OPTIONS_DISPLAY(d);
345
 
    return &od->opt[GroupDisplayOptionChangeTabRight];
346
 
}
347
 
 
348
 
void groupSetChangeTabRightNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
349
 
{
350
 
    GROUP_OPTIONS_DISPLAY(d);
351
 
    od->notify[GroupDisplayOptionChangeTabRight] = notify;
352
 
}
353
 
 
354
 
CompAction * groupGetChangeColor (CompDisplay *d)
355
 
{
356
 
    GROUP_OPTIONS_DISPLAY(d);
357
 
    return &od->opt[GroupDisplayOptionChangeColor].value.action;
358
 
}
359
 
 
360
 
void groupSetChangeColorInitiate (CompDisplay *d, CompActionCallBackProc init)
361
 
{
362
 
    GROUP_OPTIONS_DISPLAY(d);
363
 
    od->opt[GroupDisplayOptionChangeColor].value.action.initiate = init;
364
 
}
365
 
 
366
 
void groupSetChangeColorTerminate (CompDisplay *d, CompActionCallBackProc term)
367
 
{
368
 
    GROUP_OPTIONS_DISPLAY(d);
369
 
    od->opt[GroupDisplayOptionChangeColor].value.action.terminate = term;
370
 
}
371
 
 
372
 
CompOption * groupGetChangeColorOption (CompDisplay *d)
373
 
{
374
 
    GROUP_OPTIONS_DISPLAY(d);
375
 
    return &od->opt[GroupDisplayOptionChangeColor];
376
 
}
377
 
 
378
 
void groupSetChangeColorNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
379
 
{
380
 
    GROUP_OPTIONS_DISPLAY(d);
381
 
    od->notify[GroupDisplayOptionChangeColor] = notify;
 
53
CompAction * groupGetSelectButton (CompDisplay *d)
 
54
{
 
55
    GROUP_OPTIONS_DISPLAY(d);
 
56
    return &od->opt[GroupDisplayOptionSelectButton].value.action;
 
57
}
 
58
 
 
59
void groupSetSelectButtonInitiate (CompDisplay *d, CompActionCallBackProc init)
 
60
{
 
61
    GROUP_OPTIONS_DISPLAY(d);
 
62
    od->opt[GroupDisplayOptionSelectButton].value.action.initiate = init;
 
63
}
 
64
 
 
65
void groupSetSelectButtonTerminate (CompDisplay *d, CompActionCallBackProc term)
 
66
{
 
67
    GROUP_OPTIONS_DISPLAY(d);
 
68
    od->opt[GroupDisplayOptionSelectButton].value.action.terminate = term;
 
69
}
 
70
 
 
71
CompOption * groupGetSelectButtonOption (CompDisplay *d)
 
72
{
 
73
    GROUP_OPTIONS_DISPLAY(d);
 
74
    return &od->opt[GroupDisplayOptionSelectButton];
 
75
}
 
76
 
 
77
void groupSetSelectButtonNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
 
78
{
 
79
    GROUP_OPTIONS_DISPLAY(d);
 
80
    od->notify[GroupDisplayOptionSelectButton] = notify;
 
81
}
 
82
 
 
83
CompAction * groupGetSelectSingleKey (CompDisplay *d)
 
84
{
 
85
    GROUP_OPTIONS_DISPLAY(d);
 
86
    return &od->opt[GroupDisplayOptionSelectSingleKey].value.action;
 
87
}
 
88
 
 
89
void groupSetSelectSingleKeyInitiate (CompDisplay *d, CompActionCallBackProc init)
 
90
{
 
91
    GROUP_OPTIONS_DISPLAY(d);
 
92
    od->opt[GroupDisplayOptionSelectSingleKey].value.action.initiate = init;
 
93
}
 
94
 
 
95
void groupSetSelectSingleKeyTerminate (CompDisplay *d, CompActionCallBackProc term)
 
96
{
 
97
    GROUP_OPTIONS_DISPLAY(d);
 
98
    od->opt[GroupDisplayOptionSelectSingleKey].value.action.terminate = term;
 
99
}
 
100
 
 
101
CompOption * groupGetSelectSingleKeyOption (CompDisplay *d)
 
102
{
 
103
    GROUP_OPTIONS_DISPLAY(d);
 
104
    return &od->opt[GroupDisplayOptionSelectSingleKey];
 
105
}
 
106
 
 
107
void groupSetSelectSingleKeyNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
 
108
{
 
109
    GROUP_OPTIONS_DISPLAY(d);
 
110
    od->notify[GroupDisplayOptionSelectSingleKey] = notify;
 
111
}
 
112
 
 
113
CompAction * groupGetGroupKey (CompDisplay *d)
 
114
{
 
115
    GROUP_OPTIONS_DISPLAY(d);
 
116
    return &od->opt[GroupDisplayOptionGroupKey].value.action;
 
117
}
 
118
 
 
119
void groupSetGroupKeyInitiate (CompDisplay *d, CompActionCallBackProc init)
 
120
{
 
121
    GROUP_OPTIONS_DISPLAY(d);
 
122
    od->opt[GroupDisplayOptionGroupKey].value.action.initiate = init;
 
123
}
 
124
 
 
125
void groupSetGroupKeyTerminate (CompDisplay *d, CompActionCallBackProc term)
 
126
{
 
127
    GROUP_OPTIONS_DISPLAY(d);
 
128
    od->opt[GroupDisplayOptionGroupKey].value.action.terminate = term;
 
129
}
 
130
 
 
131
CompOption * groupGetGroupKeyOption (CompDisplay *d)
 
132
{
 
133
    GROUP_OPTIONS_DISPLAY(d);
 
134
    return &od->opt[GroupDisplayOptionGroupKey];
 
135
}
 
136
 
 
137
void groupSetGroupKeyNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
 
138
{
 
139
    GROUP_OPTIONS_DISPLAY(d);
 
140
    od->notify[GroupDisplayOptionGroupKey] = notify;
 
141
}
 
142
 
 
143
CompAction * groupGetUngroupKey (CompDisplay *d)
 
144
{
 
145
    GROUP_OPTIONS_DISPLAY(d);
 
146
    return &od->opt[GroupDisplayOptionUngroupKey].value.action;
 
147
}
 
148
 
 
149
void groupSetUngroupKeyInitiate (CompDisplay *d, CompActionCallBackProc init)
 
150
{
 
151
    GROUP_OPTIONS_DISPLAY(d);
 
152
    od->opt[GroupDisplayOptionUngroupKey].value.action.initiate = init;
 
153
}
 
154
 
 
155
void groupSetUngroupKeyTerminate (CompDisplay *d, CompActionCallBackProc term)
 
156
{
 
157
    GROUP_OPTIONS_DISPLAY(d);
 
158
    od->opt[GroupDisplayOptionUngroupKey].value.action.terminate = term;
 
159
}
 
160
 
 
161
CompOption * groupGetUngroupKeyOption (CompDisplay *d)
 
162
{
 
163
    GROUP_OPTIONS_DISPLAY(d);
 
164
    return &od->opt[GroupDisplayOptionUngroupKey];
 
165
}
 
166
 
 
167
void groupSetUngroupKeyNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
 
168
{
 
169
    GROUP_OPTIONS_DISPLAY(d);
 
170
    od->notify[GroupDisplayOptionUngroupKey] = notify;
 
171
}
 
172
 
 
173
CompAction * groupGetRemoveKey (CompDisplay *d)
 
174
{
 
175
    GROUP_OPTIONS_DISPLAY(d);
 
176
    return &od->opt[GroupDisplayOptionRemoveKey].value.action;
 
177
}
 
178
 
 
179
void groupSetRemoveKeyInitiate (CompDisplay *d, CompActionCallBackProc init)
 
180
{
 
181
    GROUP_OPTIONS_DISPLAY(d);
 
182
    od->opt[GroupDisplayOptionRemoveKey].value.action.initiate = init;
 
183
}
 
184
 
 
185
void groupSetRemoveKeyTerminate (CompDisplay *d, CompActionCallBackProc term)
 
186
{
 
187
    GROUP_OPTIONS_DISPLAY(d);
 
188
    od->opt[GroupDisplayOptionRemoveKey].value.action.terminate = term;
 
189
}
 
190
 
 
191
CompOption * groupGetRemoveKeyOption (CompDisplay *d)
 
192
{
 
193
    GROUP_OPTIONS_DISPLAY(d);
 
194
    return &od->opt[GroupDisplayOptionRemoveKey];
 
195
}
 
196
 
 
197
void groupSetRemoveKeyNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
 
198
{
 
199
    GROUP_OPTIONS_DISPLAY(d);
 
200
    od->notify[GroupDisplayOptionRemoveKey] = notify;
 
201
}
 
202
 
 
203
CompAction * groupGetCloseKey (CompDisplay *d)
 
204
{
 
205
    GROUP_OPTIONS_DISPLAY(d);
 
206
    return &od->opt[GroupDisplayOptionCloseKey].value.action;
 
207
}
 
208
 
 
209
void groupSetCloseKeyInitiate (CompDisplay *d, CompActionCallBackProc init)
 
210
{
 
211
    GROUP_OPTIONS_DISPLAY(d);
 
212
    od->opt[GroupDisplayOptionCloseKey].value.action.initiate = init;
 
213
}
 
214
 
 
215
void groupSetCloseKeyTerminate (CompDisplay *d, CompActionCallBackProc term)
 
216
{
 
217
    GROUP_OPTIONS_DISPLAY(d);
 
218
    od->opt[GroupDisplayOptionCloseKey].value.action.terminate = term;
 
219
}
 
220
 
 
221
CompOption * groupGetCloseKeyOption (CompDisplay *d)
 
222
{
 
223
    GROUP_OPTIONS_DISPLAY(d);
 
224
    return &od->opt[GroupDisplayOptionCloseKey];
 
225
}
 
226
 
 
227
void groupSetCloseKeyNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
 
228
{
 
229
    GROUP_OPTIONS_DISPLAY(d);
 
230
    od->notify[GroupDisplayOptionCloseKey] = notify;
 
231
}
 
232
 
 
233
CompAction * groupGetIgnoreKey (CompDisplay *d)
 
234
{
 
235
    GROUP_OPTIONS_DISPLAY(d);
 
236
    return &od->opt[GroupDisplayOptionIgnoreKey].value.action;
 
237
}
 
238
 
 
239
void groupSetIgnoreKeyInitiate (CompDisplay *d, CompActionCallBackProc init)
 
240
{
 
241
    GROUP_OPTIONS_DISPLAY(d);
 
242
    od->opt[GroupDisplayOptionIgnoreKey].value.action.initiate = init;
 
243
}
 
244
 
 
245
void groupSetIgnoreKeyTerminate (CompDisplay *d, CompActionCallBackProc term)
 
246
{
 
247
    GROUP_OPTIONS_DISPLAY(d);
 
248
    od->opt[GroupDisplayOptionIgnoreKey].value.action.terminate = term;
 
249
}
 
250
 
 
251
CompOption * groupGetIgnoreKeyOption (CompDisplay *d)
 
252
{
 
253
    GROUP_OPTIONS_DISPLAY(d);
 
254
    return &od->opt[GroupDisplayOptionIgnoreKey];
 
255
}
 
256
 
 
257
void groupSetIgnoreKeyNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
 
258
{
 
259
    GROUP_OPTIONS_DISPLAY(d);
 
260
    od->notify[GroupDisplayOptionIgnoreKey] = notify;
 
261
}
 
262
 
 
263
CompAction * groupGetTabmodeKey (CompDisplay *d)
 
264
{
 
265
    GROUP_OPTIONS_DISPLAY(d);
 
266
    return &od->opt[GroupDisplayOptionTabmodeKey].value.action;
 
267
}
 
268
 
 
269
void groupSetTabmodeKeyInitiate (CompDisplay *d, CompActionCallBackProc init)
 
270
{
 
271
    GROUP_OPTIONS_DISPLAY(d);
 
272
    od->opt[GroupDisplayOptionTabmodeKey].value.action.initiate = init;
 
273
}
 
274
 
 
275
void groupSetTabmodeKeyTerminate (CompDisplay *d, CompActionCallBackProc term)
 
276
{
 
277
    GROUP_OPTIONS_DISPLAY(d);
 
278
    od->opt[GroupDisplayOptionTabmodeKey].value.action.terminate = term;
 
279
}
 
280
 
 
281
CompOption * groupGetTabmodeKeyOption (CompDisplay *d)
 
282
{
 
283
    GROUP_OPTIONS_DISPLAY(d);
 
284
    return &od->opt[GroupDisplayOptionTabmodeKey];
 
285
}
 
286
 
 
287
void groupSetTabmodeKeyNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
 
288
{
 
289
    GROUP_OPTIONS_DISPLAY(d);
 
290
    od->notify[GroupDisplayOptionTabmodeKey] = notify;
 
291
}
 
292
 
 
293
CompAction * groupGetChangeTabLeftKey (CompDisplay *d)
 
294
{
 
295
    GROUP_OPTIONS_DISPLAY(d);
 
296
    return &od->opt[GroupDisplayOptionChangeTabLeftKey].value.action;
 
297
}
 
298
 
 
299
void groupSetChangeTabLeftKeyInitiate (CompDisplay *d, CompActionCallBackProc init)
 
300
{
 
301
    GROUP_OPTIONS_DISPLAY(d);
 
302
    od->opt[GroupDisplayOptionChangeTabLeftKey].value.action.initiate = init;
 
303
}
 
304
 
 
305
void groupSetChangeTabLeftKeyTerminate (CompDisplay *d, CompActionCallBackProc term)
 
306
{
 
307
    GROUP_OPTIONS_DISPLAY(d);
 
308
    od->opt[GroupDisplayOptionChangeTabLeftKey].value.action.terminate = term;
 
309
}
 
310
 
 
311
CompOption * groupGetChangeTabLeftKeyOption (CompDisplay *d)
 
312
{
 
313
    GROUP_OPTIONS_DISPLAY(d);
 
314
    return &od->opt[GroupDisplayOptionChangeTabLeftKey];
 
315
}
 
316
 
 
317
void groupSetChangeTabLeftKeyNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
 
318
{
 
319
    GROUP_OPTIONS_DISPLAY(d);
 
320
    od->notify[GroupDisplayOptionChangeTabLeftKey] = notify;
 
321
}
 
322
 
 
323
CompAction * groupGetChangeTabRightKey (CompDisplay *d)
 
324
{
 
325
    GROUP_OPTIONS_DISPLAY(d);
 
326
    return &od->opt[GroupDisplayOptionChangeTabRightKey].value.action;
 
327
}
 
328
 
 
329
void groupSetChangeTabRightKeyInitiate (CompDisplay *d, CompActionCallBackProc init)
 
330
{
 
331
    GROUP_OPTIONS_DISPLAY(d);
 
332
    od->opt[GroupDisplayOptionChangeTabRightKey].value.action.initiate = init;
 
333
}
 
334
 
 
335
void groupSetChangeTabRightKeyTerminate (CompDisplay *d, CompActionCallBackProc term)
 
336
{
 
337
    GROUP_OPTIONS_DISPLAY(d);
 
338
    od->opt[GroupDisplayOptionChangeTabRightKey].value.action.terminate = term;
 
339
}
 
340
 
 
341
CompOption * groupGetChangeTabRightKeyOption (CompDisplay *d)
 
342
{
 
343
    GROUP_OPTIONS_DISPLAY(d);
 
344
    return &od->opt[GroupDisplayOptionChangeTabRightKey];
 
345
}
 
346
 
 
347
void groupSetChangeTabRightKeyNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
 
348
{
 
349
    GROUP_OPTIONS_DISPLAY(d);
 
350
    od->notify[GroupDisplayOptionChangeTabRightKey] = notify;
 
351
}
 
352
 
 
353
CompAction * groupGetChangeColorKey (CompDisplay *d)
 
354
{
 
355
    GROUP_OPTIONS_DISPLAY(d);
 
356
    return &od->opt[GroupDisplayOptionChangeColorKey].value.action;
 
357
}
 
358
 
 
359
void groupSetChangeColorKeyInitiate (CompDisplay *d, CompActionCallBackProc init)
 
360
{
 
361
    GROUP_OPTIONS_DISPLAY(d);
 
362
    od->opt[GroupDisplayOptionChangeColorKey].value.action.initiate = init;
 
363
}
 
364
 
 
365
void groupSetChangeColorKeyTerminate (CompDisplay *d, CompActionCallBackProc term)
 
366
{
 
367
    GROUP_OPTIONS_DISPLAY(d);
 
368
    od->opt[GroupDisplayOptionChangeColorKey].value.action.terminate = term;
 
369
}
 
370
 
 
371
CompOption * groupGetChangeColorKeyOption (CompDisplay *d)
 
372
{
 
373
    GROUP_OPTIONS_DISPLAY(d);
 
374
    return &od->opt[GroupDisplayOptionChangeColorKey];
 
375
}
 
376
 
 
377
void groupSetChangeColorKeyNotify (CompDisplay *d, groupDisplayOptionChangeNotifyProc notify)
 
378
{
 
379
    GROUP_OPTIONS_DISPLAY(d);
 
380
    od->notify[GroupDisplayOptionChangeColorKey] = notify;
382
381
}
383
382
 
384
383
Bool groupGetMoveAll (CompScreen *s)
1209
1208
    os->notify[GroupScreenOptionTabbarFontColor] = notify;
1210
1209
}
1211
1210
 
1212
 
Bool groupGetSpringModelOnMove (CompScreen *s)
1213
 
{
1214
 
    GROUP_OPTIONS_SCREEN(s);
1215
 
    return os->opt[GroupScreenOptionSpringModelOnMove].value.b;
1216
 
}
1217
 
 
1218
 
CompOption * groupGetSpringModelOnMoveOption (CompScreen *s)
1219
 
{
1220
 
    GROUP_OPTIONS_SCREEN(s);
1221
 
    return &os->opt[GroupScreenOptionSpringModelOnMove];
1222
 
}
1223
 
 
1224
 
void groupSetSpringModelOnMoveNotify (CompScreen *s, groupScreenOptionChangeNotifyProc notify)
1225
 
{
1226
 
    GROUP_OPTIONS_SCREEN(s);
1227
 
    os->notify[GroupScreenOptionSpringModelOnMove] = notify;
1228
 
}
1229
 
 
1230
1211
Bool groupGetDndUngroupWindow (CompScreen *s)
1231
1212
{
1232
1213
    GROUP_OPTIONS_SCREEN(s);
1402
1383
}
1403
1384
 
1404
1385
static const CompMetadataOptionInfo groupOptionsDisplayOptionInfo[] = {
1405
 
    { "select", "action", 0, 0, 0 },
1406
 
    { "select_single", "action", 0, 0, 0 },
1407
 
    { "group", "action", 0, 0, 0 },
1408
 
    { "ungroup", "action", 0, 0, 0 },
1409
 
    { "remove", "action", 0, 0, 0 },
1410
 
    { "close", "action", 0, 0, 0 },
1411
 
    { "ignore", "action", 0, 0, 0 },
1412
 
    { "tabmode", "action", 0, 0, 0 },
1413
 
    { "change_tab_left", "action", 0, 0, 0 },
1414
 
    { "change_tab_right", "action", 0, 0, 0 },
1415
 
    { "change_color", "action", 0, 0, 0 },
 
1386
    { "select_button", "button", 0, 0, 0 },
 
1387
    { "select_single_key", "key", 0, 0, 0 },
 
1388
    { "group_key", "key", 0, 0, 0 },
 
1389
    { "ungroup_key", "key", 0, 0, 0 },
 
1390
    { "remove_key", "key", 0, 0, 0 },
 
1391
    { "close_key", "key", 0, 0, 0 },
 
1392
    { "ignore_key", "key", 0, 0, 0 },
 
1393
    { "tabmode_key", "key", 0, 0, 0 },
 
1394
    { "change_tab_left_key", "key", 0, 0, 0 },
 
1395
    { "change_tab_right_key", "key", 0, 0, 0 },
 
1396
    { "change_color_key", "key", 0, 0, 0 },
1416
1397
};
1417
1398
 
1418
 
static Bool groupOptionsSetDisplayOption (CompPlugin *plugin, CompDisplay *d, char *name, CompOptionValue *value)
 
1399
static Bool groupOptionsSetDisplayOption (CompPlugin *plugin, CompDisplay *d, const char *name, CompOptionValue *value)
1419
1400
{
1420
1401
    GROUP_OPTIONS_DISPLAY(d);
1421
1402
    CompOption *o;
1428
1409
 
1429
1410
    switch (index)
1430
1411
    {
1431
 
     case GroupDisplayOptionSelect:
1432
 
        if (compSetDisplayOption (d, o, value))
1433
 
        {
1434
 
            if (od->notify[GroupDisplayOptionSelect])
1435
 
                (*od->notify[GroupDisplayOptionSelect]) (d, o, GroupDisplayOptionSelect);
1436
 
            return TRUE;
1437
 
        }
1438
 
        break;
1439
 
     case GroupDisplayOptionSelectSingle:
1440
 
        if (compSetDisplayOption (d, o, value))
1441
 
        {
1442
 
            if (od->notify[GroupDisplayOptionSelectSingle])
1443
 
                (*od->notify[GroupDisplayOptionSelectSingle]) (d, o, GroupDisplayOptionSelectSingle);
1444
 
            return TRUE;
1445
 
        }
1446
 
        break;
1447
 
     case GroupDisplayOptionGroup:
1448
 
        if (compSetDisplayOption (d, o, value))
1449
 
        {
1450
 
            if (od->notify[GroupDisplayOptionGroup])
1451
 
                (*od->notify[GroupDisplayOptionGroup]) (d, o, GroupDisplayOptionGroup);
1452
 
            return TRUE;
1453
 
        }
1454
 
        break;
1455
 
     case GroupDisplayOptionUngroup:
1456
 
        if (compSetDisplayOption (d, o, value))
1457
 
        {
1458
 
            if (od->notify[GroupDisplayOptionUngroup])
1459
 
                (*od->notify[GroupDisplayOptionUngroup]) (d, o, GroupDisplayOptionUngroup);
1460
 
            return TRUE;
1461
 
        }
1462
 
        break;
1463
 
     case GroupDisplayOptionRemove:
1464
 
        if (compSetDisplayOption (d, o, value))
1465
 
        {
1466
 
            if (od->notify[GroupDisplayOptionRemove])
1467
 
                (*od->notify[GroupDisplayOptionRemove]) (d, o, GroupDisplayOptionRemove);
1468
 
            return TRUE;
1469
 
        }
1470
 
        break;
1471
 
     case GroupDisplayOptionClose:
1472
 
        if (compSetDisplayOption (d, o, value))
1473
 
        {
1474
 
            if (od->notify[GroupDisplayOptionClose])
1475
 
                (*od->notify[GroupDisplayOptionClose]) (d, o, GroupDisplayOptionClose);
1476
 
            return TRUE;
1477
 
        }
1478
 
        break;
1479
 
     case GroupDisplayOptionIgnore:
1480
 
        if (compSetDisplayOption (d, o, value))
1481
 
        {
1482
 
            if (od->notify[GroupDisplayOptionIgnore])
1483
 
                (*od->notify[GroupDisplayOptionIgnore]) (d, o, GroupDisplayOptionIgnore);
1484
 
            return TRUE;
1485
 
        }
1486
 
        break;
1487
 
     case GroupDisplayOptionTabmode:
1488
 
        if (compSetDisplayOption (d, o, value))
1489
 
        {
1490
 
            if (od->notify[GroupDisplayOptionTabmode])
1491
 
                (*od->notify[GroupDisplayOptionTabmode]) (d, o, GroupDisplayOptionTabmode);
1492
 
            return TRUE;
1493
 
        }
1494
 
        break;
1495
 
     case GroupDisplayOptionChangeTabLeft:
1496
 
        if (compSetDisplayOption (d, o, value))
1497
 
        {
1498
 
            if (od->notify[GroupDisplayOptionChangeTabLeft])
1499
 
                (*od->notify[GroupDisplayOptionChangeTabLeft]) (d, o, GroupDisplayOptionChangeTabLeft);
1500
 
            return TRUE;
1501
 
        }
1502
 
        break;
1503
 
     case GroupDisplayOptionChangeTabRight:
1504
 
        if (compSetDisplayOption (d, o, value))
1505
 
        {
1506
 
            if (od->notify[GroupDisplayOptionChangeTabRight])
1507
 
                (*od->notify[GroupDisplayOptionChangeTabRight]) (d, o, GroupDisplayOptionChangeTabRight);
1508
 
            return TRUE;
1509
 
        }
1510
 
        break;
1511
 
     case GroupDisplayOptionChangeColor:
1512
 
        if (compSetDisplayOption (d, o, value))
1513
 
        {
1514
 
            if (od->notify[GroupDisplayOptionChangeColor])
1515
 
                (*od->notify[GroupDisplayOptionChangeColor]) (d, o, GroupDisplayOptionChangeColor);
 
1412
     case GroupDisplayOptionSelectButton:
 
1413
        if (compSetDisplayOption (d, o, value))
 
1414
        {
 
1415
            if (od->notify[GroupDisplayOptionSelectButton])
 
1416
                (*od->notify[GroupDisplayOptionSelectButton]) (d, o, GroupDisplayOptionSelectButton);
 
1417
            return TRUE;
 
1418
        }
 
1419
        break;
 
1420
     case GroupDisplayOptionSelectSingleKey:
 
1421
        if (compSetDisplayOption (d, o, value))
 
1422
        {
 
1423
            if (od->notify[GroupDisplayOptionSelectSingleKey])
 
1424
                (*od->notify[GroupDisplayOptionSelectSingleKey]) (d, o, GroupDisplayOptionSelectSingleKey);
 
1425
            return TRUE;
 
1426
        }
 
1427
        break;
 
1428
     case GroupDisplayOptionGroupKey:
 
1429
        if (compSetDisplayOption (d, o, value))
 
1430
        {
 
1431
            if (od->notify[GroupDisplayOptionGroupKey])
 
1432
                (*od->notify[GroupDisplayOptionGroupKey]) (d, o, GroupDisplayOptionGroupKey);
 
1433
            return TRUE;
 
1434
        }
 
1435
        break;
 
1436
     case GroupDisplayOptionUngroupKey:
 
1437
        if (compSetDisplayOption (d, o, value))
 
1438
        {
 
1439
            if (od->notify[GroupDisplayOptionUngroupKey])
 
1440
                (*od->notify[GroupDisplayOptionUngroupKey]) (d, o, GroupDisplayOptionUngroupKey);
 
1441
            return TRUE;
 
1442
        }
 
1443
        break;
 
1444
     case GroupDisplayOptionRemoveKey:
 
1445
        if (compSetDisplayOption (d, o, value))
 
1446
        {
 
1447
            if (od->notify[GroupDisplayOptionRemoveKey])
 
1448
                (*od->notify[GroupDisplayOptionRemoveKey]) (d, o, GroupDisplayOptionRemoveKey);
 
1449
            return TRUE;
 
1450
        }
 
1451
        break;
 
1452
     case GroupDisplayOptionCloseKey:
 
1453
        if (compSetDisplayOption (d, o, value))
 
1454
        {
 
1455
            if (od->notify[GroupDisplayOptionCloseKey])
 
1456
                (*od->notify[GroupDisplayOptionCloseKey]) (d, o, GroupDisplayOptionCloseKey);
 
1457
            return TRUE;
 
1458
        }
 
1459
        break;
 
1460
     case GroupDisplayOptionIgnoreKey:
 
1461
        if (compSetDisplayOption (d, o, value))
 
1462
        {
 
1463
            if (od->notify[GroupDisplayOptionIgnoreKey])
 
1464
                (*od->notify[GroupDisplayOptionIgnoreKey]) (d, o, GroupDisplayOptionIgnoreKey);
 
1465
            return TRUE;
 
1466
        }
 
1467
        break;
 
1468
     case GroupDisplayOptionTabmodeKey:
 
1469
        if (compSetDisplayOption (d, o, value))
 
1470
        {
 
1471
            if (od->notify[GroupDisplayOptionTabmodeKey])
 
1472
                (*od->notify[GroupDisplayOptionTabmodeKey]) (d, o, GroupDisplayOptionTabmodeKey);
 
1473
            return TRUE;
 
1474
        }
 
1475
        break;
 
1476
     case GroupDisplayOptionChangeTabLeftKey:
 
1477
        if (compSetDisplayOption (d, o, value))
 
1478
        {
 
1479
            if (od->notify[GroupDisplayOptionChangeTabLeftKey])
 
1480
                (*od->notify[GroupDisplayOptionChangeTabLeftKey]) (d, o, GroupDisplayOptionChangeTabLeftKey);
 
1481
            return TRUE;
 
1482
        }
 
1483
        break;
 
1484
     case GroupDisplayOptionChangeTabRightKey:
 
1485
        if (compSetDisplayOption (d, o, value))
 
1486
        {
 
1487
            if (od->notify[GroupDisplayOptionChangeTabRightKey])
 
1488
                (*od->notify[GroupDisplayOptionChangeTabRightKey]) (d, o, GroupDisplayOptionChangeTabRightKey);
 
1489
            return TRUE;
 
1490
        }
 
1491
        break;
 
1492
     case GroupDisplayOptionChangeColorKey:
 
1493
        if (compSetDisplayOption (d, o, value))
 
1494
        {
 
1495
            if (od->notify[GroupDisplayOptionChangeColorKey])
 
1496
                (*od->notify[GroupDisplayOptionChangeColorKey]) (d, o, GroupDisplayOptionChangeColorKey);
1516
1497
            return TRUE;
1517
1498
        }
1518
1499
        break;
1568
1549
    { "tab_style", "int", "<min>0</min><max>4</max>", 0, 0 },
1569
1550
    { "tabbar_font_size", "int", "<min>6</min><max>24</max>", 0, 0 },
1570
1551
    { "tabbar_font_color", "color", 0, 0, 0 },
1571
 
    { "spring_model_on_move", "bool", 0, 0, 0 },
1572
1552
    { "dnd_ungroup_window", "bool", 0, 0, 0 },
1573
1553
    { "drag_hover_time", "float", "<min>0.0</min><max>5.0</max>", 0, 0 },
1574
1554
    { "drag_spring_k", "float", "<min>0.1</min><max>30.0</max>", 0, 0 },
1580
1560
    { "glow_type", "int", "<min>0</min><max>1</max>", 0, 0 },
1581
1561
};
1582
1562
 
1583
 
static Bool groupOptionsSetScreenOption (CompPlugin *plugin, CompScreen *s, char *name, CompOptionValue *value)
 
1563
static Bool groupOptionsSetScreenOption (CompPlugin *plugin, CompScreen *s, const char *name, CompOptionValue *value)
1584
1564
{
1585
1565
    GROUP_OPTIONS_SCREEN(s);
1586
1566
    CompOption *o;
1897
1877
            return TRUE;
1898
1878
        }
1899
1879
        break;
1900
 
     case GroupScreenOptionSpringModelOnMove:
1901
 
        if (compSetScreenOption (s, o, value))
1902
 
        {
1903
 
            if (os->notify[GroupScreenOptionSpringModelOnMove])
1904
 
                (*os->notify[GroupScreenOptionSpringModelOnMove]) (s, o, GroupScreenOptionSpringModelOnMove);
1905
 
            return TRUE;
1906
 
        }
1907
 
        break;
1908
1880
     case GroupScreenOptionDndUngroupWindow:
1909
1881
        if (compSetScreenOption (s, o, value))
1910
1882
        {
2000
1972
    if (!os)
2001
1973
        return FALSE;
2002
1974
 
2003
 
    s->privates[od->screenPrivateIndex].ptr = os;
 
1975
    s->base.privates[od->screenPrivateIndex].ptr = os;
2004
1976
 
2005
1977
    if (!compInitScreenOptionsFromMetadata (s, &groupOptionsMetadata, groupOptionsScreenOptionInfo, os->opt, GroupScreenOptionNum))
2006
1978
    {
2007
1979
        free (os);
2008
1980
        return FALSE;
2009
1981
    }
2010
 
    if (groupPluginVTable && groupPluginVTable->initScreen)
2011
 
        return groupPluginVTable->initScreen (p, s);
 
1982
 
2012
1983
    return TRUE;
2013
1984
}
2014
1985
 
2015
1986
static void groupOptionsFiniScreen (CompPlugin *p, CompScreen *s)
2016
1987
{
2017
 
    if (groupPluginVTable && groupPluginVTable->finiScreen)
2018
 
        return groupPluginVTable->finiScreen (p, s);
2019
 
 
2020
1988
    GROUP_OPTIONS_SCREEN (s);
2021
1989
 
2022
1990
 
2041
2009
        return FALSE;
2042
2010
    }
2043
2011
 
2044
 
    d->privates[displayPrivateIndex].ptr = od;
 
2012
    d->base.privates[displayPrivateIndex].ptr = od;
2045
2013
 
2046
2014
    if (!compInitDisplayOptionsFromMetadata (d, &groupOptionsMetadata, groupOptionsDisplayOptionInfo, od->opt, GroupDisplayOptionNum))
2047
2015
    {
2048
2016
        free (od);
2049
2017
        return FALSE;
2050
2018
    }
2051
 
    if (groupPluginVTable && groupPluginVTable->initDisplay)
2052
 
        return groupPluginVTable->initDisplay (p, d);
 
2019
 
2053
2020
    return TRUE;
2054
2021
}
2055
2022
 
2056
2023
static void groupOptionsFiniDisplay (CompPlugin *p, CompDisplay *d)
2057
2024
{
2058
 
    if (groupPluginVTable && groupPluginVTable->finiDisplay)
2059
 
        return groupPluginVTable->finiDisplay (p, d);
2060
 
 
2061
2025
    GROUP_OPTIONS_DISPLAY (d);
2062
2026
 
2063
2027
    freeScreenPrivateIndex(d, od->screenPrivateIndex);
2093
2057
    compFiniMetadata (&groupOptionsMetadata);
2094
2058
}
2095
2059
 
 
2060
static CompBool groupOptionsInitObject (CompPlugin *p, CompObject *o)
 
2061
{
 
2062
    static InitPluginObjectProc dispTab[] = {
 
2063
        (InitPluginObjectProc) 0,
 
2064
        (InitPluginObjectProc) groupOptionsInitDisplay,
 
2065
        (InitPluginObjectProc) groupOptionsInitScreen
 
2066
    };
 
2067
 
 
2068
    RETURN_DISPATCH (o, dispTab, ARRAY_SIZE (dispTab), TRUE, (p, o));
 
2069
}
 
2070
 
 
2071
static void groupOptionsFiniObject (CompPlugin *p, CompObject *o)
 
2072
{
 
2073
    static FiniPluginObjectProc dispTab[] = {
 
2074
        (FiniPluginObjectProc) 0,
 
2075
        (FiniPluginObjectProc) groupOptionsFiniDisplay,
 
2076
        (FiniPluginObjectProc) groupOptionsFiniScreen
 
2077
    };
 
2078
 
 
2079
    DISPATCH (o, dispTab, ARRAY_SIZE (dispTab), (p, o));
 
2080
}
 
2081
 
 
2082
static CompBool groupOptionsInitObjectWrapper (CompPlugin *p, CompObject *o)
 
2083
{
 
2084
    CompBool rv = TRUE;
 
2085
    rv = groupOptionsInitObject (p, o);
 
2086
    if (groupPluginVTable->initObject)
 
2087
        rv &= groupPluginVTable->initObject (p, o);
 
2088
    return rv;
 
2089
}
 
2090
 
 
2091
static void groupOptionsFiniObjectWrapper (CompPlugin *p, CompObject *o)
 
2092
{
 
2093
    if (groupPluginVTable->finiObject)
 
2094
        groupPluginVTable->finiObject (p, o);
 
2095
    groupOptionsFiniObject (p, o);
 
2096
}
 
2097
 
 
2098
static CompOption * groupOptionsGetObjectOptions (CompPlugin *p, CompObject *o, int *count)
 
2099
{
 
2100
    static GetPluginObjectOptionsProc dispTab[] = {
 
2101
        (GetPluginObjectOptionsProc) 0,
 
2102
            (GetPluginObjectOptionsProc) groupOptionsGetDisplayOptions,
 
2103
        (GetPluginObjectOptionsProc) groupOptionsGetScreenOptions
 
2104
    };
 
2105
 
 
2106
    RETURN_DISPATCH (o, dispTab, ARRAY_SIZE (dispTab),
 
2107
                     (void *) (*count = 0), (p, o, count));
 
2108
}
 
2109
 
 
2110
static CompBool groupOptionsSetObjectOption (CompPlugin *p, CompObject *o, const char *name, CompOptionValue *value)
 
2111
{
 
2112
    static SetPluginObjectOptionProc dispTab[] = {
 
2113
        (SetPluginObjectOptionProc) 0,
 
2114
        (SetPluginObjectOptionProc) groupOptionsSetDisplayOption,
 
2115
        (SetPluginObjectOptionProc) groupOptionsSetScreenOption
 
2116
    };
 
2117
 
 
2118
    RETURN_DISPATCH (o, dispTab, ARRAY_SIZE (dispTab), FALSE,
 
2119
                     (p, o, name, value));
 
2120
}
 
2121
 
2096
2122
static CompMetadata *
2097
2123
groupOptionsGetMetadata (CompPlugin *plugin)
2098
2124
{
2099
2125
    return &groupOptionsMetadata;
2100
2126
}
2101
2127
 
2102
 
CompPluginVTable *getCompPluginInfo (void)
 
2128
CompPluginVTable *getCompPluginInfo20070830 (void)
2103
2129
{
2104
2130
    if (!groupPluginVTable)
2105
2131
    {
2106
 
        groupPluginVTable = groupOptionsGetCompPluginInfo ();
 
2132
        groupPluginVTable = getCompPluginInfo ();
2107
2133
        memcpy(&groupOptionsVTable, groupPluginVTable, sizeof(CompPluginVTable));
2108
2134
        groupOptionsVTable.getMetadata = groupOptionsGetMetadata;
2109
2135
        groupOptionsVTable.init = groupOptionsInit;
2110
2136
        groupOptionsVTable.fini = groupOptionsFini;
2111
 
        groupOptionsVTable.initDisplay = groupOptionsInitDisplay;
2112
 
        groupOptionsVTable.finiDisplay = groupOptionsFiniDisplay;
2113
 
        groupOptionsVTable.initScreen = groupOptionsInitScreen;
2114
 
        groupOptionsVTable.finiScreen = groupOptionsFiniScreen;
2115
 
        groupOptionsVTable.getDisplayOptions = groupOptionsGetDisplayOptions;
2116
 
        groupOptionsVTable.setDisplayOption = groupOptionsSetDisplayOption;
2117
 
        groupOptionsVTable.getScreenOptions = groupOptionsGetScreenOptions;
2118
 
        groupOptionsVTable.setScreenOption = groupOptionsSetScreenOption;
 
2137
        groupOptionsVTable.initObject = groupOptionsInitObjectWrapper;
 
2138
        groupOptionsVTable.finiObject = groupOptionsFiniObjectWrapper;
 
2139
        groupOptionsVTable.getObjectOptions = groupOptionsGetObjectOptions;
 
2140
        groupOptionsVTable.setObjectOption = groupOptionsSetObjectOption;
2119
2141
        
2120
2142
    }
2121
2143
    return &groupOptionsVTable;