Imported Upstream version 1.61.2
[platform/upstream/gobject-introspection.git] / tests / scanner / drawable.c
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2
3 /* This file gets installed, so we can't assume config.h is available */
4 #ifdef HAVE_CONFIG_H
5 #include "config.h"
6 #endif
7
8 #include "drawable.h"
9
10 G_DEFINE_ABSTRACT_TYPE (RegressTestInheritDrawable, regress_test_inherit_drawable, G_TYPE_OBJECT);
11
12 static void
13 regress_test_inherit_drawable_class_init (RegressTestInheritDrawableClass *klass)
14 {
15
16 }
17
18 static void
19 regress_test_inherit_drawable_init (RegressTestInheritDrawable *drawable)
20 {
21
22 }
23
24 void
25 regress_test_inherit_drawable_do_foo (RegressTestInheritDrawable *drawable, int x)
26 {
27
28 }
29
30 /**
31  * regress_test_inherit_drawable_get_origin:
32  * @drawable:
33  * @x: (out):
34  * @y: (out):
35  */
36 void
37 regress_test_inherit_drawable_get_origin (RegressTestInheritDrawable *drawable, int *x, int *y)
38 {
39   *x = 0;
40   *y = 0;
41 }
42
43 /**
44  * regress_test_inherit_drawable_get_size:
45  * @drawable:
46  * @width: (out):
47  * @height: (out):
48  */
49 void
50 regress_test_inherit_drawable_get_size (RegressTestInheritDrawable *drawable, guint *width, guint *height)
51 {
52   *width = 42;
53   *height = 42;
54 }
55
56 void
57 regress_test_inherit_drawable_do_foo_maybe_throw (RegressTestInheritDrawable *drawable, int x, GError **error)
58 {
59   if (x != 42)
60     g_set_error(error, 0, 12, "The answer should be 42!");
61 }