toplevel event handler exposed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -74,7 +74,7 @@ extern long wxMacTranslateKey(unsigned char key, unsigned char code) ;
|
|||||||
static const EventTypeSpec eventList[] =
|
static const EventTypeSpec eventList[] =
|
||||||
{
|
{
|
||||||
// TODO remove control related event like key and mouse (except for WindowLeave events)
|
// TODO remove control related event like key and mouse (except for WindowLeave events)
|
||||||
#if !TARGET_API_MAC_OSX
|
#if 1
|
||||||
{ kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } ,
|
{ kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } ,
|
||||||
|
|
||||||
{ kEventClassKeyboard, kEventRawKeyDown } ,
|
{ kEventClassKeyboard, kEventRawKeyDown } ,
|
||||||
@@ -827,6 +827,16 @@ void wxTopLevelWindowMac::MacSetBackgroundBrush( const wxBrush &brush )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxTopLevelWindowMac::MacInstallTopLevelWindowEventHandler()
|
||||||
|
{
|
||||||
|
if ( m_macEventHandler != NULL )
|
||||||
|
{
|
||||||
|
verify_noerr( ::RemoveEventHandler( (EventHandlerRef) m_macEventHandler ) ) ;
|
||||||
|
}
|
||||||
|
InstallWindowEventHandler(MAC_WXHWND(m_macWindow), GetwxMacTopLevelEventHandlerUPP(),
|
||||||
|
GetEventTypeCount(eventList), eventList, this, (EventHandlerRef *)&m_macEventHandler);
|
||||||
|
}
|
||||||
|
|
||||||
void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
|
void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
|
||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
@@ -950,13 +960,12 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
::CreateRootControl( (WindowRef)m_macWindow , (ControlRef*)&m_macControl ) ;
|
::CreateRootControl( (WindowRef)m_macWindow , (ControlRef*)&m_macControl ) ;
|
||||||
MacInstallEventHandler() ;
|
|
||||||
}
|
}
|
||||||
|
MacInstallEventHandler() ;
|
||||||
|
|
||||||
InstallStandardEventHandler( GetWindowEventTarget(MAC_WXHWND(m_macWindow)) ) ;
|
InstallStandardEventHandler( GetWindowEventTarget(MAC_WXHWND(m_macWindow)) ) ;
|
||||||
InstallWindowEventHandler(MAC_WXHWND(m_macWindow), GetwxMacTopLevelEventHandlerUPP(),
|
MacInstallTopLevelWindowEventHandler() ;
|
||||||
GetEventTypeCount(eventList), eventList, this, (EventHandlerRef *)&m_macEventHandler);
|
|
||||||
|
|
||||||
m_macFocus = NULL ;
|
m_macFocus = NULL ;
|
||||||
|
|
||||||
if ( HasFlag(wxFRAME_SHAPED) )
|
if ( HasFlag(wxFRAME_SHAPED) )
|
||||||
|
Reference in New Issue
Block a user