build: replace genshader by binary linker
[platform/upstream/kmscon.git] / src / kmscon_conf.h
index 1788a99..d253f4a 100644 (file)
 #include "conf.h"
 #include "shl_dlist.h"
 
+enum kmscon_conf_gpu_selection {
+       KMSCON_GPU_ALL,
+       KMSCON_GPU_AUX,
+       KMSCON_GPU_PRIMARY,
+};
+
 struct kmscon_conf_t {
+       /* header information */
+       bool seat_config;
+
        /* General Options */
        /* show help/usage information */
        bool help;
@@ -49,20 +58,26 @@ struct kmscon_conf_t {
        bool debug;
        /* disable notices and warnings */
        bool silent;
+       /* config directory name */
+       char *configdir;
+       /* listen mode */
+       bool listen;
 
        /* Seat Options */
-       /* VT number to run on on seat0 */
+       /* VT number to run on */
        char *vt;
        /* enter new VT directly */
        bool switchvt;
        /* seats */
        char **seats;
-       /* cdev */
-       bool cdev;
 
        /* Session Options */
        /* sessions */
        unsigned int session_max;
+       /* allow keyboard session control */
+       bool session_control;
+       /* run terminal session */
+       bool terminal_session;
 
        /* Terminal Options */
        /* custom login process */
@@ -71,6 +86,8 @@ struct kmscon_conf_t {
        char **argv;
        /* TERM value */
        char *term;
+       /* reset environment */
+       bool reset_env;
        /* color palette */
        char *palette;
        /* terminal scroll-back buffer size */
@@ -85,6 +102,8 @@ struct kmscon_conf_t {
        char *xkb_variant;
        /* input KBD options */
        char *xkb_options;
+       /* input predefined KBD keymap */
+       char *xkb_keymap;
        /* keyboard key-repeat delay */
        unsigned int xkb_repeat_delay;
        /* keyboard key-repeat rate */
@@ -99,6 +118,10 @@ struct kmscon_conf_t {
        struct conf_grab *grab_page_up;
        /* page-down grab */
        struct conf_grab *grab_page_down;
+       /* zoom-in grab */
+       struct conf_grab *grab_zoom_in;
+       /* zoom-out grab */
+       struct conf_grab *grab_zoom_out;
        /* session-next grab */
        struct conf_grab *grab_session_next;
        /* session-prev grab */
@@ -111,20 +134,14 @@ struct kmscon_conf_t {
        struct conf_grab *grab_terminal_new;
 
        /* Video Options */
-       /* whitelist of usable video devices or "all" */
-       char **video_devices;
        /* use DRM if available */
        bool drm;
        /* use 3D hardware-acceleration if available */
        bool hwaccel;
-       /* use only primary GPU */
-       bool primary_gpu_only;
-       /* use all GPUs unconditionally */
-       bool all_gpus;
+       /* gpu selection mode */
+       unsigned int gpus;
        /* render engine */
        char *render_engine;
-       /* print rendering engine timing information */
-       bool render_timing;
 
        /* Font Options */
        /* font engine */
@@ -143,4 +160,20 @@ int kmscon_conf_load_main(struct conf_ctx *ctx, int argc, char **argv);
 int kmscon_conf_load_seat(struct conf_ctx *ctx, const struct conf_ctx *main,
                          const char *seat);
 
+static inline bool kmscon_conf_is_current_seat(struct kmscon_conf_t *conf)
+{
+       return conf && shl_string_list_is(conf->seats, "current");
+}
+
+static inline bool kmscon_conf_is_all_seats(struct kmscon_conf_t *conf)
+{
+       return conf && shl_string_list_is(conf->seats, "all");
+}
+
+static inline bool kmscon_conf_is_single_seat(struct kmscon_conf_t *conf)
+{
+       return conf && !kmscon_conf_is_all_seats(conf) &&
+              shl_string_list_count(conf->seats, true) == 1;
+}
+
 #endif /* KMSCON_MAIN_H */