diff options
author | Havoc Pennington <hp@pobox.com> | 2001-02-20 05:21:44 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2001-02-20 05:21:44 +0000 |
commit | 50b1ab41182a7b421c31023d3f46860f623b1a25 (patch) | |
tree | d80ee0ad68c810d6ca475f936105e4e588baaabc /gdk/gdkrgb.c | |
parent | 131aac575f648e776d4f98c96d1d71d4a4b21ee7 (diff) | |
download | gtk+-50b1ab41182a7b421c31023d3f46860f623b1a25.tar.gz |
add --deprecated-guards
2001-02-19 Havoc Pennington <hp@pobox.com>
* gdk/Makefile.am (SCAN_OPTIONS): add --deprecated-guards
* gdk/gdk-sections.txt: update
* gdk/gdk-docs.sgml: update
2001-02-19 Havoc Pennington <hp@pobox.com>
* gdk/gdkwindow.c: docs
* gdk/gdkrgb.c: docs
* gdk/gdkregion-generic.c: docs
* gdk/gdkgc.c (gdk_gc_set_values): docs
* gdk/gdkdraw.c: docs
* gdk/gdkdrawable.h: deprecate drawable get/set data
Diffstat (limited to 'gdk/gdkrgb.c')
-rw-r--r-- | gdk/gdkrgb.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gdk/gdkrgb.c b/gdk/gdkrgb.c index 600d1f3b7d..3e6a4cda6f 100644 --- a/gdk/gdkrgb.c +++ b/gdk/gdkrgb.c @@ -917,6 +917,27 @@ gdk_rgb_gc_set_background (GdkGC *gc, guint32 rgb) gdk_gc_set_background (gc, &color); } +/** + * gdk_rgb_find_color: + * @colormap: a #GdkColormap + * @color: a #GdkColor + * + * @colormap should be the colormap for the graphics context and + * drawable you're using to draw. If you're drawing to a #GtkWidget, + * call gtk_widget_get_colormap(). + * + * @color should have its %red, %green, and %blue fields initialized; + * gdk_rgb_find_color() will fill in the %pixel field with the best + * matching pixel from a color cube. The color is then ready to be + * used for drawing, e.g. you can call gdk_gc_set_foreground() which + * expects %pixel to be initialized. + * + * In many cases, you can avoid this whole issue by calling + * gdk_gc_set_rgb_fg_color() or gdk_gc_set_rgb_bg_color(), which + * do not expect %pixel to be initialized in advance. If you use those + * functions, there's no need for gdk_rgb_find_color(). + * + **/ void gdk_rgb_find_color (GdkColormap *colormap, GdkColor *color) { @@ -3522,6 +3543,17 @@ gdk_rgb_ditherable (void) return gdk_rgb_colormap_ditherable (gdk_rgb_get_colormap ()); } +/** + * gdk_rgb_get_colormap: + * + * Returns the preferred colormap for rendering image data. Not a + * very useful function; historically, GDK could only render RGB image + * data to one colormap and visual, but in the current version it can + * render to any colormap and visual. So there's no need to call this + * function. + * + * Return value: the preferred colormap + **/ GdkColormap * gdk_rgb_get_colormap (void) { |