Commit graph

90 commits

Author SHA1 Message Date
Ryan C. Gordon
2875d70eba Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
This is currently implemented for X11, Cocoa, Windows, and DirectFB.

This patch is based on work in Unreal Engine 4's fork of SDL,
compliments of Epic Games.

--HG--
extra : amend_source : 99ddce333d2a4de7d59adb88d5059b34d731d907
extra : histedit_source : 012e8cb2f7822cd55cbbc124f642ccc530e3f75b%2Cbddf95ecf18ca97e1e3d7840971ef14ca739c9da
2016-01-05 02:46:10 -05:00
Ryan C. Gordon
8afe3ca698 Added SDL_GetWindowBordersSize().
This is currently only implemented for X11.

This patch is based on work in Unreal Engine 4's fork of SDL,
compliments of Epic Games.

--HG--
extra : amend_source : dfbcf454974baeb9dea6aeee929dcecb14924e7c
extra : histedit_source : 9d688d7641ae624a1d0129796a338f4ff2b50896
2016-01-05 02:29:06 -05:00
Ryan C. Gordon
6a3cfbf68f Added SDL_GetDisplayUsableBounds().
--HG--
extra : histedit_source : 3c9c2d344e3e3ff20bd86035066b65810346ac3e
2016-01-04 23:52:40 -05:00
Sam Lantinga
7ee8dda270 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Ryan C. Gordon
03cb578e6e Added SDL_JoystickFromInstanceID() and SDL_GameControllerFromInstanceID().
--HG--
extra : amend_source : 110a5505509ddb9ecafed75abd89602986a99696
2015-11-14 12:35:45 -05:00
Sam Lantinga
834b51076e SDL - add dynapi entry points for SDL_JoystickCurrentPowerLevel 2015-09-30 15:38:18 -07:00
Alfred Reynolds
8431c71e2b Move GetDisplayDPI to the end of the file. 2015-07-29 17:19:06 -07:00
Alfred Reynolds
e26124316e Add SDL_GetDisplayDPI routine and implement for Windows. 2015-07-29 17:18:56 -07:00
Ryan C. Gordon
af2a41f99d Fixed dynapi for new SDL_WarpMouseGlobal() function signature. 2015-07-18 00:04:49 -04:00
Ryan C. Gordon
0a790ca20c SDL_WarpMouseGlobal() should return non-void.
There are platforms it isn't implemented on (and currently can't be
implemented on!), and there's currently no way for an app to know this.

This shouldn't break ABI on apps that moved to a revision between 2.0.3 and
2.0.4.

--HG--
extra : rebase_source : 289ffe9b7b92eb812f3d1421c52a561d0d37b717
2015-07-17 21:03:58 -04:00
Sam Lantinga
56b58afdbe Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Sam Lantinga
a891967b73 Added a userdata parameter to SDL_SetWindowsMessageHook() 2015-05-13 22:39:32 -07:00
Sam Lantinga
edc8e4e647 Fixed Mac and Linux builds 2015-05-13 22:39:27 -07:00
Sam Lantinga
51bfd9328e Added SDL_SetWindowsMessageHook() to facilitate full IME support on Windows 2015-05-13 22:39:20 -07:00
Ryan C. Gordon
d6ffb03a60 Minor input grab clarifications.
Clarify that grabbing the mouse only works with one window at a time; this was
always true at the system level, though SDL could previously get confused
by multiple simultaneous grabs, so now we explicitly break any existing
grab before starting a new one and document it as such.

Also track the window that is currently grabbed, and provide an API to query
for that window. This makes it easy to automate mouse ungrabbing at
breakpoints with gdb7's scripting, since the scripts can now know which window
to ungrab.

In 2.1, we should probably change this API to SDL_GrabInput(win) and
SDL_UngrabInput(void), or something.

--HG--
extra : rebase_source : c99570ccdaeb40c13fb0b00236fc77669705a189
extra : amend_source : 40993aa08816ef218bc10aa5d3a2aaa84f284240
2015-03-28 00:48:03 -04:00
Sam Lantinga
b3e4782510 Removed SDL_round() because the license wasn't compatible with zlib 2014-08-17 13:11:55 -07:00
Sam Lantinga
5acb7c63d1 Added SDL_round(), contributed by Benoit Pierre - thanks! 2014-08-16 23:23:15 -07:00
Ryan C. Gordon
a261470598 Added audio device buffer queueing API.
--HG--
extra : rebase_source : a454256d88e413a4898b5005472625f755abfad4
2014-07-22 21:41:49 -04:00
Sam Lantinga
4d8562f23f Fixed bug in AVX detection and added AVX2 detection 2014-07-11 22:02:50 -07:00
Ryan C. Gordon
b273873297 Merged Ryan's SDL-gui-backend branch.
Adds three APIs, and implements them on X11, Cocoa, and Windows:

- SDL_CaptureMouse()
- SDL_GetGlobalMouseState()
- SDL_SetWindowHitTest()
2014-06-25 17:06:12 -04:00
Ryan C. Gordon
8bd36ba18f Changed SDL_GetAbsoluteMouseState() to SDL_GetGlobalMouseState().
This matches naming conventions in the main repository, between
 SDL_GetRelativeMouseState() and SDL_WarpMouseGlobal().
2014-06-25 16:16:55 -04:00
Sam Lantinga
276b7efecd Added SDL_sqrtf(), SDL_tan(), SDL_tanf() 2014-06-07 18:20:01 -07:00
Ryan C. Gordon
c076f51669 Implemented SDL_GetAbsoluteMouseState().
X11 only for now, but this should be doable on every platform, I think.
2014-06-05 00:03:33 -04:00
Sam Lantinga
53d9d2c232 Added annotations to help code analysis tools
CR: Bruce Dawson
2014-06-04 10:56:56 -07:00
Sam Lantinga
6006d7a2cb Added an API function to warp the mouse cursor in global screen space: SDL_WarpMouseGlobal() 2014-06-04 10:55:26 -07:00
Ryan C. Gordon
9e98d09104 Changed drag area API to a hit-testing API.
There were several good arguments for this: it's how Windows works with
 WM_NCHITTEST, SDL doesn't need to manage a list of rects, it allows more
 control over the regions (how do you use rects to cleanly surround a circular
 button?), the callback can be more optimized than a iterating a list of
 rects, and you don't have to send an updated list of rects whenever the
 window resizes or layout changes.

--HG--
rename : test/testdragareas.c => test/testhittesting.c
2014-05-28 01:22:47 -04:00
Ryan C. Gordon
cce4ce44d4 First shot at SDL_SetWindowDragAreas().
Only Cocoa implemented right now.

--HG--
extra : amend_source : b178ad0ae25b933b284ed1bda89df750ddd27fb3
2014-05-27 01:27:42 -04:00
Ryan C. Gordon
67f246e568 Implemented SDL_CaptureMouse(). 2014-05-24 01:30:37 -04:00
Ryan C. Gordon
7d3359d9c4 Generated dynapi stuff for the new WinRT entry points. 2014-05-24 01:23:57 -04:00
Jørgen P. Tjernø
431aca234b Render: Allow empty cliprect.
This fixes an issue where an empty cliprect is treated the same as a NULL
cliprect, causing the render backends to disable clipping.

Also adds a new API, SDL_RenderIsClipEnabled(render) that allows you to
differentiate between:
 - SDL_RenderSetClipRect(render, NULL)
 - SDL_Rect r = {0,0,0,0}; SDL_RenderSetClipRect(render, &r);

Fixes https://bugzilla.libsdl.org/show_bug.cgi?id=2504

--HG--
extra : amend_source : 9e5ac76e3f009d9ae49bc61c350df3ba891267b5
extra : histedit_source : b92b8be4d05b19a89fa0dee57f7ed6b1e924cb99%2Cce419f6ade87bafc78ff42702c1f263d2469e7e7
2014-04-19 13:15:41 -07:00
Sam Lantinga
92e29fd71f SDL_DXGIGetOutputInfo() checks input parameters and returns a boolean value whether or not it succeeded. 2014-04-18 12:43:04 -07:00
Sam Lantinga
7922c3b3d5 Added the new function at the end so we don't break the ABI 2014-02-13 11:08:12 -08:00
Sam Lantinga
2d76dd6a5d Added SDL_DXGIGetOutputInfo which returns the adapter and output indices that are used to create DX10 and DX11 devices and swap chains on a particular display.
CR: SamL
2014-02-13 11:05:30 -08:00
Ryan C. Gordon
cd64be14c5 Added SDL_GetAssertionHandler() and SDL_GetDefaultAssertionHandler().
--HG--
extra : rebase_source : 46c4eb0b9b5aaf0f97ccf21036a0462a585b3ba8
2014-02-04 11:38:40 -05:00
Sam Lantinga
d7940a513e Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
Sam Lantinga
420a70436c Fixed bug 2376 - no SDL_HasAVX
Haneef Mubarak

AVX is the successor to SSE* and is fairly widely available. As such, it really ought to be detectable.

This functionality ought to be trivial to implement, and not having it means being forced to write an ugly workaround to check for AVX (so that normal SSE can be used if AVX is not available).

Here is an example on detecting AVX from SO (it actually shows ways to cehck for all of teh fancy instructions):

http://stackoverflow.com/questions/6121792/how-to-check-if-a-cpu-supports-the-sse3-instruction-set
2014-02-02 00:33:31 -08:00
Jørgen P. Tjernø
d17c440442 Add SDL_GL_ResetAttributes.
--HG--
extra : rebase_source : 0a6fd1c977ab93ba651adaae3fa5a71d7c69fa8e
2014-01-29 18:38:13 -08:00
Ryan C. Gordon
bd68319d23 Another Android fix. 2014-01-08 00:51:31 -05:00
Ryan C. Gordon
9340a4d2f0 Updated Dynamic API jumptable. 2014-01-08 00:46:39 -05:00
Ryan C. Gordon
63256a2384 Implemented the Dynamic API magic.
--HG--
extra : rebase_source : 38f639089d3d142895d5cf106919a0bfbb65c5ed
2013-12-09 16:03:18 -05:00