Hey,

I want to send a mouse event to a given window. The C code for this
would be like:

bool SendMousePress (MouseButton type, x, y) {
  GdkEvent* event = gdk_event_new(GDK_BUTTON_PRESS);
  event->button.button = type == LEFT ? 1 : (type == MIDDLE ? 2 : 3);
  event->button.x = x;
  event->button.y = y;
  ... //other event fields setting
  gdk_event_put(event);
  gdk_event_free(event);
}

The problem I have now is that though I can replace "gdk_event_new",
"gdk_event_put" and "gdk_event_free" with Gdk.EventHelper.New,
Gdk.EventHelper.Put
and Gdk.EventHelper.Free, but how can I set the event fields with
gdk-sharp? Since all properties in the Gdk.Event class are read-only.

Thank you.

-- 
B.R.
GUO Rui (Matt)
_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to