Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2022-07-26 00:43:48 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2022-07-26 00:43:48 +0300
commitf081e76037432cb926be45e980eac201d337032c (patch)
treedd1225521c12ea21c0b0c3d51ec1ae3f8730755f /intern/wayland_dynload/extern/wayland_dynload_cursor.h
parentfa2084ae58a77b1201289b6bedac427f73c762d1 (diff)
parent462f99bf38648a08226b1fba423315aec2bc577b (diff)
Merge branch 'master' into geometry-nodes-iterative-cachegeometry-nodes-rigid-body-integration
Diffstat (limited to 'intern/wayland_dynload/extern/wayland_dynload_cursor.h')
-rw-r--r--intern/wayland_dynload/extern/wayland_dynload_cursor.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/intern/wayland_dynload/extern/wayland_dynload_cursor.h b/intern/wayland_dynload/extern/wayland_dynload_cursor.h
new file mode 100644
index 00000000000..3c444069a43
--- /dev/null
+++ b/intern/wayland_dynload/extern/wayland_dynload_cursor.h
@@ -0,0 +1,76 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+/** \file
+ * \ingroup intern_wayland_dynload
+ *
+ * Wrapper functions for `<wayland-cursor.h>`.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef WAYLAND_DYNLOAD_FN
+WAYLAND_DYNLOAD_FN(wl_cursor_theme_load)
+WAYLAND_DYNLOAD_FN(wl_cursor_theme_destroy)
+WAYLAND_DYNLOAD_FN(wl_cursor_theme_get_cursor)
+WAYLAND_DYNLOAD_FN(wl_cursor_image_get_buffer)
+WAYLAND_DYNLOAD_FN(wl_cursor_frame)
+WAYLAND_DYNLOAD_FN(wl_cursor_frame_and_duration)
+#elif defined(WAYLAND_DYNLOAD_IFACE)
+/* No interfaces. */
+#else
+
+/* Header guard. */
+# if !defined(__WAYLAND_DYNLOAD_CURSOR_H__) && !defined(WAYLAND_DYNLOAD_VALIDATE)
+# define __WAYLAND_DYNLOAD_CURSOR_H__
+
+# include <wayland-cursor.h>
+extern struct WaylandDynload_Cursor wayland_dynload_cursor;
+
+/* Support validating declarations against the header. */
+# ifndef WAYLAND_DYNLOAD_VALIDATE
+# define WL_DYN_FN(a) (*a)
+# else
+# define WL_DYN_FN(a) (a)
+# endif
+
+# ifndef WAYLAND_DYNLOAD_VALIDATE
+struct WaylandDynload_Cursor {
+# endif
+
+ struct wl_cursor_theme *WL_DYN_FN(wl_cursor_theme_load)(const char *name,
+ int size,
+ struct wl_shm *shm);
+ void WL_DYN_FN(wl_cursor_theme_destroy)(struct wl_cursor_theme *theme);
+ struct wl_cursor *WL_DYN_FN(wl_cursor_theme_get_cursor)(struct wl_cursor_theme *theme,
+ const char *name);
+ struct wl_buffer *WL_DYN_FN(wl_cursor_image_get_buffer)(struct wl_cursor_image *image);
+ int WL_DYN_FN(wl_cursor_frame)(struct wl_cursor *cursor, uint32_t time);
+ int WL_DYN_FN(wl_cursor_frame_and_duration)(struct wl_cursor *cursor,
+ uint32_t time,
+ uint32_t *duration);
+
+# ifndef WAYLAND_DYNLOAD_VALIDATE
+};
+# endif
+# undef WL_DYN_FN
+
+# ifndef WAYLAND_DYNLOAD_VALIDATE
+# define wl_cursor_theme_load(...) (*wayland_dynload_cursor.wl_cursor_theme_load)(__VA_ARGS__)
+# define wl_cursor_theme_destroy(...) \
+ (*wayland_dynload_cursor.wl_cursor_theme_destroy)(__VA_ARGS__)
+# define wl_cursor_theme_get_cursor(...) \
+ (*wayland_dynload_cursor.wl_cursor_theme_get_cursor)(__VA_ARGS__)
+# define wl_cursor_image_get_buffer(...) \
+ (*wayland_dynload_cursor.wl_cursor_image_get_buffer)(__VA_ARGS__)
+# define wl_cursor_frame(...) (*wayland_dynload_cursor.wl_cursor_frame)(__VA_ARGS__)
+# define wl_cursor_frame_and_duration(...) \
+ (*wayland_dynload_cursor.wl_cursor_frame_and_duration)(__VA_ARGS__)
+# endif /* !WAYLAND_DYNLOAD_VALIDATE */
+# endif /* !__WAYLAND_DYNLOAD_CLIENT_H__ */
+#endif /* !defined(WAYLAND_DYNLOAD_FN) && !defined(WAYLAND_DYNLOAD_IFACE) */
+
+#ifdef __cplusplus
+}
+#endif