[GB.SDL2]
* NEW: Window.Grabbed is a new property that return or set if the mouse is confined to the window. git-svn-id: svn://localhost/gambas/trunk@8062 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
93ed4cd697
commit
c19fd1bd29
@ -579,6 +579,15 @@ BEGIN_PROPERTY(Window_Border)
|
||||
END_PROPERTY
|
||||
#endif
|
||||
|
||||
BEGIN_PROPERTY(Window_Grabbed)
|
||||
|
||||
if (READ_PROPERTY)
|
||||
GB.ReturnBoolean(SDL_GetWindowGrab(WINDOW));
|
||||
else
|
||||
SDL_SetWindowGrab(WINDOW, VPROP(GB_BOOLEAN));
|
||||
|
||||
END_PROPERTY
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
GB_DESC WindowDesc[] =
|
||||
@ -615,6 +624,8 @@ GB_DESC WindowDesc[] =
|
||||
GB_PROPERTY("Text", "s", Window_Text),
|
||||
GB_PROPERTY("Title", "s", Window_Text),
|
||||
|
||||
GB_PROPERTY("Grabbed", "b", Window_Grabbed),
|
||||
|
||||
GB_EVENT("Open", NULL, NULL, &EVENT_Open),
|
||||
GB_EVENT("Close", NULL, NULL, &EVENT_Close),
|
||||
GB_EVENT("Show", NULL, NULL, &EVENT_Show),
|
||||
@ -645,7 +656,6 @@ GB_DESC WindowDesc[] =
|
||||
|
||||
GB_PROPERTY_READ("Handle", "i", CWINDOW_id),
|
||||
GB_PROPERTY_READ("Id", "i", CWINDOW_id),
|
||||
GB_PROPERTY("Grabbed", "b", Window_Grabbed),
|
||||
|
||||
GB_EVENT("Activate", NULL, NULL, &EVENT_Activate),
|
||||
GB_EVENT("Deactivate", NULL, NULL, &EVENT_Deactivate),
|
||||
|
Loading…
x
Reference in New Issue
Block a user