[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/w32fns.c,v
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/src/w32fns.c,v |
Date: |
Sat, 16 Dec 2006 14:38:44 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 06/12/16 14:38:44
Index: w32fns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32fns.c,v
retrieving revision 1.282
retrieving revision 1.283
diff -u -b -r1.282 -r1.283
--- w32fns.c 14 Dec 2006 23:37:20 -0000 1.282
+++ w32fns.c 16 Dec 2006 14:38:44 -0000 1.283
@@ -8350,6 +8350,30 @@
return Qnil;
}
+DEFUN ("w32-window-exists-p", Fw32_window_exists_p, Sw32_window_exists_p,
+ 2, 2, 0,
+ doc: /* Return non-nil if a window exists with the specified CLASS and
NAME.
+
+This is a direct interface to the Windows API FindWindow function. */)
+ (class, name)
+Lisp_Object class, name;
+{
+ HWND hnd;
+
+ if (!NILP (class))
+ CHECK_STRING (class);
+ if (!NILP (name))
+ CHECK_STRING (name);
+
+ hnd = FindWindow (STRINGP (class) ? ((LPCTSTR) SDATA (class)) : NULL,
+ STRINGP (name) ? ((LPCTSTR) SDATA (name)) : NULL);
+ if (!hnd)
+ return Qnil;
+ return Qt;
+}
+
+
+
DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0,
doc: /* Return storage information about the file system FILENAME is on.
Value is a list of floats (TOTAL FREE AVAIL), where TOTAL is the total
@@ -8915,6 +8939,7 @@
staticpro (&Qw32_charset_unicode);
Qw32_charset_unicode = intern ("w32-charset-unicode");
+ }
#endif
#if 0 /* TODO: Port to W32 */
@@ -8959,6 +8984,7 @@
defsubr (&Sw32_registered_hot_keys);
defsubr (&Sw32_reconstruct_hot_key);
defsubr (&Sw32_toggle_lock_key);
+ defsubr (&Sw32_window_exists_p);
defsubr (&Sw32_find_bdf_fonts);
defsubr (&Sfile_system_info);