Mercurial > pidgin.yaz
comparison src/gtkwhiteboard.h @ 11475:7fab28c991f3
[gaim-migrate @ 13717]
merging gaim-doodle/whiteboard/whatever you like to call it.
Needs some cleanups and doxygen comments, but has basic functionality
committer: Tailor Script <tailor@pidgin.im>
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Fri, 09 Sep 2005 04:40:21 +0000 |
parents | |
children | 2e3a6dcebaf3 |
comparison
equal
deleted
inserted
replaced
11474:7e9635b73ed6 | 11475:7fab28c991f3 |
---|---|
1 /** | |
2 * @file gtkwhiteboard.h The GtkGaimWhiteboard frontend 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_GTKWHITEBOARD_H_ | |
26 #define _GAIM_GTKWHITEBOARD_H_ | |
27 | |
28 // INCLUDES ============================================================================================ | |
29 #include "gtkgaim.h" | |
30 | |
31 #include "whiteboard.h" | |
32 | |
33 // DEFINES ============================================================================================= | |
34 | |
35 #define FULL_CIRCLE_DEGREES 23040 | |
36 | |
37 #define BRUSH_STATE_UP 0 | |
38 #define BRUSH_STATE_DOWN 1 | |
39 #define BRUSH_STATE_MOTION 2 | |
40 | |
41 #define PALETTE_NUM_COLORS 7 | |
42 | |
43 // DATATYPES =========================================================================================== | |
44 typedef struct _GaimGtkWhiteboard | |
45 { | |
46 GaimWhiteboard *wb; // backend data for this whiteboard | |
47 | |
48 GtkWidget *window; // Window for the Doodle session | |
49 GtkWidget *drawing_area; // Drawing area | |
50 | |
51 GdkPixmap *pixmap; // Memory for drawing area | |
52 | |
53 int width; // Canvas width | |
54 int height; // Canvas height | |
55 } GaimGtkWhiteboard; | |
56 | |
57 // PROTOTYPES ========================================================================================== | |
58 | |
59 GaimWhiteboardUiOps *gaim_gtk_whiteboard_get_ui_ops( void ); | |
60 | |
61 void gaim_gtk_whiteboard_create( GaimWhiteboard *wb ); | |
62 void gaim_gtk_whiteboard_destroy( GaimWhiteboard *wb ); | |
63 void gaim_gtk_whiteboard_exit( GtkWidget *widget, gpointer data ); | |
64 | |
65 //void gaim_gtkwhiteboard_button_start_press( GtkButton *button, gpointer data ); | |
66 | |
67 gboolean gaim_gtk_whiteboard_configure_event( GtkWidget *widget, GdkEventConfigure *event, gpointer data ); | |
68 gboolean gaim_gtk_whiteboard_expose_event( GtkWidget *widget, GdkEventExpose *event, gpointer data ); | |
69 | |
70 gboolean gaim_gtk_whiteboard_brush_down( GtkWidget *widget, GdkEventButton *event, gpointer data ); | |
71 gboolean gaim_gtk_whiteboard_brush_motion( GtkWidget *widget, GdkEventMotion *event, gpointer data ); | |
72 gboolean gaim_gtk_whiteboard_brush_up( GtkWidget *widget, GdkEventButton *event, gpointer data ); | |
73 | |
74 void gaim_gtk_whiteboard_draw_brush_point( GaimWhiteboard *wb, | |
75 int x, int y, int color, int size ); | |
76 void gaim_gtk_whiteboard_draw_brush_line( GaimWhiteboard *wb, | |
77 int x0, int y0, int x1, int y1, int color, int size ); | |
78 | |
79 void gaim_gtk_whiteboard_set_dimensions( GaimWhiteboard *wb, int width, int height ); | |
80 void gaim_gtk_whiteboard_clear( GaimWhiteboard *wb ); | |
81 | |
82 void gaim_gtk_whiteboard_button_clear_press( GtkWidget *widget, gpointer data ); | |
83 void gaim_gtk_whiteboard_button_save_press( GtkWidget *widget, gpointer data ); | |
84 | |
85 void gaim_gtk_whiteboard_set_canvas_as_icon( GaimGtkWhiteboard *gtkwb ); | |
86 | |
87 void gaim_gtk_whiteboard_rgb24_to_rgb48( int color_rgb, GdkColor *color ); | |
88 | |
89 #endif // _GAIM_GTKWHITEBOARD_H_ |