Event.Surface module

Surface global creation.

All surfaces will be added to the global.surfaces table.

This modules events should be registered after any other Init functions but before any scripts needing global.surfaces.

This modules can register the following events:

Usage

local surface = require('__stdlib__/stdlib/event/surface').register_events()

Functions

remove(event) Remove data for a surface when it is deleted.
init([event][, overwrite=false]) Init or re-init the surfaces.

Functions

# remove(event)

Remove data for a surface when it is deleted.

Parameters:
  • event : (table) event table containing the surface index
# init([event][, overwrite=false])

Init or re-init the surfaces.

Passing a nil event will iterate all existing surfaces.

Parameters: