Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | talkatu_view_new () |
GtkWidget * | talkatu_view_new_with_buffer () |
void | talkatu_view_set_send_binding () |
TalkatuViewSendBinding | talkatu_view_get_send_binding () |
void | talkatu_view_send_message () |
void | format-activate | Action |
void | open-url | Action |
void | send-message | Action |
void | should-send-message | Action |
enum | TalkatuViewSendBinding |
#define | TALKATU_TYPE_VIEW |
struct | TalkatuViewClass |
TalkatuView |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkTextView ╰── TalkatuView ╰── TalkatuHistory
TalkatuView handles the display of a TalkatuBuffer, the keybindings for applying formats, as well as displaying links.
GtkWidget *
talkatu_view_new (void
);
Creates a new TalkatuView with a TalkatuBuffer.
GtkWidget *
talkatu_view_new_with_buffer (GtkTextBuffer *buffer
);
Creates a new TalkatuView with buffer
.
void talkatu_view_set_send_binding (TalkatuView *view
,TalkatuViewSendBinding bindings
);
Sets the bindings for when the send-message signal should be emitted.
TalkatuViewSendBinding
talkatu_view_get_send_binding (TalkatuView *view
);
Gets the TalkatuViewSendBinding which determines when send-message signal will be emitted.
void
talkatu_view_send_message (TalkatuView *view
);
Emits the signal that view
is trying to send a message. This is used for
cases like the optional send button in TalkatuEditor and other instances
where the user has performed an action to send a message.
Flags for assigning and determining which key bindings should be used to send a message.
struct TalkatuViewClass { GtkTextViewClass parent; void (*format_activate)(TalkatuView *view, const gchar *action_name); void (*should_send_message)(TalkatuView *view, TalkatuViewSendBinding binding); void (*send_message)(TalkatuView *view); void (*open_url)(TalkatuView *view, const gchar *url); gpointer reserved[5]; };
“send-binding”
property“send-binding” TalkatuViewSendBinding
The keybindings that will trigger the send signal.
Flags: Read / Write / Construct
Default value: TALKATU_VIEW_SEND_BINDING_RETURN | TALKATU_VIEW_SEND_BINDING_KP_ENTER
“format-activate”
signalvoid user_function (TalkatuView *talkatutextview, gchar *arg1, gpointer user_data)
Emitted by the keybindings to apply a format to the underlying buffer.
talkatutextview |
The TalkatuView instance. |
|
arg1 |
The name of the action to activated. |
|
user_data |
User supplied data. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“open-url”
signalvoid user_function (TalkatuView *talkatutextview, gchar *url, gpointer user_data)
Emitted when a user clicks on a link to open the url
talkatutextview |
The TalkatuView instances. |
|
url |
The URL to open. |
|
user_data |
User supplied data. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“send-message”
signalvoid user_function (TalkatuView *talkatutextview, gpointer user_data)
Emitted when a message should be sent.
talkatutextview |
The TalkatuView instance. |
|
user_data |
User supplied data. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“should-send-message”
signalvoid user_function (TalkatuView *talkatutextview, TalkatuViewSendBinding arg1, gpointer user_data)
Emitted when a potential keybinding to send the message is entered to determine if the message should be sent.
talkatutextview |
The TalkatuView instance. |
|
arg1 |
The TalkatuViewSendBinding that was entered. |
|
user_data |
User supplied data. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action