2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2003-11-10 07:24:40 +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-11-10 07:24:40 +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-11-10 07: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-12 05:27:07 +08:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2003-11-10 07:24:40 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GIMP_CANVAS_H__
|
|
|
|
#define __GIMP_CANVAS_H__
|
|
|
|
|
|
|
|
|
2009-10-19 04:19:29 +08:00
|
|
|
#include "widgets/gimpoverlaybox.h"
|
|
|
|
|
|
|
|
|
2010-09-25 03:03:51 +08:00
|
|
|
#define GIMP_CANVAS_EVENT_MASK (GDK_EXPOSURE_MASK | \
|
2010-10-03 08:39:04 +08:00
|
|
|
GDK_POINTER_MOTION_MASK | \
|
|
|
|
GDK_BUTTON_PRESS_MASK | \
|
|
|
|
GDK_BUTTON_RELEASE_MASK | \
|
2018-05-11 05:43:36 +08:00
|
|
|
GDK_SCROLL_MASK | \
|
2018-05-11 08:08:51 +08:00
|
|
|
GDK_SMOOTH_SCROLL_MASK | \
|
2021-01-27 04:14:45 +08:00
|
|
|
GDK_TOUCHPAD_GESTURE_MASK | \
|
2010-10-03 08:39:04 +08:00
|
|
|
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-25 03:03:51 +08:00
|
|
|
GDK_PROXIMITY_OUT_MASK)
|
2003-11-11 22:50:07 +08:00
|
|
|
|
|
|
|
|
2003-11-10 07: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
|
|
|
|
{
|
2018-05-24 04:46:54 +08:00
|
|
|
GimpOverlayBox parent_instance;
|
2003-11-10 07:24:40 +08:00
|
|
|
|
2018-05-24 04:46:54 +08:00
|
|
|
GimpDisplayConfig *config;
|
|
|
|
PangoLayout *layout;
|
|
|
|
|
|
|
|
GimpCanvasPaddingMode padding_mode;
|
2023-11-21 04:38:11 +08:00
|
|
|
GeglColor *padding_color;
|
2003-11-10 07:24:40 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GimpCanvasClass
|
|
|
|
{
|
2009-10-19 04:19:29 +08:00
|
|
|
GimpOverlayBoxClass parent_class;
|
2003-11-10 07:24:40 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-10-03 08:39:04 +08:00
|
|
|
GType gimp_canvas_get_type (void) G_GNUC_CONST;
|
2010-09-25 03:03:51 +08:00
|
|
|
|
2018-05-24 04:46:54 +08:00
|
|
|
GtkWidget * gimp_canvas_new (GimpDisplayConfig *config);
|
2010-09-25 03:03:51 +08:00
|
|
|
|
2018-05-24 04:46:54 +08:00
|
|
|
PangoLayout * gimp_canvas_get_layout (GimpCanvas *canvas,
|
|
|
|
const gchar *format,
|
2010-10-03 08:39:04 +08:00
|
|
|
...) G_GNUC_PRINTF (2, 3);
|
2010-09-25 03:03:51 +08:00
|
|
|
|
2018-05-24 04:46:54 +08:00
|
|
|
void gimp_canvas_set_padding (GimpCanvas *canvas,
|
|
|
|
GimpCanvasPaddingMode padding_mode,
|
2023-11-21 04:38:11 +08:00
|
|
|
GeglColor *padding_color);
|
2003-11-10 07:24:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
#endif /* __GIMP_CANVAS_H__ */
|