40 lines
920 B
C
40 lines
920 B
C
#ifndef DIYA_OBJECT_H
|
|
#define DIYA_OBJECT_H
|
|
|
|
#include <glib-object.h>
|
|
#include <assert.h>
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
#define USE_CLASS(name) typedef struct _##name name
|
|
#define DIYA_PROP_SHELL "shell"
|
|
|
|
/**
|
|
* Base class object
|
|
*
|
|
*/
|
|
#define DIYA_TYPE_OBJECT (diya_object_get_type())
|
|
G_DECLARE_DERIVABLE_TYPE(DiyaObject, diya_object, DIYA, OBJECT, GObject)
|
|
|
|
struct _DiyaObjectClass
|
|
{
|
|
GObjectClass parent_class;
|
|
const gchar *(*to_string)(DiyaObject *self);
|
|
/**
|
|
* @brief reserve for future use to
|
|
* define common API for descendants
|
|
*/
|
|
};
|
|
|
|
#define DIYA_TYPE_SHELL_OBJECT (diya_shell_object_get_type())
|
|
G_DECLARE_DERIVABLE_TYPE(DiyaShellObject, diya_shell_object, DIYA, SHELL_OBJECT, DiyaObject)
|
|
|
|
struct _DiyaShellObjectClass
|
|
{
|
|
DiyaObjectClass parent_class;
|
|
};
|
|
|
|
const gchar *diya_object_to_string(gpointer object);
|
|
gpointer diya_shell_object_get_shell(gpointer object);
|
|
|
|
#endif |