gtkimhtml.h
Go to the documentation of this file.
/* Pidgin is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#ifndef _PIDGINIMHTML_H_
#define _PIDGINIMHTML_H_
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include "gtksourceundomanager.h"
#include "connection.h"
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************************************
* @name Structures
**************************************************************************/
#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)
typedef struct _GtkIMHtml GtkIMHtml;
typedef struct _GtkIMHtmlClass GtkIMHtmlClass;
#if !(defined PIDGIN_DISABLE_DEPRECATED) && !(defined _PIDGIN_GTKIMHTML_C_)
typedef struct _GtkIMHtmlFontDetail GtkIMHtmlFontDetail; /* The five elements contained in a FONT tag */
#endif
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 enum {
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
} GtkIMHtmlButtons;
typedef enum {
GTK_IMHTML_SMILEY_CUSTOM = 1 << 0
} GtkIMHtmlSmileyFlags;
struct _GtkIMHtml {
GtkTextView text_view;
GtkTextBuffer *text_buffer;
GdkCursor *hand_cursor;
GdkCursor *arrow_cursor;
GdkCursor *text_cursor;
GHashTable *smiley_data;
GtkSmileyTree *default_smilies;
char *protocol_name;
guint scroll_src;
GTimer *scroll_time;
GQueue *animations;
int num_animations;
gboolean show_comments;
GtkWidget *tip_window;
char *tip;
guint tip_timer;
GtkTextTag *prelit_tag;
GList *scalables;
GdkRectangle old_rect;
gchar *search_string;
gboolean editable;
GtkIMHtmlButtons format_functions;
gboolean wbfo; /* Whole buffer formatting only. */
gint insert_offset;
struct {
gboolean bold:1;
gboolean italic:1;
gboolean underline:1;
gboolean strike:1;
gchar *forecolor;
gchar *backcolor;
gchar *background;
gchar *fontface;
int fontsize;
GtkTextTag *link;
} edit;
#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKIMHTML_C_)
char *clipboard_text_string;
char *clipboard_html_string;
#else
char *depr1;
char *depr2;
#endif
GSList *im_images;
GtkIMHtmlFuncs *funcs;
GtkSourceUndoManager *undo_manager;
};
struct _GtkIMHtmlClass {
GtkTextViewClass parent_class;
void (*url_clicked)(GtkIMHtml *, const gchar *);
void (*buttons_update)(GtkIMHtml *, GtkIMHtmlButtons);
void (*toggle_format)(GtkIMHtml *, GtkIMHtmlButtons);
void (*clear_format)(GtkIMHtml *);
void (*update_format)(GtkIMHtml *);
gboolean (*message_send)(GtkIMHtml *);
void (*undo)(GtkIMHtml *);
void (*redo)(GtkIMHtml *);
GList *protocols; /* List of GtkIMHtmlProtocol's */
};
#if !(defined PIDGIN_DISABLE_DEPRECATED) && !(defined _PIDGIN_GTKIMHTML_C_)
struct _GtkIMHtmlFontDetail {
gushort size;
gchar *face;
gchar *fore;
gchar *back;
gchar *bg;
gchar *sml;
gboolean underline;
gshort bold;
};
#endif
struct _GtkSmileyTree {
GString *values;
GtkSmileyTree **children;
GtkIMHtmlSmiley *image;
};
struct _GtkIMHtmlSmiley {
gchar *smile;
gchar *file;
GdkPixbufAnimation *icon;
gboolean hidden;
GdkPixbufLoader *loader;
GSList *anchors;
GtkIMHtmlSmileyFlags flags;
GtkIMHtml *imhtml;
gpointer data;
gsize datasize;
};
struct _GtkIMHtmlScalable {
void (*scale)(struct _GtkIMHtmlScalable *, int, int);
void (*add_to)(struct _GtkIMHtmlScalable *, GtkIMHtml *, GtkTextIter *);
void (*free)(struct _GtkIMHtmlScalable *);
};
struct _GtkIMHtmlImage {
GtkIMHtmlScalable scalable;
GtkImage *image;
GdkPixbuf *pixbuf;
GtkTextMark *mark;
gchar *filename;
int width;
int height;
int id;
GtkWidget *filesel;
};
struct _GtkIMHtmlAnimation {
GtkIMHtmlImage imhtmlimage;
GdkPixbufAnimation *anim;
GdkPixbufAnimationIter *iter;
guint timer;
};
struct _GtkIMHtmlHr {
GtkIMHtmlScalable scalable;
GtkWidget *sep;
};
typedef enum {
GTK_IMHTML_NO_COLOURS = 1 << 0,
GTK_IMHTML_NO_FONTS = 1 << 1,
GTK_IMHTML_NO_COMMENTS = 1 << 2, /* Remove */
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
} GtkIMHtmlOptions;
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
};
#define GTK_IMHTML_DND_TARGETS \
{ "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 }
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);
struct _GtkIMHtmlFuncs {
GtkIMHtmlGetImageFunc image_get;
GtkIMHtmlGetImageDataFunc image_get_data;
GtkIMHtmlGetImageSizeFunc image_get_size;
GtkIMHtmlGetImageFilenameFunc image_get_filename;
GtkIMHtmlImageRefFunc image_ref;
GtkIMHtmlImageUnrefFunc image_unref;
};
/**************************************************************************
* @name GTK+ IM/HTML rendering component API
**************************************************************************/
GType gtk_imhtml_get_type(void);
GtkWidget *gtk_imhtml_new(void *, void *);
GtkIMHtmlSmiley *gtk_imhtml_smiley_get(GtkIMHtml * imhtml,
const gchar * sml, const gchar * text);
void gtk_imhtml_associate_smiley(GtkIMHtml *imhtml, const gchar *sml, GtkIMHtmlSmiley *smiley);
void gtk_imhtml_remove_smileys(GtkIMHtml *imhtml);
void gtk_imhtml_set_funcs(GtkIMHtml *imhtml, GtkIMHtmlFuncs *f);
void gtk_imhtml_show_comments(GtkIMHtml *imhtml, gboolean show);
const char *gtk_imhtml_get_protocol_name(GtkIMHtml *imhtml);
void gtk_imhtml_set_protocol_name(GtkIMHtml *imhtml, const gchar *protocol_name);
#define gtk_imhtml_append_text(imhtml, text, options) \
gtk_imhtml_append_text_with_images(imhtml, text, options, NULL)
void gtk_imhtml_append_text_with_images(GtkIMHtml *imhtml,
const gchar *text,
GtkIMHtmlOptions options,
GSList *unused);
void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml,
const gchar *text,
GtkIMHtmlOptions options,
GtkTextIter *iter);
void gtk_imhtml_scroll_to_end(GtkIMHtml *imhtml, gboolean smooth);
void gtk_imhtml_delete(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end);
#define gtk_imhtml_clear(imhtml) \
gtk_imhtml_delete(imhtml, NULL, NULL)
void gtk_imhtml_page_up(GtkIMHtml *imhtml);
void gtk_imhtml_page_down(GtkIMHtml *imhtml);
GtkIMHtmlScalable *gtk_imhtml_scalable_new(void);
GtkIMHtmlScalable *gtk_imhtml_image_new(GdkPixbuf *img, const gchar *filename, int id);
/*
* TODO: All this animation code could be combined much better with
* the image code. It couldn't be done when it was written
* because it requires breaking backward compatibility. It
* would be good to do it for 3.0.0.
*/
GtkIMHtmlScalable *gtk_imhtml_animation_new(GdkPixbufAnimation *img, const gchar *filename, int id);
/* TODO: Is there any reason this isn't private? */
void gtk_imhtml_image_free(GtkIMHtmlScalable *scale);
/* TODO: Is there any reason this isn't private? */
void gtk_imhtml_animation_free(GtkIMHtmlScalable *scale);
/* TODO: Is there any reason this isn't private? */
void gtk_imhtml_image_scale(GtkIMHtmlScalable *scale, int width, int height);
/* TODO: Is there any reason this isn't private? */
void gtk_imhtml_image_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter);
GtkIMHtmlScalable *gtk_imhtml_hr_new(void);
void gtk_imhtml_hr_free(GtkIMHtmlScalable *scale);
void gtk_imhtml_hr_scale(GtkIMHtmlScalable *scale, int width, int height);
void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter);
gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text);
void gtk_imhtml_search_clear(GtkIMHtml *imhtml);
void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable);
void gtk_imhtml_set_whole_buffer_formatting_only(GtkIMHtml *imhtml, gboolean wbfo);
void gtk_imhtml_set_format_functions(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons);
GtkIMHtmlButtons gtk_imhtml_get_format_functions(GtkIMHtml *imhtml);
void gtk_imhtml_get_current_format(GtkIMHtml *imhtml, gboolean *bold, gboolean *italic, gboolean *underline);
char *gtk_imhtml_get_current_fontface(GtkIMHtml *imhtml);
char *gtk_imhtml_get_current_forecolor(GtkIMHtml *imhtml);
char *gtk_imhtml_get_current_backcolor(GtkIMHtml *imhtml);
char *gtk_imhtml_get_current_background(GtkIMHtml *imhtml);
gint gtk_imhtml_get_current_fontsize(GtkIMHtml *imhtml);
gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml);
void gtk_imhtml_clear_formatting(GtkIMHtml *imhtml);
void gtk_imhtml_toggle_bold(GtkIMHtml *imhtml);
void gtk_imhtml_toggle_italic(GtkIMHtml *imhtml);
void gtk_imhtml_toggle_underline(GtkIMHtml *imhtml);
void gtk_imhtml_toggle_strike(GtkIMHtml *imhtml);
gboolean gtk_imhtml_toggle_forecolor(GtkIMHtml *imhtml, const char *color);
gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color);
gboolean gtk_imhtml_toggle_background(GtkIMHtml *imhtml, const char *color);
gboolean gtk_imhtml_toggle_fontface(GtkIMHtml *imhtml, const char *face);
void gtk_imhtml_toggle_link(GtkIMHtml *imhtml, const char *url);
void gtk_imhtml_insert_link(GtkIMHtml *imhtml, GtkTextMark *mark, const char *url, const char *text);
void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley);
void gtk_imhtml_insert_smiley_at_iter(GtkIMHtml *imhtml, const char *sml, char *smiley, GtkTextIter *iter);
void gtk_imhtml_insert_image_at_iter(GtkIMHtml *imhtml, int id, GtkTextIter *iter);
void gtk_imhtml_font_set_size(GtkIMHtml *imhtml, gint size);
void gtk_imhtml_font_shrink(GtkIMHtml *imhtml);
void gtk_imhtml_font_grow(GtkIMHtml *imhtml);
char *gtk_imhtml_get_markup_range(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end);
char *gtk_imhtml_get_markup(GtkIMHtml *imhtml);
char **gtk_imhtml_get_markup_lines(GtkIMHtml *imhtml);
char *gtk_imhtml_get_text(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *stop);
void gtk_imhtml_setup_entry(GtkIMHtml *imhtml, PurpleConnectionFlags flags);
GtkIMHtmlSmiley *gtk_imhtml_smiley_create(const char *file, const char *shortcut, gboolean hide,
GtkIMHtmlSmileyFlags flags);
void gtk_imhtml_smiley_reload(GtkIMHtmlSmiley *smiley);
void gtk_imhtml_smiley_destroy(GtkIMHtmlSmiley *smiley);
gboolean gtk_imhtml_class_register_protocol(const char *name,
gboolean (*activate)(GtkIMHtml *imhtml, GtkIMHtmlLink *link),
gboolean (*context_menu)(GtkIMHtml *imhtml, GtkIMHtmlLink *link, GtkWidget *menu));
const char *gtk_imhtml_link_get_url(GtkIMHtmlLink *link);
const GtkTextTag *gtk_imhtml_link_get_text_tag(GtkIMHtmlLink *link);
gboolean gtk_imhtml_link_activate(GtkIMHtmlLink *link);
void gtk_imhtml_set_return_inserts_newline(GtkIMHtml *imhtml);
void gtk_imhtml_set_populate_primary_clipboard(GtkIMHtml *imhtml, gboolean populate);
#ifdef __cplusplus
}
#endif
#endif /* _PIDGINIMHTML_H_ */
GtkIMHtmlButtons
GtkIMHtmlButtons
Definition: gtkimhtml.h:68
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.
gtk_imhtml_page_down
void gtk_imhtml_page_down(GtkIMHtml *imhtml)
Scrolls a GTK+ IM/HTML down by one page.
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.
gtk_imhtml_page_up
void gtk_imhtml_page_up(GtkIMHtml *imhtml)
Scrolls a GTK+ IM/HTML up by one page.
gtk_imhtml_hr_free
void gtk_imhtml_hr_free(GtkIMHtmlScalable *scale)
Destroys and frees a GTK+ IM/HTML scalable horizontal rule.
gtk_imhtml_scalable_new
GtkIMHtmlScalable * gtk_imhtml_scalable_new(void)
Creates and returns an new GTK+ IM/HTML scalable object.
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.
gtk_imhtml_get_markup
char * gtk_imhtml_get_markup(GtkIMHtml *imhtml)
Returns the entire HTML formatted contents of a GTK+ IM/HTML.
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.
gtk_imhtml_remove_smileys
void gtk_imhtml_remove_smileys(GtkIMHtml *imhtml)
Removes all smileys associated with a GTK+ IM/HTML.
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.
gtk_imhtml_toggle_italic
void gtk_imhtml_toggle_italic(GtkIMHtml *imhtml)
Toggles italic at the cursor location or selection in a 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.
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.
GTK_IMHTML_CUSTOM_SMILEY
Show custom smileys when appropriate.
Definition: gtkimhtml.h:84
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.
gtk_imhtml_class_register_protocol
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.
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.
gtk_imhtml_new
GtkWidget * gtk_imhtml_new(void *, void *)
Creates and returns a new GTK+ IM/HTML widget.
_GtkSourceUndoManager
Definition: gtksourceundomanager.h:44
gtk_imhtml_hr_new
GtkIMHtmlScalable * gtk_imhtml_hr_new(void)
Creates and returns an new GTK+ IM/HTML scalable with a horizontal rule.
gtk_imhtml_get_format_functions
GtkIMHtmlButtons gtk_imhtml_get_format_functions(GtkIMHtml *imhtml)
Returns which formatting functions are enabled in a GTK+ IM/HTML.
_GtkIMHtml::clipboard_text_string
char * clipboard_text_string
Definition: gtkimhtml.h:139
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.
gtk_imhtml_setup_entry
void gtk_imhtml_setup_entry(GtkIMHtml *imhtml, PurpleConnectionFlags flags)
Setup formatting for an imhtml depending on the flags specified.
gtk_imhtml_set_editable
void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable)
Enables or disables editing in a GTK+ IM/HTML.
_GtkIMHtmlFuncs
Definition: gtkimhtml.h:273
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.
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.
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.
_GtkIMHtmlImage::pixbuf
GdkPixbuf * pixbuf
The original pixbuf, before any scaling.
Definition: gtkimhtml.h:208
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.
gtk_imhtml_toggle_bold
void gtk_imhtml_toggle_bold(GtkIMHtml *imhtml)
Toggles bold at the cursor location or selection in a 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/H...
gtk_imhtml_smiley_reload
void gtk_imhtml_smiley_reload(GtkIMHtmlSmiley *smiley)
Reload the image data for the smiley.
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.
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.
gtk_imhtml_link_activate
gboolean gtk_imhtml_link_activate(GtkIMHtmlLink *link)
Activates a GtkIMHtmlLink object.
_GtkIMHtmlClass
Definition: gtkimhtml.h:152
gtk_imhtml_link_get_url
const char * gtk_imhtml_link_get_url(GtkIMHtmlLink *link)
Get the URL associated with a link.
gtk_imhtml_clear_formatting
void gtk_imhtml_clear_formatting(GtkIMHtml *imhtml)
Clear all the formatting on a GTK+ IM/HTML.
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.
gtk_imhtml_associate_smiley
void gtk_imhtml_associate_smiley(GtkIMHtml *imhtml, const gchar *sml, GtkIMHtmlSmiley *smiley)
Associates a smiley with a GTK+ IM/HTML.
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.
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).
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.
_GtkIMHtmlImage::image
GtkImage * image
Contains the scaled version of this pixbuf.
Definition: gtkimhtml.h:207
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...
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.
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.
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.
gtk_imhtml_get_protocol_name
const char * gtk_imhtml_get_protocol_name(GtkIMHtml *imhtml)
Gets the protocol name associated with this GTK+ IM/HTML.
gtk_imhtml_search_clear
void gtk_imhtml_search_clear(GtkIMHtml *imhtml)
Clears the highlighting from a prior search in a GTK+ IM/HTML.
_GtkIMHtmlSmiley::datasize
gsize datasize
Definition: gtkimhtml.h:196
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 po...
_GtkIMHtmlAnimation::anim
GdkPixbufAnimation * anim
The original animation, before any scaling.
Definition: gtkimhtml.h:219
gtk_imhtml_smiley_destroy
void gtk_imhtml_smiley_destroy(GtkIMHtmlSmiley *smiley)
Destroy a GtkIMHtmlSmiley.
gtk_imhtml_animation_free
void gtk_imhtml_animation_free(GtkIMHtmlScalable *scale)
Destroys and frees a GTK+ IM/HTML scalable animation.
PurpleConnectionFlags
PurpleConnectionFlags
Flags to change behavior of the client for a given connection.
Definition: connection.h:36
gtk_imhtml_get_type
GType gtk_imhtml_get_type(void)
Returns the GType object for an IM/HTML widget.
connection.h
GtkIMHtmlLink
struct _GtkIMHtmlLink GtkIMHtmlLink
Definition: gtkimhtml.h:66
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.
gtk_imhtml_get_editable
gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml)
Checks whether a GTK+ IM/HTML is marked as editable.
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.
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.
_GtkIMHtmlFontDetail
Definition: gtkimhtml.h:168
gtk_imhtml_smiley_create
GtkIMHtmlSmiley * gtk_imhtml_smiley_create(const char *file, const char *shortcut, gboolean hide, GtkIMHtmlSmileyFlags flags)
Create a new GtkIMHtmlSmiley.
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.
_GtkIMHtmlAnimation
Definition: gtkimhtml.h:217
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.
_GtkIMHtmlSmiley
Definition: gtkimhtml.h:186
gtk_imhtml_toggle_strike
void gtk_imhtml_toggle_strike(GtkIMHtml *imhtml)
Toggles strikethrough at the cursor location or selection in a GTK+ IM/HTML.
_GtkIMHtmlImage
Definition: gtkimhtml.h:205
_GtkIMHtmlScalable
Definition: gtkimhtml.h:199
_GtkIMHtmlHr
Definition: gtkimhtml.h:224
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 ins...
_GtkIMHtml::clipboard_html_string
char * clipboard_html_string
Definition: gtkimhtml.h:141
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.
_GtkIMHtml
Definition: gtkimhtml.h:92
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.
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.
_GtkSmileyTree
Definition: gtkimhtml.h:180
gtk_imhtml_image_free
void gtk_imhtml_image_free(GtkIMHtmlScalable *scale)
Destroys and frees a GTK+ IM/HTML scalable image.
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.
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.
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.
gtk_imhtml_toggle_underline
void gtk_imhtml_toggle_underline(GtkIMHtml *imhtml)
Toggles underline at the cursor location or selection in a GTK+ IM/HTML.
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.
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.
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.