aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/dway/dway.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/dway/dway.h')
-rw-r--r--sys/cmd/dway/dway.h276
1 files changed, 0 insertions, 276 deletions
diff --git a/sys/cmd/dway/dway.h b/sys/cmd/dway/dway.h
deleted file mode 100644
index ad2dfb3..0000000
--- a/sys/cmd/dway/dway.h
+++ /dev/null
@@ -1,276 +0,0 @@
-#pragma once
-
-#include <u.h>
-#include <libn.h>
-
-#include <wayland-server-core.h>
-
-#define WLR_USE_UNSTABLE
-#include <wlr/backend.h>
-#include <wlr/render/wlr_renderer.h>
-#include <wlr/types/wlr_compositor.h>
-#include <wlr/types/wlr_cursor.h>
-#include <wlr/types/wlr_data_control_v1.h>
-#include <wlr/types/wlr_data_device.h>
-#include <wlr/types/wlr_export_dmabuf_v1.h>
-#include <wlr/types/wlr_gamma_control_v1.h>
-#include <wlr/types/wlr_gtk_primary_selection.h>
-#include <wlr/types/wlr_idle.h>
-#include <wlr/types/wlr_input_device.h>
-#include <wlr/types/wlr_keyboard.h>
-#include <wlr/types/wlr_layer_shell_v1.h>
-#include <wlr/types/wlr_matrix.h>
-#include <wlr/types/wlr_output.h>
-#include <wlr/types/wlr_output_layout.h>
-#include <wlr/types/wlr_pointer.h>
-#include <wlr/types/wlr_primary_selection.h>
-#include <wlr/types/wlr_primary_selection_v1.h>
-#include <wlr/types/wlr_screencopy_v1.h>
-#include <wlr/types/wlr_seat.h>
-#include <wlr/types/wlr_server_decoration.h>
-#include <wlr/types/wlr_xcursor_manager.h>
-#include <wlr/types/wlr_xdg_decoration_v1.h>
-#include <wlr/types/wlr_xdg_shell.h>
-#include <wlr/types/wlr_xdg_output_v1.h>
-#include <wlr/util/log.h>
-
-#include "xdg-shell.h"
-#include "wlr-layer-shell.h"
-
-#include <signal.h>
-#include <wait.h>
-#include <xkbcommon/xkbcommon.h>
-#include <linux/input-event-codes.h>
-
-/* main types */
-
-typedef union Arg Arg;
-typedef struct Button Button;
-typedef struct Mouse Mouse;
-typedef struct Key Key;
-typedef struct Keyboard Keyboard;
-typedef struct Monitor Monitor;
-typedef struct Layout Layout;
-typedef struct Client Client;
-typedef struct Deco Deco;
-typedef struct Layer Layer;
-typedef struct Payload Payload;
-
-typedef struct Rule Rule;
-typedef struct MonitorRule MonitorRule;
-
-union Arg
-{
- int i;
- uint ui;
- float f;
- const void *v;
-};
-
-struct Button
-{
- uint mod;
- uint kind;
- void (*func)(const Arg *);
- Arg arg;
-};
-
-enum
-{
- MouseNormal=0, MouseMove, MouseResize,
-};
-
-struct Mouse
-{
- uint mode;
- struct wlr_xcursor_manager *manager;
- struct wlr_cursor *cursor;
- struct {
- struct wl_listener axis;
- struct wl_listener frame;
- struct wl_listener button;
- struct wl_listener motion;
- struct wl_listener absmotion;
- } ev;
-};
-
-struct Key
-{
- uint32 mod;
- xkb_keysym_t sym;
- void (*func)(const Arg *);
- Arg arg;
-};
-
-struct Keyboard
-{
- struct wl_list link;
- struct wlr_input_device *dev;
- struct {
- struct wl_listener modifier;
- struct wl_listener keypress;
- } ev;
-};
-
-struct Layer
-{
- struct wl_list link;
- struct wlr_layer_surface_v1 *surf;
-
- struct {
- struct wl_listener map;
- struct wl_listener unmap;
- struct wl_listener free;
- struct wl_listener commit;
- struct wl_listener kill;
- /* struct wl_listener popup; */
- } ev;
-
- struct wlr_box dim;
- enum zwlr_layer_shell_v1_layer z;
-};
-
-struct Monitor
-{
- struct wl_list link;
- struct wlr_output *dev;
- struct {
- struct wl_listener draw;
- struct wl_listener free;
- } ev;
- struct {
- struct wl_signal kill;
- } sig;
- struct {
- struct wlr_box all;
- struct wlr_box win;
- } area;
-
- Layer layers[4];
- const Layout *lt[2];
- uint seltags;
- uint sellt;
- uint tagset[2];
- double mfact;
- int nmaster;
-};
-
-struct Layout
-{
- char *sym;
- void (*arrange)(Monitor *);
-};
-
-struct MonitorRule {
- char *name;
- float mfact;
- int nmaster;
- float scale;
- const Layout *lt;
- enum wl_output_transform rr;
-};
-
-struct Rule {
- char *id;
- char *title;
- uint tags;
- int floating;
- int monitor;
-};
-
-struct Client
-{
- struct wlr_xdg_surface *surf;
- struct wlr_box dim;
- struct {
- struct wl_list tiles;
- struct wl_list stack;
- struct wl_list focus;
- } link;
- struct {
- struct wl_listener map;
- struct wl_listener unmap;
- struct wl_listener free;
- } ev;
- int bw;
- uint tags;
- int floating;
- Monitor *m;
-};
-
-struct Deco
-{
- struct wl_list link;
- struct wlr_server_decoration *wlr;
-
- struct {
- struct wl_listener free;
- struct wl_listener mode;
- } ev;
-};
-
-struct Payload
-{
- struct wlr_output *dev;
- struct timespec *now;
- int x, y;
-};
-
-/* hooks provided to config */
-static void chvt(const Arg *arg);
-static void incmaster(const Arg *arg);
-static void focusmonitor(const Arg *arg);
-static void focusstack(const Arg *arg);
-static void moveresize(const Arg *arg);
-static void quit(const Arg *arg);
-static void setlayout(const Arg *arg);
-static void setmfact(const Arg *arg);
-static void spawn(const Arg *arg);
-static void tag(const Arg *arg);
-static void tagmonitor(const Arg *arg);
-static void togglefloating(const Arg *arg);
-static void toggletag(const Arg *arg);
-static void toggleview(const Arg *arg);
-static void view(const Arg *arg);
-
-/* layouts */
-static void tile(Monitor *m);
-
-#include "config.h"
-
-/* callback functions */
-static void ev·newmonitor(struct wl_listener *ev, void *arg);
-static void ev·freemonitor(struct wl_listener *ev, void *arg);
-
-static void ev·newidev(struct wl_listener *ev, void *arg);
-static void ev·freeidev(struct wl_listener *ev, void *arg);
-
-static void ev·render(struct wl_listener *ev, void *arg);
-static void ev·newclient(struct wl_listener *ev, void *arg);
-static void ev·mapclient(struct wl_listener *ev, void *arg);
-static void ev·unmapclient(struct wl_listener *ev, void *arg);
-static void ev·freeclient(struct wl_listener *ev, void *arg);
-
-static void ev·newdecoration(struct wl_listener *ev, void *arg);
-static void ev·freedecoration(struct wl_listener *ev, void *arg);
-static void ev·modedecoration(struct wl_listener *ev, void *arg);
-
-static void ev·newlayershell(struct wl_listener *ev, void *arg);
-static void ev·freelayershell(struct wl_listener *ev, void *arg);
-static void ev·maplayershell(struct wl_listener *ev, void *arg);
-static void ev·unmaplayershell(struct wl_listener *ev, void *arg);
-static void ev·commitlayershell(struct wl_listener *ev, void *arg);
-static void ev·killlayershell(struct wl_listener *ev, void *arg);
-
-static void ev·setcursor(struct wl_listener *ev, void *arg);
-static void ev·setsel(struct wl_listener *ev, void *arg);
-static void ev·setpsel(struct wl_listener *ev, void *arg);
-
-static void ev·mousescroll(struct wl_listener *ev, void *arg);
-static void ev·mouseframe(struct wl_listener *ev, void *arg);
-static void ev·mousebutton(struct wl_listener *ev, void *arg);
-static void ev·mouserelmove(struct wl_listener *ev, void *arg);
-static void ev·mouseabsmove(struct wl_listener *ev, void *arg);
-
-static void ev·keypress(struct wl_listener *ev, void *arg);
-static void ev·modifier(struct wl_listener *ev, void *arg);