gsx.c 859 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. static int Cxl = 0;
  16. /*!
  17. \brief Check for cancel
  18. \return code
  19. */
  20. int GS_check_cancel(void)
  21. {
  22. Cxl_func();
  23. return (Cxl);
  24. }
  25. /*!
  26. \brief Set cancel
  27. */
  28. void GS_set_cancel(int c)
  29. {
  30. Cxl = c;
  31. return;
  32. }
  33. /*!
  34. \brief Set cxl function
  35. \param pointer to function
  36. */
  37. void GS_set_cxl_func(void (*f) (void))
  38. {
  39. Cxl_func = f;
  40. return;
  41. }