glib (2.79.0)
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 * GObject introspection: GIBaseInfo
3 *
4 * Copyright (C) 2005 Matthias Clasen
5 * Copyright (C) 2008,2009 Red Hat, Inc.
6 *
7 * SPDX-License-Identifier: LGPL-2.1-or-later
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the
21 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 * Boston, MA 02111-1307, USA.
23 */
24
25 #pragma once
26
27 #if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
28 #error "Only <girepository.h> can be included directly."
29 #endif
30
31 #include <glib-object.h>
32 #include <girepository/gitypelib.h>
33 #include <girepository/gitypes.h>
34
35 G_BEGIN_DECLS
36
37 /**
38 * GIAttributeIter:
39 *
40 * An opaque structure used to iterate over attributes
41 * in a [class@GIRepository.BaseInfo] struct.
42 *
43 * Since: 2.80
44 */
45 typedef struct {
46 /*< private >*/
47 gpointer data;
48 gpointer data2;
49 gpointer data3;
50 gpointer data4;
51 } GIAttributeIter;
52
53 #define GI_TYPE_BASE_INFO (gi_base_info_get_type ())
54
55
56 GI_AVAILABLE_IN_ALL
57 GType gi_base_info_get_type (void) G_GNUC_CONST;
58
59 GI_AVAILABLE_IN_ALL
60 GIBaseInfo * gi_base_info_ref (GIBaseInfo *info);
61
62 GI_AVAILABLE_IN_ALL
63 void gi_base_info_unref (GIBaseInfo *info);
64
65 GI_AVAILABLE_IN_ALL
66 GIInfoType gi_base_info_get_info_type (GIBaseInfo *info);
67
68 GI_AVAILABLE_IN_ALL
69 const gchar * gi_base_info_get_name (GIBaseInfo *info);
70
71 GI_AVAILABLE_IN_ALL
72 const gchar * gi_base_info_get_namespace (GIBaseInfo *info);
73
74 GI_AVAILABLE_IN_ALL
75 gboolean gi_base_info_is_deprecated (GIBaseInfo *info);
76
77 GI_AVAILABLE_IN_ALL
78 const gchar * gi_base_info_get_attribute (GIBaseInfo *info,
79 const gchar *name);
80
81 GI_AVAILABLE_IN_ALL
82 gboolean gi_base_info_iterate_attributes (GIBaseInfo *info,
83 GIAttributeIter *iterator,
84 const char **name,
85 const char **value);
86
87 GI_AVAILABLE_IN_ALL
88 GIBaseInfo * gi_base_info_get_container (GIBaseInfo *info);
89
90 GI_AVAILABLE_IN_ALL
91 GITypelib * gi_base_info_get_typelib (GIBaseInfo *info);
92
93 GI_AVAILABLE_IN_ALL
94 gboolean gi_base_info_equal (GIBaseInfo *info1,
95 GIBaseInfo *info2);
96
97 GI_AVAILABLE_IN_ALL
98 GIBaseInfo * gi_info_new (GIInfoType type,
99 GIBaseInfo *container,
100 GITypelib *typelib,
101 guint32 offset);
102
103 G_END_DECLS