## MirageObject

MirageObject — Base object class.

## Functions

gpointer | mirage_object_get_parent ()
void | mirage_object_set_parent ()

## Signals

void | context-changed | Run Last

## Types and Values

struct | MirageObject
struct | MirageObjectClass

## Object Hierarchy

        GObject
        ╰── MirageObject
            ├── MirageCdTextCoder
            ├── MirageDisc
            ├── MirageFileStream
            ├── MirageFilterStream
            ├── MirageFragment
            ├── MirageIndex
            ├── MirageLanguage
            ├── MirageParser
            ├── MirageSector
            ├── MirageSession
            ├── MirageTrack
            ╰── MirageWriter

## Implemented Interfaces

MirageObject implements MirageContextual.

## Includes

    #include <mirage-object.h>

## Description

MirageObject is used as a base object class throughout libMirage. It implements MirageContextual interface, which allows attachment of MirageContext. It also implements support for constructing parent-child hierarchy, which allows propagation of the MirageContext and its changes from parent to the child objects.

## Functions

### mirage_object_get_parent ()

    gpointer
    mirage_object_get_parent (MirageObject *self);

Returns pointer to object's parent object.

#### Parameters

self | a MirageObject |

#### Returns

parent object, or `NULL`.

[transfer full][type MirageObject]

### mirage_object_set_parent ()

    void
    mirage_object_set_parent (MirageObject *self,
                              gpointer parent);

Sets object's parent. If `parent` is `NULL`, the object's parent is reset.

#### Parameters

self | a MirageObject |
parent | parent. | [in][allow-none][type MirageObject]

## Types and Values

### struct MirageObject

    struct MirageObject;

All the fields in the MirageObject structure are private to the MirageObject implementation and should never be accessed directly.

### struct MirageObjectClass

    struct MirageObjectClass {
        GObjectClass parent_class;
    };

The class structure for the MirageObject type.

#### Members

## Signal Details

### The `“context-changed”` signal

    void
    user_function (MirageObject *object,
                   gpointer      user_data)

Emitted when a new MirageContext is set to a MirageObject.

#### Parameters

object | a MirageObject |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

## See Also

MirageContext, MirageContextual