1 | /* |
2 | * Copyright © 2018 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_LIST_ITEM_WIDGET_PRIVATE_H__ |
21 | #define __GTK_LIST_ITEM_WIDGET_PRIVATE_H__ |
22 | |
23 | #include "gtklistitemfactory.h" |
24 | #include "gtkwidget.h" |
25 | |
26 | G_BEGIN_DECLS |
27 | |
28 | #define GTK_TYPE_LIST_ITEM_WIDGET (gtk_list_item_widget_get_type ()) |
29 | #define GTK_LIST_ITEM_WIDGET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_LIST_ITEM_WIDGET, GtkListItemWidget)) |
30 | #define GTK_LIST_ITEM_WIDGET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_TYPE_LIST_ITEM_WIDGET, GtkListItemWidgetClass)) |
31 | #define GTK_IS_LIST_ITEM_WIDGET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_LIST_ITEM_WIDGET)) |
32 | #define GTK_IS_LIST_ITEM_WIDGET_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_LIST_ITEM_WIDGET)) |
33 | #define GTK_LIST_ITEM_WIDGET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_LIST_ITEM_WIDGET, GtkListItemWidgetClass)) |
34 | |
35 | typedef struct _GtkListItemWidget GtkListItemWidget; |
36 | typedef struct _GtkListItemWidgetClass GtkListItemWidgetClass; |
37 | |
38 | struct _GtkListItemWidget |
39 | { |
40 | GtkWidget parent_instance; |
41 | }; |
42 | |
43 | struct _GtkListItemWidgetClass |
44 | { |
45 | GtkWidgetClass parent_class; |
46 | |
47 | void (* activate_signal) (GtkListItemWidget *self); |
48 | }; |
49 | |
50 | GType gtk_list_item_widget_get_type (void) G_GNUC_CONST; |
51 | |
52 | GtkWidget * gtk_list_item_widget_new (GtkListItemFactory *factory, |
53 | const char *css_name, |
54 | GtkAccessibleRole role); |
55 | |
56 | void gtk_list_item_widget_update (GtkListItemWidget *self, |
57 | guint position, |
58 | gpointer item, |
59 | gboolean selected); |
60 | GtkListItem * gtk_list_item_widget_get_list_item (GtkListItemWidget *self); |
61 | |
62 | void gtk_list_item_widget_default_setup (GtkListItemWidget *self, |
63 | GtkListItem *list_item); |
64 | void gtk_list_item_widget_default_teardown (GtkListItemWidget *self, |
65 | GtkListItem *list_item); |
66 | void gtk_list_item_widget_default_update (GtkListItemWidget *self, |
67 | GtkListItem *list_item, |
68 | guint position, |
69 | gpointer item, |
70 | gboolean selected); |
71 | |
72 | void gtk_list_item_widget_set_factory (GtkListItemWidget *self, |
73 | GtkListItemFactory *factory); |
74 | void gtk_list_item_widget_set_single_click_activate |
75 | (GtkListItemWidget *self, |
76 | gboolean single_click_activate); |
77 | void gtk_list_item_widget_set_activatable (GtkListItemWidget *self, |
78 | gboolean activatable); |
79 | void gtk_list_item_widget_add_child (GtkListItemWidget *self, |
80 | GtkWidget *child); |
81 | void gtk_list_item_widget_reorder_child (GtkListItemWidget *self, |
82 | GtkWidget *child, |
83 | guint position); |
84 | void gtk_list_item_widget_remove_child (GtkListItemWidget *self, |
85 | GtkWidget *child); |
86 | |
87 | guint gtk_list_item_widget_get_position (GtkListItemWidget *self); |
88 | gpointer gtk_list_item_widget_get_item (GtkListItemWidget *self); |
89 | gboolean gtk_list_item_widget_get_selected (GtkListItemWidget *self); |
90 | |
91 | G_END_DECLS |
92 | |
93 | #endif /* __GTK_LIST_ITEM_WIDGET_PRIVATE_H__ */ |
94 | |