| libMirage Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
#include <mirage.h>
MIRAGE_Object;
gboolean mirage_object_set_debug_context (MIRAGE_Object *self,
GObject *debug_context,
GError **error);
gboolean mirage_object_get_debug_context (MIRAGE_Object *self,
GObject **debug_context,
GError **error);
void mirage_object_debug_message (MIRAGE_Object *self,
gint level,
gchar *format,
...);
void mirage_object_debug_messagev (MIRAGE_Object *self,
gint level,
gchar *format,
va_list args);
gboolean mirage_object_set_parent (MIRAGE_Object *self,
GObject *parent,
GError **error);
gboolean mirage_object_get_parent (MIRAGE_Object *self,
GObject **parent,
GError **error);
gboolean mirage_object_attach_child (MIRAGE_Object *self,
GObject *child,
GError **error);
gboolean mirage_object_detach_child (MIRAGE_Object *self,
GObject *child,
GError **error);
GObject +----MIRAGE_Object +----MIRAGE_CDTextEncDec +----MIRAGE_Disc +----MIRAGE_Fragment +----MIRAGE_Index +----MIRAGE_Language +----MIRAGE_Sector +----MIRAGE_Session +----MIRAGE_Track +----MIRAGE_Parser
MIRAGE_Object is used as a base object class throughout libMirage. It implements support for layout definitions (setting object's parent and children) and debugging via debug contexts.
typedef struct _MIRAGE_Object MIRAGE_Object;
Contains private data only, and should be accessed using the functions below.
gboolean mirage_object_set_debug_context (MIRAGE_Object *self,GObject *debug_context,GError **error);
Sets object's debug context.
|
a MIRAGE_Object |
|
debug context |
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure
|
gboolean mirage_object_get_debug_context (MIRAGE_Object *self,GObject **debug_context,GError **error);
Retrieves object's debug context. A reference to debug context is stored in
debug_context; it should be released with g_object_unref() when no longer needed.
|
a MIRAGE_Object |
|
location to store debug context, or NULL
|
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure
|
void mirage_object_debug_message (MIRAGE_Object *self,gint level,gchar *format,...);
Outputs debug message with verbosity level level, format string format and
format arguments Varargs. The message is displayed if object's debug context
has mask that covers level, or if level is either MIRAGE_DEBUG_WARNING or
MIRAGE_DEBUG_ERROR.
|
a MIRAGE_Object |
|
debug level |
|
message format. See the printf() documentation.
|
|
parameters to insert into the format string. |
void mirage_object_debug_messagev (MIRAGE_Object *self,gint level,gchar *format,va_list args);
Outputs debug message with verbosity level level, format string format and
format arguments args. The message is displayed if object's debug context
has mask that covers level, or if level is either MIRAGE_DEBUG_WARNING or
MIRAGE_DEBUG_ERROR.
|
a MIRAGE_Object |
|
debug level |
|
message format. See the printf() documentation.
|
|
parameters to insert into the format string. |
gboolean mirage_object_set_parent (MIRAGE_Object *self,GObject *parent,GError **error);
Sets object's parent.
|
a MIRAGE_Object |
|
parent |
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure
|
gboolean mirage_object_get_parent (MIRAGE_Object *self,GObject **parent,GError **error);
Retrieves object's parent.
|
a MIRAGE_Object |
|
location to store parent, or NULL
|
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure
|
gboolean mirage_object_attach_child (MIRAGE_Object *self,GObject *child,GError **error);
Attaches child to the object.
|
a MIRAGE_Object |
|
child |
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure
|
gboolean mirage_object_detach_child (MIRAGE_Object *self,GObject *child,GError **error);
Detaches child from the object. Note that the child will keep the debug context it may have been passed to while being attached to the parent.
|
a MIRAGE_Object |
|
child |
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure
|
"object-modified" signalvoid user_function (MIRAGE_Object *mirage_object, gpointer user_data) : Run Last / Has Details
Emitted each mirage_object is changed in a way that causes bottom-up change.
|
the object which received the signal |
|
user data set when the signal handler was connected. |