kbgwm

sucklessy floating window manager
git clone https://git.neuralcrash.com/kbgwm.git
Log | Files | Refs | README | LICENSE

types.h (1261B)


      1 /*
      2  * kbgwm, a sucklessy floating window manager
      3  * Copyright (c) 2020-2021, Kebigon <git@kebigon.xyz>
      4  *
      5  * Permission to use, copy, modify, and/or distribute this software for any
      6  * purpose with or without fee is hereby granted, provided that the above
      7  * copyright notice and this permission notice appear in all copies.
      8  *
      9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
     10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     16  */
     17 
     18 #pragma once
     19 
     20 #include <stdbool.h>
     21 #include <stdint.h>
     22 #include <xcb/xproto.h>
     23 
     24 union Arg {
     25     const bool b;
     26     const uint_least8_t i;
     27     const char **cmd;
     28 };
     29 
     30 struct Key
     31 {
     32     uint16_t modifiers;
     33     xcb_keysym_t keysym;
     34     void (*func)(const union Arg *);
     35     const union Arg arg;
     36 };
     37 
     38 struct Button
     39 {
     40     uint16_t modifiers;
     41     xcb_button_t keysym;
     42     void (*func)(const union Arg *);
     43     const union Arg arg;
     44 };