Mercurial > pidgin
annotate src/protocols/yahoo/yahoo_doodle.h @ 11801:81806e9241be
[gaim-migrate @ 14092]
Cleanups, mostly // -> /* */ and moved g_print's to gaim_debug_info, and a few c99ism fixes..
committer: Tailor Script <tailor@pidgin.im>
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Mon, 24 Oct 2005 21:48:21 +0000 |
parents | 32bac0647037 |
children | 2219f4bf4a57 |
rev | line source |
---|---|
11475 | 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 | |
11801
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
28 /****************************************************************************** |
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
29 * Includes |
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
30 *****************************************************************************/ |
11475 | 31 #include "whiteboard.h" |
32 #include "cmds.h" | |
33 | |
11801
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
34 /****************************************************************************** |
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
35 * Defines |
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
36 *****************************************************************************/ |
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
37 /* Doodle communication commands */ |
11475 | 38 #define DOODLE_CMD_REQUEST 0 |
39 #define DOODLE_CMD_READY 1 | |
40 #define DOODLE_CMD_CLEAR 2 | |
41 #define DOODLE_CMD_DRAW 3 | |
42 #define DOODLE_CMD_EXTRA 4 | |
43 #define DOODLE_CMD_CONFIRM 5 | |
44 | |
11801
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
45 /* Doodle communication command for shutting down (also 0) */ |
11475 | 46 #define DOODLE_CMD_SHUTDOWN DOODLE_CMD_REQUEST |
47 | |
48 #define DOODLE_EXTRA_NONE "\"1\"" | |
49 #define DOODLE_EXTRA_TICTACTOE "\"3\"" | |
50 #define DOODLE_EXTRA_DOTS "\"2\"" | |
51 | |
11801
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
52 /* Doodle session states */ |
11475 | 53 #define DOODLE_STATE_REQUESTING 0 |
54 #define DOODLE_STATE_REQUESTED 1 | |
55 #define DOODLE_STATE_ESTABLISHED 2 | |
56 | |
11801
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
57 /* Doodle canvas dimensions */ |
11475 | 58 #define DOODLE_CANVAS_WIDTH 368 |
59 #define DOODLE_CANVAS_HEIGHT 256 | |
60 | |
11801
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
61 /* Doodle color codes (most likely RGB) */ |
11475 | 62 #define DOODLE_COLOR_RED 13369344 |
63 #define DOODLE_COLOR_ORANGE 16737792 | |
64 #define DOODLE_COLOR_YELLOW 15658496 | |
65 #define DOODLE_COLOR_GREEN 52224 | |
66 #define DOODLE_COLOR_CYAN 52428 | |
67 #define DOODLE_COLOR_BLUE 204 | |
68 #define DOODLE_COLOR_VIOLET 5381277 | |
69 #define DOODLE_COLOR_PURPLE 13369548 | |
70 #define DOODLE_COLOR_TAN 12093547 | |
71 #define DOODLE_COLOR_BROWN 5256485 | |
72 #define DOODLE_COLOR_BLACK 0 | |
73 #define DOODLE_COLOR_GREY 11184810 | |
74 #define DOODLE_COLOR_WHITE 16777215 | |
75 | |
76 #define PALETTE_NUM_OF_COLORS 12 | |
77 | |
11801
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
78 /* Doodle brush sizes (most likely variable) */ |
11475 | 79 #define DOODLE_BRUSH_SMALL 2 |
80 #define DOODLE_BRUSH_MEDIUM 5 | |
81 #define DOODLE_BRUSH_LARGE 10 | |
82 | |
83 #define DOODLE_MAX_BRUSH_MOTIONS 100 | |
84 | |
11801
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
85 /****************************************************************************** |
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
86 * Datatypes |
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
87 *****************************************************************************/ |
11475 | 88 typedef struct _doodle_session |
89 { | |
11801
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
90 int brush_size; /* Size of drawing brush */ |
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
91 int brush_color; /* Color of drawing brush */ |
11475 | 92 } doodle_session; |
93 | |
11801
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
94 /****************************************************************************** |
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
95 * API |
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
96 *****************************************************************************/ |
11475 | 97 void dummy_func( void ); |
98 | |
99 GaimCmdRet yahoo_doodle_gaim_cmd_start( GaimConversation *conv, const char *cmd, char **args, | |
100 char **error, void *data ); | |
101 | |
102 void yahoo_doodle_process( GaimConnection *gc, char *me, char *from, char *command, char *message ); | |
11800
32bac0647037
[gaim-migrate @ 14091]
Gary Kramlich <grim@reaperworld.com>
parents:
11644
diff
changeset
|
103 void yahoo_doodle_initiate( GaimConnection *gc, const char *to); |
11475 | 104 |
105 void yahoo_doodle_command_got_request( GaimConnection *gc, char *from ); | |
106 void yahoo_doodle_command_got_ready( GaimConnection *gc, char *from ); | |
107 void yahoo_doodle_command_got_draw( GaimConnection *gc, char *from, char *message ); | |
108 void yahoo_doodle_command_got_clear( GaimConnection *gc, char *from ); | |
109 void yahoo_doodle_command_got_extra( GaimConnection *gc, char *from, char *message ); | |
110 void yahoo_doodle_command_got_confirm( GaimConnection *gc, char *from ); | |
111 void yahoo_doodle_command_got_shutdown( GaimConnection *gc, char *from ); | |
112 | |
113 void yahoo_doodle_command_send_request( GaimConnection *gc, char *to ); | |
114 void yahoo_doodle_command_send_ready( GaimConnection *gc, char *to ); | |
115 void yahoo_doodle_command_send_draw( GaimConnection *gc, char *to, char *message ); | |
116 void yahoo_doodle_command_send_clear( GaimConnection *gc, char *to ); | |
117 void yahoo_doodle_command_send_extra( GaimConnection *gc, char *to, char *message ); | |
118 void yahoo_doodle_command_send_confirm( GaimConnection *gc, char *to ); | |
119 void yahoo_doodle_command_send_shutdown( GaimConnection *gc, char *to ); | |
120 | |
121 void yahoo_doodle_start( GaimWhiteboard *wb ); | |
122 void yahoo_doodle_end( GaimWhiteboard *wb ); | |
123 void yahoo_doodle_get_dimensions( GaimWhiteboard *wb, int *width, int *height ); | |
124 void yahoo_doodle_send_draw_list( GaimWhiteboard *wb, GList *draw_list ); | |
125 void yahoo_doodle_clear( GaimWhiteboard *wb ); | |
126 | |
127 void yahoo_doodle_draw_stroke( GaimWhiteboard *wb, GList *draw_list ); | |
128 char *yahoo_doodle_build_draw_string( doodle_session *ds, GList *draw_list ); | |
129 | |
11801
81806e9241be
[gaim-migrate @ 14092]
Gary Kramlich <grim@reaperworld.com>
parents:
11800
diff
changeset
|
130 #endif /* _YAHOO_DOODLE_H_ */ |