frederico schardong writes:
> When I click with the mouse on the drawing area the callback
> button_pressed is called and the g_print message shows, and when I
> move the window the callback expose_event is called and shows its
> g_print. The only difference between both g_print is the first word
static gboolean
expose_event (GtkWidget *a, GdkEventButton *event, GtkDesenho *desenho)
{
guint i, x, y, tamH, tamV, x1, y1;
GdkPoint points[5];
// Loop through the coordinates, redrawing them onto the drawing area.
for (i = 0; i < desenho->parray->len; i = i + 4)
{
x =
Hi list,
I do a simples struct:
typedef struct
{
GtkWidget *window;
GtkWidget *drawingArea;
GPtrArray *parray;
gint a;
} GtkDesenho;
In main():
GtkDesenho *desenho;
desenho = g_slice_new(GtkDesenho);
desenho->window = glade_xml_get_widget(xml, "