summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2022-11-24 12:14:40 +0200
committerDaniel Stone <daniels@collabora.com>2023-01-09 22:13:07 +0000
commit58c3e263a05880e7cbc97a70a63ab3cfe563a8d5 (patch)
tree606e7bd7be0f4d5bd4f9ef23deee799f524336de /include
parent19d32da74213b5f819c328e96291c708ad4ba3ca (diff)
downloadweston-58c3e263a05880e7cbc97a70a63ab3cfe563a8d5.tar.gz
shell-utils: Add missing macros and C++ compat/install header
Allow C++ access from within C code and add macros to avoid multiple inclusion of the header. Also, install the header for other users of libweston to actually make use of it. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/libweston/meson.build1
-rw-r--r--include/libweston/shell-utils.h11
2 files changed, 11 insertions, 1 deletions
diff --git a/include/libweston/meson.build b/include/libweston/meson.build
index 43adfc13..7892c220 100644
--- a/include/libweston/meson.build
+++ b/include/libweston/meson.build
@@ -9,6 +9,7 @@ install_headers(
'zalloc.h',
'remoting-plugin.h',
'pipewire-plugin.h',
+ 'shell-utils.h',
subdir: dir_include_libweston_install
)
diff --git a/include/libweston/shell-utils.h b/include/libweston/shell-utils.h
index 3a1782f4..5e10b15d 100644
--- a/include/libweston/shell-utils.h
+++ b/include/libweston/shell-utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2021 Collabora, Ltd.
+ * Copyright 2021, 2022 Collabora, Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -21,6 +21,7 @@
* DEALINGS IN THE SOFTWARE.
*
*/
+#pragma once
#include "config.h"
#include "shared/helpers.h"
@@ -29,6 +30,10 @@
#include <libweston/config-parser.h>
#include <string.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* parameter for weston_curtain_create() */
struct weston_curtain_params {
int (*get_label)(struct weston_surface *es, char *buf, size_t len);
@@ -72,3 +77,7 @@ weston_shell_utils_curtain_destroy(struct weston_curtain *curtain);
uint32_t
weston_shell_get_binding_modifier(struct weston_config *config, uint32_t default_mod);
+
+#ifdef __cplusplus
+}
+#endif