Posted By


whitetiger on 11/09/06

Statistics


Viewed 851 times
Favorited by 2 user(s)

Xlib - mouseMove


/ Published in: C++
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.