]> code.delx.au - gnu-emacs/blobdiff - src/w32term.h
Fill in some bidi values for xwidgets
[gnu-emacs] / src / w32term.h
index 0fabe12819c55b701b61136402929bea60fc630a..c905ef157371d8a586f1e2d10304621e5512e39f 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions and headers for communication on the Microsoft Windows API.
-   Copyright (C) 1995, 2001-2014 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2015 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -22,6 +22,22 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "frame.h"
 #include "atimer.h"
 
+/* Stack alignment stuff.  Every CALLBACK function should have the
+   ALIGN_STACK attribute if it manipulates Lisp objects, because
+   Windows x86 32-bit ABI only guarantees 4-byte stack alignment, and
+   that is what we will get when a Windows function calls us.  The
+   ALIGN_STACK attribute forces GCC to emit a preamble code to
+   re-align the stack at function entry.  Further details about this
+   can be found in http://www.peterstock.co.uk/games/mingw_sse/.  */
+#ifdef __GNUC__
+# if USE_STACK_LISP_OBJECTS && !defined _WIN64 && !defined __x86_64__  \
+  && __GNUC__ + (__GNUC_MINOR__ > 1) >= 5
+#  define ALIGN_STACK __attribute__((force_align_arg_pointer))
+# else
+#  define ALIGN_STACK
+# endif         /* USE_STACK_LISP_OBJECTS */
+#endif
+
 \f
 #define BLACK_PIX_DEFAULT(f) PALETTERGB(0,0,0)
 #define WHITE_PIX_DEFAULT(f) PALETTERGB(255,255,255)
@@ -224,7 +240,7 @@ extern struct w32_display_info *w32_term_init (Lisp_Object,
                                               char *, char *);
 extern int w32_defined_color (struct frame *f, const char *color,
                               XColor *color_def, int alloc);
-extern void x_set_window_size (struct frame *f, int change_grav,
+extern void x_set_window_size (struct frame *f, bool change_gravity,
                               int width, int height, bool pixelwise);
 extern int x_display_pixel_height (struct w32_display_info *);
 extern int x_display_pixel_width (struct w32_display_info *);
@@ -241,7 +257,7 @@ extern void x_set_internal_border_width (struct frame *f,
                                         Lisp_Object value,
                                         Lisp_Object oldval);
 extern void x_activate_menubar (struct frame *);
-extern int x_bitmap_icon (struct frame *, Lisp_Object);
+extern bool x_bitmap_icon (struct frame *, Lisp_Object);
 extern void initialize_frame_menubar (struct frame *);
 extern void x_free_frame_resources (struct frame *);
 extern void x_real_positions (struct frame *, int *, int *);
@@ -477,8 +493,8 @@ struct scroll_bar {
   (XSETINT ((low),   ((DWORDLONG)(int64))        & 0xffffffff), \
    XSETINT ((high), ((DWORDLONG)(int64) >> 32) & 0xffffffff))
 #else  /* not _WIN64 */
-/* Building a 32-bit C integer from two 16-bit lisp integers.  */
-#define SCROLL_BAR_PACK(low, high) (XINT (high) << 16 | XINT (low))
+/* Building a 32-bit C unsigned integer from two 16-bit lisp integers.  */
+#define SCROLL_BAR_PACK(low, high) ((UINT_PTR)(XINT (high) << 16 | XINT (low)))
 
 /* Setting two lisp integers to the low and high words of a 32-bit C int.  */
 #define SCROLL_BAR_UNPACK(low, high, int32) \