summaryrefslogtreecommitdiff
path: root/src/nanolight.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nanolight.c')
-rw-r--r--src/nanolight.c13
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);