| 1 | /* HSV color selector for GTK+ | 
| 2 |  * | 
| 3 |  * Copyright (C) 1999 The Free Software Foundation | 
| 4 |  * | 
| 5 |  * Authors: Simon Budig <Simon.Budig@unix-ag.org> (original code) | 
| 6 |  *          Federico Mena-Quintero <federico@gimp.org> (cleanup for GTK+) | 
| 7 |  *          Jonathan Blandford <jrb@redhat.com> (cleanup for GTK+) | 
| 8 |  * | 
| 9 |  * This library is free software; you can redistribute it and/or | 
| 10 |  * modify it under the terms of the GNU Lesser General Public | 
| 11 |  * License as published by the Free Software Foundation; either | 
| 12 |  * version 2 of the License, or (at your option) any later version. | 
| 13 |  * | 
| 14 |  * This library is distributed in the hope that it will be useful, | 
| 15 |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 16 |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
| 17 |  * Lesser General Public License for more details. | 
| 18 |  * | 
| 19 |  * You should have received a copy of the GNU Lesser General Public | 
| 20 |  * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 
| 21 |  */ | 
| 22 |  | 
| 23 | /* | 
| 24 |  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS | 
| 25 |  * file for a list of people on the GTK+ Team.  See the ChangeLog | 
| 26 |  * files for a list of changes.  These files are distributed with | 
| 27 |  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. | 
| 28 |  */ | 
| 29 |  | 
| 30 | #ifndef __GTK_HSV_H__ | 
| 31 | #define __GTK_HSV_H__ | 
| 32 |  | 
| 33 | #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) | 
| 34 | #error "Only <gtk/gtk.h> can be included directly." | 
| 35 | #endif | 
| 36 |  | 
| 37 | #include <gtk/gtkwidget.h> | 
| 38 |  | 
| 39 | G_BEGIN_DECLS | 
| 40 |  | 
| 41 | #define GTK_TYPE_HSV            (gtk_hsv_get_type ()) | 
| 42 | #define GTK_HSV(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HSV, GtkHSV)) | 
| 43 | #define GTK_HSV_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HSV, GtkHSVClass)) | 
| 44 | #define GTK_IS_HSV(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_HSV)) | 
| 45 | #define GTK_IS_HSV_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HSV)) | 
| 46 | #define GTK_HSV_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_HSV, GtkHSVClass)) | 
| 47 |  | 
| 48 |  | 
| 49 | typedef struct _GtkHSV              GtkHSV; | 
| 50 | typedef struct _GtkHSVPrivate       GtkHSVPrivate; | 
| 51 | typedef struct _GtkHSVClass         GtkHSVClass; | 
| 52 |  | 
| 53 | struct _GtkHSV | 
| 54 | { | 
| 55 |   GtkWidget parent_instance; | 
| 56 |  | 
| 57 |   /*< private >*/ | 
| 58 |   GtkHSVPrivate *priv; | 
| 59 | }; | 
| 60 |  | 
| 61 | struct _GtkHSVClass | 
| 62 | { | 
| 63 |   GtkWidgetClass parent_class; | 
| 64 |  | 
| 65 |   /* Notification signals */ | 
| 66 |   void (* changed) (GtkHSV          *hsv); | 
| 67 |  | 
| 68 |   /* Keybindings */ | 
| 69 |   void (* move)    (GtkHSV          *hsv, | 
| 70 |                     GtkDirectionType type); | 
| 71 |  | 
| 72 |   /* Padding for future expansion */ | 
| 73 |   void (*_gtk_reserved1) (void); | 
| 74 |   void (*_gtk_reserved2) (void); | 
| 75 |   void (*_gtk_reserved3) (void); | 
| 76 |   void (*_gtk_reserved4) (void); | 
| 77 | }; | 
| 78 |  | 
| 79 |  | 
| 80 | GDK_DEPRECATED_IN_3_4 | 
| 81 | GType      gtk_hsv_get_type     (void) G_GNUC_CONST; | 
| 82 | GDK_DEPRECATED_IN_3_4 | 
| 83 | GtkWidget* gtk_hsv_new          (void); | 
| 84 | GDK_DEPRECATED_IN_3_4 | 
| 85 | void       gtk_hsv_set_color    (GtkHSV    *hsv, | 
| 86 | 				 double     h, | 
| 87 | 				 double     s, | 
| 88 | 				 double     v); | 
| 89 | GDK_DEPRECATED_IN_3_4 | 
| 90 | void       gtk_hsv_get_color    (GtkHSV    *hsv, | 
| 91 | 				 gdouble   *h, | 
| 92 | 				 gdouble   *s, | 
| 93 | 				 gdouble   *v); | 
| 94 | GDK_DEPRECATED_IN_3_4 | 
| 95 | void       gtk_hsv_set_metrics  (GtkHSV    *hsv, | 
| 96 | 				 gint       size, | 
| 97 | 				 gint       ring_width); | 
| 98 | GDK_DEPRECATED_IN_3_4 | 
| 99 | void       gtk_hsv_get_metrics  (GtkHSV    *hsv, | 
| 100 | 				 gint      *size, | 
| 101 | 				 gint      *ring_width); | 
| 102 | GDK_DEPRECATED_IN_3_4 | 
| 103 | gboolean   gtk_hsv_is_adjusting (GtkHSV    *hsv); | 
| 104 |  | 
| 105 | G_END_DECLS | 
| 106 |  | 
| 107 | #endif /* __GTK_HSV_H__ */ | 
| 108 |  |