summaryrefslogtreecommitdiff
path: root/cogl/cogl-xlib.h
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2013-03-22 21:18:53 +0000
committerRobert Bragg <robert@linux.intel.com>2013-04-24 22:23:50 +0100
commitafbb13e1a404f922fd25ae6df53a4d0382ad0e01 (patch)
tree120d3d74a082b25f5b29cd904e06fce9180a516e /cogl/cogl-xlib.h
parentb5e57c914b943ca32a8ae51078c75eddbbea2bff (diff)
downloadcogl-afbb13e1a404f922fd25ae6df53a4d0382ad0e01.tar.gz
Add compiler deprecation warnings
This adds compiler symbol deprecation declarations for old Cogl APIs so that users can easily see via compiler warning when they are using these symbols, and also see a hint for what the apis should be replaced with. So that users of Cogl can manage when to show these warnings this introduces a scheme borrowed from glib whereby you can declare what version of the Cogl api you are using: COGL_VERSION_MIN_REQUIRED can be defined to indicate the oldest Cogl api that the application wants to use. Cogl will only warn about deprecations for symbols that were deprecated earlier than this required version. If this is left undefined then by default Cogl will warn about all deprecations. COGL_VERSION_MAX_ALLOWED can be defined to indicate the newest api that the application uses. If the application uses symbols newer than this then Cogl will give a warning about that. This patch removes the need to maintain the COGL_DISABLE_DEPRECATED guards around deprecated symbols. This patch fixes a few uses of deprecated symbols in the examples/ Reviewed-by: Neil Roberts <neil@linux.intel.com>
Diffstat (limited to 'cogl/cogl-xlib.h')
-rw-r--r--cogl/cogl-xlib.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/cogl/cogl-xlib.h b/cogl/cogl-xlib.h
index 5dab8aec..c84bd23c 100644
--- a/cogl/cogl-xlib.h
+++ b/cogl/cogl-xlib.h
@@ -32,6 +32,7 @@
#include <cogl/cogl-types.h>
#include <cogl/cogl-clutter-xlib.h>
#include <cogl/cogl-xlib-renderer.h>
+#include <cogl/cogl-macros.h>
COGL_BEGIN_DECLS
@@ -43,9 +44,11 @@ COGL_BEGIN_DECLS
* before this function is called.
*
* Stability: Unstable
+ * Deprecated: 1.16: Use cogl_xlib_renderer_get_display() instead
*/
Display *
-cogl_xlib_get_display (void);
+cogl_xlib_get_display (void)
+ COGL_DEPRECATED_IN_1_16_FOR (cogl_xlib_renderer_get_display);
/*
* cogl_xlib_set_display:
@@ -55,9 +58,12 @@ cogl_xlib_get_display (void);
* more complete winsys abstraction.
*
* Stability: Unstable
+ * Deprecated: 1.16: Use cogl_xlib_renderer_set_foreign_display()
+ * instead
*/
void
-cogl_xlib_set_display (Display *display);
+cogl_xlib_set_display (Display *display)
+ COGL_DEPRECATED_IN_1_16_FOR (cogl_xlib_renderer_set_foreign_display);
/*
* cogl_xlib_handle_event:
@@ -75,9 +81,11 @@ cogl_xlib_set_display (Display *display);
* any exclusive action.
*
* Stability: Unstable
+ * Deprecated: 1.16: Use cogl_xlib_renderer_handle_event() instead
*/
CoglFilterReturn
-cogl_xlib_handle_event (XEvent *xevent);
+cogl_xlib_handle_event (XEvent *xevent)
+ COGL_DEPRECATED_IN_1_16_FOR (cogl_xlib_renderer_handle_event);
COGL_END_DECLS