![]() |
![]() |
![]() |
Anjuta Developers Reference Manual | ![]() |
---|---|---|---|---|
#include <libanjuta/interfaces/ianjuta-editor-assist.h> #define IANJUTA_EDITOR_ASSIST_ERROR IAnjutaEditorAssist; IAnjutaEditorAssistIface; GQuark ianjuta_editor_assist_error_quark (void); void ianjuta_editor_assist_cancel_tips (IAnjutaEditorAssist *obj, GError **err); GList* ianjuta_editor_assist_get_suggestions (IAnjutaEditorAssist *obj, const gchar *context, GError **err); void ianjuta_editor_assist_hide_suggestions (IAnjutaEditorAssist *obj, GError **err); void ianjuta_editor_assist_show_tips (IAnjutaEditorAssist *obj, GList *tips, IAnjutaIterable *position, gint char_alignment, GError **err); void ianjuta_editor_assist_suggest (IAnjutaEditorAssist *obj, GList *choices, IAnjutaIterable *position, int char_alignment, GError **err);
typedef struct { IAnjutaEditorIface g_iface; /* Signal */ void (*assist_chosen) (IAnjutaEditorAssist *obj, gint selection); void (*cancel_tips) (IAnjutaEditorAssist *obj, GError **err); GList* (*get_suggestions) (IAnjutaEditorAssist *obj, const gchar *context, GError **err); void (*hide_suggestions) (IAnjutaEditorAssist *obj, GError **err); void (*show_tips) (IAnjutaEditorAssist *obj, GList* tips, IAnjutaIterable *position, gint char_alignment, GError **err); void (*suggest) (IAnjutaEditorAssist *obj, GList* choices, IAnjutaIterable *position, int char_alignment, GError **err); } IAnjutaEditorAssistIface;
void ianjuta_editor_assist_cancel_tips (IAnjutaEditorAssist *obj, GError **err);
obj : |
|
err : |
GList* ianjuta_editor_assist_get_suggestions (IAnjutaEditorAssist *obj, const gchar *context, GError **err);
Usually the editor might have some suggestions to make for a context. For example in a simple word completion context. If the editor has no suggestions to make, it returns NULL.
Returns: A list of suggestions for the given context or NULL if there is nothing to suggest.
obj : |
Self |
context : |
The context for the suggestions. |
err : |
Error propagation and reporting |
Returns : | A list of dynamically allocated strings. The whole list, including the the strings should be freed when done. |
void ianjuta_editor_assist_hide_suggestions (IAnjutaEditorAssist *obj, GError **err);
obj : |
|
err : |
void ianjuta_editor_assist_show_tips (IAnjutaEditorAssist *obj, GList *tips, IAnjutaIterable *position, gint char_alignment, GError **err);
obj : |
|
tips : |
|
position : |
|
char_alignment : |
|
err : |
void ianjuta_editor_assist_suggest (IAnjutaEditorAssist *obj, GList *choices, IAnjutaIterable *position, int char_alignment, GError **err);
Suggest a list of choices to the user. The suggestions are viewed at char_alignment which should be the beginning of the completed word. If choices is NULL, and assist_end signal will occur
obj : |
Self |
choices : |
list of choices. |
position : |
|
char_alignment : |
Character alignment. |
err : |
Error propagation and reporting |
void user_function (IAnjutaEditorAssist *ianjutaeditorassist, gint arg1, gpointer user_data) : Run Last
ianjutaeditorassist : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |