Module lcdproc.screen

A LCDproc screen module.

Info:

  • Copyright: denpamusic 2020
  • License: MIT
  • Author: denpamusic

Class Screen

Screen.new (server, id) create LCDproc screen
Screen:set_name (name) set screen name
Screen:set_size (width, height) set screen size
Screen:set_priority (priority) set screen priority
Screen:set_heartbeat (heartbeat) set screen heartbeat state
Screen:set_backlight (backlight) set screen backlight state
Screen:set_duration (duration) set display duration
Screen:set_timeout (timeout) set display timeout
Screen:set_cursor (cursor, x, y) set cursor state
Screen:add_string (id, x, y, text) add string widget to the screen
Screen:add_title (id, text) add title widget to the screen
Screen:add_hbar (id, x, y, length) add horizontal progress bar to the screen
Screen:add_vbar (id, x, y, length) add vertical progress bar to the screen
Screen:add_icon (id, x, y, icon) add icon to the screen
Screen:add_scroller (id, left, top, right, bottom, direction, speed, text) add scroller to the screen
Screen:add_frame (id, left, top, right, bottom, width, height, direction, speed) add frame widget to the screen
Screen:add_number (id, x, number) add number widget to the screen
Screen:del_widget (id) remove widget from the screen


Class Screen

LCDproc Screen class.
Screen.new (server, id)
create LCDproc screen

Parameters:

  • server LCDproc LCDproc server instance
  • id string screen id

Returns:

  1. Screen the new screen
  2. string error description
Screen:set_name (name)
set screen name

Parameters:

  • name string screen name to set

Returns:

  1. string response from LCDproc server
  2. string error description
Screen:set_size (width, height)
set screen size

Parameters:

  • width int screen width
  • height int screen height

Returns:

  1. string response from LCDproc server
  2. string error description
Screen:set_priority (priority)
set screen priority

Parameters:

  • priority string screen priority

Returns:

  1. string response from LCDproc server
  2. string error description
Screen:set_heartbeat (heartbeat)
set screen heartbeat state

Parameters:

  • heartbeat string screen heartbeat state

Returns:

  1. string response from LCDproc server
  2. string error description
Screen:set_backlight (backlight)
set screen backlight state

Parameters:

  • backlight string screen backlight state

Returns:

  1. string response from LCDproc server
  2. string error description
Screen:set_duration (duration)
set display duration

Parameters:

  • duration int display screen for this amount of seconds in rotation

Returns:

  1. string response from LCDproc server
  2. string error description
Screen:set_timeout (timeout)
set display timeout

Parameters:

  • timeout int display screen for this amount of seconds

Returns:

  1. string response from LCDproc server
  2. string error description
Screen:set_cursor (cursor, x, y)
set cursor state

Parameters:

  • cursor string new cursor state
  • x int cursor horizontal position
  • y int cursor vertical position

Returns:

  1. string response from LCDproc server
  2. string error description
Screen:add_string (id, x, y, text)
add string widget to the screen

Parameters:

  • id string widget id
  • x int horizontal position
  • y int vertical position
  • text string widget text

Returns:

    widgets.String the new string widget
Screen:add_title (id, text)
add title widget to the screen

Parameters:

Returns:

    widgets.Title the new title widget
Screen:add_hbar (id, x, y, length)
add horizontal progress bar to the screen

Parameters:

  • id string widget id
  • x int horizontal position
  • y int vertical position
  • length int progress bar length

Returns:

    widgets.HBar the new horizontal progress bar widget
Screen:add_vbar (id, x, y, length)
add vertical progress bar to the screen

Parameters:

  • id string widget id
  • x int horizontal position
  • y int vertical position
  • length int progress bar length

Returns:

    widgets.VBar the new vertical progress bar widget
Screen:add_icon (id, x, y, icon)
add icon to the screen

Parameters:

  • id string widget id
  • x int horizontal position
  • y int vertical position
  • icon string icon name

Returns:

    widgets.Icon the new icon widget
Screen:add_scroller (id, left, top, right, bottom, direction, speed, text)
add scroller to the screen

Parameters:

  • id string widget id
  • left int left side position
  • top int top side position
  • right int right side position
  • bottom int bottom side position
  • direction string scroll direction (h, v, m)
  • speed int scroll speed
  • text string scroller text

Returns:

    widgets.Scroller the new scroller widget
Screen:add_frame (id, left, top, right, bottom, width, height, direction, speed)
add frame widget to the screen

Parameters:

  • id string widget id
  • left int left side position
  • top int top side position
  • right int right side position
  • bottom int bottom side position
  • width int frame width
  • height int frame height
  • direction string scroll direction (h, v)
  • speed int scroll speed

Returns:

    widgets.Frame the new frame widget
Screen:add_number (id, x, number)
add number widget to the screen

Parameters:

  • id string widget id
  • x int horizontal position
  • number int (0-9, 10 is semicolon)

Returns:

    widgets.Number the new number widget
Screen:del_widget (id)
remove widget from the screen

Parameters:

  • id widget id
generated by LDoc 1.4.6 Last updated 2020-05-09 12:37:17