Posted By

whitetiger on 11/09/06


Tagged

window Shell Bash unix osx c mouse linux apache MODULES administration dso ssh c2B2B cpp x x11 xlib signals


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

yuconner
copyleft


Xlib - mouseMove


 / Published in: C++
 

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. #include <X11/Xlib.h>
  5. #include <X11/Xutil.h>
  6.  
  7. void mouseMove(int x, int y)
  8. {
  9. Display *displayMain = XOpenDisplay(NULL);
  10.  
  11. if(displayMain == NULL)
  12. {
  13. fprintf(stderr, "Errore nell'apertura del Display !!!\n");
  14. exit(EXIT_FAILURE);
  15. }
  16.  
  17. XWarpPointer(displayMain, None, None, 0, 0, 0, 0, x, y);
  18.  
  19. XCloseDisplay(displayMain);
  20. }

Report this snippet  

You need to login to post a comment.