From: Yuuki Harano Date: Sun, 24 May 2020 10:33:43 +0000 (+0900) Subject: * src/pgtkgui.h: change coding style X-Git-Tag: emacs-29.0.90~3798 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=964dfcf46222d9d834da936f5cef7aa3c3c29bd9;p=emacs.git * src/pgtkgui.h: change coding style --- 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__ */