summaryrefslogtreecommitdiff
path: root/src/w32console.c
diff options
context:
space:
mode:
authorDaniel Colascione <dancol@dancol.org>2012-09-17 03:55:02 -0800
committerDaniel Colascione <dancol@dancol.org>2012-09-17 03:55:02 -0800
commit0fda9b750e337d876c9461db7d4426a3f0b81482 (patch)
tree1e1659bfa590cd8375c564c6fb5c3bafa65e06c0 /src/w32console.c
parent8b33967313f09a736a833816d32fd52e10640969 (diff)
downloademacs-0fda9b750e337d876c9461db7d4426a3f0b81482.tar.gz
Implement cygw32
Here, we use the generic window-system configuration system we just implemented to support the w32 window-system in the mainline build under Cygwin. (Previously, the w32 window system could only be compiled as part of the NT-native Emacs build process.) The changes in this patch need to be applied atomically in order to avoid breaking Emacs. The changes include: - Changes throughout the Lisp and C code to not assume that NT Emacs and the w32 window system are synonymous. - Wiring up the regular select(2) event loop to Windows messages - Cleaning up the w32 drag-and-drop receiving code. - Exposing Cygwin path conversion functions to elisp. - Unicode file dialog support when compiling for Cygwin. - Splitting the w32 term lisp initialization code into code applicable to any w32 window-system and code specific to system-type windows-nt. - Integrating the old and new w32 code into the build system.
Diffstat (limited to 'src/w32console.c')
-rw-r--r--src/w32console.c49
1 files changed, 1 insertions, 48 deletions
diff --git a/src/w32console.c b/src/w32console.c
index 76585851e7f..76b7bb0b451 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -37,6 +37,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "termhooks.h"
#include "termchar.h"
#include "dispextern.h"
+#include "w32term.h"
#include "w32heap.h" /* for os_subtype */
#include "w32inevt.h"
@@ -431,53 +432,6 @@ w32con_delete_glyphs (struct frame *f, int n)
scroll_line (f, n, LEFT);
}
-static unsigned int sound_type = 0xFFFFFFFF;
-#define MB_EMACS_SILENT (0xFFFFFFFF - 1)
-
-void
-w32_sys_ring_bell (struct frame *f)
-{
- if (sound_type == 0xFFFFFFFF)
- {
- Beep (666, 100);
- }
- else if (sound_type == MB_EMACS_SILENT)
- {
- /* Do nothing. */
- }
- else
- MessageBeep (sound_type);
-}
-
-DEFUN ("set-message-beep", Fset_message_beep, Sset_message_beep, 1, 1, 0,
- doc: /* Set the sound generated when the bell is rung.
-SOUND is 'asterisk, 'exclamation, 'hand, 'question, 'ok, or 'silent
-to use the corresponding system sound for the bell. The 'silent sound
-prevents Emacs from making any sound at all.
-SOUND is nil to use the normal beep. */)
- (Lisp_Object sound)
-{
- CHECK_SYMBOL (sound);
-
- if (NILP (sound))
- sound_type = 0xFFFFFFFF;
- else if (EQ (sound, intern ("asterisk")))
- sound_type = MB_ICONASTERISK;
- else if (EQ (sound, intern ("exclamation")))
- sound_type = MB_ICONEXCLAMATION;
- else if (EQ (sound, intern ("hand")))
- sound_type = MB_ICONHAND;
- else if (EQ (sound, intern ("question")))
- sound_type = MB_ICONQUESTION;
- else if (EQ (sound, intern ("ok")))
- sound_type = MB_OK;
- else if (EQ (sound, intern ("silent")))
- sound_type = MB_EMACS_SILENT;
- else
- sound_type = 0xFFFFFFFF;
-
- return sound;
-}
static void
w32con_reset_terminal_modes (struct terminal *t)
@@ -851,5 +805,4 @@ scroll-back buffer. */);
defsubr (&Sset_screen_color);
defsubr (&Sget_screen_color);
defsubr (&Sset_cursor_size);
- defsubr (&Sset_message_beep);
}