changeset 4917:fce43cb76a1c

xlike cleanup, documentation -------------------- ChangeLog entries follow: -------------------- man/ChangeLog addition: 2010-02-03 Ben Wing <ben@xemacs.org> * internals/internals.texi (Top): * internals/internals.texi (Evaluation; Stack Frames; Bindings): * internals/internals.texi (Ben's README): * internals/internals.texi (Consoles; Devices; Frames; Windows): * internals/internals.texi (Window Hierarchy): * internals/internals.texi (The Window Object): * internals/internals.texi (Modules for the Basic Displayable Lisp Objects): * internals/internals.texi (Window-System Support): * internals/internals.texi (Creating a Window-System Type): * internals/internals.texi (Discussion -- Garbage Collection): Update the part at the top about how to maintain the file with more tips. Add a chapter on "window-system support" describing in a general way how the support for different window systems/device types works, including the separation between device-independent and device-dependent parts, device methods, the specific device types and the "xlike" pseudo-type. src/ChangeLog addition: 2010-02-03 Ben Wing <ben@xemacs.org> * Makefile.in.in: * Makefile.in.in (x_objs): * Makefile.in.in (gtk_gui_objs): * console-xlike-inc.h: * depend: * device-x.c: * emacs.c: * gccache-gtk.h: * gccache-gtk.h (gc_cache_lookup): * gccache-x.c: * gccache-x.c (GCCACHE_HASH): * gccache-x.h: * toolbar-gtk.c: * toolbar-gtk.c (gtk_initialize_frame_toolbars): * toolbar-x.c: * toolbar-x.c (x_initialize_frame_toolbars): * toolbar-xlike.c: * toolbar-xlike.c (xlike_draw_blank_toolbar_button): * toolbar-xlike.c (xlike_output_toolbar_button): * toolbar-xlike.c (xlike_get_button_size): * toolbar-xlike.c (XLIKE_OUTPUT_BUTTONS_LOOP): * toolbar-xlike.c (xlike_output_toolbar): * toolbar-xlike.c (xlike_clear_toolbar): * toolbar-xlike.c (xlike_output_frame_toolbars): * toolbar-xlike.c (xlike_clear_frame_toolbars): * toolbar-xlike.c (xlike_redraw_exposed_toolbar): * toolbar-xlike.c (xlike_redraw_exposed_toolbars): * toolbar-xlike.c (xlike_redraw_frame_toolbars): * toolbar-xlike.h: * toolbar-xlike.h (xlike_clear_frame_toolbars): Rename some files to make them consistent with general naming rules: xgccache.c -> gccache-x.c xgccache.h -> gccache-x.h toolbar-common.c -> toolbar-xlike.c toolbar-common.h -> toolbar-xlike.h Fix include-file references. Also change the names of functions in now-named toolbar-xlike.c to be xlike_foo() instead of common_foo(). Add a longish comment in console-xlike-inc.h describing the "xlike" system, how it works and what the various files are used for.
author Ben Wing <ben@xemacs.org>
date Wed, 03 Feb 2010 02:46:50 -0600
parents a6c778975d7d
children c914214b788d
files man/ChangeLog man/internals/internals.texi src/ChangeLog src/Makefile.in.in src/console-xlike-inc.h src/depend src/device-x.c src/emacs.c src/gccache-gtk.h src/gccache-x.c src/gccache-x.h src/toolbar-common.c src/toolbar-common.h src/toolbar-gtk.c src/toolbar-x.c src/toolbar-xlike.c src/toolbar-xlike.h src/xgccache.c src/xgccache.h
diffstat 19 files changed, 1584 insertions(+), 1424 deletions(-) [+]
line wrap: on
line diff
--- a/man/ChangeLog	Mon Feb 01 22:00:29 2010 -0600
+++ b/man/ChangeLog	Wed Feb 03 02:46:50 2010 -0600
@@ -1,3 +1,24 @@
+2010-02-03  Ben Wing  <ben@xemacs.org>
+
+	* internals/internals.texi (Top):
+	* internals/internals.texi (Evaluation; Stack Frames; Bindings):
+	* internals/internals.texi (Ben's README):
+	* internals/internals.texi (Consoles; Devices; Frames; Windows):
+	* internals/internals.texi (Window Hierarchy):
+	* internals/internals.texi (The Window Object):
+	* internals/internals.texi (Modules for the Basic Displayable Lisp Objects):
+	* internals/internals.texi (Window-System Support):
+	* internals/internals.texi (Creating a Window-System Type):
+	* internals/internals.texi (Discussion -- Garbage Collection):
+	Update the part at the top about how to maintain the file with
+	more tips.
+
+	Add a chapter on "window-system support" describing in a general
+	way how the support for different window systems/device types
+	works, including the separation between device-independent and
+	device-dependent parts, device methods, the specific device types
+	and the "xlike" pseudo-type.
+
 2010-01-31  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* xemacs/programs.texi (Defuns): 
--- a/man/internals/internals.texi	Mon Feb 01 22:00:29 2010 -0600
+++ b/man/internals/internals.texi	Wed Feb 03 02:46:50 2010 -0600
@@ -129,13 +129,37 @@
 @end ifinfo
 
 @ignore
-Don't update this by hand!!!!!!
-Use C-u C-c C-u m (aka C-u M-x texinfo-master-list).
-NOTE: This command does not include the Index:: menu entry.
+Tips for maintaining this file:
+
+1. Updating the forward, back and up pointers in a @@node line:
+---------------------------------------------------------------
+
+Don't do it by hand!
+
+Use C-c C-u C-e (aka M-x texinfo-every-node-update).
+
+2. Updating the menus:
+----------------------
+
+This section describes how to update the menus at the end of chapters,
+sections with subsections, etc., and the master menu near the top of
+the file:
+
+Don't do it by hand!
+
+Use C-u C-c C-u m (aka C-u M-x texinfo-master-menu).
+N
+OTE: This command does not include the Index:: menu entry.
 You must add it by hand.
 
-Here are some useful Lisp routines for quickly Texinfo-izing text that
-has been formatted into ASCII lists and tables.
+3. Converting plain text into Texinfo:
+--------------------------------------
+
+3a. Here are some useful Lisp routines for quickly Texinfo-izing text
+    that has been formatted into ASCII lists and tables.
+
+Note: to define these routines, put point after the end of the definition
+and type C-x C-e.
 
 (defun list-to-texinfo (b e)
   "Convert the selected region from an ASCII list to a Texinfo list."
@@ -249,8 +273,8 @@
     (beginning-of-line)
     (insert "@end table\n")))
 
-A useful Lisp routine for adding markup based on conventions used in plain
-text files; see doc string below.
+3b. A useful Lisp routine for adding markup based on conventions used
+    in plain text files; see doc string below.
 
 (defun convert-text-to-texinfo (&optional no-narrow)
   "Convert text to Texinfo.
@@ -259,10 +283,10 @@
 in text: @code{} surrounded by ` and ' or followed by a (); @strong{}
 surrounded by *'s; @file{} something that looks like a file name."
   (interactive)
-  (if (region-active-p)
+  (if (and (not no-narrow) (region-active-p))
       (save-restriction
 	(narrow-to-region (region-beginning) (region-end))
-	(convert-comments-to-texinfo t))
+	(convert-text-to-texinfo t))
     (let ((p (point))
 	  (case-replace nil))
       (query-replace-regexp "`\\([^']+\\)'\\([^']\\)" "@code{\\1}\\2" nil)
@@ -274,31 +298,38 @@
       (query-replace-regexp "\\(\\(\\s_\\|\\sw\\)+\\.[A-Za-z]+\\)\\([^A-Za-z.}]\\)" "@file{\\1}\\3" nil)
       )))
 
-Macro the generate the "Future Work" section from a title; put
-point at beginning.
+4. Adding new sections:
+-----------------------
+
+NOTE: These are in the form of macros. #### FIXME Convert them to
+proper functions.  To edit these macros, define them and then use
+M-x edit-kbd-macro.
+
+Macro to generate the "Future Work" section from a title; put
+point at the beginning of the title.
 
 (defalias 'make-future (read-kbd-macro
-"<S-end> <f3> <home> @node SPC <end> RET @section SPC <f4> <home> <up> <C-right> <right> Future SPC Work SPC - - SPC <home> <down> <C-right> <right> Future SPC Work SPC - - SPC <end> RET @cindex SPC future SPC work, SPC <f4> C-r , RET C-x C-x M-l RET @cindex SPC <f4> <home> <C-right> <S-end> M-l , SPC future SPC work RET"))
+"<S-end> M-w <home> @node SPC <end> RET @section SPC C-y <home> <up> <C-right> <right> Future SPC Work SPC - - SPC <home> <down> <C-right> <right> Future SPC Work SPC - - SPC <end> RET @cindex SPC future SPC work, SPC C-y C-r , RET C-x C-x M-l RET @cindex SPC C-y <home> <C-right> <S-end> M-l , SPC future SPC work RET"))
 
 Similar but generates a "Discussion" section.
 
 (defalias 'make-discussion (read-kbd-macro
-"<S-end> <f3> <home> @node SPC <end> RET @section SPC <f4> <home> <up> <C-right> <right> Discussion SPC - - SPC <home> <down> <C-right> <right> Discussion SPC - - SPC <end> RET @cindex SPC discussion, SPC <f4> C-r , RET C-x C-x M-l RET @cindex SPC <f4> <home> <C-right> <S-end> M-l , SPC discussion RET"))
+"<S-end> M-w <home> @node SPC <end> RET @section SPC C-y <home> <up> <C-right> <right> Discussion SPC - - SPC <home> <down> <C-right> <right> Discussion SPC - - SPC <end> RET @cindex SPC discussion, SPC C-y C-r , RET C-x C-x M-l RET @cindex SPC C-y <home> <C-right> <S-end> M-l , SPC discussion RET"))
 
 Similar but generates an "Old Future Work" section.
 
 (defalias 'make-old-future (read-kbd-macro
-"<S-end> <f3> <home> @node SPC <end> RET @section SPC <f4> <home> <up> <C-right> <right> Old SPC Future SPC Work SPC - - SPC <home> <down> <C-right> <right> Old SPC Future SPC Work SPC - - SPC <end> RET @cindex SPC old SPC future SPC work, SPC <f4> C-r , RET C-x C-x M-l RET @cindex SPC <f4> <home> <C-right> <S-end> M-l , SPC old SPC future SPC work RET"))
+"<S-end> M-w <home> @node SPC <end> RET @section SPC C-y <home> <up> <C-right> <right> Old SPC Future SPC Work SPC - - SPC <home> <down> <C-right> <right> Old SPC Future SPC Work SPC - - SPC <end> RET @cindex SPC old SPC future SPC work, SPC C-y C-r , RET C-x C-x M-l RET @cindex SPC C-y <home> <C-right> <S-end> M-l , SPC old SPC future SPC work RET"))
 
 Similar but generates a general section.
 
 (defalias 'make-section (read-kbd-macro
-"<S-end> <f3> <home> @node SPC <end> RET @section SPC <f4> RET @cindex SPC C-SPC C-g <f4> C-x C-x M-l <home> <down>"))
+"<S-end> M-w <home> @node SPC <end> RET @section SPC C-y RET @cindex SPC C-SPC C-g C-y C-x C-x M-l <home> <down>"))
 
 Similar but generates a general subsection.
 
 (defalias 'make-subsection (read-kbd-macro
-"<S-end> <f3> <home> @node SPC <end> RET @subsection SPC <f4> RET @cindex SPC C-SPC C-g <f4> C-x C-x M-l <home> <down>"))
+"<S-end> M-w <home> @node SPC <end> RET @subsection SPC C-y RET @cindex SPC C-SPC C-g C-y C-x C-x M-l <home> <down>"))
 @end ignore
 
 @menu
@@ -328,6 +359,7 @@
 * Text::                        
 * Multilingual Support::        
 * Consoles; Devices; Frames; Windows::  
+* Window-System Support::       
 * The Redisplay Mechanism::     
 * Extents::                     
 * Faces::                       
@@ -451,7 +483,7 @@
 
 * Evaluation::                  
 * Dynamic Binding; The specbinding Stack; Unwind-Protects::  
-* Simple Special Operators::        
+* Simple Special Operators::    
 * Catch and Throw::             
 * Error Trapping::              
 
@@ -558,9 +590,12 @@
 * Point::                       
 * Window Hierarchy::            
 * The Window Object::           
-* Creating a New Console/Device/Frame Type::  
 * Modules for the Basic Displayable Lisp Objects::  
 
+Window-System Support
+
+* Creating a Window-System Type::  
+
 The Redisplay Mechanism
 
 * Critical Redisplay Sections::  
@@ -740,8 +775,8 @@
 
 Discussion -- Garbage Collection
 
-* Discussion -- KKCC::
-* Discussion -- Incremental Collector::
+* Discussion -- KKCC::          
+* Discussion -- Incremental Collector::  
 * Discussion -- Pure Space::    
 * Discussion -- Hashtable-Based Marking and Cleanup::  
 * Discussion -- The Anti-Cons::  
@@ -8954,7 +8989,7 @@
 @menu
 * Evaluation::                  
 * Dynamic Binding; The specbinding Stack; Unwind-Protects::  
-* Simple Special Operators::        
+* Simple Special Operators::    
 * Catch and Throw::             
 * Error Trapping::              
 @end menu
@@ -17141,7 +17176,7 @@
 
 
 
-@node Consoles; Devices; Frames; Windows, The Redisplay Mechanism, Multilingual Support, Top
+@node Consoles; Devices; Frames; Windows, Window-System Support, Multilingual Support, Top
 @chapter Consoles; Devices; Frames; Windows
 @cindex consoles; devices; frames; windows
 @cindex devices; frames; windows, consoles;
@@ -17153,7 +17188,6 @@
 * Point::                       
 * Window Hierarchy::            
 * The Window Object::           
-* Creating a New Console/Device/Frame Type::  
 * Modules for the Basic Displayable Lisp Objects::  
 @end menu
 
@@ -17323,7 +17357,7 @@
 artifact that should be fixed.)
 @end enumerate
 
-@node The Window Object, Creating a New Console/Device/Frame Type, Window Hierarchy, Consoles; Devices; Frames; Windows
+@node The Window Object, Modules for the Basic Displayable Lisp Objects, Window Hierarchy, Consoles; Devices; Frames; Windows
 @section The Window Object
 @cindex window object, the
 @cindex object, the window
@@ -17431,143 +17465,7 @@
 @end table
 
 
-@node Creating a New Console/Device/Frame Type, Modules for the Basic Displayable Lisp Objects, The Window Object, Consoles; Devices; Frames; Windows
-@section Creating a New Console, Device, or Frame Type
-@cindex creating a new console type
-@cindex console type, creating a new
-@cindex creating a new device type
-@cindex device type, creating a new
-@cindex creating a new frame type
-@cindex frame type, creating a new
-
-Unfortunately, at the present time, only the console abstraction is at
-all well-maintained.  Device and frame internals are referred to from
-many places in the redisplay and console code.  The best that can be
-done therefore is to create a whole new console type, even though much
-code will be shared.  (Ben Wing has complained about the code
-duplication in the GTK+ v1 console, and probably would not be happy with
-the unpublished Qt console or Andrew Choi's Carbon console, but it's
-hard to see how those consoles could have been done better without
-fixing the abstractions in the X (actually Xt), MS Windows, and tty
-consoles as well as doing a complete refactoring of the console, device,
-and frame code.)
-
-What is desireable is sharing console, device, and frame methods across
-platforms in a more general way, reducing the amount of duplicated code
-by pulling it back into the redisplay engine proper or the Lisp modules
-as appropriate.  For example, we should be able to use
-@samp{make-frame-on-device} to share a single X connection among GTK, X,
-and Xft frames.  Xft is partially implemented, but GTK would be much
-harder (impossible?) because it has its own event loop.  (Xft shares the
-Xt event loop with the X console.)
-
-The way all methods get added to the console type is uncool.  A console
-should be a composite, which indicates a collection of I/O resources
-``used together.''  It should indicate where operations that change
-``focus'' search for targets, @emph{i.e.}, by default new frames are
-created on the selected device of the console where the input that
-invoked the command was received, @samp{pop-to-buffer-other-window} only
-considers existing windows on the same device of the same console,
-@emph{etc.}  But it should be possible to assemble consoles out of
-component input channels, imaging devices, and multimedia (audio)
-channels.
-
-The following notes may provide some guidance to those who wish to
-create new console types (@emph{i.e.}, port the redisplay code to a new
-platform).  They are based on an unsuccessful attempt to refactor the
-Xft code into a new console type while sharing most routines with the X
-console.  (For clarification or suggestions, feel free to write
-@email{stephen@@xemacs.org,Stephen Turnbull}.)
-
-The first thing to realize is that the naming of many modules obscures
-their relationship to the console abstraction.  For example, the
-@file{objects-@var{console-type}}, @file{redisplay-@var{console-type}},
-and @file{glyphs-@var{console-type}} series of modules have nothing to
-do with Lisp objects and little to do with redisplay, respectively.
-Rather they implement abstractions used for rendering on each console
-type, such as fonts and colors (@file{objects}) and string and graphics
-drawing primitives (@file{redisplay}).  These modules are conceptually
-part of the console implementations, not part of redisplay or Lisp.
-
-Public methods of a console are implemented as C functions declared
-@code{static}, following a rigid naming convention:
-@samp{@var{console-type}_@var{method-name}}.  Methods are bound to the
-console type in the @samp{console_type_create_@var{file}} functions for
-each console component (console, device, and frame) using the
-@samp{CONSOLE_HAS_METHOD} family of macros.  Methods for displaying
-images are bound using the @samp{IIFORMAT_HAS_DEVMETHOD} family of
-macros.  Methods are invoked using the @samp{CONMETH}, @samp{DEVMETH},
-and @samp{FRAMEMETH} families of macros, which look up the relevant
-methods in the object's table of methods.
-
-@strong{N.B.} All of the object tables are actually references to
-console method tables.  To create a variant of an existing console,
-there is a @samp{CONSOLE_INHERITS_METHOD} constructor, but this actually
-constructs the name of the parent's method pointer and stores in the
-derived console type's method table.  Of course this is time-efficient,
-and since there are few console types it is a neglible waste of space.
-However in practice this may have contributed to breaking the various
-abstractions, and the variant console must be coded in the same file as
-the parent (because the methods are static).  Another minor symptom of
-the incompleteness of the abstraction is the fact that the API for
-inheritance of device methods for image formats is named
-@samp{IIFORMAT_HAS_SHARED_METHOD}, although the semantics are identical.
-
-One problem encountered in attempting to create an Xft console type as a
-derivative of the X console type was that there is no support for such
-union types in the consistency-checking code, whether for the
-fundamental Lisp consistency checks (the @samp{CHECK_SOMETHING} family
-of macros) or for the error-checking variants of many functions.  These
-APIs all simply check for the apparent console type, which is a single
-symbol (or enumerator).
-
-To create a new console with mostly new methods, it's probably best to
-copy all of the @file{@var{function}-@var{console-type}} files from a
-similar console (or several, if the new console type seems like a
-combination of several existing console types), renaming the files by
-substituting @var{new-console-type} for @var{console-type}.  Then
-proceed in the obvious way by renaming methods from
-@samp{@var{console-type}_@var{method-name}} to
-@samp{@var{new-console-type}_@var{method-name}}, and implementing them.
-
-Once you've done that, then the fun starts.  Insert the initialization
-functions (@samp{syms_of_@var{file}}, @samp{vars_of_@var{file}},
-@samp{console_type_create_@var{file}}, @emph{etc.}) in @samp{main_1} in
-@file{emacs.c}.
-
-Add a device creation function @samp{make-@var{console-type}-device} in
-@file{device.el}.  Add the device type to the calls to
-@samp{Face-frob-property} in @file{faces.el}, as well as calls to the
-device initializer functions for devices and frames, and ``additional
-frobbing'' in that file.
-
-You may wish to add an option to force the initial frame to that device
-type to @file{emacs.c}.  Don't forget to document it in the command help
-function in @file{startup.el}.
-
-You may need to add support for your console type in
-@samp{init_event_stream} in @file{event-stream.c}.
-
-If your console has a different UI for fonts or colors, or adds new
-capability, you may need to add a @file{@var{console-type}-faces.el}
-file, or add code to the @file{@var{parent-type}-faces.el} file, to
-support new font or color capability.  Probably initialization code in
-@file{faces.c} will be needed too.
-
-A check for the console type is probably needed in @samp{init_redisplay}
-in @file{redisplay.c}.
-
-Ditto for the @file{@var{console-type}-init.el} file.
-
-Don't forget that Emacs windows are console-dependent, too.  At least a
-@samp{WINDOW_@var{console-type}_P}-checking macro should be added in
-@file{window-impl.h}.
-
-Note that this project failed; there are probably many other details to
-be implemented that I didn't get to.  But don't let that stop you!
-
-
-@node Modules for the Basic Displayable Lisp Objects,  , Creating a New Console/Device/Frame Type, Consoles; Devices; Frames; Windows
+@node Modules for the Basic Displayable Lisp Objects,  , The Window Object, Consoles; Devices; Frames; Windows
 @section Modules for the Basic Displayable Lisp Objects
 @cindex modules for the basic displayable Lisp objects
 @cindex displayable Lisp objects, modules for the basic
@@ -17718,7 +17616,190 @@
 types such as scrollbars.
 
 
-@node The Redisplay Mechanism, Extents, Consoles; Devices; Frames; Windows, Top
+@node Window-System Support, The Redisplay Mechanism, Consoles; Devices; Frames; Windows, Top
+@chapter Window-System Support
+@cindex window-system support
+@cindex window systems
+@cindex X
+@cindex X Windows
+@cindex Windows
+@cindex Microsoft Windows
+@cindex MS-Windows
+@cindex GTK
+@cindex Gnome
+
+XEmacs defines the concept of a ``device type'', which approximately
+corresponds to a window-system type, and separates out display-related
+code into device-independent and device-dependent sections.
+Generally, the device-independent code will go into a generally-named
+file such as @file{redisplay.c}, while the device-dependent code goes
+into @file{redisplay-x.c}, @file{redisplay-gtk.c},
+@file{redisplay-msw.c}, etc.  Device-dependent methods are called
+using the @code{DEVMETH} macro.
+
+The following device types are defined:
+
+@table @asis
+@item X-Windows (@code{x})
+This supports rendering through @code{Xlib}, widget support through
+@code{Xt}, and event-handling through @code{Xt}.
+@item Microsoft Windows (@code{msw})
+@item GTK/Gnome (@code{gtk})
+@item TTY's (@code{tty})
+This is used for TTY connections (e.g. running inside of an @code{xterm} or
+Windows console window).
+@item Stream devices (@code{stream})
+This is used for ``stream'' devices, of which there is only one -- the
+initial stdio device used when XEmacs is running noninteractively.
+@end table
+
+In addition, there is a pseudo-device-type `xlike', which is used for
+abstracting X and GTK code that is very similar.
+
+@menu
+* Creating a Window-System Type::  
+@end menu
+
+@node Creating a Window-System Type,  , Window-System Support, Window-System Support
+@section Creating a Window-System Type
+@cindex creating a new window-system type
+@cindex window-system types, creating
+@cindex creating a new console type
+@cindex console types, creating
+@cindex creating a new device type
+@cindex device types, creating
+@cindex creating a new frame type
+@cindex frame types, creating
+
+Unfortunately, at the present time, only the console abstraction is
+really well-maintained.  Device and frame internals are referred to
+from many places in the redisplay and console code.  The best that can
+be done therefore is to create a whole new console type, even though
+much code will be shared.  (Ben Wing has complained about the code
+duplication in the GTK+ v1 console, and probably would not be happy
+with the unpublished Qt console or Andrew Choi's Carbon console, but
+it's hard to see how those consoles could have been done better
+without fixing the abstractions in the X (actually Xt), MS Windows,
+and tty consoles as well as doing a complete refactoring of the
+console, device, and frame code.)
+
+What is desireable is sharing console, device, and frame methods across
+platforms in a more general way, reducing the amount of duplicated code
+by pulling it back into the redisplay engine proper or the Lisp modules
+as appropriate.  For example, we should be able to use
+@samp{make-frame-on-device} to share a single X connection among GTK, X,
+and Xft frames.  Xft is partially implemented, but GTK would be much
+harder (impossible?) because it has its own event loop.  (Xft shares the
+Xt event loop with the X console.)
+
+The way all methods get added to the console type is uncool.  A console
+should be a composite, which indicates a collection of I/O resources
+``used together.''  It should indicate where operations that change
+``focus'' search for targets, @emph{i.e.}, by default new frames are
+created on the selected device of the console where the input that
+invoked the command was received, @samp{pop-to-buffer-other-window} only
+considers existing windows on the same device of the same console,
+@emph{etc.}  But it should be possible to assemble consoles out of
+component input channels, imaging devices, and multimedia (audio)
+channels.
+
+The following notes may provide some guidance to those who wish to
+create new console types (@emph{i.e.}, port the redisplay code to a new
+platform).  They are based on an unsuccessful attempt to refactor the
+Xft code into a new console type while sharing most routines with the X
+console.  (For clarification or suggestions, feel free to write
+@email{stephen@@xemacs.org,Stephen Turnbull}.)
+
+The first thing to realize is that the naming of many modules obscures
+their relationship to the console abstraction.  For example, the
+@file{objects-@var{console-type}}, @file{redisplay-@var{console-type}},
+and @file{glyphs-@var{console-type}} series of modules have nothing to
+do with Lisp objects and little to do with redisplay, respectively.
+Rather they implement abstractions used for rendering on each console
+type, such as fonts and colors (@file{objects}) and string and graphics
+drawing primitives (@file{redisplay}).  These modules are conceptually
+part of the console implementations, not part of redisplay or Lisp.
+
+Public methods of a console are implemented as C functions declared
+@code{static}, following a rigid naming convention:
+@samp{@var{console-type}_@var{method-name}}.  Methods are bound to the
+console type in the @samp{console_type_create_@var{file}} functions for
+each console component (console, device, and frame) using the
+@samp{CONSOLE_HAS_METHOD} family of macros.  Methods for displaying
+images are bound using the @samp{IIFORMAT_HAS_DEVMETHOD} family of
+macros.  Methods are invoked using the @samp{CONMETH}, @samp{DEVMETH},
+and @samp{FRAMEMETH} families of macros, which look up the relevant
+methods in the object's table of methods.
+
+@strong{N.B.} All of the object tables are actually references to
+console method tables.  To create a variant of an existing console,
+there is a @samp{CONSOLE_INHERITS_METHOD} constructor, but this actually
+constructs the name of the parent's method pointer and stores in the
+derived console type's method table.  Of course this is time-efficient,
+and since there are few console types it is a neglible waste of space.
+However in practice this may have contributed to breaking the various
+abstractions, and the variant console must be coded in the same file as
+the parent (because the methods are static).  Another minor symptom of
+the incompleteness of the abstraction is the fact that the API for
+inheritance of device methods for image formats is named
+@samp{IIFORMAT_HAS_SHARED_METHOD}, although the semantics are identical.
+
+One problem encountered in attempting to create an Xft console type as a
+derivative of the X console type was that there is no support for such
+union types in the consistency-checking code, whether for the
+fundamental Lisp consistency checks (the @samp{CHECK_SOMETHING} family
+of macros) or for the error-checking variants of many functions.  These
+APIs all simply check for the apparent console type, which is a single
+symbol (or enumerator).
+
+To create a new console with mostly new methods, it's probably best to
+copy all of the @file{@var{function}-@var{console-type}} files from a
+similar console (or several, if the new console type seems like a
+combination of several existing console types), renaming the files by
+substituting @var{new-console-type} for @var{console-type}.  Then
+proceed in the obvious way by renaming methods from
+@samp{@var{console-type}_@var{method-name}} to
+@samp{@var{new-console-type}_@var{method-name}}, and implementing them.
+
+Once you've done that, then the fun starts.  Insert the initialization
+functions (@samp{syms_of_@var{file}}, @samp{vars_of_@var{file}},
+@samp{console_type_create_@var{file}}, @emph{etc.}) in @samp{main_1} in
+@file{emacs.c}.
+
+Add a device creation function @samp{make-@var{console-type}-device} in
+@file{device.el}.  Add the device type to the calls to
+@samp{Face-frob-property} in @file{faces.el}, as well as calls to the
+device initializer functions for devices and frames, and ``additional
+frobbing'' in that file.
+
+You may wish to add an option to force the initial frame to that device
+type to @file{emacs.c}.  Don't forget to document it in the command help
+function in @file{startup.el}.
+
+You may need to add support for your console type in
+@samp{init_event_stream} in @file{event-stream.c}.
+
+If your console has a different UI for fonts or colors, or adds new
+capability, you may need to add a @file{@var{console-type}-faces.el}
+file, or add code to the @file{@var{parent-type}-faces.el} file, to
+support new font or color capability.  Probably initialization code in
+@file{faces.c} will be needed too.
+
+A check for the console type is probably needed in @samp{init_redisplay}
+in @file{redisplay.c}.
+
+Ditto for the @file{@var{console-type}-init.el} file.
+
+Don't forget that Emacs windows are console-dependent, too.  At least a
+@samp{WINDOW_@var{console-type}_P}-checking macro should be added in
+@file{window-impl.h}.
+
+Note that this project failed; there are probably many other details to
+be implemented that I didn't get to.  But don't let that stop you!
+
+
+
+@node The Redisplay Mechanism, Extents, Window-System Support, Top
 @chapter The Redisplay Mechanism
 @cindex redisplay mechanism, the
 
@@ -28402,8 +28483,8 @@
 @cindex garbage collection, discussion
 
 @menu
-* Discussion -- KKCC::
-* Discussion -- Incremental Collector::
+* Discussion -- KKCC::          
+* Discussion -- Incremental Collector::  
 * Discussion -- Pure Space::    
 * Discussion -- Hashtable-Based Marking and Cleanup::  
 * Discussion -- The Anti-Cons::  
--- a/src/ChangeLog	Mon Feb 01 22:00:29 2010 -0600
+++ b/src/ChangeLog	Wed Feb 03 02:46:50 2010 -0600
@@ -1,3 +1,49 @@
+2010-02-03  Ben Wing  <ben@xemacs.org>
+
+	* Makefile.in.in:
+	* Makefile.in.in (x_objs):
+	* Makefile.in.in (gtk_gui_objs):
+	* console-xlike-inc.h:
+	* depend:
+	* device-x.c:
+	* emacs.c:
+	* gccache-gtk.h:
+	* gccache-gtk.h (gc_cache_lookup):
+	* gccache-x.c:
+	* gccache-x.c (GCCACHE_HASH):
+	* gccache-x.h:
+	* toolbar-gtk.c:
+	* toolbar-gtk.c (gtk_initialize_frame_toolbars):
+	* toolbar-x.c:
+	* toolbar-x.c (x_initialize_frame_toolbars):
+	* toolbar-xlike.c:
+	* toolbar-xlike.c (xlike_draw_blank_toolbar_button):
+	* toolbar-xlike.c (xlike_output_toolbar_button):
+	* toolbar-xlike.c (xlike_get_button_size):
+	* toolbar-xlike.c (XLIKE_OUTPUT_BUTTONS_LOOP):
+	* toolbar-xlike.c (xlike_output_toolbar):
+	* toolbar-xlike.c (xlike_clear_toolbar):
+	* toolbar-xlike.c (xlike_output_frame_toolbars):
+	* toolbar-xlike.c (xlike_clear_frame_toolbars):
+	* toolbar-xlike.c (xlike_redraw_exposed_toolbar):
+	* toolbar-xlike.c (xlike_redraw_exposed_toolbars):
+	* toolbar-xlike.c (xlike_redraw_frame_toolbars):
+	* toolbar-xlike.h:
+	* toolbar-xlike.h (xlike_clear_frame_toolbars):
+	Rename some files to make them consistent with general naming rules:
+	
+	xgccache.c -> gccache-x.c
+	xgccache.h -> gccache-x.h
+	toolbar-common.c -> toolbar-xlike.c
+	toolbar-common.h -> toolbar-xlike.h
+
+	Fix include-file references.  Also change the names of functions
+	in now-named toolbar-xlike.c to be xlike_foo() instead of common_foo().
+
+	Add a longish comment in console-xlike-inc.h describing the "xlike"
+	system, how it works and what the various files are used for.
+	
+
 2010-02-01  Ben Wing  <ben@xemacs.org>
 
 	* Makefile.in.in:
--- a/src/Makefile.in.in	Mon Feb 01 22:00:29 2010 -0600
+++ b/src/Makefile.in.in	Wed Feb 03 02:46:50 2010 -0600
@@ -132,13 +132,13 @@
 
 #ifdef HAVE_X_WINDOWS
 x_objs=console-x.o device-x.o event-Xt.o frame-x.o \
- glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o intl-x.o
+ glyphs-x.o objects-x.o redisplay-x.o select-x.o gccache-x.o intl-x.o
 #ifdef HAVE_XFT
 x_objs += font-mgr.o
 #endif
 x_gui_objs=$(gui_objs:.o=-x.o)
 #ifdef HAVE_TOOLBARS
-x_gui_objs += toolbar-common.o
+x_gui_objs += toolbar-xlike.o
 #endif
 #endif
 
@@ -159,7 +159,7 @@
  gtk-xemacs.o ui-gtk.o
 gtk_gui_objs=$(gui_objs:.o=-gtk.o)
 #ifdef HAVE_TOOLBARS
-gtk_gui_objs += toolbar-common.o
+gtk_gui_objs += toolbar-xlike.o
 #endif
 #endif
 
--- a/src/console-xlike-inc.h	Mon Feb 01 22:00:29 2010 -0600
+++ b/src/console-xlike-inc.h	Wed Feb 03 02:46:50 2010 -0600
@@ -34,17 +34,29 @@
    would lead to a large number of very small functions and very
    hard-to-read code.
 
-   Instead, we handle the situation by having only one copy, placed in a
-   file called *-xlike-inc.c (e.g. redisplay-xlike-inc.c) and
-   conditionalizing using ifdefs.  Because we can compile with both X and
-   GTK at once, we include this file inside of the appropriate
-   device-specific file (e.g. redisplay-gtk.c or redisplay-x.c).  The `inc'
-   in *-xlike-inc.c indicates that this is a file meant to be included in
-   another file, despite the fact that it is a .c file.
+   Instead, we handle the situation by the following:
+
+   (1) In cases where there are lots of individual differences, we have
+   only one copy, placed in a file called *-xlike-inc.c
+   (e.g. redisplay-xlike-inc.c), and conditionalize using ifdefs.  Because
+   we can compile with both X and GTK at once, we include this file inside
+   of the appropriate device-specific file (e.g. redisplay-gtk.c or
+   redisplay-x.c).  The `inc' in *-xlike-inc.c indicates that this is a
+   file meant to be included in another file, despite the fact that it is a
+   .c file.
 
    To signal which variety of "xlike" we are compiling for, either
    THIS_IS_X or THIS_IS_GTK needs to be defined, prior to including the
-   *-xlike-inc.c file. */
+   *-xlike-inc.c file.
+
+   (2) For code that is identical in both versions, or where it's possible
+   to have only one copy at runtime through some other means, we name
+   the file *-xlike.c.  This is a normal file, not included in some other
+   file.  An example of "other means" is toolbar-xlike.c, where all
+   functions are passed a frame or device, and it's possible to do run-time
+   conditionalization based on the device type. (This isn't currently the
+   case but will be soon once the related changes from my `hg-fixup'
+   workspace are checked in. --ben) */
 
 
 /* About the representation of color below:
@@ -72,7 +84,7 @@
 #ifdef THIS_IS_X
 #  include "console-x-impl.h"
 #  ifdef NEED_GCCACHE_H
-#    include "xgccache.h"
+#    include "gccache-x.h"
 #  endif
 #  ifdef NEED_GLYPHS_H
 #    include "glyphs-x.h"
--- a/src/depend	Mon Feb 01 22:00:29 2010 -0600
+++ b/src/depend	Wed Feb 03 02:46:50 2010 -0600
@@ -15,25 +15,26 @@
 #endif
 
 #if defined(HAVE_MS_WINDOWS)
-console-msw.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h
-device-msw.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-msw.h objects.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h systime.h syswindows.h text.h vdb.h
+console-msw.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h
+device-msw.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-msw.h objects.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h systime.h syswindows.h text.h vdb.h
 dialog-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
 dired-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console-msw.h console.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h regex.h symeval.h symsinit.h syntax.h sysdir.h sysfile.h sysfloat.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h
-event-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream-impl.h console-stream.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswait.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
-frame-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+event-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console-stream-impl.h console-stream.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h process.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswait.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+frame-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
 glyphs-msw.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
-gui-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
-menubar-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+gui-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+menubar-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
 objects-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device-impl.h device.h devslots.h dumper.h elhash.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h opaque.h specifier.h symeval.h symsinit.h syswindows.h text.h vdb.h
-redisplay-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h debug.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gutter.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
-scrollbar-msw.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+redisplay-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h debug.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gutter.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+scrollbar-msw.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h dumper.h elhash.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar-msw.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
 select-msw.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h select.h specifier.h symeval.h symsinit.h syswindows.h text.h vdb.h
 toolbar-msw.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h device.h dumper.h elhash.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-msw.h glyphs.h gui.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syswindows.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
 #endif
 #if defined(HAVE_XLIKE)
 event-xlike-inc.o: 
-objects-xlike-inc.o: $(LWLIB_SRCDIR)/lwlib.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h gccache-gtk.h glyphs-gtk.h glyphs-x.h glyphs.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h sysgtk.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h
-redisplay-xlike-inc.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysgtk.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
+objects-xlike-inc.o: $(LWLIB_SRCDIR)/lwlib.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h gccache-gtk.h gccache-x.h glyphs-gtk.h glyphs-x.h glyphs.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h sysgtk.h window-impl.h window.h winslots.h xintrinsic.h
+redisplay-xlike-inc.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h gccache-x.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysgtk.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
+toolbar-xlike.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h text.h toolbar-xlike.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
 #endif
 #if defined(HAVE_X_WINDOWS)
 EmacsFrame.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
@@ -43,51 +44,51 @@
 balloon-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h balloon_help.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h
 balloon_help.o: $(CONFIG_H) balloon_help.h compiler.h xintrinsic.h
 console-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h
-device-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h
-dialog-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h xintrinsic.h
-frame-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
+device-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-x.h general-slots.h glyphs-x.h glyphs.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h
+dialog-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h xintrinsic.h
+frame-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h EmacsManager.h EmacsShell.h ExternalShell.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gutter.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
+gccache-x.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h gccache-x.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 glyphs-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h opaque.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h
-gui-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h glyphs.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h
+gui-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h glyphs.h gui.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xmotif.h
 intl-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h compiler.h console-x.h console.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h xintrinsic.h
-menubar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
-objects-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h device-impl.h device.h devslots.h dumper.h elhash.h font-mgr.h gc.h gccache-gtk.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects-xlike-inc.c objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h text.h vdb.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h
-redisplay-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay-xlike-inc.c redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysgtk.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
+menubar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
+objects-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h device-impl.h device.h devslots.h dumper.h elhash.h font-mgr.h gc.h gccache-gtk.h gccache-x.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects-xlike-inc.c objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
+redisplay-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h gccache-x.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay-xlike-inc.c redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysgtk.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
 scrollbar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar-x.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
 select-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h opaque.h redisplay.h select-common.h select.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h xintrinsic.h xmotif.h
-toolbar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar-common.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
-xgccache.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h xgccache.h
+toolbar-x.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h charset.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar-xlike.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
 #endif
 #if defined(HAVE_TTY)
 console-tty.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h dumper.h elhash.h faces.h file-coding.h frame.h gc.h general-slots.h glyphs.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systty.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
-device-tty.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h systty.h syswindows.h text.h vdb.h
-event-tty.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h syswait.h text.h vdb.h
-frame-tty.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h systime.h systty.h text.h vdb.h
+device-tty.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h systty.h syswindows.h text.h vdb.h
+event-tty.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h syswait.h text.h vdb.h
+frame-tty.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h systime.h systty.h text.h vdb.h
 objects-tty.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h specifier.h symeval.h symsinit.h systty.h text.h vdb.h
-redisplay-tty.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h text.h vdb.h window-impl.h window.h winslots.h
+redisplay-tty.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-tty-impl.h objects-tty.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h systty.h text.h vdb.h window-impl.h window.h winslots.h
 #endif
 #if defined(HAVE_GTK)
 console-gtk.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysgtk.h text.h vdb.h
-device-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h general-slots.h glyphs-gtk.h glyphs.h gtk-xemacs.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysgdkx.h sysgtk.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
-dialog-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h events.h frame.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h systime.h text.h vdb.h window.h
+device-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h general-slots.h glyphs-gtk.h glyphs.h gtk-xemacs.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysgdkx.h sysgtk.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+dialog-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h events.h frame.h gc.h general-slots.h gui.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h systime.h text.h vdb.h window.h
 emacs-marshals.o: hash.h
 emacs-widget-accessors.o: 
-event-gtk.o: $(CONFIG_H) $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gtk-xemacs.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgdkx.h sysgtk.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h window.h
-frame-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h gtk-xemacs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysgdkx.h sysgtk.h systime.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h
+event-gtk.o: $(CONFIG_H) $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gtk-xemacs.h gui.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgdkx.h sysgtk.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h window.h
+frame-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h gtk-xemacs.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysgdkx.h sysgtk.h systime.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h
 gccache-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h gccache-gtk.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysgtk.h text.h vdb.h
 glade.o: bytecode.h
-glyphs-gtk.o: $(CONFIG_H) $(LISP_H) bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysfile.h sysgdkx.h sysgtk.h systime.h syswindows.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h
+glyphs-gtk.o: $(CONFIG_H) $(LISP_H) bitmaps.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h gui.h imgproc.h insdel.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysfile.h sysgdkx.h sysgtk.h systime.h syswindows.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h
 gtk-glue.o: console-gtk.h console.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h specifier.h sysgtk.h
 gtk-xemacs.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gtk-xemacs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h text.h vdb.h window-impl.h window.h winslots.h
 gui-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h specifier.h symeval.h symsinit.h sysgtk.h text.h vdb.h
-menubar-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysgtk.h systime.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h
+menubar-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysgtk.h systime.h text.h ui-gtk.h vdb.h window-impl.h window.h winslots.h
 native-gtk-toolbar.o: $(CONFIG_H) $(LISP_H) charset.h compiler.h console-gtk.h console.h dumper.h faces.h frame.h gc.h general-slots.h glyphs-gtk.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
-objects-gtk.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h device-impl.h device.h devslots.h dumper.h gc.h gccache-gtk.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects-xlike-inc.c objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgdkx.h sysgtk.h text.h vdb.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h
-redisplay-gtk.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay-xlike-inc.c redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysgtk.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xgccache.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
+objects-gtk.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h device-impl.h device.h devslots.h dumper.h gc.h gccache-gtk.h gccache-x.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects-xlike-inc.c objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgdkx.h sysgtk.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
+redisplay-gtk.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h EmacsFrameP.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console-xlike-inc.h console.h debug.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h gccache-gtk.h gccache-x.h general-slots.h glyphs-gtk.h glyphs-x.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h mule-ccl.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects-x-impl.h objects-x.h objects.h redisplay-xlike-inc.c redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysgdkx.h sysgtk.h sysproc.h syssignal.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h xmprimitivep.h
 scrollbar-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-gtk.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar-gtk.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h text.h vdb.h window-impl.h window.h winslots.h
-select-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h select-common.h select.h specifier.h symeval.h symsinit.h sysgtk.h systime.h text.h vdb.h
-toolbar-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h sysgtk.h text.h toolbar-common.h vdb.h
+select-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h select-common.h select.h specifier.h symeval.h symsinit.h sysgtk.h systime.h text.h vdb.h
+toolbar-gtk.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h sysgtk.h text.h toolbar-xlike.h vdb.h
 ui-byhand.o: gui.h
-ui-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device.h dumper.h elhash.h emacs-marshals.c emacs-widget-accessors.c events.h faces.h gc.h general-slots.h glade.c glyphs-gtk.h glyphs.h gtk-glue.c gui.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysgtk.h systime.h text.h ui-byhand.c ui-gtk.h vdb.h window-impl.h window.h winslots.h
+ui-gtk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console.h device.h dumper.h elhash.h emacs-marshals.c emacs-widget-accessors.c events.h faces.h gc.h general-slots.h glade.c glyphs-gtk.h glyphs.h gtk-glue.c gui.h hash.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-gtk-impl.h objects-gtk.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdll.h sysgtk.h systime.h text.h ui-byhand.c ui-gtk.h vdb.h window-impl.h window.h winslots.h
 #endif
 #if defined(HAVE_DATABASE)
 database.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h database.h dumper.h file-coding.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
@@ -106,56 +107,56 @@
 extw-Xt.o: $(CONFIG_H) compiler.h extw-Xlib.h extw-Xt.h
 #endif
 abbrev.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h syntax.h text.h vdb.h window.h
-alloc.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console.h device.h dumper.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+alloc.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console.h device.h dumper.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
 alloca.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 alsaplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
 blocktype.o: $(CONFIG_H) $(LISP_H) blocktype.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 buffer.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h select.h specifier.h symeval.h symsinit.h syntax.h sysdir.h sysfile.h syswindows.h text.h vdb.h window.h
 bytecode.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h scrollbar.h symeval.h symsinit.h syntax.h text.h vdb.h window.h
-callint.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h events.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h
+callint.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h events.h gc.h general-slots.h insdel.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h
 casefiddle.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h
 casetab.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h
 chartab.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h
 cm.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h systty.h text.h vdb.h
-cmdloop.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-msw.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window.h
+cmdloop.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-msw.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h syswindows.h text.h vdb.h window.h
 cmds.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h extents.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h
-console-stream.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h systty.h syswindows.h text.h vdb.h window.h
-console.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h systty.h text.h vdb.h window.h
+console-stream.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h systty.h syswindows.h text.h vdb.h window.h
+console.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h systime.h systty.h text.h vdb.h window.h
 data.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfloat.h syssignal.h text.h vdb.h
 debug.o: $(CONFIG_H) $(LISP_H) bytecode.h compiler.h debug.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
-device.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h text.h toolbar.h vdb.h window.h
+device.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h syssignal.h systime.h text.h toolbar.h vdb.h window.h
 dialog.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h
 dired.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h dumper.h elhash.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h opaque.h regex.h symeval.h symsinit.h syntax.h sysdep.h sysdir.h sysfile.h syspwd.h systime.h syswindows.h text.h vdb.h
-doc.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
+doc.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
 doprnt.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 dragdrop.o: $(CONFIG_H) $(LISP_H) compiler.h dragdrop.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 dump-data.o: $(CONFIG_H) $(LISP_H) compiler.h dump-data.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 dumper.o: $(CONFIG_H) $(LISP_H) coding-system-slots.h compiler.h console-stream.h console.h dump-data.h dumper.h elhash.h file-coding.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
 dynarr.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 ecrt0.o: $(CONFIG_H)
-editfns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h window.h
+editfns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h keymap-buttons.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h window.h
 elhash.o: $(CONFIG_H) $(LISP_H) bytecode.h compiler.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h
 emacs.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h console-msw.h console.h dump-data.h dumper.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h paths.h process.h redisplay.h symeval.h symsinit.h sysdep.h sysdll.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h text.h vdb.h
 emodules.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h dumper.h emodules.h file-coding.h frame.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdll.h text.h vdb.h window.h
 esd.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h miscplay.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
 eval.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device.h dumper.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window.h
-event-Xt.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-tty.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h
-event-stream.o: $(CONFIG_H) $(LISP_H) backtrace.h blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h insdel.h intl-auto-encap-win32.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h macros.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
-event-unixoid.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h text.h vdb.h
-events.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h events.h extents.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h systty.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
-extents.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h debug.h device.h dumper.h elhash.h extents-impl.h extents.h faces.h frame.h gc.h general-slots.h glyphs.h gutter.h insdel.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
+event-Xt.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h Emacs.ad.h EmacsFrame.h blocktype.h charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-tty.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dragdrop.h dumper.h elhash.h event-xlike-inc.c events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-x.h objects.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h xintrinsicp.h xmotif.h
+event-stream.o: $(CONFIG_H) $(LISP_H) backtrace.h blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h events.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h insdel.h intl-auto-encap-win32.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h macros.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+event-unixoid.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswindows.h text.h vdb.h
+events.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device.h dumper.h events.h extents.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h systty.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
+extents.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h debug.h device.h dumper.h elhash.h extents-impl.h extents.h faces.h frame.h gc.h general-slots.h glyphs.h gutter.h insdel.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
 faces.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h extents-impl.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
 file-coding.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h extents.h file-coding.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h rangetab.h symeval.h symsinit.h text.h vdb.h
-fileio.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h device.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h profile.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+fileio.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h device.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h profile.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
 filelock.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h paths.h symeval.h symsinit.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h
 filemode.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
 floatfns.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfloat.h syssignal.h text.h vdb.h
-fns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h events.h extents.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h redisplay.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h
+fns.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h events.h extents.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h redisplay.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h
 font-lock.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h
 font-mgr.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h font-mgr.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-x-impl.h objects-x.h objects.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h
-frame.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
+frame.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h extents.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h gutter.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
 free-hook.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
-gc.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console.h device.h dumper.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
+gc.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console-stream.h console.h device.h dumper.h elhash.h events.h extents-impl.h extents.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h systime.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
 general.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 getloadavg.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
 glyphs-eimage.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h file-coding.h frame.h gc.h general-slots.h glyphs.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
@@ -163,22 +164,22 @@
 glyphs-widget.o: $(CONFIG_H) $(LISP_H) bytecode.h charset.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame.h gc.h general-slots.h glyphs.h gui.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h opaque.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
 glyphs.o: $(CONFIG_H) $(LISP_H) blocktype.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
 gmalloc.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysdep.h text.h vdb.h
-gpmevent.o: $(CONFIG_H) $(LISP_H) commands.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h gpmevent.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h
+gpmevent.o: $(CONFIG_H) $(LISP_H) commands.h compiler.h conslots.h console-impl.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h gpmevent.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysproc.h syssignal.h systime.h systty.h text.h vdb.h
 gui.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h dumper.h elhash.h gc.h general-slots.h gui.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h redisplay.h symeval.h symsinit.h text.h vdb.h
 gutter.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
 hash.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 hpplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h text.h vdb.h
 imgproc.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h imgproc.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 indent.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h extents.h faces.h frame.h gc.h general-slots.h glyphs.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
-inline.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk.h console-impl.h console-msw.h console.h database.h device-impl.h device.h devslots.h dumper.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h font-mgr.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gui.h intl-auto-encap-win32.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h process.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syntax.h sysdll.h sysfile.h sysgtk.h systime.h syswindows.h text.h toolbar.h tooltalk.h ui-gtk.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
+inline.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h conslots.h console-gtk.h console-impl.h console-msw.h console.h database.h device-impl.h device.h devslots.h dumper.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h font-mgr.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs-x.h glyphs.h gui.h intl-auto-encap-win32.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h process.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syntax.h sysdll.h sysfile.h sysgtk.h systime.h syswindows.h text.h toolbar.h tooltalk.h ui-gtk.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
 input-method-motif.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h specifier.h symeval.h symsinit.h text.h vdb.h xintrinsic.h xmotif.h
-input-method-xlib.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
+input-method-xlib.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h EmacsFrame.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
 insdel.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h console.h device.h dumper.h extents.h frame.h gc.h general-slots.h insdel.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h symeval.h symsinit.h text.h vdb.h
 intl-auto-encap-win32.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syswindows.h text.h vdb.h
 intl-encap-win32.o: $(CONFIG_H) $(LISP_H) compiler.h console-msw.h console.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syswindows.h text.h vdb.h
 intl-win32.o: $(CONFIG_H) $(LISP_H) charset.h coding-system-slots.h compiler.h conslots.h console-impl.h console-msw-impl.h console-msw.h console.h dumper.h elhash.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects-msw-impl.h objects-msw.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h syswindows.h text.h vdb.h window-impl.h window.h winslots.h
 intl.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
-keymap.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h dumper.h elhash.h events.h extents.h frame.h gc.h general-slots.h insdel.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h
+keymap.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h dumper.h elhash.h events.h extents.h frame.h gc.h general-slots.h insdel.h keymap-buttons.h keymap-slots.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h
 lastfile.o: $(CONFIG_H)
 libinterface.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h libinterface.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 libsst.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h libsst.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
@@ -186,12 +187,12 @@
 linuxplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h miscplay.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syssignal.h systty.h syswindows.h text.h vdb.h
 lread.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h profile.h symeval.h symsinit.h sysfile.h sysfloat.h syswindows.h text.h vdb.h
 lstream.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
-macros.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h macros.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h
+macros.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device.h dumper.h events.h frame.h gc.h general-slots.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h macros.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window.h
 marker.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 mc-alloc.o: $(CONFIG_H) $(LISP_H) blocktype.h compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 md5.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
-menubar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
-minibuf.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-stream.h console.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h
+menubar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h gui.h keymap-buttons.h keymap.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
+minibuf.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console-stream.h console.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h insdel.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systime.h text.h vdb.h window-impl.h window.h winslots.h
 miscplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h miscplay.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h syssignal.h syswindows.h text.h vdb.h
 nas.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysdep.h syssignal.h text.h vdb.h
 nt.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h symeval.h symsinit.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h syswindows.h text.h vdb.h
@@ -203,22 +204,22 @@
 objects.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h elhash.h faces.h frame.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects-impl.h objects.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h systty.h text.h vdb.h window-impl.h window.h winslots.h
 opaque.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h
 print.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h bytecode.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-msw.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h extents.h frame.h gc.h general-slots.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h redisplay.h specifier.h symeval.h symsinit.h sysfile.h systty.h syswindows.h text.h vdb.h
-process-nt.o: $(CONFIG_H) $(LISP_H) compiler.h console-msw.h console.h dumper.h events.h gc.h general-slots.h hash.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process-slots.h process.h procimpl.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h
-process-unix.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h hash.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h
-process.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h console.h device.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h hash.h insdel.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h
+process-nt.o: $(CONFIG_H) $(LISP_H) compiler.h console-msw.h console.h dumper.h events.h gc.h general-slots.h hash.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h process-slots.h process.h procimpl.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h
+process-unix.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h console.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h hash.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h
+process.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h console.h device.h dumper.h events.h file-coding.h frame.h gc.h general-slots.h hash.h insdel.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h process-slots.h process.h procimpl.h redisplay.h scrollbar.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h
 profile.o: $(CONFIG_H) $(LISP_H) backtrace.h bytecode.h compiler.h dumper.h elhash.h gc.h general-slots.h hash.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h syssignal.h systime.h text.h vdb.h
 ralloc.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h getpagesize.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 rangetab.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h rangetab.h symeval.h symsinit.h text.h vdb.h
 realpath.o: $(CONFIG_H) $(LISP_H) backtrace.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h sysdir.h sysfile.h syswindows.h text.h vdb.h
 redisplay-output.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
-redisplay.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console-tty.h console.h debug.h device-impl.h device.h devslots.h dumper.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h gutter.h insdel.h intl-auto-encap-win32.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h systime.h systty.h syswindows.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
+redisplay.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h commands.h compiler.h conslots.h console-impl.h console-tty.h console.h debug.h device-impl.h device.h devslots.h dumper.h elhash.h events.h extents-impl.h extents.h faces.h file-coding.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gui.h gutter.h insdel.h intl-auto-encap-win32.h keymap-buttons.h line-number.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h menubar.h number-gmp.h number-mp.h number.h objects-impl.h objects.h opaque.h process.h profile.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysfile.h systime.h systty.h syswindows.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
 regex.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h regex.h symeval.h symsinit.h syntax.h text.h vdb.h
 scrollbar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h commands.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h gutter.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
 search.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h insdel.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h regex.h symeval.h symsinit.h syntax.h text.h vdb.h
 select.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h extents.h frame.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h objects.h opaque.h redisplay.h select.h specifier.h symeval.h symsinit.h text.h vdb.h
 sgiplay.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h libst.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sound.h symeval.h symsinit.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h
 sheap.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h sheap-adjust.h symeval.h symsinit.h sysfile.h syswindows.h text.h vdb.h
-signal.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h syswindows.h text.h vdb.h
+signal.o: $(CONFIG_H) $(LISP_H) compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h events.h frame-impl.h frame.h frameslots.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h redisplay.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h syssignal.h systime.h syswindows.h text.h vdb.h
 sound.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h sound.h specifier.h symeval.h symsinit.h sysdep.h sysfile.h sysproc.h syssignal.h systime.h syswindows.h text.h vdb.h xintrinsic.h
 specifier.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h rangetab.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h vdb.h window-impl.h window.h winslots.h
 strcat.o: $(CONFIG_H)
@@ -227,13 +228,12 @@
 sunpro.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 symbols.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h specifier.h symeval.h symsinit.h text.h vdb.h
 syntax.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h extents.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h syntax.h text.h vdb.h
-sysdep.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h
+sysdep.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console-stream-impl.h console-stream.h console-tty-impl.h console-tty.h console.h device-impl.h device.h devslots.h dumper.h events.h frame.h gc.h general-slots.h intl-auto-encap-win32.h keymap-buttons.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h ndir.h number-gmp.h number-mp.h number.h process.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysdep.h sysdir.h sysfile.h sysproc.h syspwd.h syssignal.h systime.h systty.h syswait.h syswindows.h text.h vdb.h window.h
 sysdll.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h intl-auto-encap-win32.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h sysdll.h sysfile.h syswindows.h text.h vdb.h
 termcap.o: $(CONFIG_H) $(LISP_H) compiler.h console.h device.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
 terminfo.o: $(CONFIG_H)
 tests.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h elhash.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h opaque.h symeval.h symsinit.h text.h vdb.h
 text.o: $(CONFIG_H) $(LISP_H) backtrace.h buffer.h bufslots.h casetab.h charset.h chartab.h coding-system-slots.h compiler.h dumper.h file-coding.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h lstream.h mc-alloc.h number-gmp.h number-mp.h number.h profile.h symeval.h symsinit.h text.h vdb.h
-toolbar-common.o: $(CONFIG_H) $(LISP_H) $(LWLIB_SRCDIR)/lwlib.h charset.h compiler.h conslots.h console-gtk-impl.h console-gtk.h console-impl.h console-x-impl.h console-x.h console.h device-impl.h device.h devslots.h dumper.h faces.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h sysgtk.h text.h toolbar-common.h toolbar.h vdb.h window-impl.h window.h winslots.h xintrinsic.h
 toolbar.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h conslots.h console-impl.h console.h device-impl.h device.h devslots.h dumper.h frame-impl.h frame.h frameslots.h gc.h general-slots.h glyphs.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h redisplay.h scrollbar.h specifier.h symeval.h symsinit.h text.h toolbar.h vdb.h window-impl.h window.h winslots.h
 tooltalk.o: $(CONFIG_H) $(LISP_H) buffer.h bufslots.h casetab.h charset.h chartab.h compiler.h dumper.h elhash.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h process.h symeval.h symsinit.h syssignal.h text.h tooltalk.h vdb.h
 tparam.o: $(CONFIG_H) $(LISP_H) compiler.h dumper.h gc.h general-slots.h lisp-disunion.h lisp-union.h lisp.h lrecord.h mc-alloc.h number-gmp.h number-mp.h number.h symeval.h symsinit.h text.h vdb.h
--- a/src/device-x.c	Mon Feb 01 22:00:29 2010 -0600
+++ b/src/device-x.c	Wed Feb 03 02:46:50 2010 -0600
@@ -53,7 +53,7 @@
 #include <X11/CoreP.h>		/* Numerous places access the fields of
 				   a core widget directly.  We could
 				   use XtGetValues(), but ... */
-#include "xgccache.h"
+#include "gccache-x.h"
 #include <X11/Shell.h>
 #include <X11/Xmu/Error.h>
 
--- a/src/emacs.c	Mon Feb 01 22:00:29 2010 -0600
+++ b/src/emacs.c	Wed Feb 03 02:46:50 2010 -0600
@@ -391,7 +391,7 @@
      sysdep.c (maybe; wait_for_termination)
      unexec.c
      unicode.c
-     xgccache.c (a bit)
+     gccache-x.c (a bit)
 
      #### review .h files; write a perl program to look for long comments
      throughout the files, ignoring stuff inside of DEFUN's.
--- a/src/gccache-gtk.h	Mon Feb 01 22:00:29 2010 -0600
+++ b/src/gccache-gtk.h	Wed Feb 03 02:46:50 2010 -0600
@@ -1,4 +1,4 @@
-/* Efficient caching of X GCs (graphics contexts).
+/* Efficient caching of GTK GCs (graphics contexts).
    Copyright (C) 1993 Free Software Foundation, Inc.
 
 
@@ -34,4 +34,4 @@
 void free_gc_cache (struct gc_cache *cache);
 GdkGC *gc_cache_lookup (struct gc_cache *, GdkGCValues *, unsigned long mask);
 
-#endif /* _XGCCACHE_H_ */
+#endif /* _GCCACHE_GTK_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gccache-x.c	Wed Feb 03 02:46:50 2010 -0600
@@ -0,0 +1,362 @@
+/* Efficient caching of X GCs (graphics contexts).
+   Copyright (C) 1993 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
+
+This file is part of XEmacs.
+
+XEmacs 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 2, or (at your option) any
+later version.
+
+XEmacs is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with XEmacs; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Synched up with: Not in FSF. */
+
+/* Emacs uses a lot of different display attributes; for example, assume
+   that only four fonts are in use (normal, bold, italic, and bold-italic).
+   Then assume that one stipple or background is used for text selections,
+   and another is used for highlighting mousable regions.  That makes 16
+   GCs already.  Add in the fact that another GC may be needed to display
+   the text cursor in any of those regions, and you've got 32.  Add in
+   more fonts, and it keeps increasing exponentially.
+
+   We used to keep these GCs in a cache of merged (fully qualified) faces.
+   However, a lot of other code in xterm.c used XChangeGC of existing GCs,
+   which is kind of slow and kind of random.  Also, managing the face cache
+   was tricky because it was hard to know when a face was no longer visible
+   on the frame -- we had to mark all frames as garbaged whenever a face
+   was changed, which caused an unpleasant amount of flicker (since faces are
+   created/destroyed (= changed) whenever a frame is created/destroyed.
+
+   So this code maintains a cache at the GC level instead of at the face
+   level.  There is an upper limit on the size of the cache, after which we
+   will stop creating GCs and start reusing them (reusing the least-recently-
+   used ones first).  So if faces get changed, their GCs will eventually be
+   recycled.  Also more sharing of GCs is possible.
+
+   This code uses hash tables.  It could be that, if the cache size is small
+   enough, a linear search might be faster; but I doubt it, since we need
+   `equal' comparisons, not `eq', and I expect that the optimal cache size
+   will be ~100.
+
+   Written by jwz, 14 jun 93
+ */
+
+#include <config.h>
+#include "lisp.h"
+#include "hash.h"
+
+#include "gccache-x.h"
+
+#define GC_CACHE_SIZE 100
+
+#define GCCACHE_HASH
+
+struct gcv_and_mask {
+  XGCValues gcv;
+  unsigned long mask;
+};
+
+struct gc_cache_cell {
+  GC gc;
+  struct gcv_and_mask gcvm;
+  struct gc_cache_cell *prev, *next;
+};
+
+struct gc_cache {
+  Display *dpy;		/* used only as arg to XCreateGC/XFreeGC */
+  Window window;	/* used only as arg to XCreateGC */
+  int size;
+  struct gc_cache_cell *head;
+  struct gc_cache_cell *tail;
+#ifdef GCCACHE_HASH
+  struct hash_table *table;
+#endif
+
+  int create_count;
+  int delete_count;
+};
+
+#ifdef GCCACHE_HASH
+static Hashcode
+gc_cache_hash (const void *arg)
+{
+  const struct gcv_and_mask *gcvm = (const struct gcv_and_mask *) arg;
+  unsigned long *longs = (unsigned long *) &gcvm->gcv;
+  Hashcode hash = gcvm->mask;
+  int i;
+  /* This could look at the mask and only use the used slots in the
+     hash code.  That would win in that we wouldn't have to initialize
+     every slot of the gcv when calling gc_cache_lookup.  But we need
+     the hash function to be as fast as possible; some timings should
+     be done. */
+  for (i = 0; i < (int) (sizeof (XGCValues) / sizeof (unsigned long)); i++)
+    hash = (hash << 1) ^ *longs++;
+  return hash;
+}
+
+#endif /* GCCACHE_HASH */
+
+static int
+gc_cache_eql (const void *arg1, const void *arg2)
+{
+  /* See comment in gc_cache_hash */
+  return !memcmp (arg1, arg2, sizeof (struct gcv_and_mask));
+}
+
+struct gc_cache *
+make_gc_cache (Display *dpy, Window window)
+{
+  struct gc_cache *cache = xnew (struct gc_cache);
+  cache->dpy = dpy;
+  cache->window = window;
+  cache->size = 0;
+  cache->head = cache->tail = 0;
+  cache->create_count = cache->delete_count = 0;
+#ifdef GCCACHE_HASH
+  cache->table =
+    make_general_hash_table (GC_CACHE_SIZE, gc_cache_hash, gc_cache_eql);
+#endif
+  return cache;
+}
+
+void
+free_gc_cache (struct gc_cache *cache)
+{
+  struct gc_cache_cell *rest, *next;
+  rest = cache->head;
+  while (rest)
+    {
+      XFreeGC (cache->dpy, rest->gc);
+      next = rest->next;
+      xfree (rest, struct gc_cache_cell *);
+      rest = next;
+    }
+#ifdef GCCACHE_HASH
+  free_hash_table (cache->table);
+#endif
+  xfree (cache, struct gc_cache *);
+}
+
+GC
+gc_cache_lookup (struct gc_cache *cache, XGCValues *gcv, unsigned long mask)
+{
+  struct gc_cache_cell *cell, *next, *prev;
+  struct gcv_and_mask gcvm;
+
+#ifdef DEBUG_XEMACS
+  (void) describe_gc_cache (cache, DGCCFLAG_DISABLE);
+#endif
+
+  if ((!!cache->head) != (!!cache->tail)) ABORT ();
+  if (cache->head && (cache->head->prev || cache->tail->next)) ABORT ();
+
+  gcvm.mask = mask;
+  gcvm.gcv = *gcv;	/* this copies... */
+
+#ifdef GCCACHE_HASH
+
+  /* The intermediate cast fools gcc into not outputting strict-aliasing
+     complaints */
+  if (gethash (&gcvm, cache->table, (const void **) (void *) &cell))
+
+#else /* !GCCACHE_HASH */
+
+  cell = cache->tail;	/* start at the end (most recently used) */
+  while (cell)
+    {
+      if (gc_cache_eql (&gcvm, &cell->gcvm))
+	break;
+      else
+	cell = cell->prev;
+    }
+
+  /* #### This whole file needs some serious overhauling. */
+  if (!(mask | GCTile) && cell->gc->values.tile)
+    cell = 0;
+  else if (!(mask | GCStipple) && cell->gc->values.stipple)
+    cell = 0;
+
+  if (cell)
+
+#endif /* !GCCACHE_HASH */
+
+    {
+      /* Found a cell.  Move this cell to the end of the list, so that it
+	 will be less likely to be collected than a cell that was accessed
+	 less recently.
+       */
+#if 0
+      debug_out ("Returning cached GC: %08lx\n", XE_GCONTEXT(cell));
+#endif
+      if (cell == cache->tail)
+	return cell->gc;
+
+      next = cell->next;
+      prev = cell->prev;
+      if (prev) prev->next = next;
+      if (next) next->prev = prev;
+      if (cache->head == cell) cache->head = next;
+      cell->next = 0;
+      cell->prev = cache->tail;
+      cache->tail->next = cell;
+      cache->tail = cell;
+      if (cache->head == cell) ABORT ();
+      if (cell->next) ABORT ();
+      if (cache->head->prev) ABORT ();
+      if (cache->tail->next) ABORT ();
+      return cell->gc;
+    }
+
+  /* else, cache miss. */
+
+  if (cache->size == GC_CACHE_SIZE)
+    /* Reuse the first cell on the list (least-recently-used).
+       Remove it from the list, and unhash it from the table.
+     */
+    {
+      cell = cache->head;
+      cache->head = cell->next;
+      cache->head->prev = 0;
+      if (cache->tail == cell) cache->tail = 0; /* only one */
+#if 0
+      debug_out ("Cache full, freeing GC: %08lx\n  ", XE_GCONTEXT(cell));
+#endif
+      XFreeGC (cache->dpy, cell->gc);
+      cache->delete_count++;
+#ifdef GCCACHE_HASH
+      remhash (&cell->gcvm, cache->table);
+#endif
+    }
+  else if (cache->size > GC_CACHE_SIZE)
+    ABORT ();
+  else
+    {
+      /* Allocate a new cell (don't put it in the list or table yet). */
+      cell = xnew (struct gc_cache_cell);
+      cache->size++;
+    }
+
+  /* Now we've got a cell (new or reused).  Fill it in. */
+  memcpy (&cell->gcvm.gcv, gcv, sizeof (XGCValues));
+  cell->gcvm.mask = mask;
+
+  /* Put the cell on the end of the list. */
+  cell->next = 0;
+  cell->prev = cache->tail;
+  if (cache->tail) cache->tail->next = cell;
+  cache->tail = cell;
+  if (! cache->head) cache->head = cell;
+
+  cache->create_count++;
+#ifdef GCCACHE_HASH
+  /* Hash it in the table */
+  puthash (&cell->gcvm, cell, cache->table);
+#endif
+
+  /* Now make and return the GC. */
+  cell->gc = XCreateGC (cache->dpy, cache->window, mask, gcv);
+
+  /* debug */
+  assert (cell->gc == gc_cache_lookup (cache, gcv, mask));
+
+#if 0
+  debug_out ("Returning new GC: %08lx\n  ", XE_GCONTEXT(cell));
+#endif
+  return cell->gc;
+}
+
+
+#ifdef DEBUG_XEMACS
+
+/* FLAGS
+   The flags argument is a bitwise or of any of the following:
+
+   DGCCFLAG_SUMMARY		Summary statistics for cache
+   DGCCFLAG_LIST_CELLS		If summary is being printed, print cell IDs too.
+   DGCCFLAG_CELL_DETAILS	If cell IDs are being printed, additionally
+				print the internal fields used and values.
+
+   DGCCFLAG_DEFAULT		A predefined combination giving whatever the
+				maintainers are currently interested in seeing.
+*/
+void
+describe_gc_cache (struct gc_cache *cache, int flags)
+{
+  int count = 0;
+  struct gc_cache_cell *cell = cache->head;
+
+  if (! flags & DGCCFLAG_SUMMARY) return;
+
+  stderr_out ("\nsize:    %d", cache->size);
+  stderr_out ("\ncreated: %d", cache->create_count);
+  stderr_out ("\ndeleted: %d", cache->delete_count);
+
+  if (flags & DGCCFLAG_LIST_CELLS)
+    while (cell)
+      {
+	struct gc_cache_cell *cell2;
+	int i = 0;
+	stderr_out ("\n%d:\t0x%lx  GC: 0x%08lx  hash: 0x%08lx\n",
+		    count, (long) cell, (long) XE_GCONTEXT(cell),
+		    gc_cache_hash (&cell->gcvm));
+
+	for (cell2 = cache->head; cell2; cell2 = cell2->next, i++)
+	  if (count != i &&
+	      gc_cache_hash (&cell->gcvm) == gc_cache_hash (&cell2->gcvm))
+	    stderr_out ("\tHASH COLLISION with cell %d\n", i);
+	stderr_out ("\tmask:       %8lx\n", cell->gcvm.mask);
+
+	if (flags & DGCCFLAG_CELL_DETAILS)
+	  {
+#define FROB(field) do {						\
+  if ((int)cell->gcvm.gcv.field != (~0))				\
+    stderr_out ("\t%-12s%8x\n", #field ":", (int)cell->gcvm.gcv.field);	\
+} while (0)
+	    FROB (function);
+	    FROB (plane_mask);
+	    FROB (foreground);
+	    FROB (background);
+	    FROB (line_width);
+	    FROB (line_style);
+	    FROB (cap_style);
+	    FROB (join_style);
+	    FROB (fill_style);
+	    FROB (fill_rule);
+	    FROB (arc_mode);
+	    FROB (tile);
+	    FROB (stipple);
+	    FROB (ts_x_origin);
+	    FROB (ts_y_origin);
+	    FROB (font);
+	    FROB (subwindow_mode);
+	    FROB (graphics_exposures);
+	    FROB (clip_x_origin);
+	    FROB (clip_y_origin);
+	    FROB (clip_mask);
+	    FROB (dash_offset);
+#undef FROB
+	  }
+
+	count++;
+	if (cell->next && cell == cache->tail)
+	  stderr_out ("\nERROR!  tail is here!\n\n");
+	else if (!cell->next && cell != cache->tail)
+	  stderr_out ("\nERROR!  tail is not at the end\n\n");
+	cell = cell->next;
+      }	/* while (cell) */
+
+  if (count != cache->size)
+    stderr_out ("\nERROR!  count should be %d\n\n", cache->size);
+}
+
+#endif /* DEBUG_XEMACS */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gccache-x.h	Wed Feb 03 02:46:50 2010 -0600
@@ -0,0 +1,50 @@
+/* Efficient caching of X GCs (graphics contexts).
+   Copyright (C) 1993 Free Software Foundation, Inc.
+
+
+This file is part of XEmacs.
+
+XEmacs 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 2, or (at your option) any
+later version.
+
+XEmacs is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with XEmacs; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Synched up with: Not in FSF. */
+
+/* Written by jwz, 14 jun 93 */
+
+#ifndef INCLUDED_gccache_x_h_
+#define INCLUDED_gccache_x_h_
+
+#include <X11/Xlib.h>
+
+struct gc_cache;
+struct gc_cache *make_gc_cache (Display *, Window);
+void free_gc_cache (struct gc_cache *cache);
+GC gc_cache_lookup (struct gc_cache *, XGCValues *, unsigned long mask);
+
+#define XE_GCONTEXT(cell) (XGContextFromGC(cell->gc))
+
+#ifdef DEBUG_XEMACS
+
+void describe_gc_cache (struct gc_cache *cache, int flags);
+
+#define DGCCFLAG_DISABLE		0
+#define DGCCFLAG_SUMMARY		1 << 0
+#define DGCCFLAG_LIST_CELLS		1 << 1
+#define DGCCFLAG_CELL_DETAILS		1 << 2
+/* A combination of the flags above. */
+#define DGCCFLAG_DEFAULT		DGCCFLAG_SUMMARY | DGCCFLAG_LIST_CELLS
+#endif
+
+#endif /* INCLUDED_gccache_x_h_ */
--- a/src/toolbar-common.c	Mon Feb 01 22:00:29 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,730 +0,0 @@
-/* toolbar implementation -- "Generic" (X or GTK) redisplay interface.
-   Copyright (C) 1995 Board of Trustees, University of Illinois.
-   Copyright (C) 1995 Sun Microsystems, Inc.
-   Copyright (C) 1995, 1996, 2002 Ben Wing.
-   Copyright (C) 1996 Chuck Thompson.
-
-This file is part of XEmacs.
-
-XEmacs 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 2, or (at your option) any
-later version.
-
-XEmacs is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with XEmacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-/* Synched up with: Not in FSF. */
-
-#include <config.h>
-#include "lisp.h"
-
-#include "device-impl.h"
-#include "faces.h"
-#include "frame-impl.h"
-#include "glyphs.h"
-#include "toolbar.h"
-#include "window.h"
-
-/* This is used when we need to draw the toolbars ourselves -- on X or GTK.
-   On MS Windows, we use the built-in toolbar controls. */
-
-/* Only a very few things need to differ based on the toolkit used.
-**
-** Some of the routines used assert(FRAME_yyy_P(f)) checks, this is
-** now abstracted into __INTERNAL_APPROPRIATENESS_CHECK().  When we
-** add new window systems that use this code, we should either add a
-** new case here, or just remove the checks completely.
-**
-** At least for X & GTK redraw_frame_toolbars() might end up getting
-** called before we are completely initialized.  To avoid this, we use
-** the __INTERNAL_MAPPED_P(f) macro, that should return 0 if we should
-** not draw the toolbars yet.  When we add new window systems that use
-** this code, we should add a new case here, if they need it.
-**
-** When clearing the toolbar, it is nice to flush the drawing queue.
-** Use __INTERNAL_FLUSH to do this.  It is passed a device.
-*/
-#if defined(HAVE_GTK)
-#include "console-gtk-impl.h"
-#define __INTERNAL_MAPPED_P(f) GTK_WIDGET_REALIZED (FRAME_GTK_TEXT_WIDGET (f))
-#define __INTERNAL_FLUSH(d) gdk_flush()
-#define __INTERNAL_APPROPRIATENESS_CHECK(f) assert(FRAME_GTK_P (f))
-#elif defined(HAVE_X_WINDOWS)
-#include "console-x-impl.h"
-#define __INTERNAL_MAPPED_P(f) XtIsRealized (FRAME_X_SHELL_WIDGET (f))
-#define __INTERNAL_APPROPRIATENESS_CHECK(f) assert(FRAME_X_P (f))
-#define __INTERNAL_FLUSH(d) XFlush (DEVICE_X_DISPLAY (d))
-#else
-#define __INTERNAL_MAPPED_P(f) ABORT()
-#define __INTERNAL_APPROPRIATENESS_CHECK(f) ABORT()
-#define __INTERNAL_FLUSH(f) ABORT()
-#endif
-
-#include "toolbar-common.h"
-
-extern Lisp_Object Vtoolbar_shadow_thickness;
-
-static void __prepare_button_area (struct frame *f,
-				   struct toolbar_button *tb)
-{
-  int sx = tb->x;
-  int sy = tb->y;
-  int swidth = tb->width;
-  int sheight = tb->height;
-  int border_width = tb->border_width;
-  int x_adj, width_adj, y_adj, height_adj;
-  struct device *d = XDEVICE (f->device);
-  Lisp_Object  window = FRAME_LAST_NONMINIBUF_WINDOW (f);
-  struct window *w = XWINDOW (window);
-  int shadow_thickness;
-  int def_shadow_thickness = XINT (Fspecifier_instance(Vtoolbar_shadow_thickness, window, Qnil, Qnil));
-  face_index toolbar_findex;
-
-  if (tb->vertical)
-    {
-      x_adj = border_width;
-      width_adj = - 2 * border_width;
-      y_adj = height_adj = 0;
-    }
-  else
-    {
-      x_adj = width_adj = 0;
-      y_adj = border_width;
-      height_adj = - 2 * border_width;
-    }
-
-  toolbar_findex = get_builtin_face_cache_index (w, Vtoolbar_face);
-
-  /* Blank toolbar buttons that should be 3d will have EQ(tb->up_glyph, Qt)
-  ** Blank toolbar buttons that should be flat will have NILP (tb->up_glyph)
-  **
-  ** Real toolbar buttons will check tb->enabled && tb->down
-  */
-  if (EQ (Qt, tb->up_glyph))
-    {
-      shadow_thickness = def_shadow_thickness;
-    }
-  else if (NILP (tb->up_glyph))
-    {
-      shadow_thickness = 0;
-    }
-  else
-    {
-      if (tb->enabled)
-	{
-	  if (tb->down)
-	    shadow_thickness = -def_shadow_thickness;
-	  else
-	    shadow_thickness = def_shadow_thickness;
-	}
-      else
-	{
-	  shadow_thickness = 0;
-	}
-    }
-  
-  /* Blank the entire area. */
-  redisplay_clear_region (window, toolbar_findex,
-			  sx + x_adj, sy + y_adj,
-			  swidth + width_adj,
-			  sheight + height_adj);
-
-  /* Draw the outline. */
-  if (shadow_thickness)
-    {
-      MAYBE_DEVMETH (d, bevel_area,
-		     (w, toolbar_findex, sx + x_adj,
-		      sy + y_adj, swidth + width_adj,
-		      sheight + height_adj, abs(shadow_thickness),
-		      EDGE_ALL, (shadow_thickness < 0) ? EDGE_BEVEL_IN
-						       : EDGE_BEVEL_OUT));
-    }
-
-  /* Handle the borders... */
-  redisplay_clear_region (window, toolbar_findex,
-			  sx, sy,
-			  (tb->vertical ? border_width : swidth),
-			  (tb->vertical ? sheight : border_width));
-  redisplay_clear_region (window, toolbar_findex,
-			  (tb->vertical ? sx + swidth : sx),
-			  (tb->vertical ? sy : sy + sheight),
-			  (tb->vertical ? border_width : swidth),
-			  (tb->vertical ? sheight : border_width));
-}
-
-#define common_draw_blank_toolbar_button(f,tb) __prepare_button_area (f,tb)
-
-void
-common_output_toolbar_button (struct frame *f, Lisp_Object button)
-{
-  int shadow_thickness = 2;
-  int x_adj, y_adj, width_adj, height_adj;
-  struct device *d = XDEVICE (f->device);
-  Lisp_Object instance, window, glyph;
-  struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
-  struct Lisp_Image_Instance *p;
-  struct window *w;
-  int vertical = tb->vertical;
-  int border_width = tb->border_width;
-  face_index button_findex;
-
-  if (vertical)
-    {
-      x_adj = border_width;
-      width_adj = - 2 * border_width;
-      y_adj = 0;
-      height_adj = 0;
-    }
-  else
-    {
-      x_adj = 0;
-      width_adj = 0;
-      y_adj = border_width;
-      height_adj = - 2 * border_width;
-    }
-
-  window = FRAME_LAST_NONMINIBUF_WINDOW (f);
-  w = XWINDOW (window);
-
-  glyph = get_toolbar_button_glyph (w, tb);
-
-  if (tb->enabled)
-    {
-      if (tb->down)
-	{
-	  shadow_thickness = -2;
-	}
-      else
-	{
-	  shadow_thickness = 2;
-	}
-    }
-  else
-    {
-      shadow_thickness = 0;
-    }
-
-  /* #### It is currently possible for users to trash us by directly
-     changing the toolbar glyphs.  Avoid crashing in that case. */
-  if (GLYPHP (glyph))
-    {
-      /* WARNING: this interface may change */
-      Lisp_Object face_list[2] = { XGLYPH_FACE (glyph), Vtoolbar_face };
-
-      button_findex = merge_face_list_to_cache_index (w, face_list, 2);
-      instance = glyph_image_instance (glyph, window, ERROR_ME_DEBUG_WARN, 1);
-    }
-  else
-    {
-      button_findex = get_builtin_face_cache_index (w, Vtoolbar_face);
-      instance = Qnil;
-    }
-
-  __prepare_button_area (f, tb);
-
-  if (IMAGE_INSTANCEP (instance))
-    {
-      int width = tb->width + width_adj - shadow_thickness * 2;
-      int height = tb->height + height_adj - shadow_thickness * 2;
-      int x_offset = x_adj + shadow_thickness;
-      int y_offset = y_adj + shadow_thickness;
-
-      p = XIMAGE_INSTANCE (instance);
-
-      if (IMAGE_INSTANCE_PIXMAP_TYPE_P (p))
-	{
-	  struct display_box db;
-	  struct display_glyph_area dga;
-
-	  if (width > (int) IMAGE_INSTANCE_PIXMAP_WIDTH (p))
-	    {
-	      x_offset += ((int) (width - IMAGE_INSTANCE_PIXMAP_WIDTH (p))
-			   / 2);
-	      width = IMAGE_INSTANCE_PIXMAP_WIDTH (p);
-	    }
-	  if (height > (int) IMAGE_INSTANCE_PIXMAP_HEIGHT (p))
-	    {
-	      y_offset += ((int) (height - IMAGE_INSTANCE_PIXMAP_HEIGHT (p))
-			   / 2);
-	      height = IMAGE_INSTANCE_PIXMAP_HEIGHT (p);
-	    }
-
-	  /* Draw exactly in the area specified... */
-	  db.xpos = tb->x + x_offset;
-	  db.ypos = tb->y + y_offset;
-	  db.width = width;
-	  db.height = height;
-
-	  /* Display the whole glyph */
-	  dga.xoffset = 0;
-	  dga.yoffset = 0;
-	  dga.width = width;
-	  dga.height = height;
-	  
-	  redisplay_output_pixmap (w, instance,
-				   &db, &dga, 
-				   button_findex, 0, 0, 0, 0);
-	}
-      else if (IMAGE_INSTANCE_TYPE (p) == IMAGE_TEXT)
-	{
-	  /* #### We need to make the face used configurable. */
-	  struct face_cachel *cachel =
-	    WINDOW_FACE_CACHEL (w, DEFAULT_INDEX);
-	  struct display_line dl;
-	  Lisp_Object string = IMAGE_INSTANCE_TEXT_STRING (p);
-	  unsigned char charsets[NUM_LEADING_BYTES];
-	  Ichar_dynarr *buf;
-	  struct font_metric_info fm;
-
-	  /* This could be true if we were called via the Expose event
-             handler.  Mark the button as dirty and return
-             immediately. */
-	  if (f->window_face_cache_reset)
-	    {
-	      tb->dirty = 1;
-	      MARK_TOOLBAR_CHANGED;
-	      return;
-	    }
-	  buf = Dynarr_new (Ichar);
-	  convert_ibyte_string_into_ichar_dynarr
-	    (XSTRING_DATA (string), XSTRING_LENGTH (string), buf);
-	  find_charsets_in_ichar_string (charsets, Dynarr_atp (buf, 0),
-					  Dynarr_length (buf));
-	  ensure_face_cachel_complete (cachel, window, charsets);
-	  face_cachel_charset_font_metric_info (cachel, charsets, &fm);
-
-	  dl.ascent = fm.ascent;
-	  dl.descent = fm.descent;
-	  dl.ypos = tb->y + y_offset + fm.ascent;
-
-	  if (fm.ascent + fm.descent <= height)
-	    {
-	      dl.ypos += (height - fm.ascent - fm.descent) / 2;
-	      dl.clip = 0;
-	    }
-	  else
-	    {
-	      dl.clip = fm.ascent + fm.descent - height;
-	    }
-
-	  MAYBE_DEVMETH (d, output_string,
-			 (w, &dl, buf, tb->x + x_offset, 0, 0, width,
-			  button_findex, 0, 0, 0, 0));
-	  Dynarr_free (buf);
-	}
-
-      /* We silently ignore the image if it isn't a pixmap or text. */
-    }
-
-  tb->dirty = 0;
-}
-
-static int
-common_get_button_size (struct frame *f, Lisp_Object window,
-			struct toolbar_button *tb, int vert, int pos)
-{
-  int shadow_thickness = 2;
-  int size;
-
-  if (tb->blank)
-    {
-      if (!NILP (tb->down_glyph))
-	size = XINT (tb->down_glyph);
-      else
-	size = DEFAULT_TOOLBAR_BLANK_SIZE;
-    }
-  else
-    {
-      struct window *w = XWINDOW (window);
-      Lisp_Object glyph = get_toolbar_button_glyph (w, tb);
-
-      /* Unless, of course, the user has done something stupid like
-         change the glyph out from under us.  Use a blank placeholder
-         in that case. */
-      if (NILP (glyph))
-	return XINT (f->toolbar_size[pos]);
-
-      if (vert)
-	size = glyph_height (glyph, window);
-      else
-	size = glyph_width (glyph, window);
-    }
-
-  if (!size)
-    {
-      /* If the glyph doesn't have a size we'll insert a blank
-         placeholder instead. */
-      return XINT (f->toolbar_size[pos]);
-    }
-
-  size += shadow_thickness * 2;
-
-  return (size);
-}
-
-#define COMMON_OUTPUT_BUTTONS_LOOP(left)				\
-  do {									\
-    while (!NILP (button))						\
-      {									\
-	struct toolbar_button *tb = XTOOLBAR_BUTTON (button);		\
-	int size, height, width;					\
-									\
-	if (left && tb->pushright)					\
-	  break;							\
-									\
-        size = common_get_button_size (f, window, tb, vert, pos);	\
-									\
-	if (vert)							\
-	  {								\
-	    width = bar_width;						\
-	    if (y + size > max_pixpos)					\
-	      height = max_pixpos - y;					\
-	    else							\
-	      height = size;						\
-	  }								\
-	else								\
-	  {								\
-	    if (x + size > max_pixpos)					\
-	      width = max_pixpos - x;					\
-	    else							\
-	      width = size;						\
-	    height = bar_height;					\
-	  }								\
-									\
-	if (tb->x != x							\
-	    || tb->y != y						\
-	    || tb->width != width					\
-	    || tb->height != height					\
-	    || tb->dirty						\
-	    || f->clear) /* This is clearly necessary. */		\
-	  {								\
-	    if (width && height)					\
-	      {								\
-		tb->x = x;						\
-		tb->y = y;						\
-		tb->width = width;					\
-		tb->height = height;					\
-	        tb->border_width = border_width;			\
-	        tb->vertical = vert;					\
-									\
-                if (tb->blank || NILP (tb->up_glyph))			\
-		  {							\
-		    common_draw_blank_toolbar_button (f, tb);		\
-		  }							\
-	        else							\
-		  common_output_toolbar_button (f, button);		\
-	      }								\
-	  }								\
-									\
-	if (vert)							\
-	  y += height;							\
-	else								\
-	  x += width;							\
-									\
-	if ((vert && y == max_pixpos) || (!vert && x == max_pixpos))	\
-	  button = Qnil;						\
-	else								\
-	  button = tb->next;						\
-      }									\
-  } while (0)
-
-#define SET_TOOLBAR_WAS_VISIBLE_FLAG(frame, pos, flag)			\
-  do {									\
-    switch (pos)							\
-      {									\
-      case TOP_TOOLBAR:							\
-	(frame)->top_toolbar_was_visible = flag;			\
-	break;								\
-      case BOTTOM_TOOLBAR:						\
-	(frame)->bottom_toolbar_was_visible = flag;			\
-	break;								\
-      case LEFT_TOOLBAR:						\
-	(frame)->left_toolbar_was_visible = flag;			\
-	break;								\
-      case RIGHT_TOOLBAR:						\
-	(frame)->right_toolbar_was_visible = flag;			\
-	break;								\
-      default:								\
-	ABORT ();							\
-      }									\
-  } while (0)
-
-static void
-common_output_toolbar (struct frame *f, enum toolbar_pos pos)
-{
-  int x, y, bar_width, bar_height, vert;
-  int max_pixpos, right_size, right_start, blank_size;
-  int border_width = FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, pos);
-  Lisp_Object button, window;
-  face_index toolbar_findex;
-
-  get_toolbar_coords (f, pos, &x, &y, &bar_width, &bar_height, &vert, 1);
-  window = FRAME_LAST_NONMINIBUF_WINDOW (f);
-  toolbar_findex = get_builtin_face_cache_index (XWINDOW (window), Vtoolbar_face);
-
-  /* Do the border */
-  redisplay_clear_region (window, toolbar_findex,
-			  x, y,
-			  (vert ? bar_width : border_width),
-			  (vert ? border_width : bar_height));
-  redisplay_clear_region (window, toolbar_findex,
-			  (vert ? x : x + bar_width - border_width),
-			  (vert ? y + bar_height - border_width : y),
-			  (vert ? bar_width : border_width),
-			  (vert ? border_width : bar_height));
-
-  if (vert)
-    {
-      max_pixpos = y + bar_height - border_width;
-      y += border_width;
-    }
-  else
-    {
-      max_pixpos = x + bar_width - border_width;
-      x += border_width;
-    }
-
-  button = FRAME_TOOLBAR_BUTTONS (f, pos);
-  right_size = 0;
-
-  /* First loop over all of the buttons to determine how much room we
-     need for left hand and right hand buttons.  This loop will also
-     make sure that all instances are instantiated so when we actually
-     output them they will come up immediately. */
-  while (!NILP (button))
-    {
-      struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
-      int size = common_get_button_size (f, window, tb, vert, pos);
-
-      if (tb->pushright)
-	right_size += size;
-
-      button = tb->next;
-    }
-
-  button = FRAME_TOOLBAR_BUTTONS (f, pos);
-
-  /* Loop over the left buttons, updating and outputting them. */
-  COMMON_OUTPUT_BUTTONS_LOOP (1);
-
-  /* Now determine where the right buttons start. */
-  right_start = max_pixpos - right_size;
-  if (right_start < (vert ? y : x))
-    right_start = (vert ? y : x);
-
-  /* Output the blank which goes from the end of the left buttons to
-     the start of the right. */
-  blank_size = right_start - (vert ? y : x);
-  if (blank_size)
-    {
-      int height, width;
-
-      if (vert)
-	{
-	  width = bar_width;
-	  height = blank_size;
-	}
-      else
-	{
-	  width = blank_size;
-	  height = bar_height;
-	}
-
-      /*
-       * Use a 3D pushright separator only if there isn't a toolbar
-       * border.  A flat separator meshes with the border and looks
-       * better.
-       */
-      if (1)
-	{
-	  struct toolbar_button tb;
-
-	  tb.x = x;
-	  tb.y = y;
-	  tb.width = width;
-	  tb.height = height;
-	  tb.border_width = border_width;
-	  tb.vertical = vert;
-	  tb.enabled = 1;
-	  tb.up_glyph = border_width ? Qt : Qnil;
-
-	  __prepare_button_area (f, &tb);
-	}
-
-      if (vert)
-	y += height;
-      else
-	x += width;
-    }
-
-  /* Loop over the right buttons, updating and outputting them. */
-  COMMON_OUTPUT_BUTTONS_LOOP (0);
-
-  if (!vert)
-    {
-      Lisp_Object frame = wrap_frame (f);
-
-      redisplay_clear_region (frame,
-			      DEFAULT_INDEX, FRAME_PIXWIDTH (f) - 1, y, 1,
-			      bar_height);
-    }
-
-  SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 1);
-  __INTERNAL_FLUSH (XDEVICE (f->device));
-}
-
-static void
-common_clear_toolbar (struct frame *f, enum toolbar_pos pos, int thickness_change)
-{
-  Lisp_Object frame;
-  int x, y, width, height, vert;
-
-  get_toolbar_coords (f, pos, &x, &y, &width, &height, &vert, 1);
-  frame = wrap_frame (f);
-
-  /* The thickness_change parameter is used by the toolbar resize routines
-     to clear any excess toolbar if the size shrinks. */
-  if (thickness_change < 0)
-    {
-      if (pos == LEFT_TOOLBAR || pos == RIGHT_TOOLBAR)
-	{
-	  x = x + width + thickness_change;
-	  width = -thickness_change;
-	}
-      else
-	{
-	  y = y + height + thickness_change;
-	  height = -thickness_change;
-	}
-    }
-
-  SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 0);
-
-  redisplay_clear_region (frame, DEFAULT_INDEX, x, y, width, height);
-
-  __INTERNAL_FLUSH (XDEVICE (f->device));
-}
-
-void
-common_output_frame_toolbars (struct frame *f)
-{
-  __INTERNAL_APPROPRIATENESS_CHECK(f);
-
-  if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
-    common_output_toolbar (f, TOP_TOOLBAR);
-
-  if (FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
-    common_output_toolbar (f, BOTTOM_TOOLBAR);
-
-  if (FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
-    common_output_toolbar (f, LEFT_TOOLBAR);
-
-  if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
-    common_output_toolbar (f, RIGHT_TOOLBAR);
-}
-
-void
-common_clear_frame_toolbars (struct frame *f)
-{
-  __INTERNAL_APPROPRIATENESS_CHECK(f);
-
-  if (f->top_toolbar_was_visible
-      && !FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
-    common_clear_toolbar (f, TOP_TOOLBAR, 0);
-  if (f->bottom_toolbar_was_visible
-      && !FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
-    common_clear_toolbar (f, BOTTOM_TOOLBAR, 0);
-  if (f->left_toolbar_was_visible 
-      && !FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
-    common_clear_toolbar (f, LEFT_TOOLBAR, 0);
-  if (f->right_toolbar_was_visible 
-       && !FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
-    common_clear_toolbar (f, RIGHT_TOOLBAR, 0);
-}
-
-static void
-common_redraw_exposed_toolbar (struct frame *f, enum toolbar_pos pos, int x, int y,
-			    int width, int height)
-{
-  int bar_x, bar_y, bar_width, bar_height, vert;
-  Lisp_Object button = FRAME_TOOLBAR_BUTTONS (f, pos);
-
-  get_toolbar_coords (f, pos, &bar_x, &bar_y, &bar_width, &bar_height,
-		      &vert, 1);
-
-  if (((y + height) < bar_y) || (y > (bar_y + bar_height)))
-    return;
-  if (((x + width) < bar_x) || (x > (bar_x + bar_width)))
-    return;
-
-  while (!NILP (button))
-    {
-      struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
-
-      if (vert)
-	{
-	  if (((tb->y + tb->height) > y) && (tb->y < (y + height)))
-	    tb->dirty = 1;
-
-	  /* If this is true we have gone past the exposed region. */
-	  if (tb->y > (y + height))
-	    break;
-	}
-      else
-	{
-	  if (((tb->x + tb->width) > x) && (tb->x < (x + width)))
-	    tb->dirty = 1;
-
-	  /* If this is true we have gone past the exposed region. */
-	  if (tb->x > (x + width))
-	    break;
-	}
-
-      button = tb->next;
-    }
-
-  /* Even if none of the buttons is in the area, the blank region at
-     the very least must be because the first thing we did is verify
-     that some portion of the toolbar is in the exposed region. */
-  common_output_toolbar (f, pos);
-}
-
-void
-common_redraw_exposed_toolbars (struct frame *f, int x, int y, int width,
-				int height)
-{
-  __INTERNAL_APPROPRIATENESS_CHECK(f);
-
-  if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
-    common_redraw_exposed_toolbar (f, TOP_TOOLBAR, x, y, width, height);
-
-  if (FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
-    common_redraw_exposed_toolbar (f, BOTTOM_TOOLBAR, x, y, width, height);
-
-  if (FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
-    common_redraw_exposed_toolbar (f, LEFT_TOOLBAR, x, y, width, height);
-
-  if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
-    common_redraw_exposed_toolbar (f, RIGHT_TOOLBAR, x, y, width, height);
-}
-
-void
-common_redraw_frame_toolbars (struct frame *f)
-{
-  /* There are certain startup paths that lead to update_EmacsFrame in
-     faces.c being called before a new frame is fully initialized.  In
-     particular before we have actually mapped it.  That routine can
-     call this one.  So, we need to make sure that the frame is
-     actually ready before we try and draw all over it. */
-  if (__INTERNAL_MAPPED_P(f))
-    common_redraw_exposed_toolbars (f, 0, 0, FRAME_PIXWIDTH (f),
-				    FRAME_PIXHEIGHT (f));
-}
--- a/src/toolbar-common.h	Mon Feb 01 22:00:29 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/* toolbar-common.h
-**
-** Description: 
-**
-** Created by: William M. Perry
-** Copyright (c) 2001 Free Software Foundation
-**
-*/
-
-#ifndef __TOOLBAR_COMMON_H__
-#define __TOOLBAR_COMMON_H__
-
-extern void common_output_frame_toolbars (struct frame *f);
-extern void common_redraw_exposed_toolbars (struct frame *f,
-					    int x, int y,
-					    int width, int height);
-extern void common_redraw_frame_toolbars (struct frame *f);
-extern void common_output_toolbar_button (struct frame *f, Lisp_Object button);
-extern void common_clear_frame_toolbars (struct frame *f);
-
-#endif /* __TOOLBAR_COMMON_H__ */
--- a/src/toolbar-gtk.c	Mon Feb 01 22:00:29 2010 -0600
+++ b/src/toolbar-gtk.c	Wed Feb 03 02:46:50 2010 -0600
@@ -28,19 +28,19 @@
 
 #include "frame.h"
 
-#include "toolbar-common.h"
+#include "toolbar-xlike.h"
 
 #include "console-gtk-impl.h"
 
-/* We should really create a 'common' console type and fill it with
+/* We should really create a 'xlike' console type and fill it with
 ** all the shared code.  We would then just use
-** CONSOLE_INHERITS_METHOD(x,common,blah)
+** CONSOLE_INHERITS_METHOD(x,xlike,blah)
 */
-#define gtk_output_frame_toolbars common_output_frame_toolbars
-#define gtk_output_toolbar_button common_output_toolbar_button
-#define gtk_redraw_exposed_toolbars common_redraw_exposed_toolbars
-#define gtk_redraw_frame_toolbars common_redraw_frame_toolbars
-#define gtk_clear_frame_toolbars common_clear_frame_toolbars
+#define gtk_output_frame_toolbars xlike_output_frame_toolbars
+#define gtk_output_toolbar_button xlike_output_toolbar_button
+#define gtk_redraw_exposed_toolbars xlike_redraw_exposed_toolbars
+#define gtk_redraw_frame_toolbars xlike_redraw_frame_toolbars
+#define gtk_clear_frame_toolbars xlike_clear_frame_toolbars
 
 
 static void
--- a/src/toolbar-x.c	Mon Feb 01 22:00:29 2010 -0600
+++ b/src/toolbar-x.c	Wed Feb 03 02:46:50 2010 -0600
@@ -33,7 +33,7 @@
 #include "toolbar.h"
 #include "window.h"
 
-#include "toolbar-common.h"
+#include "toolbar-xlike.h"
 
 #include "console-x-impl.h"
 #include "glyphs-x.h"
@@ -42,15 +42,15 @@
 #include "EmacsFrame.h"
 #include "EmacsFrameP.h"
 
-/* We should really create a 'common' console type and fill it with
+/* We should really create a 'xlike' console type and fill it with
 ** all the shared code.  We would then just use
-** CONSOLE_INHERITS_METHOD(x,common,blah)
+** CONSOLE_INHERITS_METHOD(x,xlike,blah)
 */
-#define x_output_frame_toolbars common_output_frame_toolbars
-#define x_output_toolbar_button common_output_toolbar_button
-#define x_redraw_exposed_toolbars common_redraw_exposed_toolbars
-#define x_redraw_frame_toolbars common_redraw_frame_toolbars
-#define x_clear_frame_toolbars common_clear_frame_toolbars
+#define x_output_frame_toolbars xlike_output_frame_toolbars
+#define x_output_toolbar_button xlike_output_toolbar_button
+#define x_redraw_exposed_toolbars xlike_redraw_exposed_toolbars
+#define x_redraw_frame_toolbars xlike_redraw_frame_toolbars
+#define x_clear_frame_toolbars xlike_clear_frame_toolbars
 
 static void
 x_initialize_frame_toolbars (struct frame *f)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/toolbar-xlike.c	Wed Feb 03 02:46:50 2010 -0600
@@ -0,0 +1,730 @@
+/* toolbar implementation -- "Generic" (X or GTK) redisplay interface.
+   Copyright (C) 1995 Board of Trustees, University of Illinois.
+   Copyright (C) 1995 Sun Microsystems, Inc.
+   Copyright (C) 1995, 1996, 2002, 2010 Ben Wing.
+   Copyright (C) 1996 Chuck Thompson.
+
+This file is part of XEmacs.
+
+XEmacs 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 2, or (at your option) any
+later version.
+
+XEmacs is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with XEmacs; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Synched up with: Not in FSF. */
+
+#include <config.h>
+#include "lisp.h"
+
+#include "device-impl.h"
+#include "faces.h"
+#include "frame-impl.h"
+#include "glyphs.h"
+#include "toolbar.h"
+#include "window.h"
+
+/* This is used when we need to draw the toolbars ourselves -- on X or GTK.
+   On MS Windows, we use the built-in toolbar controls. */
+
+/* Only a very few things need to differ based on the toolkit used.
+**
+** Some of the routines used assert(FRAME_yyy_P(f)) checks, this is
+** now abstracted into __INTERNAL_APPROPRIATENESS_CHECK().  When we
+** add new window systems that use this code, we should either add a
+** new case here, or just remove the checks completely.
+**
+** At least for X & GTK redraw_frame_toolbars() might end up getting
+** called before we are completely initialized.  To avoid this, we use
+** the __INTERNAL_MAPPED_P(f) macro, that should return 0 if we should
+** not draw the toolbars yet.  When we add new window systems that use
+** this code, we should add a new case here, if they need it.
+**
+** When clearing the toolbar, it is nice to flush the drawing queue.
+** Use __INTERNAL_FLUSH to do this.  It is passed a device.
+*/
+#if defined(HAVE_GTK)
+#include "console-gtk-impl.h"
+#define __INTERNAL_MAPPED_P(f) GTK_WIDGET_REALIZED (FRAME_GTK_TEXT_WIDGET (f))
+#define __INTERNAL_FLUSH(d) gdk_flush()
+#define __INTERNAL_APPROPRIATENESS_CHECK(f) assert(FRAME_GTK_P (f))
+#elif defined(HAVE_X_WINDOWS)
+#include "console-x-impl.h"
+#define __INTERNAL_MAPPED_P(f) XtIsRealized (FRAME_X_SHELL_WIDGET (f))
+#define __INTERNAL_APPROPRIATENESS_CHECK(f) assert(FRAME_X_P (f))
+#define __INTERNAL_FLUSH(d) XFlush (DEVICE_X_DISPLAY (d))
+#else
+#define __INTERNAL_MAPPED_P(f) ABORT()
+#define __INTERNAL_APPROPRIATENESS_CHECK(f) ABORT()
+#define __INTERNAL_FLUSH(f) ABORT()
+#endif
+
+#include "toolbar-xlike.h"
+
+extern Lisp_Object Vtoolbar_shadow_thickness;
+
+static void __prepare_button_area (struct frame *f,
+				   struct toolbar_button *tb)
+{
+  int sx = tb->x;
+  int sy = tb->y;
+  int swidth = tb->width;
+  int sheight = tb->height;
+  int border_width = tb->border_width;
+  int x_adj, width_adj, y_adj, height_adj;
+  struct device *d = XDEVICE (f->device);
+  Lisp_Object  window = FRAME_LAST_NONMINIBUF_WINDOW (f);
+  struct window *w = XWINDOW (window);
+  int shadow_thickness;
+  int def_shadow_thickness = XINT (Fspecifier_instance(Vtoolbar_shadow_thickness, window, Qnil, Qnil));
+  face_index toolbar_findex;
+
+  if (tb->vertical)
+    {
+      x_adj = border_width;
+      width_adj = - 2 * border_width;
+      y_adj = height_adj = 0;
+    }
+  else
+    {
+      x_adj = width_adj = 0;
+      y_adj = border_width;
+      height_adj = - 2 * border_width;
+    }
+
+  toolbar_findex = get_builtin_face_cache_index (w, Vtoolbar_face);
+
+  /* Blank toolbar buttons that should be 3d will have EQ(tb->up_glyph, Qt)
+  ** Blank toolbar buttons that should be flat will have NILP (tb->up_glyph)
+  **
+  ** Real toolbar buttons will check tb->enabled && tb->down
+  */
+  if (EQ (Qt, tb->up_glyph))
+    {
+      shadow_thickness = def_shadow_thickness;
+    }
+  else if (NILP (tb->up_glyph))
+    {
+      shadow_thickness = 0;
+    }
+  else
+    {
+      if (tb->enabled)
+	{
+	  if (tb->down)
+	    shadow_thickness = -def_shadow_thickness;
+	  else
+	    shadow_thickness = def_shadow_thickness;
+	}
+      else
+	{
+	  shadow_thickness = 0;
+	}
+    }
+  
+  /* Blank the entire area. */
+  redisplay_clear_region (window, toolbar_findex,
+			  sx + x_adj, sy + y_adj,
+			  swidth + width_adj,
+			  sheight + height_adj);
+
+  /* Draw the outline. */
+  if (shadow_thickness)
+    {
+      MAYBE_DEVMETH (d, bevel_area,
+		     (w, toolbar_findex, sx + x_adj,
+		      sy + y_adj, swidth + width_adj,
+		      sheight + height_adj, abs(shadow_thickness),
+		      EDGE_ALL, (shadow_thickness < 0) ? EDGE_BEVEL_IN
+						       : EDGE_BEVEL_OUT));
+    }
+
+  /* Handle the borders... */
+  redisplay_clear_region (window, toolbar_findex,
+			  sx, sy,
+			  (tb->vertical ? border_width : swidth),
+			  (tb->vertical ? sheight : border_width));
+  redisplay_clear_region (window, toolbar_findex,
+			  (tb->vertical ? sx + swidth : sx),
+			  (tb->vertical ? sy : sy + sheight),
+			  (tb->vertical ? border_width : swidth),
+			  (tb->vertical ? sheight : border_width));
+}
+
+#define xlike_draw_blank_toolbar_button(f,tb) __prepare_button_area (f,tb)
+
+void
+xlike_output_toolbar_button (struct frame *f, Lisp_Object button)
+{
+  int shadow_thickness = 2;
+  int x_adj, y_adj, width_adj, height_adj;
+  struct device *d = XDEVICE (f->device);
+  Lisp_Object instance, window, glyph;
+  struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
+  struct Lisp_Image_Instance *p;
+  struct window *w;
+  int vertical = tb->vertical;
+  int border_width = tb->border_width;
+  face_index button_findex;
+
+  if (vertical)
+    {
+      x_adj = border_width;
+      width_adj = - 2 * border_width;
+      y_adj = 0;
+      height_adj = 0;
+    }
+  else
+    {
+      x_adj = 0;
+      width_adj = 0;
+      y_adj = border_width;
+      height_adj = - 2 * border_width;
+    }
+
+  window = FRAME_LAST_NONMINIBUF_WINDOW (f);
+  w = XWINDOW (window);
+
+  glyph = get_toolbar_button_glyph (w, tb);
+
+  if (tb->enabled)
+    {
+      if (tb->down)
+	{
+	  shadow_thickness = -2;
+	}
+      else
+	{
+	  shadow_thickness = 2;
+	}
+    }
+  else
+    {
+      shadow_thickness = 0;
+    }
+
+  /* #### It is currently possible for users to trash us by directly
+     changing the toolbar glyphs.  Avoid crashing in that case. */
+  if (GLYPHP (glyph))
+    {
+      /* WARNING: this interface may change */
+      Lisp_Object face_list[2] = { XGLYPH_FACE (glyph), Vtoolbar_face };
+
+      button_findex = merge_face_list_to_cache_index (w, face_list, 2);
+      instance = glyph_image_instance (glyph, window, ERROR_ME_DEBUG_WARN, 1);
+    }
+  else
+    {
+      button_findex = get_builtin_face_cache_index (w, Vtoolbar_face);
+      instance = Qnil;
+    }
+
+  __prepare_button_area (f, tb);
+
+  if (IMAGE_INSTANCEP (instance))
+    {
+      int width = tb->width + width_adj - shadow_thickness * 2;
+      int height = tb->height + height_adj - shadow_thickness * 2;
+      int x_offset = x_adj + shadow_thickness;
+      int y_offset = y_adj + shadow_thickness;
+
+      p = XIMAGE_INSTANCE (instance);
+
+      if (IMAGE_INSTANCE_PIXMAP_TYPE_P (p))
+	{
+	  struct display_box db;
+	  struct display_glyph_area dga;
+
+	  if (width > (int) IMAGE_INSTANCE_PIXMAP_WIDTH (p))
+	    {
+	      x_offset += ((int) (width - IMAGE_INSTANCE_PIXMAP_WIDTH (p))
+			   / 2);
+	      width = IMAGE_INSTANCE_PIXMAP_WIDTH (p);
+	    }
+	  if (height > (int) IMAGE_INSTANCE_PIXMAP_HEIGHT (p))
+	    {
+	      y_offset += ((int) (height - IMAGE_INSTANCE_PIXMAP_HEIGHT (p))
+			   / 2);
+	      height = IMAGE_INSTANCE_PIXMAP_HEIGHT (p);
+	    }
+
+	  /* Draw exactly in the area specified... */
+	  db.xpos = tb->x + x_offset;
+	  db.ypos = tb->y + y_offset;
+	  db.width = width;
+	  db.height = height;
+
+	  /* Display the whole glyph */
+	  dga.xoffset = 0;
+	  dga.yoffset = 0;
+	  dga.width = width;
+	  dga.height = height;
+	  
+	  redisplay_output_pixmap (w, instance,
+				   &db, &dga, 
+				   button_findex, 0, 0, 0, 0);
+	}
+      else if (IMAGE_INSTANCE_TYPE (p) == IMAGE_TEXT)
+	{
+	  /* #### We need to make the face used configurable. */
+	  struct face_cachel *cachel =
+	    WINDOW_FACE_CACHEL (w, DEFAULT_INDEX);
+	  struct display_line dl;
+	  Lisp_Object string = IMAGE_INSTANCE_TEXT_STRING (p);
+	  unsigned char charsets[NUM_LEADING_BYTES];
+	  Ichar_dynarr *buf;
+	  struct font_metric_info fm;
+
+	  /* This could be true if we were called via the Expose event
+             handler.  Mark the button as dirty and return
+             immediately. */
+	  if (f->window_face_cache_reset)
+	    {
+	      tb->dirty = 1;
+	      MARK_TOOLBAR_CHANGED;
+	      return;
+	    }
+	  buf = Dynarr_new (Ichar);
+	  convert_ibyte_string_into_ichar_dynarr
+	    (XSTRING_DATA (string), XSTRING_LENGTH (string), buf);
+	  find_charsets_in_ichar_string (charsets, Dynarr_atp (buf, 0),
+					  Dynarr_length (buf));
+	  ensure_face_cachel_complete (cachel, window, charsets);
+	  face_cachel_charset_font_metric_info (cachel, charsets, &fm);
+
+	  dl.ascent = fm.ascent;
+	  dl.descent = fm.descent;
+	  dl.ypos = tb->y + y_offset + fm.ascent;
+
+	  if (fm.ascent + fm.descent <= height)
+	    {
+	      dl.ypos += (height - fm.ascent - fm.descent) / 2;
+	      dl.clip = 0;
+	    }
+	  else
+	    {
+	      dl.clip = fm.ascent + fm.descent - height;
+	    }
+
+	  MAYBE_DEVMETH (d, output_string,
+			 (w, &dl, buf, tb->x + x_offset, 0, 0, width,
+			  button_findex, 0, 0, 0, 0));
+	  Dynarr_free (buf);
+	}
+
+      /* We silently ignore the image if it isn't a pixmap or text. */
+    }
+
+  tb->dirty = 0;
+}
+
+static int
+xlike_get_button_size (struct frame *f, Lisp_Object window,
+			struct toolbar_button *tb, int vert, int pos)
+{
+  int shadow_thickness = 2;
+  int size;
+
+  if (tb->blank)
+    {
+      if (!NILP (tb->down_glyph))
+	size = XINT (tb->down_glyph);
+      else
+	size = DEFAULT_TOOLBAR_BLANK_SIZE;
+    }
+  else
+    {
+      struct window *w = XWINDOW (window);
+      Lisp_Object glyph = get_toolbar_button_glyph (w, tb);
+
+      /* Unless, of course, the user has done something stupid like
+         change the glyph out from under us.  Use a blank placeholder
+         in that case. */
+      if (NILP (glyph))
+	return XINT (f->toolbar_size[pos]);
+
+      if (vert)
+	size = glyph_height (glyph, window);
+      else
+	size = glyph_width (glyph, window);
+    }
+
+  if (!size)
+    {
+      /* If the glyph doesn't have a size we'll insert a blank
+         placeholder instead. */
+      return XINT (f->toolbar_size[pos]);
+    }
+
+  size += shadow_thickness * 2;
+
+  return (size);
+}
+
+#define XLIKE_OUTPUT_BUTTONS_LOOP(left)				\
+  do {									\
+    while (!NILP (button))						\
+      {									\
+	struct toolbar_button *tb = XTOOLBAR_BUTTON (button);		\
+	int size, height, width;					\
+									\
+	if (left && tb->pushright)					\
+	  break;							\
+									\
+        size = xlike_get_button_size (f, window, tb, vert, pos);	\
+									\
+	if (vert)							\
+	  {								\
+	    width = bar_width;						\
+	    if (y + size > max_pixpos)					\
+	      height = max_pixpos - y;					\
+	    else							\
+	      height = size;						\
+	  }								\
+	else								\
+	  {								\
+	    if (x + size > max_pixpos)					\
+	      width = max_pixpos - x;					\
+	    else							\
+	      width = size;						\
+	    height = bar_height;					\
+	  }								\
+									\
+	if (tb->x != x							\
+	    || tb->y != y						\
+	    || tb->width != width					\
+	    || tb->height != height					\
+	    || tb->dirty						\
+	    || f->clear) /* This is clearly necessary. */		\
+	  {								\
+	    if (width && height)					\
+	      {								\
+		tb->x = x;						\
+		tb->y = y;						\
+		tb->width = width;					\
+		tb->height = height;					\
+	        tb->border_width = border_width;			\
+	        tb->vertical = vert;					\
+									\
+                if (tb->blank || NILP (tb->up_glyph))			\
+		  {							\
+		    xlike_draw_blank_toolbar_button (f, tb);		\
+		  }							\
+	        else							\
+		  xlike_output_toolbar_button (f, button);		\
+	      }								\
+	  }								\
+									\
+	if (vert)							\
+	  y += height;							\
+	else								\
+	  x += width;							\
+									\
+	if ((vert && y == max_pixpos) || (!vert && x == max_pixpos))	\
+	  button = Qnil;						\
+	else								\
+	  button = tb->next;						\
+      }									\
+  } while (0)
+
+#define SET_TOOLBAR_WAS_VISIBLE_FLAG(frame, pos, flag)			\
+  do {									\
+    switch (pos)							\
+      {									\
+      case TOP_TOOLBAR:							\
+	(frame)->top_toolbar_was_visible = flag;			\
+	break;								\
+      case BOTTOM_TOOLBAR:						\
+	(frame)->bottom_toolbar_was_visible = flag;			\
+	break;								\
+      case LEFT_TOOLBAR:						\
+	(frame)->left_toolbar_was_visible = flag;			\
+	break;								\
+      case RIGHT_TOOLBAR:						\
+	(frame)->right_toolbar_was_visible = flag;			\
+	break;								\
+      default:								\
+	ABORT ();							\
+      }									\
+  } while (0)
+
+static void
+xlike_output_toolbar (struct frame *f, enum toolbar_pos pos)
+{
+  int x, y, bar_width, bar_height, vert;
+  int max_pixpos, right_size, right_start, blank_size;
+  int border_width = FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, pos);
+  Lisp_Object button, window;
+  face_index toolbar_findex;
+
+  get_toolbar_coords (f, pos, &x, &y, &bar_width, &bar_height, &vert, 1);
+  window = FRAME_LAST_NONMINIBUF_WINDOW (f);
+  toolbar_findex = get_builtin_face_cache_index (XWINDOW (window), Vtoolbar_face);
+
+  /* Do the border */
+  redisplay_clear_region (window, toolbar_findex,
+			  x, y,
+			  (vert ? bar_width : border_width),
+			  (vert ? border_width : bar_height));
+  redisplay_clear_region (window, toolbar_findex,
+			  (vert ? x : x + bar_width - border_width),
+			  (vert ? y + bar_height - border_width : y),
+			  (vert ? bar_width : border_width),
+			  (vert ? border_width : bar_height));
+
+  if (vert)
+    {
+      max_pixpos = y + bar_height - border_width;
+      y += border_width;
+    }
+  else
+    {
+      max_pixpos = x + bar_width - border_width;
+      x += border_width;
+    }
+
+  button = FRAME_TOOLBAR_BUTTONS (f, pos);
+  right_size = 0;
+
+  /* First loop over all of the buttons to determine how much room we
+     need for left hand and right hand buttons.  This loop will also
+     make sure that all instances are instantiated so when we actually
+     output them they will come up immediately. */
+  while (!NILP (button))
+    {
+      struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
+      int size = xlike_get_button_size (f, window, tb, vert, pos);
+
+      if (tb->pushright)
+	right_size += size;
+
+      button = tb->next;
+    }
+
+  button = FRAME_TOOLBAR_BUTTONS (f, pos);
+
+  /* Loop over the left buttons, updating and outputting them. */
+  XLIKE_OUTPUT_BUTTONS_LOOP (1);
+
+  /* Now determine where the right buttons start. */
+  right_start = max_pixpos - right_size;
+  if (right_start < (vert ? y : x))
+    right_start = (vert ? y : x);
+
+  /* Output the blank which goes from the end of the left buttons to
+     the start of the right. */
+  blank_size = right_start - (vert ? y : x);
+  if (blank_size)
+    {
+      int height, width;
+
+      if (vert)
+	{
+	  width = bar_width;
+	  height = blank_size;
+	}
+      else
+	{
+	  width = blank_size;
+	  height = bar_height;
+	}
+
+      /*
+       * Use a 3D pushright separator only if there isn't a toolbar
+       * border.  A flat separator meshes with the border and looks
+       * better.
+       */
+      if (1)
+	{
+	  struct toolbar_button tb;
+
+	  tb.x = x;
+	  tb.y = y;
+	  tb.width = width;
+	  tb.height = height;
+	  tb.border_width = border_width;
+	  tb.vertical = vert;
+	  tb.enabled = 1;
+	  tb.up_glyph = border_width ? Qt : Qnil;
+
+	  __prepare_button_area (f, &tb);
+	}
+
+      if (vert)
+	y += height;
+      else
+	x += width;
+    }
+
+  /* Loop over the right buttons, updating and outputting them. */
+  XLIKE_OUTPUT_BUTTONS_LOOP (0);
+
+  if (!vert)
+    {
+      Lisp_Object frame = wrap_frame (f);
+
+      redisplay_clear_region (frame,
+			      DEFAULT_INDEX, FRAME_PIXWIDTH (f) - 1, y, 1,
+			      bar_height);
+    }
+
+  SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 1);
+  __INTERNAL_FLUSH (XDEVICE (f->device));
+}
+
+static void
+xlike_clear_toolbar (struct frame *f, enum toolbar_pos pos, int thickness_change)
+{
+  Lisp_Object frame;
+  int x, y, width, height, vert;
+
+  get_toolbar_coords (f, pos, &x, &y, &width, &height, &vert, 1);
+  frame = wrap_frame (f);
+
+  /* The thickness_change parameter is used by the toolbar resize routines
+     to clear any excess toolbar if the size shrinks. */
+  if (thickness_change < 0)
+    {
+      if (pos == LEFT_TOOLBAR || pos == RIGHT_TOOLBAR)
+	{
+	  x = x + width + thickness_change;
+	  width = -thickness_change;
+	}
+      else
+	{
+	  y = y + height + thickness_change;
+	  height = -thickness_change;
+	}
+    }
+
+  SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 0);
+
+  redisplay_clear_region (frame, DEFAULT_INDEX, x, y, width, height);
+
+  __INTERNAL_FLUSH (XDEVICE (f->device));
+}
+
+void
+xlike_output_frame_toolbars (struct frame *f)
+{
+  __INTERNAL_APPROPRIATENESS_CHECK(f);
+
+  if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
+    xlike_output_toolbar (f, TOP_TOOLBAR);
+
+  if (FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
+    xlike_output_toolbar (f, BOTTOM_TOOLBAR);
+
+  if (FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
+    xlike_output_toolbar (f, LEFT_TOOLBAR);
+
+  if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
+    xlike_output_toolbar (f, RIGHT_TOOLBAR);
+}
+
+void
+xlike_clear_frame_toolbars (struct frame *f)
+{
+  __INTERNAL_APPROPRIATENESS_CHECK(f);
+
+  if (f->top_toolbar_was_visible
+      && !FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
+    xlike_clear_toolbar (f, TOP_TOOLBAR, 0);
+  if (f->bottom_toolbar_was_visible
+      && !FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
+    xlike_clear_toolbar (f, BOTTOM_TOOLBAR, 0);
+  if (f->left_toolbar_was_visible 
+      && !FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
+    xlike_clear_toolbar (f, LEFT_TOOLBAR, 0);
+  if (f->right_toolbar_was_visible 
+       && !FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
+    xlike_clear_toolbar (f, RIGHT_TOOLBAR, 0);
+}
+
+static void
+xlike_redraw_exposed_toolbar (struct frame *f, enum toolbar_pos pos, int x, int y,
+			    int width, int height)
+{
+  int bar_x, bar_y, bar_width, bar_height, vert;
+  Lisp_Object button = FRAME_TOOLBAR_BUTTONS (f, pos);
+
+  get_toolbar_coords (f, pos, &bar_x, &bar_y, &bar_width, &bar_height,
+		      &vert, 1);
+
+  if (((y + height) < bar_y) || (y > (bar_y + bar_height)))
+    return;
+  if (((x + width) < bar_x) || (x > (bar_x + bar_width)))
+    return;
+
+  while (!NILP (button))
+    {
+      struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
+
+      if (vert)
+	{
+	  if (((tb->y + tb->height) > y) && (tb->y < (y + height)))
+	    tb->dirty = 1;
+
+	  /* If this is true we have gone past the exposed region. */
+	  if (tb->y > (y + height))
+	    break;
+	}
+      else
+	{
+	  if (((tb->x + tb->width) > x) && (tb->x < (x + width)))
+	    tb->dirty = 1;
+
+	  /* If this is true we have gone past the exposed region. */
+	  if (tb->x > (x + width))
+	    break;
+	}
+
+      button = tb->next;
+    }
+
+  /* Even if none of the buttons is in the area, the blank region at
+     the very least must be because the first thing we did is verify
+     that some portion of the toolbar is in the exposed region. */
+  xlike_output_toolbar (f, pos);
+}
+
+void
+xlike_redraw_exposed_toolbars (struct frame *f, int x, int y, int width,
+				int height)
+{
+  __INTERNAL_APPROPRIATENESS_CHECK(f);
+
+  if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
+    xlike_redraw_exposed_toolbar (f, TOP_TOOLBAR, x, y, width, height);
+
+  if (FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
+    xlike_redraw_exposed_toolbar (f, BOTTOM_TOOLBAR, x, y, width, height);
+
+  if (FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
+    xlike_redraw_exposed_toolbar (f, LEFT_TOOLBAR, x, y, width, height);
+
+  if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
+    xlike_redraw_exposed_toolbar (f, RIGHT_TOOLBAR, x, y, width, height);
+}
+
+void
+xlike_redraw_frame_toolbars (struct frame *f)
+{
+  /* There are certain startup paths that lead to update_EmacsFrame in
+     faces.c being called before a new frame is fully initialized.  In
+     particular before we have actually mapped it.  That routine can
+     call this one.  So, we need to make sure that the frame is
+     actually ready before we try and draw all over it. */
+  if (__INTERNAL_MAPPED_P(f))
+    xlike_redraw_exposed_toolbars (f, 0, 0, FRAME_PIXWIDTH (f),
+				    FRAME_PIXHEIGHT (f));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/toolbar-xlike.h	Wed Feb 03 02:46:50 2010 -0600
@@ -0,0 +1,21 @@
+/* toolbar-xlike.h
+**
+** Description: 
+**
+** Created by: William M. Perry
+** Copyright (c) 2001 Free Software Foundation
+**
+*/
+
+#ifndef __TOOLBAR_XLIKE_H__
+#define __TOOLBAR_XLIKE_H__
+
+extern void xlike_output_frame_toolbars (struct frame *f);
+extern void xlike_redraw_exposed_toolbars (struct frame *f,
+					    int x, int y,
+					    int width, int height);
+extern void xlike_redraw_frame_toolbars (struct frame *f);
+extern void xlike_output_toolbar_button (struct frame *f, Lisp_Object button);
+extern void xlike_clear_frame_toolbars (struct frame *f);
+
+#endif /* __TOOLBAR_XLIKE_H__ */
--- a/src/xgccache.c	Mon Feb 01 22:00:29 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,362 +0,0 @@
-/* Efficient caching of X GCs (graphics contexts).
-   Copyright (C) 1993 Free Software Foundation, Inc.
-   Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
-
-This file is part of XEmacs.
-
-XEmacs 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 2, or (at your option) any
-later version.
-
-XEmacs is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with XEmacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-/* Synched up with: Not in FSF. */
-
-/* Emacs uses a lot of different display attributes; for example, assume
-   that only four fonts are in use (normal, bold, italic, and bold-italic).
-   Then assume that one stipple or background is used for text selections,
-   and another is used for highlighting mousable regions.  That makes 16
-   GCs already.  Add in the fact that another GC may be needed to display
-   the text cursor in any of those regions, and you've got 32.  Add in
-   more fonts, and it keeps increasing exponentially.
-
-   We used to keep these GCs in a cache of merged (fully qualified) faces.
-   However, a lot of other code in xterm.c used XChangeGC of existing GCs,
-   which is kind of slow and kind of random.  Also, managing the face cache
-   was tricky because it was hard to know when a face was no longer visible
-   on the frame -- we had to mark all frames as garbaged whenever a face
-   was changed, which caused an unpleasant amount of flicker (since faces are
-   created/destroyed (= changed) whenever a frame is created/destroyed.
-
-   So this code maintains a cache at the GC level instead of at the face
-   level.  There is an upper limit on the size of the cache, after which we
-   will stop creating GCs and start reusing them (reusing the least-recently-
-   used ones first).  So if faces get changed, their GCs will eventually be
-   recycled.  Also more sharing of GCs is possible.
-
-   This code uses hash tables.  It could be that, if the cache size is small
-   enough, a linear search might be faster; but I doubt it, since we need
-   `equal' comparisons, not `eq', and I expect that the optimal cache size
-   will be ~100.
-
-   Written by jwz, 14 jun 93
- */
-
-#include <config.h>
-#include "lisp.h"
-#include "hash.h"
-
-#include "xgccache.h"
-
-#define GC_CACHE_SIZE 100
-
-#define GCCACHE_HASH
-
-struct gcv_and_mask {
-  XGCValues gcv;
-  unsigned long mask;
-};
-
-struct gc_cache_cell {
-  GC gc;
-  struct gcv_and_mask gcvm;
-  struct gc_cache_cell *prev, *next;
-};
-
-struct gc_cache {
-  Display *dpy;		/* used only as arg to XCreateGC/XFreeGC */
-  Window window;	/* used only as arg to XCreateGC */
-  int size;
-  struct gc_cache_cell *head;
-  struct gc_cache_cell *tail;
-#ifdef GCCACHE_HASH
-  struct hash_table *table;
-#endif
-
-  int create_count;
-  int delete_count;
-};
-
-#ifdef GCCACHE_HASH
-static Hashcode
-gc_cache_hash (const void *arg)
-{
-  const struct gcv_and_mask *gcvm = (const struct gcv_and_mask *) arg;
-  unsigned long *longs = (unsigned long *) &gcvm->gcv;
-  Hashcode hash = gcvm->mask;
-  int i;
-  /* This could look at the mask and only use the used slots in the
-     hash code.  That would win in that we wouldn't have to initialize
-     every slot of the gcv when calling gc_cache_lookup.  But we need
-     the hash function to be as fast as possible; some timings should
-     be done. */
-  for (i = 0; i < (int) (sizeof (XGCValues) / sizeof (unsigned long)); i++)
-    hash = (hash << 1) ^ *longs++;
-  return hash;
-}
-
-#endif /* GCCACHE_HASH */
-
-static int
-gc_cache_eql (const void *arg1, const void *arg2)
-{
-  /* See comment in gc_cache_hash */
-  return !memcmp (arg1, arg2, sizeof (struct gcv_and_mask));
-}
-
-struct gc_cache *
-make_gc_cache (Display *dpy, Window window)
-{
-  struct gc_cache *cache = xnew (struct gc_cache);
-  cache->dpy = dpy;
-  cache->window = window;
-  cache->size = 0;
-  cache->head = cache->tail = 0;
-  cache->create_count = cache->delete_count = 0;
-#ifdef GCCACHE_HASH
-  cache->table =
-    make_general_hash_table (GC_CACHE_SIZE, gc_cache_hash, gc_cache_eql);
-#endif
-  return cache;
-}
-
-void
-free_gc_cache (struct gc_cache *cache)
-{
-  struct gc_cache_cell *rest, *next;
-  rest = cache->head;
-  while (rest)
-    {
-      XFreeGC (cache->dpy, rest->gc);
-      next = rest->next;
-      xfree (rest, struct gc_cache_cell *);
-      rest = next;
-    }
-#ifdef GCCACHE_HASH
-  free_hash_table (cache->table);
-#endif
-  xfree (cache, struct gc_cache *);
-}
-
-GC
-gc_cache_lookup (struct gc_cache *cache, XGCValues *gcv, unsigned long mask)
-{
-  struct gc_cache_cell *cell, *next, *prev;
-  struct gcv_and_mask gcvm;
-
-#ifdef DEBUG_XEMACS
-  (void) describe_gc_cache (cache, DGCCFLAG_DISABLE);
-#endif
-
-  if ((!!cache->head) != (!!cache->tail)) ABORT ();
-  if (cache->head && (cache->head->prev || cache->tail->next)) ABORT ();
-
-  gcvm.mask = mask;
-  gcvm.gcv = *gcv;	/* this copies... */
-
-#ifdef GCCACHE_HASH
-
-  /* The intermediate cast fools gcc into not outputting strict-aliasing
-     complaints */
-  if (gethash (&gcvm, cache->table, (const void **) (void *) &cell))
-
-#else /* !GCCACHE_HASH */
-
-  cell = cache->tail;	/* start at the end (most recently used) */
-  while (cell)
-    {
-      if (gc_cache_eql (&gcvm, &cell->gcvm))
-	break;
-      else
-	cell = cell->prev;
-    }
-
-  /* #### This whole file needs some serious overhauling. */
-  if (!(mask | GCTile) && cell->gc->values.tile)
-    cell = 0;
-  else if (!(mask | GCStipple) && cell->gc->values.stipple)
-    cell = 0;
-
-  if (cell)
-
-#endif /* !GCCACHE_HASH */
-
-    {
-      /* Found a cell.  Move this cell to the end of the list, so that it
-	 will be less likely to be collected than a cell that was accessed
-	 less recently.
-       */
-#if 0
-      debug_out ("Returning cached GC: %08lx\n", XE_GCONTEXT(cell));
-#endif
-      if (cell == cache->tail)
-	return cell->gc;
-
-      next = cell->next;
-      prev = cell->prev;
-      if (prev) prev->next = next;
-      if (next) next->prev = prev;
-      if (cache->head == cell) cache->head = next;
-      cell->next = 0;
-      cell->prev = cache->tail;
-      cache->tail->next = cell;
-      cache->tail = cell;
-      if (cache->head == cell) ABORT ();
-      if (cell->next) ABORT ();
-      if (cache->head->prev) ABORT ();
-      if (cache->tail->next) ABORT ();
-      return cell->gc;
-    }
-
-  /* else, cache miss. */
-
-  if (cache->size == GC_CACHE_SIZE)
-    /* Reuse the first cell on the list (least-recently-used).
-       Remove it from the list, and unhash it from the table.
-     */
-    {
-      cell = cache->head;
-      cache->head = cell->next;
-      cache->head->prev = 0;
-      if (cache->tail == cell) cache->tail = 0; /* only one */
-#if 0
-      debug_out ("Cache full, freeing GC: %08lx\n  ", XE_GCONTEXT(cell));
-#endif
-      XFreeGC (cache->dpy, cell->gc);
-      cache->delete_count++;
-#ifdef GCCACHE_HASH
-      remhash (&cell->gcvm, cache->table);
-#endif
-    }
-  else if (cache->size > GC_CACHE_SIZE)
-    ABORT ();
-  else
-    {
-      /* Allocate a new cell (don't put it in the list or table yet). */
-      cell = xnew (struct gc_cache_cell);
-      cache->size++;
-    }
-
-  /* Now we've got a cell (new or reused).  Fill it in. */
-  memcpy (&cell->gcvm.gcv, gcv, sizeof (XGCValues));
-  cell->gcvm.mask = mask;
-
-  /* Put the cell on the end of the list. */
-  cell->next = 0;
-  cell->prev = cache->tail;
-  if (cache->tail) cache->tail->next = cell;
-  cache->tail = cell;
-  if (! cache->head) cache->head = cell;
-
-  cache->create_count++;
-#ifdef GCCACHE_HASH
-  /* Hash it in the table */
-  puthash (&cell->gcvm, cell, cache->table);
-#endif
-
-  /* Now make and return the GC. */
-  cell->gc = XCreateGC (cache->dpy, cache->window, mask, gcv);
-
-  /* debug */
-  assert (cell->gc == gc_cache_lookup (cache, gcv, mask));
-
-#if 0
-  debug_out ("Returning new GC: %08lx\n  ", XE_GCONTEXT(cell));
-#endif
-  return cell->gc;
-}
-
-
-#ifdef DEBUG_XEMACS
-
-/* FLAGS
-   The flags argument is a bitwise or of any of the following:
-
-   DGCCFLAG_SUMMARY		Summary statistics for cache
-   DGCCFLAG_LIST_CELLS		If summary is being printed, print cell IDs too.
-   DGCCFLAG_CELL_DETAILS	If cell IDs are being printed, additionally
-				print the internal fields used and values.
-
-   DGCCFLAG_DEFAULT		A predefined combination giving whatever the
-				maintainers are currently interested in seeing.
-*/
-void
-describe_gc_cache (struct gc_cache *cache, int flags)
-{
-  int count = 0;
-  struct gc_cache_cell *cell = cache->head;
-
-  if (! flags & DGCCFLAG_SUMMARY) return;
-
-  stderr_out ("\nsize:    %d", cache->size);
-  stderr_out ("\ncreated: %d", cache->create_count);
-  stderr_out ("\ndeleted: %d", cache->delete_count);
-
-  if (flags & DGCCFLAG_LIST_CELLS)
-    while (cell)
-      {
-	struct gc_cache_cell *cell2;
-	int i = 0;
-	stderr_out ("\n%d:\t0x%lx  GC: 0x%08lx  hash: 0x%08lx\n",
-		    count, (long) cell, (long) XE_GCONTEXT(cell),
-		    gc_cache_hash (&cell->gcvm));
-
-	for (cell2 = cache->head; cell2; cell2 = cell2->next, i++)
-	  if (count != i &&
-	      gc_cache_hash (&cell->gcvm) == gc_cache_hash (&cell2->gcvm))
-	    stderr_out ("\tHASH COLLISION with cell %d\n", i);
-	stderr_out ("\tmask:       %8lx\n", cell->gcvm.mask);
-
-	if (flags & DGCCFLAG_CELL_DETAILS)
-	  {
-#define FROB(field) do {						\
-  if ((int)cell->gcvm.gcv.field != (~0))				\
-    stderr_out ("\t%-12s%8x\n", #field ":", (int)cell->gcvm.gcv.field);	\
-} while (0)
-	    FROB (function);
-	    FROB (plane_mask);
-	    FROB (foreground);
-	    FROB (background);
-	    FROB (line_width);
-	    FROB (line_style);
-	    FROB (cap_style);
-	    FROB (join_style);
-	    FROB (fill_style);
-	    FROB (fill_rule);
-	    FROB (arc_mode);
-	    FROB (tile);
-	    FROB (stipple);
-	    FROB (ts_x_origin);
-	    FROB (ts_y_origin);
-	    FROB (font);
-	    FROB (subwindow_mode);
-	    FROB (graphics_exposures);
-	    FROB (clip_x_origin);
-	    FROB (clip_y_origin);
-	    FROB (clip_mask);
-	    FROB (dash_offset);
-#undef FROB
-	  }
-
-	count++;
-	if (cell->next && cell == cache->tail)
-	  stderr_out ("\nERROR!  tail is here!\n\n");
-	else if (!cell->next && cell != cache->tail)
-	  stderr_out ("\nERROR!  tail is not at the end\n\n");
-	cell = cell->next;
-      }	/* while (cell) */
-
-  if (count != cache->size)
-    stderr_out ("\nERROR!  count should be %d\n\n", cache->size);
-}
-
-#endif /* DEBUG_XEMACS */
--- a/src/xgccache.h	Mon Feb 01 22:00:29 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/* Efficient caching of X GCs (graphics contexts).
-   Copyright (C) 1993 Free Software Foundation, Inc.
-
-
-This file is part of XEmacs.
-
-XEmacs 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 2, or (at your option) any
-later version.
-
-XEmacs is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with XEmacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-/* Synched up with: Not in FSF. */
-
-/* Written by jwz, 14 jun 93 */
-
-#ifndef INCLUDED_xgccache_h_
-#define INCLUDED_xgccache_h_
-
-#include <X11/Xlib.h>
-
-struct gc_cache;
-struct gc_cache *make_gc_cache (Display *, Window);
-void free_gc_cache (struct gc_cache *cache);
-GC gc_cache_lookup (struct gc_cache *, XGCValues *, unsigned long mask);
-
-#define XE_GCONTEXT(cell) (XGContextFromGC(cell->gc))
-
-#ifdef DEBUG_XEMACS
-
-void describe_gc_cache (struct gc_cache *cache, int flags);
-
-#define DGCCFLAG_DISABLE		0
-#define DGCCFLAG_SUMMARY		1 << 0
-#define DGCCFLAG_LIST_CELLS		1 << 1
-#define DGCCFLAG_CELL_DETAILS		1 << 2
-/* A combination of the flags above. */
-#define DGCCFLAG_DEFAULT		DGCCFLAG_SUMMARY | DGCCFLAG_LIST_CELLS
-#endif
-
-#endif /* INCLUDED_xgccache_h_ */