#include "wx/wxprec.h"
-#include <Cocoa/Cocoa.h>
+#ifndef WX_PRECOMP
+#include "wx/nonownedwnd.h"
+#endif
#ifdef __WXMAC__
#include "wx/osx/private.h"
void SetupKeyEvent( wxKeyEvent &wxevent , NSEvent * nsEvent )
{
UInt32 modifiers = [nsEvent modifierFlags] ;
+ int eventType = [nsEvent type];
wxevent.m_shiftDown = modifiers & NSShiftKeyMask;
wxevent.m_controlDown = modifiers & NSControlKeyMask;
wxevent.m_metaDown = modifiers & NSCommandKeyMask;
wxString chars;
- NSString* nschars = [nsEvent characters];
- if ( nschars )
+ if ( eventType != NSFlagsChanged )
{
- wxCFStringRef cfchars((CFStringRef)[nschars retain]);
- chars = cfchars.AsString();
+ NSString* nschars = [nsEvent characters];
+ if ( nschars )
+ {
+ wxCFStringRef cfchars((CFStringRef)[nschars retain]);
+ chars = cfchars.AsString();
+ }
}
int unichar = chars.Length() > 0 ? chars[0] : 0;
wxevent.m_rawFlags = modifiers;
wxevent.SetTimestamp( [nsEvent timestamp] * 1000.0 ) ;
- int eventType = [nsEvent type];
switch (eventType)
{
case NSKeyDown :
wxRegion updateRgn;
const NSRect *rects;
- int count ;
+ NSInteger count;
[self getRectsBeingDrawn:&rects count:&count];
for ( int i = 0 ; i < count ; ++i )
[m_osxView setControlSize:size];
}
+void wxWidgetCocoaImpl::SetFont(wxFont const&, wxColour const&, long, bool)
+{
+ // TODO
+}
+
+void wxWidgetCocoaImpl::InstallEventHandler( WXWidget control )
+{
+}
+
//
// Factory methods
//