Mercurial > pidgin.yaz
diff src/gtkwhiteboard.h @ 11914:2219f4bf4a57
[gaim-migrate @ 14205]
SF Patch #1342017 from sadrul
"This patch allows a user to change brush color during
the doodle-session.
This patch is mostly a rough one to get an idea whether
the approach is correct. To make things simple, I have
kept brush_size and brush_color in GaimGtkWhiteboard,
although it's there in doodle_session. It could be in
either place, although I would think it's best to be in
GaimGtkWhiteboard because any/most implementations of
doodle-ing would have these attributes. So keeping them
within the prpl may not be the best option?
Anyway, considering the brush-size and color stay at
the prpl for now, I have introduced two functions in
GaimWhiteboardPrplOps to get/set the size and color of
the brush from the prpl.
rekkanoryo (using Y! 7) and I (using gaim) have tested
this, and it seemed to work OK."
Plus, I cleaned up a whole bunch of code.
My apologies for this all being committed together, but it was a case of "Oh, this will be quick." that lead into hours of making intertwined changes.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Mon, 31 Oct 2005 02:19:51 +0000 |
parents | 2e3a6dcebaf3 |
children |
line wrap: on
line diff
--- a/src/gtkwhiteboard.h Mon Oct 31 01:58:26 2005 +0000 +++ b/src/gtkwhiteboard.h Mon Oct 31 02:19:51 2005 +0000 @@ -29,28 +29,33 @@ #include "whiteboard.h" -#define FULL_CIRCLE_DEGREES 23040 +#define FULL_CIRCLE_DEGREES 23040 -#define BRUSH_STATE_UP 0 -#define BRUSH_STATE_DOWN 1 -#define BRUSH_STATE_MOTION 2 +/* TODO: Make into an enum. */ +#define BRUSH_STATE_UP 0 +#define BRUSH_STATE_DOWN 1 +#define BRUSH_STATE_MOTION 2 -#define PALETTE_NUM_COLORS 7 +/* XXX: This seems duplicated with the Yahoo! Doodle prpl code. + * XXX: How should they work together? */ +#define PALETTE_NUM_COLORS 7 /** * A GaimGtkWhiteboard */ typedef struct _GaimGtkWhiteboard { - GaimWhiteboard *wb; /**< backend data for this whiteboard */ + GaimWhiteboard *wb; /**< backend data for this whiteboard */ - GtkWidget *window; /**< Window for the Doodle session */ - GtkWidget *drawing_area; /**< Drawing area */ + GtkWidget *window; /**< Window for the Doodle session */ + GtkWidget *drawing_area; /**< Drawing area */ - GdkPixmap *pixmap; /**< Memory for drawing area */ + GdkPixmap *pixmap; /**< Memory for drawing area */ - int width; /**< Canvas width */ - int height; /**< Canvas height */ + int width; /**< Canvas width */ + int height; /**< Canvas height */ + int brush_color; /**< Foreground color */ + int brush_size; /**< Brush size */ } GaimGtkWhiteboard; #ifdef __cplusplus @@ -67,7 +72,7 @@ * * @return The GtkWhiteboard UI Operations. */ -GaimWhiteboardUiOps *gaim_gtk_whiteboard_get_ui_ops( void ); +GaimWhiteboardUiOps *gaim_gtk_whiteboard_get_ui_ops( void ); /*@}*/