comparison libpurple/whiteboard.h @ 32819:2c6510167895 default tip

propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24) to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 02 Jun 2012 02:30:49 +0000
parents 98520ee78f12
children
comparison
equal deleted inserted replaced
32818:01ff09d4a463 32819:2c6510167895
24 */ 24 */
25 25
26 #ifndef _PURPLE_WHITEBOARD_H_ 26 #ifndef _PURPLE_WHITEBOARD_H_
27 #define _PURPLE_WHITEBOARD_H_ 27 #define _PURPLE_WHITEBOARD_H_
28 28
29 /** @copydoc _PurpleWhiteboard */
30 typedef struct _PurpleWhiteboard PurpleWhiteboard;
31
29 /** 32 /**
30 * Whiteboard PRPL Operations 33 * Whiteboard PRPL Operations
31 */ 34 */
32 typedef struct _PurpleWhiteboardPrplOps PurpleWhiteboardPrplOps; 35 typedef struct _PurpleWhiteboardPrplOps PurpleWhiteboardPrplOps;
33 36
34 #include "account.h" 37 #include "account.h"
35 38
36 /**
37 * A PurpleWhiteboard
38 */
39 typedef struct _PurpleWhiteboard
40 {
41 int state; /**< State of whiteboard session */
42
43 PurpleAccount *account; /**< Account associated with this session */
44 char *who; /**< Name of the remote user */
45
46 void *ui_data; /**< Graphical user-interface data */
47 void *proto_data; /**< Protocol specific data */
48 PurpleWhiteboardPrplOps *prpl_ops; /**< Protocol-plugin operations */
49
50 GList *draw_list; /**< List of drawing elements/deltas to send */
51 } PurpleWhiteboard;
52 39
53 /** 40 /**
54 * The PurpleWhiteboard UI Operations 41 * The PurpleWhiteboard UI Operations
55 */ 42 */
56 typedef struct _PurpleWhiteboardUiOps 43 typedef struct _PurpleWhiteboardUiOps
90 void (*_purple_reserved2)(void); 77 void (*_purple_reserved2)(void);
91 void (*_purple_reserved3)(void); 78 void (*_purple_reserved3)(void);
92 void (*_purple_reserved4)(void); 79 void (*_purple_reserved4)(void);
93 }; 80 };
94 81
95 #ifdef __cplusplus 82 G_BEGIN_DECLS
96 extern "C" {
97 #endif /* __cplusplus */
98 83
99 /******************************************************************************/ 84 /******************************************************************************/
100 /** @name PurpleWhiteboard API */ 85 /** @name PurpleWhiteboard API */
101 /******************************************************************************/ 86 /******************************************************************************/
102 /*@{*/ 87 /*@{*/
131 * Destroys a whiteboard 116 * Destroys a whiteboard
132 * 117 *
133 * @param wb The whiteboard. 118 * @param wb The whiteboard.
134 */ 119 */
135 void purple_whiteboard_destroy(PurpleWhiteboard *wb); 120 void purple_whiteboard_destroy(PurpleWhiteboard *wb);
121
122 /**
123 * Returns the whiteboard's account.
124 *
125 * @param wb The whiteboard.
126 *
127 * @return The whiteboard's account.
128 */
129 PurpleAccount *purple_whiteboard_get_account(const PurpleWhiteboard *wb);
130
131 /**
132 * Return who you're drawing with.
133 *
134 * @param wb The whiteboard
135 *
136 * @return Who you're drawing with.
137 */
138 const char *purple_whiteboard_get_who(const PurpleWhiteboard *wb);
139
140 /**
141 * Set the state of the whiteboard.
142 *
143 * @param wb The whiteboard.
144 * @param state The state
145 */
146 void purple_whiteboard_set_state(PurpleWhiteboard *wb, int state);
147
148 /**
149 * Return the state of the whiteboard.
150 *
151 * @param wb The whiteboard.
152 *
153 * @return The state of the whiteboard.
154 */
155 int purple_whiteboard_get_state(const PurpleWhiteboard *wb);
136 156
137 /** 157 /**
138 * Starts a whiteboard 158 * Starts a whiteboard
139 * 159 *
140 * @param wb The whiteboard. 160 * @param wb The whiteboard.
251 * @param size The size of the brush 271 * @param size The size of the brush
252 * @param color The color of the brush 272 * @param color The color of the brush
253 */ 273 */
254 void purple_whiteboard_set_brush(PurpleWhiteboard *wb, int size, int color); 274 void purple_whiteboard_set_brush(PurpleWhiteboard *wb, int size, int color);
255 275
276 /**
277 * Return the drawing list.
278 *
279 * @param wb The whiteboard.
280 *
281 * @return The drawing list
282 */
283 GList *purple_whiteboard_get_draw_list(const PurpleWhiteboard *wb);
284
285 /**
286 * Set the drawing list.
287 *
288 * @param wb The whiteboard
289 * @param draw_list The drawing list.
290 */
291 void purple_whiteboard_set_draw_list(PurpleWhiteboard *wb, GList* draw_list);
292
293 /**
294 * Sets the protocol data for a whiteboard.
295 *
296 * @param wb The whiteboard.
297 * @param proto_data The protocol data to set for the whiteboard.
298 */
299 void purple_whiteboard_set_protocol_data(PurpleWhiteboard *wb, gpointer proto_data);
300
301 /**
302 * Gets the protocol data for a whiteboard.
303 *
304 * @param wb The whiteboard.
305 *
306 * @return The protocol data for the whiteboard.
307 */
308 gpointer purple_whiteboard_get_protocol_data(const PurpleWhiteboard *wb);
309
310 /**
311 * Set the UI data associated with this whiteboard.
312 *
313 * @param wb The whiteboard.
314 * @param ui_data A pointer to associate with this whiteboard.
315 */
316 void purple_whiteboard_set_ui_data(PurpleWhiteboard *wb, gpointer ui_data);
317
318 /**
319 * Get the UI data associated with this whiteboard.
320 *
321 * @param wb The whiteboard..
322 *
323 * @return The UI data associated with this whiteboard. This is a
324 * convenience field provided to the UIs--it is not
325 * used by the libpurple core.
326 */
327 gpointer purple_whiteboard_get_ui_data(const PurpleWhiteboard *wb);
328
256 /*@}*/ 329 /*@}*/
257 330
258 #ifdef __cplusplus 331 G_END_DECLS
259 }
260 #endif /* __cplusplus */
261 332
262 #endif /* _PURPLE_WHITEBOARD_H_ */ 333 #endif /* _PURPLE_WHITEBOARD_H_ */