summaryrefslogtreecommitdiff
path: root/tests/scanner/gettype.c
blob: a3c2d6bee2329a60e14b0dba27f19fc1ff44f4a2 (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include "gettype.h"

G_DEFINE_TYPE (GetTypeObject, gettype_object, G_TYPE_OBJECT);

static void
gettype_object_class_init (GetTypeObjectClass * klass)
{
}

static void
gettype_object_init (GetTypeObject * object)
{
}

GetTypeObject *
gettype_object_new (void)
{
  return g_object_new (GETTYPE_TYPE_OBJECT, NULL);
}

/**
 * gettype_object_nonmeta1_get_type:
 * @obj: self
 *
 * This shouldn't be scanned as a *_get_type function because it takes
 * arguments.
 *
 * Returns: 0
 */
GType
gettype_object_nonmeta1_get_type (GetTypeObject * obj)
{
  return 0;
}

/**
 * gettype_object_nonmeta2_get_type:
 *
 * This shouldn't be scanned as a *_get_type function because it doesn't return
 * a GType. It will generate a warning.
 *
 * Returns: true
 */
gboolean
gettype_object_nonmeta2_get_type (void)
{
  return TRUE;
}

/**
 * gettype_object_nonmeta_get_gtype:
 *
 * This shouldn't be scanned as a *_get_type function because it doesn't return
 * a GType. It will generate a warning.
 *
 * Returns: true
 */
gboolean
gettype_object_nonmeta_get_gtype (void)
{
  return TRUE;
}