pidgin: whiteboard.h Source File

pidgin 2.14.4

Loading...
Searching...
No Matches
whiteboard.h
Go to the documentation of this file.
1
5/* purple
6 *
7 * Purple is the legal property of its developers, whose names are too numerous
8 * to list here. Please refer to the COPYRIGHT file distributed with this
9 * source distribution.
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
24 */
25
26#ifndef _PURPLE_WHITEBOARD_H_
27#define _PURPLE_WHITEBOARD_H_
28
32 typedef struct _PurpleWhiteboardPrplOps PurpleWhiteboardPrplOps;
33
34#include "account.h"
35
39 typedef struct _PurpleWhiteboard
40{
41 int state;
43 PurpleAccount *account;
44 char *who;
46 void *ui_data;
47 void *proto_data;
48 PurpleWhiteboardPrplOps *prpl_ops;
50 GList *draw_list;
51} PurpleWhiteboard;
52
56 typedef struct _PurpleWhiteboardUiOps
57{
58 void (*create)(PurpleWhiteboard *wb);
59 void (*destroy)(PurpleWhiteboard *wb);
60 void (*set_dimensions)(PurpleWhiteboard *wb, int width, int height);
61 void (*set_brush) (PurpleWhiteboard *wb, int size, int color);
62 void (*draw_point)(PurpleWhiteboard *wb, int x, int y,
63 int color, int size);
64 void (*draw_line)(PurpleWhiteboard *wb, int x1, int y1,
65 int x2, int y2,
66 int color, int size);
67 void (*clear)(PurpleWhiteboard *wb);
69 void (*_purple_reserved1)(void);
70 void (*_purple_reserved2)(void);
71 void (*_purple_reserved3)(void);
72 void (*_purple_reserved4)(void);
73} PurpleWhiteboardUiOps;
74
78 struct _PurpleWhiteboardPrplOps
79{
80 void (*start)(PurpleWhiteboard *wb);
81 void (*end)(PurpleWhiteboard *wb);
82 void (*get_dimensions)(const PurpleWhiteboard *wb, int *width, int *height);
83 void (*set_dimensions)(PurpleWhiteboard *wb, int width, int height);
84 void (*get_brush) (const PurpleWhiteboard *wb, int *size, int *color);
85 void (*set_brush) (PurpleWhiteboard *wb, int size, int color);
86 void (*send_draw_list)(PurpleWhiteboard *wb, GList *draw_list);
87 void (*clear)(PurpleWhiteboard *wb);
89 void (*_purple_reserved1)(void);
90 void (*_purple_reserved2)(void);
91 void (*_purple_reserved3)(void);
92 void (*_purple_reserved4)(void);
93};
94
95#ifdef __cplusplus
96extern "C" {
97#endif /* __cplusplus */
98
99/******************************************************************************/
101/******************************************************************************/
109 void purple_whiteboard_set_ui_ops(PurpleWhiteboardUiOps *ops);
110
117 void purple_whiteboard_set_prpl_ops(PurpleWhiteboard *wb, PurpleWhiteboardPrplOps *ops);
118
128 PurpleWhiteboard *purple_whiteboard_create(PurpleAccount *account, const char *who, int state);
129
135 void purple_whiteboard_destroy(PurpleWhiteboard *wb);
136
142 void purple_whiteboard_start(PurpleWhiteboard *wb);
143
152 PurpleWhiteboard *purple_whiteboard_get_session(const PurpleAccount *account, const char *who);
153
159 void purple_whiteboard_draw_list_destroy(GList *draw_list);
160
170gboolean purple_whiteboard_get_dimensions(const PurpleWhiteboard *wb, int *width, int *height);
171
179 void purple_whiteboard_set_dimensions(PurpleWhiteboard *wb, int width, int height);
180
190 void purple_whiteboard_draw_point(PurpleWhiteboard *wb, int x, int y, int color, int size);
191
198 void purple_whiteboard_send_draw_list(PurpleWhiteboard *wb, GList *list);
199
211 void purple_whiteboard_draw_line(PurpleWhiteboard *wb, int x1, int y1, int x2, int y2, int color, int size);
212
218 void purple_whiteboard_clear(PurpleWhiteboard *wb);
219
225 void purple_whiteboard_send_clear(PurpleWhiteboard *wb);
226
234 void purple_whiteboard_send_brush(PurpleWhiteboard *wb, int size, int color);
235
245gboolean purple_whiteboard_get_brush(const PurpleWhiteboard *wb, int *size, int *color);
246
254 void purple_whiteboard_set_brush(PurpleWhiteboard *wb, int size, int color);
255
258#ifdef __cplusplus
259}
260#endif /* __cplusplus */
261
262#endif /* _PURPLE_WHITEBOARD_H_ */
account.h
Account API.
_PurpleAccount
Structure representing an account.
Definition: account.h:170
_PurpleWhiteboardPrplOps
PurpleWhiteboard PRPL Operations.
Definition: whiteboard.h:79
_PurpleWhiteboardPrplOps::start
void(* start)(PurpleWhiteboard *wb)
start function
Definition: whiteboard.h:80
_PurpleWhiteboardPrplOps::get_dimensions
void(* get_dimensions)(const PurpleWhiteboard *wb, int *width, int *height)
get_dimensions function
Definition: whiteboard.h:82
_PurpleWhiteboardPrplOps::set_brush
void(* set_brush)(PurpleWhiteboard *wb, int size, int color)
set the brush size and color
Definition: whiteboard.h:85
_PurpleWhiteboardPrplOps::clear
void(* clear)(PurpleWhiteboard *wb)
clear function
Definition: whiteboard.h:87
_PurpleWhiteboardPrplOps::send_draw_list
void(* send_draw_list)(PurpleWhiteboard *wb, GList *draw_list)
send_draw_list function
Definition: whiteboard.h:86
_PurpleWhiteboardPrplOps::end
void(* end)(PurpleWhiteboard *wb)
end function
Definition: whiteboard.h:81
_PurpleWhiteboardPrplOps::set_dimensions
void(* set_dimensions)(PurpleWhiteboard *wb, int width, int height)
set_dimensions function
Definition: whiteboard.h:83
_PurpleWhiteboardPrplOps::get_brush
void(* get_brush)(const PurpleWhiteboard *wb, int *size, int *color)
get the brush size and color
Definition: whiteboard.h:84
_PurpleWhiteboardUiOps
The PurpleWhiteboard UI Operations.
Definition: whiteboard.h:57
_PurpleWhiteboardUiOps::draw_line
void(* draw_line)(PurpleWhiteboard *wb, int x1, int y1, int x2, int y2, int color, int size)
draw_line function
Definition: whiteboard.h:64
_PurpleWhiteboardUiOps::destroy
void(* destroy)(PurpleWhiteboard *wb)
destory function
Definition: whiteboard.h:59
_PurpleWhiteboardUiOps::clear
void(* clear)(PurpleWhiteboard *wb)
clear function
Definition: whiteboard.h:67
_PurpleWhiteboardUiOps::create
void(* create)(PurpleWhiteboard *wb)
create function
Definition: whiteboard.h:58
_PurpleWhiteboardUiOps::set_dimensions
void(* set_dimensions)(PurpleWhiteboard *wb, int width, int height)
set_dimensions function
Definition: whiteboard.h:60
_PurpleWhiteboardUiOps::draw_point
void(* draw_point)(PurpleWhiteboard *wb, int x, int y, int color, int size)
draw_point function
Definition: whiteboard.h:62
_PurpleWhiteboardUiOps::set_brush
void(* set_brush)(PurpleWhiteboard *wb, int size, int color)
set the size and color of the brush
Definition: whiteboard.h:61
_PurpleWhiteboard
A PurpleWhiteboard.
Definition: whiteboard.h:40
_PurpleWhiteboard::ui_data
void * ui_data
Graphical user-interface data.
Definition: whiteboard.h:46
_PurpleWhiteboard::draw_list
GList * draw_list
List of drawing elements/deltas to send.
Definition: whiteboard.h:50
_PurpleWhiteboard::account
PurpleAccount * account
Account associated with this session.
Definition: whiteboard.h:43
_PurpleWhiteboard::proto_data
void * proto_data
Protocol specific data.
Definition: whiteboard.h:47
_PurpleWhiteboard::who
char * who
Name of the remote user.
Definition: whiteboard.h:44
_PurpleWhiteboard::prpl_ops
PurpleWhiteboardPrplOps * prpl_ops
Protocol-plugin operations.
Definition: whiteboard.h:48
_PurpleWhiteboard::state
int state
State of whiteboard session.
Definition: whiteboard.h:41
purple_whiteboard_get_session
PurpleWhiteboard * purple_whiteboard_get_session(const PurpleAccount *account, const char *who)
Finds a whiteboard from an account and user.
PurpleWhiteboardUiOps
struct _PurpleWhiteboardUiOps PurpleWhiteboardUiOps
The PurpleWhiteboard UI Operations.
purple_whiteboard_create
PurpleWhiteboard * purple_whiteboard_create(PurpleAccount *account, const char *who, int state)
Creates a whiteboard.
purple_whiteboard_destroy
void purple_whiteboard_destroy(PurpleWhiteboard *wb)
Destroys a whiteboard.
purple_whiteboard_draw_line
void purple_whiteboard_draw_line(PurpleWhiteboard *wb, int x1, int y1, int x2, int y2, int color, int size)
Draws a line on a whiteboard.
purple_whiteboard_get_brush
gboolean purple_whiteboard_get_brush(const PurpleWhiteboard *wb, int *size, int *color)
Gets the size and color of the brush.
purple_whiteboard_send_clear
void purple_whiteboard_send_clear(PurpleWhiteboard *wb)
Sends a request to the buddy to clear the whiteboard.
purple_whiteboard_start
void purple_whiteboard_start(PurpleWhiteboard *wb)
Starts a whiteboard.
purple_whiteboard_set_ui_ops
void purple_whiteboard_set_ui_ops(PurpleWhiteboardUiOps *ops)
Sets the UI operations.
purple_whiteboard_set_brush
void purple_whiteboard_set_brush(PurpleWhiteboard *wb, int size, int color)
Sets the size and color of the brush.
PurpleWhiteboard
struct _PurpleWhiteboard PurpleWhiteboard
A PurpleWhiteboard.
purple_whiteboard_get_dimensions
gboolean purple_whiteboard_get_dimensions(const PurpleWhiteboard *wb, int *width, int *height)
Gets the dimension of a whiteboard.
purple_whiteboard_send_brush
void purple_whiteboard_send_brush(PurpleWhiteboard *wb, int size, int color)
Sends a request to change the size and color of the brush.
purple_whiteboard_set_prpl_ops
void purple_whiteboard_set_prpl_ops(PurpleWhiteboard *wb, PurpleWhiteboardPrplOps *ops)
Sets the prpl operations for a whiteboard.
purple_whiteboard_draw_list_destroy
void purple_whiteboard_draw_list_destroy(GList *draw_list)
Destorys a drawing list for a whiteboard.
purple_whiteboard_draw_point
void purple_whiteboard_draw_point(PurpleWhiteboard *wb, int x, int y, int color, int size)
Draws a point on a whiteboard.
purple_whiteboard_set_dimensions
void purple_whiteboard_set_dimensions(PurpleWhiteboard *wb, int width, int height)
Sets the dimensions for a whiteboard.
purple_whiteboard_send_draw_list
void purple_whiteboard_send_draw_list(PurpleWhiteboard *wb, GList *list)
Send a list of points to draw to the buddy.
purple_whiteboard_clear
void purple_whiteboard_clear(PurpleWhiteboard *wb)
Clears a whiteboard.