wio

a wayland wm stylised after plan9 rio - forked from git.sr.ht/~srcmpwn/wio
git clone git://src.gearsix.net/wio
Log | Files | Refs | Atom | Submodules | README | LICENSE

view.h (811B)


      1 #ifndef _WIO_VIEW_H
      2 #define _WIO_VIEW_H
      3 #include <wlr/types/wlr_xdg_shell.h>
      4 #include <wayland-server.h>
      5 
      6 struct wio_server;
      7 
      8 struct wio_view {
      9 	int x, y;
     10 	struct wlr_xdg_surface *xdg_surface;
     11 	struct wio_server *server;
     12 	struct wl_list link;
     13 	struct wl_listener map;
     14 	struct wl_listener destroy;
     15 };
     16 
     17 enum wio_view_area {
     18 	VIEW_AREA_SURFACE = 0,
     19 	VIEW_AREA_BORDER_TOP,
     20 	VIEW_AREA_BORDER_RIGHT,
     21 	VIEW_AREA_BORDER_BOTTOM,
     22 	VIEW_AREA_BORDER_LEFT,
     23 };
     24 
     25 void server_new_xdg_surface(struct wl_listener *listener, void *data);
     26 
     27 void wio_view_focus(struct wio_view *view, struct wlr_surface *surface);
     28 struct wio_view *wio_view_at(struct wio_server *server, double lx, double ly,
     29 		struct wlr_surface **surface, double *sx, double *sy,
     30 		int *view_area);
     31 void wio_view_move(struct wio_view *view, int x, int y);
     32 
     33 #endif