![]() |
![]() |
![]() |
libMirage Reference Manual | ![]() |
---|---|---|---|---|
#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_mirage (MIRAGE_Object *self, GObject *mirage, GError **error); gboolean mirage_object_get_mirage (MIRAGE_Object *self, GObject **mirage, GError **error); 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);
GObject +----MIRAGE_Object +----MIRAGE_Mirage +----MIRAGE_Session +----MIRAGE_Disc +----MIRAGE_Track +----MIRAGE_Sector +----MIRAGE_Index +----MIRAGE_Language +----MIRAGE_Fragment +----MIRAGE_CDTextEncDec
MIRAGE_Object is used as a base object class throughout libMirage. It implements support for layout definitions (setting object's parent and children), debugging via debug contexts and passing reference to MIRAGE_Mirage object.
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_mirage (MIRAGE_Object *self, GObject *mirage, GError **error);
Sets object's libMirage core object.
|
a MIRAGE_Object |
|
libMirage core object |
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure
|
gboolean mirage_object_get_mirage (MIRAGE_Object *self, GObject **mirage, GError **error);
Retrieves object's libMirage core object. A reference to libMirage core object
is stored in mirage
; it should be released with g_object_unref()
when no
longer needed.
|
a MIRAGE_Object |
|
location to store libMirage core object, or NULL
|
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure
|
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
|
"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. |