include: add config/types.h

This commit is contained in:
John Lindgren 2025-08-17 16:01:50 -04:00 committed by Hiroaki Yamamoto
parent 6dea8c0dcc
commit 9d49d19cd2
54 changed files with 414 additions and 368 deletions

View file

@ -15,6 +15,7 @@
#include "common/list.h"
#include "common/mem.h"
#include "common/string-helpers.h"
#include "config/rcxml.h"
#include "labwc.h"
struct dir {

View file

@ -5,19 +5,19 @@
#include "view.h"
bool
direction_from_view_edge(enum view_edge edge, enum wlr_direction *direction)
direction_from_edge(enum lab_edge edge, enum wlr_direction *direction)
{
switch (edge) {
case VIEW_EDGE_LEFT:
case LAB_EDGE_LEFT:
*direction = WLR_DIRECTION_LEFT;
return true;
case VIEW_EDGE_RIGHT:
case LAB_EDGE_RIGHT:
*direction = WLR_DIRECTION_RIGHT;
return true;
case VIEW_EDGE_UP:
case LAB_EDGE_UP:
*direction = WLR_DIRECTION_UP;
return true;
case VIEW_EDGE_DOWN:
case LAB_EDGE_DOWN:
*direction = WLR_DIRECTION_DOWN;
return true;
default:

View file

@ -3,8 +3,8 @@
#include <strings.h>
#include <wlr/util/log.h>
enum three_state
parse_three_state(const char *str)
enum lab_tristate
parse_tristate(const char *str)
{
if (!str) {
goto error_not_a_boolean;
@ -33,7 +33,7 @@ error_not_a_boolean:
int
parse_bool(const char *str, int default_value)
{
enum three_state val = parse_three_state(str);
enum lab_tristate val = parse_tristate(str);
if (val == LAB_STATE_UNSPECIFIED) {
return default_value;
}