2
* Copyright (c) 2011 Red Hat, Inc.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or (at your
7
* option) any later version.
9
* This program 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
12
* License for more details.
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
* Author: Cosimo Cecchi <cosimoc@redhat.com>
22
#ifndef __GD_MAIN_VIEW_GENERIC_H__
23
#define __GD_MAIN_VIEW_GENERIC_H__
25
#include <glib-object.h>
34
GD_MAIN_COLUMN_PRIMARY_TEXT,
35
GD_MAIN_COLUMN_SECONDARY_TEXT,
38
GD_MAIN_COLUMN_SELECTED,
43
#define GD_TYPE_MAIN_VIEW_GENERIC gd_main_view_generic_get_type()
45
#define GD_MAIN_VIEW_GENERIC(obj) \
46
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
47
GD_TYPE_MAIN_VIEW_GENERIC, GdMainViewGeneric))
49
#define GD_MAIN_VIEW_GENERIC_CLASS(klass) \
50
(G_TYPE_CHECK_CLASS_CAST ((klass), \
51
GD_TYPE_MAIN_VIEW_GENERIC, GdMainViewGenericIface))
53
#define GD_IS_MAIN_VIEW_GENERIC(obj) \
54
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
55
GD_TYPE_MAIN_VIEW_GENERIC))
57
#define GD_IS_MAIN_VIEW_GENERIC_CLASS(klass) \
58
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
59
GD_TYPE_MAIN_VIEW_GENERIC))
61
#define GD_MAIN_VIEW_GENERIC_GET_IFACE(obj) \
62
(G_TYPE_INSTANCE_GET_INTERFACE ((obj), \
63
GD_TYPE_MAIN_VIEW_GENERIC, GdMainViewGenericIface))
65
typedef struct _GdMainViewGeneric GdMainViewGeneric;
66
typedef struct _GdMainViewGenericIface GdMainViewGenericIface;
68
struct _GdMainViewGenericIface
70
GTypeInterface base_iface;
73
void (* set_model) (GdMainViewGeneric *self,
76
GtkTreePath * (* get_path_at_pos) (GdMainViewGeneric *self,
79
void (* scroll_to_path) (GdMainViewGeneric *self,
81
void (* set_selection_mode) (GdMainViewGeneric *self,
82
gboolean selection_mode);
85
GType gd_main_view_generic_get_type (void) G_GNUC_CONST;
87
void gd_main_view_generic_set_model (GdMainViewGeneric *self,
90
void gd_main_view_generic_scroll_to_path (GdMainViewGeneric *self,
92
void gd_main_view_generic_set_selection_mode (GdMainViewGeneric *self,
93
gboolean selection_mode);
94
GtkTreePath * gd_main_view_generic_get_path_at_pos (GdMainViewGeneric *self,
99
void _gd_main_view_generic_dnd_common (GtkTreeModel *model,
100
gboolean selection_mode,
102
GtkSelectionData *data);
106
#endif /* __GD_MAIN_VIEW_GENERIC_H__ */