diff options
| author | Eli Zaretskii | 2006-12-16 14:38:44 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-12-16 14:38:44 +0000 |
| commit | a01763cbe790cf9834e609e89e0826935e36d0b8 (patch) | |
| tree | aee8838eb38c599c4c194749ad0b320758e74d7b /src | |
| parent | 651f81720c907f3ae904a58957368d8f70f6748e (diff) | |
| download | emacs-a01763cbe790cf9834e609e89e0826935e36d0b8.tar.gz emacs-a01763cbe790cf9834e609e89e0826935e36d0b8.zip | |
(w32-window-exists-p): New function.
(syms_of_w32fns): Defsubr it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32fns.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/w32fns.c b/src/w32fns.c index 96fa9375ee8..34cfb0a2882 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -8349,6 +8349,30 @@ is set to off if the low bit of NEW-STATE is zero, otherwise on. */) | |||
| 8349 | } | 8349 | } |
| 8350 | return Qnil; | 8350 | return Qnil; |
| 8351 | } | 8351 | } |
| 8352 | |||
| 8353 | DEFUN ("w32-window-exists-p", Fw32_window_exists_p, Sw32_window_exists_p, | ||
| 8354 | 2, 2, 0, | ||
| 8355 | doc: /* Return non-nil if a window exists with the specified CLASS and NAME. | ||
| 8356 | |||
| 8357 | This is a direct interface to the Windows API FindWindow function. */) | ||
| 8358 | (class, name) | ||
| 8359 | Lisp_Object class, name; | ||
| 8360 | { | ||
| 8361 | HWND hnd; | ||
| 8362 | |||
| 8363 | if (!NILP (class)) | ||
| 8364 | CHECK_STRING (class); | ||
| 8365 | if (!NILP (name)) | ||
| 8366 | CHECK_STRING (name); | ||
| 8367 | |||
| 8368 | hnd = FindWindow (STRINGP (class) ? ((LPCTSTR) SDATA (class)) : NULL, | ||
| 8369 | STRINGP (name) ? ((LPCTSTR) SDATA (name)) : NULL); | ||
| 8370 | if (!hnd) | ||
| 8371 | return Qnil; | ||
| 8372 | return Qt; | ||
| 8373 | } | ||
| 8374 | |||
| 8375 | |||
| 8352 | 8376 | ||
| 8353 | DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0, | 8377 | DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0, |
| 8354 | doc: /* Return storage information about the file system FILENAME is on. | 8378 | doc: /* Return storage information about the file system FILENAME is on. |
| @@ -8915,6 +8939,7 @@ versions of Windows) characters. */); | |||
| 8915 | 8939 | ||
| 8916 | staticpro (&Qw32_charset_unicode); | 8940 | staticpro (&Qw32_charset_unicode); |
| 8917 | Qw32_charset_unicode = intern ("w32-charset-unicode"); | 8941 | Qw32_charset_unicode = intern ("w32-charset-unicode"); |
| 8942 | } | ||
| 8918 | #endif | 8943 | #endif |
| 8919 | 8944 | ||
| 8920 | #if 0 /* TODO: Port to W32 */ | 8945 | #if 0 /* TODO: Port to W32 */ |
| @@ -8959,6 +8984,7 @@ versions of Windows) characters. */); | |||
| 8959 | defsubr (&Sw32_registered_hot_keys); | 8984 | defsubr (&Sw32_registered_hot_keys); |
| 8960 | defsubr (&Sw32_reconstruct_hot_key); | 8985 | defsubr (&Sw32_reconstruct_hot_key); |
| 8961 | defsubr (&Sw32_toggle_lock_key); | 8986 | defsubr (&Sw32_toggle_lock_key); |
| 8987 | defsubr (&Sw32_window_exists_p); | ||
| 8962 | defsubr (&Sw32_find_bdf_fonts); | 8988 | defsubr (&Sw32_find_bdf_fonts); |
| 8963 | 8989 | ||
| 8964 | defsubr (&Sfile_system_info); | 8990 | defsubr (&Sfile_system_info); |