1
/* Copyright 2006, 2007, 2008, Soren Sandmann <sandmann@daimi.au.dk>
3
* This library is free software; you can redistribute it and/or
4
* modify it under the terms of the GNU Lesser General Public
5
* License as published by the Free Software Foundation; either
6
* version 2 of the License, or (at your option) any later version.
8
* This library is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public
14
* License along with this library; if not, write to the
15
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16
* Boston, MA 02111-1307, USA.
21
#define FOO_TYPE_SCROLL_AREA (foo_scroll_area_get_type ())
22
#define FOO_SCROLL_AREA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FOO_TYPE_SCROLL_AREA, FooScrollArea))
23
#define FOO_SCROLL_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOO_TYPE_SCROLL_AREA, FooScrollAreaClass))
24
#define FOO_IS_SCROLL_AREA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FOO_TYPE_SCROLL_AREA))
25
#define FOO_IS_SCROLL_AREA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOO_TYPE_SCROLL_AREA))
26
#define FOO_SCROLL_AREA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOO_TYPE_SCROLL_AREA, FooScrollAreaClass))
28
typedef struct FooScrollArea FooScrollArea;
29
typedef struct FooScrollAreaClass FooScrollAreaClass;
30
typedef struct FooScrollAreaPrivate FooScrollAreaPrivate;
31
typedef struct FooScrollAreaEvent FooScrollAreaEvent;
38
} FooScrollAreaEventType;
40
struct FooScrollAreaEvent
42
FooScrollAreaEventType type;
47
typedef void (* FooScrollAreaEventFunc) (FooScrollArea *area,
48
FooScrollAreaEvent *event,
53
GtkContainer parent_instance;
55
FooScrollAreaPrivate *priv;
58
struct FooScrollAreaClass
60
GtkContainerClass parent_class;
62
void (*set_scroll_adjustments) (FooScrollArea *scroll_area,
63
GtkAdjustment *hadjustment,
64
GtkAdjustment *vadjustment);
66
void (*viewport_changed) (FooScrollArea *scroll_area,
67
GdkRectangle *old_viewport,
68
GdkRectangle *new_viewport);
70
void (*paint) (FooScrollArea *scroll_area,
72
GdkRectangle *extents,
76
GType foo_scroll_area_get_type (void);
78
FooScrollArea *foo_scroll_area_new (void);
80
/* Set the requisition for the widget. */
81
void foo_scroll_area_set_min_size (FooScrollArea *scroll_area,
85
/* Set how much of the canvas can be scrolled into view */
86
void foo_scroll_area_set_size (FooScrollArea *scroll_area,
89
void foo_scroll_area_set_size_fixed_y (FooScrollArea *scroll_area,
94
void foo_scroll_area_set_viewport_pos (FooScrollArea *scroll_area,
97
void foo_scroll_area_get_viewport (FooScrollArea *scroll_area,
98
GdkRectangle *viewport);
99
void foo_scroll_area_add_input_from_stroke (FooScrollArea *scroll_area,
101
FooScrollAreaEventFunc func,
103
void foo_scroll_area_add_input_from_fill (FooScrollArea *scroll_area,
105
FooScrollAreaEventFunc func,
107
void foo_scroll_area_invalidate_region (FooScrollArea *area,
109
void foo_scroll_area_invalidate (FooScrollArea *scroll_area);
110
void foo_scroll_area_invalidate_rect (FooScrollArea *scroll_area,
115
void foo_scroll_area_begin_grab (FooScrollArea *scroll_area,
116
FooScrollAreaEventFunc func,
117
gpointer input_data);
118
void foo_scroll_area_end_grab (FooScrollArea *scroll_area);
119
gboolean foo_scroll_area_is_grabbed (FooScrollArea *scroll_area);
121
void foo_scroll_area_begin_auto_scroll (FooScrollArea *scroll_area);
122
void foo_scroll_area_auto_scroll (FooScrollArea *scroll_area,
123
FooScrollAreaEvent *event);
124
void foo_scroll_area_end_auto_scroll (FooScrollArea *scroll_area);