| 1 |
/* champlain-viewport.h: Viewport actor |
| 2 |
* |
| 3 |
* Copyright (C) 2008 OpenedHand |
| 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 |
* Written by: Chris Lord <chris@openedhand.com> |
| 21 |
*/ |
| 22 |
|
| 23 |
#ifndef __CHAMPLAIN_VIEWPORT_H__ |
| 24 |
#define __CHAMPLAIN_VIEWPORT_H__ |
| 25 |
|
| 26 |
#include <glib-object.h> |
| 27 |
#include <clutter/clutter.h> |
| 28 |
#include "champlain-adjustment.h" |
| 29 |
|
| 30 |
G_BEGIN_DECLS |
| 31 |
|
| 32 |
#define CHAMPLAIN_TYPE_VIEWPORT champlain_viewport_get_type () |
| 33 |
|
| 34 |
#define CHAMPLAIN_VIEWPORT(obj) \ |
| 35 |
(G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_VIEWPORT, ChamplainViewport)) |
| 36 |
|
| 37 |
#define CHAMPLAIN_IS_VIEWPORT(obj) \ |
| 38 |
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_VIEWPORT)) |
| 39 |
|
| 40 |
#define CHAMPLAIN_VIEWPORT_CLASS(klass) \ |
| 41 |
(G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_VIEWPORT, ChamplainViewportClass)) |
| 42 |
|
| 43 |
#define CHAMPLAIN_IS_VIEWPORT_CLASS(klass) \ |
| 44 |
(G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_VIEWPORT)) |
| 45 |
|
| 46 |
#define CHAMPLAIN_VIEWPORT_GET_CLASS(obj) \ |
| 47 |
(G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_VIEWPORT, ChamplainViewportClass)) |
| 48 |
|
| 49 |
typedef struct _ChamplainViewport ChamplainViewport; |
| 50 |
typedef struct _ChamplainViewportPrivate ChamplainViewportPrivate; |
| 51 |
typedef struct _ChamplainViewportClass ChamplainViewportClass; |
| 52 |
|
| 53 |
struct _ChamplainViewport |
| 54 |
{ |
| 55 |
ClutterActor parent; |
| 56 |
|
| 57 |
ChamplainViewportPrivate *priv; |
| 58 |
}; |
| 59 |
|
| 60 |
struct _ChamplainViewportClass |
| 61 |
{ |
| 62 |
ClutterActorClass parent_class; |
| 63 |
}; |
| 64 |
|
| 65 |
GType champlain_viewport_get_type (void) G_GNUC_CONST; |
| 66 |
|
| 67 |
ClutterActor *champlain_viewport_new (void); |
| 68 |
|
| 69 |
void champlain_viewport_set_origin (ChamplainViewport *viewport, |
| 70 |
float x, |
| 71 |
float y); |
| 72 |
|
| 73 |
void champlain_viewport_get_origin (ChamplainViewport *viewport, |
| 74 |
gfloat *x, |
| 75 |
gfloat *y); |
| 76 |
void champlain_viewport_stop (ChamplainViewport *viewport); |
| 77 |
|
| 78 |
void champlain_viewport_get_adjustments (ChamplainViewport *viewport, |
| 79 |
ChamplainAdjustment **hadjustment, |
| 80 |
ChamplainAdjustment **vadjustment); |
| 81 |
|
| 82 |
void champlain_viewport_set_adjustments (ChamplainViewport *viewport, |
| 83 |
ChamplainAdjustment *hadjustment, |
| 84 |
ChamplainAdjustment *vadjustment); |
| 85 |
|
| 86 |
void champlain_viewport_set_child (ChamplainViewport *viewport, |
| 87 |
ClutterActor *child); |
| 88 |
|
| 89 |
G_END_DECLS |
| 90 |
|
| 91 |
#endif /* __CHAMPLAIN_VIEWPORT_H__ */ |