pidgin: gtkimhtml.h File Reference

pidgin 2.14.4

Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
gtkimhtml.h File Reference
Pidgin (GTK+ User Interface)

GTK+ IM/HTML rendering component. More...

`#include <gdk/gdk.h>`
`#include <gtk/gtk.h>`
`#include "gtksourceundomanager.h"`
`#include "connection.h"`

Go to the source code of this file.

## Data Structures
struct | _GtkIMHtml
struct | _GtkIMHtmlClass
struct | _GtkIMHtmlFontDetail
struct | _GtkSmileyTree
struct | _GtkIMHtmlSmiley
struct | _GtkIMHtmlScalable
struct | _GtkIMHtmlImage
struct | _GtkIMHtmlAnimation
struct | _GtkIMHtmlHr
struct | _GtkIMHtmlFuncs

## Macros
#define | GTK_TYPE_IMHTML (gtk_imhtml_get_type())
#define | GTK_IMHTML(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_IMHTML, GtkIMHtml))
#define | GTK_IMHTML_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_IMHTML, GtkIMHtmlClass))
#define | GTK_IS_IMHTML(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_IMHTML))
#define | GTK_IS_IMHTML_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_IMHTML))
#define | GTK_IMHTML_SCALABLE(obj) ((GtkIMHtmlScalable *)obj)
#define | GTK_IMHTML_ANIMATION(obj) ((GtkIMHtmlAnimation *)obj)
#define | GTK_IMHTML_DND_TARGETS
#define | gtk_imhtml_append_text(imhtml, text, options) gtk_imhtml_append_text_with_images(imhtml, text, options, NULL)
| Appends HTML formatted text to a GTK+ IM/HTML.
#define | gtk_imhtml_clear(imhtml) gtk_imhtml_delete(imhtml, NULL, NULL)
| Purges the contents from a GTK+ IM/HTML and resets formatting.

## Typedefs
typedef struct _GtkIMHtml | GtkIMHtml
typedef struct _GtkIMHtmlClass | GtkIMHtmlClass
typedef struct _GtkIMHtmlFontDetail | GtkIMHtmlFontDetail
typedef struct _GtkSmileyTree | GtkSmileyTree
typedef struct _GtkIMHtmlSmiley | GtkIMHtmlSmiley
typedef struct _GtkIMHtmlScalable | GtkIMHtmlScalable
typedef struct _GtkIMHtmlImage | GtkIMHtmlImage
typedef struct _GtkIMHtmlAnimation | GtkIMHtmlAnimation
typedef struct _GtkIMHtmlHr | GtkIMHtmlHr
typedef struct _GtkIMHtmlFuncs | GtkIMHtmlFuncs
typedef struct _GtkIMHtmlLink | GtkIMHtmlLink
typedef gpointer(* | GtkIMHtmlGetImageFunc) (int id)
typedef gpointer(* | GtkIMHtmlGetImageDataFunc) (gpointer i)
typedef size_t(* | GtkIMHtmlGetImageSizeFunc) (gpointer i)
typedef const char *(* | GtkIMHtmlGetImageFilenameFunc) (gpointer i)
typedef void(* | GtkIMHtmlImageRefFunc) (int id)
typedef void(* | GtkIMHtmlImageUnrefFunc) (int id)

## Enumerations
enum | GtkIMHtmlButtons { GTK_IMHTML_BOLD = 1 << 0 , GTK_IMHTML_ITALIC = 1 << 1 , GTK_IMHTML_UNDERLINE = 1 << 2 , GTK_IMHTML_GROW = 1 << 3 , GTK_IMHTML_SHRINK = 1 << 4 , GTK_IMHTML_FACE = 1 << 5 , GTK_IMHTML_FORECOLOR = 1 << 6 , GTK_IMHTML_BACKCOLOR = 1 << 7 , GTK_IMHTML_BACKGROUND = 1 << 8 , GTK_IMHTML_LINK = 1 << 9 , GTK_IMHTML_IMAGE = 1 << 10 , GTK_IMHTML_SMILEY = 1 << 11 , GTK_IMHTML_LINKDESC = 1 << 12 , GTK_IMHTML_STRIKE = 1 << 13 , GTK_IMHTML_CUSTOM_SMILEY = 1 << 14 , GTK_IMHTML_ALL = -1 }
enum | GtkIMHtmlSmileyFlags { GTK_IMHTML_SMILEY_CUSTOM = 1 << 0 }
enum | GtkIMHtmlOptions { GTK_IMHTML_NO_COLOURS = 1 << 0 , GTK_IMHTML_NO_FONTS = 1 << 1 , GTK_IMHTML_NO_COMMENTS = 1 << 2 , GTK_IMHTML_NO_TITLE = 1 << 3 , GTK_IMHTML_NO_NEWLINE = 1 << 4 , GTK_IMHTML_NO_SIZES = 1 << 5 , GTK_IMHTML_NO_SCROLL = 1 << 6 , GTK_IMHTML_RETURN_LOG = 1 << 7 , GTK_IMHTML_USE_POINTSIZE = 1 << 8 , GTK_IMHTML_NO_FORMATTING = 1 << 9 , GTK_IMHTML_USE_SMOOTHSCROLLING = 1 << 10 , GTK_IMHTML_NO_SMILEY = 1 << 11 }
enum | { GTK_IMHTML_DRAG_URL = 0 , GTK_IMHTML_DRAG_HTML , GTK_IMHTML_DRAG_UTF8_STRING , GTK_IMHTML_DRAG_COMPOUND_TEXT , GTK_IMHTML_DRAG_STRING , GTK_IMHTML_DRAG_TEXT , GTK_IMHTML_DRAG_NUM }

## Functions
GType | gtk_imhtml_get_type (void)
| Returns the GType object for an IM/HTML widget.
GtkWidget * | gtk_imhtml_new (void *, void *)
| Creates and returns a new GTK+ IM/HTML widget.
GtkIMHtmlSmiley * | gtk_imhtml_smiley_get (GtkIMHtml *imhtml, const gchar *sml, const gchar *text)
| Returns the smiley object associated with the text.
void | gtk_imhtml_associate_smiley (GtkIMHtml *imhtml, const gchar *sml, GtkIMHtmlSmiley *smiley)
| Associates a smiley with a GTK+ IM/HTML.
void | gtk_imhtml_remove_smileys (GtkIMHtml *imhtml)
| Removes all smileys associated with a GTK+ IM/HTML.
void | gtk_imhtml_set_funcs (GtkIMHtml *imhtml, GtkIMHtmlFuncs *f)
| Sets the function callbacks to use with a GTK+ IM/HTML instance.
void | gtk_imhtml_show_comments (GtkIMHtml *imhtml, gboolean show)
| Enables or disables showing the contents of HTML comments in a GTK+ IM/HTML.
const char * | gtk_imhtml_get_protocol_name (GtkIMHtml *imhtml)
| Gets the protocol name associated with this GTK+ IM/HTML.
void | gtk_imhtml_set_protocol_name (GtkIMHtml *imhtml, const gchar *protocol_name)
| Associates a protocol name with a GTK+ IM/HTML.
void | gtk_imhtml_append_text_with_images (GtkIMHtml *imhtml, const gchar *text, GtkIMHtmlOptions options, GSList *unused)
| Appends HTML formatted text to a GTK+ IM/HTML.
void | gtk_imhtml_insert_html_at_iter (GtkIMHtml *imhtml, const gchar *text, GtkIMHtmlOptions options, GtkTextIter *iter)
| Inserts HTML formatted text to a GTK+ IM/HTML at a given iter.
void | gtk_imhtml_scroll_to_end (GtkIMHtml *imhtml, gboolean smooth)
| Scrolls a GTK+ IM/HTML to the end of its contents.
void | gtk_imhtml_delete (GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end)
| Delete the contents of a GTK+ IM/HTML between start and end.
void | gtk_imhtml_page_up (GtkIMHtml *imhtml)
| Scrolls a GTK+ IM/HTML up by one page.
void | gtk_imhtml_page_down (GtkIMHtml *imhtml)
| Scrolls a GTK+ IM/HTML down by one page.
GtkIMHtmlScalable * | gtk_imhtml_scalable_new (void)
| Creates and returns an new GTK+ IM/HTML scalable object.
GtkIMHtmlScalable * | gtk_imhtml_image_new (GdkPixbuf *img, const gchar *filename, int id)
| Creates and returns a new GTK+ IM/HTML scalable object with an image.
GtkIMHtmlScalable * | gtk_imhtml_animation_new (GdkPixbufAnimation *img, const gchar *filename, int id)
| Creates and returns a new GTK+ IM/HTML scalable object with an animated image.
void | gtk_imhtml_image_free (GtkIMHtmlScalable *scale)
| Destroys and frees a GTK+ IM/HTML scalable image.
void | gtk_imhtml_animation_free (GtkIMHtmlScalable *scale)
| Destroys and frees a GTK+ IM/HTML scalable animation.
void | gtk_imhtml_image_scale (GtkIMHtmlScalable *scale, int width, int height)
| Rescales a GTK+ IM/HTML scalable image to a given size.
void | gtk_imhtml_image_add_to (GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter)
| Adds a GTK+ IM/HTML scalable image to a given GTK+ IM/HTML at a given iter.
GtkIMHtmlScalable * | gtk_imhtml_hr_new (void)
| Creates and returns an new GTK+ IM/HTML scalable with a horizontal rule.
void | gtk_imhtml_hr_free (GtkIMHtmlScalable *scale)
| Destroys and frees a GTK+ IM/HTML scalable horizontal rule.
void | gtk_imhtml_hr_scale (GtkIMHtmlScalable *scale, int width, int height)
| Rescales a GTK+ IM/HTML scalable horizontal rule to a given size.
void | gtk_imhtml_hr_add_to (GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter)
| Adds a GTK+ IM/HTML scalable horizontal rule to a given GTK+ IM/HTML at a given iter.
gboolean | gtk_imhtml_search_find (GtkIMHtml *imhtml, const gchar *text)
| Finds and highlights a given string in a GTK+ IM/HTML.
void | gtk_imhtml_search_clear (GtkIMHtml *imhtml)
| Clears the highlighting from a prior search in a GTK+ IM/HTML.
void | gtk_imhtml_set_editable (GtkIMHtml *imhtml, gboolean editable)
| Enables or disables editing in a GTK+ IM/HTML.
void | gtk_imhtml_set_whole_buffer_formatting_only (GtkIMHtml *imhtml, gboolean wbfo)
| Enables or disables whole buffer formatting only (wbfo) in a GTK+ IM/HTML.
void | gtk_imhtml_set_format_functions (GtkIMHtml *imhtml, GtkIMHtmlButtons buttons)
| Indicates which formatting functions to enable and disable in a GTK+ IM/HTML.
GtkIMHtmlButtons | gtk_imhtml_get_format_functions (GtkIMHtml *imhtml)
| Returns which formatting functions are enabled in a GTK+ IM/HTML.
void | gtk_imhtml_get_current_format (GtkIMHtml *imhtml, gboolean *bold, gboolean *italic, gboolean *underline)
| Sets each boolean to `TRUE` or `FALSE` to indicate if that formatting option is enabled at the current position in a GTK+ IM/HTML.
char * | gtk_imhtml_get_current_fontface (GtkIMHtml *imhtml)
| Returns a string containing the selected font face at the current position in a GTK+ IM/HTML.
char * | gtk_imhtml_get_current_forecolor (GtkIMHtml *imhtml)
| Returns a string containing the selected foreground color at the current position in a GTK+ IM/HTML.
char * | gtk_imhtml_get_current_backcolor (GtkIMHtml *imhtml)
| Returns a string containing the selected font background color at the current position in a GTK+ IM/HTML.
char * | gtk_imhtml_get_current_background (GtkIMHtml *imhtml)
| Returns a string containing the selected background color at the current position in a GTK+ IM/HTML.
gint | gtk_imhtml_get_current_fontsize (GtkIMHtml *imhtml)
| Returns a integer containing the selected HTML font size at the current position in a GTK+ IM/HTML.
gboolean | gtk_imhtml_get_editable (GtkIMHtml *imhtml)
| Checks whether a GTK+ IM/HTML is marked as editable.
void | gtk_imhtml_clear_formatting (GtkIMHtml *imhtml)
| Clear all the formatting on a GTK+ IM/HTML.
void | gtk_imhtml_toggle_bold (GtkIMHtml *imhtml)
| Toggles bold at the cursor location or selection in a GTK+ IM/HTML.
void | gtk_imhtml_toggle_italic (GtkIMHtml *imhtml)
| Toggles italic at the cursor location or selection in a GTK+ IM/HTML.
void | gtk_imhtml_toggle_underline (GtkIMHtml *imhtml)
| Toggles underline at the cursor location or selection in a GTK+ IM/HTML.
void | gtk_imhtml_toggle_strike (GtkIMHtml *imhtml)
| Toggles strikethrough at the cursor location or selection in a GTK+ IM/HTML.
gboolean | gtk_imhtml_toggle_forecolor (GtkIMHtml *imhtml, const char *color)
| Toggles a foreground color at the current location or selection in a GTK IM/HTML.
gboolean | gtk_imhtml_toggle_backcolor (GtkIMHtml *imhtml, const char *color)
| Toggles a background color at the current location or selection in a GTK IM/HTML.
gboolean | gtk_imhtml_toggle_background (GtkIMHtml *imhtml, const char *color)
| Toggles a background color at the current location or selection in a GTK IM/HTML.
gboolean | gtk_imhtml_toggle_fontface (GtkIMHtml *imhtml, const char *face)
| Toggles a font face at the current location or selection in a GTK+ IM/HTML.
void | gtk_imhtml_toggle_link (GtkIMHtml *imhtml, const char *url)
| Toggles a link tag with the given URL at the current location or selection in a GTK+ IM/HTML.
void | gtk_imhtml_insert_link (GtkIMHtml *imhtml, GtkTextMark *mark, const char *url, const char *text)
| Inserts a link to the given url at the given GtkTextMark in a GTK+ IM/HTML.
void | gtk_imhtml_insert_smiley (GtkIMHtml *imhtml, const char *sml, char *smiley)
| Inserts a smiley at the current location or selection in a GTK+ IM/HTML.
void | gtk_imhtml_insert_smiley_at_iter (GtkIMHtml *imhtml, const char *sml, char *smiley, GtkTextIter *iter)
| Inserts a smiley at the given iter in a GTK+ IM/HTML.
void | gtk_imhtml_insert_image_at_iter (GtkIMHtml *imhtml, int id, GtkTextIter *iter)
| Inserts the IM/HTML scalable image with the given id at the given iter in a GTK+ IM/HTML.
void | gtk_imhtml_font_set_size (GtkIMHtml *imhtml, gint size)
| Sets the font size at the current location or selection in a GTK+ IM/HTML.
void | gtk_imhtml_font_shrink (GtkIMHtml *imhtml)
| Decreases the font size by 1 at the current location or selection in a GTK IM/HTML.
void | gtk_imhtml_font_grow (GtkIMHtml *imhtml)
| Increases the font size by 1 at the current location or selection in a GTK IM/HTML.
char * | gtk_imhtml_get_markup_range (GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end)
| Returns the HTML formatted contents between two iters in a GTK+ IM/HTML.
char * | gtk_imhtml_get_markup (GtkIMHtml *imhtml)
| Returns the entire HTML formatted contents of a GTK+ IM/HTML.
char ** | gtk_imhtml_get_markup_lines (GtkIMHtml *imhtml)
| Returns a null terminated array of pointers to null terminated strings, each string for each line.
char * | gtk_imhtml_get_text (GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *stop)
| Returns the entire unformatted (plain text) contents of a GTK+ IM/HTML between two iters in a GTK+ IM/HTML.
void | gtk_imhtml_setup_entry (GtkIMHtml *imhtml, PurpleConnectionFlags flags)
| Setup formatting for an imhtml depending on the flags specified.
GtkIMHtmlSmiley * | gtk_imhtml_smiley_create (const char *file, const char *shortcut, gboolean hide, GtkIMHtmlSmileyFlags flags)
| Create a new GtkIMHtmlSmiley.
void | gtk_imhtml_smiley_reload (GtkIMHtmlSmiley *smiley)
| Reload the image data for the smiley.
void | gtk_imhtml_smiley_destroy (GtkIMHtmlSmiley *smiley)
| Destroy a GtkIMHtmlSmiley.
gboolean | gtk_imhtml_class_register_protocol (const char *name, gboolean(*activate)(GtkIMHtml *imhtml, GtkIMHtmlLink *link), gboolean(*context_menu)(GtkIMHtml *imhtml, GtkIMHtmlLink *link, GtkWidget *menu))
| Register a protocol with the GtkIMHtml widget.
const char * | gtk_imhtml_link_get_url (GtkIMHtmlLink *link)
| Get the URL associated with a link.
const GtkTextTag * | gtk_imhtml_link_get_text_tag (GtkIMHtmlLink *link)
| Get the GtkTextTag object (if any) associated with a particular link.
gboolean | gtk_imhtml_link_activate (GtkIMHtmlLink *link)
| Activates a GtkIMHtmlLink object.
void | gtk_imhtml_set_return_inserts_newline (GtkIMHtml *imhtml)
| By default this widget intercepts presses of the "return" key and emits the "message_send" signal instead.
void | gtk_imhtml_set_populate_primary_clipboard (GtkIMHtml *imhtml, gboolean populate)
| By default this widget populates the PRIMARY clipboard with any selected text (as you would expect).

## Detailed Description

GTK+ IM/HTML rendering component.

See also
  GtkIMHtml Signals

Definition in file gtkimhtml.h.

## Macro Definition Documentation

## ◆ GTK_IMHTML

#define GTK_IMHTML | ( |  | obj | ) | (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_IMHTML, GtkIMHtml))

Definition at line 44 of file gtkimhtml.h.

## ◆ GTK_IMHTML_ANIMATION

#define GTK_IMHTML_ANIMATION | ( |  | obj | ) | ((GtkIMHtmlAnimation *)obj)

Definition at line 49 of file gtkimhtml.h.

## ◆ gtk_imhtml_append_text

#define gtk_imhtml_append_text | ( |  | imhtml,
|  |  | text,
|  |  | options
| ) |  | gtk_imhtml_append_text_with_images(imhtml, text, options, NULL)

Appends HTML formatted text to a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  text | The formatted text to append.
  options | A GtkIMHtmlOptions object indicating insert behavior.

Definition at line 370 of file gtkimhtml.h.

## ◆ GTK_IMHTML_CLASS

#define GTK_IMHTML_CLASS | ( |  | klass | ) | (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_IMHTML, GtkIMHtmlClass))

Definition at line 45 of file gtkimhtml.h.

## ◆ gtk_imhtml_clear

#define gtk_imhtml_clear | ( |  | imhtml | ) | gtk_imhtml_delete(imhtml, NULL, NULL)

Purges the contents from a GTK+ IM/HTML and resets formatting.

Parameters

  imhtml | The GTK+ IM/HTML.

Definition at line 421 of file gtkimhtml.h.

## ◆ GTK_IMHTML_DND_TARGETS

#define GTK_IMHTML_DND_TARGETS

Value:
{ "text/uri-list", 0, GTK_IMHTML_DRAG_URL }, \
{ "_NETSCAPE_URL", 0, GTK_IMHTML_DRAG_URL }, \
{ "text/html", 0, GTK_IMHTML_DRAG_HTML }, \
{ "x-url/ftp", 0, GTK_IMHTML_DRAG_URL }, \
{ "x-url/http", 0, GTK_IMHTML_DRAG_URL }, \
{ "UTF8_STRING", 0, GTK_IMHTML_DRAG_UTF8_STRING }, \
{ "COMPOUND_TEXT", 0, GTK_IMHTML_DRAG_COMPOUND_TEXT }, \
{ "STRING", 0, GTK_IMHTML_DRAG_STRING }, \
{ "text/plain", 0, GTK_IMHTML_DRAG_TEXT }, \
{ "TEXT", 0, GTK_IMHTML_DRAG_TEXT }

Definition at line 255 of file gtkimhtml.h.

## ◆ GTK_IMHTML_SCALABLE

#define GTK_IMHTML_SCALABLE | ( |  | obj | ) | ((GtkIMHtmlScalable *)obj)

Definition at line 48 of file gtkimhtml.h.

## ◆ GTK_IS_IMHTML

#define GTK_IS_IMHTML | ( |  | obj | ) | (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_IMHTML))

Definition at line 46 of file gtkimhtml.h.

## ◆ GTK_IS_IMHTML_CLASS

#define GTK_IS_IMHTML_CLASS | ( |  | klass | ) | (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_IMHTML))

Definition at line 47 of file gtkimhtml.h.

## ◆ GTK_TYPE_IMHTML

#define GTK_TYPE_IMHTML (gtk_imhtml_get_type())

Definition at line 43 of file gtkimhtml.h.

## Typedef Documentation

## ◆ GtkIMHtml

typedef struct _GtkIMHtml GtkIMHtml

Definition at line 51 of file gtkimhtml.h.

## ◆ GtkIMHtmlAnimation

typedef struct _GtkIMHtmlAnimation GtkIMHtmlAnimation

Definition at line 60 of file gtkimhtml.h.

## ◆ GtkIMHtmlClass

typedef struct _GtkIMHtmlClass GtkIMHtmlClass

Definition at line 52 of file gtkimhtml.h.

## ◆ GtkIMHtmlFontDetail

typedef struct _GtkIMHtmlFontDetail GtkIMHtmlFontDetail

Definition at line 54 of file gtkimhtml.h.

## ◆ GtkIMHtmlFuncs

typedef struct _GtkIMHtmlFuncs GtkIMHtmlFuncs

Definition at line 62 of file gtkimhtml.h.

## ◆ GtkIMHtmlGetImageDataFunc

typedef gpointer(* GtkIMHtmlGetImageDataFunc) (gpointer i)

Definition at line 268 of file gtkimhtml.h.

## ◆ GtkIMHtmlGetImageFilenameFunc

typedef const char *(* GtkIMHtmlGetImageFilenameFunc) (gpointer i)

Definition at line 270 of file gtkimhtml.h.

## ◆ GtkIMHtmlGetImageFunc

typedef gpointer(* GtkIMHtmlGetImageFunc) (int id)

Definition at line 267 of file gtkimhtml.h.

## ◆ GtkIMHtmlGetImageSizeFunc

typedef size_t(* GtkIMHtmlGetImageSizeFunc) (gpointer i)

Definition at line 269 of file gtkimhtml.h.

## ◆ GtkIMHtmlHr

typedef struct _GtkIMHtmlHr GtkIMHtmlHr

Definition at line 61 of file gtkimhtml.h.

## ◆ GtkIMHtmlImage

typedef struct _GtkIMHtmlImage GtkIMHtmlImage

Definition at line 59 of file gtkimhtml.h.

## ◆ GtkIMHtmlImageRefFunc

typedef void(* GtkIMHtmlImageRefFunc) (int id)

Definition at line 271 of file gtkimhtml.h.

## ◆ GtkIMHtmlImageUnrefFunc

typedef void(* GtkIMHtmlImageUnrefFunc) (int id)

Definition at line 272 of file gtkimhtml.h.

## ◆ GtkIMHtmlLink

typedef struct _GtkIMHtmlLink GtkIMHtmlLink

Since
  2.6.0

Definition at line 67 of file gtkimhtml.h.

## ◆ GtkIMHtmlScalable

typedef struct _GtkIMHtmlScalable GtkIMHtmlScalable

Definition at line 58 of file gtkimhtml.h.

## ◆ GtkIMHtmlSmiley

typedef struct _GtkIMHtmlSmiley GtkIMHtmlSmiley

Definition at line 57 of file gtkimhtml.h.

## ◆ GtkSmileyTree

typedef struct _GtkSmileyTree GtkSmileyTree

Definition at line 56 of file gtkimhtml.h.

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Definition at line 245 of file gtkimhtml.h.

## ◆ GtkIMHtmlButtons

enum GtkIMHtmlButtons

Enumerator
GTK_IMHTML_CUSTOM_SMILEY | Show custom smileys when appropriate. Since 2.5.0

Definition at line 69 of file gtkimhtml.h.

## ◆ GtkIMHtmlOptions

enum GtkIMHtmlOptions

Definition at line 230 of file gtkimhtml.h.

## ◆ GtkIMHtmlSmileyFlags

enum GtkIMHtmlSmileyFlags

Definition at line 89 of file gtkimhtml.h.

## Function Documentation

## ◆ gtk_imhtml_animation_free()

void gtk_imhtml_animation_free | ( | GtkIMHtmlScalable * | scale | ) |

Destroys and frees a GTK+ IM/HTML scalable animation.

Parameters

  scale | The GTK+ IM/HTML scalable.

## ◆ gtk_imhtml_animation_new()

GtkIMHtmlScalable * gtk_imhtml_animation_new | ( | GdkPixbufAnimation * | img,
|  | const gchar * | filename,
|  | int | id
| ) |  |

Creates and returns a new GTK+ IM/HTML scalable object with an animated image.

Parameters

  img | A GdkPixbufAnimation of the image to add.
  filename | The filename to associate with the image.
  id | The id to associate with the image.

Returns
  A new IM/HTML Scalable object with an image.

Since
  2.1.0

## ◆ gtk_imhtml_append_text_with_images()

void gtk_imhtml_append_text_with_images | ( | GtkIMHtml * | imhtml,
|  | const gchar * | text,
|  | GtkIMHtmlOptions | options,
|  | GSList * | unused
| ) |  |

Appends HTML formatted text to a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  text | The formatted text to append.
  options | A GtkIMHtmlOptions object indicating insert behavior.
  unused | Use `NULL` value.

## ◆ gtk_imhtml_associate_smiley()

void gtk_imhtml_associate_smiley | ( | GtkIMHtml * | imhtml,
|  | const gchar * | sml,
|  | GtkIMHtmlSmiley * | smiley
| ) |  |

Associates a smiley with a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  sml | The name of the smiley category.
  smiley | The GtkIMSmiley to associate.

## ◆ gtk_imhtml_class_register_protocol()

gboolean gtk_imhtml_class_register_protocol | ( | const char * | name,
|  | gboolean(*)(GtkIMHtml *imhtml, GtkIMHtmlLink *link) | activate,
|  | gboolean(*)(GtkIMHtml *imhtml, GtkIMHtmlLink *link, GtkWidget *menu) | context_menu
| ) |  |

Register a protocol with the GtkIMHtml widget.

Registering a protocol would allow certain text to be clickable.

Parameters

  name | The name of the protocol (e.g. http://)
  activate | The callback to trigger when the protocol text is clicked. Removes any current protocol definition if `NULL`. The callback should return `TRUE` if the link was activated properly, `FALSE` otherwise.
  context_menu | The callback to trigger when the context menu is popped up on the protocol text. The callback should return `TRUE` if the request for context menu was processed successfully, `FALSE` otherwise.

Returns
  `TRUE` if the protocol was successfully registered (or unregistered, when activate is `NULL`)

Since
  2.6.0

## ◆ gtk_imhtml_clear_formatting()

void gtk_imhtml_clear_formatting | ( | GtkIMHtml * | imhtml | ) |

Clear all the formatting on a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

## ◆ gtk_imhtml_delete()

void gtk_imhtml_delete | ( | GtkIMHtml * | imhtml,
|  | GtkTextIter * | start,
|  | GtkTextIter * | end
| ) |  |

Delete the contents of a GTK+ IM/HTML between start and end.

Parameters

  imhtml | The GTK+ IM/HTML.
  start | a postition in the imhtml's buffer
  end | another postition in the imhtml's buffer

## ◆ gtk_imhtml_font_grow()

void gtk_imhtml_font_grow | ( | GtkIMHtml * | imhtml | ) |

Increases the font size by 1 at the current location or selection in a GTK IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

## ◆ gtk_imhtml_font_set_size()

void gtk_imhtml_font_set_size | ( | GtkIMHtml * | imhtml,
|  | gint | size
| ) |  |

Sets the font size at the current location or selection in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  size | The HTML font size to use.

## ◆ gtk_imhtml_font_shrink()

void gtk_imhtml_font_shrink | ( | GtkIMHtml * | imhtml | ) |

Decreases the font size by 1 at the current location or selection in a GTK IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

## ◆ gtk_imhtml_get_current_backcolor()

char * gtk_imhtml_get_current_backcolor | ( | GtkIMHtml * | imhtml | ) |

Returns a string containing the selected font background color at the current position in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

Returns
  A string containg the font background color or `NULL` if none is set.

## ◆ gtk_imhtml_get_current_background()

char * gtk_imhtml_get_current_background | ( | GtkIMHtml * | imhtml | ) |

Returns a string containing the selected background color at the current position in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

Returns
  A string containg the background color or `NULL` if none is set.

## ◆ gtk_imhtml_get_current_fontface()

char * gtk_imhtml_get_current_fontface | ( | GtkIMHtml * | imhtml | ) |

Returns a string containing the selected font face at the current position in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

Returns
  A string containg the font face or `NULL` if none is set.

## ◆ gtk_imhtml_get_current_fontsize()

gint gtk_imhtml_get_current_fontsize | ( | GtkIMHtml * | imhtml | ) |

Returns a integer containing the selected HTML font size at the current position in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

Returns
  The HTML font size.

## ◆ gtk_imhtml_get_current_forecolor()

char * gtk_imhtml_get_current_forecolor | ( | GtkIMHtml * | imhtml | ) |

Returns a string containing the selected foreground color at the current position in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

Returns
  A string containg the foreground color or `NULL` if none is set.

## ◆ gtk_imhtml_get_current_format()

void gtk_imhtml_get_current_format | ( | GtkIMHtml * | imhtml,
|  | gboolean * | bold,
|  | gboolean * | italic,
|  | gboolean * | underline
| ) |  |

Sets each boolean to `TRUE` or `FALSE` to indicate if that formatting option is enabled at the current position in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  bold | The boolean to set for bold or `NULL`.
  italic | The boolean to set for italic or `NULL`.
  underline | The boolean to set for underline or `NULL`.

## ◆ gtk_imhtml_get_editable()

gboolean gtk_imhtml_get_editable | ( | GtkIMHtml * | imhtml | ) |

Checks whether a GTK+ IM/HTML is marked as editable.

Parameters

  imhtml | The GTK+ IM/HTML.

Returns
  `TRUE` if the IM/HTML is editable, or `FALSE` otherwise.

## ◆ gtk_imhtml_get_format_functions()

GtkIMHtmlButtons gtk_imhtml_get_format_functions | ( | GtkIMHtml * | imhtml | ) |

Returns which formatting functions are enabled in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

Returns
  A GtkIMHtmlButtons bitmask indicating which functions to are enabled.

## ◆ gtk_imhtml_get_markup()

char * gtk_imhtml_get_markup | ( | GtkIMHtml * | imhtml | ) |

Returns the entire HTML formatted contents of a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

Returns
  A string containing the HTML formatted text.

## ◆ gtk_imhtml_get_markup_lines()

char ** gtk_imhtml_get_markup_lines | ( | GtkIMHtml * | imhtml | ) |

Returns a null terminated array of pointers to null terminated strings, each string for each line.

g_strfreev() should be called to free it when done.

Parameters

  imhtml | The GTK+ IM/HTML.

Returns
  A null terminated array of null terminated HTML formatted strings.

## ◆ gtk_imhtml_get_markup_range()

char * gtk_imhtml_get_markup_range | ( | GtkIMHtml * | imhtml,
|  | GtkTextIter * | start,
|  | GtkTextIter * | end
| ) |  |

Returns the HTML formatted contents between two iters in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  start | The GtkTextIter indicating the start point in the IM/HTML.
  end | The GtkTextIter indicating the end point in the IM/HTML.

Returns
  A string containing the HTML formatted text.

## ◆ gtk_imhtml_get_protocol_name()

const char * gtk_imhtml_get_protocol_name | ( | GtkIMHtml * | imhtml | ) |

Gets the protocol name associated with this GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML

## ◆ gtk_imhtml_get_text()

char * gtk_imhtml_get_text | ( | GtkIMHtml * | imhtml,
|  | GtkTextIter * | start,
|  | GtkTextIter * | stop
| ) |  |

Returns the entire unformatted (plain text) contents of a GTK+ IM/HTML between two iters in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  start | The GtkTextIter indicating the start point in the IM/HTML.
  stop | The GtkTextIter indicating the end point in the IM/HTML.

Returns
  A string containing the unformatted text.

## ◆ gtk_imhtml_get_type()

GType gtk_imhtml_get_type | ( | void |  | ) |

Returns the GType object for an IM/HTML widget.

Returns
  The GType for an IM/HTML widget.

## ◆ gtk_imhtml_hr_add_to()

void gtk_imhtml_hr_add_to | ( | GtkIMHtmlScalable * | scale,
|  | GtkIMHtml * | imhtml,
|  | GtkTextIter * | iter
| ) |  |

Adds a GTK+ IM/HTML scalable horizontal rule to a given GTK+ IM/HTML at a given iter.

Parameters

  scale | The GTK+ IM/HTML scalable.
  imhtml | The GTK+ IM/HTML.
  iter | The GtkTextIter at which to add the scalable.

## ◆ gtk_imhtml_hr_free()

void gtk_imhtml_hr_free | ( | GtkIMHtmlScalable * | scale | ) |

Destroys and frees a GTK+ IM/HTML scalable horizontal rule.

Parameters

  scale | The GTK+ IM/HTML scalable.

## ◆ gtk_imhtml_hr_new()

GtkIMHtmlScalable * gtk_imhtml_hr_new | ( | void |  | ) |

Creates and returns an new GTK+ IM/HTML scalable with a horizontal rule.

Returns
  A new IM/HTML Scalable object with an image.

## ◆ gtk_imhtml_hr_scale()

void gtk_imhtml_hr_scale | ( | GtkIMHtmlScalable * | scale,
|  | int | width,
|  | int | height
| ) |  |

Rescales a GTK+ IM/HTML scalable horizontal rule to a given size.

Parameters

  scale | The GTK+ IM/HTML scalable.
  width | The new width.
  height | The new height.

## ◆ gtk_imhtml_image_add_to()

void gtk_imhtml_image_add_to | ( | GtkIMHtmlScalable * | scale,
|  | GtkIMHtml * | imhtml,
|  | GtkTextIter * | iter
| ) |  |

Adds a GTK+ IM/HTML scalable image to a given GTK+ IM/HTML at a given iter.

Parameters

  scale | The GTK+ IM/HTML scalable.
  imhtml | The GTK+ IM/HTML.
  iter | The GtkTextIter at which to add the scalable.

## ◆ gtk_imhtml_image_free()

void gtk_imhtml_image_free | ( | GtkIMHtmlScalable * | scale | ) |

Destroys and frees a GTK+ IM/HTML scalable image.

Parameters

  scale | The GTK+ IM/HTML scalable.

## ◆ gtk_imhtml_image_new()

GtkIMHtmlScalable * gtk_imhtml_image_new | ( | GdkPixbuf * | img,
|  | const gchar * | filename,
|  | int | id
| ) |  |

Creates and returns a new GTK+ IM/HTML scalable object with an image.

Parameters

  img | A GdkPixbuf of the image to add.
  filename | The filename to associate with the image.
  id | The id to associate with the image.

Returns
  A new IM/HTML Scalable object with an image.

## ◆ gtk_imhtml_image_scale()

void gtk_imhtml_image_scale | ( | GtkIMHtmlScalable * | scale,
|  | int | width,
|  | int | height
| ) |  |

Rescales a GTK+ IM/HTML scalable image to a given size.

Parameters

  scale | The GTK+ IM/HTML scalable.
  width | The new width.
  height | The new height.

## ◆ gtk_imhtml_insert_html_at_iter()

void gtk_imhtml_insert_html_at_iter | ( | GtkIMHtml * | imhtml,
|  | const gchar * | text,
|  | GtkIMHtmlOptions | options,
|  | GtkTextIter * | iter
| ) |  |

Inserts HTML formatted text to a GTK+ IM/HTML at a given iter.

Parameters

  imhtml | The GTK+ IM/HTML.
  text | The formatted text to append.
  options | A GtkIMHtmlOptions object indicating insert behavior.
  iter | A GtkTextIter in the GTK+ IM/HTML at which to insert text.

## ◆ gtk_imhtml_insert_image_at_iter()

void gtk_imhtml_insert_image_at_iter | ( | GtkIMHtml * | imhtml,
|  | int | id,
|  | GtkTextIter * | iter
| ) |  |

Inserts the IM/HTML scalable image with the given id at the given iter in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  id | The id of the IM/HTML scalable.
  iter | The GtkTextIter in the IM/HTML to insert the image at.

## ◆ gtk_imhtml_insert_link()

void gtk_imhtml_insert_link | ( | GtkIMHtml * | imhtml,
|  | GtkTextMark * | mark,
|  | const char * | url,
|  | const char * | text
| ) |  |

Inserts a link to the given url at the given GtkTextMark in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  mark | The GtkTextMark to insert the link at.
  url | The URL for the link.
  text | The string to use for the link description.

## ◆ gtk_imhtml_insert_smiley()

void gtk_imhtml_insert_smiley | ( | GtkIMHtml * | imhtml,
|  | const char * | sml,
|  | char * | smiley
| ) |  |

Inserts a smiley at the current location or selection in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  sml | The category of the smiley.
  smiley | The text of the smiley to insert.

## ◆ gtk_imhtml_insert_smiley_at_iter()

void gtk_imhtml_insert_smiley_at_iter | ( | GtkIMHtml * | imhtml,
|  | const char * | sml,
|  | char * | smiley,
|  | GtkTextIter * | iter
| ) |  |

Inserts a smiley at the given iter in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  sml | The category of the smiley.
  smiley | The text of the smiley to insert.
  iter | The GtkTextIter in the IM/HTML to insert the smiley at.

## ◆ gtk_imhtml_link_activate()

gboolean gtk_imhtml_link_activate | ( | GtkIMHtmlLink * | link | ) |

Activates a GtkIMHtmlLink object.

This triggers the 'url-clicked' signal, marks the link as visited (when possible).

Parameters

  link | The GtkIMHtmlLink object sent to the callback functions

Returns
  `TRUE` if 'url-clicked' signal was emitted, `FALSE` otherwise.

Since
  2.6.0

## ◆ gtk_imhtml_link_get_text_tag()

const GtkTextTag * gtk_imhtml_link_get_text_tag | ( | GtkIMHtmlLink * | link | ) |

Get the GtkTextTag object (if any) associated with a particular link.

Parameters

  link | The GtkIMHtmlLink object sent to the callback functions

Returns
  The GtkTextTag object, or `NULL`

Since
  2.6.0

## ◆ gtk_imhtml_link_get_url()

const char * gtk_imhtml_link_get_url | ( | GtkIMHtmlLink * | link | ) |

Get the URL associated with a link.

This should be used by the IMHtml protocol-callbacks.

Parameters

  link | The GtkIMHtmlLink object sent to the callback functions

Returns
  The URL

Since
  2.6.0

## ◆ gtk_imhtml_new()

GtkWidget * gtk_imhtml_new | ( | void * | ,
|  | void * |
| ) |  |

Creates and returns a new GTK+ IM/HTML widget.

Returns
  The GTK+ IM/HTML widget created.

## ◆ gtk_imhtml_page_down()

void gtk_imhtml_page_down | ( | GtkIMHtml * | imhtml | ) |

Scrolls a GTK+ IM/HTML down by one page.

Parameters

  imhtml | The GTK+ IM/HTML.

## ◆ gtk_imhtml_page_up()

void gtk_imhtml_page_up | ( | GtkIMHtml * | imhtml | ) |

Scrolls a GTK+ IM/HTML up by one page.

Parameters

  imhtml | The GTK+ IM/HTML.

## ◆ gtk_imhtml_remove_smileys()

void gtk_imhtml_remove_smileys | ( | GtkIMHtml * | imhtml | ) |

Removes all smileys associated with a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

## ◆ gtk_imhtml_scalable_new()

GtkIMHtmlScalable * gtk_imhtml_scalable_new | ( | void |  | ) |

Creates and returns an new GTK+ IM/HTML scalable object.

Returns
  A new IM/HTML Scalable object.

## ◆ gtk_imhtml_scroll_to_end()

void gtk_imhtml_scroll_to_end | ( | GtkIMHtml * | imhtml,
|  | gboolean | smooth
| ) |  |

Scrolls a GTK+ IM/HTML to the end of its contents.

Parameters

  imhtml | The GTK+ IM/HTML.
  smooth | A boolean indicating if smooth scrolling should be used.

## ◆ gtk_imhtml_search_clear()

void gtk_imhtml_search_clear | ( | GtkIMHtml * | imhtml | ) |

Clears the highlighting from a prior search in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

## ◆ gtk_imhtml_search_find()

gboolean gtk_imhtml_search_find | ( | GtkIMHtml * | imhtml,
|  | const gchar * | text
| ) |  |

Finds and highlights a given string in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  text | The string to search for.

Returns
  `TRUE` if a search was performed, or `FALSE` if not.

## ◆ gtk_imhtml_set_editable()

void gtk_imhtml_set_editable | ( | GtkIMHtml * | imhtml,
|  | gboolean | editable
| ) |  |

Enables or disables editing in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  editable | `TRUE` to make the widget editable, or `FALSE` otherwise.

## ◆ gtk_imhtml_set_format_functions()

void gtk_imhtml_set_format_functions | ( | GtkIMHtml * | imhtml,
|  | GtkIMHtmlButtons | buttons
| ) |  |

Indicates which formatting functions to enable and disable in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  buttons | A GtkIMHtmlButtons bitmask indicating which functions to use.

## ◆ gtk_imhtml_set_funcs()

void gtk_imhtml_set_funcs | ( | GtkIMHtml * | imhtml,
|  | GtkIMHtmlFuncs * | f
| ) |  |

Sets the function callbacks to use with a GTK+ IM/HTML instance.

Parameters

  imhtml | The GTK+ IM/HTML.
  f | The GtkIMHTMLFuncs struct containing the functions to use.

## ◆ gtk_imhtml_set_populate_primary_clipboard()

void gtk_imhtml_set_populate_primary_clipboard | ( | GtkIMHtml * | imhtml,
|  | gboolean | populate
| ) |  |

By default this widget populates the PRIMARY clipboard with any selected text (as you would expect).

For scenarios (e.g. select-on-focus) where this would be problematic, this function can disable the PRIMARY population.

Parameters

  imhtml | The GtkIMHtml to enable/disable populating PRIMARY
  populate | enable/disable PRIMARY population

## ◆ gtk_imhtml_set_protocol_name()

void gtk_imhtml_set_protocol_name | ( | GtkIMHtml * | imhtml,
|  | const gchar * | protocol_name
| ) |  |

Associates a protocol name with a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  protocol_name | The protocol name to associate with the IM/HTML.

## ◆ gtk_imhtml_set_return_inserts_newline()

void gtk_imhtml_set_return_inserts_newline | ( | GtkIMHtml * | imhtml | ) |

By default this widget intercepts presses of the "return" key and emits the "message_send" signal instead.

If you don't want this behavior, and you want the standard GtkTextView behavior of inserting a newline into the buffer, then call this function.

Parameters

  imhtml | The GtkIMHtml where you want the "return" key to add newline and not emit the "message_send" signal.

## ◆ gtk_imhtml_set_whole_buffer_formatting_only()

void gtk_imhtml_set_whole_buffer_formatting_only | ( | GtkIMHtml * | imhtml,
|  | gboolean | wbfo
| ) |  |

Enables or disables whole buffer formatting only (wbfo) in a GTK+ IM/HTML.

In this mode formatting options to the buffer take effect for the entire buffer instead of specific text.

Parameters

  imhtml | The GTK+ IM/HTML.
  wbfo | `TRUE` to enable the mode, or `FALSE` otherwise.

## ◆ gtk_imhtml_setup_entry()

void gtk_imhtml_setup_entry | ( | GtkIMHtml * | imhtml,
|  | PurpleConnectionFlags | flags
| ) |  |

Setup formatting for an imhtml depending on the flags specified.

Parameters

  imhtml | The GTK+ IM/HTML.
  flags | The connection flag which describes the allowed types of formatting.

Since
  2.1.0

## ◆ gtk_imhtml_show_comments()

void gtk_imhtml_show_comments | ( | GtkIMHtml * | imhtml,
|  | gboolean | show
| ) |  |

Enables or disables showing the contents of HTML comments in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  show | `TRUE` if comments should be shown, or `FALSE` otherwise.

## ◆ gtk_imhtml_smiley_create()

GtkIMHtmlSmiley * gtk_imhtml_smiley_create | ( | const char * | file,
|  | const char * | shortcut,
|  | gboolean | hide,
|  | GtkIMHtmlSmileyFlags | flags
| ) |  |

Create a new GtkIMHtmlSmiley.

Parameters

  file | The image file for the smiley
  shortcut | The key shortcut for the smiley
  hide | `TRUE` if the smiley should be hidden in the smiley dialog, `FALSE` otherwise
  flags | The smiley flags

Returns
  The newly created smiley

Since
  2.5.0

## ◆ gtk_imhtml_smiley_destroy()

void gtk_imhtml_smiley_destroy | ( | GtkIMHtmlSmiley * | smiley | ) |

Destroy a GtkIMHtmlSmiley.

Parameters

  smiley | The smiley to destroy

Since
  2.5.0

## ◆ gtk_imhtml_smiley_get()

GtkIMHtmlSmiley * gtk_imhtml_smiley_get | ( | GtkIMHtml * | imhtml,
|  | const gchar * | sml,
|  | const gchar * | text
| ) |  |

Returns the smiley object associated with the text.

Parameters

  imhtml | The GTK+ IM/HTML.
  sml | The name of the smiley category.
  text | The text associated with the smiley.

## ◆ gtk_imhtml_smiley_reload()

void gtk_imhtml_smiley_reload | ( | GtkIMHtmlSmiley * | smiley | ) |

Reload the image data for the smiley.

Parameters

  smiley | The smiley to reload

Since
  2.5.0

## ◆ gtk_imhtml_toggle_backcolor()

gboolean gtk_imhtml_toggle_backcolor | ( | GtkIMHtml * | imhtml,
|  | const char * | color
| ) |  |

Toggles a background color at the current location or selection in a GTK IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  color | The HTML-style color, or `NULL` or "" to clear the color.

Returns
  `TRUE` if a color was set, or `FALSE` if it was cleared.

## ◆ gtk_imhtml_toggle_background()

gboolean gtk_imhtml_toggle_background | ( | GtkIMHtml * | imhtml,
|  | const char * | color
| ) |  |

Toggles a background color at the current location or selection in a GTK IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  color | The HTML-style color, or `NULL` or "" to clear the color.

Returns
  `TRUE` if a color was set, or `FALSE` if it was cleared.

## ◆ gtk_imhtml_toggle_bold()

void gtk_imhtml_toggle_bold | ( | GtkIMHtml * | imhtml | ) |

Toggles bold at the cursor location or selection in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

## ◆ gtk_imhtml_toggle_fontface()

gboolean gtk_imhtml_toggle_fontface | ( | GtkIMHtml * | imhtml,
|  | const char * | face
| ) |  |

Toggles a font face at the current location or selection in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  face | The font face name, or `NULL` or "" to clear the font.

Returns
  `TRUE` if a font name was set, or `FALSE` if it was cleared.

## ◆ gtk_imhtml_toggle_forecolor()

gboolean gtk_imhtml_toggle_forecolor | ( | GtkIMHtml * | imhtml,
|  | const char * | color
| ) |  |

Toggles a foreground color at the current location or selection in a GTK IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  color | The HTML-style color, or `NULL` or "" to clear the color.

Returns
  `TRUE` if a color was set, or `FALSE` if it was cleared.

## ◆ gtk_imhtml_toggle_italic()

void gtk_imhtml_toggle_italic | ( | GtkIMHtml * | imhtml | ) |

Toggles italic at the cursor location or selection in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

## ◆ gtk_imhtml_toggle_link()

void gtk_imhtml_toggle_link | ( | GtkIMHtml * | imhtml,
|  | const char * | url
| ) |  |

Toggles a link tag with the given URL at the current location or selection in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.
  url | The URL for the link or `NULL` to terminate the link.

## ◆ gtk_imhtml_toggle_strike()

void gtk_imhtml_toggle_strike | ( | GtkIMHtml * | imhtml | ) |

Toggles strikethrough at the cursor location or selection in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.

## ◆ gtk_imhtml_toggle_underline()

void gtk_imhtml_toggle_underline | ( | GtkIMHtml * | imhtml | ) |

Toggles underline at the cursor location or selection in a GTK+ IM/HTML.

Parameters

  imhtml | The GTK+ IM/HTML.