/*
* HTML document generation
*
* 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_UTILS_HTML_H
#define MQ_UTILS_HTML_H
#include
gchar *
mq_html_document(const gchar *title, ...) G_GNUC_NULL_TERMINATED;
#define TEXT_ELEMENT(ELEM) \
gchar * \
mq_html_##ELEM(const gchar *text); \
gchar * \
mq_html_##ELEM##_free(gchar *text);
TEXT_ELEMENT(h1)
TEXT_ELEMENT(h2)
TEXT_ELEMENT(h3)
TEXT_ELEMENT(h4)
TEXT_ELEMENT(h5)
TEXT_ELEMENT(h6)
TEXT_ELEMENT(p)
#undef TEXT_ELEMENT
gchar *
mq_html_container(const gchar *element, ...) G_GNUC_NULL_TERMINATED;
gchar *
mq_html_list(const gchar *type, GDestroyNotify destroy, ...)
G_GNUC_NULL_TERMINATED;
gchar *
mq_html_list_v(const gchar *type, gchar **children);
gchar *
mq_html_notebook(gboolean vertical, const gchar *name, guint current_page, ...)
G_GNUC_NULL_TERMINATED;
gchar *
mq_html_form(const gchar *submit_label, const gchar *reset_label, ...)
G_GNUC_NULL_TERMINATED;
gchar *
mq_html_input_text(const gchar *name, const gchar *label, const gchar *value);
gchar *
mq_html_input_number_i(const gchar *name, const gchar *label,
gint min, gint step, gint max, gint value);
gchar *
mq_html_input_number_d(const gchar *name, const gchar *label,
gdouble min, gdouble step, gdouble max, gdouble value);
gchar *
mq_html_input_radio(const gchar *name, const gchar *label, gboolean checked);
gchar *
mq_html_input_checkbox(const gchar *name, const gchar *label, gboolean checked);
gchar *
mq_html_input_select(const gchar *name, const gchar *label,
const gchar *selected,
GDestroyNotify destroy_value, GDestroyNotify destroy_label, ...)
G_GNUC_NULL_TERMINATED;
gchar *
mq_html_input_iframe(const gchar *src);
#endif /* MQ_UTILS_HTML_H */