home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / histogramwidget.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-12-20  |  2.5 KB  |  77 lines

  1. /* The GIMP -- an image manipulation program
  2.  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3.  *
  4.  * This program is free software; you can redistribute it and/or modify
  5.  * it under the terms of the GNU General Public License as published by
  6.  * the Free Software Foundation; either version 2 of the License, or
  7.  * (at your option) any later version.
  8.  *
  9.  * This program is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  * GNU General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU General Public License
  15.  * along with this program; if not, write to the Free Software
  16.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17.  */
  18.  
  19. #ifndef __HISTOGRAM_WIDGET_H__
  20. #define __HISTOGRAM_WIDGET_H__
  21.  
  22. #include <gtk/gtkdrawingarea.h>
  23.  
  24. #include "gimphistogram.h"
  25.  
  26.  
  27. #define HISTOGRAM_WIDGET_TYPE         (histogram_widget_get_type ())
  28. #define HISTOGRAM_WIDGET(obj)         GTK_CHECK_CAST (obj, histogram_widget_get_type (), HistogramWidget)
  29. #define HISTOGRAM_WIDGET_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, histogram_widget_get_type (), HistogramWidget)
  30. #define IS_HISTOGRAM_WIDGET(obj)      GTK_CHECK_TYPE (obj, histogram_widget_get_type ())
  31.  
  32. typedef struct _HistogramWidget      HistogramWidget;
  33. typedef struct _HistogramWidgetClass HistogramWidgetClass;
  34.  
  35.  
  36. /* HistogramWidget signals:
  37.      range_changed
  38. */
  39.  
  40. struct _HistogramWidget
  41. {
  42.   GtkDrawingArea drawingarea;
  43.  
  44.   GimpHistogram        *histogram;
  45.   GimpHistogramChannel  channel;
  46.   gint                  start;
  47.   gint                  end;
  48. };
  49.  
  50. struct _HistogramWidgetClass
  51. {
  52.   GtkDrawingAreaClass parent_class;
  53.  
  54.   void (* range_changed) (HistogramWidget *hw,
  55.               gint             start,
  56.               gint             end);
  57. };
  58.  
  59.  
  60. /*  Histogram functions  */
  61.  
  62. GtkType           histogram_widget_get_type  (void);
  63.  
  64. HistogramWidget * histogram_widget_new       (gint             width,
  65.                           gint             height);
  66. void              histogram_widget_update    (HistogramWidget *hw,
  67.                           GimpHistogram   *histogram);
  68. void              histogram_widget_range     (HistogramWidget *hw,
  69.                           gint             start,
  70.                           gint             end);
  71. void              histogram_widget_channel   (HistogramWidget *hw,
  72.                           gint             channel);
  73. GimpHistogram   * histogram_widget_histogram (HistogramWidget *hw);
  74.  
  75.  
  76. #endif /* __HISTOGRAM_WIDGET_H__ */
  77.