2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2003-10-15 23:16:50 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2003-10-15 23:16:50 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2003-10-15 23:16:50 +08:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2003-10-15 23:16:50 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIMP_COLOR_FRAME_H__
|
|
|
|
#define __GIMP_COLOR_FRAME_H__
|
|
|
|
|
|
|
|
|
|
|
|
#define GIMP_COLOR_FRAME_ROWS 5
|
|
|
|
|
|
|
|
|
|
|
|
#define GIMP_TYPE_COLOR_FRAME (gimp_color_frame_get_type ())
|
|
|
|
#define GIMP_COLOR_FRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_COLOR_FRAME, GimpColorFrame))
|
|
|
|
#define GIMP_COLOR_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_FRAME, GimpColorFrameClass))
|
|
|
|
#define GIMP_IS_COLOR_FRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_COLOR_FRAME))
|
|
|
|
#define GIMP_IS_COLOR_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_FRAME))
|
|
|
|
#define GIMP_COLOR_FRAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_FRAME, GimpColorFrameClass))
|
|
|
|
|
|
|
|
|
2004-05-24 22:51:15 +08:00
|
|
|
typedef struct _GimpColorFrameClass GimpColorFrameClass;
|
2003-10-15 23:16:50 +08:00
|
|
|
|
|
|
|
struct _GimpColorFrame
|
|
|
|
{
|
2004-05-03 06:33:33 +08:00
|
|
|
GimpFrame parent_instance;
|
2003-10-15 23:16:50 +08:00
|
|
|
|
|
|
|
gboolean sample_valid;
|
2015-08-25 06:05:59 +08:00
|
|
|
gboolean sample_average;
|
2012-03-29 03:37:59 +08:00
|
|
|
const Babl *sample_format;
|
2015-08-25 06:05:59 +08:00
|
|
|
guchar pixel[32];
|
2003-10-15 23:16:50 +08:00
|
|
|
GimpRGB color;
|
2017-03-11 07:01:01 +08:00
|
|
|
gint x;
|
|
|
|
gint y;
|
2003-10-15 23:16:50 +08:00
|
|
|
|
|
|
|
GimpColorFrameMode frame_mode;
|
|
|
|
|
2018-04-03 07:45:27 +08:00
|
|
|
PangoEllipsizeMode ellipsize;
|
|
|
|
|
2005-06-04 06:34:28 +08:00
|
|
|
gboolean has_number;
|
|
|
|
gint number;
|
|
|
|
|
2005-06-04 08:56:00 +08:00
|
|
|
gboolean has_color_area;
|
2017-03-11 07:01:01 +08:00
|
|
|
gboolean has_coords;
|
2005-06-04 08:56:00 +08:00
|
|
|
|
2003-10-15 23:16:50 +08:00
|
|
|
GtkWidget *menu;
|
2005-06-04 06:34:28 +08:00
|
|
|
GtkWidget *color_area;
|
2017-12-11 23:13:18 +08:00
|
|
|
GtkWidget *coords_box_x;
|
|
|
|
GtkWidget *coords_box_y;
|
|
|
|
GtkWidget *coords_label_x;
|
|
|
|
GtkWidget *coords_label_y;
|
2003-10-15 23:16:50 +08:00
|
|
|
GtkWidget *name_labels[GIMP_COLOR_FRAME_ROWS];
|
|
|
|
GtkWidget *value_labels[GIMP_COLOR_FRAME_ROWS];
|
2007-11-14 22:53:45 +08:00
|
|
|
|
|
|
|
PangoLayout *number_layout;
|
2016-10-19 04:48:04 +08:00
|
|
|
|
|
|
|
GimpColorConfig *config;
|
|
|
|
GimpColorTransform *transform;
|
2003-10-15 23:16:50 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GimpColorFrameClass
|
|
|
|
{
|
2004-05-03 06:33:33 +08:00
|
|
|
GimpFrameClass parent_class;
|
2003-10-15 23:16:50 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2016-10-19 04:48:04 +08:00
|
|
|
GType gimp_color_frame_get_type (void) G_GNUC_CONST;
|
2003-10-15 23:16:50 +08:00
|
|
|
|
2016-10-19 04:48:04 +08:00
|
|
|
GtkWidget * gimp_color_frame_new (void);
|
2003-10-15 23:16:50 +08:00
|
|
|
|
2005-06-04 08:56:00 +08:00
|
|
|
void gimp_color_frame_set_mode (GimpColorFrame *frame,
|
|
|
|
GimpColorFrameMode mode);
|
2017-03-11 07:01:01 +08:00
|
|
|
|
2018-04-03 07:45:27 +08:00
|
|
|
void gimp_color_frame_set_ellipsize (GimpColorFrame *frame,
|
|
|
|
PangoEllipsizeMode ellipsize);
|
|
|
|
|
2005-06-04 07:57:02 +08:00
|
|
|
void gimp_color_frame_set_has_number (GimpColorFrame *frame,
|
|
|
|
gboolean has_number);
|
|
|
|
void gimp_color_frame_set_number (GimpColorFrame *frame,
|
|
|
|
gint number);
|
|
|
|
|
2005-06-04 08:56:00 +08:00
|
|
|
void gimp_color_frame_set_has_color_area (GimpColorFrame *frame,
|
|
|
|
gboolean has_color_area);
|
2017-03-11 07:01:01 +08:00
|
|
|
void gimp_color_frame_set_has_coords (GimpColorFrame *frame,
|
|
|
|
gboolean has_coords);
|
2005-06-04 08:56:00 +08:00
|
|
|
|
2005-06-04 07:57:02 +08:00
|
|
|
void gimp_color_frame_set_color (GimpColorFrame *frame,
|
2015-08-25 06:05:59 +08:00
|
|
|
gboolean sample_average,
|
2012-03-29 03:37:59 +08:00
|
|
|
const Babl *format,
|
2015-08-25 06:05:59 +08:00
|
|
|
gpointer pixel,
|
2017-03-11 07:01:01 +08:00
|
|
|
const GimpRGB *color,
|
|
|
|
gint x,
|
|
|
|
gint y);
|
2005-06-04 07:57:02 +08:00
|
|
|
void gimp_color_frame_set_invalid (GimpColorFrame *frame);
|
2003-10-15 23:16:50 +08:00
|
|
|
|
2016-10-19 04:48:04 +08:00
|
|
|
void gimp_color_frame_set_color_config (GimpColorFrame *frame,
|
|
|
|
GimpColorConfig *config);
|
|
|
|
|
2003-10-15 23:16:50 +08:00
|
|
|
|
|
|
|
#endif /* __GIMP_COLOR_FRAME_H__ */
|