Adding cursor example program
[platform/upstream/evolution-data-server.git] / tests / cursor-example / cursor-navigator.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2013 Intel Corporation
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of version 2 of the GNU Lesser General Public
7  * License as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  *
19  * Author: Tristan Van Berkom <tristanvb@openismus.com>
20  */
21  
22 #ifndef CURSOR_NAVIGATOR_H
23 #define CURSOR_NAVIGATOR_H
24
25 #include <gtk/gtk.h>
26
27 G_BEGIN_DECLS
28
29 #define CURSOR_TYPE_NAVIGATOR            (cursor_navigator_get_type())
30 #define CURSOR_NAVIGATOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), CURSOR_TYPE_NAVIGATOR, CursorNavigator))
31 #define CURSOR_NAVIGATOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), CURSOR_TYPE_NAVIGATOR, CursorNavigatorClass))
32 #define CURSOR_IS_NAVIGATOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CURSOR_TYPE_NAVIGATOR))
33 #define CURSOR_IS_NAVIGATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CURSOR_TYPE_NAVIGATOR))
34 #define CURSOR_NAVIGATOR_GET_CLASS(o)    (G_TYPE_INSTANCE_GET_CLASS ((o), CURSOR_NAVIGATOR, CursorNavigatorClass))
35
36 typedef struct _CursorNavigator         CursorNavigator;
37 typedef struct _CursorNavigatorPrivate  CursorNavigatorPrivate;
38 typedef struct _CursorNavigatorClass    CursorNavigatorClass;
39
40 struct _CursorNavigator
41 {
42         GtkScale parent_instance;
43
44         CursorNavigatorPrivate *priv;
45 };
46
47 struct _CursorNavigatorClass
48 {
49         GtkScaleClass parent_class;
50 };
51
52 GType                cursor_navigator_get_type        (void) G_GNUC_CONST;
53 CursorNavigator     *cursor_navigator_new             (void);
54 void                 cursor_navigator_set_alphabet    (CursorNavigator     *navigator,
55                                                        const gchar * const *alphabet);
56 const gchar * const *cursor_navigator_get_alphabet    (CursorNavigator     *navigator);
57 void                 cursor_navigator_set_index       (CursorNavigator     *navigator,
58                                                        gint                 index);
59 gint                 cursor_navigator_get_index       (CursorNavigator     *navigator);
60
61 G_END_DECLS
62
63 #endif /* CURSOR_NAVIGATOR_H */