Branch data Line data Source code
1 : : /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 : : * GObject introspection: Enum implementation
3 : : *
4 : : * Copyright 2024 GNOME Foundation, Inc.
5 : : *
6 : : * SPDX-License-Identifier: LGPL-2.1-or-later
7 : : *
8 : : * This library is free software; you can redistribute it and/or
9 : : * modify it under the terms of the GNU Lesser General Public
10 : : * License as published by the Free Software Foundation; either
11 : : * version 2 of the License, or (at your option) any later version.
12 : : *
13 : : * This library is distributed in the hope that it will be useful,
14 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 : : * Lesser General Public License for more details.
17 : : *
18 : : * You should have received a copy of the GNU Lesser General Public
19 : : * License along with this library; if not, write to the
20 : : * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 : : * Boston, MA 02111-1307, USA.
22 : : */
23 : :
24 : : #include "config.h"
25 : :
26 : : #include <glib.h>
27 : :
28 : : #include <girepository/girepository.h>
29 : : #include "gibaseinfo-private.h"
30 : : #include "girepository-private.h"
31 : : #include "gitypelib-internal.h"
32 : : #include "giflagsinfo.h"
33 : :
34 : : /**
35 : : * GIFlagsInfo:
36 : : *
37 : : * A `GIFlagsInfo` represents an enumeration which defines flag values
38 : : * (independently set bits).
39 : : *
40 : : * The `GIFlagsInfo` contains a set of values (each a
41 : : * [class@GIRepository.ValueInfo]) and a type.
42 : : *
43 : : * The [class@GIRepository.ValueInfo] for a value is fetched by calling
44 : : * [method@GIRepository.EnumInfo.get_value] on a `GIFlagsInfo`.
45 : : *
46 : : * Since: 2.80
47 : : */
48 : :
49 : : void
50 : 2 : gi_flags_info_class_init (gpointer g_class,
51 : : gpointer class_data)
52 : : {
53 : 2 : GIBaseInfoClass *info_class = g_class;
54 : :
55 : 2 : info_class->info_type = GI_INFO_TYPE_FLAGS;
56 : 2 : }
|