Move common types to types.h
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
3ffc0c77ed
commit
e13bc7fc51
26
src/common.h
26
src/common.h
|
@ -167,6 +167,7 @@
|
|||
#include "xrescheck.h"
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
#include "x.h"
|
||||
#include "region.h"
|
||||
|
||||
|
@ -220,7 +221,6 @@
|
|||
|
||||
// === Types ===
|
||||
|
||||
typedef uint32_t opacity_t;
|
||||
typedef long time_ms_t;
|
||||
typedef struct _c2_lptr c2_lptr_t;
|
||||
|
||||
|
@ -243,31 +243,7 @@ typedef enum {
|
|||
NUM_WINTYPES
|
||||
} wintype_t;
|
||||
|
||||
/// Enumeration type to represent switches.
|
||||
typedef enum {
|
||||
OFF, // false
|
||||
ON, // true
|
||||
UNSET
|
||||
} switch_t;
|
||||
|
||||
/// Structure representing a X geometry.
|
||||
typedef struct {
|
||||
int wid;
|
||||
int hei;
|
||||
int x;
|
||||
int y;
|
||||
} geometry_t;
|
||||
|
||||
/// A structure representing margins around a rectangle.
|
||||
typedef struct {
|
||||
int top;
|
||||
int left;
|
||||
int bottom;
|
||||
int right;
|
||||
} margin_t;
|
||||
|
||||
// Or use cmemzero().
|
||||
#define MARGIN_INIT { 0, 0, 0, 0 }
|
||||
|
||||
/// Enumeration type of window painting mode.
|
||||
typedef enum {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <pixman.h>
|
||||
#include <stdio.h>
|
||||
#include "utils.h"
|
||||
|
||||
typedef struct pixman_region32 pixman_region32_t;
|
||||
typedef struct pixman_box32 pixman_box32_t;
|
||||
typedef pixman_region32_t region_t;
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright (c) 2018 Yuxuan Shui <yshuiv7@gmail.com>
|
||||
|
||||
/// Some common types
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/// Enumeration type to represent switches.
|
||||
typedef enum {
|
||||
OFF, // false
|
||||
ON, // true
|
||||
UNSET
|
||||
} switch_t;
|
||||
|
||||
/// Structure representing a X geometry.
|
||||
typedef struct {
|
||||
int wid;
|
||||
int hei;
|
||||
int x;
|
||||
int y;
|
||||
} geometry_t;
|
||||
|
||||
/// A structure representing margins around a rectangle.
|
||||
typedef struct {
|
||||
int top;
|
||||
int left;
|
||||
int bottom;
|
||||
int right;
|
||||
} margin_t;
|
||||
|
||||
typedef uint32_t opacity_t;
|
||||
|
||||
#define MARGIN_INIT { 0, 0, 0, 0 }
|
Loading…
Reference in New Issue