summaryrefslogtreecommitdiffstats
path: root/src/playground/grid/gdu-grid-view.h
blob: 5a6f4dc21d0d13fcd81c3d2c2266098ebe1ba036 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */

#ifndef __GDU_GRID_VIEW_H
#define __GDU_GRID_VIEW_H

#include "gdu-grid-types.h"

G_BEGIN_DECLS

#define GDU_TYPE_GRID_VIEW         gdu_grid_view_get_type()
#define GDU_GRID_VIEW(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GDU_TYPE_GRID_VIEW, GduGridView))
#define GDU_GRID_VIEW_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), GDU_TYPE_GRID_VIEW, GduGridViewClass))
#define GDU_IS_GRID_VIEW(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDU_TYPE_GRID_VIEW))
#define GDU_IS_GRID_VIEW_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GDU_TYPE_GRID_VIEW))
#define GDU_GRID_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDU_TYPE_GRID_VIEW, GduGridViewClass))

typedef struct GduGridViewClass   GduGridViewClass;
typedef struct GduGridViewPrivate GduGridViewPrivate;

struct GduGridView
{
        GtkVBox parent;

        /*< private >*/
        GduGridViewPrivate *priv;
};

struct GduGridViewClass
{
        GtkVBoxClass parent_class;

        /*< public >*/
        /* signals */
        void (*selection_changed) (GduGridView *view);
};

GType           gdu_grid_view_get_type         (void) G_GNUC_CONST;
GtkWidget      *gdu_grid_view_new              (GduPool        *pool);

gboolean        gdu_grid_view_is_selected      (GduGridView    *view,
                                                GduPresentable *presentable);
GList          *gdu_grid_view_selection_get    (GduGridView    *view);
void            gdu_grid_view_selection_add    (GduGridView    *view,
                                                GduPresentable *presentable);
void            gdu_grid_view_selection_remove (GduGridView    *view,
                                                GduPresentable *presentable);
void            gdu_grid_view_selection_clear  (GduGridView    *view);

G_END_DECLS

#endif /* __GDU_GRID_VIEW_H */