Namespace

Talkatu – 0.0

Talkatu Plugin Library

Version0.1.1-dev
AuthorsTalkatu Developers
LicenseLGPL-2.1-or-later
Websitehttps://keep.imfreedom.org/talkatu/talkatu/
Sourcehttps://keep.imfreedom.org/talkatu/talkatu/

Build

C headerstalkatu/talkatu.h
pkg-config filestalkatu

Dependencies

GLib—2.0 General-purpose, portable utility library.
Browse documentation
GModule—2.0 Portable API for dynamically loading modules
Browse documentation
GObject—2.0 The base type system library
Browse documentation
Gtk—4.0 The GTK toolkit
Browse documentation

Additional documentation

Classes

ActionGroup

A GSimpleActionGroup subclass that contains all of the actions for formatting text in Talkatu. They are typically created by TalkatuBuffer subclasses.

AttachmentDialog

A GtkDialog that allows the user to customize an image message.

AttachmentPreview

A GtkWidget that displays a preview of a TalkatuAttachment and allows the user to save it.

AutoScroller

This is a simple subclass of GtkAdjustment that has helpers for keyboard navigation as well as the ability to automatically scroll to the max when new items are added if the widget was already scrolled all the way to the bottom.

Buffer

A GtkTextBuffer subclass that will automatically apply formatting according to the actions in a GSimpleAction group.

Editor

A composite widget that contains a TalkatuToolbar, TalkatuInput, and an optional send button in the common instant messaging input layout.

History

A TalkatuView subclass that is used to display a conversation.

HistoryRow

A GtkListBoxRow subclass that is used to display a TalkatuMessage.

HtmlBuffer

A TalkatuBuffer subclass that renders HTML.

HtmlPangoRenderer
HtmlRenderer
Input

TalkatuInput is the main input widget for Talkatu. It supports WYSIWYG input for both HTML and Markdown as well as plain text.

LinkDialog

A simple GtkDialog subclass to allow the user to create a link.

MarkdownBuffer

A TalkatuBuffer subclass that renders markdown.

SimpleAttachment

TalkatuSimpleAttachment is simple implementation of the TalkatuAttachment interface. This is the easiest way to create a TalkatuAttachment and attach it to a TalkatuMessage.

Tag

TalkatuTag is a GtkTextTag subclass that has a few additional properties that allows greater control of how text is rendered.

Toolbar

The formatting toolbar for TalkatuViews. It’s based on the GSimpleActionGroups that TalkatuBuffers expose which makes it completely autonomous.

TypingLabel

This widget implements a simple interface for displaying who is currently typing. You can call talkatu_typing_label_start_typing() whenever you receive a typing notification and TalkatuTypingLabel will aggregate it for you.

View

A GtkTextView subclass that’s preconfigured with a TalkatuBuffer.

WholeBuffer

A TalkatuBuffer subclass that applies formatting to the entire buffer rather that allowing rich formatting at character resolution.

Interfaces

Attachment

TalkatuAttachment represents an attached file. The files can be any type of regular file but only images will be previewed based on their actual contents.

Message

TalkatuMessage is an opaque data structure and can only be accessed using the following functions.

Enumerations

BufferStyle

The format style of a TalkatuBuffer.

ContentType

An enum representing a given markup type.

TagDisplay

An enum representing how a tag should be rendered.

Bitfields

InputSendBinding

Flags for assigning and determining which key bindings should be used to send a message.

Callbacks

AttachmentForeachFunc

TalkatuAttachmentForeachFunc is a callback function called against each TalkatuAttachment in a collection.

Functions

action_name_for_tag_name

Looks up a GAction for the the tag named tag_name.

codeset_coerce_utf8

Attempts to coerce the raw data into UTF-8.

init

Initializes Talkatu. This should be called before using any other Talkatu API.

markup_append_html

Appends text to buffer at the current insertion point of buffer.

markup_deserialize_html

This is a GtkTextBufferDeserializeFunc function that will deserialize HTML data from data into content_buffer. It should be registered with with #gtk_text_buffer_register_deserializer_format in the buffer’s instance_init function.

markup_get_html

Extracts all text from buffer as an HTML string.

markup_get_html_range

Extracts a section of buffer into an HTML string.

markup_insert_html

Inserts text in buffer at iter.

markup_serialize_html

This is a GtkTextBufferSerializeFunc that should be registered with

gtk_text_buffer_register_serialize_func in the buffer's instance_init

method.

markup_set_html

Replaces all text in buffer with text.

uninit

Cleanly shutdown the Talkatu API.

Function Macros

VERSION_CHECK

A simple macro that will return true if the version of Talkatu that’s being compiled against is newer than the provided version.

Constants

ACTION_ATTACH_FILE

A constant that represents the attach file action.

ACTION_FORMAT_BOLD

A constant that represents the bold font style action.

ACTION_FORMAT_GROW

A constant that represents the increase font size action.

ACTION_FORMAT_ITALIC

A constant that represents the italic font style action.

ACTION_FORMAT_RESET

A constant that represents the reset all formatting action.

ACTION_FORMAT_SHRINK

A constant that represents the decrease font size action.

ACTION_FORMAT_STRIKETHROUGH

A constant that represents the strike through font style action.

ACTION_FORMAT_UNDERLINE

A constant that represents the underline font style action.

ACTION_INSERT_LINK

A constant that presents the action to activate when the user wants to insert a link.

BUFFER_LINK_TARGET_ATTRIBUTE

The name of the attribute set on GtkTextTags that contain the URL for links.

EXTRA_VERSION

The extra version if any of Talkatu that’s being compiled against.

MAJOR_VERSION

The major version of Talkatu that’s being compiled against.

MICRO_VERSION

The micro version of Talkatu that’s being compiled against.

MINOR_VERSION

The minor version of Talkatu that’s being compiled against.

TAG_FORMATTING_END

A constant to be used as a suffix for tags that need formatting applied after the original tag.

TAG_FORMATTING_START

A constant to be used as a prefix for tags that need formatting applied before the original tag.

TAG_PREFIX

The prefix that all Talkatu tags use.

TAG_PREFIX_LEN

The length of #TALKATU_TAG_PREFIX for easy computation.

VERSION

The full version of Talkatu that’s being compiled against as a string.