]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-smiley-manager.h
Move should_create_salut_account to local-xmpp-assistant-widget
[empathy.git] / libempathy-gtk / empathy-smiley-manager.h
index c73675742102ba6da460d838549236b5fc8895ec..1d6eaac545819aad4d5094a36509eaed41f33444 100644 (file)
@@ -15,7 +15,7 @@
  * 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>
  */
@@ -48,32 +48,36 @@ struct _EmpathySmileyManagerClass {
 };
 
 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