GtkdocObject

GtkdocObject — class for gtk-doc unit test

Synopsis

                    GtkdocObject;
                    GtkdocObjectClass;
GtkdocObject *      gtkdoc_object_new                   (void);
void                gtkdoc_object_set_otest             (GObject *self,
                                                         const gchar *value);
void                gtkdoc_object_frobnicate            (GObject *self,
                                                         gint n);
#define             GTKDOC_OBJECT_MACRO_DUMMY           (parameter_1,parameter_2)
#define             GTKDOC_OBJECT_MACRO_SUM             (parameter_1,parameter_2)

Object Hierarchy

  GObject
   +----GtkdocObject

Properties

  "otest"                    gchar*                : Read / Write

Signals

  "otest"                                          : Run Last / No Recursion / No Hooks

Description

This file contains non-sense code for the sole purpose of testing the docs. We can link to the "otest" property and the "otest" signal. A new instance can be created using the gtkdoc_object_new() function. The whole lifecycle usualy looks like shown in this example:

GObject *myobj;

myobj = gtkdoc_object_new();
// do somehing
g_object_unref (myobj);

You can also change parameters:

/* example for gobject usage */

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

gint
main(gint argc, gchar **argv)
{
  GObject *myobj;

  myobj = gtkdoc_object_new();
  g_object_set (myobj, "parameter", 5, NULL);
  g_object_unref (myobj);
  
  return 0;
}

Details

GtkdocObject

typedef struct _GtkdocObject GtkdocObject;

instance data of gtk-doc unit test class


GtkdocObjectClass

typedef struct {
  GObjectClass parent;

  /* class methods */
  void (*test)(const GtkdocObject * const self, gconstpointer const user_data);
} GtkdocObjectClass;

class data of gtk-doc unit test class

GObjectClass parent;

this is a bug :/

test ()

overideable method

gtkdoc_object_new ()

GtkdocObject *      gtkdoc_object_new                   (void);

Create a new instance

Returns :

the instance or NULL in case of an error

Since 0.1


gtkdoc_object_set_otest ()

void                gtkdoc_object_set_otest             (GObject *self,
                                                         const gchar *value);

Warning

gtkdoc_object_set_otest is deprecated and should not be used in newly-written code. Use g_object_set(obj,"otest",value,NULL); instead.

Set the "otest" property.

self :

the object

value :

the new otest value

Since 0.5


gtkdoc_object_frobnicate ()

void                gtkdoc_object_frobnicate            (GObject *self,
                                                         gint n);

Frobnicate the content of self n times.

self :

the object

n :

number of iterations

Since 0.5


GTKDOC_OBJECT_MACRO_DUMMY()

#define GTKDOC_OBJECT_MACRO_DUMMY(parameter_1,parameter_2) /* do nothing */

This macro does nothing.

parameter_1 :

first arg

parameter_2 :

second arg

GTKDOC_OBJECT_MACRO_SUM()

#define             GTKDOC_OBJECT_MACRO_SUM(parameter_1,parameter_2)

This macro adds its args.

Return: the sum of parameter_1 and parameter_2

parameter_1 :

first arg

parameter_2 :

second arg

Property Details

The "otest" property

  "otest"                    gchar*                : Read / Write

dummy property for object.

Default value: "dummy"

Signal Details

The "otest" signal

void                user_function                      (GtkdocObject *self,
                                                        gpointer      user_data)      : Run Last / No Recursion / No Hooks

The event has been triggered.

self :

myself

user_data :

user data set when the signal handler was connected.