annotate src/whiteboard.h @ 11481:c80edbd8961a

[gaim-migrate @ 13723] I don't see a reason to want to see nick changes for a user that is ignored. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 09 Sep 2005 19:06:29 +0000
parents 7fab28c991f3
children 2e3a6dcebaf3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /**
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * @file whiteboard.h The GaimWhiteboard core object
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 *
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 * gaim
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 *
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * Gaim is the legal property of its developers, whose names are too numerous
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * source distribution.
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 *
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * (at your option) any later version.
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 *
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 * GNU General Public License for more details.
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 *
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 */
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #ifndef _GAIM_WHITEBOARD_H_
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 #define _GAIM_WHITEBOARD_H_
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 // DEFINES =============================================================================================
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 typedef struct _GaimWhiteboardPrplOps GaimWhiteboardPrplOps; // NOTE A nasty compiler dependency fix
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 #include "account.h"
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 // INCLUDES ============================================================================================
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 // DATATYPES ===========================================================================================
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 typedef struct _GaimWhiteboard
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 {
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 int state; // State of whiteboard session
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 GaimAccount *account; // Account associated with this session
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 char *who; // Name of the remote user
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 void *ui_data; // Graphical user-interface data
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 void *proto_data; // Protocol specific data
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 GaimWhiteboardPrplOps *prpl_ops; // Protocol-plugin operations
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 GList *draw_list; // List of drawing elements/deltas to send
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 } GaimWhiteboard;
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 typedef struct _GaimWhiteboardUiOps
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 {
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 void ( *create )( GaimWhiteboard *wb );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 void ( *destroy )( GaimWhiteboard *wb );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 void ( *set_dimensions)( GaimWhiteboard *wb, int width, int height );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 void ( *draw_point )( GaimWhiteboard *wb, int x, int y, int color, int size );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 void ( *draw_line )( GaimWhiteboard *wb, int x1, int y1, int x2, int y2, int color, int size );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 void ( *clear )( GaimWhiteboard *wb );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 } GaimWhiteboardUiOps;
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 struct _GaimWhiteboardPrplOps
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 {
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 void ( *start )( GaimWhiteboard *wb );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 void ( *end )( GaimWhiteboard *wb );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 void ( *get_dimensions )( GaimWhiteboard *wb, int *width, int *height );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 void ( *set_dimensions )( GaimWhiteboard *wb, int width, int height );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 void ( *send_draw_list )( GaimWhiteboard *wb, GList *draw_list );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 void ( *clear )( GaimWhiteboard *wb );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 };
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 // PROTOTYPES ==========================================================================================
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 void gaim_whiteboard_set_ui_ops( GaimWhiteboardUiOps *ops );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 GaimWhiteboard *gaim_whiteboard_create( GaimAccount *account, char *who, int state );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 void gaim_whiteboard_destroy( GaimWhiteboard *wb );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 void gaim_whiteboard_start( GaimWhiteboard *wb );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 GaimWhiteboard *gaim_whiteboard_get_session( GaimAccount *account, char *who );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 GList *gaim_whiteboard_draw_list_destroy( GList *draw_list );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 void gaim_whiteboard_set_dimensions( GaimWhiteboard *wb, int width, int height );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 void gaim_whiteboard_draw_point( GaimWhiteboard *wb, int x, int y, int color, int size );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 void gaim_whiteboard_draw_line( GaimWhiteboard *wb, int x1, int y1, int x2, int y2, int color, int size );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 void gaim_whiteboard_clear( GaimWhiteboard *wb );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 #endif // _GAIM_WHITEBOARD_H_