Initial packaging for Tizen
[profile/ivi/gobject-introspection.git] / tests / scanner / gettype.c
1 #include "gettype.h"
2
3 G_DEFINE_TYPE(GetTypeObject, gettype_object, G_TYPE_OBJECT);
4
5 static void
6 gettype_object_class_init (GetTypeObjectClass *klass)
7 {
8 }
9
10 static void
11 gettype_object_init (GetTypeObject *object)
12 {
13 }
14
15 GetTypeObject *
16 gettype_object_new (void)
17 {
18   return g_object_new (GETTYPE_TYPE_OBJECT, NULL);
19 }
20
21 /**
22  * gettype_object_nonmeta1_get_type:
23  * @obj: self
24  *
25  * This shouldn't be scanned as a *_get_type function because it takes
26  * arguments.
27  *
28  * Returns: 0
29  */
30 GType
31 gettype_object_nonmeta1_get_type (GetTypeObject *obj)
32 {
33     return 0;
34 }
35
36 /**
37  * gettype_object_nonmeta2_get_type:
38  *
39  * This shouldn't be scanned as a *_get_type function because it doesn't return
40  * a GType. It will generate a warning.
41  *
42  * Returns: true
43  */
44 gboolean
45 gettype_object_nonmeta2_get_type (void)
46 {
47     return TRUE;
48 }
49
50 /**
51  * gettype_object_nonmeta_get_gtype:
52  *
53  * This shouldn't be scanned as a *_get_type function because it doesn't return
54  * a GType. It will generate a warning.
55  *
56  * Returns: true
57  */
58 gboolean
59 gettype_object_nonmeta_get_gtype (void)
60 {
61     return TRUE;
62 }