Top | ![]() |
![]() |
![]() |
![]() |
IdeObjectIdeObject — Base object for IdeContext related objects |
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 () |
void | ide_object_message () |
void | ide_object_warning () |
gboolean | ide_object_is_unloading () |
GObject ╰── IdeObject ├── IdeFileSettings ├── IdeBufferChangeMonitor ├── IdeBufferManager ├── IdeBuildManager ├── IdeBuildPipeline ├── IdeBuildStage ├── IdeConfiguration ├── IdeConfigurationManager ├── IdeDebugManager ├── IdeDebugger ├── IdeDeployStrategy ├── IdeDevice ├── IdeDeviceManager ├── IdeDeviceProvider ├── IdeDiagnosticsManager ├── IdeDirectoryBuildSystem ├── IdeDirectoryVcs ├── IdeExtensionAdapter ├── IdeExtensionSetAdapter ├── IdeFile ├── IdeHighlightEngine ├── IdeLangservClient ├── IdeLangservCompletionProvider ├── IdeLangservDiagnosticProvider ├── IdeLangservFormatter ├── IdeLangservHighlighter ├── IdeLangservHoverProvider ├── IdeLangservRenameProvider ├── IdeSymbolNode ├── IdeLangservSymbolResolver ├── IdeProject ├── IdeProjectItem ├── IdeRunManager ├── IdeRunner ├── IdeRuntime ├── IdeRuntimeManager ├── IdeSearchEngine ├── IdeSession ├── IdeSettings ├── IdeSimpleBuildTarget ├── IdeToolchain ├── IdeTestManager ├── IdeTestProvider ├── IdeToolchainManager ├── IdeUnsavedFiles ╰── IdeVcsMonitor
IdeObject is required by IdeBuildPipelineAddin, IdeBuildSystem, IdeBuildTarget, IdeCodeIndexer, IdeConfigurationProvider, IdeDependencyUpdater, IdeDiagnosticProvider, IdeHighlighter, IdeIndenter, IdeRenameProvider, IdeSearchProvider, IdeService, IdeSessionAddin, IdeSymbolResolver, IdeToolchainProvider and IdeVcs.
The IdeObject abstract class provides a base class for ojects that are
related to IdeContext. It provides easy access to the IdeContext using
ide_object_get_context()
.
Some interfaces in Builder require that you use IdeObject as a base class. In these cases, inherit from IdeObject instead of GObject.
If your subclass is going to do long running work which requires that the
IdeContext cannot be unloaded until it has finished, use ide_object_hold()
to ensure this property. Call ide_object_release()
when no longer necessary.
IdeContext *
ide_object_get_context (IdeObject *self
);
Fetches the “context” property.
Since: 3.18
void ide_object_set_context (IdeObject *self
,IdeContext *context
);
Sets the IdeContext for the object.
Since: 3.18
void ide_object_new_for_extension_async (GType interface_gtype
,GCompareDataFunc sort_priority_func
,gpointer sort_priority_data
,int io_priority
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
,const gchar *first_property
,...
);
This function is similar to ide_object_new_async()
but uses a specific
interface GType to locate the plugin. The first matching interface which
is successfully created is returned after asynchronous initialization.
Use sort_priority_func
to alter the priority of the extensions before
attempting to initialize them.
interface_gtype |
the GType of the extension interface |
|
sort_priority_func |
a GCompareDataFunc or |
[scope call][allow-none] |
sort_priority_data |
data for |
[nullable] |
io_priority |
An io priority or |
|
cancellable |
a GCancellable or |
[nullable] |
callback |
A callback to complete the request. |
[nullable] |
user_data |
user data for |
[nullable] |
first_property |
The first property to set, or |
[nullable] |
... |
the value for the first property |
Since: 3.22
void ide_object_new_async (const gchar *extension_point
,int io_priority
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
,const gchar *first_property
,...
);
This helper creates a new IdeObject that is registered for a given extension point.
The result can be fetched by calling ide_object_new_finish()
from
the provided callback
.
extension_point |
The identifier of the extension point |
|
io_priority |
An io priority or |
|
cancellable |
a GCancellable or |
[nullable] |
callback |
a GAsyncReadyCallback. |
[nullable] |
user_data |
user data for |
|
first_property |
the first property to set, or |
|
... |
the value for the first property |
Since: 3.18
IdeObject * ide_object_new_finish (GAsyncResult *result
,GError **error
);
Completes an asynchronous request to create a new IdeObject subclass.
Since: 3.18
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.
Since: 3.18
void
ide_object_release (IdeObject *self
);
Releases a successful hold on the context previously created with
ide_object_hold()
.
Since: 3.18
void ide_object_notify_in_main (gpointer instance
,GParamSpec *pspec
);
This helper will perform a g_object_notify_by_pspec()
with the
added requirement that it is run from the applications main thread.
You may want to do this when modifying state from a thread, but only notify from the Gtk+ thread.
This will *always* return to the default main context, and never emit ::notify immediately.
Since: 3.18
struct IdeObjectClass { GObjectClass parent; void (*destroy) (IdeObject *self); IdeContext *(*get_context) (IdeObject *self); void (*set_context) (IdeObject *self, IdeContext *context); };
“context”
property“context” IdeContext *
The context that owns the object.
Flags: Read / Write / Construct Only