annotate src/gtkwhiteboard.h @ 11869:3ba50c385299

[gaim-migrate @ 14160] This should make joining big channels a bit quicker/more efficient. It was really bad before, now it's just bad. My crude testing showed it shaved a few hundred thousand library calls of joining #gaim, so it can't be too bad. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Fri, 28 Oct 2005 01:46:12 +0000
parents 2e3a6dcebaf3
children 2219f4bf4a57
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /**
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * @file gtkwhiteboard.h The GtkGaimWhiteboard frontend object
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 *
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 * gaim
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 *
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * Gaim is the legal property of its developers, whose names are too numerous
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * source distribution.
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 *
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * (at your option) any later version.
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 *
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 * GNU General Public License for more details.
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 *
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 */
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #ifndef _GAIM_GTKWHITEBOARD_H_
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 #define _GAIM_GTKWHITEBOARD_H_
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #include "gtkgaim.h"
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include "whiteboard.h"
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 #define FULL_CIRCLE_DEGREES 23040
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 #define BRUSH_STATE_UP 0
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 #define BRUSH_STATE_DOWN 1
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 #define BRUSH_STATE_MOTION 2
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 #define PALETTE_NUM_COLORS 7
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
40 /**
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
41 * A GaimGtkWhiteboard
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
42 */
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 typedef struct _GaimGtkWhiteboard
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 {
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
45 GaimWhiteboard *wb; /**< backend data for this whiteboard */
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
46
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
47 GtkWidget *window; /**< Window for the Doodle session */
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
48 GtkWidget *drawing_area; /**< Drawing area */
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
49
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
50 GdkPixmap *pixmap; /**< Memory for drawing area */
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
51
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
52 int width; /**< Canvas width */
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
53 int height; /**< Canvas height */
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 } GaimGtkWhiteboard;
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
56 #ifdef __cplusplus
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
57 extern "C" {
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
58 #endif /* __cplusplus */
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
60 /*****************************************************************************/
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
61 /** @name GaimGtkWhiteboard API */
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
62 /*****************************************************************************/
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
63 /*@{*/
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
64
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
65 /**
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
66 * Gets the GtkWhiteboard UI Operations.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
67 *
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
68 * @return The GtkWhiteboard UI Operations.
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
69 */
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 GaimWhiteboardUiOps *gaim_gtk_whiteboard_get_ui_ops( void );
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
72 /*@}*/
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
74 #ifdef __cplusplus
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
75 }
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
76 #endif /* __cplusplus */
11475
7fab28c991f3 [gaim-migrate @ 13717]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77
11802
2e3a6dcebaf3 [gaim-migrate @ 14093]
Gary Kramlich <grim@reaperworld.com>
parents: 11475
diff changeset
78 #endif /* _GAIM_GTKWHITEBOARD_H_ */