added "type-name", "get-type" and "deprecated" missing arguments.
[platform/upstream/gobject-introspection.git] / tests / parser / foo-object.h
1 #ifndef __FOO_OBJECT_H__
2 #define __FOO_OBJECT_H__
3
4 #include <glib-object.h>
5
6 #define FOO_TYPE_INTERFACE           (foo_interface_get_type ())
7 #define FOO_INTERFACE(object)        (G_TYPE_CHECK_INSTANCE_CAST ((object), FOO_TYPE_INTERFACE, FooInterface))
8 #define FOO_IS_INTERFACE(object)     (G_TYPE_CHECK_INSTANCE_TYPE ((object), FOO_TYPE_INTERFACE))
9
10 #define FOO_TYPE_OBJECT              (foo_object_get_type ())
11 #define FOO_OBJECT(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), FOO_TYPE_OBJECT, FooObject))
12 #define FOO_IS_OBJECT(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), FOO_TYPE_OBJECT))
13
14 #define FOO_TYPE_SUBOBJECT           (foo_subobject_get_type ())
15 #define FOO_SUBOBJECT(subobject)     (G_TYPE_CHECK_INSTANCE_CAST ((subobject), FOO_TYPE_SUBOBJECT, FooSubobject))
16 #define FOO_IS_SUBOBJECT(subobject)  (G_TYPE_CHECK_INSTANCE_TYPE ((subobject), FOO_TYPE_SUBOBJECT))
17
18 typedef struct _FooInterface       FooInterface;
19 typedef struct _FooInterfaceIface  FooInterfaceIface;
20 typedef struct _FooObject          FooObject;
21 typedef struct _FooObjectClass     FooObjectClass;
22 typedef struct _FooSubobject       FooSubobject;
23 typedef struct _FooSubobjectClass  FooSubobjectClass;
24
25 struct _FooInterfaceIface
26 {
27   GTypeInterface parent_iface;
28 };
29
30 GType                 foo_interface_get_type       (void) G_GNUC_CONST;
31
32 struct _FooObject
33 {
34   GObject parent_instance;
35 };
36
37 struct _FooObjectClass
38 {
39   GObjectClass parent_class;
40 };
41
42 /*
43  * @deprecated
44  */
45 gint                  foo_init                     (void);
46
47 GType                 foo_object_get_type          (void) G_GNUC_CONST;
48 FooObject*            foo_object_new               ();
49 gint                  foo_object_method            (FooObject *object);
50
51 struct _FooSubobject
52 {
53   FooObject parent_instance;
54 };
55
56 struct _FooSubobjectClass
57 {
58   FooObjectClass parent_class;
59 };
60
61 GType                 foo_subobject_get_type       (void) G_GNUC_CONST;
62 FooSubobject*         foo_subobject_new            ();
63
64 typedef enum
65 {
66   FOO_ENUM_ALPHA,
67   FOO_ENUM_BETA,
68   FOO_ENUM_DELTA
69 } FooEnumType;
70
71 GType foo_enum_get_type (void);
72
73 typedef enum
74 {
75   FOO_FLAGS_FIRST  = 1 << 0,
76   FOO_FLAGS_SECOND = 1 << 1,
77   FOO_FLAGS_THIRD  = 1 << 2
78 } FooFlagsType;
79
80 typedef enum
81 {
82   FOO_ENUM_UN = 1,
83   FOO_ENUM_DEUX = 2,
84   FOO_ENUM_TROIS = 3,
85 } FooEnumNoType;
86
87 GType foo_flags_get_type (void);
88
89 typedef struct _FooBoxed FooBoxed;
90
91 GType                 foo_boxed_get_type       (void) G_GNUC_CONST;
92 FooBoxed*             foo_boxed_new            (void);
93 void                  foo_boxed_method         (FooBoxed* boxed);
94
95 /* Invalid comments, should be ignored */
96
97 /* @ */
98 /* @: */
99
100 #endif /* __FOO_OBJECT_H__ */