Thu, 13 May 2010 05:06:46 +0000
ChangeLog Elliott's fix for buddy icons on MSN.
| 11475 | 1 | /** |
| 15884 | 2 | * @file whiteboard.h The PurpleWhiteboard core object |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
3 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
4 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
5 | /* purple |
| 11475 | 6 | * |
| 15884 | 7 | * Purple is the legal property of its developers, whose names are too numerous |
| 11475 | 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 | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16743
diff
changeset
|
23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 11475 | 24 | */ |
| 25 | ||
| 15884 | 26 | #ifndef _PURPLE_WHITEBOARD_H_ |
| 27 | #define _PURPLE_WHITEBOARD_H_ | |
| 11475 | 28 | |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
29 | /** |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
30 | * Whiteboard PRPL Operations |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
31 | */ |
| 15884 | 32 | typedef struct _PurpleWhiteboardPrplOps PurpleWhiteboardPrplOps; |
| 11475 | 33 | |
| 34 | #include "account.h" | |
| 35 | ||
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
36 | /** |
| 15884 | 37 | * A PurpleWhiteboard |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
38 | */ |
| 15884 | 39 | typedef struct _PurpleWhiteboard |
| 11475 | 40 | { |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11802
diff
changeset
|
41 | int state; /**< State of whiteboard session */ |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
42 | |
| 15884 | 43 | PurpleAccount *account; /**< Account associated with this session */ |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11802
diff
changeset
|
44 | char *who; /**< Name of the remote user */ |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
45 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11802
diff
changeset
|
46 | void *ui_data; /**< Graphical user-interface data */ |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11802
diff
changeset
|
47 | void *proto_data; /**< Protocol specific data */ |
| 15884 | 48 | PurpleWhiteboardPrplOps *prpl_ops; /**< Protocol-plugin operations */ |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
49 | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11802
diff
changeset
|
50 | GList *draw_list; /**< List of drawing elements/deltas to send */ |
| 15884 | 51 | } PurpleWhiteboard; |
| 11475 | 52 | |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
53 | /** |
| 15884 | 54 | * The PurpleWhiteboard UI Operations |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
55 | */ |
| 15884 | 56 | typedef struct _PurpleWhiteboardUiOps |
| 11475 | 57 | { |
| 15884 | 58 | void (*create)(PurpleWhiteboard *wb); /**< create function */ |
| 59 | void (*destroy)(PurpleWhiteboard *wb); /**< destory function */ | |
| 60 | void (*set_dimensions)(PurpleWhiteboard *wb, int width, int height); /**< set_dimensions function */ | |
| 61 | void (*set_brush) (PurpleWhiteboard *wb, int size, int color); /**< set the size and color of the brush */ | |
| 62 | void (*draw_point)(PurpleWhiteboard *wb, int x, int y, | |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11802
diff
changeset
|
63 | int color, int size); /**< draw_point function */ |
| 15884 | 64 | void (*draw_line)(PurpleWhiteboard *wb, int x1, int y1, |
|
11914
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11802
diff
changeset
|
65 | int x2, int y2, |
|
81ac838f3824
[gaim-migrate @ 14205]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11802
diff
changeset
|
66 | int color, int size); /**< draw_line function */ |
| 15884 | 67 | void (*clear)(PurpleWhiteboard *wb); /**< clear function */ |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
68 | |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
69 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
70 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
71 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
72 | void (*_purple_reserved4)(void); |
| 15884 | 73 | } PurpleWhiteboardUiOps; |
| 11475 | 74 | |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
75 | /** |
| 15884 | 76 | * PurpleWhiteboard PRPL Operations |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
77 | */ |
| 15884 | 78 | struct _PurpleWhiteboardPrplOps |
| 11475 | 79 | { |
| 15884 | 80 | void (*start)(PurpleWhiteboard *wb); /**< start function */ |
| 81 | void (*end)(PurpleWhiteboard *wb); /**< end function */ | |
| 82 | void (*get_dimensions)(const PurpleWhiteboard *wb, int *width, int *height); /**< get_dimensions function */ | |
| 83 | void (*set_dimensions)(PurpleWhiteboard *wb, int width, int height); /**< set_dimensions function */ | |
| 84 | void (*get_brush) (const PurpleWhiteboard *wb, int *size, int *color); /**< get the brush size and color */ | |
| 85 | void (*set_brush) (PurpleWhiteboard *wb, int size, int color); /**< set the brush size and color */ | |
| 86 | void (*send_draw_list)(PurpleWhiteboard *wb, GList *draw_list); /**< send_draw_list function */ | |
| 87 | void (*clear)(PurpleWhiteboard *wb); /**< clear function */ | |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
88 | |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
89 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
90 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
91 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15884
diff
changeset
|
92 | void (*_purple_reserved4)(void); |
| 11475 | 93 | }; |
| 94 | ||
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
95 | #ifdef __cplusplus |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
96 | extern "C" { |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
97 | #endif /* __cplusplus */ |
| 11475 | 98 | |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
99 | /******************************************************************************/ |
| 15884 | 100 | /** @name PurpleWhiteboard API */ |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
101 | /******************************************************************************/ |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
102 | /*@{*/ |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
103 | |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
104 | /** |
|
12400
47c1252e6f84
[gaim-migrate @ 14707]
Richard Laager <rlaager@pidgin.im>
parents:
12022
diff
changeset
|
105 | * Sets the UI operations |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
106 | * |
|
12400
47c1252e6f84
[gaim-migrate @ 14707]
Richard Laager <rlaager@pidgin.im>
parents:
12022
diff
changeset
|
107 | * @param ops The UI operations to set |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
108 | */ |
| 15884 | 109 | void purple_whiteboard_set_ui_ops(PurpleWhiteboardUiOps *ops); |
| 11475 | 110 | |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
111 | /** |
|
12400
47c1252e6f84
[gaim-migrate @ 14707]
Richard Laager <rlaager@pidgin.im>
parents:
12022
diff
changeset
|
112 | * Sets the prpl operations for a whiteboard |
|
47c1252e6f84
[gaim-migrate @ 14707]
Richard Laager <rlaager@pidgin.im>
parents:
12022
diff
changeset
|
113 | * |
|
47c1252e6f84
[gaim-migrate @ 14707]
Richard Laager <rlaager@pidgin.im>
parents:
12022
diff
changeset
|
114 | * @param wb The whiteboard for which to set the prpl operations |
|
47c1252e6f84
[gaim-migrate @ 14707]
Richard Laager <rlaager@pidgin.im>
parents:
12022
diff
changeset
|
115 | * @param ops The prpl operations to set |
|
47c1252e6f84
[gaim-migrate @ 14707]
Richard Laager <rlaager@pidgin.im>
parents:
12022
diff
changeset
|
116 | */ |
| 15884 | 117 | void purple_whiteboard_set_prpl_ops(PurpleWhiteboard *wb, PurpleWhiteboardPrplOps *ops); |
|
12400
47c1252e6f84
[gaim-migrate @ 14707]
Richard Laager <rlaager@pidgin.im>
parents:
12022
diff
changeset
|
118 | |
|
47c1252e6f84
[gaim-migrate @ 14707]
Richard Laager <rlaager@pidgin.im>
parents:
12022
diff
changeset
|
119 | /** |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
120 | * Creates a whiteboard |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
121 | * |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
122 | * @param account The account. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
123 | * @param who Who you're drawing with. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
124 | * @param state The state. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
125 | * |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
126 | * @return The new whiteboard |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
127 | */ |
| 15884 | 128 | PurpleWhiteboard *purple_whiteboard_create(PurpleAccount *account, const char *who, int state); |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
129 | |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
130 | /** |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
131 | * Destroys a whiteboard |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
132 | * |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
133 | * @param wb The whiteboard. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
134 | */ |
| 15884 | 135 | void purple_whiteboard_destroy(PurpleWhiteboard *wb); |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
136 | |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
137 | /** |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
138 | * Starts a whiteboard |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
139 | * |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
140 | * @param wb The whiteboard. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
141 | */ |
| 15884 | 142 | void purple_whiteboard_start(PurpleWhiteboard *wb); |
| 11475 | 143 | |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
144 | /** |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
145 | * Finds a whiteboard from an account and user. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
146 | * |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
147 | * @param account The account. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
148 | * @param who The user. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
149 | * |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
150 | * @return The whiteboard if found, otherwise @c NULL. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
151 | */ |
| 15884 | 152 | PurpleWhiteboard *purple_whiteboard_get_session(const PurpleAccount *account, const char *who); |
| 11475 | 153 | |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
154 | /** |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
155 | * Destorys a drawing list for a whiteboard |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
156 | * |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
157 | * @param draw_list The drawing list. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
158 | */ |
| 15884 | 159 | void purple_whiteboard_draw_list_destroy(GList *draw_list); |
| 11475 | 160 | |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
161 | /** |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
162 | * Gets the dimension of a whiteboard. |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
163 | * |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
164 | * @param wb The whiteboard. |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
165 | * @param width The width to be set. |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
166 | * @param height The height to be set. |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
167 | * |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
168 | * @return TRUE if the values of width and height were set. |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
169 | */ |
| 15884 | 170 | gboolean purple_whiteboard_get_dimensions(const PurpleWhiteboard *wb, int *width, int *height); |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
171 | |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
172 | /** |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
173 | * Sets the dimensions for a whiteboard. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
174 | * |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
175 | * @param wb The whiteboard. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
176 | * @param width The width. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
177 | * @param height The height. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
178 | */ |
| 15884 | 179 | void purple_whiteboard_set_dimensions(PurpleWhiteboard *wb, int width, int height); |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
180 | |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
181 | /** |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
182 | * Draws a point on a whiteboard. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
183 | * |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
184 | * @param wb The whiteboard. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
185 | * @param x The x coordinate. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
186 | * @param y The y coordinate. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
187 | * @param color The color to use. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
188 | * @param size The brush size. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
189 | */ |
| 15884 | 190 | void purple_whiteboard_draw_point(PurpleWhiteboard *wb, int x, int y, int color, int size); |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
191 | |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
192 | /** |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
193 | * Send a list of points to draw to the buddy. |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
194 | * |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
195 | * @param wb The whiteboard |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
196 | * @param list A GList of points |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
197 | */ |
| 15884 | 198 | void purple_whiteboard_send_draw_list(PurpleWhiteboard *wb, GList *list); |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
199 | |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
200 | /** |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
201 | * Draws a line on a whiteboard |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
202 | * |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
203 | * @param wb The whiteboard. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
204 | * @param x1 The top-left x coordinate. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
205 | * @param y1 The top-left y coordinate. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
206 | * @param x2 The bottom-right x coordinate. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
207 | * @param y2 The bottom-right y coordinate. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
208 | * @param color The color to use. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
209 | * @param size The brush size. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
210 | */ |
| 15884 | 211 | void purple_whiteboard_draw_line(PurpleWhiteboard *wb, int x1, int y1, int x2, int y2, int color, int size); |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
212 | |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
213 | /** |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
214 | * Clears a whiteboard |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
215 | * |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
216 | * @param wb The whiteboard. |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
217 | */ |
| 15884 | 218 | void purple_whiteboard_clear(PurpleWhiteboard *wb); |
| 11475 | 219 | |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
220 | /** |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
221 | * Sends a request to the buddy to clear the whiteboard. |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
222 | * |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
223 | * @param wb The whiteboard |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
224 | */ |
| 15884 | 225 | void purple_whiteboard_send_clear(PurpleWhiteboard *wb); |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
226 | |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
227 | /** |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
228 | * Sends a request to change the size and color of the brush. |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
229 | * |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
230 | * @param wb The whiteboard |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
231 | * @param size The size of the brush |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
232 | * @param color The color of the brush |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
233 | */ |
| 15884 | 234 | void purple_whiteboard_send_brush(PurpleWhiteboard *wb, int size, int color); |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
235 | |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
236 | /** |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
237 | * Gets the size and color of the brush. |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
238 | * |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
239 | * @param wb The whiteboard |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
240 | * @param size The size of the brush |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
241 | * @param color The color of the brush |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
242 | * |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
243 | * @return TRUE if the size and color were set. |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
244 | */ |
| 15884 | 245 | gboolean purple_whiteboard_get_brush(const PurpleWhiteboard *wb, int *size, int *color); |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
246 | |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
247 | /** |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
248 | * Sets the size and color of the brush. |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
249 | * |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
250 | * @param wb The whiteboard |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
251 | * @param size The size of the brush |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
252 | * @param color The color of the brush |
|
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
253 | */ |
| 15884 | 254 | void purple_whiteboard_set_brush(PurpleWhiteboard *wb, int size, int color); |
|
12022
c03fe7e2cd1d
[gaim-migrate @ 14315]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
11914
diff
changeset
|
255 | |
|
11802
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
256 | /*@}*/ |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
257 | |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
258 | #ifdef __cplusplus |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
259 | } |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
260 | #endif /* __cplusplus */ |
|
b97b3fea95ce
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
261 | |
| 15884 | 262 | #endif /* _PURPLE_WHITEBOARD_H_ */ |