1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
11 #import <Carbon/Carbon.h>
12 #import <Cocoa/Cocoa.h>
13 #import <objc/Object.h>
14 #import <IOKit/IOKitLib.h>
21 static nsToolkit
* GetToolkit();
23 static void Shutdown() {
28 static void PostSleepWakeNotification(const char* aNotification
);
30 static nsresult
SwizzleMethods(Class aClass
, SEL orgMethod
, SEL posedMethod
,
31 bool classMethods
= false);
33 void MonitorAllProcessMouseEvents();
34 void StopMonitoringAllProcessMouseEvents();
37 nsresult
RegisterForSleepWakeNotifications();
38 void RemoveSleepWakeNotifications();
41 static nsToolkit
* gToolkit
;
43 CFRunLoopSourceRef mSleepWakeNotificationRLS
;
44 io_object_t mPowerNotifier
;
46 id mAllProcessMouseMonitor
;
49 #endif // nsToolkit_h_