Mercurial > pidgin.yaz
comparison src/whiteboard.h @ 11475:7fab28c991f3
[gaim-migrate @ 13717]
merging gaim-doodle/whiteboard/whatever you like to call it.
Needs some cleanups and doxygen comments, but has basic functionality
committer: Tailor Script <tailor@pidgin.im>
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Fri, 09 Sep 2005 04:40:21 +0000 |
parents | |
children | 2e3a6dcebaf3 |
comparison
equal
deleted
inserted
replaced
11474:7e9635b73ed6 | 11475:7fab28c991f3 |
---|---|
1 /** | |
2 * @file whiteboard.h The GaimWhiteboard core 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 _GAIM_WHITEBOARD_H_ | |
26 #define _GAIM_WHITEBOARD_H_ | |
27 | |
28 // DEFINES ============================================================================================= | |
29 | |
30 typedef struct _GaimWhiteboardPrplOps GaimWhiteboardPrplOps; // NOTE A nasty compiler dependency fix | |
31 | |
32 #include "account.h" | |
33 | |
34 // INCLUDES ============================================================================================ | |
35 | |
36 // DATATYPES =========================================================================================== | |
37 typedef struct _GaimWhiteboard | |
38 { | |
39 int state; // State of whiteboard session | |
40 | |
41 GaimAccount *account; // Account associated with this session | |
42 char *who; // Name of the remote user | |
43 | |
44 void *ui_data; // Graphical user-interface data | |
45 void *proto_data; // Protocol specific data | |
46 GaimWhiteboardPrplOps *prpl_ops; // Protocol-plugin operations | |
47 | |
48 GList *draw_list; // List of drawing elements/deltas to send | |
49 } GaimWhiteboard; | |
50 | |
51 typedef struct _GaimWhiteboardUiOps | |
52 { | |
53 void ( *create )( GaimWhiteboard *wb ); | |
54 void ( *destroy )( GaimWhiteboard *wb ); | |
55 void ( *set_dimensions)( GaimWhiteboard *wb, int width, int height ); | |
56 void ( *draw_point )( GaimWhiteboard *wb, int x, int y, int color, int size ); | |
57 void ( *draw_line )( GaimWhiteboard *wb, int x1, int y1, int x2, int y2, int color, int size ); | |
58 void ( *clear )( GaimWhiteboard *wb ); | |
59 } GaimWhiteboardUiOps; | |
60 | |
61 struct _GaimWhiteboardPrplOps | |
62 { | |
63 void ( *start )( GaimWhiteboard *wb ); | |
64 void ( *end )( GaimWhiteboard *wb ); | |
65 void ( *get_dimensions )( GaimWhiteboard *wb, int *width, int *height ); | |
66 void ( *set_dimensions )( GaimWhiteboard *wb, int width, int height ); | |
67 void ( *send_draw_list )( GaimWhiteboard *wb, GList *draw_list ); | |
68 void ( *clear )( GaimWhiteboard *wb ); | |
69 }; | |
70 | |
71 // PROTOTYPES ========================================================================================== | |
72 | |
73 void gaim_whiteboard_set_ui_ops( GaimWhiteboardUiOps *ops ); | |
74 | |
75 GaimWhiteboard *gaim_whiteboard_create( GaimAccount *account, char *who, int state ); | |
76 void gaim_whiteboard_destroy( GaimWhiteboard *wb ); | |
77 void gaim_whiteboard_start( GaimWhiteboard *wb ); | |
78 | |
79 GaimWhiteboard *gaim_whiteboard_get_session( GaimAccount *account, char *who ); | |
80 | |
81 GList *gaim_whiteboard_draw_list_destroy( GList *draw_list ); | |
82 | |
83 void gaim_whiteboard_set_dimensions( GaimWhiteboard *wb, int width, int height ); | |
84 void gaim_whiteboard_draw_point( GaimWhiteboard *wb, int x, int y, int color, int size ); | |
85 void gaim_whiteboard_draw_line( GaimWhiteboard *wb, int x1, int y1, int x2, int y2, int color, int size ); | |
86 void gaim_whiteboard_clear( GaimWhiteboard *wb ); | |
87 | |
88 #endif // _GAIM_WHITEBOARD_H_ |