aboutsummaryrefslogtreecommitdiff
path: root/AppKit/GTMCarbonEvent.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2013-12-19 21:30:10 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2013-12-19 21:30:10 +0000
commit9b8635767148b3f95942593bfeefa86f147d2c53 (patch)
tree357cf2390edbb1d150830133228cda393203ee48 /AppKit/GTMCarbonEvent.m
parentca3d74790bcf2d42bc6a9c3dc653c7e8a485705c (diff)
Fix build of Mac GTM project with static analyzer. Remove GTMGarbageCollection. Remove GC build configs. Remove internal dependence on GTMObjectSingleton.
DELTA=447 (49 added, 296 deleted, 102 changed)
Diffstat (limited to 'AppKit/GTMCarbonEvent.m')
-rw-r--r--AppKit/GTMCarbonEvent.m28
1 files changed, 21 insertions, 7 deletions
diff --git a/AppKit/GTMCarbonEvent.m b/AppKit/GTMCarbonEvent.m
index 515a1e1..235306e 100644
--- a/AppKit/GTMCarbonEvent.m
+++ b/AppKit/GTMCarbonEvent.m
@@ -18,7 +18,6 @@
#import "GTMCarbonEvent.h"
#import <AppKit/AppKit.h>
-#import "GTMObjectSingleton.h"
#import "GTMDebugSelectorValidation.h"
#import "GTMTypeCasting.h"
@@ -477,8 +476,13 @@ static OSStatus EventHandler(EventHandlerCallRef inHandler,
@implementation GTMCarbonEventMonitorHandler
-GTMOBJECT_SINGLETON_BOILERPLATE(GTMCarbonEventMonitorHandler,
- sharedEventMonitorHandler);
++ (GTMCarbonEventMonitorHandler *)sharedEventMonitorHandler {
+ static GTMCarbonEventMonitorHandler *obj = nil;
+ if (!obj) {
+ obj = [[self alloc] init];
+ }
+ return obj;
+}
- (EventTargetRef)eventTarget {
return GetEventMonitorTarget();
@@ -494,8 +498,13 @@ extern EventTargetRef GetApplicationEventTarget(void);
@implementation GTMCarbonEventApplicationEventHandler
-GTMOBJECT_SINGLETON_BOILERPLATE(GTMCarbonEventApplicationEventHandler,
- sharedApplicationEventHandler);
++ (GTMCarbonEventApplicationEventHandler *)sharedApplicationEventHandler {
+ static GTMCarbonEventApplicationEventHandler *obj = nil;
+ if (!obj) {
+ obj = [[self alloc] init];
+ }
+ return obj;
+}
- (EventTargetRef)eventTarget {
return GetApplicationEventTarget();
@@ -505,8 +514,13 @@ GTMOBJECT_SINGLETON_BOILERPLATE(GTMCarbonEventApplicationEventHandler,
@implementation GTMCarbonEventDispatcherHandler
-GTMOBJECT_SINGLETON_BOILERPLATE(GTMCarbonEventDispatcherHandler,
- sharedEventDispatcherHandler);
++ (GTMCarbonEventDispatcherHandler *)sharedEventDispatcherHandler {
+ static GTMCarbonEventDispatcherHandler *obj = nil;
+ if (!obj) {
+ obj = [[self alloc] init];
+ }
+ return obj;
+}
// Register for the events we handle, and set up the dictionaries we need
// to keep track of the hotkeys and commands that we handle.