kbgwm

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

client.h (1873B)


      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 "types.h"
     21 #include <stdbool.h>
     22 
     23 struct client
     24 {
     25     xcb_window_t id;
     26     int16_t x, y;
     27     uint16_t width, height;
     28     int32_t min_width, min_height;
     29     int32_t max_width, max_height;
     30     bool maximized;
     31     struct monitor *monitor;
     32 };
     33 
     34 void setup_clients();
     35 
     36 void client_grab_buttons(struct client *, bool);
     37 void client_kill(const union Arg *);
     38 void client_create(xcb_window_t);
     39 void client_toggle_maximize(const union Arg *);
     40 struct client *client_remove();
     41 void client_add_workspace(struct client *, uint_fast8_t);
     42 struct client *client_remove_workspace(uint_fast8_t);
     43 struct client *client_find(xcb_window_t);
     44 void client_maximize(struct client *);
     45 void client_unmaximize(struct client *);
     46 void client_sanitize_position(struct client *);
     47 void client_sanitize_dimensions(struct client *);
     48 void client_remove_all_workspaces(xcb_window_t);
     49 struct client *client_find_all_workspaces(xcb_window_t);
     50 struct client *client_find_workspace(xcb_window_t, uint_fast8_t);
     51 void client_update_monitor(struct client *);