diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/config.h | 120 |
1 files changed, 63 insertions, 57 deletions
diff --git a/include/sway/config.h b/include/sway/config.h index b541ff0d..85605ce4 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -33,15 +33,15 @@ enum binding_input_type { | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | enum binding_flags { | 35 | enum binding_flags { |
36 | BINDING_RELEASE=1, | 36 | BINDING_RELEASE = 1 << 0, |
37 | BINDING_LOCKED=2, // keyboard only | 37 | BINDING_LOCKED = 1 << 1, // keyboard only |
38 | BINDING_BORDER=4, // mouse only; trigger on container border | 38 | BINDING_BORDER = 1 << 2, // mouse only; trigger on container border |
39 | BINDING_CONTENTS=8, // mouse only; trigger on container contents | 39 | BINDING_CONTENTS = 1 << 3, // mouse only; trigger on container contents |
40 | BINDING_TITLEBAR=16, // mouse only; trigger on container titlebar | 40 | BINDING_TITLEBAR = 1 << 4, // mouse only; trigger on container titlebar |
41 | BINDING_CODE=32, // keyboard only; convert keysyms into keycodes | 41 | BINDING_CODE = 1 << 5, // keyboard only; convert keysyms into keycodes |
42 | BINDING_RELOAD=64, // switch only; (re)trigger binding on reload | 42 | BINDING_RELOAD = 1 << 6, // switch only; (re)trigger binding on reload |
43 | BINDING_INHIBITED=128, // keyboard only: ignore shortcut inhibitor | 43 | BINDING_INHIBITED = 1 << 7, // keyboard only: ignore shortcut inhibitor |
44 | BINDING_NOREPEAT=256, // keyboard only; do not trigger when repeating a held key | 44 | BINDING_NOREPEAT = 1 << 8, // keyboard only; do not trigger when repeating a held key |
45 | }; | 45 | }; |
46 | 46 | ||
47 | /** | 47 | /** |
@@ -113,7 +113,7 @@ struct calibration_matrix { | |||
113 | enum input_config_mapped_to { | 113 | enum input_config_mapped_to { |
114 | MAPPED_TO_DEFAULT, | 114 | MAPPED_TO_DEFAULT, |
115 | MAPPED_TO_OUTPUT, | 115 | MAPPED_TO_OUTPUT, |
116 | MAPPED_TO_REGION | 116 | MAPPED_TO_REGION, |
117 | }; | 117 | }; |
118 | 118 | ||
119 | /** | 119 | /** |
@@ -173,21 +173,21 @@ struct seat_attachment_config { | |||
173 | }; | 173 | }; |
174 | 174 | ||
175 | enum seat_config_allow_constrain { | 175 | enum seat_config_allow_constrain { |
176 | CONSTRAIN_DEFAULT, // the default is currently enabled | 176 | CONSTRAIN_DEFAULT, // the default is currently enabled |
177 | CONSTRAIN_ENABLE, | 177 | CONSTRAIN_ENABLE, |
178 | CONSTRAIN_DISABLE | 178 | CONSTRAIN_DISABLE, |
179 | }; | 179 | }; |
180 | 180 | ||
181 | enum seat_config_shortcuts_inhibit { | 181 | enum seat_config_shortcuts_inhibit { |
182 | SHORTCUTS_INHIBIT_DEFAULT, // the default is currently enabled | 182 | SHORTCUTS_INHIBIT_DEFAULT, // the default is currently enabled |
183 | SHORTCUTS_INHIBIT_ENABLE, | 183 | SHORTCUTS_INHIBIT_ENABLE, |
184 | SHORTCUTS_INHIBIT_DISABLE | 184 | SHORTCUTS_INHIBIT_DISABLE, |
185 | }; | 185 | }; |
186 | 186 | ||
187 | enum seat_keyboard_grouping { | 187 | enum seat_keyboard_grouping { |
188 | KEYBOARD_GROUP_DEFAULT, // the default is currently smart | 188 | KEYBOARD_GROUP_DEFAULT, // the default is currently smart |
189 | KEYBOARD_GROUP_NONE, | 189 | KEYBOARD_GROUP_NONE, |
190 | KEYBOARD_GROUP_SMART // keymap and repeat info | 190 | KEYBOARD_GROUP_SMART, // keymap and repeat info |
191 | }; | 191 | }; |
192 | 192 | ||
193 | enum sway_input_idle_source { | 193 | enum sway_input_idle_source { |
@@ -220,14 +220,14 @@ struct seat_config { | |||
220 | enum config_dpms { | 220 | enum config_dpms { |
221 | DPMS_IGNORE, | 221 | DPMS_IGNORE, |
222 | DPMS_ON, | 222 | DPMS_ON, |
223 | DPMS_OFF | 223 | DPMS_OFF, |
224 | }; | 224 | }; |
225 | 225 | ||
226 | enum scale_filter_mode { | 226 | enum scale_filter_mode { |
227 | SCALE_FILTER_DEFAULT, // the default is currently smart | 227 | SCALE_FILTER_DEFAULT, // the default is currently smart |
228 | SCALE_FILTER_LINEAR, | 228 | SCALE_FILTER_LINEAR, |
229 | SCALE_FILTER_NEAREST, | 229 | SCALE_FILTER_NEAREST, |
230 | SCALE_FILTER_SMART | 230 | SCALE_FILTER_SMART, |
231 | }; | 231 | }; |
232 | 232 | ||
233 | /** | 233 | /** |
@@ -375,10 +375,10 @@ struct border_colors { | |||
375 | }; | 375 | }; |
376 | 376 | ||
377 | enum edge_border_types { | 377 | enum edge_border_types { |
378 | E_NONE, /**< Don't hide edge borders */ | 378 | E_NONE, /**< Don't hide edge borders */ |
379 | E_VERTICAL, /**< hide vertical edge borders */ | 379 | E_VERTICAL, /**< hide vertical edge borders */ |
380 | E_HORIZONTAL, /**< hide horizontal edge borders */ | 380 | E_HORIZONTAL, /**< hide horizontal edge borders */ |
381 | E_BOTH, /**< hide vertical and horizontal edge borders */ | 381 | E_BOTH, /**< hide vertical and horizontal edge borders */ |
382 | }; | 382 | }; |
383 | 383 | ||
384 | enum edge_border_smart_types { | 384 | enum edge_border_smart_types { |
@@ -394,10 +394,10 @@ enum sway_popup_during_fullscreen { | |||
394 | }; | 394 | }; |
395 | 395 | ||
396 | enum command_context { | 396 | enum command_context { |
397 | CONTEXT_CONFIG = 1, | 397 | CONTEXT_CONFIG = 1 << 0, |
398 | CONTEXT_BINDING = 2, | 398 | CONTEXT_BINDING = 1 << 1, |
399 | CONTEXT_IPC = 4, | 399 | CONTEXT_IPC = 1 << 2, |
400 | CONTEXT_CRITERIA = 8, | 400 | CONTEXT_CRITERIA = 1 << 3, |
401 | CONTEXT_ALL = 0xFFFFFFFF, | 401 | CONTEXT_ALL = 0xFFFFFFFF, |
402 | }; | 402 | }; |
403 | 403 | ||
@@ -407,13 +407,13 @@ struct command_policy { | |||
407 | }; | 407 | }; |
408 | 408 | ||
409 | enum secure_feature { | 409 | enum secure_feature { |
410 | FEATURE_LOCK = 1, | 410 | FEATURE_LOCK = 1 << 0, |
411 | FEATURE_PANEL = 2, | 411 | FEATURE_PANEL = 1 << 1, |
412 | FEATURE_BACKGROUND = 4, | 412 | FEATURE_BACKGROUND = 1 << 2, |
413 | FEATURE_SCREENSHOT = 8, | 413 | FEATURE_SCREENSHOT = 1 << 3, |
414 | FEATURE_FULLSCREEN = 16, | 414 | FEATURE_FULLSCREEN = 1 << 4, |
415 | FEATURE_KEYBOARD = 32, | 415 | FEATURE_KEYBOARD = 1 << 5, |
416 | FEATURE_MOUSE = 64, | 416 | FEATURE_MOUSE = 1 << 6, |
417 | }; | 417 | }; |
418 | 418 | ||
419 | struct feature_policy { | 419 | struct feature_policy { |
@@ -422,25 +422,31 @@ struct feature_policy { | |||
422 | }; | 422 | }; |
423 | 423 | ||
424 | enum ipc_feature { | 424 | enum ipc_feature { |
425 | IPC_FEATURE_COMMAND = 1, | 425 | IPC_FEATURE_COMMAND = 1 << 0, |
426 | IPC_FEATURE_GET_WORKSPACES = 2, | 426 | IPC_FEATURE_GET_WORKSPACES = 1 << 1, |
427 | IPC_FEATURE_GET_OUTPUTS = 4, | 427 | IPC_FEATURE_GET_OUTPUTS = 1 << 2, |
428 | IPC_FEATURE_GET_TREE = 8, | 428 | IPC_FEATURE_GET_TREE = 1 << 3, |
429 | IPC_FEATURE_GET_MARKS = 16, | 429 | IPC_FEATURE_GET_MARKS = 1 << 4, |
430 | IPC_FEATURE_GET_BAR_CONFIG = 32, | 430 | IPC_FEATURE_GET_BAR_CONFIG = 1 << 5, |
431 | IPC_FEATURE_GET_VERSION = 64, | 431 | IPC_FEATURE_GET_VERSION = 1 << 6, |
432 | IPC_FEATURE_GET_INPUTS = 128, | 432 | IPC_FEATURE_GET_INPUTS = 1 << 7, |
433 | IPC_FEATURE_EVENT_WORKSPACE = 256, | 433 | IPC_FEATURE_EVENT_WORKSPACE = 1 << 8, |
434 | IPC_FEATURE_EVENT_OUTPUT = 512, | 434 | IPC_FEATURE_EVENT_OUTPUT = 1 << 9, |
435 | IPC_FEATURE_EVENT_MODE = 1024, | 435 | IPC_FEATURE_EVENT_MODE = 1 << 10, |
436 | IPC_FEATURE_EVENT_WINDOW = 2048, | 436 | IPC_FEATURE_EVENT_WINDOW = 1 << 11, |
437 | IPC_FEATURE_EVENT_BINDING = 4096, | 437 | IPC_FEATURE_EVENT_BINDING = 1 << 12, |
438 | IPC_FEATURE_EVENT_INPUT = 8192, | 438 | IPC_FEATURE_EVENT_INPUT = 1 << 13, |
439 | IPC_FEATURE_GET_SEATS = 16384, | 439 | IPC_FEATURE_GET_SEATS = 1 << 14, |
440 | 440 | ||
441 | IPC_FEATURE_ALL_COMMANDS = | 441 | IPC_FEATURE_ALL_COMMANDS = IPC_FEATURE_COMMAND | |
442 | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 16384, | 442 | IPC_FEATURE_GET_WORKSPACES | IPC_FEATURE_GET_OUTPUTS | |
443 | IPC_FEATURE_ALL_EVENTS = 256 | 512 | 1024 | 2048 | 4096 | 8192, | 443 | IPC_FEATURE_GET_TREE | IPC_FEATURE_GET_MARKS | |
444 | IPC_FEATURE_GET_BAR_CONFIG | IPC_FEATURE_GET_VERSION | | ||
445 | IPC_FEATURE_GET_INPUTS | IPC_FEATURE_GET_SEATS, | ||
446 | IPC_FEATURE_ALL_EVENTS = IPC_FEATURE_EVENT_WORKSPACE | | ||
447 | IPC_FEATURE_EVENT_OUTPUT | IPC_FEATURE_EVENT_MODE | | ||
448 | IPC_FEATURE_EVENT_WINDOW | IPC_FEATURE_EVENT_BINDING | | ||
449 | IPC_FEATURE_EVENT_INPUT, | ||
444 | 450 | ||
445 | IPC_FEATURE_ALL = IPC_FEATURE_ALL_COMMANDS | IPC_FEATURE_ALL_EVENTS, | 451 | IPC_FEATURE_ALL = IPC_FEATURE_ALL_COMMANDS | IPC_FEATURE_ALL_EVENTS, |
446 | }; | 452 | }; |
@@ -453,32 +459,32 @@ struct ipc_policy { | |||
453 | enum focus_follows_mouse_mode { | 459 | enum focus_follows_mouse_mode { |
454 | FOLLOWS_NO, | 460 | FOLLOWS_NO, |
455 | FOLLOWS_YES, | 461 | FOLLOWS_YES, |
456 | FOLLOWS_ALWAYS | 462 | FOLLOWS_ALWAYS, |
457 | }; | 463 | }; |
458 | 464 | ||
459 | enum focus_wrapping_mode { | 465 | enum focus_wrapping_mode { |
460 | WRAP_NO, | 466 | WRAP_NO, |
461 | WRAP_YES, | 467 | WRAP_YES, |
462 | WRAP_FORCE, | 468 | WRAP_FORCE, |
463 | WRAP_WORKSPACE | 469 | WRAP_WORKSPACE, |
464 | }; | 470 | }; |
465 | 471 | ||
466 | enum mouse_warping_mode { | 472 | enum mouse_warping_mode { |
467 | WARP_NO, | 473 | WARP_NO, |
468 | WARP_OUTPUT, | 474 | WARP_OUTPUT, |
469 | WARP_CONTAINER | 475 | WARP_CONTAINER, |
470 | }; | 476 | }; |
471 | 477 | ||
472 | enum alignment { | 478 | enum alignment { |
473 | ALIGN_LEFT, | 479 | ALIGN_LEFT, |
474 | ALIGN_CENTER, | 480 | ALIGN_CENTER, |
475 | ALIGN_RIGHT | 481 | ALIGN_RIGHT, |
476 | }; | 482 | }; |
477 | 483 | ||
478 | enum xwayland_mode { | 484 | enum xwayland_mode { |
479 | XWAYLAND_MODE_DISABLED, | 485 | XWAYLAND_MODE_DISABLED, |
480 | XWAYLAND_MODE_LAZY, | 486 | XWAYLAND_MODE_LAZY, |
481 | XWAYLAND_MODE_IMMEDIATE | 487 | XWAYLAND_MODE_IMMEDIATE, |
482 | }; | 488 | }; |
483 | 489 | ||
484 | /** | 490 | /** |