mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 23:10:22 +00:00
gdk: Deprecate GdkRGB functions
This commit is contained in:
parent
78bf0f3071
commit
bff0d11c4d
@ -1,4 +1,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#undef GDK_DISABLE_DEPRECATED
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
int
|
||||
|
@ -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>
|
||||
|
||||
|
10
gdk/gdkrgb.c
10
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)
|
||||
|
19
gdk/gdkrgb.h
19
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
|
||||
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#undef GDK_DISABLE_DEPRECATED
|
||||
#undef GTK_DISABLE_DEPRECATED
|
||||
|
||||
#include "gtkpreview.h"
|
||||
|
@ -38,6 +38,8 @@
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#undef GDK_DISABLE_DEPRECATED
|
||||
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user