annotate src/whiteboard.h @ 12651:a74cb5952db4

[gaim-migrate @ 14992] Activate a GtkSpell on the status box. If your message contains a word that GtkSpell doesn't recognize then it will have red squiggles underneath it FOREVER. Is that going to annoy people? committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 25 Dec 2005 01:36:31 +0000
parents eaf7c8558914
children
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
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
28 /**
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
29 * Whiteboard PRPL Operations
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
30 */
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
31 typedef struct _GaimWhiteboardPrplOps GaimWhiteboardPrplOps;
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 #include "account.h"
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
35 /**
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
36 * A GaimWhiteboard
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
37 */
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 typedef struct _GaimWhiteboard
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 {
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
40 int state; /**< State of whiteboard session */
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
41
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
42 GaimAccount *account; /**< Account associated with this session */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
43 char *who; /**< Name of the remote user */
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
44
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
45 void *ui_data; /**< Graphical user-interface data */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
46 void *proto_data; /**< Protocol specific data */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
47 GaimWhiteboardPrplOps *prpl_ops; /**< Protocol-plugin operations */
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
48
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
49 GList *draw_list; /**< List of drawing elements/deltas to send */
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 } GaimWhiteboard;
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
52 /**
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
53 * The GaimWhiteboard UI Operations
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
54 */
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 typedef struct _GaimWhiteboardUiOps
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 {
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
57 void (*create)(GaimWhiteboard *wb); /**< create function */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
58 void (*destroy)(GaimWhiteboard *wb); /**< destory function */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
59 void (*set_dimensions)(GaimWhiteboard *wb, int width, int height); /**< set_dimensions function */
12022
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
60 void (*set_brush) (GaimWhiteboard *wb, int size, int color); /**< set the size and color of the brush */
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
61 void (*draw_point)(GaimWhiteboard *wb, int x, int y,
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
62 int color, int size); /**< draw_point function */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
63 void (*draw_line)(GaimWhiteboard *wb, int x1, int y1,
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
64 int x2, int y2,
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
65 int color, int size); /**< draw_line function */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
66 void (*clear)(GaimWhiteboard *wb); /**< clear function */
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 } GaimWhiteboardUiOps;
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
69 /**
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
70 * GaimWhiteboard PRPL Operations
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
71 */
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 struct _GaimWhiteboardPrplOps
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 {
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
74 void (*start)(GaimWhiteboard *wb); /**< start function */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
75 void (*end)(GaimWhiteboard *wb); /**< end function */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
76 void (*get_dimensions)(GaimWhiteboard *wb, int *width, int *height); /**< get_dimensions function */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
77 void (*set_dimensions)(GaimWhiteboard *wb, int width, int height); /**< set_dimensions function */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
78 void (*get_brush) (GaimWhiteboard *wb, int *size, int *color); /**< get the brush size and color */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
79 void (*set_brush) (GaimWhiteboard *wb, int size, int color); /**< set the brush size and color */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
80 void (*send_draw_list)(GaimWhiteboard *wb, GList *draw_list); /**< send_draw_list function */
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
81 void (*clear)(GaimWhiteboard *wb); /**< clear function */
11475
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
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
84 #ifdef __cplusplus
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
85 extern "C" {
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
86 #endif /* __cplusplus */
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
88 /******************************************************************************/
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
89 /** @name GaimWhiteboard API */
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
90 /******************************************************************************/
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
91 /*@{*/
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
92
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
93 /**
12400
eaf7c8558914 [gaim-migrate @ 14707]
Richard Laager <rlaager@wiktel.com>
parents: 12022
diff changeset
94 * Sets the UI operations
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
95 *
12400
eaf7c8558914 [gaim-migrate @ 14707]
Richard Laager <rlaager@wiktel.com>
parents: 12022
diff changeset
96 * @param ops The UI operations to set
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
97 */
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
98 void gaim_whiteboard_set_ui_ops(GaimWhiteboardUiOps *ops);
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
100 /**
12400
eaf7c8558914 [gaim-migrate @ 14707]
Richard Laager <rlaager@wiktel.com>
parents: 12022
diff changeset
101 * Sets the prpl operations for a whiteboard
eaf7c8558914 [gaim-migrate @ 14707]
Richard Laager <rlaager@wiktel.com>
parents: 12022
diff changeset
102 *
eaf7c8558914 [gaim-migrate @ 14707]
Richard Laager <rlaager@wiktel.com>
parents: 12022
diff changeset
103 * @param wb The whiteboard for which to set the prpl operations
eaf7c8558914 [gaim-migrate @ 14707]
Richard Laager <rlaager@wiktel.com>
parents: 12022
diff changeset
104 * @param ops The prpl operations to set
eaf7c8558914 [gaim-migrate @ 14707]
Richard Laager <rlaager@wiktel.com>
parents: 12022
diff changeset
105 */
eaf7c8558914 [gaim-migrate @ 14707]
Richard Laager <rlaager@wiktel.com>
parents: 12022
diff changeset
106 void gaim_whiteboard_set_prpl_ops(GaimWhiteboard *wb, GaimWhiteboardPrplOps *ops);
eaf7c8558914 [gaim-migrate @ 14707]
Richard Laager <rlaager@wiktel.com>
parents: 12022
diff changeset
107
eaf7c8558914 [gaim-migrate @ 14707]
Richard Laager <rlaager@wiktel.com>
parents: 12022
diff changeset
108 /**
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
109 * Creates a whiteboard
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
110 *
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
111 * @param account The account.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
112 * @param who Who you're drawing with.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
113 * @param state The state.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
114 *
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
115 * @return The new whiteboard
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
116 */
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
117 GaimWhiteboard *gaim_whiteboard_create(GaimAccount *account, const char *who, int state);
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
118
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
119 /**
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
120 * Destroys a whiteboard
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
121 *
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
122 * @param wb The whiteboard.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
123 */
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
124 void gaim_whiteboard_destroy(GaimWhiteboard *wb);
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
125
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
126 /**
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
127 * Starts a whiteboard
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
128 *
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
129 * @param wb The whiteboard.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
130 */
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
131 void gaim_whiteboard_start(GaimWhiteboard *wb);
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
133 /**
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
134 * Finds a whiteboard from an account and user.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
135 *
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
136 * @param account The account.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
137 * @param who The user.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
138 *
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
139 * @return The whiteboard if found, otherwise @c NULL.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
140 */
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
141 GaimWhiteboard *gaim_whiteboard_get_session(GaimAccount *account, const char *who);
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
143 /**
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
144 * Destorys a drawing list for a whiteboard
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
145 *
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
146 * @param draw_list The drawing list.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
147 */
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
148 void gaim_whiteboard_draw_list_destroy(GList *draw_list);
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
150 /**
12022
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
151 * Gets the dimension of a whiteboard.
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
152 *
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
153 * @param wb The whiteboard.
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
154 * @param width The width to be set.
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
155 * @param height The height to be set.
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
156 *
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
157 * @return TRUE if the values of width and height were set.
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
158 */
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
159 gboolean gaim_whiteboard_get_dimensions(GaimWhiteboard *wb, int *width, int *height);
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
160
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
161 /**
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
162 * Sets the dimensions for a whiteboard.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
163 *
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
164 * @param wb The whiteboard.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
165 * @param width The width.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
166 * @param height The height.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
167 */
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
168 void gaim_whiteboard_set_dimensions(GaimWhiteboard *wb, int width, int height);
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
169
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
170 /**
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
171 * Draws a point on a whiteboard.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
172 *
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
173 * @param wb The whiteboard.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
174 * @param x The x coordinate.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
175 * @param y The y coordinate.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
176 * @param color The color to use.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
177 * @param size The brush size.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
178 */
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
179 void gaim_whiteboard_draw_point(GaimWhiteboard *wb, int x, int y, int color, int size);
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
180
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
181 /**
12022
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
182 * Send a list of points to draw to the buddy.
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
183 *
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
184 * @param wb The whiteboard
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
185 * @param list A GList of points
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
186 */
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
187 void gaim_whiteboard_send_draw_list(GaimWhiteboard *wb, GList *list);
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
188
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
189 /**
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
190 * Draws a line on a whiteboard
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
191 *
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
192 * @param wb The whiteboard.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
193 * @param x1 The top-left x coordinate.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
194 * @param y1 The top-left y coordinate.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
195 * @param x2 The bottom-right x coordinate.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
196 * @param y2 The bottom-right y coordinate.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
197 * @param color The color to use.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
198 * @param size The brush size.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
199 */
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
200 void gaim_whiteboard_draw_line(GaimWhiteboard *wb, int x1, int y1, int x2, int y2, int color, int size);
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
201
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
202 /**
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
203 * Clears a whiteboard
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
204 *
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
205 * @param wb The whiteboard.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
206 */
11914
2219f4bf4a57 [gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents: 11802
diff changeset
207 void gaim_whiteboard_clear(GaimWhiteboard *wb);
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
208
12022
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
209 /**
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
210 * Sends a request to the buddy to clear the whiteboard.
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
211 *
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
212 * @param wb The whiteboard
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
213 */
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
214 void gaim_whiteboard_send_clear(GaimWhiteboard *wb);
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
215
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
216 /**
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
217 * Sends a request to change the size and color of the brush.
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
218 *
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
219 * @param wb The whiteboard
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
220 * @param size The size of the brush
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
221 * @param color The color of the brush
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
222 */
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
223 void gaim_whiteboard_send_brush(GaimWhiteboard *wb, int size, int color);
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
224
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
225 /**
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
226 * Gets the size and color of the brush.
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
227 *
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
228 * @param wb The whiteboard
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
229 * @param size The size of the brush
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
230 * @param color The color of the brush
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
231 *
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
232 * @return TRUE if the size and color were set.
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
233 */
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
234 gboolean gaim_whiteboard_get_brush(GaimWhiteboard *wb, int *size, int *color);
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
235
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
236 /**
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
237 * Sets the size and color of the brush.
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
238 *
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
239 * @param wb The whiteboard
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
240 * @param size The size of the brush
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
241 * @param color The color of the brush
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
242 */
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
243 void gaim_whiteboard_set_brush(GaimWhiteboard *wb, int size, int color);
9d562dde0a3a [gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11914
diff changeset
244
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
245 /*@}*/
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
246
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
247 #ifdef __cplusplus
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
248 }
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
249 #endif /* __cplusplus */
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
250
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
251 #endif /* _GAIM_WHITEBOARD_H_ */