(x_display_info_for_display): Remove extern.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Fri, 23 Feb 2007 08:26:33 +0000 (08:26 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Fri, 23 Feb 2007 08:26:33 +0000 (08:26 +0000)
(SCROLL_BAR_UNPACK, SET_SCROLL_BAR_CONTROL_HANDLE): Don't limit
value to be unpacked to 32-bit on LP64 model.

src/ChangeLog
src/macterm.h

index dcb4d27..d2a8113 100644 (file)
@@ -1,3 +1,29 @@
+2007-02-23  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * macmenu.c (mac_menu_show): Call unbind_to early.  Use variable
+       `menu_item_selection' as in W32 version.
+       [TARGET_API_MAC_CARBON] (mac_handle_dialog_event): Add explicit
+       braces to avoid ambiguous `else'.
+
+       * macterm.c (mac_display_info_for_display): Remove function.
+       (mac_flush_display_optional) [USE_CG_DRAWING]: New function.
+       (x_redisplay_interface) [USE_CG_DRAWING]: Set it as handler for
+       flush_display_optional.
+       [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_press): New
+       argument MOUSE_POS.  All uses changed.  Set bar->dragging to
+       negative integer if scroll bar handle is pressed.
+       [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_release): Negative
+       bar->dragging means scroll bar handle is not dragged.
+       [USE_TOOLKIT_SCROLL_BARS] (x_scroll_bar_handle_drag): Get initial
+       offset of scroll bar handle from negative bar->dragging.
+       (XTread_socket) [USE_TOOLKIT_SCROLL_BARS]: Modifiers for scroll
+       bar click is compared against mapped one.  Set down/up_modifier
+       for scroll bar click event with control key.
+
+       * macterm.h (x_display_info_for_display): Remove extern.
+       (SCROLL_BAR_UNPACK, SET_SCROLL_BAR_CONTROL_HANDLE): Don't limit
+       value to be unpacked to 32-bit on LP64 model.
+
 2007-02-23  Kenichi Handa  <handa@m17n.org>
 
        * process.c (send_process_object_unwind): New function.
index 0447b41..d56287c 100644 (file)
@@ -204,7 +204,6 @@ extern struct mac_display_info one_mac_display_info;
    FONT-LIST-CACHE records previous values returned by x-list-fonts.  */
 extern Lisp_Object x_display_name_list;
 
-extern struct x_display_info *x_display_info_for_display P_ ((Display *));
 extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object));
 
 extern struct mac_display_info *mac_term_init P_ ((Lisp_Object, char *, char *));
@@ -404,8 +403,8 @@ struct scroll_bar {
   /* The next and previous in the chain of scroll bars in this frame.  */
   Lisp_Object next, prev;
 
-  /* The Mac control handle of this scroll bar.  Since this is a full
-     32-bit quantity, we store it split into two 32-bit values.  */
+  /* The Mac control handle of this scroll bar.  Since this is a
+     pointer value, we store it split into two Lisp integers.  */
   Lisp_Object control_handle_low, control_handle_high;
 
   /* The position and size of the scroll bar in pixels, relative to the
@@ -427,7 +426,9 @@ struct scroll_bar {
 
   /* If the scroll bar handle is currently being dragged by the user,
      this is the number of pixels from the top of the handle to the
-     place where the user grabbed it.  If the handle isn't currently
+     place where the user grabbed it.  If the handle is pressed but
+     not dragged yet, this is a negative integer whose absolute value
+     is the number of pixels plus 1.  If the handle isn't currently
      being dragged, this is Qnil.  */
   Lisp_Object dragging;
 
@@ -448,13 +449,13 @@ struct scroll_bar {
 #define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec))
 
 
-/* Building a 32-bit C integer from two 16-bit lisp integers.  */
+/* Building a C long integer from two lisp integers.  */
 #define SCROLL_BAR_PACK(low, high) (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) \
-  (XSETINT ((low),   (int32)        & 0xffff), \
-   XSETINT ((high), ((int32) >> 16) & 0xffff))
+/* Setting two lisp integers to two parts of a C unsigned long.  */
+#define SCROLL_BAR_UNPACK(low, high, ulong) \
+  (XSETINT ((low),  (ulong) & 0xffff), \
+   XSETINT ((high), (ulong) >> 16))
 
 
 /* Extract the Mac control handle of the scroll bar from a struct
@@ -464,9 +465,9 @@ struct scroll_bar {
                                     (ptr)->control_handle_high))
 
 /* Store a Mac control handle in a struct scroll_bar.  */
-#define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, id) \
+#define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, handle) \
   (SCROLL_BAR_UNPACK ((ptr)->control_handle_low, \
-                      (ptr)->control_handle_high, (int) id))
+                      (ptr)->control_handle_high, (unsigned long) (handle)))
 
 /* Return the inside width of a vertical scroll bar, given the outside
    width.  */