Skip to content
themixray edited this page Dec 12, 2021 · 12 revisions

This class inherits the surface class.

Create

Create window.

Close

Close window.

win.close()

Returns None

Update

Update window.

win.update(fps=-1)
  • fps Frames per second

Returns win

Title

Set title

Set window title.

win.title = title
  • title Window title

Returns None

Get title

Get window title.

win.title

Returns str

Size

Resize

Set window size.

win.size = (width, height)
  • width Window width
  • height Window height

Returns None

Get size

Get window size.

win.size

Returns tuple

Set icon

Set window icon.

win.icon(path)
  • path Path to window icon.

Returns None

Fullscreen

Toogle window fullscreen.

win.fullscreen()

Returns None

Get fps

Get window fps.

win.fps
win.rawFps

Returns int/float

Get HWND

Get window HWND.

win.hwnd

Returns int

Move

Example

Move window

win.move(x, y)
  • x Window x
  • y Window y

Returns None

Get position

Get window position

win.position

Returns tuple

Is visible

Check is window visible

win.visible

Returns bool

Hide

Hide window

win.hide()

Returns None

Show

Show window

win.show()

Returns None

Focus

Focus window

win.focus()

Returns None

Unfocus

Unfocus window

win.unfocus()

Returns None

Screenshot

Screenshot window

win.screenshot(path)
  • path Destination path

Returns str

Tray

Get window tray.

This variable will not exist if the icon is not specified when creating win.

win.tray

Returns tray

Deny drag

Prohibit dragging the window.

win.denyDrag()

Returns None

Allow drag

Allow dragging the window.

win.allowDrag()

Returns None

Clone this wiki locally