Commits

Marcus von Appen  committed af06bc6

- added sdl2.mouse.SDL_GetDefaultCursor() from SDL rev 7104

  • Participants
  • Parent commits 28f1e1e

Comments (0)

Files changed (4)

 	$(top_srcdir)/sdl2/test/resources \
 	$(top_srcdir)/sdl2/test/util \
 	$(top_srcdir)/doc \
+	$(top_srcdir)/doc/tutorial \
+	$(top_srcdir)/doc/modules \
 	$(top_srcdir)/examples
 
 INTERPRETERS = python2.7 python3.2 python3.3 pypy2.0
 	@rm -rf build dist doc/html
 
 	@for dir in $(SUBDIRS); do \
+		echo "Cleaning up in $$dir ..."; \
 		if test -f $$dir/Makefile; then \
 			make -C $$dir clean; \
-		else \
-			cd $$dir; \
-			echo "Cleaning up in $$dir..."; \
-			rm -f *~ *.cache *.core *.pyc *.orig *py.class; \
-			rm -rf __pycache__; \
-		fi \
+		fi; \
+		cd $$dir && rm -f *.cache *.core *~ MANIFEST *.pyc *.orig; \
 	done
 
 docs:
 
 testall:
 	@for interp in $(INTERPRETERS); do \
-		PYTHONPATH=$(PYTHONPATH) $$interp -B -m sdl2.test.util.runtests; \
+		PYTHONPATH=$(PYTHONPATH) $$interp -B -m sdl2.test.util.runtests || true; \
 	done
 
 # Do not run these in production environments! They are for testing
 
 testpackage:
 	@for interp in $(INTERPRETERS); do \
-		$$interp -c "import sdl2.test; sdl2.test.run()"; \
+		$$interp -c "import sdl2.test; sdl2.test.run()" || true \
 	done
 
 purge_installs:

File doc/news.rst

 -----
 Released on 2013-XX-XX.
 
-* TODO
-* TODO
+* fixed sdl2.haptic module usage for Python 3
+* sdl2 imports all submodules now
 
 0.1.0
 -----

File sdl2/mouse.py

            "SDL_WarpMouseInWindow", "SDL_SetRelativeMouseMode",
            "SDL_GetRelativeMouseMode", "SDL_CreateCursor",
            "SDL_CreateColorCursor", "SDL_CreateSystemCursor", "SDL_SetCursor",
-           "SDL_GetCursor", "SDL_FreeCursor", "SDL_ShowCursor", "SDL_BUTTON",
-           "SDL_BUTTON_LEFT", "SDL_BUTTON_MIDDLE", "SDL_BUTTON_RIGHT",
-           "SDL_BUTTON_X1", "SDL_BUTTON_X2", "SDL_BUTTON_LMASK",
-           "SDL_BUTTON_MMASK", "SDL_BUTTON_RMASK", "SDL_BUTTON_X1MASK",
-           "SDL_BUTTON_X2MASK"
+           "SDL_GetCursor", "SDL_GetDefaultCursor", "SDL_FreeCursor",
+           "SDL_ShowCursor", "SDL_BUTTON", "SDL_BUTTON_LEFT",
+           "SDL_BUTTON_MIDDLE", "SDL_BUTTON_RIGHT", "SDL_BUTTON_X1",
+           "SDL_BUTTON_X2", "SDL_BUTTON_LMASK", "SDL_BUTTON_MMASK",
+           "SDL_BUTTON_RMASK", "SDL_BUTTON_X1MASK", "SDL_BUTTON_X2MASK"
            ]
 
+
 class SDL_Cursor(Structure):
     pass
+
+
 SDL_SYSTEM_CURSOR_ARROW = 0
 SDL_SYSTEM_CURSOR_IBEAM = 1
 SDL_SYSTEM_CURSOR_WAIT = 2
 SDL_CreateSystemCursor = _bind("SDL_CreateSystemCursor", [SDL_SystemCursor], POINTER(SDL_Cursor))
 SDL_SetCursor = _bind("SDL_SetCursor", [POINTER(SDL_Cursor)])
 SDL_GetCursor = _bind("SDL_GetCursor", None, POINTER(SDL_Cursor))
+SDL_GetDefaultCursor = _bind("SDL_GetDefaultCursor", None, POINTER(SDL_Cursor))
 SDL_FreeCursor = _bind("SDL_FreeCursor", [POINTER(SDL_Cursor)])
 SDL_ShowCursor = _bind("SDL_ShowCursor", [c_int], c_int)
 SDL_BUTTON = lambda X: (1 << ((X) - 1))

File sdl2/test/mouse_test.py

+import sys
+import os
+import unittest
+from ctypes import c_int, byref
+from .. import mouse
+
+
+@unittest.skip("not implemented")
+class SDLMouseTest(unittest.TestCase):
+    __tags__ = ["sdl"]
+
+    def setUp(self):
+        pass
+
+    def tearDown(self):
+        pass
+
+    def test_SDL_GetMouseFocus(self):
+        pass
+
+    def test_SDL_GetMouseState(self):
+        pass
+
+    def test_SDL_GetRelativeMouseState(self):
+        pass
+
+    def test_SDL_WarpMouseInWindow(self):
+        pass
+
+    def test_SDL_GetSetRelativeMouseMode(self):
+        pass
+
+    def test_SDL_CreateFreeCursor(self):
+        pass
+
+    def test_SDL_CreateColorCursor(self):
+        pass
+
+    def test_SDL_CreateSystemCursor(self):
+        pass
+
+    def test_SDL_GetSetCursor(self):
+        pass
+
+    def test_SDL_GetDefaultCursor(self):
+        pass
+
+    def test_SDL_ShowCursor(self):
+        pass
+
+
+if __name__ == '__main__':
+    sys.exit(unittest.main())