#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);
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);
--- /dev/null
+#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 */
#include <assert.h>
#include "labwc.h"
#include "menu/menu.h"
+#include "ssd.h"
#define RESIZE_BORDER_WIDTH 2
#include "config.h"
#include <assert.h>
#include "labwc.h"
+#include "ssd.h"
static void
move_to_front(struct view *view)
#include "labwc.h"
#include "layers.h"
#include "menu/menu.h"
+#include "ssd.h"
#include "theme.h"
//#define DEBUG 1
/*
- * 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)
}
return LAB_SSD_NONE;
}
+
+
#include <stdio.h>
#include "labwc.h"
+#include "ssd.h"
void
view_move_resize(struct view *view, struct wlr_box geo)
#include <assert.h>
#include "labwc.h"
+#include "ssd.h"
/*
* xdg_popup_create() and subsurface_create() are only called for the
#include <assert.h>
#include "labwc.h"
+#include "ssd.h"
static void
handle_commit(struct wl_listener *listener, void *data)