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

source code of gtk/gtk/gtkdropdown.h