1 | /* |
2 | * Copyright © 2019 Benjamin Otte |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Lesser General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2.1 of the License, or (at your option) any later version. |
8 | * |
9 | * This library 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 | * Lesser 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 library. If not, see <http://www.gnu.org/licenses/>. |
16 | * |
17 | * Authors: Benjamin Otte <otte@gnome.org> |
18 | */ |
19 | |
20 | #ifndef __GTK_COLUMN_VIEW_H__ |
21 | #define __GTK_COLUMN_VIEW_H__ |
22 | |
23 | #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
24 | #error "Only <gtk/gtk.h> can be included directly." |
25 | #endif |
26 | |
27 | #include <gtk/gtktypes.h> |
28 | #include <gtk/gtksortlistmodel.h> |
29 | #include <gtk/gtkselectionmodel.h> |
30 | #include <gtk/gtksorter.h> |
31 | |
32 | G_BEGIN_DECLS |
33 | |
34 | #define GTK_TYPE_COLUMN_VIEW (gtk_column_view_get_type ()) |
35 | #define GTK_COLUMN_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_COLUMN_VIEW, GtkColumnView)) |
36 | #define GTK_COLUMN_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_COLUMN_VIEW, GtkColumnViewClass)) |
37 | #define GTK_IS_COLUMN_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_COLUMN_VIEW)) |
38 | #define GTK_IS_COLUMN_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_COLUMN_VIEW)) |
39 | #define GTK_COLUMN_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_COLUMN_VIEW, GtkColumnViewClass)) |
40 | |
41 | |
42 | typedef struct _GtkColumnView GtkColumnView; |
43 | typedef struct _GtkColumnViewClass GtkColumnViewClass; |
44 | /* forward declaration */ |
45 | typedef struct _GtkColumnViewColumn GtkColumnViewColumn; |
46 | |
47 | GDK_AVAILABLE_IN_ALL |
48 | GType gtk_column_view_get_type (void) G_GNUC_CONST; |
49 | |
50 | GDK_AVAILABLE_IN_ALL |
51 | GtkWidget * gtk_column_view_new (GtkSelectionModel *model); |
52 | |
53 | GDK_AVAILABLE_IN_ALL |
54 | GListModel * gtk_column_view_get_columns (GtkColumnView *self); |
55 | GDK_AVAILABLE_IN_ALL |
56 | void gtk_column_view_append_column (GtkColumnView *self, |
57 | GtkColumnViewColumn *column); |
58 | GDK_AVAILABLE_IN_ALL |
59 | void gtk_column_view_remove_column (GtkColumnView *self, |
60 | GtkColumnViewColumn *column); |
61 | GDK_AVAILABLE_IN_ALL |
62 | void gtk_column_view_insert_column (GtkColumnView *self, |
63 | guint position, |
64 | GtkColumnViewColumn *column); |
65 | |
66 | GDK_AVAILABLE_IN_ALL |
67 | GtkSelectionModel * |
68 | gtk_column_view_get_model (GtkColumnView *self); |
69 | GDK_AVAILABLE_IN_ALL |
70 | void gtk_column_view_set_model (GtkColumnView *self, |
71 | GtkSelectionModel *model); |
72 | |
73 | GDK_AVAILABLE_IN_ALL |
74 | gboolean gtk_column_view_get_show_row_separators (GtkColumnView *self); |
75 | GDK_AVAILABLE_IN_ALL |
76 | void gtk_column_view_set_show_row_separators (GtkColumnView *self, |
77 | gboolean show_row_separators); |
78 | |
79 | GDK_AVAILABLE_IN_ALL |
80 | gboolean gtk_column_view_get_show_column_separators (GtkColumnView *self); |
81 | GDK_AVAILABLE_IN_ALL |
82 | void gtk_column_view_set_show_column_separators (GtkColumnView *self, |
83 | gboolean show_column_separators); |
84 | |
85 | GDK_AVAILABLE_IN_ALL |
86 | GtkSorter * gtk_column_view_get_sorter (GtkColumnView *self); |
87 | |
88 | GDK_AVAILABLE_IN_ALL |
89 | void gtk_column_view_sort_by_column (GtkColumnView *self, |
90 | GtkColumnViewColumn *column, |
91 | GtkSortType direction); |
92 | |
93 | GDK_AVAILABLE_IN_ALL |
94 | void gtk_column_view_set_single_click_activate (GtkColumnView *self, |
95 | gboolean single_click_activate); |
96 | GDK_AVAILABLE_IN_ALL |
97 | gboolean gtk_column_view_get_single_click_activate (GtkColumnView *self); |
98 | |
99 | GDK_AVAILABLE_IN_ALL |
100 | |
101 | void gtk_column_view_set_reorderable (GtkColumnView *self, |
102 | gboolean reorderable); |
103 | GDK_AVAILABLE_IN_ALL |
104 | gboolean gtk_column_view_get_reorderable (GtkColumnView *self); |
105 | |
106 | GDK_AVAILABLE_IN_ALL |
107 | void gtk_column_view_set_enable_rubberband (GtkColumnView *self, |
108 | gboolean enable_rubberband); |
109 | GDK_AVAILABLE_IN_ALL |
110 | gboolean gtk_column_view_get_enable_rubberband (GtkColumnView *self); |
111 | |
112 | G_END_DECLS |
113 | |
114 | #endif /* __GTK_COLUMN_VIEW_H__ */ |
115 | |