Tests About Natural Selection In Virtual Environment
c
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

event.h 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. Copyright (C) 2011 Weber Yann, Schuck Clement
  3. This file is part of Tansive.
  4. Tansive is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. Tansive is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with Tansive. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #ifndef _EVENT_H
  16. #define _EVENT_H
  17. #include<SDL/SDL.h>
  18. #include<stdlib.h>
  19. #include<pthread.h>
  20. #include"config.h"
  21. /*
  22. event.h :
  23. SDL event management.
  24. */
  25. //Store the parameters for the thread
  26. typedef struct _t_param_thread_event
  27. {
  28. char *again;
  29. int *x;
  30. int *y;
  31. int *mx;
  32. int *my;
  33. int *x_resol;
  34. int *y_resol;
  35. int *zoom;
  36. pthread_mutex_t* mutex;
  37. }t_param_thread_event;
  38. //Thread function for SDL events handling
  39. void* event_catcher_loop(void* arg);
  40. #endif