Fix ExplainWindowPlacement when using "NoUSPosition" style.
[fvwm.git] / fvwm / style.h
blob0a2bc68ef3efed798dbe32aea30e2f00fa56a786
1 /* -*-c-*- */
3 #ifndef _STYLE_
4 #define _STYLE_
6 /* access to the special flags of a style */
7 /* call these with a pointer to a style_flags struct */
8 #define SDO_DECORATE_TRANSIENT(sf) \
9 ((sf)->do_decorate_transient)
10 #define SDO_SAVE_UNDER(sf) \
11 ((sf)->do_save_under)
12 #define SDO_START_LOWERED(sf) \
13 ((sf)->do_start_lowered)
14 #define SDO_START_SHADED(sf) \
15 ((sf)->do_start_shaded)
16 #define SHAS_BORDER_WIDTH(sf) \
17 ((sf)->has_border_width)
18 #define SHAS_COLOR_BACK(sf) \
19 ((sf)->has_color_back)
20 #define SHAS_COLOR_FORE(sf) \
21 ((sf)->has_color_fore)
22 #define SHAS_HANDLE_WIDTH(sf) \
23 ((sf)->has_handle_width)
24 #define SHAS_ICON(sf) \
25 ((sf)->has_icon)
26 #define SHAS_ICON_BOXES(sf) \
27 ((sf)->has_icon_boxes)
28 #define SHAS_ICON_SIZE_LIMITS(sf) \
29 ((sf)->has_icon_size_limits)
30 #define SHAS_ICON_BACKGROUND_PADDING(sf) \
31 ((sf)->has_icon_background_padding)
32 #define SHAS_ICON_BACKGROUND_RELIEF(sf) \
33 ((sf)->has_icon_background_relief)
34 #define SHAS_ICON_TITLE_RELIEF(sf) \
35 ((sf)->has_icon_title_relief)
36 #define SHAS_MIN_WINDOW_SIZE(sf) \
37 ((sf)->has_min_window_size)
38 #define SHAS_MAX_WINDOW_SIZE(sf) \
39 ((sf)->has_max_window_size)
40 #define SHAS_WINDOW_SHADE_STEPS(sf) \
41 ((sf)->has_window_shade_steps)
42 #define SHAS_MINI_ICON(sf) \
43 ((sf)->has_mini_icon)
44 #define SHAS_MWM_DECOR(sf) \
45 ((sf)->has_mwm_decor)
46 #define SHAS_MWM_FUNCTIONS(sf) \
47 ((sf)->has_mwm_functions)
48 #define SHAS_NO_HANDLES(sf) \
49 ((sf)->has_no_handles)
50 #define SHAS_NO_TITLE(sf) \
51 ((sf)->has_no_title)
52 #define SHAS_OL_DECOR(sf) \
53 ((sf)->has_ol_decor)
54 #define SIS_BUTTON_DISABLED(sf) \
55 ((sf)->is_button_disabled)
56 #define SIS_UNMANAGED(sf) \
57 ((sf)->is_unmanaged)
58 #define SPLACEMENT_MODE(sf) \
59 ((sf)->placement_mode)
60 #define SEWMH_PLACEMENT_MODE(sf) \
61 ((sf)->ewmh_placement_mode)
62 #define SUSE_BACKING_STORE(sf) \
63 ((sf)->use_backing_store)
64 #define SUSE_PARENT_RELATIVE(sf) \
65 ((sf)->use_parent_relative)
66 #define SUSE_COLORSET(sf) \
67 ((sf)->use_colorset)
68 #define SUSE_COLORSET_HI(sf) \
69 ((sf)->use_colorset_hi)
70 #define SUSE_BORDER_COLORSET(sf) \
71 ((sf)->use_border_colorset)
72 #define SUSE_BORDER_COLORSET_HI(sf) \
73 ((sf)->use_border_colorset_hi)
74 #define SUSE_ICON_TITLE_COLORSET(sf) \
75 ((sf)->use_icon_title_colorset)
76 #define SUSE_ICON_TITLE_COLORSET_HI(sf) \
77 ((sf)->use_icon_title_colorset_hi)
78 #define SUSE_ICON_BACKGROUND_COLORSET(sf) \
79 ((sf)->use_icon_background_colorset)
80 #define SUSE_LAYER(sf) \
81 ((sf)->use_layer)
82 #define SUSE_NO_PPOSITION(sf) \
83 ((sf)->use_no_pposition)
84 #define SUSE_NO_USPOSITION(sf) \
85 ((sf)->use_no_usposition)
86 #define SUSE_NO_TRANSIENT_PPOSITION(sf) \
87 ((sf)->use_no_transient_pposition)
88 #define SUSE_NO_TRANSIENT_USPOSITION(sf) \
89 ((sf)->use_no_transient_usposition)
90 #define SUSE_START_ON_DESK(sf) \
91 ((sf)->use_start_on_desk)
92 #define SUSE_START_ON_PAGE_FOR_TRANSIENT(sf) \
93 ((sf)->use_start_on_page_for_transient)
94 #define SUSE_START_ON_SCREEN(sf) \
95 ((sf)->use_start_on_screen)
96 #define SMANUAL_PLACEMENT_HONORS_STARTS_ON_PAGE(sf) \
97 ((sf)->manual_placement_honors_starts_on_page)
98 #define SCAPTURE_HONORS_STARTS_ON_PAGE(sf) \
99 ((sf)->capture_honors_starts_on_page)
100 #define SRECAPTURE_HONORS_STARTS_ON_PAGE(sf) \
101 ((sf)->recapture_honors_starts_on_page)
102 #define SHAS_PLACEMENT_PENALTY(sf) \
103 ((sf)->has_placement_penalty)
104 #define SHAS_PLACEMENT_PERCENTAGE_PENALTY(sf) \
105 ((sf)->has_placement_percentage_penalty)
106 #define SHAS_PLACEMENT_POSITION_STRING(sf) \
107 ((sf)->has_placement_position_string
108 #define SCR_MOTION_METHOD(sf) \
109 ((sf)->ws_cr_motion_method)
111 /* access the various copies of the common flags structure. */
112 #define SCF(st) \
113 ((st).flags.common)
114 #define SCFS(st) \
115 ((st).flags.common.s)
116 #define SCM(st) \
117 ((st).flag_mask.common)
118 #define SCMS(st) \
119 ((st).flag_mask.common.s)
120 #define SCD(st) \
121 ((st).flag_default.common)
122 #define SCDS(st) \
123 ((st).flag_default.common.s)
124 #define SCC(st) \
125 ((st).change_mask.common)
126 #define SCCS(st) \
127 ((st).change_mask.common.s)
128 #define SFC(sf) \
129 ((sf).common)
131 /* access to common flags */
132 #define S_FOCUS_POLICY(c) \
133 ((c).s.focus_policy)
134 #define S_TITLE_DIR(c) \
135 ((c).title_dir)
136 #define S_SET_TITLE_DIR(c,x) \
137 ((c).title_dir = (x))
138 #define S_USER_STATES(c) \
139 ((c).user_states)
140 #define S_SET_USER_STATES(c,x) \
141 ((c).user_states = (x))
142 #define S_ADD_USER_STATES(c,x) \
143 ((c).user_states = ((c).user_states | (x)))
144 #define S_IS_STICKY_ACROSS_PAGES(c) \
145 ((c).is_sticky_across_pages)
146 #define S_SET_IS_STICKY_ACROSS_PAGES(c,x) \
147 ((c).is_sticky_across_pages = !!(x))
148 #define S_IS_STICKY_ACROSS_DESKS(c) \
149 ((c).is_sticky_across_desks)
150 #define S_SET_IS_STICKY_ACROSS_DESKS(c,x) \
151 ((c).is_sticky_across_desks = !!(x))
152 #define S_DO_CIRCULATE_SKIP(c) \
153 ((c).s.do_circulate_skip)
154 #define S_SET_DO_CIRCULATE_SKIP(c,x) \
155 ((c).s.do_circulate_skip = !!(x))
156 #define S_DO_CIRCULATE_SKIP_ICON(c) \
157 ((c).s.do_circulate_skip_icon)
158 #define S_SET_DO_CIRCULATE_SKIP_ICON(c,x) \
159 ((c).s.do_circulate_skip_icon = !!(x))
160 #define S_DO_CIRCULATE_SKIP_SHADED(c) \
161 ((c).s.do_circulate_skip_shaded)
162 #define S_SET_DO_CIRCULATE_SKIP_SHADED(c,x) \
163 ((c).s.do_circulate_skip_shaded = !!(x))
164 #define S_DO_ICONIFY_WINDOW_GROUPS(c) \
165 ((c).s.do_iconify_window_groups)
166 #define S_SET_DO_ICONIFY_WINDOW_GROUPS(c,x) \
167 ((c).s.do_iconify_window_groups = !!(x))
168 #define S_DO_IGNORE_GNOME_HINTS(c) \
169 ((c).s.do_ignore_gnome_hints)
170 #define S_SET_DO_IGNORE_GNOME_HINTS(c,x) \
171 ((c).s.do_ignore_gnome_hints = !!(x))
172 #define S_DO_IGNORE_ICON_BOXES(c) \
173 ((c).s.do_ignore_icon_boxes)
174 #define S_SET_DO_IGNORE_ICON_BOXES(c,x) \
175 ((c).s.do_ignore_icon_boxes = !!(x))
176 #define S_DO_IGNORE_RESTACK(c) \
177 ((c).s.do_ignore_restack)
178 #define S_SET_DO_IGNORE_RESTACK(c,x) \
179 ((c).s.do_ignore_restack = !!(x))
180 #define S_DO_USE_WINDOW_GROUP_HINT(c) \
181 ((c).s.do_use_window_group_hint)
182 #define S_SET_DO_USE_WINDOW_GROUP_HINT(c,x) \
183 ((c).s.do_use_window_group_hint = !!(x))
184 #define S_DO_LOWER_TRANSIENT(c) \
185 ((c).s.do_lower_transient)
186 #define S_SET_DO_LOWER_TRANSIENT(c,x) \
187 ((c).s.do_lower_transient = !!(x))
188 #define S_DO_NOT_SHOW_ON_MAP(c) \
189 ((c).s.do_not_show_on_map)
190 #define S_SET_DO_NOT_SHOW_ON_MAP(c,x) \
191 ((c).s.do_not_show_on_map = !!(x))
192 #define S_DO_RAISE_TRANSIENT(c) \
193 ((c).s.do_raise_transient)
194 #define S_SET_DO_RAISE_TRANSIENT(c,x) \
195 ((c).s.do_raise_transient = !!(x))
196 #define S_DO_RESIZE_OPAQUE(c) \
197 ((c).s.do_resize_opaque)
198 #define S_SET_DO_RESIZE_OPAQUE(c,x) \
199 ((c).s.do_resize_opaque = !!(x))
200 #define S_DO_SHRINK_WINDOWSHADE(c) \
201 ((c).s.do_shrink_windowshade)
202 #define S_SET_DO_SHRINK_WINDOWSHADE(c,x) \
203 ((c).s.do_shrink_windowshade = !!(x))
204 #define S_DO_STACK_TRANSIENT_PARENT(c) \
205 ((c).s.do_stack_transient_parent)
206 #define S_SET_DO_STACK_TRANSIENT_PARENT(c,x) \
207 ((c).s.do_stack_transient_parent = !!(x))
208 #define S_DO_WINDOW_LIST_SKIP(c) \
209 ((c).s.do_window_list_skip)
210 #define S_SET_DO_WINDOW_LIST_SKIP(c,x) \
211 ((c).s.do_window_list_skip = !!(x))
212 #define S_HAS_NO_BORDER(c) \
213 ((c).has_no_border)
214 #define S_SET_HAS_NO_BORDER(c,x) \
215 ((c).has_no_border = !!(x))
216 #define S_HAS_DEPRESSABLE_BORDER(c) \
217 ((c).s.has_depressable_border)
218 #define S_SET_HAS_DEPRESSABLE_BORDER(c,x) \
219 ((c).s.has_depressable_border = !!(x))
220 #define S_HAS_ICON_FONT(c) \
221 ((c).has_icon_font)
222 #define S_SET_HAS_ICON_FONT(c,x) \
223 ((c).has_icon_font = !!(x))
224 #define S_HAS_MWM_BORDER(c) \
225 ((c).s.has_mwm_border)
226 #define S_SET_HAS_MWM_BORDER(c,x) \
227 ((c).s.has_mwm_border = !!(x))
228 #define S_HAS_MWM_BUTTONS(c) \
229 ((c).s.has_mwm_buttons)
230 #define S_SET_HAS_MWM_BUTTONS(c,x) \
231 ((c).s.has_mwm_buttons = !!(x))
232 #define S_HAS_MWM_OVERRIDE(c) \
233 ((c).s.has_mwm_override)
234 #define S_SET_HAS_MWM_OVERRIDE(c,x) \
235 ((c).s.has_mwm_override = !!(x))
236 #define S_HAS_NO_STICKY_STIPPLED_ICON_TITLE(c) \
237 ((c).s.has_no_sticky_stippled_icon_title)
238 #define S_SET_HAS_NO_STICKY_STIPPLED_ICON_TITLE(c,x) \
239 ((c).s.has_no_sticky_stippled_icon_title = !!(x))
240 #define S_HAS_NO_ICON_TITLE(c) \
241 ((c).s.has_no_icon_title)
242 #define S_SET_HAS_NO_ICON_TITLE(c,x) \
243 ((c).s.has_no_icon_title = !!(x))
244 #define S_HAS_OVERRIDE_SIZE(c) \
245 ((c).s.has_override_size)
246 #define S_SET_HAS_OVERRIDE_SIZE(c,x) \
247 ((c).s.has_override_size = !!(x))
248 #define S_HAS_STIPPLED_TITLE(c) \
249 ((c).s.has_stippled_title)
250 #define S_SET_HAS_STIPPLED_TITLE(c,x) \
251 ((c).s.has_stippled_title = !!(x))
252 #define S_HAS_NO_STICKY_STIPPLED_TITLE(c) \
253 ((c).s.has_no_sticky_stippled_title)
254 #define S_SET_HAS_NO_STICKY_STIPPLED_TITLE(c,x) \
255 ((c).s.has_no_sticky_stippled_title = !!(x))
256 #define S_HAS_STIPPLED_ICON_TITLE(c) \
257 ((c).s.has_stippled_icon_title)
258 #define S_SET_HAS_STIPPLED_ICON_TITLE(c,x) \
259 ((c).s.has_stippled_icon_title = !!(x))
260 #define S_HAS_WINDOW_FONT(c) \
261 ((c).has_window_font)
262 #define S_SET_HAS_WINDOW_FONT(c,x) \
263 ((c).has_window_font = !!(x))
264 #define S_ICON_OVERRIDE(c) \
265 ((c).s.icon_override)
266 #define S_SET_ICON_OVERRIDE(c,x) \
267 ((c).s.icon_override = (x))
268 #define S_IS_BOTTOM_TITLE_ROTATED(c) \
269 ((c).s.is_bottom_title_rotated)
270 #define S_SET_IS_BOTTOM_TITLE_ROTATED(c,x) \
271 ((c).s.is_bottom_title_rotated = !!(x))
272 #define S_IS_FIXED(c) \
273 ((c).s.is_fixed)
274 #define S_SET_IS_FIXED(c,x) \
275 ((c).s.is_fixed = !!(x))
276 #define S_IS_FIXED_PPOS(c) \
277 ((c).s.is_fixed_ppos)
278 #define S_SET_IS_FIXED_PPOS(c,x) \
279 ((c).s.is_fixed_ppos = !!(x))
280 #define S_SET_IS_UNICONIFIABLE(c,x) \
281 ((c).s.is_uniconifiable = !!(x))
282 #define S_SET_IS_UNMAXIMIZABLE(c,x) \
283 ((c).s.is_unmaximizable = !!(x))
284 #define S_SET_IS_UNCLOSABLE(c,x) \
285 ((c).s.is_unclosable = !!(x))
286 #define S_SET_MAXIMIZE_FIXED_SIZE_DISALLOWED(c,x) \
287 ((c).s.is_maximize_fixed_size_disallowed = !!(x))
288 #define S_IS_ICON_STICKY_ACROSS_PAGES(c) \
289 ((c).s.is_icon_sticky_across_pages)
290 #define S_SET_IS_ICON_STICKY_ACROSS_PAGES(c,x) \
291 ((c).s.is_icon_sticky_across_pages = !!(x))
292 #define S_IS_ICON_STICKY_ACROSS_DESKS(c) \
293 ((c).s.is_icon_sticky_across_desks)
294 #define S_SET_IS_ICON_STICKY_ACROSS_DESKS(c,x) \
295 ((c).s.is_icon_sticky_across_desks = !!(x))
296 #define S_IS_ICON_SUPPRESSED(c) \
297 ((c).s.is_icon_suppressed)
298 #define S_SET_IS_ICON_SUPPRESSED(c,x) \
299 ((c).s.is_icon_suppressed = !!(x))
300 #define S_IS_LEFT_TITLE_ROTATED_CW(c) \
301 ((c).s.is_left_title_rotated_cw)
302 #define S_SET_IS_LEFT_TITLE_ROTATED_CW(c,x) \
303 ((c).s.is_left_title_rotated_cw = !!(x))
304 #define S_IS_SIZE_FIXED(c) \
305 ((c).s.is_size_fixed)
306 #define S_SET_IS_SIZE_FIXED(c,x) \
307 ((c).s.is_size_fixed = !!(x))
308 #define S_IS_PSIZE_FIXED(c) \
309 ((c).s.is_psize_fixed)
310 #define S_SET_IS_PSIZE_FIXED(c,x) \
311 ((c).s.is_psize_fixed = !!(x))
312 #define S_IS_RIGHT_TITLE_ROTATED_CW(c) \
313 ((c).s.is_right_title_rotated_cw)
314 #define S_SET_IS_RIGHT_TITLE_ROTATED_CW(c,x) \
315 ((c).s.is_right_title_rotated_cw = !!(x))
316 #define S_IS_TOP_TITLE_ROTATED(c) \
317 ((c).s.is_top_title_rotated)
318 #define S_SET_IS_TOP_TITLE_ROTATED(c,x) \
319 ((c).s.is_top_title_rotated = !!(x))
320 #define S_USE_ICON_POSITION_HINT(c) \
321 ((c).s.use_icon_position_hint)
322 #define S_SET_USE_ICON_POSITION_HINT(c,x) \
323 ((c).s.use_icon_position_hint = !!(x))
324 #define S_USE_INDEXED_WINDOW_NAME(c) \
325 ((c).s.use_indexed_window_name)
326 #define S_SET_USE_INDEXED_WINDOW_NAME(c,x) \
327 ((c).s.use_indexed_window_name = !!(x))
328 #define S_USE_INDEXED_ICON_NAME(c) \
329 ((c).s.use_indexed_icon_name)
330 #define S_SET_USE_INDEXED_ICON_NAME(c,x) \
331 ((c).s.use_indexed_icon_name = !!(x))
332 #define S_WINDOWSHADE_LAZINESS(c) \
333 ((c).s.windowshade_laziness)
334 #define S_SET_WINDOWSHADE_LAZINESS(c,x) \
335 ((c).s.windowshade_laziness = (x))
336 #define S_USE_TITLE_DECOR_ROTATION(c) \
337 ((c).s.use_title_decor_rotation)
338 #define S_SET_USE_TITLE_DECOR_ROTATION(c,x) \
339 ((c).s.use_title_decor_rotation = !!(x))
340 #define S_DO_EWMH_MINI_ICON_OVERRIDE(c) \
341 ((c).s.do_ewmh_mini_icon_override)
342 #define S_SET_DO_EWMH_MINI_ICON_OVERRIDE(c,x) \
343 ((c).s.do_ewmh_mini_icon_override = !!(x))
344 #define S_DO_EWMH_DONATE_ICON(c) \
345 ((c).s.do_ewmh_donate_icon)
346 #define S_SET_DO_EWMH_DONATE_ICON(c,x) \
347 ((c).s.do_ewmh_donate_icon = !!(x))
348 #define S_DO_EWMH_DONATE_MINI_ICON(c) \
349 ((c).s.do_ewmh_donate_mini_icon)
350 #define S_SET_DO_EWMH_DONATE_MINI_ICON(c,x) \
351 ((c).s.do_ewmh_donate_mini_icon = !!(x))
352 #define S_DO_EWMH_USE_STACKING_HINTS(c) \
353 ((c).s.do_ewmh_use_stacking_hints)
354 #define S_SET_DO_EWMH_USE_STACKING_HINTS(c,x) \
355 ((c).s.do_ewmh_use_stacking_hints = !!(x))
356 #define S_DO_EWMH_IGNORE_STRUT_HINTS(c) \
357 ((c).s.do_ewmh_ignore_strut_hints)
358 #define S_SET_DO_EWMH_IGNORE_STRUT_HINTS(c,x) \
359 ((c).s.do_ewmh_ignore_strut_hints = !!(x))
360 #define S_DO_EWMH_IGNORE_STATE_HINTS(c) \
361 ((c).s.do_ewmh_ignore_state_hints)
362 #define S_SET_DO_EWMH_IGNORE_STATE_HINTS(c,x) \
363 ((c).s.do_ewmh_ignore_state_hints = !!(x))
364 #define S_DO_EWMH_IGNORE_WINDOW_TYPE(c) \
365 ((c).s.do_ewmh_ignore_window_type)
366 #define S_SET_DO_EWMH_IGNORE_WINDOW_TYPE(c,x) \
367 ((c).s.do_ewmh_ignore_window_type = !!(x))
368 #define S_EWMH_MAXIMIZE_MODE(c) \
369 ((c).s.ewmh_maximize_mode)
370 #define S_SET_EWMH_MAXIMIZE_MODE(c,x) \
371 ((c).s.ewmh_maximize_mode = (x))
373 /* access to style_id */
374 #define SID_GET_NAME(id) \
375 ((id).name)
376 #define SID_SET_NAME(id,x) \
377 ((id).name = (x))
378 #define SID_GET_WINDOW_ID(id) \
379 ((id).window_id)
380 #define SID_SET_WINDOW_ID(id,x) \
381 ((id).window_id = (x))
382 #define SID_SET_HAS_NAME(id,x) \
383 ((id).flags.has_name = !!(x))
384 #define SID_GET_HAS_NAME(id) \
385 ((id).flags.has_name)
386 #define SID_SET_HAS_WINDOW_ID(id,x) \
387 ((id).flags.has_window_id = !!(x))
388 #define SID_GET_HAS_WINDOW_ID(id) \
389 ((id).flags.has_window_id)
391 /* access to other parts of a style (call with the style itself) */
392 #define SGET_NEXT_STYLE(s) \
393 ((s).next)
394 #define SSET_NEXT_STYLE(s,x) \
395 ((s).next = (x))
396 #define SGET_PREV_STYLE(s) \
397 ((s).prev)
398 #define SSET_PREV_STYLE(s,x) \
399 ((s).prev = (x))
400 #define SGET_ID(s) \
401 ((s).id)
402 #define SGET_NAME(s) \
403 SID_GET_NAME(SGET_ID(s))
404 #define SSET_NAME(s,x) \
405 SID_SET_NAME(SGET_ID(s),x)
406 #define SGET_WINDOW_ID(s) \
407 SID_GET_WINDOW_ID(SGET_ID(s))
408 #define SSET_WINDOW_ID(s,x) \
409 SID_SET_WINDOW_ID(SGET_ID(s),x)
410 #define SSET_ID_HAS_NAME(s,x) \
411 SID_SET_HAS_NAME(SGET_ID(s), x)
412 #define SGET_ID_HAS_NAME(s) \
413 SID_GET_HAS_NAME(SGET_ID(s))
414 #define SSET_ID_HAS_WINDOW_ID(s,x) \
415 SID_SET_HAS_WINDOW_ID(SGET_ID(s),x)
416 #define SGET_ID_HAS_WINDOW_ID(s) \
417 SID_GET_HAS_WINDOW_ID(SGET_ID(s))
418 #define SGET_ICON_NAME(s) \
419 ((s).icon_name)
420 #define SSET_ICON_NAME(s,x) \
421 ((s).icon_name = (x))
422 #define SGET_MINI_ICON_NAME(s) \
423 ((s).mini_icon_name)
424 #define SSET_MINI_ICON_NAME(s,x) \
425 ((s).mini_icon_name = (x))
426 #ifdef USEDECOR
427 #define SGET_DECOR_NAME(s) \
428 ((s).decor_name)
429 #define SSET_DECOR_NAME(s,x) \
430 ((s).decor_name = (x))
431 #endif
432 #define SGET_FORE_COLOR_NAME(s) \
433 ((s).fore_color_name)
434 #define SSET_FORE_COLOR_NAME(s,x) \
435 ((s).fore_color_name = (x))
436 #define SGET_BACK_COLOR_NAME(s) \
437 ((s).back_color_name)
438 #define SSET_BACK_COLOR_NAME(s,x) \
439 ((s).back_color_name = (x))
440 #define SGET_FORE_COLOR_NAME_HI(s) \
441 ((s).fore_color_name_hi)
442 #define SSET_FORE_COLOR_NAME_HI(s,x) \
443 ((s).fore_color_name_hi = (x))
444 #define SGET_BACK_COLOR_NAME_HI(s) \
445 ((s).back_color_name_hi)
446 #define SSET_BACK_COLOR_NAME_HI(s,x) \
447 ((s).back_color_name_hi = (x))
448 #define SGET_ICON_FONT(s) \
449 ((s).icon_font)
450 #define SSET_ICON_FONT(s,x) \
451 ((s).icon_font = (x))
452 #define SGET_WINDOW_FONT(s) \
453 ((s).window_font)
454 #define SSET_WINDOW_FONT(s,x) \
455 ((s).window_font = (x))
456 #define SGET_COLORSET(s) \
457 ((s).colorset)
458 #define SSET_COLORSET(s,x) \
459 ((s).colorset = (x))
460 #define SSET_BORDER_COLORSET(s,x) \
461 ((s).border_colorset = (x))
462 #define SGET_BORDER_COLORSET(s) \
463 ((s).border_colorset)
464 #define SGET_COLORSET_HI(s) \
465 ((s).colorset_hi)
466 #define SSET_COLORSET_HI(s,x) \
467 ((s).colorset_hi = (x))
468 #define SGET_BORDER_COLORSET_HI(s) \
469 ((s).border_colorset_hi)
470 #define SSET_BORDER_COLORSET_HI(s,x) \
471 ((s).border_colorset_hi = (x))
472 #define SSET_ICON_TITLE_COLORSET(s,x) \
473 ((s).icon_title_colorset = (x))
474 #define SGET_ICON_TITLE_COLORSET(s) \
475 ((s).icon_title_colorset)
476 #define SSET_ICON_TITLE_COLORSET_HI(s,x) \
477 ((s).icon_title_colorset_hi = (x))
478 #define SGET_ICON_TITLE_COLORSET_HI(s) \
479 ((s).icon_title_colorset_hi)
480 #define SSET_ICON_BACKGROUND_COLORSET(s,x) \
481 ((s).icon_background_colorset = (x))
482 #define SGET_ICON_BACKGROUND_COLORSET(s) \
483 ((s).icon_background_colorset)
484 #define SGET_FLAGS_POINTER(s) \
485 (&((s).flags))
486 #define SGET_BORDER_WIDTH(s) \
487 ((s).border_width)
488 #define SSET_BORDER_WIDTH(s,x) \
489 ((s).border_width = (x))
490 #define SGET_HANDLE_WIDTH(s) \
491 ((s).handle_width)
492 #define SSET_HANDLE_WIDTH(s,x) \
493 ((s).handle_width = (x))
494 #define SGET_LAYER(s) \
495 ((s).layer)
496 #define SSET_LAYER(s,x) \
497 ((s).layer = (x))
498 #define SGET_START_DESK(s) \
499 ((s).start_desk)
500 #define SSET_START_DESK(s,x) \
501 ((s).start_desk = (x))
502 #define SGET_START_PAGE_X(s) \
503 ((s).start_page_x)
504 #define SSET_START_PAGE_X(s,x) \
505 ((s).start_page_x = (x))
506 #define SGET_START_PAGE_Y(s) \
507 ((s).start_page_y)
508 #define SSET_START_PAGE_Y(s,x) \
509 ((s).start_page_y = (x))
510 #define SGET_START_SCREEN(s) \
511 ((s).start_screen)
512 #define SSET_START_SCREEN(s,x) \
513 ((s).start_screen = (x))
514 #define SSET_STARTS_SHADED_DIR(s,x) \
515 ((s).flags.start_shaded_dir = (x))
516 #define SGET_STARTS_SHADED_DIR(s) \
517 ((s).flags.start_shaded_dir)
518 #define SGET_MIN_ICON_WIDTH(s) \
519 ((s).min_icon_width)
520 #define SSET_MIN_ICON_WIDTH(s,x) \
521 ((s).min_icon_width = (x))
522 #define SGET_MIN_ICON_HEIGHT(s) \
523 ((s).min_icon_height)
524 #define SSET_MIN_ICON_HEIGHT(s,x) \
525 ((s).min_icon_height = (x))
526 #define SGET_MAX_ICON_WIDTH(s) \
527 ((s).max_icon_width)
528 #define SSET_MAX_ICON_WIDTH(s,x) \
529 ((s).max_icon_width = (x))
530 #define SGET_MAX_ICON_HEIGHT(s) \
531 ((s).max_icon_height)
532 #define SSET_MAX_ICON_HEIGHT(s,x) \
533 ((s).max_icon_height = (x))
534 #define SGET_ICON_RESIZE_TYPE(s) \
535 ((s).icon_resize_type)
536 #define SSET_ICON_RESIZE_TYPE(s,x) \
537 ((s).icon_resize_type = (x))
538 #define SGET_ICON_BACKGROUND_RELIEF(s) \
539 ((s).icon_background_relief)
540 #define SSET_ICON_BACKGROUND_RELIEF(s,x) \
541 ((s).icon_background_relief = (x))
542 #define SGET_ICON_BACKGROUND_PADDING(s) \
543 ((s).icon_background_padding)
544 #define SSET_ICON_BACKGROUND_PADDING(s,x) \
545 ((s).icon_background_padding = (x))
546 #define SGET_ICON_TITLE_RELIEF(s) \
547 ((s).icon_title_relief)
548 #define SSET_ICON_TITLE_RELIEF(s,x) \
549 ((s).icon_title_relief = (x))
550 #define SGET_MIN_WINDOW_WIDTH(s) \
551 ((s).min_window_width)
552 #define SSET_MIN_WINDOW_WIDTH(s,x) \
553 ((s).min_window_width = (x))
554 #define SGET_MAX_WINDOW_WIDTH(s) \
555 ((s).max_window_width)
556 #define SSET_MAX_WINDOW_WIDTH(s,x) \
557 ((s).max_window_width = (x))
558 #define SGET_MIN_WINDOW_HEIGHT(s) \
559 ((s).min_window_height)
560 #define SSET_MIN_WINDOW_HEIGHT(s,x) \
561 ((s).min_window_height = (x))
562 #define SGET_MAX_WINDOW_HEIGHT(s) \
563 ((s).max_window_height)
564 #define SSET_MAX_WINDOW_HEIGHT(s,x) \
565 ((s).max_window_height = (x))
566 #define SGET_WINDOW_SHADE_STEPS(s) \
567 ((s).shade_anim_steps)
568 #define SSET_WINDOW_SHADE_STEPS(s,x) \
569 ((s).shade_anim_steps = (x))
570 #define SGET_SNAP_PROXIMITY(s) \
571 ((s).snap_attraction.proximity)
572 #define SSET_SNAP_PROXIMITY(s,x) \
573 ((s).snap_attraction.proximity = (x))
574 #define SGET_SNAP_MODE(s) \
575 ((s).snap_attraction.mode)
576 #define SSET_SNAP_MODE(s,x) \
577 ((s).snap_attraction.mode = (x))
578 #define SGET_SNAP_GRID_X(s) \
579 ((s).snap_grid_x)
580 #define SSET_SNAP_GRID_X(s,x) \
581 ((s).snap_grid_x = (x))
582 #define SGET_SNAP_GRID_Y(s) \
583 ((s).snap_grid_y)
584 #define SSET_SNAP_GRID_Y(s,x) \
585 ((s).snap_grid_y = (x))
586 #define SGET_EDGE_DELAY_MS_MOVE(s) \
587 ((s).edge_delay_ms_move)
588 #define SSET_EDGE_DELAY_MS_MOVE(s,x) \
589 ((s).edge_delay_ms_move = (x))
590 #define SGET_EDGE_DELAY_MS_RESIZE(s) \
591 ((s).edge_delay_ms_resize)
592 #define SSET_EDGE_DELAY_MS_RESIZE(s,x) \
593 ((s).edge_delay_ms_resize = (x))
594 #define SGET_EDGE_RESISTANCE_MOVE(s) \
595 ((s).edge_resistance_move)
596 #define SSET_EDGE_RESISTANCE_MOVE(s,x) \
597 ((s).edge_resistance_move = (x))
598 #define SGET_EDGE_RESISTANCE_XINERAMA_MOVE(s) \
599 ((s).edge_resistance_xinerama_move)
600 #define SSET_EDGE_RESISTANCE_XINERAMA_MOVE(s,x) \
601 ((s).edge_resistance_xinerama_move = (x))
602 #define SGET_ICON_BOXES(s) \
603 ((s).icon_boxes)
604 #define SSET_ICON_BOXES(s,x) \
605 ((s).icon_boxes = (x))
606 #define SGET_PLACEMENT_PENALTY_PTR(s) \
607 (&(s).pl_penalty)
608 #define SGET_NORMAL_PLACEMENT_PENALTY(s) \
609 ((s).pl_penalty.normal)
610 #define SGET_ONTOP_PLACEMENT_PENALTY(s) \
611 ((s).pl_penalty.ontop)
612 #define SGET_ICON_PLACEMENT_PENALTY(s) \
613 ((s).pl_penalty.icon)
614 #define SGET_STICKY_PLACEMENT_PENALTY(s) \
615 ((s).pl_penalty.sticky)
616 #define SGET_BELOW_PLACEMENT_PENALTY(s) \
617 ((s).pl_penalty.below)
618 #define SGET_EWMH_STRUT_PLACEMENT_PENALTY(s) \
619 ((s).pl_penalty.strut)
620 #define SSET_NORMAL_PLACEMENT_PENALTY(s,x) \
621 ((s).pl_penalty.normal = (x))
622 #define SSET_ONTOP_PLACEMENT_PENALTY(s,x) \
623 ((s).pl_penalty.ontop = (x))
624 #define SSET_ICON_PLACEMENT_PENALTY(s,x) \
625 ((s).pl_penalty.icon = (x))
626 #define SSET_STICKY_PLACEMENT_PENALTY(s,x) \
627 ((s).pl_penalty.sticky = (x))
628 #define SSET_BELOW_PLACEMENT_PENALTY(s,x) \
629 ((s).pl_penalty.below = (x))
630 #define SSET_EWMH_STRUT_PLACEMENT_PENALTY(s,x) \
631 ((s).pl_penalty.strut = (x))
632 #define SGET_PLACEMENT_PERCENTAGE_PENALTY_PTR(s) \
633 (&(s).pl_percent_penalty)
634 #define SGET_99_PLACEMENT_PERCENTAGE_PENALTY(s) \
635 ((s).pl_percent_penalty.p99)
636 #define SGET_95_PLACEMENT_PERCENTAGE_PENALTY(s) \
637 ((s).pl_percent_penalty.p95)
638 #define SGET_85_PLACEMENT_PERCENTAGE_PENALTY(s) \
639 ((s).pl_percent_penalty.p85)
640 #define SGET_75_PLACEMENT_PERCENTAGE_PENALTY(s) \
641 ((s).pl_percent_penalty.p75)
642 #define SSET_99_PLACEMENT_PERCENTAGE_PENALTY(s,x) \
643 ((s).pl_percent_penalty.p99 = (x))
644 #define SSET_95_PLACEMENT_PERCENTAGE_PENALTY(s,x) \
645 ((s).pl_percent_penalty.p95 = (x))
646 #define SSET_85_PLACEMENT_PERCENTAGE_PENALTY(s,x) \
647 ((s).pl_percent_penalty.p85 = (x))
648 #define SSET_75_PLACEMENT_PERCENTAGE_PENALTY(s,x) \
649 ((s).pl_percent_penalty.p75 = (x))
650 #define SGET_PLACEMENT_POSITION_STRING(s) \
651 ((s).pl_position_string)
652 #define SSET_PLACEMENT_POSITION_STRING(s,x) \
653 ((s).pl_position_string = (x))
654 #define SGET_INITIAL_MAP_COMMAND_STRING(s) \
655 ((s).initial_map_command_string)
656 #define SSET_INITIAL_MAP_COMMAND_STRING(s,x) \
657 ((s).initial_map_command_string = (x))
659 /* function prototypes */
660 void lookup_style(FvwmWindow *fw, window_style *styles);
661 Bool blockcmpmask(char *blk1, char *blk2, char *mask, int length);
662 void check_window_style_change(
663 FvwmWindow *t, update_win *flags, window_style *ret_style);
664 void reset_style_changes(void);
665 void update_style_colorset(int colorset);
666 void update_window_color_style(FvwmWindow *fw, window_style *style);
667 void update_window_color_hi_style(FvwmWindow *fw, window_style *style);
668 void update_icon_title_cs_style(FvwmWindow *fw, window_style *pstyle);
669 void update_icon_title_cs_hi_style(FvwmWindow *fw, window_style *pstyle);
670 void update_icon_background_cs_style(FvwmWindow *fw, window_style *pstyle);
671 void free_icon_boxes(icon_boxes *ib);
672 void style_destroy_style(style_id_t s_id);
673 void print_styles(int verbose);
675 #endif /* _STYLE_ */