## MrpObject

MrpObject

## Functions

void | mrp_object_removed ()
void | mrp_object_changed ()
void | mrp_object_set ()
void | mrp_object_get ()
void | mrp_object_set_valist ()
void | mrp_object_get_valist ()
GList * | mrp_object_get_properties ()
void | mrp_object_get_property ()
void | mrp_object_set_property ()

## Properties

MrpProject * | project | Read / Write

## Signals

void | prop-changed | Has Details
void | removed | Run Last

## Types and Values

| MrpObjectPriv
struct | MrpObject

## Object Hierarchy

        GObject
        ╰── MrpObject
            ├── MrpProject
            ├── MrpTask
            ├── MrpResource
            ├── MrpGroup
            ├── MrpAssignment
            ╰── MrpCalendar

## Includes

    #include <libplanner/planner.h>

## Description

## Functions

### mrp_object_removed ()

    void
    mrp_object_removed (MrpObject *object);

Emits the signal `removed`. This means that any references to the object should be dropped, since the object is removed from the project.

#### Parameters

object | an MrpObject |

### mrp_object_changed ()

    void
    mrp_object_changed (MrpObject *object);

Emits the signal needs-saving on the project that this object belongs to, indicating that the project has unsaved changes.

#### Parameters

object | an MrpObject |

### mrp_object_set ()

    void
    mrp_object_set (gpointer object,
                    const gchar *first_property_name,
                    ...);

MrpObject can have custom properties, which are added runtime, for example by a user or plugin. `mrp_object_set()` allows you to set these the value of those properties. It also handles the regular GObject properties, so you can use it to set both custom properties and regular properties at the same time.

#### Parameters

object | an MrpObject |
first_property_name | the name of the first property to set |
... | first value to set, followed by additional name/value pairs to set, NULL terminated |

### mrp_object_get ()

    void
    mrp_object_get (gpointer object,
                    const gchar *first_property_name,
                    ...);

Retrieves the values of a variable number of custom properties or regular properties from an object. See `mrp_object_set()`.

#### Parameters

object | an MrpProject |
first_property_name | the name of the first property to get |
... | first value to get, followed by additional name/value pairs to get, NULL terminated |

### mrp_object_set_valist ()

    void
    mrp_object_set_valist (MrpObject *object,
                           const gchar *first_property_name,
                           va_list var_args);

va_list version of `mrp_object_set()`.

#### Parameters

object | an MrpObject |
first_property_name | the name of the first property to set |
var_args | va_list of arguments |

### mrp_object_get_valist ()

    void
    mrp_object_get_valist (MrpObject *object,
                           const gchar *first_property_name,
                           va_list var_args);

va_list version of `mrp_object_get()`.

#### Parameters

object | an MrpObject |
first_property_name | the name of the first property to get |
var_args | va_list of arguments |

### mrp_object_get_properties ()

    GList *
    mrp_object_get_properties (MrpObject *object);

Retrieves the list of custom properties for the type of `object` .

#### Parameters

object | an MrpObject |

#### Returns

A list of MrpProperty, must not be changed or freed.

[element-type Mrp.Property][transfer none]

### mrp_object_get_property ()

    void
    mrp_object_get_property (MrpObject *object,
                             MrpProperty *property,
                             GValue *value);

Gets a custom property. This is mostly for language bindings. C programmers should use mrp_object_get instead.

#### Parameters

object | an MrpObject |
property | the property to get |
value | the value to get |

### mrp_object_set_property ()

    void
    mrp_object_set_property (MrpObject *object,
                             MrpProperty *property,
                             GValue *value);

Sets a custom property. This is mostly for language bindings. C programmers should use mrp_object_set instead.

#### Parameters

object | an MrpObject |
property | the property to set |
value | the value to set |

## Types and Values

### MrpObjectPriv

    typedef struct _MrpObjectPriv MrpObjectPriv;

### struct MrpObject

    struct MrpObject;

## Property Details

### The `“project”` property

      “project”                  MrpProject *

The project this object belongs to.

Owner: MrpObject

Flags: Read / Write

## Signal Details

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

    void
    user_function (MrpObject *mrpobject,
                   gpointer   arg1,
                   GValue    *arg2,
                   gpointer   user_data)

Flags: Has Details

### The `“removed”` signal

    void
    user_function (MrpObject *mrpobject,
                   gpointer   user_data)

Flags: Run Last