summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@redhat.com>2009-03-17 16:53:01 -0400
committerThomas Thurman <tthurman@gnome.org>2010-01-22 12:31:20 -0500
commit0aace5230f8aec063be6606ad5e8acb93a86e3af (patch)
tree29c6c725b172a76eb105a34fbdd4879251897470 /src/include
parentf8153b84de95c0b546dd780dfce688eb94b139e5 (diff)
downloadmetacity-0aace5230f8aec063be6606ad5e8acb93a86e3af.tar.gz
metacity-0aace5230f8aec063be6606ad5e8acb93a86e3af.tar.bz2
Cleanup: split MetaSide from MetaDirection
The MetaDirection enumeration had META_SIDE_* values in it that were used in some places where an enum with only four directions was needed. Split this off into a separate enum called MetaSide and use that enum name where appropriate.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/boxes.h4
-rw-r--r--src/include/common.h11
2 files changed, 11 insertions, 4 deletions
diff --git a/src/include/boxes.h b/src/include/boxes.h
index 54b94ea9..5c76ed6 100644
--- a/src/include/boxes.h
+++ b/src/include/boxes.h
@@ -40,7 +40,7 @@ typedef struct _MetaStrut MetaStrut;
struct _MetaStrut
{
MetaRectangle rect;
- MetaDirection side;
+ MetaSide side;
};
#define BOX_LEFT(box) ((box).x) /* Leftmost pixel of rect */
@@ -66,7 +66,7 @@ typedef struct _MetaEdge MetaEdge;
struct _MetaEdge
{
MetaRectangle rect; /* width or height should be 1 */
- MetaDirection side_type; /* should only have 1 of the 4 directions set */
+ MetaSide side_type;
MetaEdgeType edge_type;
};
diff --git a/src/include/common.h b/src/include/common.h
index 9d6a98c..8463ced 100644
--- a/src/include/common.h
+++ b/src/include/common.h
@@ -231,13 +231,20 @@ typedef enum
/* A few more definitions using aliases */
META_DIRECTION_HORIZONTAL = META_DIRECTION_LEFT | META_DIRECTION_RIGHT,
META_DIRECTION_VERTICAL = META_DIRECTION_UP | META_DIRECTION_DOWN,
+} MetaDirection;
- /* And a few more aliases */
+/* Sometimes we want to talk about sides instead of directions; note
+ * that the values must be as follows or meta_window_update_struts()
+ * won't work. Using these values also is a safety blanket since
+ * MetaDirection used to be used as a side.
+ */
+typedef enum
+{
META_SIDE_LEFT = META_DIRECTION_LEFT,
META_SIDE_RIGHT = META_DIRECTION_RIGHT,
META_SIDE_TOP = META_DIRECTION_TOP,
META_SIDE_BOTTOM = META_DIRECTION_BOTTOM
-} MetaDirection;
+} MetaSide;
/* Function a window button can have. Note, you can't add stuff here
* without extending the theme format to draw a new function and