Add MacHideApp

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@52011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2008-02-22 20:39:11 +00:00
parent 7f427f9cc2
commit 361349fe79
3 changed files with 17 additions and 0 deletions

View File

@@ -127,6 +127,11 @@ public:
// in response of a reopen-application apple event
virtual void MacReopenApp() ;
#if wxABI_VERSION >= 20808
// Hide the application windows the same as the system hide command would do it.
void MacHideApp();
#endif
DECLARE_EVENT_TABLE()
};

View File

@@ -1677,3 +1677,14 @@ void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymess
event.SetTimestamp(when);
event.SetEventObject(focus);
}
void wxApp::MacHideApp()
{
wxMacCarbonEvent event( kEventClassCommand , kEventCommandProcess );
HICommand command;
memset( &command, 0 , sizeof(command) );
command.commandID = kHICommandHide ;
event.SetParameter<HICommand>(kEventParamDirectObject, command );
SendEventToApplication( event );
}

View File

@@ -27,6 +27,7 @@
# public symbols added in 2.8.8 (please keep in alphabetical order):
@WX_VERSION_TAG@.8 {
global:
*wxApp*MacHideApp*;
*TimeZone*Make*;
*wxRemotelyScrolledTreeCtrl*DoCalcScrolledPosition*;
*wxRemotelyScrolledTreeCtrl*SetScrollbar*;