[gtk+/gtk-2-22] gdk: Deprecate GdkRGB functions
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-22] gdk: Deprecate GdkRGB functions
- Date: Sun, 8 Aug 2010 01:20:46 +0000 (UTC)
commit bff0d11c4d9684c378e68ae0370f05e587d4d78c
Author: Benjamin Otte <otte redhat com>
Date: Sun Aug 8 01:12:06 2010 +0200
gdk: Deprecate GdkRGB functions
demos/testpixbuf-drawable.c | 3 +++
demos/testpixbuf.c | 3 +++
gdk/gdkrgb.c | 10 ++++++++++
gdk/gdkrgb.h | 19 ++++++++++---------
gtk/gtkpreview.c | 1 +
tests/testrgb.c | 2 ++
6 files changed, 29 insertions(+), 9 deletions(-)
---
diff --git a/demos/testpixbuf-drawable.c b/demos/testpixbuf-drawable.c
index ad4e4a0..71add0f 100644
--- a/demos/testpixbuf-drawable.c
+++ b/demos/testpixbuf-drawable.c
@@ -1,4 +1,7 @@
#include "config.h"
+
+#undef GDK_DISABLE_DEPRECATED
+
#include <gtk/gtk.h>
int
diff --git a/demos/testpixbuf.c b/demos/testpixbuf.c
index 2c4ee01..c8b2d98 100644
--- a/demos/testpixbuf.c
+++ b/demos/testpixbuf.c
@@ -22,6 +22,9 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
+
+#undef GDK_DISABLE_DEPRECATED
+
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
diff --git a/gdk/gdkrgb.c b/gdk/gdkrgb.c
index 7885c92..6e29f52 100644
--- a/gdk/gdkrgb.c
+++ b/gdk/gdkrgb.c
@@ -829,6 +829,7 @@ gdk_rgb_gc_set_background (GdkGC *gc, guint32 rgb)
* do not expect %pixel to be initialized in advance. If you use those
* functions, there's no need for gdk_rgb_find_color().
*
+ * Deprecated: 2.22: Cairo handles colors automatically.
**/
void
gdk_rgb_find_color (GdkColormap *colormap, GdkColor *color)
@@ -3465,6 +3466,7 @@ gdk_draw_rgb_32_image (GdkDrawable *drawable,
* Like gdk_draw_rgb_32_image(), but allows you to specify the dither
* offsets. See gdk_draw_rgb_image_dithalign() for more details.
*
+ * Deprecated: 2.22: Cairo handles colors automatically.
**/
void
gdk_draw_rgb_32_image_dithalign (GdkDrawable *drawable,
@@ -3672,6 +3674,8 @@ gdk_rgb_ditherable (void)
* function.
*
* Return value: (transfer none): the preferred colormap
+ *
+ * Deprecated: 2.22: Use gdk_get_system_colormap()
**/
GdkColormap *
gdk_rgb_get_colormap (void)
@@ -3699,6 +3703,8 @@ gdk_rgb_get_colormap (void)
* Return value: (transfer none): the preferred colormap
*
* Since: 2.2
+ *
+ * Deprecated: 2.22: Use gdk_screen_get_system_colormap()
**/
GdkColormap *
gdk_screen_get_rgb_colormap (GdkScreen *screen)
@@ -3730,6 +3736,8 @@ gdk_screen_get_rgb_colormap (GdkScreen *screen)
* Return value: (transfer none): The #GdkVisual chosen by GdkRGB.
*
* Since: 2.2
+ *
+ * Deprecated: 2.22: Use gdk_screen_get_system_visual()
**/
GdkVisual *
gdk_screen_get_rgb_visual (GdkScreen *screen)
@@ -3749,6 +3757,8 @@ gdk_screen_get_rgb_visual (GdkScreen *screen)
* any visual.
*
* Return value: (transfer none): The #GdkVisual chosen by GdkRGB.
+ *
+ * Deprecated: 2.22: Use gdk_get_system_visual()
**/
GdkVisual *
gdk_rgb_get_visual (void)
diff --git a/gdk/gdkrgb.h b/gdk/gdkrgb.h
index 2f61586..46752da 100644
--- a/gdk/gdkrgb.h
+++ b/gdk/gdkrgb.h
@@ -37,6 +37,15 @@ G_BEGIN_DECLS
typedef struct _GdkRgbCmap GdkRgbCmap;
+typedef enum
+{
+ GDK_RGB_DITHER_NONE,
+ GDK_RGB_DITHER_NORMAL,
+ GDK_RGB_DITHER_MAX
+} GdkRgbDither;
+
+#ifndef GDK_DISABLE_DEPRECATED
+
struct _GdkRgbCmap {
guint32 colors[256];
gint n_colors;
@@ -45,7 +54,6 @@ struct _GdkRgbCmap {
GSList *info_list;
};
-#ifndef GDK_DISABLE_DEPRECATED
void gdk_rgb_init (void);
gulong gdk_rgb_xpixel_from_rgb (guint32 rgb) G_GNUC_CONST;
@@ -54,18 +62,10 @@ void gdk_rgb_gc_set_foreground (GdkGC *gc,
void gdk_rgb_gc_set_background (GdkGC *gc,
guint32 rgb);
#define gdk_rgb_get_cmap gdk_rgb_get_colormap
-#endif /* GDK_DISABLE_DEPRECATED */
void gdk_rgb_find_color (GdkColormap *colormap,
GdkColor *color);
-typedef enum
-{
- GDK_RGB_DITHER_NONE,
- GDK_RGB_DITHER_NORMAL,
- GDK_RGB_DITHER_MAX
-} GdkRgbDither;
-
void gdk_draw_rgb_image (GdkDrawable *drawable,
GdkGC *gc,
gint x,
@@ -141,6 +141,7 @@ GdkVisual * gdk_rgb_get_visual (void);
gboolean gdk_rgb_ditherable (void);
gboolean gdk_rgb_colormap_ditherable (GdkColormap *cmap);
#endif
+#endif /* GDK_DISABLE_DEPRECATED */
G_END_DECLS
diff --git a/gtk/gtkpreview.c b/gtk/gtkpreview.c
index 458fed4..4e5562b 100644
--- a/gtk/gtkpreview.c
+++ b/gtk/gtkpreview.c
@@ -33,6 +33,7 @@
#include <sys/param.h>
#endif
+#undef GDK_DISABLE_DEPRECATED
#undef GTK_DISABLE_DEPRECATED
#include "gtkpreview.h"
diff --git a/tests/testrgb.c b/tests/testrgb.c
index b050183..c801838 100644
--- a/tests/testrgb.c
+++ b/tests/testrgb.c
@@ -38,6 +38,8 @@
#endif
#include <string.h>
+#undef GDK_DISABLE_DEPRECATED
+
#include "gtk/gtk.h"
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]