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.
This commit is contained in:
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user