1 | /* |
2 | * Copyright © 2018 Red Hat, Inc. |
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: Matthias Clasen |
18 | */ |
19 | |
20 | #ifndef __GTK_DROP_DOWN_H__ |
21 | #define __GTK_DROP_DOWN_H__ |
22 | |
23 | #include <gtk/gtkwidget.h> |
24 | #include <gtk/gtkexpression.h> |
25 | |
26 | G_BEGIN_DECLS |
27 | |
28 | #define GTK_TYPE_DROP_DOWN (gtk_drop_down_get_type ()) |
29 | |
30 | GDK_AVAILABLE_IN_ALL |
31 | G_DECLARE_FINAL_TYPE (GtkDropDown, gtk_drop_down, GTK, DROP_DOWN, GtkWidget) |
32 | |
33 | GDK_AVAILABLE_IN_ALL |
34 | GtkWidget * gtk_drop_down_new (GListModel *model, |
35 | GtkExpression *expression); |
36 | |
37 | GDK_AVAILABLE_IN_ALL |
38 | GtkWidget * gtk_drop_down_new_from_strings (const char * const * strings); |
39 | |
40 | GDK_AVAILABLE_IN_ALL |
41 | void gtk_drop_down_set_model (GtkDropDown *self, |
42 | GListModel *model); |
43 | GDK_AVAILABLE_IN_ALL |
44 | GListModel * gtk_drop_down_get_model (GtkDropDown *self); |
45 | |
46 | GDK_AVAILABLE_IN_ALL |
47 | void gtk_drop_down_set_selected (GtkDropDown *self, |
48 | guint position); |
49 | GDK_AVAILABLE_IN_ALL |
50 | guint gtk_drop_down_get_selected (GtkDropDown *self); |
51 | |
52 | GDK_AVAILABLE_IN_ALL |
53 | gpointer gtk_drop_down_get_selected_item (GtkDropDown *self); |
54 | |
55 | GDK_AVAILABLE_IN_ALL |
56 | void gtk_drop_down_set_factory (GtkDropDown *self, |
57 | GtkListItemFactory *factory); |
58 | GDK_AVAILABLE_IN_ALL |
59 | GtkListItemFactory * |
60 | gtk_drop_down_get_factory (GtkDropDown *self); |
61 | |
62 | GDK_AVAILABLE_IN_ALL |
63 | void gtk_drop_down_set_list_factory (GtkDropDown *self, |
64 | GtkListItemFactory *factory); |
65 | GDK_AVAILABLE_IN_ALL |
66 | GtkListItemFactory * |
67 | gtk_drop_down_get_list_factory (GtkDropDown *self); |
68 | |
69 | GDK_AVAILABLE_IN_ALL |
70 | void gtk_drop_down_set_expression (GtkDropDown *self, |
71 | GtkExpression *expression); |
72 | GDK_AVAILABLE_IN_ALL |
73 | GtkExpression * gtk_drop_down_get_expression (GtkDropDown *self); |
74 | |
75 | GDK_AVAILABLE_IN_ALL |
76 | void gtk_drop_down_set_enable_search (GtkDropDown *self, |
77 | gboolean enable_search); |
78 | GDK_AVAILABLE_IN_ALL |
79 | gboolean gtk_drop_down_get_enable_search (GtkDropDown *self); |
80 | GDK_AVAILABLE_IN_4_6 |
81 | void gtk_drop_down_set_show_arrow (GtkDropDown *self, |
82 | gboolean show_arrow); |
83 | GDK_AVAILABLE_IN_4_6 |
84 | gboolean gtk_drop_down_get_show_arrow (GtkDropDown *self); |
85 | |
86 | G_END_DECLS |
87 | |
88 | #endif /* __GTK_DROP_DOWN_H__ */ |
89 | |