wxWidgets/include/wx/cocoa
David Elliott 85c9f98b50 Rewrote wxSound:
* Get rid of #if wxUSE_SOUND from header.  wx/sound.h checks this already.
* Get rid of pragma interface/implementation. Apple GCC dislikes them anyway.
* Allow source file to use precompiled headers (wx/wxprec.h)
* Include only needed AppKit/Foundation headers, not AppKit/AppKit.h.
* Implement simple constructors inline in header.
* Get rid of m_sndname and m_waveLength instance variables.  They aren't used.
* Add copy constructor (why not).
* Move implementation of byte-array constructor into LoadWAV for consistency
  with UNIX wxSound.
* LoadWAV (what was in the constructor) now properly allocs, inits, and
  releases NSData.  The old code for this was not valid.
* Rename lastSound to s_currentSound.
* Rename isLastSoundLooping to s_loopCurrentSound.
* Ignore the sound:didFinishPlaying: delegate message if it is received
  for an NSSound other than s_currentSound.
* Create should not Stop the current sound.
* Don't use NSBundle to get a resource sound but use [NSSound soundNamed:]
  which will include system sounds.
* Playing a sound synchronously uses wxEventLoop::Dispatch which will
  really block (not spin the CPU like Yield).  The sound is considered
  finished playing when s_currentSound is set to something else.  In order
  to make sure we don't get stuck in this event loop the delegate
  calls wxApp::WakeUpIdle if it releases s_currentSound.
* Have IsPlaying() check to make sure s_currentSound is not nil since
  only messages returning another object or void are allowed to be
  sent to nil objects.

Changes involving retain/release
* Get rid of comment about tricky API, it's not.
* Get rid of isLastSoundInScope. Cocoa has proper reference counting.
* Add SetNSSound which, like the rest of wxCocoa, retains/releases
  appropriately, sets the delegate, and logs when WXTRACE=COCOA_RetainRelease.
* Destructor does SetNSSound(nil) which will always release the NSSound.
  Create and LoadWAV use SetNSSound method like the rest of wxCocoa.
* Make the delegate always release s_currentSound if not (or if done) looping.
  DoPlay sets s_currentSound to m_cocoaNSSound after retaining it so that
  the delegate can always safely release it.
* Stop, like everything else, does not need check of isLastSoundInScope


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-20 21:04:52 +00:00
..
app.h Use old licence name 2004-05-23 20:53:33 +00:00
autorelease.h Use old licence name 2004-05-23 20:53:33 +00:00
bitmap.h Use old licence name 2004-05-23 20:53:33 +00:00
bmpbuttn.h Implement wxBitmapButton::DoGetBestSize() to call wxButtonBase version so 2004-10-05 01:50:17 +00:00
brush.h Use old licence name 2004-05-23 20:53:33 +00:00
button.h Implement wxButtonBase::GetDefaultSize() 2004-10-05 01:49:05 +00:00
checkbox.h Use old licence name 2004-05-23 20:53:33 +00:00
checklst.h Use old licence name 2004-05-23 20:53:33 +00:00
choice.h Use old licence name 2004-05-23 20:53:33 +00:00
clipbrd.h Use old licence name 2004-05-23 20:53:33 +00:00
colordlg.h 2.5.3 - cleanups, fixes, etc. etc. - 2004-10-07 08:53:48 +00:00
colour.h fix a bunch of warnings in unicode build 2004-10-07 17:45:04 +00:00
combobox.h Use old licence name 2004-05-23 20:53:33 +00:00
control.h Use old licence name 2004-05-23 20:53:33 +00:00
cursor.h cursors for cocoa 2004-10-06 22:11:46 +00:00
dataform.h Use old licence name 2004-05-23 20:53:33 +00:00
dataobj2.h Use old licence name 2004-05-23 20:53:33 +00:00
dataobj.h Use old licence name 2004-05-23 20:53:33 +00:00
dc.h Use old licence name 2004-05-23 20:53:33 +00:00
dcclient.h Use old licence name 2004-05-23 20:53:33 +00:00
dcmemory.h Use old licence name 2004-05-23 20:53:33 +00:00
dcscreen.h Use old licence name 2004-05-23 20:53:33 +00:00
dialog.h Use old licence name 2004-05-23 20:53:33 +00:00
display.h wxDisplay for wxCocoa 2004-10-08 00:40:19 +00:00
drawer.h 2.5.3 - cleanups, fixes, etc. etc. - 2004-10-07 08:53:48 +00:00
filedlg.h wxCocoa: Add native file dialog from Ryan Norton. Modified patch #1039368 2004-10-18 19:15:42 +00:00
font.h Use old licence name 2004-05-23 20:53:33 +00:00
fontdlg.h 2.5.3 - cleanups, fixes, etc. etc. - 2004-10-07 08:53:48 +00:00
frame.h Use old licence name 2004-05-23 20:53:33 +00:00
gauge.h Use old licence name 2004-05-23 20:53:33 +00:00
gdiobj.h Use old licence name 2004-05-23 20:53:33 +00:00
glcanvas.h wxCocoa: Added (mostly) stubs for wxGLCanvas and friends. 2004-10-01 14:23:59 +00:00
icon.h Use old licence name 2004-05-23 20:53:33 +00:00
listbox.h Use old licence name 2004-05-23 20:53:33 +00:00
log.h Use old licence name 2004-05-23 20:53:33 +00:00
mbarman.h Use old licence name 2004-05-23 20:53:33 +00:00
mdi.h Use old licence name 2004-05-23 20:53:33 +00:00
menu.h Allow the wxMenu to be owned by the NSMenu so that it can be returned 2004-10-15 03:06:50 +00:00
menuitem.h Added CocoaSetKeyEquivalent() that sets the accelerators. Only implemented 2004-10-20 19:18:46 +00:00
msgdlg.h 2.5.3 - cleanups, fixes, etc. etc. - 2004-10-07 08:53:48 +00:00
notebook.h Use old licence name 2004-05-23 20:53:33 +00:00
NSApplication.h Observe NSControlTintDidChangeNotification in the application delegate. 2004-06-22 04:16:22 +00:00
NSBox.h Use old licence name 2004-05-23 20:53:33 +00:00
NSButton.h * Do not use class posing to handle target/action. 2004-06-24 15:14:33 +00:00
NSControl.h Use old licence name 2004-05-23 20:53:33 +00:00
NSMenu.h Allow the dealloc message to be caught 2004-10-15 02:55:15 +00:00
NSPanel.h Use old licence name 2004-05-23 20:53:33 +00:00
NSScroller.h wxCocoa: Added wxScrollBar 2004-06-23 15:26:44 +00:00
NSTableDataSource.h Use old licence name 2004-05-23 20:53:33 +00:00
NSTableView.h Use old licence name 2004-05-23 20:53:33 +00:00
NSTabView.h Use old licence name 2004-05-23 20:53:33 +00:00
NSTextField.h Use old licence name 2004-05-23 20:53:33 +00:00
NSView.h cocoa doesn't need system framework - string conversion for cocoa - focus for cocoa - a bit of change for string unit tests for new functionality 2004-10-11 02:02:30 +00:00
NSWindow.h Use old licence name 2004-05-23 20:53:33 +00:00
ObjcAssociate.h Use old licence name 2004-05-23 20:53:33 +00:00
ObjcPose.h Use old licence name 2004-05-23 20:53:33 +00:00
ObjcRef.h Use old licence name 2004-05-23 20:53:33 +00:00
pen.h Use old licence name 2004-05-23 20:53:33 +00:00
radiobox.h Use old licence name 2004-05-23 20:53:33 +00:00
radiobut.h Use old licence name 2004-05-23 20:53:33 +00:00
region.h split wxRegion(wxBitmap) ctor into two ctors with clearer semantics 2004-06-03 21:13:52 +00:00
scrolbar.h wxCocoa: Added wxScrollBar 2004-06-23 15:26:44 +00:00
slider.h Use old licence name 2004-05-23 20:53:33 +00:00
sound.h Rewrote wxSound: 2004-10-20 21:04:52 +00:00
spinbutt.h Use old licence name 2004-05-23 20:53:33 +00:00
statbmp.h Use old licence name 2004-05-23 20:53:33 +00:00
statbox.h wxStaticBox constructor is not supposed to take a wxValidator 2004-09-29 05:18:38 +00:00
statline.h Use old licence name 2004-05-23 20:53:33 +00:00
stattext.h Use old licence name 2004-05-23 20:53:33 +00:00
string.h Use old licence name 2004-05-23 20:53:33 +00:00
taskbar.h wxCocoa: Added wxTaskBarIcon 2004-10-15 22:52:28 +00:00
textctrl.h Use old licence name 2004-05-23 20:53:33 +00:00
toolbar.h Use old licence name 2004-05-23 20:53:33 +00:00
tooltip.h various cleanups 2004-10-08 01:26:43 +00:00
toplevel.h Use old licence name 2004-05-23 20:53:33 +00:00
window.h cocoa doesn't need system framework - string conversion for cocoa - focus for cocoa - a bit of change for string unit tests for new functionality 2004-10-11 02:02:30 +00:00