Commit graph

1252 commits

Author SHA1 Message Date
Sam Lantinga
7c463932c2 Merged Eli's Google Summer of Code work from SDL-gsoc2010-shaped_windows
--HG--
rename : VisualC/SDL.sln => VisualC/SDL_VS2005.sln
2010-08-22 13:45:56 -07:00
Sam Lantinga
1f8dacabd7 Merged Daniel's Google Summer of Code work from SDL-gsoc2010_IME 2010-08-22 12:39:27 -07:00
Sam Lantinga
238acbd53d Merged Jim's Google Summer of Code work from SDL-gsoc2010_gesture 2010-08-22 12:07:55 -07:00
Sam Lantinga
9b8ec5c66a Don't need to use strlen() to determine if there's text.
Use the SDL safe strcpy() function
2010-08-22 11:56:07 -07:00
egottlieb
781d130602 Raised binarization cutoff to eliminate alpha-blending of trollface. 2010-08-16 09:55:35 -04:00
Eli Gottlieb
61aae3b891 Added last test shape. Because. 2010-08-15 21:46:46 -04:00
Jim Grandpre
794c5cb3ee Added README.touch and README.gesture. Moved touchtest/gestureSDLTest to test/testgesture 2010-08-15 00:36:28 -04:00
egottlieb
4e4cb86ffe Finally got the Win32 API code for shaping to work! Just need to fix SDL_CalculateShapeTree() now! 2010-08-14 16:14:36 -04:00
Jjgod Jiang
43cd4e54ac Fix for deleting the last uncommit character 2010-08-12 16:00:47 +02:00
egottlieb
1b9202537c Updated shapes folder. 2010-08-09 16:26:45 -04:00
egottlieb
cd2d456d46 Fixed lots of little bugs in Win32 shaping and in SDL_CalculateShapeTree(). Still not actually showing anything on Windows, though there's no crashes and everything compiles fine. Bugger. 2010-08-06 20:22:14 -04:00
egottlieb
c95526b7ce Improving Cocoa implementation and fixed a small bug in SDL_shape.c. 2010-08-05 18:58:45 -04:00
Eli Gottlieb
6c23f8c602 Fixed a couple of bugs in the general and X11 shape code, and fixed a bug in testshape that was keeping it from recognizing surfaces without alpha. Thanks to Andreas's bit-bashing tip, X11 shaped windows now work entirely, AFAICT. 2010-08-01 21:10:42 -04:00
Eli Gottlieb
0e0ad58e1f Added Andreas's VS2010 patch for testshape. 2010-07-30 18:04:21 -04:00
Sam Lantinga
a57835d4af Added missing pixel format 2010-07-28 01:32:39 -07:00
Eli Gottlieb
3433f10279 Added shapes folder to hg. 2010-07-26 21:49:32 -04:00
Eli Gottlieb
155833dd81 Rejiggering the way shaped windows are created as preparation for OS X implementation. Fixed overdrive bug in test program that appears to have been introduced by someone other than myself. 2010-07-26 17:27:04 -04:00
dewyatt
cae6f1376d Correctly draw cursor based on position.
Had to add UTF-8 functions utf8_length, utf8_next, utf8_advance.
2010-07-25 13:17:31 -04:00
dewyatt
1d79a9b5d8 Changed markedText to have its own storage to resolve multiple bugs.
Changed an odd strcpy to a more appropriate strcat.
2010-07-24 20:48:50 -04:00
Eli Gottlieb
6cc1b97fc5 More work on color-key mode. 2010-07-23 01:48:42 -04:00
Sam Lantinga
0e59ffc802 Added support for keyboard repeat (only tested on Windows so far) 2010-07-20 23:25:24 -07:00
Eli Gottlieb
2d0aeb3f2e Put the render loop back in its right place, but with delaying functionality to keep it down to roughly 60fps, not eating up all the X11 time. 2010-07-19 00:24:02 -04:00
Eli Gottlieb
e2dcaac803 Boxed up the rendering loop and turned it into a redraw/update function. This makes things way more responsive, usable again. 2010-07-18 23:51:47 -04:00
Eli Gottlieb
60b401aef8 Added code to make testshape switch shapes on keystrokes and exit on an ESC keystroke. 2010-07-18 23:36:39 -04:00
Eli Gottlieb
70ad6fd4e9 Minor bugfixes. testshape now draws a shaped window with bizarre, pixellated gashes of transparency across it, and in doing so seems to hog a system resource and slow the rest of the video system down. 2010-07-18 23:05:40 -04:00
Eli Gottlieb
68fccc096b Same place as before, but optimizing a bit to try to isolate the spot in the program that locks things up. 2010-07-18 22:17:52 -04:00
Eli Gottlieb
86f3a25266 Rewrote test program for shaped windows. It definitely displays recognizable pictures now, but the resizing and shaping functionality isn't behaving correctly, possibly due to a miscalculation of alpha values. 2010-07-18 21:31:22 -04:00
Eli Gottlieb
7e104c5469 Updated testeyes.c. It now shows some kind of gibberish Missingno-type picture somewhere on the screen and, possibly, hangs the window system. On the upside, the Missingno is definitely a non-rectangular window. 2010-07-18 15:15:05 -04:00
Sam Lantinga
c1eb1e8f25 Added support for testing window manager icons 2010-07-14 21:25:15 -07:00
Sam Lantinga
51b5767091 Added test case for maximize code 2010-07-13 23:05:14 -07:00
Eli Gottlieb
20c4883dee Numerous bug fixes that keep testeyes from crashing and dying. 2010-07-14 00:49:28 -04:00
Ryan C. Gordon
e9eaf8d58d Removed compiled testeyes from revision control. Added it to ignore list. 2010-07-13 02:27:59 -04:00
Sam Lantinga
ff0ba0afa5 Added an event when the clipboard is updated, triggered after the window gains the keyboard focus. 2010-07-08 22:54:03 -07:00
Sam Lantinga
b75fc9b1a1 Added simple clipboard test 2010-07-08 00:00:07 -07:00
Eli Gottlieb
9f24e9f619 Updated test code, updated win32 code a bit (still not complete, but hopefully tonight), and removed the last vestiges of ellipse and polygon drawing support. 2010-07-06 22:05:22 -04:00
Sam Lantinga
8145b50223 Merged changes from default 2010-07-05 22:48:35 -07:00
Sam Lantinga
8cafde92ae Removed obsolete test program. Ryan may resurrect it when the new multi-mouse code is implemented. 2010-07-05 22:45:45 -07:00
Sam Lantinga
baf073e263 Fixed usage message - it shouldn't have a printf format specifier 2010-07-05 22:45:15 -07:00
Sam Lantinga
e03c43c49b Fixed revision type for SDL 1.3 2010-07-05 13:10:47 -07:00
Eli Gottlieb
caf743a102 Moved the SDL_Eyes test program for shaped windows into the Hg repository and got it building and linking as a test. 2010-05-31 21:23:06 -04:00
Sam Lantinga
338f95eb06 Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API.
Plus, this lets me start implementing cursor support.
2010-05-09 20:47:22 -07:00
Eric Wing
6c9da257a1 Refactored automated rwops tests so read and write directories can be more easily customized.
The refactored tests were written in recognition that Mac and iPhone current working directories are usually not going to work. Resource directories are in bundles and write directories are restricted to certain areas. In theory, other platforms may have this problem too, hence the refactoring.

Also updated the Xcode iPhone project to use 3.2 as the Base SDK, but 3.1 as the Deployment SDK (for iPhone/iPad compatibility.)

--HG--
rename : test/automated/rwops/Test_rwopsbundlesupport.h => test/automated/rwops/TestSupportRWops.h
rename : test/automated/rwops/Test_rwopsbundlesupport.m => test/automated/rwops/TestSupportRWops_Cocoa.m
2010-05-09 06:58:30 -07:00
Eric Wing
1a24b61487 Exempted writable modes from bundle check on OS X since bundle areas are typically read-only. 2010-05-08 04:52:17 -07:00
Eric Wing
95cc075a21 Added automated test to Xcode project plus needed changes to SDL_RWFromFile to be OS X bundle aware.
The Mac OS X project has a new target called testsdl which builds the automated test. I looked at using Xcode's native unit test support, but the impedance mismatch between the existing automated test structure and Apple's was more than I could handle.

As such, the testsdl application is a full blown proper OS X application, which means it is a self-contained .app bundle. This immediately revealed some problems from the automated test. The largest problem was the assumption about the current working directory and where to find resources. (I suspect Windows may have a similar problem depending on circumstance.) To open resources, the test was looking in directories relative to the SDL source directory, but this will not work well with self-contained .app bundles and Xcode which can place its built applications almost anywhere. And for real-world situations, this is pretty useless anyway.

So I modified SDL_RWFromFile to do special things on OS X. First, it will look for a file in the .app bundle. If not found, it will fallback and just call fopen as it used to do.

I also had to modify the automated test itself because it had a contrieved test which called fopen directly to do read from an existing FILE pointer. In addition, there was a write test. Since a .app bundle is likely going to be read-only, I added a special case for OS X to write to NSTemporaryDirectory.

I expect these changes should work for both Mac and iPhone OS (which includes iPad).

I will update the iPhone Xcode project next.

Finally, FYI, the X11 automated test seems to be failing. Below is my output.


Pending breakpoint 4 - "-[NSException raise]" resolved
Platform : All tests successful (2)
SDL_RWops : All tests successful (5)
Rect : All tests successful (1)
SDL_Surface : All tests successful (6)
Rendering with cocoa driver : All tests successful (3)
Assert Failed!
   Blit output not the same.
   Test Case 'Renderer x11'
   Test Suite 'Rendering with x11 driver'
   Last SDL error ''
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSGetSurfaceBounds
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Sat May  8 00:30:34 iMacAL.local testsdl[71586] <Error>: kCGErrorIllegalArgument: CGSBindSurface: Invalid window 0xa150
Rendering with x11 driver : Failed 1 out of 4 testcases!
Rendering with dummy driver : All tests successful (3)
SDL_Audio : All tests successful (1)
Tests run with SDL 1.3.0 revision 1095906
System is running Mac OS X and is little endian
2010-05-08 00:54:22 -07:00
Sam Lantinga
1fb2a69487 General improvements for user custom event registration
* Switched event type to enum (int32)
* Switched polling by mask to polling by type range
* Added SDL_RegisterEvents() to allow dynamic user event registration
* Spread events out to allow inserting new related events without breaking binary compatibility
* Added padding to event structures so they're the same size regardless of 32-bit compiler structure packing settings
* Split SDL_HasEvent() to SDL_HasEvent() for a single event and SDL_HasEvents() for a range of events
* Added SDL_GetEventState() as a shortcut for SDL_EventState(X, SDL_QUERY)
* Added SDL_FlushEvent() and SDL_FlushEvents() to clear events from the event queue
2010-03-25 01:08:26 -07:00
Ryan C. Gordon
07cc73d801 Changed revision details to be a string (an hg changeset) instead of an int. 2010-02-28 02:07:40 -05:00
Sam Lantinga
5392fa233c Fixed compile warning on 64-bit Mac OS X
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404440
2010-01-21 07:22:11 +00:00
Sam Lantinga
a0e019f786 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404438
2010-01-21 06:21:52 +00:00
Sam Lantinga
d7496843fc Fixed compiler warnings on 32-bit Linux
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404437
2010-01-21 05:49:41 +00:00
Sam Lantinga
c47e208c6b Moved the assertion tests to testplatform
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404414
2010-01-13 09:48:42 +00:00