aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2003-03-21 13:51:33 +0000
committerKim F. Storm2003-03-21 13:51:33 +0000
commitd165fbde08ee91758ba6db20eac42ee2fd7e6be2 (patch)
treed00dadbd672b5f98961af1546b59e2681041f87d /src
parent7d63e5e3e9a72dad6dfa9e8c04f2818ed374e1d2 (diff)
downloademacs-d165fbde08ee91758ba6db20eac42ee2fd7e6be2.tar.gz
emacs-d165fbde08ee91758ba6db20eac42ee2fd7e6be2.zip
(No_Cursor): Define as 0 for W32.
(XRectangle): Add X compatible rectangle type. (NativeRectangle): Declare as RECT for W32. (CONVERT_TO_XRECT, CONVERT_FROM_XRECT, STORE_NATIVE_RECT): New macros.
Diffstat (limited to 'src')
-rw-r--r--src/w32gui.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/w32gui.h b/src/w32gui.h
index 775a97a443a..690ec66f8d5 100644
--- a/src/w32gui.h
+++ b/src/w32gui.h
@@ -79,6 +79,8 @@ typedef HWND Window;
79typedef HDC Display; /* HDC so it doesn't conflict with xpm lib. */ 79typedef HDC Display; /* HDC so it doesn't conflict with xpm lib. */
80typedef HCURSOR Cursor; 80typedef HCURSOR Cursor;
81 81
82#define No_Cursor (0)
83
82#define XChar2b wchar_t 84#define XChar2b wchar_t
83 85
84/* Dealing with bits of wchar_t as if they were an XChar2b. */ 86/* Dealing with bits of wchar_t as if they were an XChar2b. */
@@ -144,4 +146,31 @@ extern int nCmdShow;
144 146
145extern int XParseGeometry (); 147extern int XParseGeometry ();
146 148
149
150typedef struct {
151 int x, y;
152 unsigned width, height;
153} XRectangle;
154
155#define NativeRectangle RECT
156
157#define CONVERT_TO_XRECT(xr,nr) \
158 ((xr).x = (nr).left, \
159 (xr).y = (nr).top, \
160 (xr).width = ((nr).right - (nr).left), \
161 (xr).height = ((nr).bottom - (nr).top))
162
163#define CONVERT_FROM_XRECT(xr,nr) \
164 ((nr).left = (xr).x, \
165 (nr).top = (xr).y, \
166 (nr).right = ((xr).x + (xr).width), \
167 (nr).bottom = ((xr).y + (xr).height))
168
169#define STORE_NATIVE_RECT(nr,x,y,width,height) \
170 ((nr).left = (x), \
171 (nr).top = (y), \
172 (nr).right = ((nr).left + (width)), \
173 (nr).bottom = ((nr).top + (height)))
174
175
147#endif /* EMACS_W32GUI_H */ 176#endif /* EMACS_W32GUI_H */