Top | ![]() |
![]() |
![]() |
![]() |
DzlSuggestion * | dzl_suggestion_new () |
const gchar * | dzl_suggestion_get_id () |
void | dzl_suggestion_set_id () |
const gchar * | dzl_suggestion_get_icon_name () |
void | dzl_suggestion_set_icon_name () |
const gchar * | dzl_suggestion_get_title () |
void | dzl_suggestion_set_title () |
const gchar * | dzl_suggestion_get_subtitle () |
void | dzl_suggestion_set_subtitle () |
gchar * | dzl_suggestion_suggest_suffix () |
gchar * | dzl_suggestion_replace_typed_text () |
GIcon * | dzl_suggestion_get_icon () |
cairo_surface_t * | dzl_suggestion_get_icon_surface () |
void dzl_suggestion_set_icon_name (DzlSuggestion *self
,const gchar *icon_name
);
void dzl_suggestion_set_title (DzlSuggestion *self
,const gchar *title
);
void dzl_suggestion_set_subtitle (DzlSuggestion *self
,const gchar *subtitle
);
gchar * dzl_suggestion_suggest_suffix (DzlSuggestion *self
,const gchar *typed_text
);
This function requests potential text to append to typed_text
to make it
more clear to the user what they will be activating by selecting this
suggestion. For example, if they start typing "gno", a potential suggested
suffix might be "me.org" to create "gnome.org".
gchar * dzl_suggestion_replace_typed_text (DzlSuggestion *self
,const gchar *typed_text
);
This function is meant to be used to replace the text in the entry with text that represents the suggestion most accurately. This happens when the user presses tab while typing a suggestion. For example, if typing "gno" in the entry, you might have a suggest_suffix of "me.org" so that the user sees "gnome.org". But the replace_typed_text might include more data such as "https://gnome.org" as it more closely represents the suggestion.
GIcon *
dzl_suggestion_get_icon (DzlSuggestion *self
);
Gets the icon for the suggestion, if any.
Since: 3.30
cairo_surface_t * dzl_suggestion_get_icon_surface (DzlSuggestion *self
,GtkWidget *widget
);
This function allows subclasses to dynamicly generate content for the suggestion such as may be required when integrating with favicons or similar.
widget
is provided so that the implementation may determine scale or
any other style-specific settings from the style context.
Since: 3.30
struct DzlSuggestionClass { GObjectClass parent_class; gchar *(*suggest_suffix) (DzlSuggestion *self, const gchar *typed_text); gchar *(*replace_typed_text) (DzlSuggestion *self, const gchar *typed_text); GIcon *(*get_icon) (DzlSuggestion *self); cairo_surface_t *(*get_icon_surface) (DzlSuggestion *self, GtkWidget *widget); gpointer _reserved3; gpointer _reserved4; };
“icon-name”
property “icon-name” gchar *
The name of the icon to display.
Flags: Read / Write
Default value: NULL
“subtitle”
property “subtitle” gchar *
The subtitle of the suggestion.
Flags: Read / Write
Default value: NULL
“replace-typed-text”
signalgchar* user_function (DzlSuggestion *dzlsuggestion, gchar *arg1, gpointer user_data)
Flags: Run Last
“suggest-suffix”
signalgchar* user_function (DzlSuggestion *dzlsuggestion, gchar *arg1, gpointer user_data)
Flags: Run Last