lcd4linux:plugin_event
Inhaltsverzeichnis
event plugin
Normally a widget is updated by its own timer (the update entry). Named events are a second way: a text widget with an event entry is updated whenever the event with this name is triggered.
Events are triggered
- by the function event::trigger() of this plugin, and
- by the DBus plugin, when a D-Bus signal arrives.
Functions
| event::trigger(name) | trigger the event name: all text widgets that have event 'name' are updated immediately. The return value has no meaning. |
Example
The text widget Status is not updated by a timer, but only when a key is pressed:
Widget Status {
class 'Text'
expression file::readline('/tmp/status', 1)
width 20
event 'refresh'
}
Widget RefreshKey {
class 'Keypad'
position 'confirm'
state 'pressed'
expression event::trigger('refresh')
}
Layout Default {
Row1 {
Col1 'Status'
}
Keypad1 'RefreshKey'
}
See the text widget for the details of the event entry.
Requirements
No external libraries. The plugin is selected at build time with –with-plugins=event (it is part of 'all').
lcd4linux/plugin_event.txt · Zuletzt geändert: von 127.0.0.1
