summaryrefslogtreecommitdiff
path: root/libmetacity
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-01-27 21:10:00 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-01-27 21:10:00 +0200
commit4bba06c8a0fe176375c8bf73f49f975ff9816418 (patch)
tree7462e6a8ce596821ce4c9ac9623eb6c99a0a35df /libmetacity
parentdecc57d085099c1c42a8646a2327f7efbbb56224 (diff)
downloadmetacity-4bba06c8a0fe176375c8bf73f49f975ff9816418.tar.gz
theme: move MetaThemeError to libmetacity
Diffstat (limited to 'libmetacity')
-rw-r--r--libmetacity/Makefile.am2
-rw-r--r--libmetacity/meta-theme.c33
-rw-r--r--libmetacity/meta-theme.h62
3 files changed, 97 insertions, 0 deletions
diff --git a/libmetacity/Makefile.am b/libmetacity/Makefile.am
index d556b96a..117c410f 100644
--- a/libmetacity/Makefile.am
+++ b/libmetacity/Makefile.am
@@ -5,6 +5,8 @@ noinst_LTLIBRARIES = libmetacity.la
libmetacity_la_SOURCES = \
meta-hsla.c \
meta-hsla.h \
+ meta-theme.c \
+ meta-theme.h \
$(NULL)
libmetacity_la_CPPFLAGS = \
diff --git a/libmetacity/meta-theme.c b/libmetacity/meta-theme.c
new file mode 100644
index 00000000..39f500f2
--- /dev/null
+++ b/libmetacity/meta-theme.c
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2016 Alberts Muktupāvels
+ *
+ * This program 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include "meta-theme.h"
+
+/**
+ * meta_theme_error_quark:
+ *
+ * Domain for #MetaThemeError errors.
+ *
+ * Returns: the #GQuark identifying the #MetaThemeError domain.
+ */
+GQuark
+meta_theme_error_quark (void)
+{
+ return g_quark_from_static_string ("meta-theme-error-quark");
+}
diff --git a/libmetacity/meta-theme.h b/libmetacity/meta-theme.h
new file mode 100644
index 00000000..303fe2a9
--- /dev/null
+++ b/libmetacity/meta-theme.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2001 Havoc Pennington
+ * Copyright (C) 2016 Alberts Muktupāvels
+ *
+ * This program 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef META_THEME_H
+#define META_THEME_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+/**
+ * META_THEME_ERROR:
+ *
+ * Domain for #MetaThemeError errors.
+ */
+#define META_THEME_ERROR (meta_theme_error_quark ())
+
+/**
+ * MetaThemeError:
+ * @META_THEME_ERROR_TOO_OLD:
+ * @META_THEME_ERROR_FRAME_GEOMETRY:
+ * @META_THEME_ERROR_BAD_CHARACTER:
+ * @META_THEME_ERROR_BAD_PARENS:
+ * @META_THEME_ERROR_UNKNOWN_VARIABLE:
+ * @META_THEME_ERROR_DIVIDE_BY_ZERO:
+ * @META_THEME_ERROR_MOD_ON_FLOAT:
+ * @META_THEME_ERROR_FAILED:
+ *
+ * Error codes for %META_THEME_ERROR.
+ */
+typedef enum
+{
+ META_THEME_ERROR_TOO_OLD,
+ META_THEME_ERROR_FRAME_GEOMETRY,
+ META_THEME_ERROR_BAD_CHARACTER,
+ META_THEME_ERROR_BAD_PARENS,
+ META_THEME_ERROR_UNKNOWN_VARIABLE,
+ META_THEME_ERROR_DIVIDE_BY_ZERO,
+ META_THEME_ERROR_MOD_ON_FLOAT,
+ META_THEME_ERROR_FAILED
+} MetaThemeError;
+
+GQuark meta_theme_error_quark (void);
+
+G_END_DECLS
+
+#endif