Commit graph

9 commits

Author SHA1 Message Date
Daniel Eklöf
ed86061532 particle: refactor 2018-12-29 17:04:39 +01:00
Daniel Eklöf
620017860e particle: handle ON_MOUSE_CLICK
If a particle has an on-click handler, execute it when we receive an
ON_MOUSE_CLICK event.

This is done by first tokenizing the command string. We currently
handle one level of quotes, but no escape characters.

Then, fork(). Main process waits for child to finish. Child daemonizes
and then execvp() the tokenized argument vector.
2018-12-29 16:24:22 +01:00
Daniel Eklöf
cecab625ac particle: implement a default on_mouse handler
Which changes the cursor to a hand when there's a non-NULL on-click
handler.
2018-12-29 14:40:45 +01:00
Daniel Eklöf
5164d1d6ea particle: add an 'on_click_template' to base constructor.
This is intended to be a format-like string, with the possibility to
use tag formatters.

The expanded string will later be passed to the system() call.
2018-12-29 14:36:18 +01:00
Daniel Eklöf
e8d8bf70d3 exposable: add a "common" constructor and default destructor 2018-12-29 12:51:31 +01:00
Daniel Eklöf
4d173326e4 particle: remove 'parent' (it wasn't used anyway) 2018-12-29 12:49:00 +01:00
Daniel Eklöf
1427d6a98b particle: provide a default destroy() function
This allows us to destroy the associated decoration.
2018-12-26 21:34:19 +01:00
Daniel Eklöf
f65a18b655 particle: initialize 'deco' member to NULL
Fixes valgrind warnings about uninitialized variable. This happened
for every particle that did *not* have a decoration.
2018-12-26 21:33:35 +01:00
Daniel Eklöf
8bf8a398b9 initial commit: wip 2018-11-17 11:30:33 +01:00