Top |
TeplLanguageChooserTeplLanguageChooser — Interface implemented by widgets for choosing a GtkSourceLanguage |
TeplLanguageChooser is implemented by TeplLanguageChooserDialog and TeplLanguageChooserWidget.
A TeplLanguageChooser widget shows a list of available GtkSourceLanguage's,
as returned by gtk_source_language_manager_get_default()
. The list contains a
"Plain Text" item for the NULL
language.
The typical workflow when using a TeplLanguageChooser widget in an application is:
Create a TeplLanguageChooser widget.
Call tepl_language_chooser_select_language()
with the value of the
“language” property.
Wait for the “language-activated” signal to be emitted and/or destroy the TeplLanguageChooser widget.
void tepl_language_chooser_select_language (TeplLanguageChooser *chooser
,GtkSourceLanguage *language
);
Selects language
in the list.
Since: 6.0
struct TeplLanguageChooserInterface { GTypeInterface parent_interface; /* Interface functions */ void (* select_language) (TeplLanguageChooser *chooser, GtkSourceLanguage *language); /* Signals */ void (* language_activated) (TeplLanguageChooser *chooser, GtkSourceLanguage *language); };
The virtual function table for TeplLanguageChooser.
GTypeInterface |
The parent interface. |
|
The virtual function pointer for |
||
The function pointer for the “language-activated” signal. |
Since: 6.0
“language-activated”
signalvoid user_function (TeplLanguageChooser *chooser, GtkSourceLanguage *language, gpointer user_data)
This signal is emitted when the user has chosen a language.
chooser |
the TeplLanguageChooser emitting the signal. |
|
language |
the GtkSourceLanguage object that has been
selected, or |
[nullable] |
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 6.0