Back to index

unity  6.0.0
Classes | Defines | Typedefs | Functions
test_glib_object_utils.h File Reference
#include <glib-object.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _TestGObject
struct  _TestGObjectClass

Defines

#define TEST_TYPE_GOBJECT   (test_gobject_get_type ())
#define TEST_GOBJECT(obj)
#define TEST_GOBJECT_CLASS(klass)
#define TEST_IS_GOBJECT(obj)
#define TEST_IS_GOBJECT_CLASS(klass)
#define TEST_GOBJECT_GET_CLASS(obj)
#define TEST_GOBJECT_GET_PRIVATE(obj)

Typedefs

typedef struct _TestGObject
typedef struct _TestGObjectClass
typedef struct _TestGObjectPrivate

Functions

GType test_gobject_get_type (void) G_GNUC_CONST
TestGObject * test_gobject_new ()
void test_gobject_set_public_value (TestGObject *self, gint value)
gint test_gobject_get_public_value (TestGObject *self)
void test_gobject_set_private_value (TestGObject *self, gint value)
gint test_gobject_get_private_value (TestGObject *self)

Class Documentation

struct _TestGObject

Definition at line 36 of file test_glib_object_utils.h.

Class Members
GObject parent
TestGObjectPrivate * priv
gint public_value
struct _TestGObjectClass

Definition at line 45 of file test_glib_object_utils.h.

Class Members
GObjectClass parent_class

Define Documentation

#define TEST_GOBJECT (   obj)
Value:
(G_TYPE_CHECK_INSTANCE_CAST ((obj),\
  TEST_TYPE_GOBJECT, TestGObject))

Definition at line 14 of file test_glib_object_utils.h.

#define TEST_GOBJECT_CLASS (   klass)
Value:
(G_TYPE_CHECK_CLASS_CAST ((klass),\
  TEST_TYPE_GOBJECT, TestGObjectClass))

Definition at line 17 of file test_glib_object_utils.h.

#define TEST_GOBJECT_GET_CLASS (   obj)
Value:
(G_TYPE_INSTANCE_GET_CLASS ((obj),\
  TEST_TYPE_GOBJECT, TestGObjectClass))

Definition at line 26 of file test_glib_object_utils.h.

#define TEST_GOBJECT_GET_PRIVATE (   obj)
Value:
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
  TEST_TYPE_GOBJECT, TestGObjectPrivate))

Definition at line 29 of file test_glib_object_utils.h.

#define TEST_IS_GOBJECT (   obj)
Value:
(G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
  TEST_TYPE_GOBJECT))

Definition at line 20 of file test_glib_object_utils.h.

#define TEST_IS_GOBJECT_CLASS (   klass)
Value:
(G_TYPE_CHECK_CLASS_TYPE ((klass),\
  TEST_TYPE_GOBJECT))

Definition at line 23 of file test_glib_object_utils.h.

Definition at line 12 of file test_glib_object_utils.h.


Typedef Documentation

typedef struct _TestGObject

Definition at line 32 of file test_glib_object_utils.h.

typedef struct _TestGObjectClass

Definition at line 33 of file test_glib_object_utils.h.

typedef struct _TestGObjectPrivate

Definition at line 34 of file test_glib_object_utils.h.


Function Documentation

gint test_gobject_get_private_value ( TestGObject *  self)

Definition at line 41 of file test_glib_object_utils.cpp.

{
  TestGObjectPrivate *priv;
  g_return_val_if_fail(TEST_IS_GOBJECT(self), 0);

  priv = TEST_GOBJECT_GET_PRIVATE(self);
  return priv->private_value;
}
gint test_gobject_get_public_value ( TestGObject *  self)

Definition at line 57 of file test_glib_object_utils.cpp.

{
  g_return_val_if_fail(TEST_IS_GOBJECT(self), 0);

  return self->public_value;
}
GType test_gobject_get_type ( void  )
TestGObject* test_gobject_new ( )

Definition at line 27 of file test_glib_object_utils.cpp.

{
  return TEST_GOBJECT(g_object_new(TEST_TYPE_GOBJECT, NULL));
}
void test_gobject_set_private_value ( TestGObject *  self,
gint  value 
)

Definition at line 32 of file test_glib_object_utils.cpp.

{
  TestGObjectPrivate *priv;
  g_return_if_fail(TEST_IS_GOBJECT(self));

  priv = TEST_GOBJECT_GET_PRIVATE(self);
  priv->private_value = value;
}
void test_gobject_set_public_value ( TestGObject *  self,
gint  value 
)

Definition at line 50 of file test_glib_object_utils.cpp.

{
  g_return_if_fail(TEST_IS_GOBJECT(self));

  self->public_value = value;
}