mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-20 05:50:11 +00:00
Add a function for converting a GdkColor to a string (#373856).
2006-12-21 Matthew Barnes <mbarnes@redhat.com> * docs/reference/gdk/gdk-sections.txt: * gdk/gdkcolor.[ch] (gdk_color_to_string): Add a function for converting a GdkColor to a string (#373856). * configure.in: Bump pango requirement to 1.15.2.
This commit is contained in:
parent
410292525d
commit
96b3419dff
@ -1,3 +1,11 @@
|
||||
2006-12-21 Matthew Barnes <mbarnes@redhat.com>
|
||||
|
||||
* docs/reference/gdk/gdk-sections.txt:
|
||||
* gdk/gdkcolor.[ch] (gdk_color_to_string): Add a function for
|
||||
converting a GdkColor to a string (#373856).
|
||||
|
||||
* configure.in: Bump pango requirement to 1.15.2.
|
||||
|
||||
2006-12-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/keynames.txt: Mark arrow keys as translatable. (#369506,
|
||||
|
@ -32,7 +32,7 @@ m4_define([gtk_binary_version], [2.10.0])
|
||||
|
||||
# required versions of other packages
|
||||
m4_define([glib_required_version], [2.12.0])
|
||||
m4_define([pango_required_version], [1.12.0])
|
||||
m4_define([pango_required_version], [1.15.2])
|
||||
m4_define([atk_required_version], [1.9.0])
|
||||
m4_define([cairo_required_version], [1.2.0])
|
||||
|
||||
|
@ -385,6 +385,7 @@ gdk_color_alloc
|
||||
gdk_color_change
|
||||
gdk_color_equal
|
||||
gdk_color_hash
|
||||
gdk_color_to_string
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_COLORMAP
|
||||
|
@ -348,6 +348,33 @@ gdk_color_parse (const gchar *spec,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_color_to_string:
|
||||
* @color: a #GdkColor
|
||||
*
|
||||
* Returns a textual specification of @color in the hexadecimal form
|
||||
* <literal>#rrrrggggbbbb</literal>, where <literal>r</literal>,
|
||||
* <literal>g</literal> and <literal>b</literal> are hex digits
|
||||
* representing the red, green and blue components respectively.
|
||||
*
|
||||
* Return value: a newly-allocated text string
|
||||
*
|
||||
* Since: 2.12
|
||||
**/
|
||||
gchar *
|
||||
gdk_color_to_string (const GdkColor *color)
|
||||
{
|
||||
PangoColor pango_color;
|
||||
|
||||
g_return_val_if_fail (color != NULL, NULL);
|
||||
|
||||
pango_color.red = color->red;
|
||||
pango_color.green = color->green;
|
||||
pango_color.blue = color->blue;
|
||||
|
||||
return pango_color_to_string (&pango_color);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_colormap_get_system:
|
||||
*
|
||||
|
@ -127,13 +127,14 @@ void gdk_colormap_query_color (GdkColormap *colormap,
|
||||
|
||||
GdkVisual *gdk_colormap_get_visual (GdkColormap *colormap);
|
||||
|
||||
GdkColor *gdk_color_copy (const GdkColor *color);
|
||||
void gdk_color_free (GdkColor *color);
|
||||
gboolean gdk_color_parse (const gchar *spec,
|
||||
GdkColor *color);
|
||||
guint gdk_color_hash (const GdkColor *colora);
|
||||
gboolean gdk_color_equal (const GdkColor *colora,
|
||||
const GdkColor *colorb);
|
||||
GdkColor *gdk_color_copy (const GdkColor *color);
|
||||
void gdk_color_free (GdkColor *color);
|
||||
gboolean gdk_color_parse (const gchar *spec,
|
||||
GdkColor *color);
|
||||
guint gdk_color_hash (const GdkColor *colora);
|
||||
gboolean gdk_color_equal (const GdkColor *colora,
|
||||
const GdkColor *colorb);
|
||||
gchar * gdk_color_to_string (const GdkColor *color);
|
||||
|
||||
GType gdk_color_get_type (void) G_GNUC_CONST;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user