A couple of questions



Hi folks,

Just need to pick your brains about somethings!

I've got this few lines of code scattered around in my code (in this
order)....

  gtk_signal_emit_by_name(GTK_OBJECT(w_layout[current].drawing_area),
"expose_event", GINT_TO_POINTER(current));

static void expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer
current_ptr)
{
  gint current=GPOINTER_TO_INT(current_ptr);
  gdk_draw_pixmap(widget->window,
widget->style->fg_gc[GTK_WIDGET_STATE(widget)],
                  w_layout[current].drawing_pixmap, 0, 0, 0, 0,
                  w_layout[current].width, w_layout[current].height);
}

  gtk_signal_connect(GTK_OBJECT(w_layout[current].drawing_area),
"expose_event", GTK_SIGNAL_FUNC(expose_event), GINT_TO_POINTER(current));

When the gtk_signal_emit_by_name() is called, I get this warning:

Gtk-WARNING **: gtk_signal_collect_params(): invalid NULL pointer for return
argument type `gboolean'

Any ideas?

On a second similar-ish front, if I've got this:

  gtk_signal_connect(GTK_OBJECT(w_layout[i].drawing_area),
"button_press_event", (GtkSignalFunc) button_press_event,
GINT_TO_POINTER(i));

to detect mouse clicks. Is there anyway I can tell if the shift button was
being held down at the same time as the click????

Ta folks!!

Rich





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]