From 6074cbe2ebffd6113793ea213a9744c7cc01fcef Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Mon, 10 Jun 2024 20:05:26 +0300 Subject: [PATCH 1/2] api: introduce WLR_DEPRECATED --- include/wlr/api.h | 20 ++++++++++++++++++++ meson.build | 1 + 2 files changed, 21 insertions(+) create mode 100644 include/wlr/api.h diff --git a/include/wlr/api.h b/include/wlr/api.h new file mode 100644 index 000000000..1b7e45676 --- /dev/null +++ b/include/wlr/api.h @@ -0,0 +1,20 @@ +#ifndef WLR_API_H +#define WLR_API_H + +#ifndef WLR_IMPLEMENTATION + +#if __STDC_VERSION__ >= 202311L +#define WLR_DEPRECATED(msg) [[deprecated(msg)]] +#elif defined(__GNUC__) +#define WLR_DEPRECATED(msg) __attribute__((deprecated(msg))) +#else +#define WLR_DEPRECATED(msg) +#endif + +#else + +#define WLR_DEPRECATED(msg) + +#endif + +#endif diff --git a/meson.build b/meson.build index b0805b0c9..fcce4b8fe 100644 --- a/meson.build +++ b/meson.build @@ -21,6 +21,7 @@ big_endian = target_machine.endian() == 'big' add_project_arguments([ '-D_POSIX_C_SOURCE=200809L', + '-DWLR_IMPLEMENTATION', '-DWLR_USE_UNSTABLE', '-DWLR_LITTLE_ENDIAN=@0@'.format(little_endian.to_int()), '-DWLR_BIG_ENDIAN=@0@'.format(big_endian.to_int()), From 1addf857b50a8010afd3d1f14a7d570c99d539e6 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Mon, 10 Jun 2024 20:13:32 +0300 Subject: [PATCH 2/2] fullscreen-shell: use WLR_DEPRECATED --- include/wlr/types/wlr_fullscreen_shell_v1.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/wlr/types/wlr_fullscreen_shell_v1.h b/include/wlr/types/wlr_fullscreen_shell_v1.h index 54e4c0550..4c55d2f8d 100644 --- a/include/wlr/types/wlr_fullscreen_shell_v1.h +++ b/include/wlr/types/wlr_fullscreen_shell_v1.h @@ -11,6 +11,7 @@ #define WLR_TYPES_WLR_FULLSCREEN_SHELL_V1_H #include +#include #include "fullscreen-shell-unstable-v1-protocol.h" struct wlr_fullscreen_shell_v1 { @@ -34,6 +35,7 @@ struct wlr_fullscreen_shell_v1_present_surface_event { struct wlr_output *output; // can be NULL }; +WLR_DEPRECATED("fullscreen-shell support will be removed in the next version") struct wlr_fullscreen_shell_v1 *wlr_fullscreen_shell_v1_create( struct wl_display *display);