sending events to desktop



Hi,

What I want to do is to send events to the desktop i.e.

1) send mouse middle button click
2) warp down, right, down...
3) click on programs/system/Gnome terminal (that's launching the gnome
terminal)

Do I have to specify all fields in GdkEventButton structure?
What to put for window that received (?) event?

The program that produces core is:

#include <gtk/gtk.h>

int
main (int argc, char **argv)
{
  GdkEvent *event;

  event->button.type = GDK_BUTTON_PRESS;
  event->button.x_root = 100;
  event->button.y_root = 100;
  event->button.source = GDK_SOURCE_MOUSE;
  event->button.button = 3;

  gtk_main_do_event(event);

  exit(1);
}




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