~kroq-gar78/ubuntu/precise/gnome-control-center/fix-885947

« back to all changes in this revision

Viewing changes to capplets/display/scrollarea.h

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya
  • Date: 2011-05-17 10:47:27 UTC
  • mfrom: (0.1.11 experimental) (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20110517104727-lqel6m8vhfw5jby1
Tags: 1:3.0.1.1-1ubuntu1
* Rebase on Debian, remaining Ubuntu changes:
* debian/control:
  - Build-Depend on hardening-wrapper, dpkg-dev and dh-autoreconf
  - Add dependency on ubuntu-system-service
  - Remove dependency on gnome-icon-theme-symbolic
  - Move dependency on apg, gnome-icon-theme-symbolic and accountsservice to
    be a Recommends: until we get them in main
* debian/rules:
  - Use autoreconf
  - Add binary-post-install rule for gnome-control-center-data
  - Run dh-autoreconf
* debian/gnome-control-center.dirs:
* debian/gnome-control-center.links:
  - Add a link to the control center shell for indicators
* debian/patches/00_disable-nm.patch:
  - Temporary patch to disable building with NetworkManager until we get
    the new one in the archive
* debian/patches/01_git_remove_gettext_calls.patch:
  - Remove calls to AM_GNU_GETTEXT, IT_PROG_INTLTOOL should be enough
* debian/patches/01_git_kill_warning.patch:
  - Kill warning
* debian/patches/50_ubuntu_systemwide_prefs.patch:
  - Ubuntu specific proxy preferences
* debian/patches/51_ubuntu_system_keyboard.patch:
  - Implement the global keyboard spec at https://wiki.ubuntu.com/DefaultKeyboardSettings

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright 2006, 2007, 2008, Soren Sandmann <sandmann@daimi.au.dk>
2
 
 *
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.
7
 
 *
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.
12
 
 *
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.
17
 
 */
18
 
#include <cairo.h>
19
 
#include <gtk/gtk.h>
20
 
 
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))
27
 
 
28
 
typedef struct FooScrollArea FooScrollArea;
29
 
typedef struct FooScrollAreaClass FooScrollAreaClass;
30
 
typedef struct FooScrollAreaPrivate FooScrollAreaPrivate;
31
 
typedef struct FooScrollAreaEvent FooScrollAreaEvent;
32
 
 
33
 
typedef enum
34
 
{
35
 
    FOO_BUTTON_PRESS,
36
 
    FOO_BUTTON_RELEASE,
37
 
    FOO_MOTION
38
 
} FooScrollAreaEventType;
39
 
 
40
 
struct FooScrollAreaEvent
41
 
{
42
 
    FooScrollAreaEventType      type;
43
 
    int                         x;
44
 
    int                         y;
45
 
};
46
 
 
47
 
typedef void (* FooScrollAreaEventFunc) (FooScrollArea      *area,
48
 
                                         FooScrollAreaEvent *event,
49
 
                                         gpointer            data);
50
 
 
51
 
struct FooScrollArea
52
 
{
53
 
    GtkContainer parent_instance;
54
 
 
55
 
    FooScrollAreaPrivate *priv;
56
 
};
57
 
 
58
 
struct FooScrollAreaClass
59
 
{
60
 
    GtkContainerClass parent_class;
61
 
 
62
 
    void (*set_scroll_adjustments) (FooScrollArea *scroll_area,
63
 
                                    GtkAdjustment *hadjustment,
64
 
                                    GtkAdjustment *vadjustment);
65
 
 
66
 
    void (*viewport_changed) (FooScrollArea *scroll_area,
67
 
                              GdkRectangle  *old_viewport,
68
 
                              GdkRectangle  *new_viewport);
69
 
 
70
 
    void (*paint) (FooScrollArea *scroll_area,
71
 
                   cairo_t       *cr,
72
 
                   GdkRectangle  *extents,
73
 
                   GdkRegion     *region);
74
 
};
75
 
 
76
 
GType foo_scroll_area_get_type (void);
77
 
 
78
 
FooScrollArea *foo_scroll_area_new (void);
79
 
 
80
 
/* Set the requisition for the widget. */
81
 
void          foo_scroll_area_set_min_size (FooScrollArea *scroll_area,
82
 
                                            int            min_width,
83
 
                                            int            min_height);
84
 
 
85
 
/* Set how much of the canvas can be scrolled into view */
86
 
void          foo_scroll_area_set_size (FooScrollArea          *scroll_area,
87
 
                                        int                     width,
88
 
                                        int                     height);
89
 
void          foo_scroll_area_set_size_fixed_y (FooScrollArea  *scroll_area,
90
 
                                                int             width,
91
 
                                                int             height,
92
 
                                                int             old_y,
93
 
                                                int             new_y);
94
 
void          foo_scroll_area_set_viewport_pos (FooScrollArea  *scroll_area,
95
 
                                                int             x,
96
 
                                                int             y);
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,
100
 
                                                     cairo_t                    *cr,
101
 
                                                     FooScrollAreaEventFunc   func,
102
 
                                                     gpointer                 data);
103
 
void          foo_scroll_area_add_input_from_fill (FooScrollArea *scroll_area,
104
 
                                                      cairo_t         *cr,
105
 
                                                      FooScrollAreaEventFunc func,
106
 
                                                      gpointer       data);
107
 
void          foo_scroll_area_invalidate_region (FooScrollArea *area,
108
 
                                                 GdkRegion     *region);
109
 
void          foo_scroll_area_invalidate (FooScrollArea *scroll_area);
110
 
void          foo_scroll_area_invalidate_rect (FooScrollArea *scroll_area,
111
 
                                               int            x,
112
 
                                               int            y,
113
 
                                               int            width,
114
 
                                               int            height);
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);
120
 
 
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);