gtkdropdown.h 3.84 KB
Newer Older
Matthias Clasen's avatar
Matthias Clasen committed
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
/*
 * Copyright © 2018 Red Hat, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors: Matthias Clasen
 */

#ifndef __GTK_DROP_DOWN_H__
#define __GTK_DROP_DOWN_H__

#include <gtk/gtkwidget.h>
#include <gtk/gtkexpression.h>

G_BEGIN_DECLS

#define GTK_TYPE_DROP_DOWN         (gtk_drop_down_get_type ())

GDK_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (GtkDropDown, gtk_drop_down, GTK, DROP_DOWN, GtkWidget)

GDK_AVAILABLE_IN_ALL
34
35
GtkWidget *     gtk_drop_down_new                               (GListModel             *model,
                                                                 GtkExpression          *expression);
Matthias Clasen's avatar
Matthias Clasen committed
36
37

GDK_AVAILABLE_IN_ALL
38
GtkWidget *     gtk_drop_down_new_from_strings                  (const char * const *    strings);
Matthias Clasen's avatar
Matthias Clasen committed
39
40
41
42
43
44
45
46
47
48
49
50
51

GDK_AVAILABLE_IN_ALL
void            gtk_drop_down_set_model                         (GtkDropDown            *self,
                                                                 GListModel             *model);
GDK_AVAILABLE_IN_ALL
GListModel *    gtk_drop_down_get_model                         (GtkDropDown            *self);

GDK_AVAILABLE_IN_ALL
void            gtk_drop_down_set_selected                      (GtkDropDown            *self,
                                                                 guint                   position);
GDK_AVAILABLE_IN_ALL
guint           gtk_drop_down_get_selected                      (GtkDropDown            *self);

52
53
54
GDK_AVAILABLE_IN_ALL
gpointer        gtk_drop_down_get_selected_item                 (GtkDropDown            *self);

Matthias Clasen's avatar
Matthias Clasen committed
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
GDK_AVAILABLE_IN_ALL
void            gtk_drop_down_set_factory                       (GtkDropDown            *self,
                                                                 GtkListItemFactory     *factory);
GDK_AVAILABLE_IN_ALL
GtkListItemFactory *
                gtk_drop_down_get_factory                       (GtkDropDown            *self);

GDK_AVAILABLE_IN_ALL
void            gtk_drop_down_set_list_factory                  (GtkDropDown            *self,
                                                                 GtkListItemFactory     *factory);
GDK_AVAILABLE_IN_ALL
GtkListItemFactory *
                gtk_drop_down_get_list_factory                  (GtkDropDown            *self);

GDK_AVAILABLE_IN_ALL
void            gtk_drop_down_set_expression                    (GtkDropDown            *self,
                                                                 GtkExpression          *expression);
GDK_AVAILABLE_IN_ALL
GtkExpression * gtk_drop_down_get_expression                    (GtkDropDown            *self);

GDK_AVAILABLE_IN_ALL
void            gtk_drop_down_set_enable_search                 (GtkDropDown            *self,
                                                                 gboolean                enable_search);
GDK_AVAILABLE_IN_ALL
gboolean        gtk_drop_down_get_enable_search                 (GtkDropDown            *self);
80
81
82
83
84
GDK_AVAILABLE_IN_4_6
void            gtk_drop_down_set_show_arrow                    (GtkDropDown            *self,
                                                                 gboolean                show_arrow);
GDK_AVAILABLE_IN_4_6
gboolean        gtk_drop_down_get_show_arrow                    (GtkDropDown            *self);
Matthias Clasen's avatar
Matthias Clasen committed
85
86
87
88

G_END_DECLS

#endif  /* __GTK_DROP_DOWN_H__ */