summaryrefslogtreecommitdiffstats
path: root/src/about/marquee.c
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-09-29 13:47:08 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-09-29 13:47:08 (EDT)
commit926029a1614f03a2904be37b205ff3569d50b856 (patch)
treea7ecb361538a556723f26fa4d59566879b591b49 /src/about/marquee.c
parent6a26d1629f92bd6807f76252842306d4146591d0 (diff)
downloadmarquee-926029a1614f03a2904be37b205ff3569d50b856.zip
marquee-926029a1614f03a2904be37b205ff3569d50b856.tar.gz
marquee-926029a1614f03a2904be37b205ff3569d50b856.tar.bz2
mq_about_marquee_response(): New function
Diffstat (limited to 'src/about/marquee.c')
-rw-r--r--src/about/marquee.c40
1 files changed, 40 insertions, 0 deletions
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;
+}