gsx.c 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*!
  2. \file lib/ogsf/gsx.c
  3. \brief OGSF library - loading and manipulating surfaces
  4. GRASS OpenGL gsurf OGSF Library
  5. (C) 1999-2008 by the GRASS Development Team
  6. This program is free software under the
  7. GNU General Public License (>=v2).
  8. Read the file COPYING that comes with GRASS
  9. for details.
  10. \author Bill Brown USACERL (December 1993)
  11. \author Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)
  12. */
  13. #include <grass/ogsf.h>
  14. void (*Cxl_func) ();
  15. void (*Swap_func) ();
  16. static int Cxl = 0;
  17. /*!
  18. \brief Check for cancel
  19. \return code
  20. */
  21. int GS_check_cancel(void)
  22. {
  23. Cxl_func();
  24. return (Cxl);
  25. }
  26. /*!
  27. \brief Set cancel
  28. */
  29. void GS_set_cancel(int c)
  30. {
  31. Cxl = c;
  32. return;
  33. }
  34. /*!
  35. \brief Set cxl function
  36. \param pointer to function
  37. */
  38. void GS_set_cxl_func(void (*f) (void))
  39. {
  40. Cxl_func = f;
  41. return;
  42. }
  43. /*!
  44. \brief Set swap function
  45. \param pointer to function
  46. */
  47. void GS_set_swap_func(void (*f) (void))
  48. {
  49. Swap_func = f;
  50. return;
  51. }