e42695b347a16ceeb3ae69124983be30c37a6291
[clutter-gtk] / clutter-gtk / gtk-clutter-scrollable.h
1 /* gtk-clutter-scrollable.h: Interface for scrollable actors
2  *
3  * Copyright (C) 2008  Intel Corp.
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
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but 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
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  *
20  * Author:
21  *   Emmanuele Bassi <ebassi@linux.intel.com>
22  *
23  * Based on similar code by:
24  *   Chris Lord <chris@openedhand.com>
25  */
26
27 #if !defined(__CLUTTER_GTK_H_INSIDE__) && !defined(CLUTTER_GTK_COMPILATION)
28 #error "Only <clutter-gtk/clutter-gtk.h> can be included directly."
29 #endif
30
31 #ifndef __GTK_CLUTTER_SCROLLABLE_H__
32 #define __GTK_CLUTTER_SCROLLABLE_H__
33
34 #include <glib-object.h>
35 #include <gtk/gtk.h>
36
37 G_BEGIN_DECLS
38
39 #define GTK_CLUTTER_TYPE_SCROLLABLE             (gtk_clutter_scrollable_get_type ())
40 #define GTK_CLUTTER_SCROLLABLE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_CLUTTER_TYPE_SCROLLABLE, GtkClutterScrollable))
41 #define GTK_CLUTTER_IS_SCROLLABLE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_CLUTTER_TYPE_SCROLLABLE))
42 #define GTK_CLUTTER_SCROLLABLE_GET_IFACE(obj)   (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_CLUTTER_TYPE_SCROLLABLE, GtkClutterScrollableIface))
43
44 typedef struct _GtkClutterScrollable            GtkClutterScrollable; /* dummy */
45 typedef struct _GtkClutterScrollableIface       GtkClutterScrollableIface;
46
47 /**
48  * GtkClutterScrollableIface:
49  * @set_adjustments: virtual function for setting the horizontal
50  *   and vertical adjustments of a #GtkClutterScrollable
51  * @get_adjustments: virtual function for retrieving the horizontal
52  *   and vertical adjustments of a #GtkClutterScrollable
53  *
54  * The #GtkClutterScrollableIface structure contains only private data
55  * and should be accessed using the provided functions.
56  *
57  * Since: 0.8.2
58  */
59 struct _GtkClutterScrollableIface
60 {
61   /*< private >*/
62   GTypeInterface parent_iface;
63
64   /*< public >*/
65   void (* set_adjustments) (GtkClutterScrollable  *scrollable,
66                             GtkAdjustment         *h_adjust,
67                             GtkAdjustment         *v_adjust);
68   void (* get_adjustments) (GtkClutterScrollable  *scrollable,
69                             GtkAdjustment        **h_adjust,
70                             GtkAdjustment        **v_adjust);
71 };
72
73 GType gtk_clutter_scrollable_get_type (void) G_GNUC_CONST;
74
75 void gtk_clutter_scrollable_set_adjustments (GtkClutterScrollable  *scrollable,
76                                              GtkAdjustment         *h_adjust,
77                                              GtkAdjustment         *v_adjust);
78 void gtk_clutter_scrollable_get_adjustments (GtkClutterScrollable  *scrollable,
79                                              GtkAdjustment        **h_adjust,
80                                              GtkAdjustment        **v_adjust);
81
82 G_END_DECLS
83
84 #endif /* __GTK_CLUTTER_SCROLLABLE_H__ */