mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
include: add config/types.h
This commit is contained in:
parent
6dea8c0dcc
commit
9d49d19cd2
54 changed files with 414 additions and 368 deletions
|
|
@ -24,13 +24,14 @@
|
|||
#include "common/parse-bool.h"
|
||||
#include "common/parse-double.h"
|
||||
#include "common/string-helpers.h"
|
||||
#include "common/three-state.h"
|
||||
#include "common/xml.h"
|
||||
#include "config/default-bindings.h"
|
||||
#include "config/keybind.h"
|
||||
#include "config/libinput.h"
|
||||
#include "config/mousebind.h"
|
||||
#include "config/tablet.h"
|
||||
#include "config/tablet-tool.h"
|
||||
#include "config/touch.h"
|
||||
#include "labwc.h"
|
||||
#include "osd.h"
|
||||
#include "regions.h"
|
||||
|
|
@ -62,33 +63,33 @@ parse_window_type(const char *type)
|
|||
return -1;
|
||||
}
|
||||
if (!strcasecmp(type, "desktop")) {
|
||||
return NET_WM_WINDOW_TYPE_DESKTOP;
|
||||
return LAB_WINDOW_TYPE_DESKTOP;
|
||||
} else if (!strcasecmp(type, "dock")) {
|
||||
return NET_WM_WINDOW_TYPE_DOCK;
|
||||
return LAB_WINDOW_TYPE_DOCK;
|
||||
} else if (!strcasecmp(type, "toolbar")) {
|
||||
return NET_WM_WINDOW_TYPE_TOOLBAR;
|
||||
return LAB_WINDOW_TYPE_TOOLBAR;
|
||||
} else if (!strcasecmp(type, "menu")) {
|
||||
return NET_WM_WINDOW_TYPE_MENU;
|
||||
return LAB_WINDOW_TYPE_MENU;
|
||||
} else if (!strcasecmp(type, "utility")) {
|
||||
return NET_WM_WINDOW_TYPE_UTILITY;
|
||||
return LAB_WINDOW_TYPE_UTILITY;
|
||||
} else if (!strcasecmp(type, "splash")) {
|
||||
return NET_WM_WINDOW_TYPE_SPLASH;
|
||||
return LAB_WINDOW_TYPE_SPLASH;
|
||||
} else if (!strcasecmp(type, "dialog")) {
|
||||
return NET_WM_WINDOW_TYPE_DIALOG;
|
||||
return LAB_WINDOW_TYPE_DIALOG;
|
||||
} else if (!strcasecmp(type, "dropdown_menu")) {
|
||||
return NET_WM_WINDOW_TYPE_DROPDOWN_MENU;
|
||||
return LAB_WINDOW_TYPE_DROPDOWN_MENU;
|
||||
} else if (!strcasecmp(type, "popup_menu")) {
|
||||
return NET_WM_WINDOW_TYPE_POPUP_MENU;
|
||||
return LAB_WINDOW_TYPE_POPUP_MENU;
|
||||
} else if (!strcasecmp(type, "tooltip")) {
|
||||
return NET_WM_WINDOW_TYPE_TOOLTIP;
|
||||
return LAB_WINDOW_TYPE_TOOLTIP;
|
||||
} else if (!strcasecmp(type, "notification")) {
|
||||
return NET_WM_WINDOW_TYPE_NOTIFICATION;
|
||||
return LAB_WINDOW_TYPE_NOTIFICATION;
|
||||
} else if (!strcasecmp(type, "combo")) {
|
||||
return NET_WM_WINDOW_TYPE_COMBO;
|
||||
return LAB_WINDOW_TYPE_COMBO;
|
||||
} else if (!strcasecmp(type, "dnd")) {
|
||||
return NET_WM_WINDOW_TYPE_DND;
|
||||
return LAB_WINDOW_TYPE_DND;
|
||||
} else if (!strcasecmp(type, "normal")) {
|
||||
return NET_WM_WINDOW_TYPE_NORMAL;
|
||||
return LAB_WINDOW_TYPE_NORMAL;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -433,15 +434,15 @@ fill_action_query(struct action *action, xmlNode *node, struct view_query *query
|
|||
} else if (!strcasecmp(key, "sandboxAppId")) {
|
||||
xstrdup_replace(query->sandbox_app_id, content);
|
||||
} else if (!strcasecmp(key, "shaded")) {
|
||||
query->shaded = parse_three_state(content);
|
||||
query->shaded = parse_tristate(content);
|
||||
} else if (!strcasecmp(key, "maximized")) {
|
||||
query->maximized = view_axis_parse(content);
|
||||
} else if (!strcasecmp(key, "iconified")) {
|
||||
query->iconified = parse_three_state(content);
|
||||
query->iconified = parse_tristate(content);
|
||||
} else if (!strcasecmp(key, "focused")) {
|
||||
query->focused = parse_three_state(content);
|
||||
query->focused = parse_tristate(content);
|
||||
} else if (!strcasecmp(key, "omnipresent")) {
|
||||
query->omnipresent = parse_three_state(content);
|
||||
query->omnipresent = parse_tristate(content);
|
||||
} else if (!strcasecmp(key, "tiled")) {
|
||||
query->tiled = view_edge_parse(content,
|
||||
/*tiled*/ true, /*any*/ true);
|
||||
|
|
@ -1108,7 +1109,7 @@ entry(xmlNode *node, char *nodename, char *content)
|
|||
} else if (!strcasecmp(nodename, "primarySelection.core")) {
|
||||
set_bool(content, &rc.primary_selection);
|
||||
} else if (!strcmp(nodename, "policy.placement")) {
|
||||
enum view_placement_policy policy = view_placement_parse(content);
|
||||
enum lab_placement_policy policy = view_placement_parse(content);
|
||||
if (policy != LAB_PLACE_INVALID) {
|
||||
rc.placement_policy = policy;
|
||||
}
|
||||
|
|
@ -1401,7 +1402,7 @@ rcxml_init(void)
|
|||
rc.tablet.rotation = 0;
|
||||
rc.tablet.box = (struct wlr_fbox){0};
|
||||
tablet_load_default_button_mappings();
|
||||
rc.tablet_tool.motion = LAB_TABLET_MOTION_ABSOLUTE;
|
||||
rc.tablet_tool.motion = LAB_MOTION_ABSOLUTE;
|
||||
rc.tablet_tool.relative_motion_sensitivity = 1.0;
|
||||
|
||||
rc.repeat_rate = 25;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue