#include <glib.h>
#include <alp/bundlemgr.h>
Go to the source code of this file.
Data Structures | |
| struct | _AlpEmoticonRef |
Typedefs | |
| typedef _AlpEmoticonRef | AlpEmoticonRef |
Functions | |
| void | alp_emoticon_free (AlpEmoticonRef *ioSelfP) |
| AlpEmoticonRef * | alp_emoticon_init (const char *iBundleNameP) |
| void | alp_emoticon_insert_in_textview (const AlpEmoticonRef *iSelfP, GtkTextView *iTextViewP, const gchar *iTextP, const gchar *iTagP) |
|
|
This API allows to display an emoticon image instead of an emoticon shortcut text (":)" for example) in a GtkTextView. The emoticons are stored in a bundle. At the root of the bundle resource directory must lies a description file called "emoticons.ini". This description file contains the base path where are stored all the emoticons. This file also lists the association between the emoticons and their shortcut texts. Example:
[path] base=rsc/images/icons/17x17/emoticons/ [emoticons] angel_17x17.png=(A) (a) angry_17x17.png=:-@ :@ To use this API, you must first load this description file into memory. this is done with alp_emoticon_init(). Then, you can start adding text that potentially contains emoticons shortcut text as defined in the description file. To add text in to a given GtkTextView, you must use alp_emoticon_insert_in_textview(). When you're done adding text into the GtkTextView, you must free the emoticon parser context with alp_emoticon_free(). |
|
|
Free the emoticon parser
|
|
|
Initialize the emoticon parser The returned pointer will have to be freed with alp_emoticon_free()
|
|
||||||||||||||||||||
|
This function inserts a text in the text buffer associated to the given text view. The text is parsed to detect the emoticon shortcut texts and replace them by the proper emoticon icon.
|
Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.