this repo has no description
1
fork

Configure Feed

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

Add basic DrawSprocket stub implementation. (#505)

authored by

James Urquhart and committed by
Andrew Hyatt
956cca5e 80405c10

+272
+2
src/CMakeLists.txt
··· 192 192 ${CMAKE_CURRENT_SOURCE_DIR}/DataDetectorsNaturalLanguage/include 193 193 ${CMAKE_CURRENT_SOURCE_DIR}/SecurityInterface/include 194 194 ${CMAKE_CURRENT_SOURCE_DIR}/Carbon/include 195 + ${CMAKE_CURRENT_SOURCE_DIR}/DrawSprocket/include 195 196 ${CMAKE_CURRENT_SOURCE_DIR}/Quartz/include 196 197 ${CMAKE_CURRENT_SOURCE_DIR}/CoreImage/include 197 198 ${CMAKE_CURRENT_SOURCE_DIR}/CoreVideo/include ··· 406 407 add_subdirectory(OpenGL) 407 408 add_subdirectory(JavaVM) 408 409 add_subdirectory(DirectoryServices) 410 + add_subdirectory(DrawSprocket) 409 411 410 412 # /Applications 411 413 #add_subdirectory(external/TextEdit)
+18
src/DrawSprocket/CMakeLists.txt
··· 1 + project(DrawSprocket) 2 + 3 + set(DYLIB_COMPAT_VERSION "1.0.0") 4 + set(DYLIB_CURRENT_VERSION "1.0.0") 5 + 6 + add_framework(DrawSprocket 7 + FAT 8 + CURRENT_VERSION 9 + VERSION "A" 10 + 11 + SOURCES 12 + src/DrawSprocket.c 13 + 14 + DEPENDENCIES 15 + CoreFoundation 16 + Carbon 17 + system 18 + )
+1
src/DrawSprocket/include/DrawSprocket.h
··· 1 + // TODO
+251
src/DrawSprocket/src/DrawSprocket.c
··· 1 + 2 + #pragma GCC visibility push(hidden) 3 + 4 + #include <stdio.h> 5 + #include <string.h> 6 + #include <stdlib.h> 7 + 8 + #include <Carbon/Carbon.h> 9 + #include "MacTypes.h" 10 + 11 + #define FW_EXPORT __attribute__ ((visibility ("default"))) 12 + 13 + 14 + typedef UInt32 DisplayIDType; 15 + typedef UInt32 EventRecord; 16 + 17 + typedef void* DSpContextReference; 18 + typedef const void* DSpContextReferenceConst; 19 + typedef void* DSpContextAttributesPtr; 20 + 21 + typedef uint8_t DSpBufferKind; 22 + typedef uint8_t DSpContextState; 23 + 24 + typedef void* DSpCallbackUPP; 25 + 26 + // Older mac API defs 27 + typedef void* CGrafPtr; 28 + 29 + typedef struct RGBColor { 30 + unsigned short components[3]; 31 + } RGBColor; 32 + 33 + typedef struct ColorSpec { 34 + short value; 35 + RGBColor rgb; 36 + } ColorSpec; 37 + 38 + // 39 + 40 + static int verbose = 0; 41 + 42 + __attribute__((constructor)) 43 + static void initme(void) { 44 + verbose = getenv("STUB_VERBOSE") != NULL; 45 + } 46 + 47 + FW_EXPORT OSStatus DSpContext_Dispose(DSpContextReference ref) 48 + { 49 + if (verbose) puts("STUB: DSpContext_Dispose called"); 50 + return 0; 51 + } 52 + 53 + FW_EXPORT OSStatus DSpContext_FadeGamma(DSpContextReference ref, SInt32 a, RGBColor *b) 54 + { 55 + if (verbose) puts("STUB: DSpContext_FadeGamma called"); 56 + return 0; 57 + } 58 + 59 + FW_EXPORT OSStatus DSpContext_FadeGammaIn(DSpContextReference ref, RGBColor *a) 60 + { 61 + if (verbose) puts("STUB: DSpContext_FadeGammaIn called"); 62 + return 0; 63 + } 64 + 65 + FW_EXPORT OSStatus DSpContext_FadeGammaOut(DSpContextReference ref, RGBColor *a) 66 + { 67 + if (verbose) puts("STUB: DSpContext_FadeGammaOut called"); 68 + return 0; 69 + } 70 + 71 + FW_EXPORT OSStatus DSpContext_GetAttributes(DSpContextReferenceConst ref, DSpContextAttributesPtr a) 72 + { 73 + if (verbose) puts("STUB: DSpContext_GetAttributes called"); 74 + return 0; 75 + } 76 + 77 + FW_EXPORT OSStatus DSpContext_GetBackBuffer(DSpContextReference ref, DSpBufferKind a, CGrafPtr *b) 78 + { 79 + if (verbose) puts("STUB: DSpContext_GetBackBuffer called"); 80 + return 0; 81 + } 82 + 83 + FW_EXPORT OSStatus DSpContext_GetCLUTEntries(DSpContextReferenceConst ref, ColorSpec *a, UInt16 b, UInt16 c) 84 + { 85 + if (verbose) puts("STUB: DSpContext_GetCLUTEntries called"); 86 + return 0; 87 + } 88 + 89 + FW_EXPORT OSStatus DSpContext_GetDisplayID(DSpContextReferenceConst ref, DisplayIDType *a) 90 + { 91 + if (verbose) puts("STUB: DSpContext_GetDisplayID called"); 92 + return 0; 93 + } 94 + 95 + FW_EXPORT OSStatus DSpContext_GetFrontBuffer(DSpContextReferenceConst ref, CGrafPtr *a) 96 + { 97 + if (verbose) puts("STUB: DSpContext_GetFrontBuffer called"); 98 + return 0; 99 + } 100 + 101 + FW_EXPORT OSStatus DSpContext_GetMonitorFrequency(DSpContextReferenceConst ref, Fixed *a) 102 + { 103 + if (verbose) puts("STUB: DSpContext_GetMonitorFrequency called"); 104 + return 0; 105 + } 106 + 107 + FW_EXPORT OSStatus DSpContext_GetState(DSpContextReferenceConst ref, DSpContextState *a) 108 + { 109 + if (verbose) puts("STUB: DSpContext_GetState called"); 110 + return 0; 111 + } 112 + 113 + FW_EXPORT OSStatus DSpContext_GlobalToLocal(DSpContextReferenceConst ref, Point *a) 114 + { 115 + if (verbose) puts("STUB: DSpContext_GlobalToLocal called"); 116 + return 0; 117 + } 118 + 119 + FW_EXPORT OSStatus DSpContext_IsBusy(DSpContextReferenceConst ref, Boolean *a) 120 + { 121 + if (verbose) puts("STUB: DSpContext_IsBusy called"); 122 + return 0; 123 + } 124 + 125 + FW_EXPORT OSStatus DSpContext_LocalToGlobal(DSpContextReferenceConst ref, Point *a) 126 + { 127 + if (verbose) puts("STUB: DSpContext_LocalToGlobal called"); 128 + return 0; 129 + } 130 + 131 + FW_EXPORT OSStatus DSpContext_Queue(DSpContextReference ref, DSpContextReference ref2, DSpContextAttributesPtr a) 132 + { 133 + if (verbose) puts("STUB: DSpContext_Queue called"); 134 + return 0; 135 + } 136 + 137 + FW_EXPORT OSStatus DSpContext_Release(DSpContextReference ref) 138 + { 139 + if (verbose) puts("STUB: DSpContext_Release called"); 140 + return 0; 141 + } 142 + 143 + FW_EXPORT OSStatus DSpContext_Reserve(DSpContextReference ref, DSpContextAttributesPtr a) 144 + { 145 + if (verbose) puts("STUB: DSpContext_Reserve called"); 146 + return 0; 147 + } 148 + const 149 + FW_EXPORT OSStatus DSpContext_SetCLUTEntries(DSpContextReference ref, const ColorSpec *a, UInt16 b, UInt16 c) 150 + { 151 + if (verbose) puts("STUB: DSpContext_SetCLUTEntries called"); 152 + return 0; 153 + } 154 + 155 + FW_EXPORT OSStatus DSpContext_SetState(DSpContextReference ref, DSpContextState a) 156 + { 157 + if (verbose) puts("STUB: DSpContext_SetState called"); 158 + return 0; 159 + } 160 + 161 + FW_EXPORT OSStatus DSpContext_SwapBuffers(DSpContextReference ref, DSpCallbackUPP a, void *b) 162 + { 163 + if (verbose) puts("STUB: DSpContext_SwapBuffers called"); 164 + return 0; 165 + } 166 + 167 + FW_EXPORT OSStatus DSpContext_Switch(DSpContextReference ref, DSpContextReference ref2) 168 + { 169 + if (verbose) puts("STUB: DSpContext_Switch called"); 170 + return 0; 171 + } 172 + 173 + FW_EXPORT OSStatus DSpFindBestContext(DSpContextAttributesPtr a, DSpContextReference *ref) 174 + { 175 + if (verbose) puts("STUB: DSpFindBestContext called"); 176 + return 0; 177 + } 178 + 179 + FW_EXPORT OSStatus DSpFindBestContextOnDisplayID(DSpContextAttributesPtr a, DSpContextReference *b, DisplayIDType c) 180 + { 181 + if (verbose) puts("STUB: DSpFindBestContextOnDisplayID called"); 182 + return 0; 183 + } 184 + 185 + FW_EXPORT OSStatus DSpFindContextFromPoint(Point a, DSpContextReference *ref) 186 + { 187 + if (verbose) puts("STUB: DSpFindContextFromPoint called"); 188 + return 0; 189 + } 190 + 191 + FW_EXPORT OSStatus DSpGetCurrentContext(DisplayIDType typeID, DSpContextReference *ref) 192 + { 193 + if (verbose) puts("STUB: DSpGetCurrentContext called"); 194 + return 0; 195 + } 196 + 197 + FW_EXPORT OSStatus DSpGetFirstContext(DisplayIDType typeID, DSpContextReference *ref) 198 + { 199 + if (verbose) puts("STUB: DSpGetFirstContext called"); 200 + return 0; 201 + } 202 + 203 + FW_EXPORT OSStatus DSpGetMouse(Point *a) 204 + { 205 + if (verbose) puts("STUB: DSpGetMouse called"); 206 + return 0; 207 + } 208 + 209 + FW_EXPORT OSStatus DSpGetNextContext(DSpContextReference ref, DSpContextReference *ref2) 210 + { 211 + if (verbose) puts("STUB: DSpGetNextContext called"); 212 + return 0; 213 + } 214 + 215 + FW_EXPORT NumVersion DSpGetVersion(void) 216 + { 217 + if (verbose) puts("STUB: DSpGetVersion called"); 218 + NumVersion ret; 219 + return ret; 220 + } 221 + 222 + FW_EXPORT OSStatus DSpProcessEvent(EventRecord *a, Boolean *b) 223 + { 224 + if (verbose) puts("STUB: DSpProcessEvent called"); 225 + return 0; 226 + } 227 + 228 + FW_EXPORT OSStatus DSpSetBlankingColor(const RGBColor * a) 229 + { 230 + if (verbose) puts("STUB: DSpSetBlankingColor called"); 231 + return 0; 232 + } 233 + 234 + FW_EXPORT OSStatus DSpSetDebugMode(Boolean a) 235 + { 236 + if (verbose) puts("STUB: DSpSetDebugMode called"); 237 + return 0; 238 + } 239 + 240 + FW_EXPORT OSStatus DSpShutdown(void) 241 + { 242 + if (verbose) puts("STUB: DSpShutdown called"); 243 + return 0; 244 + } 245 + 246 + FW_EXPORT OSStatus DSpStartup(void) 247 + { 248 + if (verbose) puts("STUB: DSpStartup called"); 249 + return 0; 250 + } 251 +