summaryrefslogtreecommitdiff
path: root/test/core/my-object-subclass.h
blob: edb03cd20b9841b89d0febb70a7301995e340e9f (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
#ifndef __MY_OBJECT_SUBCLASS_H__
#define __MY_OBJECT_SUBCLASS_H__

#include <glib-object.h>
#include <dbus/dbus-glib.h>

#include "my-object.h"

typedef struct MyObjectSubclass MyObjectSubclass;
typedef struct MyObjectSubclassClass MyObjectSubclassClass;

GType my_object_subclass_get_type (void);

struct MyObjectSubclass
{
  MyObject parent;
  char *this_is_a_subclass_string;
  guint this_is_a_subclass_uint;
};

struct MyObjectSubclassClass
{
  MyObjectClass parent;
};

#define MY_TYPE_OBJECT_SUBCLASS              (my_object_subclass_get_type ())
#define MY_OBJECT_SUBCLASS(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), MY_TYPE_OBJECT_SUBCLASS, MyObjectSubclass))
#define MY_OBJECT_SUBCLASS_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), MY_TYPE_OBJECT_SUBCLASS, MyObjectSubclassClass))
#define MY_IS_OBJECT_SUBCLASS(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), MY_TYPE_OBJECT_SUBCLASS))
#define MY_IS_OBJECT_SUBCLASS_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), MY_TYPE_OBJECT_SUBCLASS))
#define MY_OBJECT_SUBCLASS_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), MY_TYPE_OBJECT_SUBCLASS, MyObjectSubclassClass))

#endif