GtkHSV
GtkHSV — A “color wheel” widget
Functions
GtkWidget * | gtk_hsv_new () |
void | gtk_hsv_set_color () |
void | gtk_hsv_get_color () |
void | gtk_hsv_set_metrics () |
void | gtk_hsv_get_metrics () |
gboolean | gtk_hsv_is_adjusting () |
void | gtk_hsv_to_rgb () |
void | gtk_rgb_to_hsv () |
Types and Values
struct | GtkHSV |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkHSV
Implemented Interfaces
GtkHSV implements AtkImplementorIface and GtkBuildable.
Includes
#include <gtk/gtk.h>
Description
GtkHSV is the “color wheel” part of a complete color selector widget. It allows to select a color by determining its HSV components in an intuitive way. Moving the selection around the outer ring changes the hue, and moving the selection point inside the inner triangle changes value and saturation.
GtkHSV has been deprecated together with GtkColorSelection, where it was used.
Functions
gtk_hsv_new ()
GtkWidget *
gtk_hsv_new (void
);
gtk_hsv_new
is deprecated and should not be used in newly-written code.
Creates a new HSV color selector.
Returns
A newly-created HSV color selector.
Since: 2.14
gtk_hsv_set_color ()
void gtk_hsv_set_color (GtkHSV *hsv
,double h
,double s
,double v
);
gtk_hsv_set_color
is deprecated and should not be used in newly-written code.
Sets the current color in an HSV color selector. Color component values must be in the [0.0, 1.0] range.
Parameters
hsv | An HSV color selector | |
h | Hue | |
s | Saturation | |
v | Value |
Since: 2.14
gtk_hsv_get_color ()
void gtk_hsv_get_color (GtkHSV *hsv
,gdouble *h
,gdouble *s
,gdouble *v
);
gtk_hsv_get_color
is deprecated and should not be used in newly-written code.
Queries the current color in an HSV color selector. Returned values will be in the [0.0, 1.0] range.
Parameters
hsv | An HSV color selector | |
h | Return value for the hue. | [out] |
s | Return value for the saturation. | [out] |
v | Return value for the value. | [out] |
Since: 2.14
gtk_hsv_set_metrics ()
void gtk_hsv_set_metrics (GtkHSV *hsv
,gint size
,gint ring_width
);
gtk_hsv_set_metrics
is deprecated and should not be used in newly-written code.
Sets the size and ring width of an HSV color selector.
Parameters
hsv | An HSV color selector | |
size | Diameter for the hue ring | |
ring_width | Width of the hue ring |
Since: 2.14
gtk_hsv_get_metrics ()
void gtk_hsv_get_metrics (GtkHSV *hsv
,gint *size
,gint *ring_width
);
gtk_hsv_get_metrics
is deprecated and should not be used in newly-written code.
Queries the size and ring width of an HSV color selector.
Parameters
hsv | An HSV color selector | |
size | Return value for the diameter of the hue ring. | [out] |
ring_width | Return value for the width of the hue ring. | [out] |
Since: 2.14
gtk_hsv_is_adjusting ()
gboolean
gtk_hsv_is_adjusting (GtkHSV *hsv
);
gtk_hsv_is_adjusting
is deprecated and should not be used in newly-written code.
An HSV color selector can be said to be adjusting if multiple rapid changes are being made to its value, for example, when the user is adjusting the value with the mouse. This function queries whether the HSV color selector is being adjusted or not.
Parameters
hsv | A GtkHSV |
Returns
TRUE
if clients can ignore changes to the color value, since they may be transitory, or FALSE
if they should consider the color value status to be final.
Since: 2.14
gtk_hsv_to_rgb ()
void gtk_hsv_to_rgb (gdouble h, gdouble s, gdouble v, gdouble *r, gdouble *g, gdouble *b);
Converts a color from HSV space to RGB.
Input values must be in the [0.0, 1.0] range; output values will be in the same range.
Parameters
h | Hue | |
s | Saturation | |
v | Value | |
r | Return value for the red component. | [out] |
g | Return value for the green component. | [out] |
b | Return value for the blue component. | [out] |
Since: 2.14
gtk_rgb_to_hsv ()
void gtk_rgb_to_hsv (gdouble r, gdouble g, gdouble b, gdouble *h, gdouble *s, gdouble *v);
Converts a color from RGB space to HSV.
Input values must be in the [0.0, 1.0] range; output values will be in the same range.
Parameters
r | Red | |
g | Green | |
b | Blue | |
h | Return value for the hue component. | [out] |
s | Return value for the saturation component. | [out] |
v | Return value for the value component. | [out] |
Since: 2.14
Types and Values
struct GtkHSV
struct GtkHSV;
Signal Details
The “move”
signal
void user_function (GtkHSV *hsv, GtkDirectionType arg1, gpointer user_data)
Flags: Action
See Also
© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk3/3.24/GtkHSV.html