pidgin/plugins/adiumthemes/message-style.h

Tue, 25 Aug 2009 15:40:06 +0000

author
Arnold Noronha <tdrhq@soc.pidgin.im>
date
Tue, 25 Aug 2009 15:40:06 +0000
branch
soc.2009.webkitmessageview
changeset 32491
c917d2ba4a38
parent 32488
17153501cae6
child 32513
9352b4c92d13
permissions
-rw-r--r--

Read AllowTextColors key properly.

32485
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
1
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
2 #include <glib.h>
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
3
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
4 /*
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
5 * I'm going to allow a different style for each PidginConversation.
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
6 * This way I can do two things: 1) change the theme on the fly and not
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
7 * change existing themes, and 2) Use a different theme for IMs and
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
8 * chats.
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
9 */
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
10 typedef struct _PidginMessageStyle {
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
11 int ref_counter;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
12
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
13 /* current config options */
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
14 char *variant; /* allowed to be NULL if there are no variants */
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
15
32487
13f307997f1a Instead of using references, use copy's. Sigh, I know this is a memory inefficient
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32486
diff changeset
16 /* Info.plist keys that change with Variant */
32485
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
17
32487
13f307997f1a Instead of using references, use copy's. Sigh, I know this is a memory inefficient
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32486
diff changeset
18 /* Static Info.plist keys */
32485
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
19 int message_view_version;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
20 char *cf_bundle_name;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
21 char *cf_bundle_identifier;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
22 char *cf_bundle_get_info_string;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
23 char *default_font_family;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
24 int default_font_size;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
25 gboolean shows_user_icons;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
26 gboolean disable_combine_consecutive;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
27 gboolean default_background_is_transparent;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
28 gboolean disable_custom_background;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
29 char *default_background_color;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
30 gboolean allow_text_colors;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
31 char *image_mask;
32486
c44fe7ecb3dd load the default variant. Bring back basestyle.css.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32485
diff changeset
32 char *default_variant;
c44fe7ecb3dd load the default variant. Bring back basestyle.css.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32485
diff changeset
33
32485
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
34 /* paths */
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
35 char *style_dir;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
36 char *template_path;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
37
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
38 /* caches */
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
39 char *template_html;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
40 char *header_html;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
41 char *footer_html;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
42 char *incoming_content_html;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
43 char *outgoing_content_html;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
44 char *incoming_next_content_html;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
45 char *outgoing_next_content_html;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
46 char *status_html;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
47 char *basestyle_css;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
48 } PidginMessageStyle;
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
49
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
50 PidginMessageStyle* pidgin_message_style_load (const char* styledir);
32487
13f307997f1a Instead of using references, use copy's. Sigh, I know this is a memory inefficient
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32486
diff changeset
51 PidginMessageStyle* pidgin_message_style_copy (const PidginMessageStyle *style);
32488
17153501cae6 Fixing back variants.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents: 32487
diff changeset
52 void pidgin_message_style_save_state (const PidginMessageStyle *style);
32485
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
53 void pidgin_message_style_unref (PidginMessageStyle *style);
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
54 void pidgin_message_style_read_info_plist (PidginMessageStyle *style, const char* variant);
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
55 char* pidgin_message_style_get_variant (PidginMessageStyle *style);
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
56 GList* pidgin_message_style_get_variants (PidginMessageStyle *style);
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
57 void pidgin_message_style_set_variant (PidginMessageStyle *style, const char *variant);
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
58
b932922007bc Separated the MessageStyle loading code from the actual rendering code.
Arnold Noronha <tdrhq@soc.pidgin.im>
parents:
diff changeset
59 char* pidgin_message_style_get_css (PidginMessageStyle *style);

mercurial