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