Mercurial > pidgin
annotate src/whiteboard.h @ 12116:e75ef7aa913e
[gaim-migrate @ 14416]
" This patch implements a replacement for the queuing
system from 1.x. It also obsoletes a previous patch
[#1338873] I submitted to prioritize the unseen states
in gtk conversations.
The attached envelope.png is ripped from the
msgunread.png already included in gaim. It should be
dropped in the pixmaps directory (Makefile.am is
updated accordingly in this patch).
The two separate queuing preferences from 1.x, queuing
messages while away and queuing all new messages (from
docklet), are replaced with a single 3-way preference
for conversations. The new preference is "Hide new IM
conversations". This preference can be set to never,
away and always.
When a gtk conversation is created, it may be placed in
a hidden conversation window instead of being placed
normally. This decision is based upon the preference
and possibly the away state of the account the
conversation is being created for. This *will* effect
conversations the user explicitly requests to be
created, so in these cases the caller must be sure to
present the conversation to the user, using
gaim_gtkconv_present_conversation(). This is done
already in gtkdialogs.c which handles creating
conversations requested by the user from gaim proper
(menus, double-clicking on budy in blist, etc.).
The main advantage to not queuing messages is that the
conversations exist, the message is written to the
conversation (and logged if appropriate) and the unseen
state is set on the conversation. This means no
additional features are needed to track whether there
are queued messages or not, just use the unseen state
on conversations.
Since conversations may not be visible (messages
"queued"), gaim proper needs some notification that
there are messages waiting. I opted for a menutray icon
that shows up when an im conversation has an unseen
message. Clicking this icon will focus (and show if
hidden) the first conversation with an unseen message.
This is essentially the same behavior of the docklet in
cvs right now, except that the icon is only visible
when there is a conversation with an unread message.
The api that is added is flexible enough to allow
either the docklet or the new blist menutray icon to be
visible for conversations of any/all types and for
unseen messages >= any state. Currently they are set to
only IM conversations and only unseen states >= TEXT
(system messages and no log messages will not trigger
blinking the docklet or showing the blist tray icon),
but these could be made preferences relatively easily
in the future. Other plugins could probably benefit as
well: gaim_gtk_conversations_get_first_unseen().
There is probably some limit to comment size, so I'll
stop rambling now. If anyone has more
questions/comments, catch me in #gaim, here or on
gaim-devel."
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 16 Nov 2005 18:17:01 +0000 |
parents | 9d562dde0a3a |
children | eaf7c8558914 |
rev | line source |
---|---|
11475 | 1 /** |
2 * @file whiteboard.h The GaimWhiteboard core object | |
3 * | |
4 * gaim | |
5 * | |
6 * Gaim is the legal property of its developers, whose names are too numerous | |
7 * to list here. Please refer to the COPYRIGHT file distributed with this | |
8 * source distribution. | |
9 * | |
10 * This program is free software; you can redistribute it and/or modify | |
11 * it under the terms of the GNU General Public License as published by | |
12 * the Free Software Foundation; either version 2 of the License, or | |
13 * (at your option) any later version. | |
14 * | |
15 * This program is distributed in the hope that it will be useful, | |
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 * GNU General Public License for more details. | |
19 * | |
20 * You should have received a copy of the GNU General Public License | |
21 * along with this program; if not, write to the Free Software | |
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
23 */ | |
24 | |
25 #ifndef _GAIM_WHITEBOARD_H_ | |
26 #define _GAIM_WHITEBOARD_H_ | |
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 | 32 |
33 #include "account.h" | |
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 | 38 typedef struct _GaimWhiteboard |
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 | 50 } GaimWhiteboard; |
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 | 55 typedef struct _GaimWhiteboardUiOps |
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 | 67 } GaimWhiteboardUiOps; |
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 | 72 struct _GaimWhiteboardPrplOps |
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 | 82 }; |
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 | 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 /** |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
94 * Sets the UI Operations |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
95 * |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
96 * @param ops The UI Operations to set |
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 | 99 |
11802
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
100 /** |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
101 * Creates a whiteboard |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
102 * |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
103 * @param account The account. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
104 * @param who Who you're drawing with. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
105 * @param state The state. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
106 * |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
107 * @return The new whiteboard |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
108 */ |
11914
2219f4bf4a57
[gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents:
11802
diff
changeset
|
109 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
|
110 |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
111 /** |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
112 * Destroys a whiteboard |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
113 * |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
114 * @param wb The whiteboard. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
115 */ |
11914
2219f4bf4a57
[gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents:
11802
diff
changeset
|
116 void gaim_whiteboard_destroy(GaimWhiteboard *wb); |
11802
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
117 |
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 * Starts a whiteboard |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
120 * |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
121 * @param wb The whiteboard. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
122 */ |
11914
2219f4bf4a57
[gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents:
11802
diff
changeset
|
123 void gaim_whiteboard_start(GaimWhiteboard *wb); |
11475 | 124 |
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 * Finds a whiteboard from an account and user. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
127 * |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
128 * @param account The account. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
129 * @param who The user. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
130 * |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
131 * @return The whiteboard if found, otherwise @c NULL. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
132 */ |
11914
2219f4bf4a57
[gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents:
11802
diff
changeset
|
133 GaimWhiteboard *gaim_whiteboard_get_session(GaimAccount *account, const char *who); |
11475 | 134 |
11802
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 * Destorys a drawing list for a whiteboard |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
137 * |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
138 * @param draw_list The drawing list. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
139 */ |
11914
2219f4bf4a57
[gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents:
11802
diff
changeset
|
140 void gaim_whiteboard_draw_list_destroy(GList *draw_list); |
11475 | 141 |
11802
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
142 /** |
12022
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
143 * Gets the dimension of a whiteboard. |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
144 * |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
145 * @param wb The whiteboard. |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
146 * @param width The width to be set. |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
147 * @param height The height to be set. |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
148 * |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
149 * @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
|
150 */ |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
151 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
|
152 |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
153 /** |
11802
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
154 * Sets the dimensions for a whiteboard. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
155 * |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
156 * @param wb The whiteboard. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
157 * @param width The width. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
158 * @param height The height. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
159 */ |
11914
2219f4bf4a57
[gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents:
11802
diff
changeset
|
160 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
|
161 |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
162 /** |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
163 * Draws a point on a whiteboard. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
164 * |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
165 * @param wb The whiteboard. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
166 * @param x The x coordinate. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
167 * @param y The y coordinate. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
168 * @param color The color to use. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
169 * @param size The brush size. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
170 */ |
11914
2219f4bf4a57
[gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents:
11802
diff
changeset
|
171 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
|
172 |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
173 /** |
12022
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
174 * Send a list of points to draw to the buddy. |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
175 * |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
176 * @param wb The whiteboard |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
177 * @param list A GList of points |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
178 */ |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
179 void gaim_whiteboard_send_draw_list(GaimWhiteboard *wb, GList *list); |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
180 |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
181 /** |
11802
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
182 * Draws a line on a whiteboard |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
183 * |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
184 * @param wb The whiteboard. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
185 * @param x1 The top-left x coordinate. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
186 * @param y1 The top-left y coordinate. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
187 * @param x2 The bottom-right x coordinate. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
188 * @param y2 The bottom-right y coordinate. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
189 * @param color The color to use. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
190 * @param size The brush size. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
191 */ |
11914
2219f4bf4a57
[gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents:
11802
diff
changeset
|
192 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
|
193 |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
194 /** |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
195 * Clears a whiteboard |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
196 * |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
197 * @param wb The whiteboard. |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
198 */ |
11914
2219f4bf4a57
[gaim-migrate @ 14205]
Richard Laager <rlaager@wiktel.com>
parents:
11802
diff
changeset
|
199 void gaim_whiteboard_clear(GaimWhiteboard *wb); |
11475 | 200 |
12022
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
201 /** |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
202 * Sends a request to the buddy to clear the whiteboard. |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
203 * |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
204 * @param wb The whiteboard |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
205 */ |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
206 void gaim_whiteboard_send_clear(GaimWhiteboard *wb); |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
207 |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
208 /** |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
209 * 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
|
210 * |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
211 * @param wb The whiteboard |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
212 * @param size The size of the brush |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
213 * @param color The color of the brush |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
214 */ |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
215 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
|
216 |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
217 /** |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
218 * Gets the size and color of the brush. |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
219 * |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
220 * @param wb The whiteboard |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
221 * @param size The size of the brush |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
222 * @param color The color of the brush |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
223 * |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
224 * @return TRUE if the size and color were set. |
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 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
|
227 |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
228 /** |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
229 * Sets the size and color of the brush. |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
230 * |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
231 * @param wb The whiteboard |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
232 * @param size The size of the brush |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
233 * @param color The color of the brush |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
234 */ |
9d562dde0a3a
[gaim-migrate @ 14315]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
11914
diff
changeset
|
235 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
|
236 |
11802
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
237 /*@}*/ |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
238 |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
239 #ifdef __cplusplus |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
240 } |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
241 #endif /* __cplusplus */ |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
242 |
2e3a6dcebaf3
[gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents:
11475
diff
changeset
|
243 #endif /* _GAIM_WHITEBOARD_H_ */ |