Thu, 25 Aug 2022 21:34:53 -0500
Port the invite dialog to GTK4
Testing Done:
Opened the dialog via conversations -> invite and made sure it worked as expected.
Reviewed at https://reviews.imfreedom.org/r/1644/
|
40564
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
40578
4118acc90778
Fix a small typo.
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40564
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
40564
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * Purple is the legal property of its developers, whose names are too numerous |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * source distribution. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * This program is free software; you can redistribute it and/or modify |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * This program is distributed in the hope that it will be useful, |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) |
|
41276
03f98ece6b26
Fix a ton of missing and incorrect global header guards
Gary Kramlich <grim@reaperworld.com>
parents:
41207
diff
changeset
|
24 | # error "only <purple.h> may be included directly" |
|
40564
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #endif |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #ifndef PURPLE_MARKUP_H |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #define PURPLE_MARKUP_H |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <glib.h> |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | G_BEGIN_DECLS |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | /** |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | * purple_markup_escape_text: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | * @text: The text to escape |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | * @length: The length of the text, or -1 if #NULL terminated |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | * Escapes special characters in a plain-text string so they display |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | * correctly as HTML. For example, & is replaced with &amp; and < is |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | * replaced with &lt; |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | * This is exactly the same as g_markup_escape_text(), except that it |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | * does not change ' to &apos; because &apos; is not a valid HTML 4 entity, |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | * and is displayed literally in IE7. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | gchar *purple_markup_escape_text(const gchar *text, gssize length); |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | /** |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | * purple_markup_find_tag: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | * @needle: The name of the tag |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | * @haystack: The null-delimited string to search in |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | * @start: A pointer to the start of the tag if found |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | * @end: A pointer to the end of the tag if found |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | * @attributes: The attributes, if the tag was found. This should |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | * be freed with g_datalist_clear(). |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | * Finds an HTML tag matching the given name. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | * This locates an HTML tag's start and end, and stores its attributes |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | * in a GData hash table. The names of the attributes are lower-cased |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | * in the hash table, and the name of the tag is case insensitive. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | * Returns: TRUE if the tag was found |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | gboolean purple_markup_find_tag(const char *needle, const char *haystack, |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | const char **start, const char **end, |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | GData **attributes); |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | /** |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | * purple_markup_html_to_xhtml: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | * @html: The HTML markup. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | * @dest_xhtml: The destination XHTML output. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | * @dest_plain: The destination plain-text output. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
75 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | * Converts HTML markup to XHTML. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
77 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
78 | void purple_markup_html_to_xhtml(const char *html, char **dest_xhtml, |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | char **dest_plain); |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
81 | /** |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | * purple_markup_strip_html: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | * @str: The string to strip HTML from. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | * Strips HTML tags from a string. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | * Returns: The new string without HTML. You must g_free this string |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | * when finished with it. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | char *purple_markup_strip_html(const char *str); |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | /** |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | * purple_markup_linkify: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | * @str: The string to linkify. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
95 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | * Adds the necessary HTML code to turn URIs into HTML links in a string. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
97 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | * Returns: The new string with all URIs surrounded in standard |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | * HTML <a href="whatever"></a> tags. You must g_free() |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
100 | * this string when finished with it. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
101 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
102 | char *purple_markup_linkify(const char *str); |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
103 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
104 | /** |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | * purple_unescape_text: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
106 | * @text: The string in which to unescape any HTML entities |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | * Unescapes HTML entities to their literal characters in the text. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
109 | * For example "&amp;" is replaced by '&' and so on. Also converts |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | * numerical entities (e.g. "&\#38;" is also '&'). |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
111 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
112 | * This function currently supports the following named entities: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
113 | * "&amp;", "&lt;", "&gt;", "&copy;", "&quot;", |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
114 | * "&reg;", "&apos;" |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
115 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
116 | * purple_unescape_html() is similar, but also converts "<br>" into "\n". |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
117 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
118 | * See purple_unescape_html() |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
119 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
120 | * Returns: The text with HTML entities literalized. You must g_free |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
121 | * this string when finished with it. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
122 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
123 | char *purple_unescape_text(const char *text); |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
124 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
125 | /** |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
126 | * purple_unescape_html: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
127 | * @html: The string in which to unescape any HTML entities |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
128 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
129 | * Unescapes HTML entities to their literal characters and converts |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
130 | * "<br>" to "\n". See purple_unescape_text() for more details. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
131 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
132 | * See purple_unescape_text() |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
133 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
134 | * Returns: The text with HTML entities literalized. You must g_free |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
135 | * this string when finished with it. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
136 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
137 | char *purple_unescape_html(const char *html); |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
138 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
139 | /** |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
140 | * purple_markup_slice: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
141 | * @str: The input NUL terminated, HTML, UTF-8 (or ASCII) string. |
|
41083
590d533cf290
Fix several typos in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40584
diff
changeset
|
142 | * @x: The character offset into an unformatted version of str to begin at. |
|
590d533cf290
Fix several typos in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40584
diff
changeset
|
143 | * @y: The character offset (into an unformatted version of str) of one past |
|
590d533cf290
Fix several typos in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
40584
diff
changeset
|
144 | * the last character to include in the slice. |
|
40564
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
145 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
146 | * Returns a newly allocated substring of the HTML UTF-8 string "str". |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
147 | * The markup is preserved such that the substring will have the same |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
148 | * formatting as original string, even though some tags may have been |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
149 | * opened before "x", or may close after "y". All open tags are closed |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
150 | * at the end of the returned string, in the proper order. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
151 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
152 | * Note that x and y are in character offsets, not byte offsets, and |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
153 | * are offsets into an unformatted version of str. Because of this, |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
154 | * this function may be sensitive to changes in GtkIMHtml and may break |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
155 | * when used with other UI's. libpurple users are encouraged to report and |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
156 | * work out any problems encountered. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
157 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
158 | * Returns: The HTML slice of string, with all formatting retained. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
159 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
160 | char *purple_markup_slice(const char *str, guint x, guint y); |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
161 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
162 | /** |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
163 | * purple_markup_get_tag_name: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
164 | * @tag: The string starting a HTML tag. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
165 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
166 | * Returns a newly allocated string containing the name of the tag |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
167 | * located at "tag". Tag is expected to point to a '<', and contain |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
168 | * a '>' sometime after that. If there is no '>' and the string is |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
169 | * not NUL terminated, this function can be expected to segfault. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
170 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
171 | * Returns: A string containing the name of the tag. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
172 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
173 | char *purple_markup_get_tag_name(const char *tag); |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
174 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
175 | /** |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
176 | * purple_markup_unescape_entity: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
177 | * @text: A string containing an HTML entity. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
178 | * @length: If not %NULL, the string length of the entity is stored in this location. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
179 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
180 | * Returns a constant string of the character representation of the HTML |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
181 | * entity pointed to by @text. For example, purple_markup_unescape_entity("&amp;") |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
182 | * will return "&". The @text variable is expected to point to an '&', |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
183 | * the first character of the entity. If given an unrecognized entity, the function |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
184 | * returns %NULL. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
185 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
186 | * Note that this function, unlike purple_unescape_html(), does not search |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
187 | * the string for the entity, does not replace the entity, and does not |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
188 | * return a newly allocated string. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
189 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
190 | * Returns: A constant string containing the character representation of the given entity. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
191 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
192 | const char * purple_markup_unescape_entity(const char *text, int *length); |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
193 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
194 | /** |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
195 | * purple_markup_get_css_property: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
196 | * @style: A string containing the inline CSS text. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
197 | * @opt: The requested CSS property. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
198 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
199 | * Returns a newly allocated string containing the value of the CSS property specified |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
200 | * in opt. The @style argument is expected to point to a HTML inline CSS. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
201 | * The function will seek for the CSS property and return its value. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
202 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
203 | * For example, purple_markup_get_css_property("direction:rtl;color:#dc4d1b;", |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
204 | * "color") would return "#dc4d1b". |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
205 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
206 | * On error or if the requested property was not found, the function returns |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
207 | * %NULL. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
208 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
209 | * Returns: The value of the requested CSS property. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
210 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
211 | char * purple_markup_get_css_property(const gchar *style, const gchar *opt); |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
212 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
213 | /** |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
214 | * purple_markup_is_rtl: |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
215 | * @html: The HTML text. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
216 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
217 | * Check if the given HTML contains RTL text. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
218 | * |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
219 | * Returns: TRUE if the text contains RTL text, FALSE otherwise. |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
220 | */ |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
221 | gboolean purple_markup_is_rtl(const char *html); |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
222 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
223 | G_END_DECLS |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
224 | |
|
2c5b4dc2e86a
Pull the purple_markup_* api out of util.[ch] to purplemarkup.[ch]. No code was changed just moved it from one file to the other.
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
225 | #endif /* PURPLE_MARKUP_H */ |