Skip to content

Latest commit

 

History

History
127 lines (71 loc) · 4.44 KB

Application.md

File metadata and controls

127 lines (71 loc) · 4.44 KB

Class lwtk.Application

Default application implementation.

Use this for standalone desktop applications. Use lwtk.love.Application for running within the LÖVE 2D game engine.

Contents

Inheritance

Constructor

  • Application(arg1, arg2)

Methods

  • Application:addStyle(additionalStyle)

  • Application:close()

  • Application:deferChanges(callback)

  • Application:getCurrentTime()

  • Application:getFontInfo(family, slant, weight, size)

  • Application:getLayoutContext()

  • Application:getScreenScale()

  • Application:hasWindows()

  • Application:newWindow(attributes)

  • Application:runEventLoop(timeout)

    Update by processing events from the window system.

    • timeout - optional float, timeout in seconds

    If timeout is given, this function will process events from the window system until the time period in seconds has elapsed or until all window objects have been closed.

    If timeout is nil or not given, this function will process events from the window system until all window objects have been closed.

  • Application:setErrorFunc(...)

  • Application:setExtensions(extensions)

  • Application:setStyle(style)

  • Application:setTimer(seconds, func, ...)

  • Application:update(timeout)

    Update by processing events from the window system.

    • timeout - optional float, timeout in seconds

    If timeout is given, this function will wait for timeout seconds until events from the window system become available. If timeout is nil or not given, this function will block indefinitely until an event occurs.

    As soon as events are available, all events in the queue are processed and this function returns true.

    If timeout is given and there are no events available after timeout seconds, this function will return false.

  • Application:_addWindow(win)

  • Application:_processAllChanges()

  • Application:_removeWindow(win)

Inherited Methods

Subclasses