diff options
author | Thomas White <taw@physics.org> | 2019-06-09 11:51:18 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-06-09 11:51:18 +0200 |
commit | ad01f3b22f80ec9f0cc0bf4ddb18c6694c7dd80e (patch) | |
tree | d153b8e6dbc4bc244cf3ec4f9626a56d117851e9 /src/nanolight.c | |
parent | c7603ca74b3d85731c2482713e6bd0f2856ab4f3 (diff) |
Framework for DMX scanout
Diffstat (limited to 'src/nanolight.c')
-rw-r--r-- | src/nanolight.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nanolight.c b/src/nanolight.c index adebcc4..5f76dd5 100644 --- a/src/nanolight.c +++ b/src/nanolight.c @@ -34,6 +34,7 @@ #include "nanolight.h" #include "command.h" +#include "scanout.h" static void show_help(const char *s) { @@ -312,6 +313,13 @@ static gint realise_sig(GtkWidget *da, struct nanolight *nl) } +static gboolean scanout_cb(gpointer data) +{ + scanout_all((struct nanolight *)data); + return G_SOURCE_CONTINUE; +} + + int main(int argc, char *argv[]) { struct nanolight nl; @@ -352,6 +360,7 @@ int main(int argc, char *argv[]) bindtextdomain("nanolight", LOCALEDIR); textdomain("nanolight"); + /* Set up data structures */ cls.name = "Dummy fixture"; cls.n_attrs = 3; cls.attrs = attrs; @@ -380,6 +389,10 @@ int main(int argc, char *argv[]) create_fixture(&nl, &cls, "mh3", 103); create_fixture(&nl, &cls, "mh4", 154)->attr_vals[0]=255; + /* Set up output */ + g_timeout_add(100, scanout_cb, &nl); + + /* Create main window */ mainwindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_fullscreen(GTK_WINDOW(mainwindow)); g_signal_connect_swapped(G_OBJECT(mainwindow), "destroy", gtk_main_quit, NULL); |