root/gtkimageview/src/gtkiimagetool.h

Revision 143, 3.4 kB (checked in by bjourne, 6 years ago)

GtkImageView now delegates certain tasks to a GtkIImageTool
reference. The internal restruction work is huge, but the interface
should be mostly intact. See the release history page in the
documentation for more info.

Line 
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; coding: utf-8 -*-
2  *
3  * Copyright © 2007 Björn Lindqvist <bjourne@gmail.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public License
7  * as published by the Free Software Foundation; either version 2, or
8  * (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18  * 02111-1307, USA.
19  */
20 #ifndef __GTK_IIMAGE_TOOL_H__
21 #define __GTK_IIMAGE_TOOL_H__
22
23 #include <gdk/gdk.h>
24 #include <gtk/gtk.h>
25 #include "image_view_drawer.h"
26
27 G_BEGIN_DECLS
28
29 #define GTK_TYPE_IIMAGE_TOOL            (gtk_iimage_tool_get_type ())
30 #define GTK_IIMAGE_TOOL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IIMAGE_TOOL, GtkIImageTool))
31 #define GTK_IIMAGE_TOOL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_IIMAGE_TOOL, GtkIImageToolClass))
32 #define GTK_IS_IIMAGE_TOOL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IIMAGE_TOOL))
33 #define GTK_IS_IIMAGE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IIMAGE_TOOL))
34 #define GTK_IIMAGE_TOOL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_IIMAGE_TOOL, GtkIImageToolClass))
35
36 typedef struct _GtkIImageTool GtkIImageTool;
37 typedef struct _GtkIImageToolClass GtkIImageToolClass;
38
39 struct _GtkIImageToolClass
40 {
41     GTypeInterface parent;
42     gboolean       (*button_press)           (GtkIImageTool  *tool,
43                                               GdkEventButton *ev);
44     gboolean       (*button_release)         (GtkIImageTool  *tool,
45                                               GdkEventButton *ev);
46     gboolean       (*motion_notify)          (GtkIImageTool  *tool,
47                                               GdkEventMotion *ev);
48     GdkCursor*     (*get_default_cursor)     (GtkIImageTool  *tool);
49     void           (*pixbuf_changed)         (GtkIImageTool  *tool);
50     void           (*paint_image)            (GtkIImageTool  *tool,
51                                               DrawSettings   *ds,
52                                               GdkDrawable    *drawable);
53 };
54
55 GType         gtk_iimage_tool_get_type       (void) G_GNUC_CONST;
56
57
58 /* Pseudo signal handlers. */
59 gboolean      gtk_iimage_tool_button_press   (GtkIImageTool  *tool,
60                                               GdkEventButton *ev);
61 gboolean      gtk_iimage_tool_button_release (GtkIImageTool  *tool,
62                                               GdkEventButton *ev);
63 gboolean      gtk_iimage_tool_motion_notify  (GtkIImageTool  *tool,
64                                               GdkEventMotion *ev);
65 void          gtk_iimage_tool_pixbuf_changed (GtkIImageTool  *tool);
66 void          gtk_iimage_tool_paint_image    (GtkIImageTool  *tool,
67                                               DrawSettings   *ds,
68                                               GdkDrawable    *drawable);
69
70 /* Read-only properties. */
71 GdkCursor    *gtk_iimage_tool_get_default_cursor (GtkIImageTool *tool);
72
73 #endif
74
Note: See TracBrowser for help on using the browser.