From 982ea3f09aa968bd89b00f445272984cb629b346 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 22 Jul 2019 12:48:25 +0200 Subject: Add deprecation macro and deprecate puglInitResizable() --- pugl/pugl.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'pugl') diff --git a/pugl/pugl.h b/pugl/pugl.h index adeeb0e..1567b1f 100644 --- a/pugl/pugl.h +++ b/pugl/pugl.h @@ -41,6 +41,14 @@ # define PUGL_API #endif +#if defined(__clang__) +# define PUGL_DEPRECATED_BY(name) __attribute__((deprecated("", name))) +#elif defined(__GNUC__) +# define PUGL_DEPRECATED_BY(name) __attribute__((deprecated("Use " name))) +#else +# define PUGL_DEPRECATED_BY(name) +#endif + #ifdef __cplusplus extern "C" { #endif @@ -474,8 +482,10 @@ puglInitWindowAspectRatio(PuglView* view, /** Enable or disable resizing before creating a window. + + @deprecated Use puglInitWindowHint() with @ref PUGL_RESIZABLE. */ -PUGL_API void +PUGL_API PUGL_DEPRECATED_BY("puglInitWindowHint") void puglInitResizable(PuglView* view, bool resizable); /** -- cgit v1.2.1