![]() |
![]() |
![]() |
libhud-client Docs | ![]() |
---|---|---|---|---|
Top | Description |
#include <libhud-client/query.h> #define HUD_CLIENT_QUERY_SIGNAL_MODELS_CHANGED #define HUD_CLIENT_QUERY_SIGNAL_TOOLBAR_UPDATED struct HudClientQueryClass; enum HudClientQueryToolbarItems;HudClientQuery * hud_client_query_new (const
);gchar *queryHudClientQuery * hud_client_query_new_for_connection (const
,gchar *query);
HudClientConnection *connectionvoid hud_client_query_set_query (,
HudClientQuery *cqueryconst
); constgchar *querygchar * hud_client_query_get_query ();
HudClientQuery *cqueryvoid hud_client_query_voice_query ();
HudClientQuery *cqueryDeeModel * hud_client_query_get_results_model ();
HudClientQuery *cqueryDeeModel * hud_client_query_get_appstack_model ();
HudClientQuery *cquerygboolean hud_client_query_toolbar_item_active (,
HudClientQuery *cqueryHudClientQueryToolbarItems item
);GArray * hud_client_query_get_active_toolbar ();
HudClientQuery *cqueryvoid hud_client_query_set_appstack_app (,
HudClientQuery *cqueryconst
);gchar *application_idvoid hud_client_query_execute_command (,
HudClientQuery *cquery,
GVariant *command_key);
guint timestampHudClientParam * hud_client_query_execute_param_command (,
HudClientQuery *cquery,
GVariant *command_key);
guint timestampvoid hud_client_query_execute_toolbar_item (,
HudClientQuery *cqueryHudClientQueryToolbarItems item
,); const
guint timestampgchar * hud_client_query_appstack_get_app_id (,
HudClientQuery *cquery); const
DeeModelIter *rowgchar * hud_client_query_appstack_get_app_icon (,
HudClientQuery *cquery);
DeeModelIter *rowGVariant * hud_client_query_results_get_command_id (,
HudClientQuery *cquery); const
DeeModelIter *rowgchar * hud_client_query_results_get_command_name (,
HudClientQuery *cquery);
DeeModelIter *rowGVariant * hud_client_query_results_get_command_highlights (,
HudClientQuery *cquery); const
DeeModelIter *rowgchar * hud_client_query_results_get_description (,
HudClientQuery *cquery);
DeeModelIter *rowGVariant * hud_client_query_results_get_description_highlights (,
HudClientQuery *cquery); const
DeeModelIter *rowgchar * hud_client_query_results_get_shortcut (,
HudClientQuery *cquery);
DeeModelIter *rowgboolean hud_client_query_results_is_parameterized (,
HudClientQuery *cquery);
DeeModelIter *row
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.
#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
typedef enum { /*< prefix=HUD_CLIENT_QUERY_TOOLBAR >*/ HUD_CLIENT_QUERY_TOOLBAR_FULLSCREEN, HUD_CLIENT_QUERY_TOOLBAR_HELP, HUD_CLIENT_QUERY_TOOLBAR_PREFERENCES, HUD_CLIENT_QUERY_TOOLBAR_UNDO, } HudClientQueryToolbarItems;
The toolbar has a set of preconfigured items in it for the application. This enum represents them.
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.
|
String to build the initial set of results from |
Returns : |
A new |
HudClientQuery * hud_client_query_new_for_connection (const
,gchar *query);
HudClientConnection *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.
|
String to build the initial set of results from |
|
A custom |
Returns : |
A new |
void hud_client_query_set_query (,
HudClientQuery *cqueryconst
);gchar *query
This revises the query to be the new query string. Updates can
be seen through the
|
A |
|
New query string |
constgchar * hud_client_query_get_query ();
HudClientQuery *cquery
Accessor for the current query string.
|
A |
Returns : |
Query string. [transfer none] |
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.
|
A |
DeeModel * hud_client_query_get_results_model ();
HudClientQuery *cquery
Accessor for the current results model.
|
A |
Returns : |
Results Model. [transfer none] |
DeeModel * hud_client_query_get_appstack_model ();
HudClientQuery *cquery
Accessor for the current appstack model.
|
A |
Returns : |
Appstack Model. [transfer none] |
gboolean hud_client_query_toolbar_item_active (,
HudClientQuery *cqueryHudClientQueryToolbarItems 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.
|
A |
|
Item to check for |
Returns : |
Whether this item is active. |
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.
|
A |
Returns : |
A list of the active toolbar items. [transfer full][element-type HudClientQueryToolbarItems] |
void hud_client_query_set_appstack_app (,
HudClientQuery *cqueryconst
);gchar *application_id
This revises the query application to be application_id. Updates can
be seen through the
|
A |
|
New application to get results from |
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.
|
A |
|
The key from the results model for the entry to activate |
|
Timestamp for the user event |
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
|
A |
|
The key from the results model for the entry to activate |
|
Timestamp for the user event |
Returns : |
Object to control the parameterized dialog. [transfer full] |
void hud_client_query_execute_toolbar_item (,
HudClientQuery *cqueryHudClientQueryToolbarItems item
,);
guint timestamp
Executes a particular item in the tool bar. The item should be active before passing this.
|
A |
|
Which toolbar item is being activated |
|
Timestamp for the user event |
constgchar * hud_client_query_appstack_get_app_id (,
HudClientQuery *cquery);
DeeModelIter *row
Get the application ID for a given row in the appstack table.
|
A |
|
Which row in the table to grab the ID from |
Returns : |
The application ID |
constgchar * hud_client_query_appstack_get_app_icon (,
HudClientQuery *cquery);
DeeModelIter *row
Get the application icon for a given row in the appstack table.
|
A |
|
Which row in the table to grab the icon from |
Returns : |
The application icon |
GVariant * hud_client_query_results_get_command_id (,
HudClientQuery *cquery);
DeeModelIter *row
Get the command ID for a given row in the results table.
|
A |
|
Which row in the table to grab the ID from |
Returns : |
The command ID. [transfer full] |
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.
|
A |
|
Which row in the table to grab the name from |
Returns : |
The command name |
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.
|
A |
|
Which row in the table to grab the highlights from |
Returns : |
The command highlights as a variant of type "a(ii)". [transfer full] |
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.
|
A |
|
Which row in the table to grab the description from |
Returns : |
The description |
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.
|
A |
|
Which row in the table to grab the highlights from |
Returns : |
The description highlights as a variant of type "a(ii)". [transfer full] |
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.
|
A |
|
Which row in the table to grab the shortcut from |
Returns : |
The shortcut |
gboolean hud_client_query_results_is_parameterized (,
HudClientQuery *cquery);
DeeModelIter *row
Check to see if the given command is parameterized
|
A |
|
Which row in the table to check if the command is parameterized |
Returns : |
Whether the command in the row is parameterized |