aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYuuki Harano2020-05-24 19:33:43 +0900
committerJeff Walsh2020-11-24 12:24:40 +1100
commit964dfcf46222d9d834da936f5cef7aa3c3c29bd9 (patch)
tree211b324bd3da455032dcb42cc589b5da4a7faadf /src
parentaf5b72575c13b4b3f6ad96d7b24b20c67faf5ba4 (diff)
downloademacs-964dfcf46222d9d834da936f5cef7aa3c3c29bd9.tar.gz
emacs-964dfcf46222d9d834da936f5cef7aa3c3c29bd9.zip
* src/pgtkgui.h: change coding style
Diffstat (limited to 'src')
-rw-r--r--src/pgtkgui.h72
1 files changed, 37 insertions, 35 deletions
diff --git a/src/pgtkgui.h b/src/pgtkgui.h
index be9fb25bfe2..08559207d45 100644
--- a/src/pgtkgui.h
+++ b/src/pgtkgui.h
@@ -45,7 +45,7 @@ typedef unichar XChar2b;
45 45
46typedef struct _GdkCursor *Emacs_Cursor; 46typedef struct _GdkCursor *Emacs_Cursor;
47 47
48typedef void * Color; 48typedef void *Color;
49typedef int Window; 49typedef int Window;
50typedef struct _GdkDisplay Display; 50typedef struct _GdkDisplay Display;
51 51
@@ -55,31 +55,12 @@ typedef void *XrmDatabase;
55 55
56/* some sort of attempt to normalize rectangle handling.. seems a bit much 56/* some sort of attempt to normalize rectangle handling.. seems a bit much
57 for what is accomplished */ 57 for what is accomplished */
58typedef struct { 58typedef struct
59 int x, y; 59{
60 unsigned width, height; 60 int x, y;
61 unsigned width, height;
61} XRectangle; 62} XRectangle;
62 63
63#define NativeRectangle XRectangle
64
65#define CONVERT_TO_EMACS_RECT(xr, nr) \
66 ((xr).x = (nr).origin.x, \
67 (xr).y = (nr).origin.y, \
68 (xr).width = (nr).size.width, \
69 (xr).height = (nr).size.height)
70
71#define CONVERT_FROM_EMACS_RECT(xr, nr) \
72 ((nr).x = (xr).x, \
73 (nr).y = (xr).y, \
74 (nr).width = (xr).width, \
75 (nr).height = (xr).height)
76
77#define STORE_NATIVE_RECT(nr, px, py, pwidth, pheight) \
78 ((nr).x = (px), \
79 (nr).y = (py), \
80 (nr).width = (pwidth), \
81 (nr).height = (pheight))
82
83/* This stuff needed by frame.c. */ 64/* This stuff needed by frame.c. */
84#define ForgetGravity 0 65#define ForgetGravity 0
85#define NorthWestGravity 1 66#define NorthWestGravity 1
@@ -102,16 +83,37 @@ typedef struct {
102#define XNegative 0x0010 83#define XNegative 0x0010
103#define YNegative 0x0020 84#define YNegative 0x0020
104 85
105#define USPosition (1L << 0) /* user specified x, y */ 86#define USPosition (1L << 0) /* user specified x, y */
106#define USSize (1L << 1) /* user specified width, height */ 87#define USSize (1L << 1) /* user specified width, height */
107 88
108#define PPosition (1L << 2) /* program specified position */ 89#define PPosition (1L << 2) /* program specified position */
109#define PSize (1L << 3) /* program specified size */ 90#define PSize (1L << 3) /* program specified size */
110#define PMinSize (1L << 4) /* program specified minimum size */ 91#define PMinSize (1L << 4) /* program specified minimum size */
111#define PMaxSize (1L << 5) /* program specified maximum size */ 92#define PMaxSize (1L << 5) /* program specified maximum size */
112#define PResizeInc (1L << 6) /* program specified resize increments */ 93#define PResizeInc (1L << 6) /* program specified resize increments */
113#define PAspect (1L << 7) /* program specified min, max aspect ratios */ 94#define PAspect (1L << 7) /* program specified min, max aspect ratios */
114#define PBaseSize (1L << 8) /* program specified base for incrementing */ 95#define PBaseSize (1L << 8) /* program specified base for incrementing */
115#define PWinGravity (1L << 9) /* program specified window gravity */ 96#define PWinGravity (1L << 9) /* program specified window gravity */
97
98
99#define NativeRectangle XRectangle
100
101#define CONVERT_TO_EMACS_RECT(xr, nr) \
102 ((xr).x = (nr).x, \
103 (xr).y = (nr).y, \
104 (xr).width = (nr).width, \
105 (xr).height = (nr).height)
106
107#define CONVERT_FROM_EMACS_RECT(xr, nr) \
108 ((nr).x = (xr).x, \
109 (nr).y = (xr).y, \
110 (nr).width = (xr).width, \
111 (nr).height = (xr).height)
112
113#define STORE_NATIVE_RECT(nr, px, py, pwidth, pheight) \
114 ((nr).x = (px), \
115 (nr).y = (py), \
116 (nr).width = (pwidth), \
117 (nr).height = (pheight))
116 118
117#endif /* __PGTKGUI_H__ */ 119#endif /* __PGTKGUI_H__ */