GtkSourceCompletion 2.0 Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy |
#define GSC_PROVIDER_GET_INTERFACE (obj) #define GSC_COMPLETION_CAPABILITY_INTERACTIVE #define GSC_COMPLETION_CAPABILITY_AUTOMATIC GscProvider; GscProviderIface; const gchar * gsc_provider_get_name (GscProvider *provider); GdkPixbuf * gsc_provider_get_icon (GscProvider *provider); void gsc_provider_populate_completion (GscProvider *provider, GscContext *context); const gchar * gsc_provider_get_capabilities (GscProvider *provider); GtkWidget * gsc_provider_get_info_widget (GscProvider *provider, GscProposal *proposal); void gsc_provider_update_info (GscProvider *provider, GscProposal *proposal, GscInfo *info); gboolean gsc_provider_activate_proposal (GscProvider *provider, GscProposal *proposal, GtkTextIter *iter);
#define GSC_PROVIDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GSC_TYPE_PROVIDER, GscProviderIface))
|
#define GSC_COMPLETION_CAPABILITY_INTERACTIVE "standard::interactive"
#define GSC_COMPLETION_CAPABILITY_AUTOMATIC "standard::automatic"
typedef struct { GTypeInterface g_iface; const gchar *(*get_name) (GscProvider *provider); GdkPixbuf *(*get_icon) (GscProvider *provider); void (*populate_completion) (GscProvider *provider, GscContext *context); const gchar *(*get_capabilities) (GscProvider *provider); GtkWidget *(*get_info_widget) (GscProvider *provider, GscProposal *proposal); void (*update_info) (GscProvider *provider, GscProposal *proposal, GscInfo *info); gboolean (*activate_proposal) (GscProvider *provider, GscProposal *proposal, GtkTextIter *iter); } GscProviderIface;
const gchar * gsc_provider_get_name (GscProvider *provider);
Get the name of the provider. This should be a translatable name for display to the user. For example: _("Document word completion provider").
|
The GscProvider |
Returns : |
The name of the provider. |
GdkPixbuf * gsc_provider_get_icon (GscProvider *provider);
Get the icon of the provider.
|
The GscProvider |
Returns : |
The icon to be used for the provider, or NULL if the provider does
not have a special icon.
|
void gsc_provider_populate_completion (GscProvider *provider, GscContext *context);
TODO Document this function
|
The GscProvider |
|
The GscContext to add the proposals, get the current criteria etc. |
const gchar * gsc_provider_get_capabilities (GscProvider *provider);
A list of capabilities this provider supports
|
The GscProvider |
Returns : |
list of capabilities. |
GtkWidget * gsc_provider_get_info_widget (GscProvider *provider, GscProposal *proposal);
Get a customized info widget to show extra information of a proposal.
This allows for customized widgets on a proposal basis, although in general
providers will have the same custom widget for all their proposals and
proposal
can be ignored. The implementation of this function is optional.
If implemented, gsc_provider_update_info MUST also be
implemented. If not implemented, the default
gsc_proposal_get_info will be used to display extra
information about a GscProposal.
|
The GscProvider |
|
The currently selected GscProposal |
Returns : |
a custom GtkWidget to show extra information about proposal .
|
void gsc_provider_update_info (GscProvider *provider, GscProposal *proposal, GscInfo *info);
Update extra information shown in info
for proposal
. This should be
implemented if your provider sets a custom info widget for proposal
.
This function MUST be implemented when
gsc_provider_get_info_widget is implemented.
|
A GscProvider |
|
A GscProposal |
|
A GscInfo |
gboolean gsc_provider_activate_proposal (GscProvider *provider, GscProposal *proposal, GtkTextIter *iter);
Activate proposal
at iter
. When this functions returns FALSE
, the default
activation of proposal
will take place which replaces the word at iter
with the label of proposal
.
|
A GscProvider |
|
A GscProposal |
|
A GtkTextIter |
Returns : |
TRUE to indicate that the proposal activation has been handled,
FALSE otherwise.
|