]> code.delx.au - gnu-emacs/blobdiff - src/nsgui.h
* cl-generic.el (cl-defmethod): Make docstring dynamic
[gnu-emacs] / src / nsgui.h
index 3cc011f664617e7ba1f4ac3e1d3407a7aef8e6c8..8dac1bde9b5865dda2b4b35cbe4b3e31d570db2e 100644 (file)
@@ -1,12 +1,12 @@
 /* Definitions and headers for communication on the NeXT/Open/GNUstep API.
-   Copyright (C) 1995, 2005, 2008-2014 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2005, 2008-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -59,12 +59,19 @@ typedef struct _XCharStruct
 } XCharStruct;
 
 /* Fake structure from Xlib.h to represent two-byte characters.  */
-#ifdef HAVE_NS
 #ifndef __OBJC__
 typedef unsigned short unichar;
 #endif
 typedef unichar XChar2b;
-#endif
+
+#define STORE_XCHAR2B(chp, b1, b2) \
+  (*(chp) = ((XChar2b)((((b1) & 0x00ff) << 8) | ((b2) & 0x00ff))))
+
+#define XCHAR2B_BYTE1(chp) \
+  ((*(chp) & 0xff00) >> 8)
+
+#define XCHAR2B_BYTE2(chp) \
+  (*(chp) & 0x00ff)
 
 
 /* XXX: xfaces requires these structures, but the question is are we