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 / gimpcolordisplay.h < prev    next >
C/C++ Source or Header  |  2004-01-28  |  5KB  |  106 lines

  1. /* LIBGIMP - The GIMP Library
  2.  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
  3.  *
  4.  * gimpcolordisplay.c
  5.  * Copyright (C) 1999 Manish Singh <yosh@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_DISPLAY_H__
  24. #define __GIMP_COLOR_DISPLAY_H__
  25.  
  26. G_BEGIN_DECLS
  27.  
  28. /* For information look at the html documentation */
  29.  
  30.  
  31. #define GIMP_TYPE_COLOR_DISPLAY            (gimp_color_display_get_type ())
  32. #define GIMP_COLOR_DISPLAY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_COLOR_DISPLAY, GimpColorDisplay))
  33. #define GIMP_COLOR_DISPLAY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_DISPLAY, GimpColorDisplayClass))
  34. #define GIMP_IS_COLOR_DISPLAY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_COLOR_DISPLAY))
  35. #define GIMP_IS_COLOR_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_DISPLAY))
  36. #define GIMP_COLOR_DISPLAY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_DISPLAY, GimpColorDisplayClass))
  37.  
  38.  
  39. typedef struct _GimpColorDisplayClass GimpColorDisplayClass;
  40.  
  41. struct _GimpColorDisplay
  42. {
  43.   GObject  parent_instance;
  44.  
  45.   gboolean enabled;
  46. };
  47.  
  48. struct _GimpColorDisplayClass
  49. {
  50.   GObjectClass  parent_class;
  51.  
  52.   const gchar  *name;
  53.   const gchar  *help_id;
  54.  
  55.   /*  virtual functions  */
  56.   GimpColorDisplay * (* clone)           (GimpColorDisplay *display);
  57.   void               (* convert)         (GimpColorDisplay *display,
  58.                                           guchar           *buf,
  59.                                           gint              width,
  60.                                           gint              height,
  61.                                           gint              bpp,
  62.                                           gint              bpl);
  63.   void               (* load_state)      (GimpColorDisplay *display,
  64.                                           GimpParasite     *state);
  65.   GimpParasite     * (* save_state)      (GimpColorDisplay *display);
  66.   GtkWidget        * (* configure)       (GimpColorDisplay *display);
  67.   void               (* configure_reset) (GimpColorDisplay *display);
  68.  
  69.   /*  signals  */
  70.   void               (* changed)         (GimpColorDisplay *display);
  71.  
  72.   /* Padding for future expansion */
  73.   void (* _gimp_reserved1) (void);
  74.   void (* _gimp_reserved2) (void);
  75.   void (* _gimp_reserved3) (void);
  76.   void (* _gimp_reserved4) (void);
  77. };
  78.  
  79.  
  80. GType              gimp_color_display_get_type    (void) G_GNUC_CONST;
  81. GimpColorDisplay * gimp_color_display_new         (GType             display_type);
  82. GimpColorDisplay * gimp_color_display_clone       (GimpColorDisplay *display);
  83.  
  84. void           gimp_color_display_convert         (GimpColorDisplay *display,
  85.                                                    guchar           *buf,
  86.                                                    gint              width,
  87.                                                    gint              height,
  88.                                                    gint              bpp,
  89.                                                    gint              bpl);
  90. void           gimp_color_display_load_state      (GimpColorDisplay *display,
  91.                                                    GimpParasite     *state);
  92. GimpParasite * gimp_color_display_save_state      (GimpColorDisplay *display);
  93. GtkWidget    * gimp_color_display_configure       (GimpColorDisplay *display);
  94. void           gimp_color_display_configure_reset (GimpColorDisplay *display);
  95.  
  96. void           gimp_color_display_changed         (GimpColorDisplay *display);
  97.  
  98. void           gimp_color_display_set_enabled     (GimpColorDisplay *display,
  99.                                                    gboolean          enabled);
  100. gboolean       gimp_color_display_get_enabled     (GimpColorDisplay *display);
  101.  
  102.  
  103. G_END_DECLS
  104.  
  105. #endif /* __GIMP_COLOR_DISPLAY_H__ */
  106.