champlain-kinetic-scroll-view.h 2.67 KB
Newer Older
1 2 3
/* champlain-kinetic-scroll-view.h: Finger scrolling container actor
 *
 * Copyright (C) 2008 OpenedHand
4
 * Copyright (C) 2011-2013 Jiri Techet <techet@gmail.com>
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Written by: Chris Lord <chris@openedhand.com>
 */

#ifndef __CHAMPLAIN_KINETIC_SCROLL_VIEW_H__
#define __CHAMPLAIN_KINETIC_SCROLL_VIEW_H__

#include <glib-object.h>
#include <clutter/clutter.h>
Jiří Techet's avatar
Jiří Techet committed
29
#include <champlain/champlain-viewport.h>
30 31 32

G_BEGIN_DECLS

33
#define CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW champlain_kinetic_scroll_view_get_type ()
34

35 36 37 38 39 40 41 42 43 44 45 46 47 48
#define CHAMPLAIN_KINETIC_SCROLL_VIEW(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW, ChamplainKineticScrollView))

#define CHAMPLAIN_IS_KINETIC_SCROLL_VIEW(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW))

#define CHAMPLAIN_KINETIC_SCROLL_VIEW_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST ((klass), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW, ChamplainKineticScrollViewClass))

#define CHAMPLAIN_IS_KINETIC_SCROLL_VIEW_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE ((klass), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW))

#define CHAMPLAIN_KINETIC_SCROLL_VIEW_GET_CLASS(obj) \
  (G_TYPE_INSTANCE_GET_CLASS ((obj), CHAMPLAIN_TYPE_KINETIC_SCROLL_VIEW, ChamplainKineticScrollViewClass))
49

Jiří Techet's avatar
Jiří Techet committed
50 51 52
typedef struct _ChamplainKineticScrollView ChamplainKineticScrollView;
typedef struct _ChamplainKineticScrollViewPrivate ChamplainKineticScrollViewPrivate;
typedef struct _ChamplainKineticScrollViewClass ChamplainKineticScrollViewClass;
53 54 55 56 57

struct _ChamplainKineticScrollView
{
  /*< private >*/
  ClutterActor parent_instance;
Jiří Techet's avatar
Jiří Techet committed
58

59 60 61 62 63 64 65 66 67 68
  ChamplainKineticScrollViewPrivate *priv;
};

struct _ChamplainKineticScrollViewClass
{
  ClutterActorClass parent_class;
};

GType champlain_kinetic_scroll_view_get_type (void) G_GNUC_CONST;

69
ClutterActor *champlain_kinetic_scroll_view_new (gboolean kinetic,
Jiří Techet's avatar
Jiří Techet committed
70
    ChamplainViewport *viewport);
71

72
void champlain_kinetic_scroll_view_stop (ChamplainKineticScrollView *self);
73 74 75 76

G_END_DECLS

#endif /* __CHAMPLAIN_KINETIC_SCROLL_VIEW_H__ */