comparison pidgin/gtkimhtml.h @ 24396:38a2f78f80a7

Allow plugins to specify custom link types to the GtkIMHtml widget. Currently, the custom link types are added for all GtkIMHtml widgets. If we wanted, it should be possible to add custom links to particular widgets only too. If everything looks OK, I might merge this in before 2.6.0
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 16 Nov 2008 09:58:48 +0000
parents 8282911d5e17
children 284fd17c6020
comparison
equal deleted inserted replaced
24394:fae699fece1f 24396:38a2f78f80a7
154 void (*clear_format)(GtkIMHtml *); 154 void (*clear_format)(GtkIMHtml *);
155 void (*update_format)(GtkIMHtml *); 155 void (*update_format)(GtkIMHtml *);
156 gboolean (*message_send)(GtkIMHtml *); 156 gboolean (*message_send)(GtkIMHtml *);
157 void (*undo)(GtkIMHtml *); 157 void (*undo)(GtkIMHtml *);
158 void (*redo)(GtkIMHtml *); 158 void (*redo)(GtkIMHtml *);
159 GList *protocols; /* List of GtkIMHtmlProtocol's */
159 }; 160 };
160 161
161 struct _GtkIMHtmlFontDetail { 162 struct _GtkIMHtmlFontDetail {
162 gushort size; 163 gushort size;
163 gchar *face; 164 gchar *face;
883 * @param smiley The smiley to destroy 884 * @param smiley The smiley to destroy
884 * 885 *
885 * @since 2.5.0 886 * @since 2.5.0
886 */ 887 */
887 void gtk_imhtml_smiley_destroy(GtkIMHtmlSmiley *smiley); 888 void gtk_imhtml_smiley_destroy(GtkIMHtmlSmiley *smiley);
889
890 /**
891 * Register a protocol with the GtkIMHtml widget. Registering a protocol would allow
892 * certain text to be clickable.
893 *
894 * @param name The name of the protocol (e.g. http://)
895 * @param activate The callback to trigger when the protocol text is clicked.
896 * Removes any current protocol definition if @c NULL.
897 * @param context_menu The callback totrigger when the context menu is popped up on
898 * the protocol text.
899 *
900 * @return @c TRUE if the protocol was successfully registered (or unregistered, when #activate is @c NULL)
901 * @since 2.6.0
902 */
903 gboolean gtk_imhtml_class_register_protocol(const char *name,
904 gboolean (*activate)(GtkIMHtml *imhtml, const char *text),
905 gboolean (*context_menu)(GtkIMHtml *imhtml, const char *text, GtkWidget *menu));
888 /*@}*/ 906 /*@}*/
889 907
890 #ifdef __cplusplus 908 #ifdef __cplusplus
891 } 909 }
892 #endif 910 #endif