]> code.delx.au - gnu-emacs/blobdiff - src/widget.c
Clarify the `call-interactively' doc string, and add an example.
[gnu-emacs] / src / widget.c
index 2301f76c7c9c397c6c019df81b31f5872da7aaa5..6d871ad7cb27a159a7b22bc67d54769095c672d1 100644 (file)
@@ -1,6 +1,5 @@
 /* The emacs frame widget.
-   Copyright (C) 1992, 1993, 2000, 2001, 2002, 2003, 2004,
-                 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+   Copyright (C) 1992-1993, 2000-2011  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -79,7 +78,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 static void EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2);
 static void EmacsFrameDestroy (Widget widget);
 static void EmacsFrameRealize (Widget widget, XtValueMask *mask, XSetWindowAttributes *attrs);
-void EmacsFrameResize (Widget widget);
+static void EmacsFrameResize (Widget widget);
 static Boolean EmacsFrameSetValues (Widget cur_widget, Widget req_widget, Widget new_widget, ArgList dum1, Cardinal *dum2);
 static XtGeometryResult EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result);
 
@@ -138,7 +137,7 @@ emacsFrameTranslations [] = "\
 ";
 */
 
-EmacsFrameClassRec emacsFrameClassRec = {
+static EmacsFrameClassRec emacsFrameClassRec = {
     { /* core fields */
     /* superclass              */      &widgetClassRec,
     /* class_name              */      "EmacsFrame",
@@ -464,10 +463,6 @@ set_frame_size (EmacsFrame ew)
   }
 }
 
-/* Nonzero tells update_wm_hints not to do anything
-   (the caller should call update_wm_hints explicitly later.)  */
-int update_hints_inhibit;
-
 static void
 update_wm_hints (EmacsFrame ew)
 {
@@ -482,9 +477,6 @@ update_wm_hints (EmacsFrame ew)
   int base_height;
   int min_rows = 0, min_cols = 0;
 
-  if (update_hints_inhibit)
-    return;
-
 #if 0
   check_frame_size (ew->emacs_frame.frame, &min_rows, &min_cols);
 #endif
@@ -524,14 +516,11 @@ create_frame_gcs (ew)
   struct frame *s = ew->emacs_frame.frame;
 
   s->output_data.x->normal_gc
-    = XCreateGC (XtDisplay (ew), RootWindowOfScreen (XtScreen (ew)),
-                (unsigned long)0, (XGCValues *)0);
+    = XCreateGC (XtDisplay (ew), RootWindowOfScreen (XtScreen (ew)), 0, 0);
   s->output_data.x->reverse_gc
-    = XCreateGC (XtDisplay (ew), RootWindowOfScreen (XtScreen (ew)),
-                (unsigned long)0, (XGCValues *)0);
+    = XCreateGC (XtDisplay (ew), RootWindowOfScreen (XtScreen (ew)), 0, 0);
   s->output_data.x->cursor_gc
-    = XCreateGC (XtDisplay (ew), RootWindowOfScreen (XtScreen (ew)),
-                (unsigned long)0, (XGCValues *)0);
+    = XCreateGC (XtDisplay (ew), RootWindowOfScreen (XtScreen (ew)), 0, 0);
   s->output_data.x->black_relief.gc = 0;
   s->output_data.x->white_relief.gc = 0;
 }
@@ -561,7 +550,7 @@ setup_frame_gcs (EmacsFrame ew)
   if (STRINGP (font))
     {
       XFontStruct *xfont = XLoadQueryFont (FRAME_X_DISPLAY_INFO (s)->display,
-                                          SDATA (font));
+                                          SSDATA (font));
       if (xfont)
        {
          gc_values.font = xfont->fid;
@@ -590,8 +579,7 @@ setup_frame_gcs (EmacsFrame ew)
     = XCreatePixmapFromBitmapData (XtDisplay(ew),
                                   RootWindowOfScreen (XtScreen (ew)),
                                   setup_frame_cursor_bits, 2, 2,
-                                  (unsigned long)0, (unsigned long)1,
-                                  ew->core.depth);
+                                  0, 1, ew->core.depth);
 
   /* Normal video */
   gc_values.foreground = ew->emacs_frame.foreground_pixel;
@@ -704,7 +692,7 @@ EmacsFrameDestroy (Widget widget)
   UNBLOCK_INPUT;
 }
 
-void
+static void
 EmacsFrameResize (Widget widget)
 {
   EmacsFrame ew = (EmacsFrame)widget;
@@ -841,6 +829,3 @@ widget_store_internal_border (Widget widget)
 
   ew->emacs_frame.internal_border_width = f->internal_border_width;
 }
-
-/* arch-tag: 931d28e5-0d59-405a-8325-7d475d0a13d9
-   (do not change this comment) */