libpurple/util.h

changeset 16143
6393e5b11ff5
parent 15884
4de1981757fc
child 16144
4e022531d1c9
--- a/libpurple/util.h	Fri Apr 13 02:43:11 2007 +0000
+++ b/libpurple/util.h	Fri Apr 13 04:13:24 2007 +0000
@@ -462,6 +462,36 @@
  */
 char *purple_markup_get_tag_name(const char *tag);
 
+/**
+ * Returns a constant string of the character representation of the HTML
+ * entity pointed by *text. For example *text="&" will return "&" and so on.
+ * The *text variable is expected to point to a '&' - the first character 
+ * of the entity. On unrecognized entity the function will return NULL.
+ * Note that this function, unlike purple_unescape_html() does not seek 
+ * the string for the entity, does not replace the entity and does not
+ * return a newly allocated string.
+ *
+ * @param text A string containing HTML entity.
+ * @param length The string length of the deteced entity is stored in this variable.
+ * @return A constant string containing the character representation of the given entity.
+ */
+const char * purple_markup_detect_entity(const char *text, int *length);
+
+/**
+ * Returns a newly allocated string containing the value of the CSS property specified
+ * in opt. The *style argument is expected to point to a HTML inline CSS style.
+ * ( ie <span style="[inline css]"> ) The function will seek for the CSS propery and
+ * return it's value. Example: for style="direction:rtl;color:#dc4d1b;" opt="color"
+ * the function's return value would be #dc4d1b. On error or if the requested property
+ * was not found, the function returns NULL.
+ *
+ * @param style A string containing the inline CSS text.
+ * @param opt The requested CSS property.
+ * @return the value of the requested CSS property.
+ */
+gchar* purple_markup_get_css_property(const gchar *style, const gchar *opt);
+
+
 /*@}*/
 
 

mercurial