summaryrefslogtreecommitdiff
path: root/src/pgtkgui.h
diff options
context:
space:
mode:
authorYuuki Harano <masm+github@masm11.me>2020-05-24 19:33:43 +0900
committerJeff Walsh <jeff.walsh@drtusers-MacBook-Pro.local>2020-11-24 12:24:40 +1100
commit964dfcf46222d9d834da936f5cef7aa3c3c29bd9 (patch)
tree211b324bd3da455032dcb42cc589b5da4a7faadf /src/pgtkgui.h
parentaf5b72575c13b4b3f6ad96d7b24b20c67faf5ba4 (diff)
downloademacs-964dfcf46222d9d834da936f5cef7aa3c3c29bd9.tar.gz
* src/pgtkgui.h: change coding style
Diffstat (limited to 'src/pgtkgui.h')
-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;
typedef struct _GdkCursor *Emacs_Cursor;
-typedef void * Color;
+typedef void *Color;
typedef int Window;
typedef struct _GdkDisplay Display;
@@ -55,31 +55,12 @@ typedef void *XrmDatabase;
/* some sort of attempt to normalize rectangle handling.. seems a bit much
for what is accomplished */
-typedef struct {
- int x, y;
- unsigned width, height;
+typedef struct
+{
+ int x, y;
+ unsigned width, height;
} XRectangle;
-#define NativeRectangle XRectangle
-
-#define CONVERT_TO_EMACS_RECT(xr, nr) \
- ((xr).x = (nr).origin.x, \
- (xr).y = (nr).origin.y, \
- (xr).width = (nr).size.width, \
- (xr).height = (nr).size.height)
-
-#define CONVERT_FROM_EMACS_RECT(xr, nr) \
- ((nr).x = (xr).x, \
- (nr).y = (xr).y, \
- (nr).width = (xr).width, \
- (nr).height = (xr).height)
-
-#define STORE_NATIVE_RECT(nr, px, py, pwidth, pheight) \
- ((nr).x = (px), \
- (nr).y = (py), \
- (nr).width = (pwidth), \
- (nr).height = (pheight))
-
/* This stuff needed by frame.c. */
#define ForgetGravity 0
#define NorthWestGravity 1
@@ -102,16 +83,37 @@ typedef struct {
#define XNegative 0x0010
#define YNegative 0x0020
-#define USPosition (1L << 0) /* user specified x, y */
-#define USSize (1L << 1) /* user specified width, height */
+#define USPosition (1L << 0) /* user specified x, y */
+#define USSize (1L << 1) /* user specified width, height */
-#define PPosition (1L << 2) /* program specified position */
-#define PSize (1L << 3) /* program specified size */
-#define PMinSize (1L << 4) /* program specified minimum size */
-#define PMaxSize (1L << 5) /* program specified maximum size */
-#define PResizeInc (1L << 6) /* program specified resize increments */
-#define PAspect (1L << 7) /* program specified min, max aspect ratios */
-#define PBaseSize (1L << 8) /* program specified base for incrementing */
-#define PWinGravity (1L << 9) /* program specified window gravity */
+#define PPosition (1L << 2) /* program specified position */
+#define PSize (1L << 3) /* program specified size */
+#define PMinSize (1L << 4) /* program specified minimum size */
+#define PMaxSize (1L << 5) /* program specified maximum size */
+#define PResizeInc (1L << 6) /* program specified resize increments */
+#define PAspect (1L << 7) /* program specified min, max aspect ratios */
+#define PBaseSize (1L << 8) /* program specified base for incrementing */
+#define PWinGravity (1L << 9) /* program specified window gravity */
+
+
+#define NativeRectangle XRectangle
+
+#define CONVERT_TO_EMACS_RECT(xr, nr) \
+ ((xr).x = (nr).x, \
+ (xr).y = (nr).y, \
+ (xr).width = (nr).width, \
+ (xr).height = (nr).height)
+
+#define CONVERT_FROM_EMACS_RECT(xr, nr) \
+ ((nr).x = (xr).x, \
+ (nr).y = (xr).y, \
+ (nr).width = (xr).width, \
+ (nr).height = (xr).height)
+
+#define STORE_NATIVE_RECT(nr, px, py, pwidth, pheight) \
+ ((nr).x = (px), \
+ (nr).y = (py), \
+ (nr).width = (pwidth), \
+ (nr).height = (pheight))
-#endif /* __PGTKGUI_H__ */
+#endif /* __PGTKGUI_H__ */