Ken Thomases : winemac: Implement Beep().
Alexandre Julliard
julliard at winehq.org
Wed Feb 6 13:38:12 CST 2013
Module: wine
Branch: master
Commit: 3fcb69b7ca0c2f301b278949f80d3e09f904e18b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3fcb69b7ca0c2f301b278949f80d3e09f904e18b
Author: Ken Thomases <ken at codeweavers.com>
Date: Wed Feb 6 04:36:49 2013 -0600
winemac: Implement Beep().
---
dlls/winemac.drv/cocoa_app.m | 12 ++++++++++++
dlls/winemac.drv/keyboard.c | 9 +++++++++
dlls/winemac.drv/macdrv_cocoa.h | 1 +
dlls/winemac.drv/winemac.drv.spec | 1 +
4 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m
index cd09f95..3853ec9 100644
--- a/dlls/winemac.drv/cocoa_app.m
+++ b/dlls/winemac.drv/cocoa_app.m
@@ -373,3 +373,15 @@ CFDataRef macdrv_copy_keyboard_layout(CGEventSourceKeyboardType* keyboard_type,
return result;
}
+
+/***********************************************************************
+ * macdrv_beep
+ *
+ * Play the beep sound configured by the user in System Preferences.
+ */
+void macdrv_beep(void)
+{
+ OnMainThreadAsync(^{
+ NSBeep();
+ });
+}
diff --git a/dlls/winemac.drv/keyboard.c b/dlls/winemac.drv/keyboard.c
index b41f55a..d67a20c 100644
--- a/dlls/winemac.drv/keyboard.c
+++ b/dlls/winemac.drv/keyboard.c
@@ -765,6 +765,15 @@ void macdrv_keyboard_changed(const macdrv_event *event)
/***********************************************************************
+ * Beep (MACDRV.@)
+ */
+void CDECL macdrv_Beep(void)
+{
+ macdrv_beep();
+}
+
+
+/***********************************************************************
* ToUnicodeEx (MACDRV.@)
*
* The ToUnicode function translates the specified virtual-key code and keyboard
diff --git a/dlls/winemac.drv/macdrv_cocoa.h b/dlls/winemac.drv/macdrv_cocoa.h
index 62bc996..242a78e 100644
--- a/dlls/winemac.drv/macdrv_cocoa.h
+++ b/dlls/winemac.drv/macdrv_cocoa.h
@@ -115,6 +115,7 @@ extern int macdrv_err_on;
extern int macdrv_start_cocoa_app(unsigned long long tickcount) DECLSPEC_HIDDEN;
extern void macdrv_window_rejected_focus(const struct macdrv_event *event) DECLSPEC_HIDDEN;
+extern void macdrv_beep(void) DECLSPEC_HIDDEN;
/* display */
diff --git a/dlls/winemac.drv/winemac.drv.spec b/dlls/winemac.drv/winemac.drv.spec
index a227187..f4502ea 100644
--- a/dlls/winemac.drv/winemac.drv.spec
+++ b/dlls/winemac.drv/winemac.drv.spec
@@ -4,6 +4,7 @@
# USER driver
+@ cdecl Beep() macdrv_Beep
@ cdecl CreateDesktopWindow(long) macdrv_CreateDesktopWindow
@ cdecl CreateWindow(long) macdrv_CreateWindow
@ cdecl DestroyWindow(long) macdrv_DestroyWindow
More information about the wine-cvs
mailing list