···11+project(ATS)
22+33+set(DYLIB_COMPAT_VERSION "1.0.0")
44+set(DYLIB_CURRENT_VERSION "236.0.0")
55+66+add_framework(ATS
77+ FAT
88+ CURRENT_VERSION
99+ VERSION "A"
1010+ PARENT ApplicationServices
1111+1212+ SOURCES
1313+ src/ATS.c
1414+1515+ DEPENDENCIES
1616+ CoreFoundation
1717+ system
1818+)
+42
src/ApplicationServices/ATS/include/ATS/ATS.h
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2019 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+2121+#ifndef _ATS_H_
2222+#define _ATS_H_
2323+2424+#include <MacTypes.h>
2525+#include <stdint.h>
2626+2727+typedef UInt32 FMFont;
2828+2929+typedef uint32_t ATSFontRef;
3030+typedef OptionBits ATSOptionFlags;
3131+typedef void* ATSUTextLayout;
3232+typedef void* ATSUStyle;
3333+typedef uint32_t ATSUAttributeTag;
3434+typedef Fixed ATSUTextMeasurement;
3535+typedef void* ATSUAttributeValuePtr;
3636+3737+typedef uint32_t UniCharArrayOffset;
3838+typedef char* ConstUniCharArrayPtr;
3939+4040+typedef void* ATSFontMetrics;
4141+4242+#endif
+114
src/ApplicationServices/ATS/src/ATS.c
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2019 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+#include <ATS/ATS.h>
2121+#include <stdlib.h>
2222+#include <stdio.h>
2323+#include <CoreFoundation/CoreFoundation.h>
2424+2525+static int verbose = 0;
2626+2727+__attribute__((constructor))
2828+static void initme(void) {
2929+ verbose = getenv("STUB_VERBOSE") != NULL;
3030+}
3131+3232+ATSFontRef ATSFontFindFromName(CFStringRef a, ATSOptionFlags b)
3333+{
3434+ if (verbose) puts("STUB: ATSFontFindFromName called");
3535+ return 0;
3636+}
3737+3838+OSStatus ATSFontGetHorizontalMetrics(ATSFontRef a, ATSOptionFlags b, ATSFontMetrics *c)
3939+{
4040+ if (verbose) puts("STUB: ATSFontGetHorizontalMetrics called");
4141+ return 0;
4242+}
4343+4444+OSStatus ATSUCreateStyle(ATSUStyle *a)
4545+{
4646+ if (verbose) puts("STUB: ATSUCreateStyle called");
4747+ return 0;
4848+}
4949+5050+OSStatus ATSUCreateTextLayout(ATSUTextLayout *a)
5151+{
5252+ if (verbose) puts("STUB: ATSUCreateTextLayout called");
5353+ return 0;
5454+}
5555+5656+OSStatus ATSUDisposeStyle(ATSUStyle *a)
5757+{
5858+ if (verbose) puts("STUB: ATSUDisposeStyle called");
5959+ return 0;
6060+}
6161+6262+OSStatus ATSUDisposeTextLayout(ATSUTextLayout *a)
6363+{
6464+ if (verbose) puts("STUB: ATSUDisposeTextLayout called");
6565+ return 0;
6666+}
6767+6868+OSStatus ATSUDrawText(ATSUTextLayout a, UniCharArrayOffset b, UniCharCount c, ATSUTextMeasurement d, ATSUTextMeasurement e)
6969+{
7070+ if (verbose) puts("STUB: ATSUDrawText called");
7171+ return 0;
7272+}
7373+7474+OSStatus ATSUGetUnjustifiedBounds(ATSUTextLayout a , UniCharArrayOffset b , UniCharCount c , ATSUTextMeasurement * d , ATSUTextMeasurement * e , ATSUTextMeasurement * f , ATSUTextMeasurement * g)
7575+{
7676+ if (verbose) puts("STUB: ATSUGetUnjustifiedBounds called");
7777+ return 0;
7878+}
7979+8080+OSStatus ATSUMeasureTextImage(ATSUTextLayout a, UniCharArrayOffset b, UniCharCount c, ATSUTextMeasurement d, ATSUTextMeasurement e, Rect *f)
8181+{
8282+ if (verbose) puts("STUB: ATSUMeasureTextImage called");
8383+ return 0;
8484+}
8585+8686+OSStatus ATSUSetAttributes(ATSUStyle a, ItemCount b, const ATSUAttributeTag *c, const ByteCount *d, const ATSUAttributeValuePtr *e)
8787+{
8888+ if (verbose) puts("STUB: ATSUSetAttributes called");
8989+ return 0;
9090+}
9191+9292+OSStatus ATSUSetLayoutControls(ATSUTextLayout a, ItemCount b, const ATSUAttributeTag *c, const ByteCount *d, const ATSUAttributeValuePtr *e)
9393+{
9494+ if (verbose) puts("STUB: ATSUSetLayoutControls called");
9595+ return 0;
9696+}
9797+9898+OSStatus ATSUSetRunStyle(ATSUTextLayout a, ATSUStyle b, UniCharArrayOffset c, UniCharCount d)
9999+{
100100+ if (verbose) puts("STUB: ATSUSetRunStyle called");
101101+ return 0;
102102+}
103103+104104+OSStatus ATSUSetTextPointerLocation(ATSUTextLayout a, ConstUniCharArrayPtr b, UniCharArrayOffset c, UniCharCount d, UniCharCount e)
105105+{
106106+ if (verbose) puts("STUB: ATSUSetTextPointerLocation called");
107107+ return 0;
108108+}
109109+110110+OSStatus ATSUSetTransientFontMatching(ATSUTextLayout a, Boolean b)
111111+{
112112+ if (verbose) puts("STUB: ATSUSetTransientFontMatching called");
113113+ return 0;
114114+}
-175
src/ApplicationServices/ApplicationServices.c
···1717 along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818*/
19192020-#include <CoreFoundation/CoreFoundation.h>
2121-#include <CoreGraphics/CGDirectDisplay.h>
2222-2320const char* ApplicationServicesVersionString = "Darling ApplicationServices-48";
2421const unsigned long long ApplicationServicesVersionNumber = 0x4048000000000000;
2525-const CFStringRef kAXUIElementCopyHierarchyArrayAttributesKey = CFSTR("AXCHAA");
2626-const CFStringRef kAXUIElementCopyHierarchyMaxArrayCountKey = CFSTR("AXCHMAC");
2727-const CFStringRef kAXUIElementCopyHierarchyResultValueKey = CFSTR("value");
2828-const CFStringRef kAXUIElementCopyHierarchyReturnAttributeErrorsKey = CFSTR("AXCHRE");
2929-const CFStringRef kAXUIElementCopyHierarchySkipInspectionForAttributesKey = CFSTR("AXCHSIA");
3030-const CFStringRef kAXUIElementCopyHierarchyTruncateStringsKey = CFSTR("AXTRUNC");
3131-/* Not const for some reason */
3232-CFStringRef kAXTrustedCheckOptionPrompt = CFSTR("AXTrustedCheckOptionPrompt");
3333-3434-#include "MacTypes.h"
3535-3636-static int verbose = 0;
3737-3838-__attribute__((constructor))
3939-static void initme(void) {
4040- verbose = getenv("STUB_VERBOSE") != NULL;
4141-}
4242-4343-// Types we need for the following stubs...
4444-4545-typedef uint32_t ATSFontRef;
4646-typedef OptionBits ATSOptionFlags;
4747-typedef void* ATSUTextLayout;
4848-typedef void* ATSUStyle;
4949-typedef uint32_t ATSUAttributeTag;
5050-typedef Fixed ATSUTextMeasurement;
5151-typedef void* ATSUAttributeValuePtr;
5252-5353-typedef uint32_t UniCharArrayOffset;
5454-typedef char* ConstUniCharArrayPtr;
5555-5656-typedef void* ATSFontMetrics;
5757-typedef void** GDHandle;
5858-5959-typedef uint32_t FMFont;
6060-6161-6262-6363-// ATS Stubs
6464-6565-ATSFontRef ATSFontFindFromName(CFStringRef a, ATSOptionFlags b)
6666-{
6767- if (verbose) puts("STUB: ATSFontFindFromName called");
6868- return 0;
6969-}
7070-7171-OSStatus ATSFontGetHorizontalMetrics(ATSFontRef a, ATSOptionFlags b, ATSFontMetrics *c)
7272-{
7373- if (verbose) puts("STUB: ATSFontGetHorizontalMetrics called");
7474- return 0;
7575-}
7676-7777-OSStatus ATSUCreateStyle(ATSUStyle *a)
7878-{
7979- if (verbose) puts("STUB: ATSUCreateStyle called");
8080- return 0;
8181-}
8282-8383-OSStatus ATSUCreateTextLayout(ATSUTextLayout *a)
8484-{
8585- if (verbose) puts("STUB: ATSUCreateTextLayout called");
8686- return 0;
8787-}
8888-8989-OSStatus ATSUDisposeStyle(ATSUStyle *a)
9090-{
9191- if (verbose) puts("STUB: ATSUDisposeStyle called");
9292- return 0;
9393-}
9494-9595-OSStatus ATSUDisposeTextLayout(ATSUTextLayout *a)
9696-{
9797- if (verbose) puts("STUB: ATSUDisposeTextLayout called");
9898- return 0;
9999-}
100100-101101-OSStatus ATSUDrawText(ATSUTextLayout a, UniCharArrayOffset b, UniCharCount c, ATSUTextMeasurement d, ATSUTextMeasurement e)
102102-{
103103- if (verbose) puts("STUB: ATSUDrawText called");
104104- return 0;
105105-}
106106-107107-OSStatus ATSUGetUnjustifiedBounds(ATSUTextLayout a , UniCharArrayOffset b , UniCharCount c , ATSUTextMeasurement * d , ATSUTextMeasurement * e , ATSUTextMeasurement * f , ATSUTextMeasurement * g)
108108-{
109109- if (verbose) puts("STUB: ATSUGetUnjustifiedBounds called");
110110- return 0;
111111-}
112112-113113-OSStatus ATSUMeasureTextImage(ATSUTextLayout a, UniCharArrayOffset b, UniCharCount c, ATSUTextMeasurement d, ATSUTextMeasurement e, Rect *f)
114114-{
115115- if (verbose) puts("STUB: ATSUMeasureTextImage called");
116116- return 0;
117117-}
118118-119119-OSStatus ATSUSetAttributes(ATSUStyle a, ItemCount b, const ATSUAttributeTag *c, const ByteCount *d, const ATSUAttributeValuePtr *e)
120120-{
121121- if (verbose) puts("STUB: ATSUSetAttributes called");
122122- return 0;
123123-}
124124-125125-OSStatus ATSUSetLayoutControls(ATSUTextLayout a, ItemCount b, const ATSUAttributeTag *c, const ByteCount *d, const ATSUAttributeValuePtr *e)
126126-{
127127- if (verbose) puts("STUB: ATSUSetLayoutControls called");
128128- return 0;
129129-}
130130-131131-OSStatus ATSUSetRunStyle(ATSUTextLayout a, ATSUStyle b, UniCharArrayOffset c, UniCharCount d)
132132-{
133133- if (verbose) puts("STUB: ATSUSetRunStyle called");
134134- return 0;
135135-}
136136-137137-OSStatus ATSUSetTextPointerLocation(ATSUTextLayout a, ConstUniCharArrayPtr b, UniCharArrayOffset c, UniCharCount d, UniCharCount e)
138138-{
139139- if (verbose) puts("STUB: ATSUSetTextPointerLocation called");
140140- return 0;
141141-}
142142-143143-OSStatus ATSUSetTransientFontMatching(ATSUTextLayout a, Boolean b)
144144-{
145145- if (verbose) puts("STUB: ATSUSetTransientFontMatching called");
146146- return 0;
147147-}
148148-149149-// End ATS Stubs
150150-151151-// QuickDraw Stubs
152152-153153-void InitCursor()
154154-{
155155- if (verbose) puts("STUB: InitCursor called");
156156-}
157157-158158-static uint32_t gFakeScreenDevice;
159159-160160-GDHandle DMGetFirstScreenDevice(Boolean a)
161161-{
162162- if (verbose) puts("STUB: DMGetFirstScreenDevice called");
163163- return (GDHandle)&gFakeScreenDevice;
164164-}
165165-166166-GDHandle DMGetNextScreenDevice (GDHandle a, Boolean b)
167167-{
168168- if (verbose) puts("STUB: DMGetNextScreenDevice called");
169169- return (GDHandle)0;
170170-}
171171-172172-GDHandle GetMainDevice()
173173-{
174174- if (verbose) puts("STUB: GetMainDevice called");
175175- return (GDHandle)0;
176176-}
177177-178178-CGDirectDisplayID QDGetCGDirectDisplayID(GDHandle a)
179179-{
180180- if (verbose) puts("STUB: QDGetCGDirectDisplayID called");
181181- return (CGDirectDisplayID)a;
182182-}
183183-184184-// End QuickDraw Stubs
185185-186186-187187-// Old QuickDraw Font Stubs
188188-189189-FMFont FMGetFontFromATSFontRef(ATSFontRef a)
190190-{
191191- if (verbose) puts("STUB: FMGetFontFromATSFontRef called");
192192- return (FMFont)0;
193193-}
194194-195195-// End Old QuickDraw Font Stubs
196196-
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2019 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+2121+#ifndef _HIServices_H_
2222+#define _HIServices_H_
2323+2424+#endif
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2019 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+2121+#ifndef _LangAnalysis_H_
2222+#define _LangAnalysis_H_
2323+2424+void* DCMAddFoundRecordToIteratorAM(void);
2525+void* DCMAddRecord(void);
2626+void* DCMCloseDictionary(void);
2727+void* DCMCompactDictionary(void);
2828+void* DCMCopyParametersFromData(void);
2929+void* DCMCountObjectIterator(void);
3030+void* DCMCountRecord(void);
3131+void* DCMCountRecordIterator(void);
3232+void* DCMCreateAccessMethodIterator(void);
3333+void* DCMCreateDataWithParameters(void);
3434+void* DCMCreateDictionaryIterator(void);
3535+void* DCMCreateDictionaryIteratorInternal(void);
3636+void* DCMCreateFieldInfoRecord(void);
3737+void* DCMCreateFieldInfoRecordAM(void);
3838+void* DCMDeleteDictionary(void);
3939+void* DCMDeleteRecord(void);
4040+void* DCMDeriveNewDictionaryWithURL(void);
4141+void* DCMDictionaryServiceWindowShow(void);
4242+void* DCMDisposeObjectIterator(void);
4343+void* DCMDisposeRecordIterator(void);
4444+void* DCMFindRecords(void);
4545+void* DCMGetAccessMethodIDFromName(void);
4646+void* DCMGetDictionaryFieldInfo(void);
4747+void* DCMGetDictionaryIDFromFileWithURL(void);
4848+void* DCMGetDictionaryIDFromRef(void);
4949+void* DCMGetDictionaryProperty(void);
5050+void* DCMGetDictionaryPropertyList(void);
5151+void* DCMGetDictionaryWriteAccess(void);
5252+void* DCMGetFieldAttributes(void);
5353+void* DCMGetFieldAttributesAM(void);
5454+void* DCMGetFieldData(void);
5555+void* DCMGetFieldDefaultData(void);
5656+void* DCMGetFieldDefaultDataAM(void);
5757+void* DCMGetFieldFindMethods(void);
5858+void* DCMGetFieldFindMethodsAM(void);
5959+void* DCMGetFieldMaxRecordSize(void);
6060+void* DCMGetFieldMaxRecordSizeAM(void);
6161+void* DCMGetFieldTagAndType(void);
6262+void* DCMGetFieldTagAndTypeAM(void);
6363+void* DCMGetFileFromDictionaryIDWithURL(void);
6464+void* DCMGetNextRecord(void);
6565+void* DCMGetNthRecord(void);
6666+void* DCMGetPrevRecord(void);
6767+void* DCMGetRecordSequenceNumber(void);
6868+void* DCMIterateFoundRecord(void);
6969+void* DCMIterateFoundRecordFast(void);
7070+void* DCMIterateObject(void);
7171+void* DCMLibraryVersion(void);
7272+void* DCMNewDictionaryWithURL(void);
7373+void* DCMOpenDictionary(void);
7474+void* DCMRegisterDictionaryFileWithURL(void);
7575+void* DCMReleaseDictionaryWriteAccess(void);
7676+void* DCMReorganizeDictionary(void);
7777+void* DCMResetObjectIterator(void);
7878+void* DCMSetDictionaryProperty(void);
7979+void* DCMSetFieldData(void);
8080+void* DCMShowDictionaryServiceWindow(void);
8181+void* DCMSubscribeDictionaryNotification(void);
8282+void* DCMUnregisterDictionary(void);
8383+void* DCMUnsubscribeDictionaryNotification(void);
8484+void* LAAddNewWordWithURL(void);
8585+void* LAChangeForm(void);
8686+void* LACloseAnalysisContext(void);
8787+void* LACloseContext(void);
8888+void* LACloseDictionaryWithURL(void);
8989+void* LAConfirmMorpheme(void);
9090+void* LAContinuousMorphemeAnalysis(void);
9191+void* LAContinuousMorphemeAnalysisPriv(void);
9292+void* LACreateCustomEnvironment(void);
9393+void* LADeleteCustomEnvironment(void);
9494+void* LAFeedbackPath(void);
9595+void* LAGetEnvironmentList(void);
9696+void* LAGetEnvironmentName(void);
9797+void* LAGetEnvironmentProperty(void);
9898+void* LAGetEnvironmentRef(void);
9999+void* LAGetMorphemes(void);
100100+void* LAGetMorphemesPriv(void);
101101+void* LALibraryVersion(void);
102102+void* LAListAvailableDictionariesWithURL(void);
103103+void* LAMorphemeAnalysis(void);
104104+void* LAMorphemeAnalysisPriv(void);
105105+void* LAOpenAnalysisContext(void);
106106+void* LAOpenContext(void);
107107+void* LAOpenDictionaryPriv(void);
108108+void* LAOpenDictionaryWithURL(void);
109109+void* LAReanalyzePartially(void);
110110+void* LAResetAnalysis(void);
111111+void* LASetEnvironmentProperty(void);
112112+void* LAShiftMorphemes(void);
113113+void* LATextToMorphemes(void);
114114+115115+#endif
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2019 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+#include <Foundation/Foundation.h>
2121+2222+@interface PMInkChecker : NSObject
2323+2424+@end
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2019 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+#import <PrintCore/PMInkChecker.h>
2121+2222+@implementation PMInkChecker
2323+2424+- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
2525+{
2626+ return [NSMethodSignature signatureWithObjCTypes: "v@:"];
2727+}
2828+2929+- (void)forwardInvocation:(NSInvocation *)anInvocation
3030+{
3131+ NSLog(@"Stub called: %@ in %@", NSStringFromSelector([anInvocation selector]), [self class]);
3232+}
3333+3434+@end
···11+project(QD)
22+33+set(DYLIB_COMPAT_VERSION "1.0.0")
44+set(DYLIB_CURRENT_VERSION "1.0.0")
55+66+add_framework(QD
77+ FAT
88+ CURRENT_VERSION
99+ VERSION "A"
1010+ PARENT ApplicationServices
1111+1212+ SOURCES
1313+ src/QD.c
1414+1515+ DEPENDENCIES
1616+ CoreFoundation
1717+ system
1818+)
+107
src/ApplicationServices/QD/include/QD/QD.h
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2019 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+2121+#ifndef _QD_H_
2222+#define _QD_H_
2323+2424+#include <MacTypes.h>
2525+2626+struct RGBColor;
2727+struct ColorSpec;
2828+struct GDevice;
2929+struct ColorTable;
3030+3131+typedef struct GDevice GDevice;
3232+typedef GDevice * GDPtr;
3333+typedef GDPtr * GDHandle;
3434+3535+typedef struct RGBColor RGBColor;
3636+3737+typedef struct ColorSpec ColorSpec;
3838+typedef ColorSpec * ColorSpecPtr;
3939+4040+struct RGBColor {
4141+ unsigned short red;
4242+ unsigned short green;
4343+ unsigned short blue;
4444+};
4545+4646+struct ColorSpec {
4747+ short value;
4848+ RGBColor rgb;
4949+};
5050+5151+typedef ColorSpec CSpecArray[1];
5252+5353+typedef struct ColorTable ColorTable;
5454+typedef ColorTable * CTabPtr;
5555+typedef CTabPtr * CTabHandle;
5656+5757+struct PixMap {
5858+ Ptr baseAddr;
5959+ short rowBytes;
6060+ Rect bounds;
6161+ short pmVersion;
6262+ short packType;
6363+ SInt32 packSize;
6464+ Fixed hRes;
6565+ Fixed vRes;
6666+ short pixelType;
6767+ short pixelSize;
6868+ short cmpCount;
6969+ short cmpSize;
7070+ OSType pixelFormat;
7171+ CTabHandle pmTable;
7272+ void * pmExt;
7373+};
7474+7575+typedef struct PixMap PixMap;
7676+typedef PixMap * PixMapPtr;
7777+typedef PixMapPtr * PixMapHandle;
7878+7979+struct GDevice {
8080+ short gdRefNum;
8181+ short gdID;
8282+ short gdType;
8383+ Handle gdITable;
8484+ short gdResPref;
8585+ Handle gdSearchProc;
8686+ Handle gdCompProc;
8787+ short gdFlags;
8888+ PixMapHandle gdPMap;
8989+ SInt32 gdRefCon;
9090+ GDHandle gdNextGD;
9191+ Rect gdRect;
9292+ SInt32 gdMode;
9393+ short gdCCBytes;
9494+ short gdCCDepth;
9595+ Handle gdCCXData;
9696+ Handle gdCCXMask;
9797+ Handle gdExt;
9898+};
9999+100100+struct ColorTable {
101101+ SInt32 ctSeed;
102102+ short ctFlags;
103103+ short ctSize;
104104+ CSpecArray ctTable;
105105+};
106106+107107+#endif
+69
src/ApplicationServices/QD/src/QD.c
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2019 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+#include <QD/QD.h>
2121+#include <ATS/ATS.h>
2222+#include <stdlib.h>
2323+#include <stdio.h>
2424+#include <CoreFoundation/CoreFoundation.h>
2525+#include <CoreGraphics/CGDirectDisplay.h>
2626+2727+static int verbose = 0;
2828+2929+__attribute__((constructor))
3030+static void initme(void) {
3131+ verbose = getenv("STUB_VERBOSE") != NULL;
3232+}
3333+3434+void InitCursor()
3535+{
3636+ if (verbose) puts("STUB: InitCursor called");
3737+}
3838+3939+static uint32_t gFakeScreenDevice;
4040+4141+GDHandle DMGetFirstScreenDevice(Boolean a)
4242+{
4343+ if (verbose) puts("STUB: DMGetFirstScreenDevice called");
4444+ return (GDHandle)&gFakeScreenDevice;
4545+}
4646+4747+GDHandle DMGetNextScreenDevice (GDHandle a, Boolean b)
4848+{
4949+ if (verbose) puts("STUB: DMGetNextScreenDevice called");
5050+ return (GDHandle)0;
5151+}
5252+5353+GDHandle GetMainDevice()
5454+{
5555+ if (verbose) puts("STUB: GetMainDevice called");
5656+ return (GDHandle)0;
5757+}
5858+5959+CGDirectDisplayID QDGetCGDirectDisplayID(GDHandle a)
6060+{
6161+ if (verbose) puts("STUB: QDGetCGDirectDisplayID called");
6262+ return (CGDirectDisplayID)a;
6363+}
6464+6565+FMFont FMGetFontFromATSFontRef(ATSFontRef a)
6666+{
6767+ if (verbose) puts("STUB: FMGetFontFromATSFontRef called");
6868+ return (FMFont)0;
6969+}
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2019 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+2121+#ifndef _SpeechSynthesis_H_
2222+#define _SpeechSynthesis_H_
2323+2424+void* CancelSpokenNotification(void);
2525+void* CancelSpokenNotificationForProcess(void);
2626+void* CancelTalkingAlert(void);
2727+void* ContinueSpeech(void);
2828+void* CopyAvailableIntervals(void);
2929+void* CopyAvailablePhrases(void);
3030+void* CopyIdentifierStringForVoiceSpec(void);
3131+void* CopyPhonemesFromText(void);
3232+void* CopySpeechProperty(void);
3333+void* CopySpeechSynthesisVoicesForMode(void);
3434+void* CopyTimeAnnouncementsPreferences(void);
3535+void* CountVoices(void);
3636+void* CreateSpeechLanguageLocale(void);
3737+void* DisposeSpeechChannel(void);
3838+void* GetIdentifierStringForPreferredVoiceInListWithLocale(void);
3939+void* GetIdentifierStringForPreferredVoiceWithLocale(void);
4040+void* GetIndVoice(void);
4141+void* GetSpeechInfo(void);
4242+void* GetSpeechPitch(void);
4343+void* GetSpeechRate(void);
4444+void* GetVoiceDescription(void);
4545+void* GetVoiceInfo(void);
4646+void* MakeVoiceSpec(void);
4747+void* MakeVoiceSpecForIdentifierString(void);
4848+void* NewSpeechChannel(void);
4949+void* PauseSpeechAt(void);
5050+void* RegisterSpokenNotificationForProcess(void);
5151+void* RegisterTalkingAlertWithProperties(void);
5252+void* SRSetSecurityFlags(void);
5353+void* SUAddAppPathToLoginStartupList(void);
5454+void* SUCopyAXUIElementExceptionsDictionary(void);
5555+void* SUCopyKeyNamesPropertyList(void);
5656+void* SUCopyPhraseArrayFromDisk(void);
5757+void* SUIsMainBundleUsingEnglishLocalization(void);
5858+void* SUIsProcessUsingEnglishLocalization(void);
5959+void* SUPostKeyCodeWithModifiers(void);
6060+void* SURemoveAppPathFromLoginStartupList(void);
6161+void* SendMessageToSpeechSynthesisServer(void);
6262+void* SetSpeechInfo(void);
6363+void* SetSpeechPitch(void);
6464+void* SetSpeechProperty(void);
6565+void* SetSpeechRate(void);
6666+void* SetTimeAnnouncementsPreferences(void);
6767+void* SpeakBuffer(void);
6868+void* SpeakCFString(void);
6969+void* SpeakString(void);
7070+void* SpeakText(void);
7171+void* SpeechBusy(void);
7272+void* SpeechBusySystemWide(void);
7373+void* SpeechDaemonEnvironment(void);
7474+void* SpeechDaemonSetLogging(void);
7575+void* SpeechDaemonShutdown(void);
7676+void* SpeechManagerVersion(void);
7777+void* SpeechSynthesisConsoleLogCFString(void);
7878+void* SpeechSynthesisConsoleLogTextBuffer(void);
7979+void* SpeechSynthesisRegisterModuleURL(void);
8080+void* SpeechSynthesisUnregisterModuleURL(void);
8181+void* SpokenNotificationsEnabled(void);
8282+void* SpokenNotificationsEnabledForProcess(void);
8383+void* StopSpeech(void);
8484+void* StopSpeechAt(void);
8585+void* TTSIsSpeakingSelection(void);
8686+void* TTSStartSpeakingSelection(void);
8787+void* TTSStopSpeakingSelection(void);
8888+void* TalkingAlertsEnabled(void);
8989+void* TextToPhonemes(void);
9090+void* UseDictionary(void);
9191+void* UseSpeechDictionary(void);
9292+9393+#endif
···99 VERSION "A"
10101111 SOURCES
1212- src/ImageIO.m
1212+ src/CGImageDestination.m
1313+ src/CGImageProperties.m
1414+ src/CGImageSource.m
13151416 DEPENDENCIES
1517 system
1618 objc
1719 Foundation
1820 CoreFoundation
2121+ Onyx2D # Should be independent?
1922)
···11+/* Copyright (c) 2008 Christopher J. W. Lloyd
22+33+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44+55+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
66+77+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
88+99+#include <ImageIO/ImageIOBase.h>
1010+#include <CoreFoundation/CoreFoundation.h>
1111+1212+IMAGEIO_EXTERN const CFStringRef kCGImagePropertyDPIWidth;
1313+IMAGEIO_EXTERN const CFStringRef kCGImagePropertyDPIHeight;
1414+IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPixelHeight;
1515+IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPixelWidth;
1616+IMAGEIO_EXTERN const CFStringRef kCGImagePropertyOrientation;
1717+1818+IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFDictionary;
1919+IMAGEIO_EXTERN const CFStringRef kCGImagePropertyExifDictionary;
2020+2121+IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFXResolution;
2222+IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFYResolution;
2323+IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFOrientation;
+26
src/ImageIO/include/ImageIO/CGImageSource.h
···11+/* Copyright (c) 2008 Christopher J. W. Lloyd
22+33+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44+55+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
66+77+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
88+99+#import <ImageIO/ImageIOBase.h>
1010+#import <CoreFoundation/CFDictionary.h>
1111+#import <CoreFoundation/CFURL.h>
1212+1313+@class O2ImageSource;
1414+typedef O2ImageSource *CGImageSourceRef;
1515+1616+#import <CoreGraphics/CGImage.h>
1717+1818+IMAGEIO_EXTERN CGImageSourceRef CGImageSourceCreateWithData(CFDataRef data, CFDictionaryRef options);
1919+IMAGEIO_EXTERN CGImageSourceRef CGImageSourceCreateWithURL(CFURLRef url, CFDictionaryRef options);
2020+2121+IMAGEIO_EXTERN CFStringRef CGImageSourceGetType(CGImageSourceRef self);
2222+2323+IMAGEIO_EXTERN size_t CGImageSourceGetCount(CGImageSourceRef self);
2424+2525+IMAGEIO_EXTERN CGImageRef CGImageSourceCreateImageAtIndex(CGImageSourceRef self, size_t index, CFDictionaryRef options);
2626+IMAGEIO_EXTERN CFDictionaryRef CGImageSourceCopyPropertiesAtIndex(CGImageSourceRef self, size_t index, CFDictionaryRef options);
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2019 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+2121+#ifndef _ImageIOBase_H_
2222+#define _ImageIOBase_H_
2323+2424+#define IMAGEIO_EXTERN extern
2525+2626+#endif
···11+/* Copyright (c) 2008 Christopher J. W. Lloyd
22+33+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44+55+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
66+77+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
88+99+#include <CoreFoundation/CoreFoundation.h>
1010+1111+const CFStringRef kCGImagePropertyPixelHeight=(CFStringRef)@"PixelHeight";
1212+const CFStringRef kCGImagePropertyOrientation=(CFStringRef)@"Orientation";
1313+1414+const CFStringRef kCGImagePropertyTIFFDictionary=(CFStringRef)@"{TIFF}";
1515+const CFStringRef kCGImagePropertyExifDictionary=(CFStringRef)@"{Exif}";
1616+1717+const CFStringRef kCGImagePropertyTIFFXResolution=(CFStringRef)@"XResolution";
1818+const CFStringRef kCGImagePropertyTIFFYResolution=(CFStringRef)@"YResolution";
1919+const CFStringRef kCGImagePropertyTIFFOrientation=(CFStringRef)@"Orientation";
2020+2121+const CFStringRef kCGImagePropertyDPIHeight = CFSTR("DPIHeight");
2222+const CFStringRef kCGImagePropertyDPIWidth = CFSTR("DPIWidth");
2323+const CFStringRef kCGImagePropertyPixelWidth = CFSTR("PixelWidth");
2424+const CFStringRef kCGImagePropertyPNGDictionary = CFSTR("{PNG}");
2525+const CFStringRef kCGImagePropertyPNGGamma = CFSTR("Gamma");