1 /* 2 3 Boost Software License - Version 1.0 - August 17th, 2003 4 5 Permission is hereby granted, free of charge, to any person or organization 6 obtaining a copy of the software and accompanying documentation covered by 7 this license (the "Software") to use, reproduce, display, distribute, 8 execute, and transmit the Software, and to prepare derivative works of the 9 Software, and to permit third-parties to whom the Software is furnished to 10 do so, all subject to the following: 11 12 The copyright notices in the Software and this entire statement, including 13 the above license grant, this restriction and the following disclaimer, 14 must be included in all copies of the Software, in whole or in part, and 15 all derivative works of the Software, unless such copies or derivative 16 works are solely in the form of machine-executable object code generated by 17 a source language processor. 18 19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 DEALINGS IN THE SOFTWARE. 26 27 */ 28 module derelict.sdl.macinit.selectors; 29 30 version(DigitalMars) version(OSX) version = darwin; 31 32 version (darwin): 33 34 import derelict.sdl.macinit.runtime; 35 import derelict.sdl.macinit.string; 36 import derelict.util.compat; 37 38 package: 39 version = SDL_USE_NIB_FILE; 40 // Classes 41 id class_NSApplication; 42 id class_NSAutoreleasePool; 43 id class_NSDictionary; 44 id class_NSEnumerator; 45 id class_NSGeometry; 46 id class_NSMenu; 47 id class_NSMenuItem; 48 id class_NSNotification; 49 id class_NSObject; 50 id class_NSProcessInfo; 51 id class_NSString; 52 id class_SDLApplication; 53 54 // Selectors 55 SEL sel_stringWithCharacters_length; 56 SEL sel_addItem; 57 SEL sel_addItemWithTitle_action_keyEquivalent; 58 SEL sel_alloc; 59 SEL sel_class; 60 SEL sel_getCharacters_range; 61 SEL sel_hasSubmenu; 62 SEL sel_init; 63 SEL sel_initWithTitle; 64 SEL sel_itemArray; 65 SEL sel_length; 66 SEL sel_mainMenu; 67 SEL sel_nextObject; 68 SEL sel_objectEnumerator; 69 SEL sel_objectForKey; 70 SEL sel_poseAsClass; 71 SEL sel_processInfo; 72 SEL sel_processName; 73 SEL sel_rangeOfString; 74 SEL sel_release; 75 SEL sel_run; 76 SEL sel_setAppleMenu; 77 SEL sel_setDelegate; 78 SEL sel_setKeyEquivalentModifierMask; 79 SEL sel_setMainMenu; 80 SEL sel_setSubmenu; 81 SEL sel_setTitle; 82 SEL sel_setWindowsMenu; 83 SEL sel_sharedApplication; 84 SEL sel_sizeToFit; 85 SEL sel_stringByAppendingString; 86 SEL sel_submenu; 87 SEL sel_title; 88 SEL sel_UTF8String; 89 SEL sel_separatorItem; 90 SEL sel_stop; 91 SEL sel_terminate; 92 SEL sel_setupWorkingDirectory; 93 version (SDL_USE_NIB_FILE) SEL sel_fixMenu; 94 SEL sel_application; 95 SEL sel_applicationDidFinishLaunching; 96 SEL sel_initWithTitle_action_keyEquivalent; 97 98 static this () 99 { 100 class_NSApplication = objc_getClass!("NSApplication"); 101 class_NSAutoreleasePool = objc_getClass!("NSAutoreleasePool"); 102 class_NSDictionary = objc_getClass!("NSDictionary"); 103 class_NSEnumerator = objc_getClass!("NSEnumerator"); 104 class_NSGeometry = objc_getClass!("NSGeometry"); 105 class_NSMenu = objc_getClass!("NSMenu"); 106 class_NSMenuItem = objc_getClass!("NSMenuItem"); 107 class_NSNotification = objc_getClass!("NSNotification"); 108 class_NSObject = objc_getClass!("NSObject"); 109 class_NSProcessInfo = objc_getClass!("NSProcessInfo"); 110 class_NSString = objc_getClass!("NSString"); 111 112 sel_stringWithCharacters_length = sel_registerName!("stringWithCharacters:length:"); 113 sel_addItem = sel_registerName!("addItem:"); 114 sel_addItemWithTitle_action_keyEquivalent = sel_registerName!("addItemWithTitle:action:keyEquivalent:"); 115 sel_alloc = sel_registerName!("alloc"); 116 sel_class = sel_registerName!("class"); 117 sel_getCharacters_range = sel_registerName!("getCharacters:range:"); 118 sel_hasSubmenu = sel_registerName!("hasSubmenu"); 119 sel_init = sel_registerName!("init"); 120 sel_initWithTitle = sel_registerName!("initWithTitle:"); 121 sel_itemArray = sel_registerName!("itemArray"); 122 sel_length = sel_registerName!("length"); 123 sel_mainMenu = sel_registerName!("mainMenu"); 124 sel_nextObject = sel_registerName!("nextObject"); 125 sel_objectEnumerator = sel_registerName!("objectEnumerator"); 126 sel_objectForKey = sel_registerName!("objectForKey:"); 127 sel_poseAsClass = sel_registerName!("poseAsClass:"); 128 sel_processInfo = sel_registerName!("processInfo"); 129 sel_processName = sel_registerName!("processName"); 130 sel_rangeOfString = sel_registerName!("rangeOfString"); 131 sel_release = sel_registerName!("release"); 132 sel_run = sel_registerName!("run"); 133 sel_setAppleMenu = sel_registerName!("setAppleMenu:"); 134 sel_setDelegate = sel_registerName!("setDelegate:"); 135 sel_setKeyEquivalentModifierMask = sel_registerName!("setKeyEquivalentModifierMask:"); 136 sel_setMainMenu = sel_registerName!("setMainMenu:"); 137 sel_setSubmenu = sel_registerName!("setSubmenu:"); 138 sel_setTitle = sel_registerName!("setTitle:"); 139 sel_setWindowsMenu = sel_registerName!("setWindowsMenu:"); 140 sel_sharedApplication = sel_registerName!("sharedApplication"); 141 sel_sizeToFit = sel_registerName!("sizeToFit"); 142 sel_stringByAppendingString = sel_registerName!("stringByAppendingString:"); 143 sel_submenu = sel_registerName!("submenu"); 144 sel_title = sel_registerName!("title"); 145 sel_UTF8String = sel_registerName!("UTF8String"); 146 sel_separatorItem = sel_registerName!("separatorItem"); 147 sel_stop = sel_registerName!("stop:"); 148 sel_terminate = sel_registerName!("terminate:"); 149 sel_setupWorkingDirectory = sel_registerName!("setupWorkingDirectory"); 150 version (SDL_USE_NIB_FILE) sel_fixMenu = sel_registerName!("fixMenu"); 151 sel_application = sel_registerName!("application:openFile:"); 152 sel_applicationDidFinishLaunching = sel_registerName!("applicationDidFinishLaunching:"); 153 sel_initWithTitle_action_keyEquivalent = sel_registerName!("initWithTitle:action:keyEquivalent:"); 154 }