note description: "Eiffel Vision beep routines. Cocoa implementation" legal: "See notice at end of class." keywords: "color, pixel, rgb, 8, 16, 24" status: "See notice at end of class." date: "$Date$" revision: "$Revision$" class EV_BEEP_IMP inherit EV_BEEP_I create make feature {NONE} -- Initlization old_make (an_interface: EV_BEEP) -- Create `Current' with interface `an_interface'. do assign_interface (an_interface) end make -- Initialize `Current'. do set_is_initialized (True) end destroy -- Render `Current' unusable. -- No externals to deallocate, just set the flags. do set_is_destroyed (True) end feature -- Commands asterisk -- Asterisk beep. do objc_beep end exclamation -- Exclamation beep. do objc_beep end hand -- Hand beep. do objc_beep end question -- Question beep. do objc_beep end ok -- Ok beep. -- System default beep. do objc_beep end feature {NONE} -- Implementation objc_beep -- Play sound NSBeep(), defined in System Preferences external "C inline use " alias "[ NSBeep(); ]" end note copyright: "Copyright (c) 2009, Daniel Furrer" end -- class EV_BEEP_IMP