home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 February / CMCD0205.ISO / Linux / gimp-2.2.0.tar.gz / gimp-2.2.0.tar / gimp-2.2.0 / libgimpwidgets / gimpcolorselection.h < prev    next >
C/C++ Source or Header  |  2004-01-28  |  4KB  |  101 lines

  1. /* LIBGIMP - The GIMP Library
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
  3.  *
  4.  * gimpcolorselection.h
  5.  * Copyright (C) 2003 Michael Natterer <mitch@gimp.org>
  6.  *
  7.  * This library is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU Lesser General Public
  9.  * License as published by the Free Software Foundation; either
  10.  * version 2 of the License, or (at your option) any later version.
  11.  *
  12.  * This library is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  * Lesser General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU Lesser General Public
  18.  * License along with this library; if not, write to the
  19.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  * Boston, MA 02111-1307, USA.
  21.  */
  22.  
  23. #ifndef __GIMP_COLOR_SELECTION_H__
  24. #define __GIMP_COLOR_SELECTION_H__
  25.  
  26. G_BEGIN_DECLS
  27.  
  28. /* For information look at the html documentation */
  29.  
  30.  
  31. #define GIMP_TYPE_COLOR_SELECTION            (gimp_color_selection_get_type ())
  32. #define GIMP_COLOR_SELECTION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_COLOR_SELECTION, GimpColorSelection))
  33. #define GIMP_COLOR_SELECTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_SELECTION, GimpColorSelectionClass))
  34. #define GIMP_IS_COLOR_SELECTION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_COLOR_SELECTION))
  35. #define GIMP_IS_COLOR_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_SELECTION))
  36. #define GIMP_COLOR_SELECTION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_SELECTION, GimpColorSelectionClass))
  37.  
  38.  
  39. typedef struct _GimpColorSelectionClass GimpColorSelectionClass;
  40.  
  41. struct _GimpColorSelection
  42. {
  43.   GtkVBox                   parent_instance;
  44.  
  45.   gboolean                  show_alpha;
  46.  
  47.   GimpHSV                   hsv;
  48.   GimpRGB                   rgb;
  49.   GimpColorSelectorChannel  channel;
  50.  
  51.   GtkWidget                *left_vbox;
  52.   GtkWidget                *right_vbox;
  53.  
  54.   GtkWidget                *notebook;
  55.   GtkWidget                *scales;
  56.  
  57.   GtkWidget                *new_color;
  58.   GtkWidget                *old_color;
  59. };
  60.  
  61. struct _GimpColorSelectionClass
  62. {
  63.   GtkVBoxClass  parent_class;
  64.  
  65.   void (* color_changed) (GimpColorSelection *selection);
  66.  
  67.   /* Padding for future expansion */
  68.   void (* _gimp_reserved1) (void);
  69.   void (* _gimp_reserved2) (void);
  70.   void (* _gimp_reserved3) (void);
  71.   void (* _gimp_reserved4) (void);
  72. };
  73.  
  74.  
  75. GType       gimp_color_selection_get_type       (void) G_GNUC_CONST;
  76.  
  77. GtkWidget * gimp_color_selection_new            (void);
  78.  
  79. void        gimp_color_selection_set_show_alpha (GimpColorSelection *selection,
  80.                                                  gboolean           show_alpha);
  81. gboolean    gimp_color_selection_get_show_alpha (GimpColorSelection *selection);
  82.  
  83. void        gimp_color_selection_set_color      (GimpColorSelection *selection,
  84.                                                  const GimpRGB      *color);
  85. void        gimp_color_selection_get_color      (GimpColorSelection *selection,
  86.                                                  GimpRGB            *color);
  87.  
  88. void        gimp_color_selection_set_old_color  (GimpColorSelection *selection,
  89.                                                  const GimpRGB      *color);
  90. void        gimp_color_selection_get_old_color  (GimpColorSelection *selection,
  91.                                                  GimpRGB            *color);
  92.  
  93. void        gimp_color_selection_reset          (GimpColorSelection *selection);
  94.  
  95. void        gimp_color_selection_color_changed  (GimpColorSelection *selection);
  96.  
  97.  
  98. G_END_DECLS
  99.  
  100. #endif /* __GIMP_COLOR_SELECTION_H__ */
  101.