2006-12-09 13:33:38 -08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2003-11-09 15:24:40 -08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
|
*
|
2009-01-17 14:28:01 -08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2003-11-09 15:24:40 -08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-17 14:28:01 -08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2003-11-09 15:24:40 -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
|
2018-07-11 14:47:19 -07:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2003-11-09 15:24:40 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __GIMP_CANVAS_H__
|
|
|
|
|
#define __GIMP_CANVAS_H__
|
|
|
|
|
|
|
|
|
|
|
2009-10-18 13:19:29 -07:00
|
|
|
#include "widgets/gimpoverlaybox.h"
|
|
|
|
|
|
|
|
|
|
|
2010-09-24 12:03:51 -07:00
|
|
|
#define GIMP_CANVAS_EVENT_MASK (GDK_EXPOSURE_MASK | \
|
2010-10-02 17:39:04 -07:00
|
|
|
GDK_POINTER_MOTION_MASK | \
|
|
|
|
|
GDK_BUTTON_PRESS_MASK | \
|
|
|
|
|
GDK_BUTTON_RELEASE_MASK | \
|
|
|
|
|
GDK_STRUCTURE_MASK | \
|
|
|
|
|
GDK_ENTER_NOTIFY_MASK | \
|
|
|
|
|
GDK_LEAVE_NOTIFY_MASK | \
|
|
|
|
|
GDK_FOCUS_CHANGE_MASK | \
|
|
|
|
|
GDK_KEY_PRESS_MASK | \
|
|
|
|
|
GDK_KEY_RELEASE_MASK | \
|
2010-09-24 12:03:51 -07:00
|
|
|
GDK_PROXIMITY_OUT_MASK)
|
2003-11-11 06:50:07 -08:00
|
|
|
|
|
|
|
|
|
2003-11-09 15:24:40 -08:00
|
|
|
#define GIMP_TYPE_CANVAS (gimp_canvas_get_type ())
|
|
|
|
|
#define GIMP_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CANVAS, GimpCanvas))
|
|
|
|
|
#define GIMP_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CANVAS, GimpCanvasClass))
|
|
|
|
|
#define GIMP_IS_CANVAS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_CANVAS))
|
|
|
|
|
#define GIMP_IS_CANVAS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CANVAS))
|
|
|
|
|
#define GIMP_CANVAS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_CANVAS, GimpCanvasClass))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _GimpCanvasClass GimpCanvasClass;
|
|
|
|
|
|
|
|
|
|
struct _GimpCanvas
|
|
|
|
|
{
|
2009-10-18 13:19:29 -07:00
|
|
|
GimpOverlayBox parent_instance;
|
2003-11-09 15:24:40 -08:00
|
|
|
|
2008-03-18 13:24:49 -07:00
|
|
|
GimpDisplayConfig *config;
|
|
|
|
|
PangoLayout *layout;
|
2003-11-09 15:24:40 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct _GimpCanvasClass
|
|
|
|
|
{
|
2009-10-18 13:19:29 -07:00
|
|
|
GimpOverlayBoxClass parent_class;
|
2003-11-09 15:24:40 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2010-10-02 17:39:04 -07:00
|
|
|
GType gimp_canvas_get_type (void) G_GNUC_CONST;
|
2010-09-24 12:03:51 -07:00
|
|
|
|
2010-10-02 17:39:04 -07:00
|
|
|
GtkWidget * gimp_canvas_new (GimpDisplayConfig *config);
|
2010-09-24 12:03:51 -07:00
|
|
|
|
2010-10-02 17:39:04 -07:00
|
|
|
PangoLayout * gimp_canvas_get_layout (GimpCanvas *canvas,
|
|
|
|
|
const gchar *format,
|
|
|
|
|
...) G_GNUC_PRINTF (2, 3);
|
2010-09-24 12:03:51 -07:00
|
|
|
|
2010-10-02 17:39:04 -07:00
|
|
|
void gimp_canvas_set_bg_color (GimpCanvas *canvas,
|
|
|
|
|
GimpRGB *color);
|
2003-11-09 15:24:40 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __GIMP_CANVAS_H__ */
|