~ubuntu-branches/ubuntu/trusty/gobject-introspection/trusty

« back to all changes in this revision

Viewing changes to tests/scanner/foo.h

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2011-03-22 00:32:36 UTC
  • mfrom: (1.4.1 upstream) (3.3.33 multiarch)
  • Revision ID: james.westby@ubuntu.com-20110322003236-4spdgfk1vai6xay1
Tags: 0.10.4-2
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#define FOO_BUFFER(object)     (G_TYPE_CHECK_INSTANCE_CAST ((object), FOO_TYPE_BUFFER, FooBuffer))
35
35
#define FOO_IS_BUFFER(object)  (G_TYPE_CHECK_INSTANCE_TYPE ((object), FOO_TYPE_BUFFER))
36
36
 
 
37
#define FOO_TYPE_OTHER_OBJECT  (foo_other_object_get_type ())
 
38
#define FOO_OTHER_OBJECT(object)     (G_TYPE_CHECK_INSTANCE_CAST ((object), FOO_TYPE_OTHER_OBJECT, FooOtherObject))
 
39
#define FOO_IS_OTHER_OBJECT(object)  (G_TYPE_CHECK_INSTANCE_TYPE ((object), FOO_TYPE_OTHER_OBJECT))
 
40
 
37
41
typedef struct _FooInterface       FooInterface;
38
42
typedef struct _FooInterfaceIface  FooInterfaceIface;
39
43
typedef struct _FooSubInterface       FooSubInterface;
44
48
typedef struct _FooSubobjectClass  FooSubobjectClass;
45
49
typedef struct _FooBuffer          FooBuffer;
46
50
typedef struct _FooBufferClass     FooBufferClass;
 
51
typedef struct _FooOtherObject          FooOtherObject;
 
52
typedef struct _FooOtherObjectClass     FooOtherObjectClass;
47
53
 
48
54
struct _FooInterfaceIface
49
55
{
67
73
  /* virtual table */
68
74
 
69
75
  void (*do_bar) (FooSubInterface *self);
 
76
 
 
77
  /* explicitly test un-named parameters */
 
78
  void (*do_moo) (FooSubInterface *self, int, gpointer);
 
79
 
 
80
  void (*do_baz) (FooSubInterface *self, GCallback callback, gpointer data);
70
81
};
71
82
 
72
83
GType                 foo_sub_interface_get_type       (void) G_GNUC_CONST;
73
84
 
74
85
void foo_sub_interface_do_bar (FooSubInterface *self);
 
86
void foo_sub_interface_do_moo (FooSubInterface *self, int, gpointer);
 
87
void foo_sub_interface_do_baz (FooSubInterface *self,
 
88
                               GCallback callback,
 
89
                               gpointer data);
75
90
 
76
91
struct _FooObject
77
92
{
103
118
 
104
119
void                  foo_object_take_all          (FooObject *object, int x, ...);
105
120
 
106
 
/* A random typedef */
107
 
typedef GSList FooList;
108
 
 
109
 
void                  foo_object_with_tdef         (FooObject *object, FooList *blah);
110
 
 
111
121
typedef gpointer FooObjectCookie;
112
122
 
113
123
FooObjectCookie       foo_object_new_cookie        (FooObject *object, const char *target);
147
157
 
148
158
void                  foo_buffer_some_method       (FooBuffer *buffer);
149
159
 
 
160
GType                 foo_other_object_get_type    (void) G_GNUC_CONST;
 
161
 
150
162
typedef enum
151
163
{
152
164
  FOO_ENUM_ALPHA,
303
315
  FooBRect *rect;
304
316
};
305
317
 
306
 
typedef union _FooUnion
 
318
typedef union _FooUnion FooUnion;
 
319
 
 
320
union _FooUnion
307
321
{
308
322
  int foo;
309
 
} FooUnion;
 
323
};
310
324
 
311
325
typedef struct _FooUtilityStruct FooUtilityStruct;
312
326
struct _FooUtilityStruct
313
327
{
314
328
  UtilityStruct bar;
315
329
};
316
 
typedef struct _FooThingWithArray
 
330
 
 
331
typedef struct _FooThingWithArray FooThingWithArray;
 
332
struct _FooThingWithArray
317
333
{
318
334
  int x;
319
335
  int y;
320
336
  char lines[80];
321
337
  guchar *data;
322
 
} FooThingWithArray;
 
338
} ;
323
339
 
324
340
FooBUnion *foo_bunion_new (void);
325
341
 
386
402
void foo_some_variant (guint x, va_list args);
387
403
void foo_some_variant_ptr (guint x, va_list *args);
388
404
 
389
 
/* Should be skipped due to annotations */
 
405
/**
 
406
 * FooSkippable: (skip)
 
407
 * @FOO_SKIPPABLE_ONE: a skippable enum value
 
408
 * @FOO_SKIPPABLE_TWO: another skippable enum value
 
409
 *
 
410
 * Some type that is only interesting from C and should not be
 
411
 * exposed to language bindings.
 
412
 */
390
413
typedef enum {
391
414
  FOO_SKIPPABLE_ONE,
392
415
  FOO_SKIPPABLE_TWO
400
423
  int foo;
401
424
};
402
425
 
 
426
FooForeignStruct* foo_foreign_struct_new (void);
 
427
FooForeignStruct* foo_foreign_struct_copy (FooForeignStruct *original);
 
428
 
 
429
/* This one should be a global, not a method on UtilityObject since
 
430
 * it's a separate namespace.
 
431
 */
 
432
void foo_object_a_global_method (UtilityObject *obj);
 
433
 
 
434
FooOtherObject * foo_object_append_new_stack_layer (FooObject *obj, int x);
403
435
 
404
436
#endif /* __FOO_OBJECT_H__ */