summaryrefslogtreecommitdiff
path: root/libmetacity
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-01-28 17:15:44 +0200
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-01-28 17:15:44 +0200
commit636cee54d4ad58cd5ca4ed698d8e237c1887c69f (patch)
tree1c1b3a9ee3e73c35771407c173b07a59ada07abb /libmetacity
parent79fc442f5e0c267f01440fa25ce1c148415dbe32 (diff)
downloadmetacity-636cee54d4ad58cd5ca4ed698d8e237c1887c69f.tar.gz
move MetaFrameBorders to libmetacity
Diffstat (limited to 'libmetacity')
-rw-r--r--libmetacity/Makefile.am3
-rw-r--r--libmetacity/meta-frame-borders.c29
-rw-r--r--libmetacity/meta-frame-borders.h42
3 files changed, 74 insertions, 0 deletions
diff --git a/libmetacity/Makefile.am b/libmetacity/Makefile.am
index 1f82c1d8..14187b48 100644
--- a/libmetacity/Makefile.am
+++ b/libmetacity/Makefile.am
@@ -8,6 +8,8 @@ libmetacity_la_SOURCES = \
meta-color-private.h \
meta-color-spec.c \
meta-color-spec.h \
+ meta-frame-borders.c \
+ meta-frame-borders.h \
meta-gradient.c \
meta-gradient.h \
meta-gradient-private.h \
@@ -49,6 +51,7 @@ libmetacity_includedir = $(includedir)/metacity/libmetacity
libmetacity_include_HEADERS = \
meta-color.h \
meta-color-spec.h \
+ meta-frame-borders.h \
meta-gradient.h \
meta-gradient-spec.h \
meta-theme.h \
diff --git a/libmetacity/meta-frame-borders.c b/libmetacity/meta-frame-borders.c
new file mode 100644
index 00000000..603ae858
--- /dev/null
+++ b/libmetacity/meta-frame-borders.c
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2001 Havoc Pennington
+ *
+ * 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-frame-borders.h"
+
+void
+meta_frame_borders_clear (MetaFrameBorders *self)
+{
+ self->visible.top = self->invisible.top = self->total.top = 0;
+ self->visible.bottom = self->invisible.bottom = self->total.bottom = 0;
+ self->visible.left = self->invisible.left = self->total.left = 0;
+ self->visible.right = self->invisible.right = self->total.right = 0;
+}
diff --git a/libmetacity/meta-frame-borders.h b/libmetacity/meta-frame-borders.h
new file mode 100644
index 00000000..71df5e8c
--- /dev/null
+++ b/libmetacity/meta-frame-borders.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2001 Havoc Pennington
+ *
+ * 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_FRAME_BORDERS_H
+#define META_FRAME_BORDERS_H
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+typedef struct
+{
+ /* The frame border is made up of two pieces - an inner visible portion
+ * and an outer portion that is invisible but responds to events.
+ */
+ GtkBorder visible;
+ GtkBorder invisible;
+
+ /* For convenience, we have a "total" border which is equal to the sum
+ * of the two borders above. */
+ GtkBorder total;
+} MetaFrameBorders;
+
+void meta_frame_borders_clear (MetaFrameBorders *self);
+
+G_END_DECLS
+
+#endif