Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/yahoo_doodle.h @ 15374:5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 20 Jan 2007 02:32:10 +0000 |
parents | |
children | cf999f8e8a56 |
comparison
equal
deleted
inserted
replaced
15373:f79e0f4df793 | 15374:5fe8042783c1 |
---|---|
1 /** | |
2 * @file yahoo_doodle.h The Yahoo! protocol plugin Doodle IMVironment object | |
3 * | |
4 * gaim | |
5 * | |
6 * Gaim is the legal property of its developers, whose names are too numerous | |
7 * to list here. Please refer to the COPYRIGHT file distributed with this | |
8 * source distribution. | |
9 * | |
10 * This program is free software; you can redistribute it and/or modify | |
11 * it under the terms of the GNU General Public License as published by | |
12 * the Free Software Foundation; either version 2 of the License, or | |
13 * (at your option) any later version. | |
14 * | |
15 * This program is distributed in the hope that it will be useful, | |
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 * GNU General Public License for more details. | |
19 * | |
20 * You should have received a copy of the GNU General Public License | |
21 * along with this program; if not, write to the Free Software | |
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
23 */ | |
24 | |
25 #ifndef _YAHOO_DOODLE_H_ | |
26 #define _YAHOO_DOODLE_H_ | |
27 | |
28 /****************************************************************************** | |
29 * Includes | |
30 *****************************************************************************/ | |
31 #include "whiteboard.h" | |
32 #include "cmds.h" | |
33 | |
34 /****************************************************************************** | |
35 * Defines | |
36 *****************************************************************************/ | |
37 /* Doodle communication commands */ | |
38 /* TODO: Should be an enum. */ | |
39 #define DOODLE_CMD_REQUEST 0 | |
40 #define DOODLE_CMD_READY 1 | |
41 #define DOODLE_CMD_CLEAR 2 | |
42 #define DOODLE_CMD_DRAW 3 | |
43 #define DOODLE_CMD_EXTRA 4 | |
44 #define DOODLE_CMD_CONFIRM 5 | |
45 /* Doodle communication command for shutting down (also 0) */ | |
46 #define DOODLE_CMD_SHUTDOWN 0 | |
47 | |
48 #define DOODLE_EXTRA_NONE "\"1\"" | |
49 #define DOODLE_EXTRA_TICTACTOE "\"3\"" | |
50 #define DOODLE_EXTRA_DOTS "\"2\"" | |
51 | |
52 /* Doodle session states */ | |
53 /* TODO: Should be an enum. */ | |
54 #define DOODLE_STATE_REQUESTING 0 | |
55 #define DOODLE_STATE_REQUESTED 1 | |
56 #define DOODLE_STATE_ESTABLISHED 2 | |
57 | |
58 /* Doodle canvas dimensions */ | |
59 #define DOODLE_CANVAS_WIDTH 368 | |
60 #define DOODLE_CANVAS_HEIGHT 256 | |
61 | |
62 /* Doodle color codes (most likely RGB) */ | |
63 /* TODO: Should be an enum and sorted by color name. */ | |
64 #define DOODLE_COLOR_RED 13369344 | |
65 #define DOODLE_COLOR_ORANGE 16737792 | |
66 #define DOODLE_COLOR_YELLOW 15658496 | |
67 #define DOODLE_COLOR_GREEN 52224 | |
68 #define DOODLE_COLOR_CYAN 52428 | |
69 #define DOODLE_COLOR_BLUE 204 | |
70 #define DOODLE_COLOR_VIOLET 5381277 | |
71 #define DOODLE_COLOR_PURPLE 13369548 | |
72 #define DOODLE_COLOR_TAN 12093547 | |
73 #define DOODLE_COLOR_BROWN 5256485 | |
74 #define DOODLE_COLOR_BLACK 0 | |
75 #define DOODLE_COLOR_GREY 11184810 | |
76 #define DOODLE_COLOR_WHITE 16777215 | |
77 | |
78 #define PALETTE_NUM_OF_COLORS 12 | |
79 | |
80 /* Doodle brush sizes (most likely variable) */ | |
81 #define DOODLE_BRUSH_SMALL 2 | |
82 #define DOODLE_BRUSH_MEDIUM 5 | |
83 #define DOODLE_BRUSH_LARGE 10 | |
84 | |
85 #define DOODLE_MAX_BRUSH_MOTIONS 100 | |
86 | |
87 /****************************************************************************** | |
88 * Datatypes | |
89 *****************************************************************************/ | |
90 typedef struct _doodle_session | |
91 { | |
92 int brush_size; /* Size of drawing brush */ | |
93 int brush_color; /* Color of drawing brush */ | |
94 } doodle_session; | |
95 | |
96 /****************************************************************************** | |
97 * API | |
98 *****************************************************************************/ | |
99 | |
100 GaimCmdRet yahoo_doodle_gaim_cmd_start(GaimConversation *conv, const char *cmd, char **args, | |
101 char **error, void *data); | |
102 | |
103 void yahoo_doodle_process(GaimConnection *gc, const char *me, const char *from, | |
104 const char *command, const char *message); | |
105 void yahoo_doodle_initiate(GaimConnection *gc, const char *to); | |
106 | |
107 void yahoo_doodle_command_got_request(GaimConnection *gc, const char *from); | |
108 void yahoo_doodle_command_got_ready(GaimConnection *gc, const char *from); | |
109 void yahoo_doodle_command_got_draw(GaimConnection *gc, const char *from, const char *message); | |
110 void yahoo_doodle_command_got_clear(GaimConnection *gc, const char *from); | |
111 void yahoo_doodle_command_got_extra(GaimConnection *gc, const char *from, const char *message); | |
112 void yahoo_doodle_command_got_confirm(GaimConnection *gc, const char *from); | |
113 void yahoo_doodle_command_got_shutdown(GaimConnection *gc, const char *from); | |
114 | |
115 void yahoo_doodle_command_send_request(GaimConnection *gc, const char *to); | |
116 void yahoo_doodle_command_send_ready(GaimConnection *gc, const char *to); | |
117 void yahoo_doodle_command_send_draw(GaimConnection *gc, const char *to, const char *message); | |
118 void yahoo_doodle_command_send_clear(GaimConnection *gc, const char *to); | |
119 void yahoo_doodle_command_send_extra(GaimConnection *gc, const char *to, const char *message); | |
120 void yahoo_doodle_command_send_confirm(GaimConnection *gc, const char *to); | |
121 void yahoo_doodle_command_send_shutdown(GaimConnection *gc, const char *to); | |
122 | |
123 void yahoo_doodle_start(GaimWhiteboard *wb); | |
124 void yahoo_doodle_end(GaimWhiteboard *wb); | |
125 void yahoo_doodle_get_dimensions(GaimWhiteboard *wb, int *width, int *height); | |
126 void yahoo_doodle_send_draw_list(GaimWhiteboard *wb, GList *draw_list); | |
127 void yahoo_doodle_clear(GaimWhiteboard *wb); | |
128 | |
129 void yahoo_doodle_draw_stroke(GaimWhiteboard *wb, GList *draw_list); | |
130 void yahoo_doodle_get_brush(GaimWhiteboard *wb, int *size, int *color); | |
131 void yahoo_doodle_set_brush(GaimWhiteboard *wb, int size, int color); | |
132 | |
133 #endif /* _YAHOO_DOODLE_H_ */ |