IdeObject: gnome-builder Reference Manual

## IdeObject IdeObject |

## Functions

IdeContext * | ide_object_get_context ()
void | ide_object_set_context ()
void | ide_object_new_for_extension_async ()
void | ide_object_new_async ()
IdeObject * | ide_object_new_finish ()
gboolean | ide_object_hold ()
void | ide_object_release ()
void | ide_object_notify_in_main ()

## Properties

IdeContext * | context | Read / Write / Construct Only

## Signals

void | destroy | Run Last

## Types and Values

#define | IDE_TYPE_OBJECT
struct | IdeObjectClass
| IdeObject

## Object Hierarchy

        GObject
        ╰── IdeObject
            ├── IdeFileSettings
            ├── IdeScript
            ├── IdeBackForwardItem
            ├── IdeBackForwardList
            ├── IdeBufferChangeMonitor
            ├── IdeBufferManager
            ├── IdeBuildResult
            ├── IdeBuilder
            ├── IdeDeployer
            ├── IdeDevice
            ├── IdeDeviceManager
            ├── IdeDiagnostician
            ├── IdeDirectoryBuildSystem
            ├── IdeDirectoryVcs
            ├── IdeExtensionAdapter
            ├── IdeExtensionSetAdapter
            ├── IdeFile
            ├── IdeHighlightEngine
            ├── IdeProjectItem
            ├── IdeProject
            ├── IdeScriptManager
            ├── IdeSearchContext
            ├── IdeSearchEngine
            ├── IdeSearchResult
            ├── IdeSettings
            ├── IdeSymbolNode
            ├── IdeUnsavedFiles
            ├── IdeConfiguration
            ├── IdeConfigurationManager
            ╰── IdeRuntimeManager

## Known Derived Interfaces

IdeObject is required by IdeBuildSystem, IdeDebugger, IdeDeviceProvider, IdeDiagnosticProvider, IdeExecutable, IdeExecuter, IdeHighlighter, IdeProcess, IdeSearchProvider, IdeSymbolResolver, IdeTarget, IdeTestCase, IdeTestSuite and IdeVcs.

## Description

## Functions

### ide_object_get_context ()

    IdeContext *
    ide_object_get_context (IdeObject *self);

Fetches the “context” property.

#### Returns

An IdeContext.

[transfer none]

### ide_object_set_context ()

    void
    ide_object_set_context (IdeObject *self,
                            IdeContext *context);

### ide_object_new_for_extension_async ()

    void
    ide_object_new_for_extension_async (GType interface_gtype,
                                        GCompareDataFunc sort_priority_func,
                                        gpointer sort_proirity_data,
                                        int io_priority,
                                        GCancellable *cancellable,
                                        GAsyncReadyCallback callback,
                                        gpointer user_data,
                                        const gchar *first_property,
                                        ...);

#### Parameters

sort_priority_func | A GCompareDataFunc or `NULL`. | [scope call][allow-none]

### ide_object_new_async ()

    void
    ide_object_new_async (const gchar *extension_point,
                          int io_priority,
                          GCancellable *cancellable,
                          GAsyncReadyCallback callback,
                          gpointer user_data,
                          const gchar *first_property,
                          ...);

### ide_object_new_finish ()

    IdeObject *
    ide_object_new_finish (GAsyncResult *result,
                           GError **error);

### ide_object_hold ()

    gboolean
    ide_object_hold (IdeObject *self);

This function will acquire a reference to the IdeContext that the object is a part of. This is useful if you are going to be doing a long running task (such as something in a thread) and want to ensure the context cannot be unloaded during your operation.

You should call `ide_object_release()` an equivalent number of times to ensure the context may be freed afterwards.

You should check the return value of this function to ensure that the context is not already in shutdown.

#### Parameters

self | the IdeObject |

#### Returns

`TRUE` if a hold was successfully created.

### ide_object_release ()

    void
    ide_object_release (IdeObject *self);

Releases a successful hold on the context previously created with `ide_object_hold()`.

#### Parameters

self | the IdeObject. |

### ide_object_notify_in_main ()

    void
    ide_object_notify_in_main (gpointer instance,
                               GParamSpec *pspec);

## Types and Values

### IDE_TYPE_OBJECT

    #define IDE_TYPE_OBJECT (ide_object_get_type())

### struct IdeObjectClass

    struct IdeObjectClass {
      GObjectClass parent;

      void (*destroy)     (IdeObject  *self);
      void (*set_context) (IdeObject  *self,
                           IdeContext *context);
    };

### IdeObject

    typedef struct _IdeObject IdeObject;

## Property Details

### The `“context”` property

      “context”                  IdeContext *

The context that owns the object.

Flags: Read / Write / Construct Only

## Signal Details

### The `“destroy”` signal

    void
    user_function (IdeObject *ideobject,
                   gpointer   user_data)

Flags: Run Last