this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #1589 from Lazerbeak12345/add-missing-ibcarbonruntime-header

add missing IBCarbonRuntime.h, associated stubs and modifications to HIToolbox

authored by

CuriousTommy and committed by
GitHub
0e09aec9 f1673369

+120 -28
+1
src/frameworks/Carbon/HIToolbox/CMakeLists.txt
··· 22 22 src/Events.cpp 23 23 src/MacWindows.cpp 24 24 src/TextInputSources.mm 25 + src/IBCarbonRuntime.c 25 26 src/constants.c 26 27 27 28 DEPENDENCIES
+36
src/frameworks/Carbon/HIToolbox/include/HIToolbox/IBCarbonRuntime.h
··· 1 + #ifndef _CARBON_IB_CARBON_RUNTIME_H_ 2 + #define _CARBON_IB_CARBON_RUNTIME_H_ 3 + 4 + #include <CoreFoundation/CoreFoundation.h> 5 + #include <CarbonCore/MacErrors.h> 6 + #include <CoreFoundation/CFBase.h> 7 + #include <HIToolbox/Menus.h> 8 + #include <HIToolbox/MacWindows.h> 9 + 10 + #ifdef __cplusplus 11 + extern "C" { 12 + #endif 13 + 14 + enum { 15 + kIBCarbonRuntimeCantFindNibFile = -10960, 16 + kIBCarbonRuntimeObjectNotOfRequestedType = -10961, 17 + kIBCarbonRuntimeCantFindObject = -10962 18 + }; 19 + 20 + typedef struct OpaqueIBNibRef * IBNibRef; 21 + 22 + OSStatus CreateMenuBarFromNib(IBNibRef inNibRef, CFStringRef inName, Handle *outMenuBar); 23 + OSStatus CreateMenuFromNib(IBNibRef inNibRef, CFStringRef inName, MenuRef *outMenuRef); 24 + OSStatus CreateNibReference(CFStringRef inNibName, IBNibRef *outNibRef); 25 + OSStatus CreateNibReferenceWithCFBundle(CFBundleRef inBundle, CFStringRef inNibName, IBNibRef *outNibRef); 26 + OSStatus CreateWindowFromNib(IBNibRef inNibRef, CFStringRef inName, WindowRef *outWindow); 27 + 28 + void DisposeNibReference(IBNibRef inNibRef); 29 + 30 + OSStatus SetMenuBarFromNib(IBNibRef inNibRef, CFStringRef inName); 31 + 32 + #ifdef __cplusplus 33 + } 34 + #endif 35 + 36 + #endif // _CARBON_IB_CARBON_RUNTIME_H_
+12
src/frameworks/Carbon/HIToolbox/include/HIToolbox/TextInputSources.h
··· 1 1 #ifndef _Carbon_TextInputSources_H_ 2 2 #define _Carbon_TextInputSources_H_ 3 + #include <CoreFoundation/CFString.h> 3 4 4 5 #ifdef __cplusplus 5 6 extern "C" { ··· 11 12 extern const CFStringRef kTISPropertyInputSourceCategory; 12 13 extern const CFStringRef kTISPropertyInputSourceType; 13 14 extern const CFStringRef kTISTypeKeyboardLayout; 15 + extern const CFStringRef kTISPropertyInputSourceLanguages; 16 + extern const CFStringRef kTISPropertyLocalizedName; 17 + 18 + typedef struct __TISInputSource* TISInputSourceRef; 19 + 20 + extern TISInputSourceRef TISCopyCurrentKeyboardLayoutInputSource(void); 21 + extern TISInputSourceRef TISCopyCurrentKeyboardInputSource(void); 22 + 23 + extern void* TISGetInputSourceProperty(TISInputSourceRef inputSourceRef, CFStringRef key); 24 + 25 + extern TISInputSourceRef TISCopyCurrentASCIICapableKeyboardLayoutInputSource(void); 14 26 15 27 #ifdef __cplusplus 16 28 }
+68
src/frameworks/Carbon/HIToolbox/src/IBCarbonRuntime.c
··· 1 + #include <HIToolbox/IBCarbonRuntime.h> 2 + #include <stdlib.h> 3 + #include <stdio.h> 4 + 5 + static int verbose = 0; 6 + 7 + __attribute__((constructor)) 8 + static void initme(void) { 9 + verbose = getenv("STUB_VERBOSE") != NULL; 10 + } 11 + 12 + 13 + OSStatus CreateMenuBarFromNib(IBNibRef inNibRef, CFStringRef inName, Handle *outMenuBar) 14 + { 15 + if (verbose) { 16 + puts("STUB: CreateMenuBarFromNib"); 17 + } 18 + 19 + return noErr; 20 + } 21 + OSStatus CreateMenuFromNib(IBNibRef inNibRef, CFStringRef inName, MenuRef *outMenuRef) 22 + { 23 + if (verbose) { 24 + puts("STUB: CreateMenuFromNib"); 25 + } 26 + 27 + return noErr; 28 + } 29 + OSStatus CreateNibReference(CFStringRef inNibName, IBNibRef *outNibRef) 30 + { 31 + if (verbose) { 32 + puts("STUB: CreateNibReference"); 33 + } 34 + 35 + return noErr; 36 + } 37 + OSStatus CreateNibReferenceWithCFBundle(CFBundleRef inBundle, CFStringRef inNibName, IBNibRef *outNibRef) 38 + { 39 + if (verbose) { 40 + puts("STUB: CreateNibReferenceWithCFBundle"); 41 + } 42 + 43 + return noErr; 44 + } 45 + OSStatus CreateWindowFromNib(IBNibRef inNibRef, CFStringRef inName, WindowRef *outWindow) 46 + { 47 + if (verbose) { 48 + puts("STUB: CreateWindowFromNib"); 49 + } 50 + 51 + return noErr; 52 + } 53 + 54 + void DisposeNibReference(IBNibRef inNibRef) 55 + { 56 + if (verbose) { 57 + puts("STUB: DisposeNibReference"); 58 + } 59 + } 60 + 61 + OSStatus SetMenuBarFromNib(IBNibRef inNibRef, CFStringRef inName) 62 + { 63 + if (verbose) { 64 + puts("STUB: SetMenuBarFromNib"); 65 + } 66 + 67 + return noErr; 68 + }
+1 -1
src/frameworks/Carbon/HIToolbox/src/MacWindows.cpp
··· 1 - #include "MacWindows.h" 1 + #include <HIToolbox/MacWindows.h> 2 2 #include <stdlib.h> 3 3 #include <stdio.h> 4 4
src/frameworks/Carbon/HIToolbox/src/MacWindows.h src/frameworks/Carbon/HIToolbox/include/HIToolbox/MacWindows.h
-26
src/frameworks/Carbon/HIToolbox/src/TextInputSources.h
··· 1 - #ifndef _TEXTINPUTSOURCES_H 2 - #define _TEXTINPUTSOURCES_H 3 - #include <CoreFoundation/CFString.h> 4 - 5 - #ifdef __cplusplus 6 - extern "C" { 7 - #endif 8 - 9 - typedef struct __TISInputSource* TISInputSourceRef; 10 - 11 - extern const CFStringRef kTISPropertyUnicodeKeyLayoutData; 12 - extern const CFStringRef kTISPropertyInputSourceLanguages; 13 - extern const CFStringRef kTISPropertyLocalizedName; 14 - 15 - extern TISInputSourceRef TISCopyCurrentKeyboardLayoutInputSource(void); 16 - extern TISInputSourceRef TISCopyCurrentKeyboardInputSource(void); 17 - 18 - extern void* TISGetInputSourceProperty(TISInputSourceRef inputSourceRef, CFStringRef key); 19 - 20 - extern TISInputSourceRef TISCopyCurrentASCIICapableKeyboardLayoutInputSource(void); 21 - 22 - #ifdef __cplusplus 23 - } 24 - #endif 25 - 26 - #endif
+1 -1
src/frameworks/Carbon/HIToolbox/src/TextInputSources.mm
··· 1 - #include "TextInputSources.h" 1 + #include <HIToolbox/TextInputSources.h> 2 2 #include <CoreFoundation/CFDictionary.h> 3 3 #include <CoreFoundation/CFData.h> 4 4 #include <os/lock.h>
+1
src/frameworks/Carbon/include/Carbon/Carbon.h
··· 33 33 #include <HIToolbox/HIObject.h> 34 34 #include <HIToolbox/Lists.h> 35 35 #include <HIToolbox/Menus.h> 36 + #include <HIToolbox/IBCarbonRuntime.h> 36 37 #include <HIToolbox/Notification.h> 37 38 #include <HIToolbox/Scrap.h> 38 39 #include <HIToolbox/TextEdit.h>