| 1 |
/* |
| 2 |
SPDX-License-Identifier: GPL-2.0-or-later AND LGPL-2.0-or-later AND MIT |
| 3 |
SPDX-FileCopyrightText: 2008 Colin Walters <[email protected]> |
| 4 |
SPDX-FileCopyrightText: 2008 Johan Bilien |
| 5 |
SPDX-FileCopyrightText: 2008 Johan Dahlin |
| 6 |
*/ |
| 7 |
|
| 8 |
#include <gio/gio.h> |
| 9 |
|
| 10 |
#include "drawable.h" |
| 11 |
|
| 12 |
G_DEFINE_ABSTRACT_TYPE (RegressTestInheritDrawable, regress_test_inherit_drawable, G_TYPE_OBJECT); |
| 13 |
|
| 14 |
static void |
| 15 |
regress_test_inherit_drawable_class_init (RegressTestInheritDrawableClass *klass G_GNUC_UNUSED) |
| 16 |
{ |
| 17 |
} |
| 18 |
|
| 19 |
static void |
| 20 |
regress_test_inherit_drawable_init (RegressTestInheritDrawable *drawable G_GNUC_UNUSED) |
| 21 |
{ |
| 22 |
} |
| 23 |
|
| 24 |
void |
| 25 |
regress_test_inherit_drawable_do_foo (RegressTestInheritDrawable *drawable G_GNUC_UNUSED, |
| 26 |
int x G_GNUC_UNUSED) |
| 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 G_GNUC_UNUSED, |
| 38 |
int *x, |
| 39 |
int *y) |
| 40 |
{ |
| 41 |
*x = 0; |
| 42 |
*y = 0; |
| 43 |
} |
| 44 |
|
| 45 |
/** |
| 46 |
* regress_test_inherit_drawable_get_size: |
| 47 |
* @drawable: |
| 48 |
* @width: (out): |
| 49 |
* @height: (out): |
| 50 |
*/ |
| 51 |
void |
| 52 |
regress_test_inherit_drawable_get_size (RegressTestInheritDrawable *drawable G_GNUC_UNUSED, |
| 53 |
guint *width, |
| 54 |
guint *height) |
| 55 |
{ |
| 56 |
*width = 42; |
| 57 |
*height = 42; |
| 58 |
} |
| 59 |
|
| 60 |
void |
| 61 |
regress_test_inherit_drawable_do_foo_maybe_throw (RegressTestInheritDrawable *drawable G_GNUC_UNUSED, |
| 62 |
int x, |
| 63 |
GError **error) |
| 64 |
{ |
| 65 |
if (x != 42) |
| 66 |
g_set_error (error, G_IO_ERROR, 12, "The answer should be 42!"); |
| 67 |
} |