(add_emchar_rune): Use `ASCII_TO_CHARC', `CHAR_TO_CHARC' and
[chise/xemacs-chise.git-] / src / frame-x.c
index 9a25460..9396eee 100644 (file)
@@ -50,6 +50,7 @@ Boston, MA 02111-1307, USA.  */
 #include "faces.h"
 #include "frame.h"
 #include "window.h"
+#include "gutter.h"
 
 #ifdef HAVE_DRAGNDROP
 #include "dragdrop.h"
@@ -659,7 +660,7 @@ x_set_frame_text_value (struct frame *f, Bufbyte *value,
   for (ptr = value; *ptr; ptr++)
     if (!BYTE_ASCII_P (*ptr))
       {
-        CONST char * tmp;
+        const char * tmp;
         encoding = DEVICE_XATOM_COMPOUND_TEXT (XDEVICE (FRAME_DEVICE (f)));
        TO_EXTERNAL_FORMAT (C_STRING, value,
                            C_STRING_ALLOCA, tmp,
@@ -760,7 +761,7 @@ x_set_frame_properties (struct frame *f, Lisp_Object plist)
 
       if (STRINGP (prop))
        {
-         CONST char *extprop;
+         const char *extprop;
 
          if (XSTRING_LENGTH (prop) == 0)
            continue;
@@ -770,7 +771,7 @@ x_set_frame_properties (struct frame *f, Lisp_Object plist)
                              Qctext);
          if (STRINGP (val))
            {
-             CONST Extbyte *extval;
+             const Extbyte *extval;
              Extcount extvallen;
 
              TO_EXTERNAL_FORMAT (LISP_STRING, val,
@@ -1146,12 +1147,12 @@ WARNING: can only handle plain/text and file: transfers!
          x_event.xbutton.y_root = lisp_event->event.button.y;
        }
       modifier = lisp_event->event.button.modifiers;
-      if (modifier & MOD_SHIFT)   state |= ShiftMask;
-      if (modifier & MOD_CONTROL) state |= ControlMask;
-      if (modifier & MOD_META)    state |= xd->MetaMask;
-      if (modifier & MOD_SUPER)   state |= xd->SuperMask;
-      if (modifier & MOD_HYPER)   state |= xd->HyperMask;
-      if (modifier & MOD_ALT)     state |= xd->AltMask;
+      if (modifier & XEMACS_MOD_SHIFT)   state |= ShiftMask;
+      if (modifier & XEMACS_MOD_CONTROL) state |= ControlMask;
+      if (modifier & XEMACS_MOD_META)    state |= xd->MetaMask;
+      if (modifier & XEMACS_MOD_SUPER)   state |= xd->SuperMask;
+      if (modifier & XEMACS_MOD_HYPER)   state |= xd->HyperMask;
+      if (modifier & XEMACS_MOD_ALT)     state |= xd->AltMask;
       state |= Button1Mask << (lisp_event->event.button.button-1);
 
       x_event.xbutton.state = state;
@@ -1191,7 +1192,7 @@ WARNING: can only handle plain/text and file: transfers!
                  Ctext=NULL;
                  break;
                }
-             strcpy (Ctext+pos, (CONST char *)XSTRING_DATA (XCAR (item)));
+             strcpy (Ctext+pos, (const char *)XSTRING_DATA (XCAR (item)));
              pos += XSTRING_LENGTH (XCAR (item)) + 1;
              item = XCDR (item);
            }
@@ -1367,7 +1368,7 @@ The type defaults to DndText (4).
                }
              len = XSTRING_LENGTH (XCAR (run)) + 1;
              dnd_data = (char *) xrealloc (dnd_data, dnd_len + len);
-             strcpy (dnd_data + dnd_len - 1, (CONST char *)XSTRING_DATA (XCAR (run)));
+             strcpy (dnd_data + dnd_len - 1, (const char *)XSTRING_DATA (XCAR (run)));
              dnd_len += len;
              run = XCDR (run);
            }
@@ -1412,12 +1413,12 @@ The type defaults to DndText (4).
        }
 
       modifier = lisp_event->event.button.modifiers;
-      if (modifier & MOD_SHIFT)   state |= ShiftMask;
-      if (modifier & MOD_CONTROL) state |= ControlMask;
-      if (modifier & MOD_META)    state |= xd->MetaMask;
-      if (modifier & MOD_SUPER)   state |= xd->SuperMask;
-      if (modifier & MOD_HYPER)   state |= xd->HyperMask;
-      if (modifier & MOD_ALT)     state |= xd->AltMask;
+      if (modifier & XEMACS_MOD_SHIFT)   state |= ShiftMask;
+      if (modifier & XEMACS_MOD_CONTROL) state |= ControlMask;
+      if (modifier & XEMACS_MOD_META)    state |= xd->MetaMask;
+      if (modifier & XEMACS_MOD_SUPER)   state |= xd->SuperMask;
+      if (modifier & XEMACS_MOD_HYPER)   state |= xd->HyperMask;
+      if (modifier & XEMACS_MOD_ALT)     state |= xd->AltMask;
       state |= Button1Mask << (lisp_event->event.button.button-1);
 
       x_event.xbutton.state = state;
@@ -1550,13 +1551,16 @@ x_initialize_frame_size (struct frame *f)
   {
     struct window *win = XWINDOW (f->root_window);
 
-    WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f);
-    WINDOW_TOP (win) = FRAME_TOP_BORDER_END (f);
+    WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f)
+      + FRAME_LEFT_GUTTER_BOUNDS (f);
+    WINDOW_TOP (win) = FRAME_TOP_BORDER_END (f)
+      + FRAME_TOP_GUTTER_BOUNDS (f);
 
     if (!NILP (f->minibuffer_window))
       {
        win = XWINDOW (f->minibuffer_window);
-       WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f);
+       WINDOW_LEFT (win) = FRAME_LEFT_BORDER_END (f)
+         + FRAME_LEFT_GUTTER_BOUNDS (f);
       }
   }
 
@@ -1861,7 +1865,7 @@ x_create_widgets (struct frame *f, Lisp_Object lisp_window_id,
 #ifdef EXTERNAL_WIDGET
   Window window_id = 0;
 #endif
-  CONST char *name;
+  const char *name;
   Arg al [25];
   int ac = 0;
   Widget text, container, shell;