Top | ![]() |
![]() |
![]() |
![]() |
HudClientConnection * | connection | Read / Write / Construct Only |
|
query | Read / Write / Construct |
models-changed | ||
toolbar-updated | ||
voice-query-failed | ||
voice-query-finished | ||
voice-query-heard-something | ||
voice-query-listening | ||
voice-query-loading |
#define | HUD_CLIENT_QUERY_SIGNAL_MODELS_CHANGED |
#define | HUD_CLIENT_QUERY_SIGNAL_TOOLBAR_UPDATED |
struct | HudClientQueryClass |
struct | HudClientQuery |
HudClientQueryPrivate |
A query is an open query to the HUD service which provides
Dee models for the results. The query can update without changing
the search string (the application changes the entires) or can
be udated by calling hud_client_query_set_query()
.
When the usage of the Query is complete it should be unreferenced as that will communicate to the applications that the HUD is closed and they should not update their items.
HudClientQuery *
hud_client_query_new (const gchar *query
);
Startes a query with the HUD using a specific string. This will block until the query is created.
HudClientQuery * hud_client_query_new_for_connection (const
,gchar *queryHudClientConnection *connection
);
Very similar to hud_client_query_new()
except that it uses a
custom connection. This is mostly for testing, though it is
available if you need it.
query |
String to build the initial set of results from |
|
connection |
A custom HudClientConnection to a non-default HUD service |
void hud_client_query_set_query (HudClientQuery *cquery
,const
);gchar *query
This revises the query to be the new query string. Updates can
be seen through the
constgchar * hud_client_query_get_query (HudClientQuery *cquery
);
Accessor for the current query string.
void hud_client_query_voice_query (HudClientQuery *cquery
);
Execute a HUD query using voice recognition.
Will cause a series of signals to be emitted indicating progress:
voice-query-loading - the voice recognition toolkit is loading.
voice-query-failed - the voice recognition toolkit has failed to initialize.
voice-query-listening - the voice recognition toolkit is listening to speech.
voice-query-heard-something - the voice recognition toolkit has heard a complete utterance.
voice-query-finished - the voice recognition toolkit has completed, and has a (possibly empty) result.
DeeModel * hud_client_query_get_results_model (HudClientQuery *cquery
);
Accessor for the current results model.
DeeModel * hud_client_query_get_appstack_model (HudClientQuery *cquery
);
Accessor for the current appstack model.
gboolean hud_client_query_toolbar_item_active (HudClientQuery *cquery
,);
HudClientQueryToolbarItems item
Checks to see if a particular toolbar item is implemented by the application and should be shown to the user as available for use.
GArray * hud_client_query_get_active_toolbar (HudClientQuery *cquery
);
Gets a list of all the active toolbar items as an array. Array should be free'd after use.
void hud_client_query_set_appstack_app (HudClientQuery *cquery
,const
);gchar *application_id
This revises the query application to be application_id. Updates can
be seen through the
void hud_client_query_execute_command (HudClientQuery *cquery
,,
GVariant *command_key);
guint timestamp
Executes a particular entry from the results model. The command_key
should be grabbed from the table and passed to this function to activate
it. This function will block until the command is activated.
HudClientParam * hud_client_query_execute_param_command (HudClientQuery *cquery
,,
GVariant *command_key);
guint timestamp
Executes a command that results in a parameterized dialog which is controlled using the returned HudClientParam object. When created this sends the "opened" event to the application.
void hud_client_query_execute_toolbar_item (HudClientQuery *cquery
,,
HudClientQueryToolbarItems item);
guint timestamp
Executes a particular item in the tool bar. The item should be active before passing this.
constgchar * hud_client_query_appstack_get_app_id (HudClientQuery *cquery
,);
DeeModelIter *row
Get the application ID for a given row in the appstack table.
constgchar * hud_client_query_appstack_get_app_icon (HudClientQuery *cquery
,);
DeeModelIter *row
Get the application icon for a given row in the appstack table.
GVariant * hud_client_query_results_get_command_id (HudClientQuery *cquery
,);
DeeModelIter *row
Get the command ID for a given row in the results table.
constgchar * hud_client_query_results_get_command_name (HudClientQuery *cquery
,);
DeeModelIter *row
Get the human readable command name for a given row in the results table.
GVariant * hud_client_query_results_get_command_highlights (HudClientQuery *cquery
,);
DeeModelIter *row
Get the command highlights for a row in the table with start and stop characters in an array.
constgchar * hud_client_query_results_get_description (HudClientQuery *cquery
,);
DeeModelIter *row
Get the human readable description for the command in the given row in the results table.
GVariant * hud_client_query_results_get_description_highlights (HudClientQuery *cquery
,);
DeeModelIter *row
Get the description highlights for a row in the table with start and stop characters in an array.
constgchar * hud_client_query_results_get_shortcut (HudClientQuery *cquery
,);
DeeModelIter *row
Get the human readable shortcut for the command in the given row in the results table.
gboolean hud_client_query_results_is_parameterized (HudClientQuery *cquery
,);
DeeModelIter *row
Check to see if the given command is parameterized
#define HUD_CLIENT_QUERY_SIGNAL_MODELS_CHANGED "models-changed"
Signal to indicate when the models have changed
#define HUD_CLIENT_QUERY_SIGNAL_TOOLBAR_UPDATED "toolbar-updated"
Signal to indicate when the toolbar has been updated
struct HudClientQueryClass { GObjectClass parent_class; };
Class information for HudClientQuery
struct HudClientQuery;
Object to track a query and the models for that query. Should be unref'd when a client is done using the query so that applications can be told that the HUD is no longer open.
typedef struct _HudClientQueryPrivate HudClientQueryPrivate;
Private data for HudClientQuery.
“connection”
property“connection” HudClientConnection *
HUD service connection.
Flags: Read / Write / Construct Only
“models-changed”
signalvoid user_function (HudClientQuery *arg0,gpointer user_data)
Something has caused the models to be changed, you should probably figure out their state again.
Flags:
“toolbar-updated”
signalvoid user_function (HudClientQuery *arg0,gpointer user_data)
The active items in the toolbar changed. Please requery.
Flags:
“voice-query-failed”
signalvoid user_function (HudClientQuery *arg0,gchar *arg1,gpointer user_data)
The voice recognition toolkit has failed to connect to the audio device. The specific cause is provided as an argument.
Flags:
“voice-query-finished”
signalvoid user_function (HudClientQuery *arg0,gchar *arg1,gpointer user_data)
The voice recognition toolkit has completed and has a (possibly empty) result.
Flags:
“voice-query-heard-something”
signalvoid user_function (HudClientQuery *arg0,gpointer user_data)
The voice recognition toolkit has heard an utterance.
Flags:
“voice-query-listening”
signalvoid user_function (HudClientQuery *arg0,gpointer user_data)
The voice recognition toolkit is active and listening for speech.
Flags:
“voice-query-loading”
signalvoid user_function (HudClientQuery *arg0,gpointer user_data)
The voice recognition toolkit is loading, and not ready for speech yet.
Flags: