## IdeCommandProvider IdeCommandProvider |

## Functions

void | ide_command_provider_load_shortcuts ()
void | ide_command_provider_unload_shortcuts ()
void | ide_command_provider_query_async ()
GPtrArray * | ide_command_provider_query_finish ()
IdeCommand * | ide_command_provider_get_command_by_id ()

## Types and Values

#define | IDE_TYPE_COMMAND_PROVIDER
struct | IdeCommandProviderInterface
| IdeCommandProvider

## Object Hierarchy

        GInterface
        ╰── IdeCommandProvider

## Prerequisites

IdeCommandProvider requires GObject.

## Description

## Functions

### ide_command_provider_load_shortcuts ()

    void
    ide_command_provider_load_shortcuts (IdeCommandProvider *self,
                                         IdeWorkspace *workspace);

### ide_command_provider_unload_shortcuts ()

    void
    ide_command_provider_unload_shortcuts (IdeCommandProvider *self,
                                           IdeWorkspace *workspace);

### ide_command_provider_query_async ()

    void
    ide_command_provider_query_async (IdeCommandProvider *self,
                                      IdeWorkspace *workspace,
                                      const gchar *typed_text,
                                      GCancellable *cancellable,
                                      GAsyncReadyCallback callback,
                                      gpointer user_data);

### ide_command_provider_query_finish ()

    GPtrArray *
    ide_command_provider_query_finish (IdeCommandProvider *self,
                                       GAsyncResult *result,
                                       GError **error);

Completes an asynchronous request to locate all the commands matching the users typed text.

#### Parameters

self | a IdeCommandProvider |
result | a GAsyncResult |
error | a location for a GError, or `NULL` |

#### Returns

a GPtrArray of IdeCommand, or `NULL`.

[transfer full][element-type IdeCommand]

Since: 3.32

### ide_command_provider_get_command_by_id ()

    IdeCommand *
    ide_command_provider_get_command_by_id
                                   (IdeCommandProvider *self,
                                    IdeWorkspace *workspace,
                                    const gchar *command_id);

Looks for a command by `command_id` and returns it if found.

#### Parameters

self | a IdeCommandProvider |
workspace | an IdeWorkspace |
command_id | the identifier of the command |

#### Returns

an IdeCommand or `NULL`.

[transfer full][nullable]

Since: 3.34

## Types and Values

### IDE_TYPE_COMMAND_PROVIDER

    #define IDE_TYPE_COMMAND_PROVIDER (ide_command_provider_get_type())

### struct IdeCommandProviderInterface

    struct IdeCommandProviderInterface {
      GTypeInterface parent_iface;

      void        (*query_async)       (IdeCommandProvider   *self,
                                        IdeWorkspace         *workspace,
                                        const gchar          *typed_text,
                                        GCancellable         *cancellable,
                                        GAsyncReadyCallback   callback,
                                        gpointer              user_data);
      GPtrArray  *(*query_finish)      (IdeCommandProvider   *self,
                                        GAsyncResult         *result,
                                        GError              **error);
      IdeCommand *(*get_command_by_id) (IdeCommandProvider   *self,
                                        IdeWorkspace         *workspace,
                                        const gchar          *command_id);
      void        (*load_shortcuts)    (IdeCommandProvider   *self,
                                        IdeWorkspace         *workspace);
      void        (*unload_shortcuts)  (IdeCommandProvider   *self,
                                        IdeWorkspace         *workspace);
    };

### IdeCommandProvider

    typedef struct _IdeCommandProvider IdeCommandProvider;