Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

178 righe
5.6 KiB

  1. /*
  2. * PypyCaca libcaca Python bindings
  3. * Copyright (c) 2006 Jean-Yves Lamoureux <jylam@lnxscene.org>
  4. * All Rights Reserved
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  19. * 02111-1307 USA
  20. */
  21. /** \file pycaca.h
  22. * \version \$Id:
  23. * \author Jean-Yves Lamoureux <jylam@lnxscene.org>
  24. * \brief Main \e pypycaca bindings definitions
  25. *
  26. * This file contains functions prototypes for python bindings
  27. */
  28. #include <Python.h>
  29. #include <caca.h>
  30. #define SET_INTCONSTANT(dict, value) \
  31. PyDict_SetItemString(dict, #value, PyInt_FromLong((long) value))
  32. PyMODINIT_FUNC initcaca(void);
  33. /* Basic functions */
  34. static PyObject *
  35. pycaca_init(PyObject *self, PyObject *args);
  36. static PyObject *
  37. pycaca_set_delay(PyObject *self, PyObject *args);
  38. static PyObject *
  39. pycaca_get_rendertime(PyObject *self, PyObject *args);
  40. static PyObject *
  41. pycaca_get_width(PyObject *self, PyObject *args);
  42. static PyObject *
  43. pycaca_get_height(PyObject *self, PyObject *args);
  44. static PyObject *
  45. pycaca_set_size(PyObject *self, PyObject *args);
  46. static PyObject *
  47. pycaca_set_width(PyObject *self, PyObject *args);
  48. static PyObject *
  49. pycaca_set_height(PyObject *self, PyObject *args);
  50. static PyObject *
  51. pycaca_set_window_title(PyObject *self, PyObject *args);
  52. static PyObject *
  53. pycaca_get_window_width(PyObject *self, PyObject *args);
  54. static PyObject *
  55. pycaca_get_window_height(PyObject *self, PyObject *args);
  56. static PyObject *
  57. pycaca_refresh(PyObject *self, PyObject *args);
  58. static PyObject *
  59. pycaca_end(PyObject *self, PyObject *args);
  60. static PyObject *
  61. pycaca_get_feature(PyObject *self, PyObject *args);
  62. static PyObject *
  63. pycaca_set_feature(PyObject *self, PyObject *args);
  64. static PyObject *
  65. pycaca_get_feature_name(PyObject *self, PyObject *args);
  66. /* Event handling */
  67. static PyObject *
  68. pycaca_get_event(PyObject *self, PyObject *args);
  69. static PyObject *
  70. pycaca_wait_event(PyObject *self, PyObject *args);
  71. static PyObject *
  72. pycaca_get_mouse_x(PyObject *self, PyObject *args);
  73. static PyObject *
  74. pycaca_get_mouse_y(PyObject *self, PyObject *args);
  75. /* Primitives drawing */
  76. static PyObject *
  77. pycaca_draw_line(PyObject *self, PyObject *args);
  78. static PyObject *
  79. pycaca_draw_polyline(PyObject *self, PyObject *args);
  80. static PyObject *
  81. pycaca_draw_thin_polyline(PyObject *self, PyObject *args);
  82. static PyObject *
  83. pycaca_draw_thin_line(PyObject *self, PyObject *args);
  84. static PyObject *
  85. pycaca_draw_circle(PyObject *self, PyObject *args);
  86. static PyObject *
  87. pycaca_draw_ellipse(PyObject *self, PyObject *args);
  88. static PyObject *
  89. pycaca_draw_thin_ellipse(PyObject *self, PyObject *args);
  90. static PyObject *
  91. pycaca_fill_ellipse(PyObject *self, PyObject *args);
  92. static PyObject *
  93. pycaca_draw_box(PyObject *self, PyObject *args);
  94. static PyObject *
  95. pycaca_fill_box(PyObject *self, PyObject *args);
  96. static PyObject *
  97. pycaca_draw_thin_box(PyObject *self, PyObject *args);
  98. static PyObject *
  99. pycaca_draw_triangle(PyObject *self, PyObject *args);
  100. static PyObject *
  101. pycaca_draw_thin_triangle(PyObject *self, PyObject *args);
  102. static PyObject *
  103. pycaca_fill_triangle(PyObject *self, PyObject *args);
  104. /* Charactere drawing */
  105. static PyObject *
  106. pycaca_set_color(PyObject *self, PyObject *args);
  107. static PyObject *
  108. pycaca_get_fg_color(PyObject *self, PyObject *args);
  109. static PyObject *
  110. pycaca_get_bg_color(PyObject *self, PyObject *args);
  111. static PyObject *
  112. pycaca_get_color_name(PyObject *self, PyObject *args);
  113. static PyObject *
  114. pycaca_putchar(PyObject *self, PyObject *args);
  115. static PyObject *
  116. pycaca_putstr(PyObject *self, PyObject *args);
  117. static PyObject *
  118. pycaca_printf(PyObject *self, PyObject *args);
  119. /*static PyObject *
  120. pycaca_get_screen(PyObject *self, PyObject *args);*/
  121. static PyObject *
  122. pycaca_clear(PyObject *self, PyObject *args);
  123. /* Sprites functions */
  124. static PyObject *
  125. pycaca_load_sprite(PyObject *self, PyObject *args);
  126. static PyObject *
  127. pycaca_draw_sprite(PyObject *self, PyObject *args);
  128. static PyObject *
  129. pycaca_get_sprite_frames(PyObject *self, PyObject *args);
  130. static PyObject *
  131. pycaca_get_sprite_width(PyObject *self, PyObject *args);
  132. static PyObject *
  133. pycaca_get_sprite_height(PyObject *self, PyObject *args);
  134. static PyObject *
  135. pycaca_get_sprite_dx(PyObject *self, PyObject *args);
  136. static PyObject *
  137. pycaca_get_sprite_dy(PyObject *self, PyObject *args);
  138. static PyObject *
  139. pycaca_free_sprite(PyObject *self, PyObject *args);
  140. /* Exporters */
  141. static PyObject *
  142. pycaca_get_html(PyObject *self, PyObject *args);
  143. static PyObject *
  144. pycaca_get_html3(PyObject *self, PyObject *args);
  145. static PyObject *
  146. pycaca_get_irc(PyObject *self, PyObject *args);
  147. static PyObject *
  148. pycaca_get_ansi(PyObject *self, PyObject *args);
  149. /* Bitmap functions */
  150. static PyObject *
  151. pycaca_create_bitmap(PyObject *self, PyObject *args);
  152. static PyObject *
  153. pycaca_set_bitmap_palette(PyObject *self, PyObject *args);
  154. static PyObject *
  155. pycaca_set_bitmap_gamma(PyObject *self, PyObject *args);
  156. static PyObject *
  157. pycaca_draw_bitmap(PyObject *self, PyObject *args);
  158. static PyObject *
  159. pycaca_free_bitmap(PyObject *self, PyObject *args);