Mercurial > pidgin.yaz
comparison libpurple/whiteboard.c @ 32464:2bf260b86086
Add additional accessor functions for Whiteboard.
author | andrew.victor@mxit.com |
---|---|
date | Tue, 30 Aug 2011 22:02:29 +0000 |
parents | cea77667da7d |
children | 46177ee4af40 |
comparison
equal
deleted
inserted
replaced
32463:d5ddf2d1ee04 | 32464:2bf260b86086 |
---|---|
88 g_free(wb->who); | 88 g_free(wb->who); |
89 wbList = g_list_remove(wbList, wb); | 89 wbList = g_list_remove(wbList, wb); |
90 g_free(wb); | 90 g_free(wb); |
91 } | 91 } |
92 | 92 |
93 PurpleAccount *purple_whiteboard_get_account(const PurpleWhiteboard *wb) | |
94 { | |
95 g_return_val_if_fail(wb != NULL, NULL); | |
96 | |
97 return wb->account; | |
98 } | |
99 | |
100 const char *purple_whiteboard_get_who(const PurpleWhiteboard *wb) | |
101 { | |
102 g_return_val_if_fail(wb != NULL, NULL); | |
103 | |
104 return wb->who; | |
105 } | |
106 | |
107 void purple_whiteboard_set_state(PurpleWhiteboard *wb, int state) | |
108 { | |
109 g_return_if_fail(wb != NULL); | |
110 | |
111 wb->state = state; | |
112 } | |
113 | |
114 int purple_whiteboard_get_state(const PurpleWhiteboard *wb) | |
115 { | |
116 g_return_val_if_fail(wb != NULL, -1); | |
117 | |
118 return wb->state; | |
119 } | |
120 | |
93 void purple_whiteboard_start(PurpleWhiteboard *wb) | 121 void purple_whiteboard_start(PurpleWhiteboard *wb) |
94 { | 122 { |
95 /* Create frontend for whiteboard */ | 123 /* Create frontend for whiteboard */ |
96 if(whiteboard_ui_ops && whiteboard_ui_ops->create) | 124 if(whiteboard_ui_ops && whiteboard_ui_ops->create) |
97 whiteboard_ui_ops->create(wb); | 125 whiteboard_ui_ops->create(wb); |
204 { | 232 { |
205 if (whiteboard_ui_ops && whiteboard_ui_ops->set_brush) | 233 if (whiteboard_ui_ops && whiteboard_ui_ops->set_brush) |
206 whiteboard_ui_ops->set_brush(wb, size, color); | 234 whiteboard_ui_ops->set_brush(wb, size, color); |
207 } | 235 } |
208 | 236 |
237 GList *purple_whiteboard_get_draw_list(const PurpleWhiteboard *wb) | |
238 { | |
239 g_return_val_if_fail(wb != NULL, NULL); | |
240 | |
241 return wb->draw_list; | |
242 } | |
243 | |
244 void purple_whiteboard_set_draw_list(PurpleWhiteboard *wb, GList* draw_list) | |
245 { | |
246 g_return_if_fail(wb != NULL); | |
247 | |
248 wb->draw_list = draw_list; | |
249 } | |
250 | |
209 void purple_whiteboard_set_protocol_data(PurpleWhiteboard *wb, gpointer proto_data) | 251 void purple_whiteboard_set_protocol_data(PurpleWhiteboard *wb, gpointer proto_data) |
210 { | 252 { |
211 g_return_if_fail(wb != NULL); | 253 g_return_if_fail(wb != NULL); |
212 | 254 |
213 wb->proto_data = proto_data; | 255 wb->proto_data = proto_data; |