Mercurial > pidgin
comparison libpurple/protocols/myspace/markup.c @ 19435:bddc6a6fddf0
In msimprpl, move user-related code to a new user module, and move other
pieces of code into their proper modules. Now myspace.c isn't so unwieldy.
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Sun, 26 Aug 2007 07:37:28 +0000 |
parents | 1e00b684c46f |
children | 11c727b19201 |
comparison
equal
deleted
inserted
replaced
19434:1e00b684c46f | 19435:bddc6a6fddf0 |
---|---|
16 * along with this program; if not, write to the Free Software | 16 * along with this program; if not, write to the Free Software |
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 */ | 18 */ |
19 | 19 |
20 #include "myspace.h" | 20 #include "myspace.h" |
21 | |
22 typedef void (*MSIM_XMLNODE_CONVERT)(MsimSession *, xmlnode *, gchar **, gchar **); | |
21 | 23 |
22 /* Internal functions */ | 24 /* Internal functions */ |
23 | 25 |
24 static guint msim_point_to_purple_size(MsimSession *session, guint point); | 26 static guint msim_point_to_purple_size(MsimSession *session, guint point); |
25 static guint msim_purple_size_to_point(MsimSession *session, guint size); | 27 static guint msim_purple_size_to_point(MsimSession *session, guint size); |
96 static gdouble _font_scale[] = { .85, .95, 1, 1.2, 1.44, 1.728, 2.0736 }; | 98 static gdouble _font_scale[] = { .85, .95, 1, 1.2, 1.44, 1.728, 2.0736 }; |
97 | 99 |
98 #define MAX_FONT_SIZE 7 /* Purple maximum font size */ | 100 #define MAX_FONT_SIZE 7 /* Purple maximum font size */ |
99 #define POINTS_PER_INCH 72 /* How many pt's in an inch */ | 101 #define POINTS_PER_INCH 72 /* How many pt's in an inch */ |
100 | 102 |
103 /* Text formatting bits for <f s=#> */ | |
104 #define MSIM_TEXT_BOLD 1 | |
105 #define MSIM_TEXT_ITALIC 2 | |
106 #define MSIM_TEXT_UNDERLINE 4 | |
107 | |
108 /* Default baseline size of purple's fonts, in points. What is size 3 in points. | |
109 * _font_scale specifies scaling factor relative to this point size. Note this | |
110 * is only the default; it is configurable in account options. */ | |
111 #define MSIM_BASE_FONT_POINT_SIZE 8 | |
112 | |
113 /* Default display's DPI. 96 is common but it can differ. Also configurable | |
114 * in account options. */ | |
115 #define MSIM_DEFAULT_DPI 96 | |
116 | |
117 | |
101 /* round is part of C99, but sometimes is unavailable before then. | 118 /* round is part of C99, but sometimes is unavailable before then. |
102 * Based on http://forums.belution.com/en/cpp/000/050/13.shtml | 119 * Based on http://forums.belution.com/en/cpp/000/050/13.shtml |
103 */ | 120 */ |
104 double msim_round(double value) | 121 double msim_round(double value) |
105 { | 122 { |