* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Authors: Dafydd Harrie <dafydd.harries@collabora.co.uk>
* Xavier Claessens <xclaesse@gmail.com>
*/
};
typedef struct {
- GdkPixbuf *pixbuf;
- gchar *str;
+ GdkPixbuf *pixbuf;
+ gchar *str;
} EmpathySmiley;
+typedef struct {
+ GdkPixbuf *pixbuf; /* Pixbuf of the smiley */
+ const gchar *path; /* Filename of the smiley image */
+ guint start; /* text[start:end] should be replaced by pixbuf */
+ guint end;
+} EmpathySmileyHit;
+
typedef void (*EmpathySmileyMenuFunc) (EmpathySmileyManager *manager,
EmpathySmiley *smiley,
gpointer user_data);
GType empathy_smiley_manager_get_type (void) G_GNUC_CONST;
-EmpathySmileyManager *empathy_smiley_manager_new (void);
+EmpathySmileyManager *empathy_smiley_manager_dup_singleton (void);
void empathy_smiley_manager_load (EmpathySmileyManager *manager);
void empathy_smiley_manager_add (EmpathySmileyManager *manager,
const gchar *icon_name,
const gchar *first_str,
...);
-void empathy_smiley_manager_add_from_pixbuf (EmpathySmileyManager *manager,
- GdkPixbuf *smiley,
- const gchar *first_str,
- ...);
GSList * empathy_smiley_manager_get_all (EmpathySmileyManager *manager);
-GSList * empathy_smiley_manager_parse (EmpathySmileyManager *manager,
- const gchar *text);
+GSList * empathy_smiley_manager_parse_len (EmpathySmileyManager *manager,
+ const gchar *text,
+ gssize len);
GtkWidget * empathy_smiley_menu_new (EmpathySmileyManager *manager,
EmpathySmileyMenuFunc func,
gpointer user_data);
-void empathy_smiley_free (EmpathySmiley *smiley);
+void empathy_smiley_hit_free (EmpathySmileyHit *hit);
G_END_DECLS