The wApp object represents the application itself. It allow only one instance for a thread. For convenience, wTypes, wColors, and wKeyCodes are exported by this module automatically. The users don't need to import these three modules directly.
Consts
wEvent_AppQuit = 32785
wEvent_WindowUnregister = 32786
Procs
proc addMessageLoopHook(self: wApp; hookProc: wMessageLoopHookProc) {...}{.raises: [], tags: [].}
- Add hook procedure to app's message loop. The definition of wMessageLoopHookProc is in wTypes.
proc removeMessageLoopHook(self: wApp; hookProc: wMessageLoopHookProc) {...}{.raises: [], tags: [].}
- Remove hook procedure to app's message loop.
proc setMessageLoopWait(self: wApp; flag = true) {...}{.inline, raises: [], tags: [].}
- If set to false, the message loop won't wait for next message. It means the hook procedure will be called very frequently. By default (flag = true), it only be called when a message is coming.
proc getMessageLoopWait(self: wApp): bool {...}{.inline, raises: [], tags: [].}
- Gets the current setting.
proc App(dpiAware: wDpiAware = wNoDpiAware): wApp {...}{.discardable, raises: [], tags: [RootEffect].}
- Constructor. Sets the default DPI awareness by dpiAware.
proc mainLoop(self: wApp): int {...}{.discardable, raises: [Exception], tags: [RootEffect].}
- Execute the main GUI event loop. The loop will exit after all top-level windows is deleted.
proc broadcastTopLevelMessage(self: wApp; msg: UINT; wParam: wWparam; lParam: wLparam) {...}{. raises: [], tags: [].}
- Broadcast a event to all toplevel windows.
proc broadcastMessage(self: wApp; msg: UINT; wParam: wWparam; lParam: wLparam) {...}{. raises: [], tags: [].}
- Broadcast a event to all windows.