summaryrefslogtreecommitdiffstats
path: root/src/about
diff options
context:
space:
mode:
Diffstat (limited to 'src/about')
-rw-r--r--src/about/local.mk2
-rw-r--r--src/about/marquee.c40
-rw-r--r--src/about/paths.h32
3 files changed, 74 insertions, 0 deletions
diff --git a/src/about/local.mk b/src/about/local.mk
new file mode 100644
index 0000000..f61618b
--- /dev/null
+++ b/src/about/local.mk
@@ -0,0 +1,2 @@
+marquee_SOURCES += \
+ %reldir%/marquee.c
diff --git a/src/about/marquee.c b/src/about/marquee.c
new file mode 100644
index 0000000..cd5ab33
--- /dev/null
+++ b/src/about/marquee.c
@@ -0,0 +1,40 @@
+/*
+ * about:marquee
+ *
+ * Copyright (C) 2017 Patrick McDermott
+ *
+ * This file is part of Marquee.
+ *
+ * Marquee is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Marquee is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Marquee. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+
+#include "paths.h"
+#include "../application.h"
+
+gchar *
+mq_about_marquee_response(MqApplication *application, GHashTable *query)
+{
+ if (query && g_hash_table_lookup(query, "toggle")) {
+ if (mq_application_marquee_mode_on(application)) {
+ mq_application_marquee_mode_deactivate(application);
+ } else {
+ mq_application_marquee_mode_activate(application);
+ }
+ }
+
+ /* TODO: Respond with an HTML document with a toggle button. */
+ return NULL;
+}
diff --git a/src/about/paths.h b/src/about/paths.h
new file mode 100644
index 0000000..ec365d1
--- /dev/null
+++ b/src/about/paths.h
@@ -0,0 +1,32 @@
+/*
+ * about: URI paths
+ *
+ * Copyright (C) 2017 Patrick McDermott
+ *
+ * This file is part of Marquee.
+ *
+ * Marquee is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Marquee is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Marquee. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MQ_ABOUT_PATHS_H
+#define MQ_ABOUT_PATHS_H
+
+#include <glib.h>
+
+#include "../application.h"
+
+gchar *
+mq_about_marquee_response(MqApplication *application, GHashTable *query);
+
+#endif