aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaiki Ueno2014-07-16 13:31:31 +0900
committerDaiki Ueno2014-07-16 13:31:31 +0900
commit7ec2c0effc0ad7ed27ed9b040e75bd953d65fedc (patch)
tree0f57231da6e2497a2307843d025fcf8f3d1a67eb /src
parent1c6fefc9557ac174cea6b2d41f0eb3bdb1cced3a (diff)
downloademacs-7ec2c0effc0ad7ed27ed9b040e75bd953d65fedc.tar.gz
emacs-7ec2c0effc0ad7ed27ed9b040e75bd953d65fedc.zip
Move back the XChar2b definition to w32gui.h and nsgui.h
Fix the last change. XChar2b still needs to be defined platform dependently, to match with the argument types of drawing functions.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/dispextern.h2
-rw-r--r--src/nsgui.h8
-rw-r--r--src/w32gui.h2
4 files changed, 14 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 70c76e34c8c..2d81cf2f465 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -3,10 +3,10 @@
3 Consolidate XChar2b macros for the X, W32, and NS 3 Consolidate XChar2b macros for the X, W32, and NS
4 Suggested by Jan Djärv in: 4 Suggested by Jan Djärv in:
5 https://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00203.html 5 https://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00203.html
6 * w32gui.h (XChar2b, STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): 6 * w32gui.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Move the
7 Move the fallback definitions to dispextern.h. 7 fallback definitions to dispextern.h.
8 * nsgui.h (XChar2b, STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): 8 * nsgui.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Likewise.
9 Likewise. Share the same definition with W32. 9 Share the same definition with W32.
10 * xterm.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Move to ... 10 * xterm.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Move to ...
11 * dispextern.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): 11 * dispextern.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2):
12 ... here for the consistency with W32 and NS. 12 ... here for the consistency with W32 and NS.
diff --git a/src/dispextern.h b/src/dispextern.h
index 615d41d5a7f..6e8758218b4 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -51,8 +51,6 @@ typedef struct {
51 char pad; 51 char pad;
52} XColor; 52} XColor;
53 53
54typedef unsigned short XChar2b;
55
56#define STORE_XCHAR2B(chp, b1, b2) \ 54#define STORE_XCHAR2B(chp, b1, b2) \
57 (*(chp) = ((XChar2b)((((b1) & 0x00ff) << 8) | ((b2) & 0x00ff)))) 55 (*(chp) = ((XChar2b)((((b1) & 0x00ff) << 8) | ((b2) & 0x00ff))))
58 56
diff --git a/src/nsgui.h b/src/nsgui.h
index b38b4482b87..3cc011f6646 100644
--- a/src/nsgui.h
+++ b/src/nsgui.h
@@ -58,6 +58,14 @@ typedef struct _XCharStruct
58 int descent; 58 int descent;
59} XCharStruct; 59} XCharStruct;
60 60
61/* Fake structure from Xlib.h to represent two-byte characters. */
62#ifdef HAVE_NS
63#ifndef __OBJC__
64typedef unsigned short unichar;
65#endif
66typedef unichar XChar2b;
67#endif
68
61 69
62/* XXX: xfaces requires these structures, but the question is are we 70/* XXX: xfaces requires these structures, but the question is are we
63 forced to use them? */ 71 forced to use them? */
diff --git a/src/w32gui.h b/src/w32gui.h
index 8642c479be8..40a8a00346d 100644
--- a/src/w32gui.h
+++ b/src/w32gui.h
@@ -52,6 +52,8 @@ typedef HCURSOR Cursor;
52 52
53#define No_Cursor (0) 53#define No_Cursor (0)
54 54
55#define XChar2b wchar_t
56
55 57
56/* Windows equivalent of XImage. */ 58/* Windows equivalent of XImage. */
57typedef struct _XImage 59typedef struct _XImage