792a9f8d4d3f030da4dad1bfb38bfbf2c665a714
[clutter-gtk] / clutter-gtk / gtk-clutter-viewport.h
1 /* gtk-clutter-viewport.h: Scrollable actor
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 see <http://www.fsf.org/licensing>.
17  *
18  * Authors:
19  *   Emmanuele Bassi  <ebassi@linux.intel.com>
20  */
21
22 #if !defined(__CLUTTER_GTK_H_INSIDE__) && !defined(CLUTTER_GTK_COMPILATION)
23 #error "Only <clutter-gtk/clutter-gtk.h> can be included directly."
24 #endif
25
26 #ifndef __GTK_CLUTTER_VIEWPORT_H__
27 #define __GTK_CLUTTER_VIEWPORT_H__
28
29 #include <gtk/gtk.h>
30 #include <clutter/clutter.h>
31
32 G_BEGIN_DECLS
33
34 #define GTK_TYPE_CLUTTER_VIEWPORT               (gtk_clutter_viewport_get_type ())
35 #define GTK_CLUTTER_VIEWPORT(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CLUTTER_VIEWPORT, GtkClutterViewport))
36 #define GTK_IS_CLUTTER_VIEWPORT(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CLUTTER_VIEWPORT))
37 #define GTK_CLUTTER_VIEWPORT_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_CLUTTER_VIEWPORT, GtkClutterViewportClass))
38 #define GTK_IS_CLUTTER_VIEWPORT_CLASS(klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CLUTTER_VIEWPORT))
39 #define GTK_CLUTTER_VIEWPORT_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_CLUTTER_VIEWPORT, GtkClutterViewportClass))
40
41 typedef struct _GtkClutterViewport              GtkClutterViewport;
42 typedef struct _GtkClutterViewportPrivate       GtkClutterViewportPrivate;
43 typedef struct _GtkClutterViewportClass         GtkClutterViewportClass;
44
45 /**
46  * GtkClutterViewport:
47  *
48  * The #GtkClutterViewport structure contains only private data and
49  * should be accessed using the provided functions.
50  *
51  * Since: 0.8.2
52  */
53 struct _GtkClutterViewport
54 {
55   /*< private >*/
56   ClutterActor parent_instance;
57
58   GtkClutterViewportPrivate *priv;
59 };
60
61 /**
62  * GtkClutterViewportClass:
63  *
64  * The #GtkClutterViewportClass structure contains only private data and
65  * should be accessed using the provided functions.
66  *
67  * Since: 0.8.2
68  */
69 struct _GtkClutterViewportClass
70 {
71   /*< private >*/
72   ClutterActorClass parent_class;
73 };
74
75 GType gtk_clutter_viewport_get_type (void) G_GNUC_CONST;
76
77 ClutterActor *gtk_clutter_viewport_new         (GtkAdjustment      *h_adjust,
78                                                 GtkAdjustment      *v_adjust);
79
80 void          gtk_clutter_viewport_get_origin  (GtkClutterViewport *viewport,
81                                                 gfloat             *x,
82                                                 gfloat             *y,
83                                                 gfloat             *z);
84
85 G_END_DECLS
86
87 #endif /* __GTK_CLUTTER_VIEWPORT_H__ */