Add 2012 to FSF copyright years for Emacs files
[bpt/emacs.git] / lisp / term / w32-win.el
index 2894080..abfaafd 100644 (file)
@@ -1,7 +1,6 @@
 ;;; w32-win.el --- parse switches controlling interface with W32 window system
 
-;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1994, 2001-2012  Free Software Foundation, Inc.
 
 ;; Author: Kevin Gallo
 ;; Keywords: terminals
@@ -86,6 +85,7 @@
 (define-obsolete-function-alias 'w32-select-font 'x-select-font "23.1")
 
 (defvar w32-color-map) ;; defined in w32fns.c
+(make-obsolete 'w32-default-color-map nil "24.1")
 
 (declare-function w32-send-sys-command "w32fns.c")
 (declare-function set-message-beep "w32console.c")
@@ -148,29 +148,19 @@ the last file dropped is selected."
 (global-set-key [language-change] 'ignore)
 
 (defvar x-resource-name)
-(defvar x-colors)
 
 \f
-(defun xw-defined-colors (&optional frame)
-  "Internal function called by `defined-colors', which see."
-  (or frame (setq frame (selected-frame)))
-  (let ((defined-colors nil))
-    (dolist (this-color (or (mapcar 'car w32-color-map) x-colors))
-      (and (color-supported-p this-color frame t)
-          (setq defined-colors (cons this-color defined-colors))))
-    defined-colors))
-\f
 ;;;; Function keys
 
  ;;; make f10 activate the real menubar rather than the mini-buffer menu
  ;;; navigation feature.
  (defun w32-menu-bar-open (&optional frame)
    "Start key navigation of the menu bar in FRAME.
+
 This initially activates the first menu-bar item, and you can then navigate
 with the arrow keys, select a menu entry with the Return key or cancel with
 the Escape key.  If FRAME has no menu bar, this function does nothing.
+
 If FRAME is nil or not given, use the selected frame.
 If FRAME does not have the menu bar enabled, display a text menu using
 `tmm-menubar'."
@@ -196,21 +186,31 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
   "Report an error when a suspend is attempted."
   (error "Suspending an Emacs running under W32 makes no sense"))
 
-(defvar image-library-alist)
-
-;;; Set default known names for image libraries
-(setq image-library-alist
-      '((xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll")
-        (png "libpng12d.dll" "libpng12.dll" "libpng.dll"
-        ;; these are libpng 1.2.8 from GTK+
-        "libpng13d.dll" "libpng13.dll")
-        (jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll")
-        (tiff "libtiff3.dll" "libtiff.dll")
-        (gif "giflib4.dll" "libungif4.dll" "libungif.dll")
-        (svg "librsvg-2-2.dll")
-        (gdk-pixbuf "libgdk_pixbuf-2.0-0.dll")
-        (glib "libglib-2.0-0.dll")
-       (gobject "libgobject-2.0-0.dll")))
+(defvar dynamic-library-alist)
+(defvar libpng-version)                 ; image.c #ifdef HAVE_NTGUI
+
+;;; Set default known names for external libraries
+(setq dynamic-library-alist
+      (list
+       '(xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll")
+       ;; Versions of libpng 1.4.x and later are incompatible with
+       ;; earlier versions.  Set up the list of libraries according to
+       ;; the version we were compiled against.  (If we were compiled
+       ;; without PNG support, libpng-version's value is -1.)
+       (if (>= libpng-version 10400)
+          ;; libpng14-14.dll is libpng 1.4.3 from GTK+
+          '(png "libpng14-14.dll" "libpng14.dll")
+        '(png "libpng12d.dll" "libpng12.dll" "libpng3.dll" "libpng.dll"
+              ;; these are libpng 1.2.8 from GTK+
+              "libpng13d.dll" "libpng13.dll"))
+       '(jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll")
+       '(tiff "libtiff3.dll" "libtiff.dll")
+       '(gif "giflib4.dll" "libungif4.dll" "libungif.dll")
+       '(svg "librsvg-2-2.dll")
+       '(gdk-pixbuf "libgdk_pixbuf-2.0-0.dll")
+       '(glib "libglib-2.0-0.dll")
+       '(gobject "libgobject-2.0-0.dll")
+       '(gnutls "libgnutls-28.dll" "libgnutls-26.dll")))
 
 ;;; multi-tty support
 (defvar w32-initialized nil
@@ -218,11 +218,6 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
 
 (declare-function x-open-connection "w32fns.c"
                   (display &optional xrm-string must-succeed))
-
-(declare-function setup-default-fontset "fontset" ())
-(declare-function set-fontset-font "fontset.c"
-                  (name target font-spec &optional frame add))
-(declare-function setup-default-fontset "fontset" ())
 (declare-function create-fontset-from-fontset-spec "fontset"
                   (fontset-spec &optional style-variant noerror))
 (declare-function create-fontset-from-x-resource "fontset" ())
@@ -257,7 +252,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
   ;; Create the standard fontset.
   (condition-case err
       (create-fontset-from-fontset-spec w32-standard-fontset-spec t)
-    (error (display-warning 
+    (error (display-warning
            'initialization
            (format "Creation of the standard fontset failed: %s" err)
            :error)))
@@ -321,5 +316,4 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
 
 (provide 'w32-win)
 
-;; arch-tag: 69fb1701-28c2-4890-b351-3d1fe4b4f166
 ;;; w32-win.el ends here