Wiki Page Content

Differences between revisions 10 and 11
Revision 10 as of 2015-03-29 21:51:24
Size: 711
Comment: Added link to SDL_GetGrabbedWindow().
Revision 11 as of 2015-03-29 21:55:12
Size: 887
Comment: Updated parameter description and remarks with content from header file.
Deletions are marked like this. Additions are marked like this.
Line 16: Line 16:
||'''window'''||the window to change||
||'''grabbed'''||SDL_TRUE to grab input, SDL_FALSE to release input||
||'''window'''||the window for which the input grab mode should be set||
||'''grabbed'''||SDL_TRUE to grab input or SDL_FALSE to release input||
Line 27: Line 27:
If the caller enables a grab while another window is currently grabbed, the other window loses its grab in favor of the caller's window.

SDL_SetWindowGrab

Use this function to set a window's input grab mode.

Syntax

void SDL_SetWindowGrab(SDL_Window* window,
                       SDL_bool    grabbed)

Function Parameters

window

the window for which the input grab mode should be set

grabbed

SDL_TRUE to grab input or SDL_FALSE to release input

Code Examples

You can add your code example here

Remarks

When input is grabbed the mouse is confined to the window.

If the caller enables a grab while another window is currently grabbed, the other window loses its grab in favor of the caller's window.


CategoryAPI, CategoryVideo

None: SDL_SetWindowGrab (last edited 2015-03-29 21:55:12 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit