diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-09-29 13:47:08 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-09-29 13:47:08 (EDT) |
commit | 926029a1614f03a2904be37b205ff3569d50b856 (patch) | |
tree | a7ecb361538a556723f26fa4d59566879b591b49 /src/about | |
parent | 6a26d1629f92bd6807f76252842306d4146591d0 (diff) | |
download | marquee-926029a1614f03a2904be37b205ff3569d50b856.zip marquee-926029a1614f03a2904be37b205ff3569d50b856.tar.gz marquee-926029a1614f03a2904be37b205ff3569d50b856.tar.bz2 |
mq_about_marquee_response(): New function
Diffstat (limited to 'src/about')
-rw-r--r-- | src/about/local.mk | 2 | ||||
-rw-r--r-- | src/about/marquee.c | 40 | ||||
-rw-r--r-- | src/about/paths.h | 32 |
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 |