From 926029a1614f03a2904be37b205ff3569d50b856 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Fri, 29 Sep 2017 13:47:08 -0400 Subject: mq_about_marquee_response(): New function --- (limited to 'src/about') 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 . + */ + +#include + +#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 . + */ + +#ifndef MQ_ABOUT_PATHS_H +#define MQ_ABOUT_PATHS_H + +#include + +#include "../application.h" + +gchar * +mq_about_marquee_response(MqApplication *application, GHashTable *query); + +#endif -- cgit v0.9.1