From 01260d17034bb0b7af6e25ceff3efc25673b8c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Beffa?= Date: Sun, 18 Oct 2009 01:22:00 +0200 Subject: [PATCH] changed wake up callback hook --- .gitignore | 3 + MiddleClick.xcodeproj/clem.mode1v3 | 1402 ------------------------- MiddleClick.xcodeproj/clem.pbxuser | 412 -------- MiddleClick.xcodeproj/project.pbxproj | 6 + WakeObserver.h | 16 + WakeObserver.m | 21 + main.m | 31 +- 7 files changed, 51 insertions(+), 1840 deletions(-) create mode 100644 .gitignore delete mode 100644 MiddleClick.xcodeproj/clem.mode1v3 delete mode 100644 MiddleClick.xcodeproj/clem.pbxuser create mode 100644 WakeObserver.h create mode 100644 WakeObserver.m diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ea50bf --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +build +*.pbxuser +*.mode1v3 diff --git a/MiddleClick.xcodeproj/clem.mode1v3 b/MiddleClick.xcodeproj/clem.mode1v3 deleted file mode 100644 index 870f846..0000000 --- a/MiddleClick.xcodeproj/clem.mode1v3 +++ /dev/null @@ -1,1402 +0,0 @@ - - - - - ActivePerspectiveName - Project - AllowedModules - - - BundleLoadPath - - MaxInstances - n - Module - PBXSmartGroupTreeModule - Name - Groups and Files Outline View - - - BundleLoadPath - - MaxInstances - n - Module - PBXNavigatorGroup - Name - Editor - - - BundleLoadPath - - MaxInstances - n - Module - XCTaskListModule - Name - Task List - - - BundleLoadPath - - MaxInstances - n - Module - XCDetailModule - Name - File and Smart Group Detail Viewer - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXBuildResultsModule - Name - Detailed Build Results Viewer - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXProjectFindModule - Name - Project Batch Find Tool - - - BundleLoadPath - - MaxInstances - n - Module - XCProjectFormatConflictsModule - Name - Project Format Conflicts List - - - BundleLoadPath - - MaxInstances - n - Module - PBXBookmarksModule - Name - Bookmarks Tool - - - BundleLoadPath - - MaxInstances - n - Module - PBXClassBrowserModule - Name - Class Browser - - - BundleLoadPath - - MaxInstances - n - Module - PBXCVSModule - Name - Source Code Control Tool - - - BundleLoadPath - - MaxInstances - n - Module - PBXDebugBreakpointsModule - Name - Debug Breakpoints Tool - - - BundleLoadPath - - MaxInstances - n - Module - XCDockableInspector - Name - Inspector - - - BundleLoadPath - - MaxInstances - n - Module - PBXOpenQuicklyModule - Name - Open Quickly Tool - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXDebugSessionModule - Name - Debugger - - - BundleLoadPath - - MaxInstances - 1 - Module - PBXDebugCLIModule - Name - Debug Console - - - BundleLoadPath - - MaxInstances - n - Module - XCSnapshotModule - Name - Snapshots Tool - - - BundlePath - /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources - Description - DefaultDescriptionKey - DockingSystemVisible - - Extension - mode1v3 - FavBarConfig - - PBXProjectModuleGUID - 75A6B6920FEE87F60071FAC0 - XCBarModuleItemNames - - XCBarModuleItems - - - FirstTimeWindowDisplayed - - Identifier - com.apple.perspectives.project.mode1v3 - MajorVersion - 33 - MinorVersion - 0 - Name - Default - Notifications - - OpenEditors - - PerspectiveWidths - - -1 - -1 - - Perspectives - - - ChosenToolbarItems - - active-combo-popup - action - NSToolbarFlexibleSpaceItem - debugger-enable-breakpoints - build-and-go - com.apple.ide.PBXToolbarStopButton - get-info - NSToolbarFlexibleSpaceItem - com.apple.pbx.toolbar.searchfield - - ControllerClassBaseName - - IconName - WindowOfProjectWithEditor - Identifier - perspective.project - IsVertical - - Layout - - - ContentConfiguration - - PBXBottomSmartGroupGIDs - - 1C37FBAC04509CD000000102 - 1C37FAAC04509CD000000102 - 1C37FABC05509CD000000102 - 1C37FABC05539CD112110102 - E2644B35053B69B200211256 - 1C37FABC04509CD000100104 - 1CC0EA4004350EF90044410B - 1CC0EA4004350EF90041110B - - PBXProjectModuleGUID - 1CE0B1FE06471DED0097A5F4 - PBXProjectModuleLabel - Files - PBXProjectStructureProvided - yes - PBXSmartGroupTreeModuleColumnData - - PBXSmartGroupTreeModuleColumnWidthsKey - - 186 - - PBXSmartGroupTreeModuleColumnsKey_v4 - - MainColumn - - - PBXSmartGroupTreeModuleOutlineStateKey_v7 - - PBXSmartGroupTreeModuleOutlineStateExpansionKey - - 29B97314FDCFA39411CA2CEA - 080E96DDFE201D6D7F000001 - 29B97315FDCFA39411CA2CEA - 29B97317FDCFA39411CA2CEA - 29B97323FDCFA39411CA2CEA - 1058C7A2FEA54F0111CA2CBB - 19C28FACFE9D520D11CA2CBB - 1C37FBAC04509CD000000102 - 1C37FABC05509CD000000102 - - PBXSmartGroupTreeModuleOutlineStateSelectionKey - - - 6 - 4 - 0 - - - PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 17}, {186, 523}} - - PBXTopSmartGroupGIDs - - XCIncludePerspectivesSwitch - - XCSharingToken - com.apple.Xcode.GFSharingToken - - GeometryConfiguration - - Frame - {{0, 0}, {203, 541}} - GroupTreeTableConfiguration - - MainColumn - 186 - - RubberWindowFrame - 62 174 999 582 0 0 1280 778 - - Module - PBXSmartGroupTreeModule - Proportion - 203pt - - - Dock - - - BecomeActive - - ContentConfiguration - - PBXProjectModuleGUID - 1CE0B20306471E060097A5F4 - PBXProjectModuleLabel - main.m - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1CE0B20406471E060097A5F4 - PBXProjectModuleLabel - main.m - _historyCapacity - 0 - bookmark - 7561D8F71080A84700B4D95C - history - - 758786F510335DD0004E024C - 7561D8F01080A84700B4D95C - 7561D8F11080A84700B4D95C - 7561D8F21080A84700B4D95C - 7561D8F31080A84700B4D95C - 7561D8F41080A84700B4D95C - 7561D8F51080A84700B4D95C - 7561D8F61080A84700B4D95C - - - SplitCount - 1 - - StatusBarVisibility - - - GeometryConfiguration - - Frame - {{0, 0}, {791, 536}} - RubberWindowFrame - 62 174 999 582 0 0 1280 778 - - Module - PBXNavigatorGroup - Proportion - 536pt - - - ContentConfiguration - - PBXProjectModuleGUID - 1CE0B20506471E060097A5F4 - PBXProjectModuleLabel - Detail - - GeometryConfiguration - - Frame - {{0, 541}, {791, 0}} - RubberWindowFrame - 62 174 999 582 0 0 1280 778 - - Module - XCDetailModule - Proportion - 0pt - - - Proportion - 791pt - - - Name - Project - ServiceClasses - - XCModuleDock - PBXSmartGroupTreeModule - XCModuleDock - PBXNavigatorGroup - XCDetailModule - - TableOfContents - - 7561D8F81080A84700B4D95C - 1CE0B1FE06471DED0097A5F4 - 7561D8F91080A84700B4D95C - 1CE0B20306471E060097A5F4 - 1CE0B20506471E060097A5F4 - - ToolbarConfigUserDefaultsMinorVersion - 2 - ToolbarConfiguration - xcode.toolbar.config.defaultV3 - - - ControllerClassBaseName - - IconName - WindowOfProject - Identifier - perspective.morph - IsVertical - 0 - Layout - - - BecomeActive - 1 - ContentConfiguration - - PBXBottomSmartGroupGIDs - - 1C37FBAC04509CD000000102 - 1C37FAAC04509CD000000102 - 1C08E77C0454961000C914BD - 1C37FABC05509CD000000102 - 1C37FABC05539CD112110102 - E2644B35053B69B200211256 - 1C37FABC04509CD000100104 - 1CC0EA4004350EF90044410B - 1CC0EA4004350EF90041110B - - PBXProjectModuleGUID - 11E0B1FE06471DED0097A5F4 - PBXProjectModuleLabel - Files - PBXProjectStructureProvided - yes - PBXSmartGroupTreeModuleColumnData - - PBXSmartGroupTreeModuleColumnWidthsKey - - 186 - - PBXSmartGroupTreeModuleColumnsKey_v4 - - MainColumn - - - PBXSmartGroupTreeModuleOutlineStateKey_v7 - - PBXSmartGroupTreeModuleOutlineStateExpansionKey - - 29B97314FDCFA39411CA2CEA - 1C37FABC05509CD000000102 - - PBXSmartGroupTreeModuleOutlineStateSelectionKey - - - 0 - - - PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {186, 337}} - - PBXTopSmartGroupGIDs - - XCIncludePerspectivesSwitch - 1 - XCSharingToken - com.apple.Xcode.GFSharingToken - - GeometryConfiguration - - Frame - {{0, 0}, {203, 355}} - GroupTreeTableConfiguration - - MainColumn - 186 - - RubberWindowFrame - 373 269 690 397 0 0 1440 878 - - Module - PBXSmartGroupTreeModule - Proportion - 100% - - - Name - Morph - PreferredWidth - 300 - ServiceClasses - - XCModuleDock - PBXSmartGroupTreeModule - - TableOfContents - - 11E0B1FE06471DED0097A5F4 - - ToolbarConfiguration - xcode.toolbar.config.default.shortV3 - - - PerspectivesBarVisible - - ShelfIsVisible - - SourceDescription - file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' - StatusbarIsVisible - - TimeStamp - 0.0 - ToolbarDisplayMode - 1 - ToolbarIsVisible - - ToolbarSizeMode - 1 - Type - Perspectives - UpdateMessage - The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? - WindowJustification - 5 - WindowOrderList - - 1CD10A99069EF8BA00B06720 - 75A6B66F0FEE87BD0071FAC0 - /Users/clem/Dev/Cocoa/MiddleClick/MiddleClick.xcodeproj - - WindowString - 62 174 999 582 0 0 1280 778 - WindowToolsV3 - - - FirstTimeWindowDisplayed - - Identifier - windowTool.build - IsVertical - - Layout - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1CD0528F0623707200166675 - PBXProjectModuleLabel - - StatusBarVisibility - - - GeometryConfiguration - - Frame - {{0, 0}, {500, 218}} - RubberWindowFrame - 267 201 500 500 0 0 1280 778 - - Module - PBXNavigatorGroup - Proportion - 218pt - - - ContentConfiguration - - PBXProjectModuleGUID - XCMainBuildResultsModuleGUID - PBXProjectModuleLabel - Build Results - XCBuildResultsTrigger_Collapse - 1021 - XCBuildResultsTrigger_Open - 1011 - - GeometryConfiguration - - Frame - {{0, 223}, {500, 236}} - RubberWindowFrame - 267 201 500 500 0 0 1280 778 - - Module - PBXBuildResultsModule - Proportion - 236pt - - - Proportion - 459pt - - - Name - Build Results - ServiceClasses - - PBXBuildResultsModule - - StatusbarIsVisible - - TableOfContents - - 75A6B66F0FEE87BD0071FAC0 - 7561D8FA1080A84700B4D95C - 1CD0528F0623707200166675 - XCMainBuildResultsModuleGUID - - ToolbarConfiguration - xcode.toolbar.config.buildV3 - WindowString - 267 201 500 500 0 0 1280 778 - WindowToolGUID - 75A6B66F0FEE87BD0071FAC0 - WindowToolIsVisible - - - - FirstTimeWindowDisplayed - - Identifier - windowTool.debugger - IsVertical - - Layout - - - Dock - - - ContentConfiguration - - Debugger - - HorizontalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {316, 203}} - {{316, 0}, {378, 203}} - - - VerticalSplitView - - _collapsingFrameDimension - 0.0 - _indexOfCollapsedView - 0 - _percentageOfCollapsedView - 0.0 - isCollapsed - yes - sizes - - {{0, 0}, {694, 203}} - {{0, 203}, {694, 178}} - - - - LauncherConfigVersion - 8 - PBXProjectModuleGUID - 1C162984064C10D400B95A72 - PBXProjectModuleLabel - Debug - GLUTExamples (Underwater) - - GeometryConfiguration - - DebugConsoleVisible - None - DebugConsoleWindowFrame - {{200, 200}, {500, 300}} - DebugSTDIOWindowFrame - {{200, 200}, {500, 300}} - Frame - {{0, 0}, {694, 381}} - PBXDebugSessionStackFrameViewKey - - DebugVariablesTableConfiguration - - Name - 120 - Value - 85 - Summary - 148 - - Frame - {{316, 0}, {378, 203}} - RubberWindowFrame - 267 279 694 422 0 0 1280 778 - - RubberWindowFrame - 267 279 694 422 0 0 1280 778 - - Module - PBXDebugSessionModule - Proportion - 381pt - - - Proportion - 381pt - - - Name - Debugger - ServiceClasses - - PBXDebugSessionModule - - StatusbarIsVisible - - TableOfContents - - 1CD10A99069EF8BA00B06720 - 7561D8FB1080A84700B4D95C - 1C162984064C10D400B95A72 - 7561D8FC1080A84700B4D95C - 7561D8FD1080A84700B4D95C - 7561D8FE1080A84700B4D95C - 7561D8FF1080A84700B4D95C - 7561D9001080A84700B4D95C - - ToolbarConfiguration - xcode.toolbar.config.debugV3 - WindowString - 267 279 694 422 0 0 1280 778 - WindowToolGUID - 1CD10A99069EF8BA00B06720 - WindowToolIsVisible - - - - Identifier - windowTool.find - Layout - - - Dock - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1CDD528C0622207200134675 - PBXProjectModuleLabel - <No Editor> - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1CD0528D0623707200166675 - - SplitCount - 1 - - StatusBarVisibility - 1 - - GeometryConfiguration - - Frame - {{0, 0}, {781, 167}} - RubberWindowFrame - 62 385 781 470 0 0 1440 878 - - Module - PBXNavigatorGroup - Proportion - 781pt - - - Proportion - 50% - - - BecomeActive - 1 - ContentConfiguration - - PBXProjectModuleGUID - 1CD0528E0623707200166675 - PBXProjectModuleLabel - Project Find - - GeometryConfiguration - - Frame - {{8, 0}, {773, 254}} - RubberWindowFrame - 62 385 781 470 0 0 1440 878 - - Module - PBXProjectFindModule - Proportion - 50% - - - Proportion - 428pt - - - Name - Project Find - ServiceClasses - - PBXProjectFindModule - - StatusbarIsVisible - 1 - TableOfContents - - 1C530D57069F1CE1000CFCEE - 1C530D58069F1CE1000CFCEE - 1C530D59069F1CE1000CFCEE - 1CDD528C0622207200134675 - 1C530D5A069F1CE1000CFCEE - 1CE0B1FE06471DED0097A5F4 - 1CD0528E0623707200166675 - - WindowString - 62 385 781 470 0 0 1440 878 - WindowToolGUID - 1C530D57069F1CE1000CFCEE - WindowToolIsVisible - 0 - - - Identifier - MENUSEPARATOR - - - FirstTimeWindowDisplayed - - Identifier - windowTool.debuggerConsole - IsVertical - - Layout - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1C78EAAC065D492600B07095 - PBXProjectModuleLabel - Debugger Console - - GeometryConfiguration - - Frame - {{0, 0}, {650, 209}} - RubberWindowFrame - 168 136 650 250 0 0 1280 778 - - Module - PBXDebugCLIModule - Proportion - 209pt - - - Proportion - 209pt - - - Name - Debugger Console - ServiceClasses - - PBXDebugCLIModule - - StatusbarIsVisible - - TableOfContents - - 1C78EAAD065D492600B07095 - 753253F3104DC1CB006DDF03 - 1C78EAAC065D492600B07095 - - ToolbarConfiguration - xcode.toolbar.config.consoleV3 - WindowString - 168 136 650 250 0 0 1280 778 - WindowToolGUID - 1C78EAAD065D492600B07095 - WindowToolIsVisible - - - - Identifier - windowTool.snapshots - Layout - - - Dock - - - Module - XCSnapshotModule - Proportion - 100% - - - Proportion - 100% - - - Name - Snapshots - ServiceClasses - - XCSnapshotModule - - StatusbarIsVisible - Yes - ToolbarConfiguration - xcode.toolbar.config.snapshots - WindowString - 315 824 300 550 0 0 1440 878 - WindowToolIsVisible - Yes - - - Identifier - windowTool.scm - Layout - - - Dock - - - ContentConfiguration - - PBXProjectModuleGUID - 1C78EAB2065D492600B07095 - PBXProjectModuleLabel - <No Editor> - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 1C78EAB3065D492600B07095 - - SplitCount - 1 - - StatusBarVisibility - 1 - - GeometryConfiguration - - Frame - {{0, 0}, {452, 0}} - RubberWindowFrame - 743 379 452 308 0 0 1280 1002 - - Module - PBXNavigatorGroup - Proportion - 0pt - - - BecomeActive - 1 - ContentConfiguration - - PBXProjectModuleGUID - 1CD052920623707200166675 - PBXProjectModuleLabel - SCM - - GeometryConfiguration - - ConsoleFrame - {{0, 259}, {452, 0}} - Frame - {{0, 7}, {452, 259}} - RubberWindowFrame - 743 379 452 308 0 0 1280 1002 - TableConfiguration - - Status - 30 - FileName - 199 - Path - 197.0950012207031 - - TableFrame - {{0, 0}, {452, 250}} - - Module - PBXCVSModule - Proportion - 262pt - - - Proportion - 266pt - - - Name - SCM - ServiceClasses - - PBXCVSModule - - StatusbarIsVisible - 1 - TableOfContents - - 1C78EAB4065D492600B07095 - 1C78EAB5065D492600B07095 - 1C78EAB2065D492600B07095 - 1CD052920623707200166675 - - ToolbarConfiguration - xcode.toolbar.config.scm - WindowString - 743 379 452 308 0 0 1280 1002 - - - Identifier - windowTool.breakpoints - IsVertical - 0 - Layout - - - Dock - - - BecomeActive - 1 - ContentConfiguration - - PBXBottomSmartGroupGIDs - - 1C77FABC04509CD000000102 - - PBXProjectModuleGUID - 1CE0B1FE06471DED0097A5F4 - PBXProjectModuleLabel - Files - PBXProjectStructureProvided - no - PBXSmartGroupTreeModuleColumnData - - PBXSmartGroupTreeModuleColumnWidthsKey - - 168 - - PBXSmartGroupTreeModuleColumnsKey_v4 - - MainColumn - - - PBXSmartGroupTreeModuleOutlineStateKey_v7 - - PBXSmartGroupTreeModuleOutlineStateExpansionKey - - 1C77FABC04509CD000000102 - - PBXSmartGroupTreeModuleOutlineStateSelectionKey - - - 0 - - - PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 0}, {168, 350}} - - PBXTopSmartGroupGIDs - - XCIncludePerspectivesSwitch - 0 - - GeometryConfiguration - - Frame - {{0, 0}, {185, 368}} - GroupTreeTableConfiguration - - MainColumn - 168 - - RubberWindowFrame - 315 424 744 409 0 0 1440 878 - - Module - PBXSmartGroupTreeModule - Proportion - 185pt - - - ContentConfiguration - - PBXProjectModuleGUID - 1CA1AED706398EBD00589147 - PBXProjectModuleLabel - Detail - - GeometryConfiguration - - Frame - {{190, 0}, {554, 368}} - RubberWindowFrame - 315 424 744 409 0 0 1440 878 - - Module - XCDetailModule - Proportion - 554pt - - - Proportion - 368pt - - - MajorVersion - 3 - MinorVersion - 0 - Name - Breakpoints - ServiceClasses - - PBXSmartGroupTreeModule - XCDetailModule - - StatusbarIsVisible - 1 - TableOfContents - - 1CDDB66807F98D9800BB5817 - 1CDDB66907F98D9800BB5817 - 1CE0B1FE06471DED0097A5F4 - 1CA1AED706398EBD00589147 - - ToolbarConfiguration - xcode.toolbar.config.breakpointsV3 - WindowString - 315 424 744 409 0 0 1440 878 - WindowToolGUID - 1CDDB66807F98D9800BB5817 - WindowToolIsVisible - 1 - - - Identifier - windowTool.debugAnimator - Layout - - - Dock - - - Module - PBXNavigatorGroup - Proportion - 100% - - - Proportion - 100% - - - Name - Debug Visualizer - ServiceClasses - - PBXNavigatorGroup - - StatusbarIsVisible - 1 - ToolbarConfiguration - xcode.toolbar.config.debugAnimatorV3 - WindowString - 100 100 700 500 0 0 1280 1002 - - - Identifier - windowTool.bookmarks - Layout - - - Dock - - - Module - PBXBookmarksModule - Proportion - 100% - - - Proportion - 100% - - - Name - Bookmarks - ServiceClasses - - PBXBookmarksModule - - StatusbarIsVisible - 0 - WindowString - 538 42 401 187 0 0 1280 1002 - - - Identifier - windowTool.projectFormatConflicts - Layout - - - Dock - - - Module - XCProjectFormatConflictsModule - Proportion - 100% - - - Proportion - 100% - - - Name - Project Format Conflicts - ServiceClasses - - XCProjectFormatConflictsModule - - StatusbarIsVisible - 0 - WindowContentMinSize - 450 300 - WindowString - 50 850 472 307 0 0 1440 877 - - - Identifier - windowTool.classBrowser - Layout - - - Dock - - - BecomeActive - 1 - ContentConfiguration - - OptionsSetName - Hierarchy, all classes - PBXProjectModuleGUID - 1CA6456E063B45B4001379D8 - PBXProjectModuleLabel - Class Browser - NSObject - - GeometryConfiguration - - ClassesFrame - {{0, 0}, {374, 96}} - ClassesTreeTableConfiguration - - PBXClassNameColumnIdentifier - 208 - PBXClassBookColumnIdentifier - 22 - - Frame - {{0, 0}, {630, 331}} - MembersFrame - {{0, 105}, {374, 395}} - MembersTreeTableConfiguration - - PBXMemberTypeIconColumnIdentifier - 22 - PBXMemberNameColumnIdentifier - 216 - PBXMemberTypeColumnIdentifier - 97 - PBXMemberBookColumnIdentifier - 22 - - PBXModuleWindowStatusBarHidden2 - 1 - RubberWindowFrame - 385 179 630 352 0 0 1440 878 - - Module - PBXClassBrowserModule - Proportion - 332pt - - - Proportion - 332pt - - - Name - Class Browser - ServiceClasses - - PBXClassBrowserModule - - StatusbarIsVisible - 0 - TableOfContents - - 1C0AD2AF069F1E9B00FABCE6 - 1C0AD2B0069F1E9B00FABCE6 - 1CA6456E063B45B4001379D8 - - ToolbarConfiguration - xcode.toolbar.config.classbrowser - WindowString - 385 179 630 352 0 0 1440 878 - WindowToolGUID - 1C0AD2AF069F1E9B00FABCE6 - WindowToolIsVisible - 0 - - - Identifier - windowTool.refactoring - IncludeInToolsMenu - 0 - Layout - - - Dock - - - BecomeActive - 1 - GeometryConfiguration - - Frame - {0, 0}, {500, 335} - RubberWindowFrame - {0, 0}, {500, 335} - - Module - XCRefactoringModule - Proportion - 100% - - - Proportion - 100% - - - Name - Refactoring - ServiceClasses - - XCRefactoringModule - - WindowString - 200 200 500 356 0 0 1920 1200 - - - - diff --git a/MiddleClick.xcodeproj/clem.pbxuser b/MiddleClick.xcodeproj/clem.pbxuser deleted file mode 100644 index c9a1dd6..0000000 --- a/MiddleClick.xcodeproj/clem.pbxuser +++ /dev/null @@ -1,412 +0,0 @@ -// !$*UTF8*$! -{ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - activeBuildConfigurationName = Release; - activeExecutable = 75A6B64F0FEE37C00071FAC0 /* MiddleClick */; - activeTarget = 8D1107260486CEB800E47090 /* MiddleClick */; - addToTargets = ( - 8D1107260486CEB800E47090 /* MiddleClick */, - ); - breakpoints = ( - 7569F7F71007FD4D00D9CE54 /* main.m:126 */, - ); - codeSenseManager = 75A6B65C0FEE37E20071FAC0 /* Code sense */; - executables = ( - 75A6B64F0FEE37C00071FAC0 /* MiddleClick */, - ); - expressions = ( - dev, - ); - perUserDictionary = { - PBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = { - PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; - PBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID; - PBXFileTableDataSourceColumnWidthsKey = ( - 200, - 200, - 150.58349609375, - ); - PBXFileTableDataSourceColumnsKey = ( - PBXBookmarksDataSource_LocationID, - PBXBookmarksDataSource_NameID, - PBXBookmarksDataSource_CommentsID, - ); - }; - PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { - PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; - PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; - PBXFileTableDataSourceColumnWidthsKey = ( - 20, - 552, - 20, - 48, - 43, - 43, - 20, - ); - PBXFileTableDataSourceColumnsKey = ( - PBXFileDataSource_FiletypeID, - PBXFileDataSource_Filename_ColumnID, - PBXFileDataSource_Built_ColumnID, - PBXFileDataSource_ObjectSize_ColumnID, - PBXFileDataSource_Errors_ColumnID, - PBXFileDataSource_Warnings_ColumnID, - PBXFileDataSource_Target_ColumnID, - ); - }; - PBXPerProjectTemplateStateSaveDate = 276866265; - PBXWorkspaceStateSaveDate = 276866265; - }; - perUserProjectItems = { - 75032EEF0FF696B5004CECD2 = 75032EEF0FF696B5004CECD2 /* PBXBookmark */; - 75325405104DCBDB006DDF03 = 75325405104DCBDB006DDF03 /* PBXTextBookmark */; - 7561D8F01080A84700B4D95C /* PBXBookmark */ = 7561D8F01080A84700B4D95C /* PBXBookmark */; - 7561D8F11080A84700B4D95C /* PBXBookmark */ = 7561D8F11080A84700B4D95C /* PBXBookmark */; - 7561D8F21080A84700B4D95C /* PlistBookmark */ = 7561D8F21080A84700B4D95C /* PlistBookmark */; - 7561D8F31080A84700B4D95C /* PBXTextBookmark */ = 7561D8F31080A84700B4D95C /* PBXTextBookmark */; - 7561D8F41080A84700B4D95C /* PBXTextBookmark */ = 7561D8F41080A84700B4D95C /* PBXTextBookmark */; - 7561D8F51080A84700B4D95C /* PBXTextBookmark */ = 7561D8F51080A84700B4D95C /* PBXTextBookmark */; - 7561D8F61080A84700B4D95C /* PBXTextBookmark */ = 7561D8F61080A84700B4D95C /* PBXTextBookmark */; - 7561D8F71080A84700B4D95C /* PBXTextBookmark */ = 7561D8F71080A84700B4D95C /* PBXTextBookmark */; - 7569F7071007F03D00D9CE54 = 7569F7071007F03D00D9CE54 /* PlistBookmark */; - 7569F70C1007F03D00D9CE54 = 7569F70C1007F03D00D9CE54 /* PBXTextBookmark */; - 7569F7D01007F94B00D9CE54 = 7569F7D01007F94B00D9CE54 /* PBXTextBookmark */; - 7569F81610089D5D00D9CE54 = 7569F81610089D5D00D9CE54 /* PBXTextBookmark */; - 758786C9103358AC004E024C = 758786C9103358AC004E024C /* PBXTextBookmark */; - 758786F510335DD0004E024C = 758786F510335DD0004E024C /* PBXTextBookmark */; - 758786F910335DD0004E024C = 758786F910335DD0004E024C /* PBXTextBookmark */; - 7587873A10336B08004E024C = 7587873A10336B08004E024C /* PBXTextBookmark */; - 75A6B6810FEE87F60071FAC0 = 75A6B6810FEE87F60071FAC0 /* PBXTextBookmark */; - 75A6B6820FEE87F60071FAC0 = 75A6B6820FEE87F60071FAC0 /* PBXTextBookmark */; - 75A6B6830FEE87F60071FAC0 = 75A6B6830FEE87F60071FAC0 /* PBXTextBookmark */; - 75A6B6870FEE87F60071FAC0 = 75A6B6870FEE87F60071FAC0 /* PlistBookmark */; - 75A6B6BC0FEE990E0071FAC0 = 75A6B6BC0FEE990E0071FAC0 /* PBXBookmark */; - }; - sourceControlManager = 75A6B65B0FEE37E20071FAC0 /* Source Control */; - userBuildSettings = { - }; - }; - 29B97316FDCFA39411CA2CEA /* main.m */ = { - uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1216, 2145}}"; - sepNavSelRange = "{4037, 0}"; - sepNavVisRange = "{0, 912}"; - }; - }; - 32CA4F630368D1EE00C91783 /* MiddleClick_Prefix.pch */ = { - uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {730, 504}}"; - sepNavSelRange = "{0, 0}"; - sepNavVisRange = "{0, 139}"; - }; - }; - 75032EEF0FF696B5004CECD2 /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 75A6B6AA0FEE96540071FAC0 /* mouse.png */; - }; - 75325405104DCBDB006DDF03 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 29B97316FDCFA39411CA2CEA /* main.m */; - name = "main.m: 81"; - rLen = 91; - rLoc = 1905; - rType = 0; - vrLen = 1020; - vrLoc = 1700; - }; - 7561D8F01080A84700B4D95C /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 75032EF50FF697A4004CECD2 /* mouse.icns */; - }; - 7561D8F11080A84700B4D95C /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 75A6B6AA0FEE96540071FAC0 /* mouse.png */; - }; - 7561D8F21080A84700B4D95C /* PlistBookmark */ = { - isa = PlistBookmark; - fRef = 8D1107310486CEB800E47090 /* Info.plist */; - fallbackIsa = PBXBookmark; - isK = 0; - kPath = ( - ); - name = /Users/clem/Dev/Cocoa/MiddleClick/Info.plist; - rLen = 0; - rLoc = 9223372036854775807; - }; - 7561D8F31080A84700B4D95C /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 75A6B65E0FEE3BE90071FAC0 /* TrayMenu.h */; - name = "TrayMenu.h: 5"; - rLen = 0; - rLoc = 54; - rType = 0; - vrLen = 170; - vrLoc = 0; - }; - 7561D8F41080A84700B4D95C /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 75A6B65F0FEE3BE90071FAC0 /* TrayMenu.m */; - name = "TrayMenu.m: 15"; - rLen = 0; - rLoc = 296; - rType = 0; - vrLen = 856; - vrLoc = 0; - }; - 7561D8F51080A84700B4D95C /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 32CA4F630368D1EE00C91783 /* MiddleClick_Prefix.pch */; - name = "MiddleClick_Prefix.pch: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 139; - vrLoc = 0; - }; - 7561D8F61080A84700B4D95C /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 29B97316FDCFA39411CA2CEA /* main.m */; - name = "main.m: 81"; - rLen = 91; - rLoc = 1905; - rType = 0; - vrLen = 1258; - vrLoc = 1651; - }; - 7561D8F71080A84700B4D95C /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 29B97316FDCFA39411CA2CEA /* main.m */; - name = "main.m: 142"; - rLen = 0; - rLoc = 4037; - rType = 0; - vrLen = 912; - vrLoc = 0; - }; - 7569F7071007F03D00D9CE54 /* PlistBookmark */ = { - isa = PlistBookmark; - fRef = 8D1107310486CEB800E47090 /* Info.plist */; - fallbackIsa = PBXBookmark; - isK = 0; - kPath = ( - CFBundleIdentifier, - ); - name = /Users/clem/Dev/Cocoa/MiddleClick/Info.plist; - rLen = 0; - rLoc = 2147483647; - }; - 7569F70C1007F03D00D9CE54 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 32CA4F630368D1EE00C91783 /* MiddleClick_Prefix.pch */; - name = "MiddleClick_Prefix.pch: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 139; - vrLoc = 0; - }; - 7569F7D01007F94B00D9CE54 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 32CA4F630368D1EE00C91783 /* MiddleClick_Prefix.pch */; - name = "MiddleClick_Prefix.pch: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 139; - vrLoc = 0; - }; - 7569F7F71007FD4D00D9CE54 /* main.m:126 */ = { - isa = PBXFileBreakpoint; - actions = ( - ); - breakpointStyle = 0; - continueAfterActions = 0; - countType = 0; - delayBeforeContinue = 0; - fileReference = 29B97316FDCFA39411CA2CEA /* main.m */; - functionName = "SystemSleepCallBack()"; - hitCount = 0; - ignoreCount = 0; - lineNumber = 126; - location = MiddleClick; - modificationTime = 271803277.953833; - originalNumberOfMultipleMatches = 0; - state = 2; - }; - 7569F81610089D5D00D9CE54 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 75A6B65E0FEE3BE90071FAC0 /* TrayMenu.h */; - name = "TrayMenu.h: 12"; - rLen = 0; - rLoc = 94; - rType = 0; - vrLen = 228; - vrLoc = 0; - }; - 758786C9103358AC004E024C /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 75A6B65F0FEE3BE90071FAC0 /* TrayMenu.m */; - name = "TrayMenu.m: 15"; - rLen = 0; - rLoc = 142; - rType = 0; - vrLen = 663; - vrLoc = 0; - }; - 758786F510335DD0004E024C /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 758786F610335DD0004E024C /* relaunch.m */; - name = "relaunch.m: 28"; - rLen = 0; - rLoc = 872; - rType = 0; - vrLen = 762; - vrLoc = 963; - }; - 758786F610335DD0004E024C /* relaunch.m */ = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - name = relaunch.m; - path = /Users/clem/Dev/Cocoa/MiddleClick/relaunch.m; - sourceTree = ""; - }; - 758786F910335DD0004E024C /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 758786FA10335DD0004E024C /* relaunch.m */; - name = "relaunch.m: 28"; - rLen = 0; - rLoc = 872; - rType = 0; - vrLen = 762; - vrLoc = 963; - }; - 758786FA10335DD0004E024C /* relaunch.m */ = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - name = relaunch.m; - path = /Users/clem/Dev/Cocoa/MiddleClick/relaunch.m; - sourceTree = ""; - }; - 7587873A10336B08004E024C /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 29B97316FDCFA39411CA2CEA /* main.m */; - name = "main.m: 130"; - rLen = 0; - rLoc = 3422; - rType = 0; - vrLen = 1056; - vrLoc = 3406; - }; - 75A6B64F0FEE37C00071FAC0 /* MiddleClick */ = { - isa = PBXExecutable; - activeArgIndices = ( - ); - argumentStrings = ( - ); - autoAttachOnCrash = 1; - breakpointsEnabled = 0; - configStateDict = { - }; - customDataFormattersEnabled = 1; - dataTipCustomDataFormattersEnabled = 1; - dataTipShowTypeColumn = 1; - dataTipSortType = 0; - debuggerPlugin = GDBDebugging; - disassemblyDisplayState = 0; - dylibVariantSuffix = ""; - enableDebugStr = 1; - environmentEntries = ( - ); - executableSystemSymbolLevel = 0; - executableUserSymbolLevel = 0; - libgmallocEnabled = 0; - name = MiddleClick; - savedGlobals = { - }; - showTypeColumn = 0; - sourceDirectories = ( - ); - variableFormatDictionary = { - }; - }; - 75A6B65B0FEE37E20071FAC0 /* Source Control */ = { - isa = PBXSourceControlManager; - fallbackIsa = XCSourceControlManager; - isSCMEnabled = 0; - scmConfiguration = { - repositoryNamesForRoots = { - "" = ""; - }; - }; - }; - 75A6B65C0FEE37E20071FAC0 /* Code sense */ = { - isa = PBXCodeSenseManager; - indexTemplatePath = ""; - }; - 75A6B65E0FEE3BE90071FAC0 /* TrayMenu.h */ = { - uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {730, 504}}"; - sepNavSelRange = "{54, 0}"; - sepNavVisRange = "{0, 170}"; - }; - }; - 75A6B65F0FEE3BE90071FAC0 /* TrayMenu.m */ = { - uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {730, 806}}"; - sepNavSelRange = "{296, 0}"; - sepNavVisRange = "{0, 856}"; - }; - }; - 75A6B6810FEE87F60071FAC0 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 29B97316FDCFA39411CA2CEA /* main.m */; - name = "main.m: 1"; - rLen = 0; - rLoc = 0; - rType = 0; - vrLen = 233; - vrLoc = 0; - }; - 75A6B6820FEE87F60071FAC0 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 75A6B65E0FEE3BE90071FAC0 /* TrayMenu.h */; - name = "TrayMenu.h: 12"; - rLen = 0; - rLoc = 94; - rType = 0; - vrLen = 228; - vrLoc = 0; - }; - 75A6B6830FEE87F60071FAC0 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 75A6B65F0FEE3BE90071FAC0 /* TrayMenu.m */; - name = "TrayMenu.m: 12"; - rLen = 0; - rLoc = 81; - rType = 0; - vrLen = 634; - vrLoc = 0; - }; - 75A6B6870FEE87F60071FAC0 /* PlistBookmark */ = { - isa = PlistBookmark; - fRef = 8D1107310486CEB800E47090 /* Info.plist */; - fallbackIsa = PBXBookmark; - isK = 0; - kPath = ( - NSMainNibFile, - ); - name = /Users/clem/Downloads/test/Info.plist; - rLen = 0; - rLoc = 2147483647; - }; - 75A6B6BC0FEE990E0071FAC0 /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 75A6B6AA0FEE96540071FAC0 /* mouse.png */; - }; - 8D1107260486CEB800E47090 /* MiddleClick */ = { - activeExec = 0; - executables = ( - 75A6B64F0FEE37C00071FAC0 /* MiddleClick */, - ); - }; -} diff --git a/MiddleClick.xcodeproj/project.pbxproj b/MiddleClick.xcodeproj/project.pbxproj index 7317854..61ead10 100644 --- a/MiddleClick.xcodeproj/project.pbxproj +++ b/MiddleClick.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 75032EF60FF697A4004CECD2 /* mouse.icns in Resources */ = {isa = PBXBuildFile; fileRef = 75032EF50FF697A4004CECD2 /* mouse.icns */; }; + 7519A949108A763300466740 /* WakeObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 7519A948108A763300466740 /* WakeObserver.m */; }; 7569F71E1007F64500D9CE54 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7569F71D1007F64500D9CE54 /* IOKit.framework */; }; 758786BA103357F6004E024C /* relaunch in Resources */ = {isa = PBXBuildFile; fileRef = 758786B9103357F6004E024C /* relaunch */; }; 75A6B6600FEE3BE90071FAC0 /* TrayMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 75A6B65F0FEE3BE90071FAC0 /* TrayMenu.m */; }; @@ -26,6 +27,8 @@ 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* MiddleClick_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MiddleClick_Prefix.pch; sourceTree = ""; }; 75032EF50FF697A4004CECD2 /* mouse.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = mouse.icns; sourceTree = ""; }; + 7519A947108A763300466740 /* WakeObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WakeObserver.h; sourceTree = ""; }; + 7519A948108A763300466740 /* WakeObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WakeObserver.m; sourceTree = ""; }; 7569F71D1007F64500D9CE54 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; 758786B9103357F6004E024C /* relaunch */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = relaunch; sourceTree = ""; }; 75A6B65E0FEE3BE90071FAC0 /* TrayMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrayMenu.h; sourceTree = ""; }; @@ -57,6 +60,8 @@ children = ( 75A6B65E0FEE3BE90071FAC0 /* TrayMenu.h */, 75A6B65F0FEE3BE90071FAC0 /* TrayMenu.m */, + 7519A947108A763300466740 /* WakeObserver.h */, + 7519A948108A763300466740 /* WakeObserver.m */, ); name = Classes; sourceTree = ""; @@ -189,6 +194,7 @@ files = ( 8D11072D0486CEB800E47090 /* main.m in Sources */, 75A6B6600FEE3BE90071FAC0 /* TrayMenu.m in Sources */, + 7519A949108A763300466740 /* WakeObserver.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/WakeObserver.h b/WakeObserver.h new file mode 100644 index 0000000..5b0cedc --- /dev/null +++ b/WakeObserver.h @@ -0,0 +1,16 @@ +// +// WakeObserver.h +// +// Created by Clem on 18.10.09. +// + +#import + + +@interface WakeObserver : NSObject { + +} + +- (void) receiveWakeNote: (NSNotification*) note; + +@end diff --git a/WakeObserver.m b/WakeObserver.m new file mode 100644 index 0000000..5fc7f7f --- /dev/null +++ b/WakeObserver.m @@ -0,0 +1,21 @@ +// +// WakeObserver.m +// +// Created by Clem on 18.10.09. +// + +#import "WakeObserver.h" + + +@implementation WakeObserver + +- (void) receiveWakeNote: (NSNotification*) note +{ + NSString *relaunch = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"relaunch"]; + int procid = [[NSProcessInfo processInfo] processIdentifier]; + [NSTask launchedTaskWithLaunchPath:relaunch arguments:[NSArray arrayWithObjects:[[NSBundle mainBundle] bundlePath], [NSString stringWithFormat:@"%d",procid], nil]]; + [NSApp terminate:NULL]; +} + + +@end diff --git a/main.m b/main.m index 0efd753..d86eb50 100644 --- a/main.m +++ b/main.m @@ -14,6 +14,7 @@ #import #include #include +#import "WakeObserver.h" typedef struct { float x,y; } mtPoint; typedef struct { mtPoint pos,vel; } mtReadout; @@ -117,23 +118,6 @@ int callback(int device, Finger *data, int nFingers, double timestamp, int frame return 0; } - -void SystemSleepCallBack(void *refcon, io_service_t service, natural_t - messageType, void *messageArgument) { - // restart middleclick after sleep because the hack to listen to raw finger doesn't work otherwise - // reregister when back from sleep - if (messageType == kIOMessageSystemHasPoweredOn) { - NSString *relaunch = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"relaunch"]; - int procid = [[NSProcessInfo processInfo] processIdentifier]; - [NSTask launchedTaskWithLaunchPath:relaunch arguments:[NSArray arrayWithObjects:[[NSBundle mainBundle] bundlePath], [NSString stringWithFormat:@"%d",procid], nil]]; - [NSApp terminate:NULL]; - } -} - - - - - int main(int argc, char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [NSApplication sharedApplication]; @@ -145,15 +129,10 @@ int main(int argc, char *argv[]) { MTDeviceStart(dev); //register a callback to know when osx come back from sleep - io_connect_t rootPowerService; - io_object_t notifier; - IONotificationPortRef notificationPort; - rootPowerService = IORegisterForSystemPower(NULL, ¬ificationPort, - SystemSleepCallBack, ¬ifier); - CFRunLoopAddSource(CFRunLoopGetCurrent(), - IONotificationPortGetRunLoopSource(notificationPort), - kCFRunLoopCommonModes); - + WakeObserver *wo = [[WakeObserver alloc] init]; + [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver: wo + selector: @selector(receiveWakeNote:) name: NSWorkspaceDidWakeNotification object: NULL]; + //add traymenu TrayMenu *menu = [[TrayMenu alloc] init];