src/action.c: Convert action->arg to a list of action_arg

In preperation for Actions that require multiple arguments
This commit is contained in:
Consolatis 2022-06-10 19:42:34 +02:00 committed by Johan Malm
parent baaee26937
commit 9b49f19a73
8 changed files with 142 additions and 61 deletions

24
include/private/action.h Normal file
View file

@ -0,0 +1,24 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __LABWC_PRIVATE_ACTION_H
#define __LABWC_PRIVATE_ACTION_H
/* Don't include ourself as search path starts at current directory */
#include "../action.h"
enum action_arg_type {
LAB_ACTION_ARG_STR = 0,
};
struct action_arg {
struct wl_list link; /* struct action.args */
const char *key; /* May be NULL if there is just one arg */
enum action_arg_type type;
};
struct action_arg_str {
struct action_arg base;
char *value;
};
#endif /* __LABWC_PRIVATE_ACTION_H */