lousy.widget.common - Luakit

# Luakit Documentation / Modules / lousy.widget.common

# Module `lousy.widget.common`

Common functions for implementing widgets

## Functions

### lousy.widget.common.add_widget (widgets, widget)

Add `widget` to `widgets`, and automatically remove it when `widget` is destroyed.

#### Parameters

- widgets
  Type: table
  A table of widgets
- widget
  Type: widget
  A newly-created widget

#### Return Values

- any type
  Returns `widget`, to allow easy chaining.

### lousy.widget.common.update_widgets_on_w (widgets, w)

Update all widgets in `widgets` on the given window.

#### Parameters

- widgets
  Type: table
  A table of widgets
- w
  Type: table
  A window table

## Attribution

#### Copyright

- 2017 Aidan Holm