aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/stringop.h5
-rw-r--r--include/sway/tree/container.h17
-rw-r--r--include/swaylock/swaylock.h15
3 files changed, 29 insertions, 8 deletions
diff --git a/include/stringop.h b/include/stringop.h
index 7c29a745..e7f58011 100644
--- a/include/stringop.h
+++ b/include/stringop.h
@@ -1,5 +1,6 @@
#ifndef _SWAY_STRINGOP_H
#define _SWAY_STRINGOP_H
+#include <stdlib.h>
#include "list.h"
#if !HAVE_DECL_SETENV
@@ -14,6 +15,10 @@ char *strip_whitespace(char *str);
char *strip_comments(char *str);
void strip_quotes(char *str);
+// strcat that does nothing if dest or src is NULL
+char *lenient_strcat(char *dest, const char *src);
+char *lenient_strncat(char *dest, const char *src, size_t len);
+
// strcmp that also handles null pointers.
int lenient_strcmp(char *a, char *b);
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 598a4f3d..a5f591ce 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -11,6 +11,12 @@ extern struct sway_container root_container;
struct sway_view;
struct sway_seat;
+#define TITLEBAR_BORDER_THICKNESS 1
+
+// Padding includes titlebar border
+#define TITLEBAR_H_PADDING 3
+#define TITLEBAR_V_PADDING 4
+
/**
* Different kinds of containers.
*
@@ -210,6 +216,15 @@ void container_update_title_textures(struct sway_container *container);
*/
void container_calculate_title_height(struct sway_container *container);
-void container_notify_child_title_changed(struct sway_container *container);
+/**
+ * Notify a container that a tree modification has changed in its children,
+ * so the container can update its tree representation.
+ */
+void container_notify_subtree_changed(struct sway_container *container);
+
+/**
+ * Return the height of a regular title bar.
+ */
+size_t container_titlebar_height(void);
#endif
diff --git a/include/swaylock/swaylock.h b/include/swaylock/swaylock.h
index e161ada9..dae823b8 100644
--- a/include/swaylock/swaylock.h
+++ b/include/swaylock/swaylock.h
@@ -10,13 +10,13 @@
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
enum auth_state {
- AUTH_STATE_IDLE,
- AUTH_STATE_CLEAR,
- AUTH_STATE_INPUT,
- AUTH_STATE_INPUT_NOP,
- AUTH_STATE_BACKSPACE,
- AUTH_STATE_VALIDATING,
- AUTH_STATE_INVALID,
+ AUTH_STATE_IDLE,
+ AUTH_STATE_CLEAR,
+ AUTH_STATE_INPUT,
+ AUTH_STATE_INPUT_NOP,
+ AUTH_STATE_BACKSPACE,
+ AUTH_STATE_VALIDATING,
+ AUTH_STATE_INVALID,
};
struct swaylock_args {
@@ -50,6 +50,7 @@ struct swaylock_surface {
cairo_surface_t *image;
struct swaylock_state *state;
struct wl_output *output;
+ uint32_t output_global_name;
struct zxdg_output_v1 *xdg_output;
struct wl_surface *surface;
struct zwlr_layer_surface_v1 *layer_surface;