window.h (1353B)


      1 /*
      2  * Wig --- Widgets in Guile
      3  * Copyright © 2026 Luke Willis <lukejw@monastech.xyz>
      4  *
      5  * This file is part of Wig.
      6  *
      7  * Wig is free software: you can redistribute it and/or modify it under
      8  * the terms of the GNU General Public License as published by the Free
      9  * Software Foundation, either version 3 of the License, or (at your option)
     10  * any later version.
     11  *
     12  * Wig is distributed in the hope that it will be useful, but WITHOUT
     13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
     14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
     15  * more details.
     16  *
     17  * You should have received a copy of the GNU General Public License along
     18  * with Wig. If not, see <https://www.gnu.org/licenses/>.
     19  */
     20 
     21 #ifndef WIG_WINDOW
     22 #define WIG_WINDOW
     23 
     24 #include <stdint.h>
     25 
     26 #include <libguile.h>
     27 #include <wayland-client.h>
     28 
     29 #include "surface.h"
     30 
     31 enum {
     32 	WIDGET_GHOST = 1 << 0,
     33 };
     34 
     35 struct wig_widget {
     36 	uint32_t x;
     37 	uint32_t y;
     38 	uint32_t width;
     39 	uint32_t height;
     40 	uint32_t color;
     41 	uint32_t flags;
     42 };
     43 
     44 struct wig_window {
     45 	char *label;
     46 	struct wig_surface surface;
     47 	struct zwlr_layer_surface_v1 *zwlr_layer_surface_v1;
     48 	SCM widgets;
     49 };
     50 
     51 int wig_window_init(struct wig_window *window, char *label,
     52                     struct wig_surface surface,
     53                     struct zwlr_layer_shell_v1 *zwlr_layer_shell_v1);
     54 
     55 #endif