adw-enum-list-model.h 1.24 KB
Newer Older
Alexander Mikhaylenko's avatar
Alexander Mikhaylenko committed
1
2
3
/*
 * Copyright (C) 2020 Purism SPC
 *
4
 * SPDX-License-Identifier: LGPL-2.1-or-later
Alexander Mikhaylenko's avatar
Alexander Mikhaylenko committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 */

#pragma once

#if !defined(_ADWAITA_INSIDE) && !defined(ADWAITA_COMPILATION)
#error "Only <adwaita.h> can be included directly."
#endif

#include "adw-version.h"

#include <glib-object.h>

G_BEGIN_DECLS

19
#define ADW_TYPE_ENUM_LIST_ITEM (adw_enum_list_item_get_type())
20
21

ADW_AVAILABLE_IN_ALL
22
G_DECLARE_FINAL_TYPE (AdwEnumListItem, adw_enum_list_item, ADW, ENUM_LIST_ITEM, GObject)
23
24

ADW_AVAILABLE_IN_ALL
25
int adw_enum_list_item_get_value (AdwEnumListItem *self);
26
27

ADW_AVAILABLE_IN_ALL
28
const char *adw_enum_list_item_get_name (AdwEnumListItem *self);
29
30

ADW_AVAILABLE_IN_ALL
31
const char *adw_enum_list_item_get_nick (AdwEnumListItem *self);
32

Alexander Mikhaylenko's avatar
Alexander Mikhaylenko committed
33
34
35
36
37
38
#define ADW_TYPE_ENUM_LIST_MODEL (adw_enum_list_model_get_type())

ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwEnumListModel, adw_enum_list_model, ADW, ENUM_LIST_MODEL, GObject)

ADW_AVAILABLE_IN_ALL
39
AdwEnumListModel *adw_enum_list_model_new (GType enum_type) G_GNUC_WARN_UNUSED_RESULT;
Alexander Mikhaylenko's avatar
Alexander Mikhaylenko committed
40
41
42
43
44
45

ADW_AVAILABLE_IN_ALL
GType adw_enum_list_model_get_enum_type (AdwEnumListModel *self);

ADW_AVAILABLE_IN_ALL
guint adw_enum_list_model_find_position (AdwEnumListModel *self,
Christopher Davis's avatar
Christopher Davis committed
46
                                         int               value);
Alexander Mikhaylenko's avatar
Alexander Mikhaylenko committed
47
48

G_END_DECLS