20
by Neil J. Patel
* Added the drag drop bits and pieces |
1 |
/* tidy-list-view.h: List actor
|
2 |
*
|
|
3 |
* Copyright (C) 2007 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: Emmanuele Bassi <ebassi@openedhand.com>
|
|
21 |
*/
|
|
22 |
||
23 |
#ifndef __TIDY_LIST_VIEW_H__
|
|
24 |
#define __TIDY_LIST_VIEW_H__
|
|
25 |
||
26 |
#include <clutter/clutter-actor.h> |
|
27 |
#include <clutter/clutter-model.h> |
|
28 |
||
29 |
#include <tidy/tidy-actor.h> |
|
30 |
#include <tidy/tidy-list-column.h> |
|
31 |
||
32 |
G_BEGIN_DECLS
|
|
33 |
||
34 |
#define TIDY_TYPE_LIST_VIEW (tidy_list_view_get_type ())
|
|
35 |
#define TIDY_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TIDY_TYPE_LIST_VIEW, TidyListView))
|
|
36 |
#define TIDY_IS_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TIDY_TYPE_LIST_VIEW))
|
|
37 |
#define TIDY_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TIDY_TYPE_LIST_VIEW, TidyListViewClass))
|
|
38 |
#define TIDY_IS_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TIDY_TYPE_LIST_VIEW))
|
|
39 |
#define TIDY_LIST_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TIDY_TYPE_LIST_VIEW, TidyListViewClass))
|
|
40 |
||
41 |
typedef struct _TidyListView TidyListView; |
|
42 |
typedef struct _TidyListViewPrivate TidyListViewPrivate; |
|
43 |
typedef struct _TidyListViewClass TidyListViewClass; |
|
44 |
||
45 |
struct _TidyListView |
|
46 |
{
|
|
47 |
TidyActor parent_instance; |
|
48 |
||
49 |
TidyListViewPrivate *priv; |
|
50 |
};
|
|
51 |
||
52 |
struct _TidyListViewClass |
|
53 |
{
|
|
54 |
TidyActorClass parent_class; |
|
55 |
||
56 |
/* vfuncs, not signals */
|
|
57 |
TidyListColumn *(* create_column) (TidyListView *list_view, |
|
58 |
guint model_id); |
|
59 |
||
60 |
/* signals */
|
|
61 |
void (* row_clicked) (TidyListView *list_view, |
|
62 |
ClutterModel *model, |
|
63 |
ClutterModelIter *iter); |
|
64 |
};
|
|
65 |
||
66 |
GType tidy_list_view_get_type (void) G_GNUC_CONST; |
|
67 |
||
68 |
ClutterActor * tidy_list_view_new (ClutterModel *model); |
|
69 |
||
70 |
void tidy_list_view_set_model (TidyListView *view, |
|
71 |
ClutterModel *model); |
|
72 |
ClutterModel * tidy_list_view_get_model (TidyListView *view); |
|
73 |
||
74 |
gint tidy_list_view_add_column (TidyListView *view, |
|
75 |
TidyListColumn *column); |
|
76 |
TidyListColumn *tidy_list_view_get_column (TidyListView *view, |
|
77 |
gint column_id); |
|
78 |
||
79 |
void tidy_list_view_set_show_headers (TidyListView *view, |
|
80 |
gboolean show_headers); |
|
81 |
gboolean tidy_list_view_get_show_headers (TidyListView *view); |
|
82 |
void tidy_list_view_set_rules_hint (TidyListView *view, |
|
83 |
gboolean rules_hint); |
|
84 |
gboolean tidy_list_view_get_rules_hint (TidyListView *view); |
|
85 |
||
86 |
gint tidy_list_view_get_row_at_pos (TidyListView *view, |
|
87 |
gint x_coord, |
|
88 |
gint y_coord); |
|
89 |
||
90 |
G_END_DECLS
|
|
91 |
||
92 |
#endif /* __TIDY_LIST_VIEW_H__ */ |