]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Add ssd.h
authorJohan Malm <jgm323@gmail.com>
Sun, 21 Mar 2021 20:54:55 +0000 (20:54 +0000)
committerJohan Malm <jgm323@gmail.com>
Sun, 21 Mar 2021 20:54:55 +0000 (20:54 +0000)
include/labwc.h
include/ssd.h [new file with mode: 0644]
src/cursor.c
src/desktop.c
src/output.c
src/ssd.c
src/view.c
src/xdg.c
src/xwayland.c

index 82106602e62227348ffe23546449142c15c8df51..eb6e0c4e6391ec96c74b0d6eed9bfaf46657d5ea 100644 (file)
@@ -145,19 +145,6 @@ enum view_type {
 #endif
 };
 
-enum ssd_part {
-       LAB_SSD_NONE = 0,
-       LAB_SSD_BUTTON_CLOSE,
-       LAB_SSD_BUTTON_MAXIMIZE,
-       LAB_SSD_BUTTON_ICONIFY,
-       LAB_SSD_PART_TITLE,
-       LAB_SSD_PART_TOP,
-       LAB_SSD_PART_RIGHT,
-       LAB_SSD_PART_BOTTOM,
-       LAB_SSD_PART_LEFT,
-       LAB_SSD_END_MARKER
-};
-
 struct view_impl {
        void (*configure)(struct view *view, struct wlr_box geo);
        void (*close)(struct view *view);
@@ -345,11 +332,6 @@ void server_init(struct server *server);
 void server_start(struct server *server);
 void server_finish(struct server *server);
 
-struct border ssd_thickness(struct view *view);
-struct wlr_box ssd_max_extents(struct view *view);
-struct wlr_box ssd_box(struct view *view, enum ssd_part ssd_part);
-enum ssd_part ssd_at(struct view *view, double lx, double ly);
-
 void action(struct server *server, const char *action, const char *command);
 
 void dbg_show_one_view(struct view *view);
diff --git a/include/ssd.h b/include/ssd.h
new file mode 100644 (file)
index 0000000..76544cf
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef __LABWC_SSD_H
+#define __LABWC_SSD_H
+
+enum ssd_part {
+       LAB_SSD_NONE = 0,
+       LAB_SSD_BUTTON_CLOSE,
+       LAB_SSD_BUTTON_MAXIMIZE,
+       LAB_SSD_BUTTON_ICONIFY,
+       LAB_SSD_PART_TITLE,
+       LAB_SSD_PART_TOP,
+       LAB_SSD_PART_RIGHT,
+       LAB_SSD_PART_BOTTOM,
+       LAB_SSD_PART_LEFT,
+       LAB_SSD_END_MARKER
+};
+
+struct view;
+
+struct border ssd_thickness(struct view *view);
+struct wlr_box ssd_max_extents(struct view *view);
+struct wlr_box ssd_box(struct view *view, enum ssd_part ssd_part);
+enum ssd_part ssd_at(struct view *view, double lx, double ly);
+
+#endif /* __LABWC_SSD_H */
index 217b5215c6d5345c25daa591bdce9f51cf741960..80928e79651c3a1c20a356f4d99cb8268566e006 100644 (file)
@@ -1,6 +1,7 @@
 #include <assert.h>
 #include "labwc.h"
 #include "menu/menu.h"
+#include "ssd.h"
 
 #define RESIZE_BORDER_WIDTH 2
 
index 58a6254371f1e191b57d2667cac7926466a8ba71..bb1a8c89087119724e7bfb81806ed3504c307391 100644 (file)
@@ -1,6 +1,7 @@
 #include "config.h"
 #include <assert.h>
 #include "labwc.h"
+#include "ssd.h"
 
 static void
 move_to_front(struct view *view)
index 4fcd7d96d6de605c582b06be1273fda682904983..b9377fb9cf65ae5c6cd9a07b8ee0d94268bf36f0 100644 (file)
@@ -13,6 +13,7 @@
 #include "labwc.h"
 #include "layers.h"
 #include "menu/menu.h"
+#include "ssd.h"
 #include "theme.h"
 
 //#define DEBUG 1
index 35bbfb058178da464b73c19354b46f988ae24755..0d89cebe50a4282025640a3ef0d710bdf10b13b0 100644 (file)
--- a/src/ssd.c
+++ b/src/ssd.c
@@ -1,12 +1,13 @@
 /*
- * Helpers for handling window decorations
+ * Helpers for view server side decorations
  *
- * Copyright Johan Malm 2020
+ * Copyright (C) 2020 Johan Malm
  */
 
 #include <assert.h>
 #include "config/rcxml.h"
 #include "labwc.h"
+#include "ssd.h"
 
 #define BORDER_WIDTH (2)
 
@@ -107,3 +108,5 @@ ssd_at(struct view *view, double lx, double ly)
        }
        return LAB_SSD_NONE;
 }
+
+
index 68946301af3cd0a7e17d461204ef42544fb2915b..810dd65cbcf5d0ca70cd65178d4d747308c73fa5 100644 (file)
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include "labwc.h"
+#include "ssd.h"
 
 void
 view_move_resize(struct view *view, struct wlr_box geo)
index d80c269d2e252618c6a8c626e8714cc551681211..2ac771cd5dfe8b33232003bd907dab00c39a8a70 100644 (file)
--- a/src/xdg.c
+++ b/src/xdg.c
@@ -1,5 +1,6 @@
 #include <assert.h>
 #include "labwc.h"
+#include "ssd.h"
 
 /*
  * xdg_popup_create() and subsurface_create() are only called for the
index c8187f5a0adcea13cd4ef3974beea576e7c5c8db..1a8b4061a9695a7c68ec2ac330f5311ccb4097d6 100644 (file)
@@ -1,5 +1,6 @@
 #include <assert.h>
 #include "labwc.h"
+#include "ssd.h"
 
 static void
 handle_commit(struct wl_listener *listener, void *data)