Core class for create the default Kivy window. Kivy support only one window creation. Don’t try to create more than one.
Bases: kivy.event.EventDispatcher
WindowBase is a abstract window widget, for any window implementation.
Warning
The parameters are not working in normal case. Because at import, Kivy create a default OpenGL window, to add the ability to use OpenGL directives, texture creation.. before creating Window. If you don’t like this behavior, you can include before the very first import of Kivy
import os
os.environ['KIVY_SHADOW'] = '0'
This will forbid Kivy to create the default window !
Parameters : |
|
---|---|
Events : |
|
Add a widget on window
Rotated window center
Clear the window with background color
Close the window
Will create the main window and configure it.
Warning
This method is called automatically at runtime. If you call it, it will recreate a RenderContext and Canvas. This mean you’ll have a new graphics tree, and the old one will be unusable.
This method exist to permit the creation of a new OpenGL context AFTER closing the first one. (Like using runTouchApp() and stopTouchApp()).
This method have been only tested in unittest environment, and will be not suitable for Applications.
Again, don’t use this method unless you know exactly what you are doing !
Flip between buffers
Rotated window height
Event called when the window is closed
Flip between buffers (event)
Event called when a key is down (same arguments as on_keyboard)
Event called when a key is up (same arguments as on_keyboard)
Event called when keyboard is in action
Warning
Some providers can skip scancode or unicode !!
Event called when a Motion Event is received.
Parameters : |
|
---|
Event called when mouse is in action (press/release)
Event called when mouse is moving, with buttons pressed
Event called when mouse is moving, with buttons pressed
Event called when the window is resized
Event called when the screen have been rotated
Event called when a touch is down
Event called when a touch move
Event called when a touch up
Remove a widget from window
Save the actual displayed image in a file
Rotated size of the window
Real size of the window, without taking care of the rotation
Toggle fullscreen on window
Rotated window width
Instance of a WindowBase implementation