Skip to content

Commit 1cc482f

Browse files
committed
initial commit
0 parents  commit 1cc482f

File tree

7 files changed

+639
-0
lines changed

7 files changed

+639
-0
lines changed

.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Xcode
2+
#
3+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4+
5+
## Build generated
6+
build/
7+
DerivedData/
8+
9+
## Various settings
10+
*.pbxuser
11+
!default.pbxuser
12+
*.mode1v3
13+
!default.mode1v3
14+
*.mode2v3
15+
!default.mode2v3
16+
*.perspectivev3
17+
!default.perspectivev3
18+
xcuserdata/
19+
20+
## Other
21+
*.moved-aside
22+
*.xccheckout
23+
*.xcscmblueprint

ql-swift.xcodeproj/project.pbxproj

+284
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,284 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
F38DB20C1F3C546300896C80 /* GenerateThumbnailForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = F38DB20B1F3C546300896C80 /* GenerateThumbnailForURL.m */; };
11+
F38DB20E1F3C546300896C80 /* GeneratePreviewForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = F38DB20D1F3C546300896C80 /* GeneratePreviewForURL.m */; };
12+
F38DB2101F3C546300896C80 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = F38DB20F1F3C546300896C80 /* main.c */; };
13+
/* End PBXBuildFile section */
14+
15+
/* Begin PBXFileReference section */
16+
F38DB2081F3C546300896C80 /* ql-swift.qlgenerator */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ql-swift.qlgenerator"; sourceTree = BUILT_PRODUCTS_DIR; };
17+
F38DB20B1F3C546300896C80 /* GenerateThumbnailForURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GenerateThumbnailForURL.m; sourceTree = "<group>"; };
18+
F38DB20D1F3C546300896C80 /* GeneratePreviewForURL.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GeneratePreviewForURL.m; sourceTree = "<group>"; };
19+
F38DB20F1F3C546300896C80 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
20+
F38DB2111F3C546300896C80 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
21+
/* End PBXFileReference section */
22+
23+
/* Begin PBXFrameworksBuildPhase section */
24+
F38DB2041F3C546300896C80 /* Frameworks */ = {
25+
isa = PBXFrameworksBuildPhase;
26+
buildActionMask = 2147483647;
27+
files = (
28+
);
29+
runOnlyForDeploymentPostprocessing = 0;
30+
};
31+
/* End PBXFrameworksBuildPhase section */
32+
33+
/* Begin PBXGroup section */
34+
F38DB1FE1F3C546300896C80 = {
35+
isa = PBXGroup;
36+
children = (
37+
F38DB20A1F3C546300896C80 /* ql-swift */,
38+
F38DB2091F3C546300896C80 /* Products */,
39+
);
40+
sourceTree = "<group>";
41+
};
42+
F38DB2091F3C546300896C80 /* Products */ = {
43+
isa = PBXGroup;
44+
children = (
45+
F38DB2081F3C546300896C80 /* ql-swift.qlgenerator */,
46+
);
47+
name = Products;
48+
sourceTree = "<group>";
49+
};
50+
F38DB20A1F3C546300896C80 /* ql-swift */ = {
51+
isa = PBXGroup;
52+
children = (
53+
F38DB20B1F3C546300896C80 /* GenerateThumbnailForURL.m */,
54+
F38DB20D1F3C546300896C80 /* GeneratePreviewForURL.m */,
55+
F38DB20F1F3C546300896C80 /* main.c */,
56+
F38DB2111F3C546300896C80 /* Info.plist */,
57+
);
58+
path = "ql-swift";
59+
sourceTree = "<group>";
60+
};
61+
/* End PBXGroup section */
62+
63+
/* Begin PBXHeadersBuildPhase section */
64+
F38DB2051F3C546300896C80 /* Headers */ = {
65+
isa = PBXHeadersBuildPhase;
66+
buildActionMask = 2147483647;
67+
files = (
68+
);
69+
runOnlyForDeploymentPostprocessing = 0;
70+
};
71+
/* End PBXHeadersBuildPhase section */
72+
73+
/* Begin PBXNativeTarget section */
74+
F38DB2071F3C546300896C80 /* ql-swift */ = {
75+
isa = PBXNativeTarget;
76+
buildConfigurationList = F38DB2141F3C546300896C80 /* Build configuration list for PBXNativeTarget "ql-swift" */;
77+
buildPhases = (
78+
F38DB2031F3C546300896C80 /* Sources */,
79+
F38DB2041F3C546300896C80 /* Frameworks */,
80+
F38DB2051F3C546300896C80 /* Headers */,
81+
F38DB2061F3C546300896C80 /* Resources */,
82+
);
83+
buildRules = (
84+
);
85+
dependencies = (
86+
);
87+
name = "ql-swift";
88+
productName = "ql-swift";
89+
productReference = F38DB2081F3C546300896C80 /* ql-swift.qlgenerator */;
90+
productType = "com.apple.product-type.bundle";
91+
};
92+
/* End PBXNativeTarget section */
93+
94+
/* Begin PBXProject section */
95+
F38DB1FF1F3C546300896C80 /* Project object */ = {
96+
isa = PBXProject;
97+
attributes = {
98+
LastUpgradeCheck = 0830;
99+
ORGANIZATIONNAME = tsif;
100+
TargetAttributes = {
101+
F38DB2071F3C546300896C80 = {
102+
CreatedOnToolsVersion = 8.3.2;
103+
ProvisioningStyle = Automatic;
104+
};
105+
};
106+
};
107+
buildConfigurationList = F38DB2021F3C546300896C80 /* Build configuration list for PBXProject "ql-swift" */;
108+
compatibilityVersion = "Xcode 3.2";
109+
developmentRegion = English;
110+
hasScannedForEncodings = 0;
111+
knownRegions = (
112+
en,
113+
);
114+
mainGroup = F38DB1FE1F3C546300896C80;
115+
productRefGroup = F38DB2091F3C546300896C80 /* Products */;
116+
projectDirPath = "";
117+
projectRoot = "";
118+
targets = (
119+
F38DB2071F3C546300896C80 /* ql-swift */,
120+
);
121+
};
122+
/* End PBXProject section */
123+
124+
/* Begin PBXResourcesBuildPhase section */
125+
F38DB2061F3C546300896C80 /* Resources */ = {
126+
isa = PBXResourcesBuildPhase;
127+
buildActionMask = 2147483647;
128+
files = (
129+
);
130+
runOnlyForDeploymentPostprocessing = 0;
131+
};
132+
/* End PBXResourcesBuildPhase section */
133+
134+
/* Begin PBXSourcesBuildPhase section */
135+
F38DB2031F3C546300896C80 /* Sources */ = {
136+
isa = PBXSourcesBuildPhase;
137+
buildActionMask = 2147483647;
138+
files = (
139+
F38DB20C1F3C546300896C80 /* GenerateThumbnailForURL.m in Sources */,
140+
F38DB20E1F3C546300896C80 /* GeneratePreviewForURL.m in Sources */,
141+
F38DB2101F3C546300896C80 /* main.c in Sources */,
142+
);
143+
runOnlyForDeploymentPostprocessing = 0;
144+
};
145+
/* End PBXSourcesBuildPhase section */
146+
147+
/* Begin XCBuildConfiguration section */
148+
F38DB2121F3C546300896C80 /* Debug */ = {
149+
isa = XCBuildConfiguration;
150+
buildSettings = {
151+
ALWAYS_SEARCH_USER_PATHS = NO;
152+
CLANG_ANALYZER_NONNULL = YES;
153+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
154+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
155+
CLANG_CXX_LIBRARY = "libc++";
156+
CLANG_ENABLE_MODULES = YES;
157+
CLANG_ENABLE_OBJC_ARC = YES;
158+
CLANG_WARN_BOOL_CONVERSION = YES;
159+
CLANG_WARN_CONSTANT_CONVERSION = YES;
160+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
161+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
162+
CLANG_WARN_EMPTY_BODY = YES;
163+
CLANG_WARN_ENUM_CONVERSION = YES;
164+
CLANG_WARN_INFINITE_RECURSION = YES;
165+
CLANG_WARN_INT_CONVERSION = YES;
166+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
167+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
168+
CLANG_WARN_UNREACHABLE_CODE = YES;
169+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
170+
CODE_SIGN_IDENTITY = "-";
171+
COPY_PHASE_STRIP = NO;
172+
DEBUG_INFORMATION_FORMAT = dwarf;
173+
ENABLE_STRICT_OBJC_MSGSEND = YES;
174+
ENABLE_TESTABILITY = YES;
175+
GCC_C_LANGUAGE_STANDARD = gnu99;
176+
GCC_DYNAMIC_NO_PIC = NO;
177+
GCC_NO_COMMON_BLOCKS = YES;
178+
GCC_OPTIMIZATION_LEVEL = 0;
179+
GCC_PREPROCESSOR_DEFINITIONS = (
180+
"DEBUG=1",
181+
"$(inherited)",
182+
);
183+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
184+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
185+
GCC_WARN_UNDECLARED_SELECTOR = YES;
186+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
187+
GCC_WARN_UNUSED_FUNCTION = YES;
188+
GCC_WARN_UNUSED_VARIABLE = YES;
189+
MACOSX_DEPLOYMENT_TARGET = 10.12;
190+
MTL_ENABLE_DEBUG_INFO = YES;
191+
ONLY_ACTIVE_ARCH = YES;
192+
SDKROOT = macosx;
193+
};
194+
name = Debug;
195+
};
196+
F38DB2131F3C546300896C80 /* Release */ = {
197+
isa = XCBuildConfiguration;
198+
buildSettings = {
199+
ALWAYS_SEARCH_USER_PATHS = NO;
200+
CLANG_ANALYZER_NONNULL = YES;
201+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
202+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
203+
CLANG_CXX_LIBRARY = "libc++";
204+
CLANG_ENABLE_MODULES = YES;
205+
CLANG_ENABLE_OBJC_ARC = YES;
206+
CLANG_WARN_BOOL_CONVERSION = YES;
207+
CLANG_WARN_CONSTANT_CONVERSION = YES;
208+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
209+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
210+
CLANG_WARN_EMPTY_BODY = YES;
211+
CLANG_WARN_ENUM_CONVERSION = YES;
212+
CLANG_WARN_INFINITE_RECURSION = YES;
213+
CLANG_WARN_INT_CONVERSION = YES;
214+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
215+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
216+
CLANG_WARN_UNREACHABLE_CODE = YES;
217+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
218+
CODE_SIGN_IDENTITY = "-";
219+
COPY_PHASE_STRIP = NO;
220+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
221+
ENABLE_NS_ASSERTIONS = NO;
222+
ENABLE_STRICT_OBJC_MSGSEND = YES;
223+
GCC_C_LANGUAGE_STANDARD = gnu99;
224+
GCC_NO_COMMON_BLOCKS = YES;
225+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
226+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
227+
GCC_WARN_UNDECLARED_SELECTOR = YES;
228+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
229+
GCC_WARN_UNUSED_FUNCTION = YES;
230+
GCC_WARN_UNUSED_VARIABLE = YES;
231+
MACOSX_DEPLOYMENT_TARGET = 10.12;
232+
MTL_ENABLE_DEBUG_INFO = NO;
233+
SDKROOT = macosx;
234+
};
235+
name = Release;
236+
};
237+
F38DB2151F3C546300896C80 /* Debug */ = {
238+
isa = XCBuildConfiguration;
239+
buildSettings = {
240+
COMBINE_HIDPI_IMAGES = YES;
241+
INFOPLIST_FILE = "ql-swift/Info.plist";
242+
INSTALL_PATH = /Library/QuickLook;
243+
PRODUCT_BUNDLE_IDENTIFIER = "tsif.ql-swift";
244+
PRODUCT_NAME = "$(TARGET_NAME)";
245+
WRAPPER_EXTENSION = qlgenerator;
246+
};
247+
name = Debug;
248+
};
249+
F38DB2161F3C546300896C80 /* Release */ = {
250+
isa = XCBuildConfiguration;
251+
buildSettings = {
252+
COMBINE_HIDPI_IMAGES = YES;
253+
INFOPLIST_FILE = "ql-swift/Info.plist";
254+
INSTALL_PATH = /Library/QuickLook;
255+
PRODUCT_BUNDLE_IDENTIFIER = "tsif.ql-swift";
256+
PRODUCT_NAME = "$(TARGET_NAME)";
257+
WRAPPER_EXTENSION = qlgenerator;
258+
};
259+
name = Release;
260+
};
261+
/* End XCBuildConfiguration section */
262+
263+
/* Begin XCConfigurationList section */
264+
F38DB2021F3C546300896C80 /* Build configuration list for PBXProject "ql-swift" */ = {
265+
isa = XCConfigurationList;
266+
buildConfigurations = (
267+
F38DB2121F3C546300896C80 /* Debug */,
268+
F38DB2131F3C546300896C80 /* Release */,
269+
);
270+
defaultConfigurationIsVisible = 0;
271+
defaultConfigurationName = Release;
272+
};
273+
F38DB2141F3C546300896C80 /* Build configuration list for PBXNativeTarget "ql-swift" */ = {
274+
isa = XCConfigurationList;
275+
buildConfigurations = (
276+
F38DB2151F3C546300896C80 /* Debug */,
277+
F38DB2161F3C546300896C80 /* Release */,
278+
);
279+
defaultConfigurationIsVisible = 0;
280+
};
281+
/* End XCConfigurationList section */
282+
};
283+
rootObject = F38DB1FF1F3C546300896C80 /* Project object */;
284+
}

ql-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ql-swift/GeneratePreviewForURL.m

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include <CoreFoundation/CoreFoundation.h>
2+
#include <CoreServices/CoreServices.h>
3+
#include <QuickLook/QuickLook.h>
4+
5+
OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options);
6+
void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview);
7+
8+
/* -----------------------------------------------------------------------------
9+
Generate a preview for file
10+
11+
This function's job is to create preview for designated file
12+
----------------------------------------------------------------------------- */
13+
14+
OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options)
15+
{
16+
// To complete your generator please implement the function GeneratePreviewForURL in GeneratePreviewForURL.c
17+
return noErr;
18+
}
19+
20+
void CancelPreviewGeneration(void *thisInterface, QLPreviewRequestRef preview)
21+
{
22+
// Implement only if supported
23+
}

ql-swift/GenerateThumbnailForURL.m

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include <CoreFoundation/CoreFoundation.h>
2+
#include <CoreServices/CoreServices.h>
3+
#include <QuickLook/QuickLook.h>
4+
5+
OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize);
6+
void CancelThumbnailGeneration(void *thisInterface, QLThumbnailRequestRef thumbnail);
7+
8+
/* -----------------------------------------------------------------------------
9+
Generate a thumbnail for file
10+
11+
This function's job is to create thumbnail for designated file as fast as possible
12+
----------------------------------------------------------------------------- */
13+
14+
OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize)
15+
{
16+
// To complete your generator please implement the function GenerateThumbnailForURL in GenerateThumbnailForURL.c
17+
return noErr;
18+
}
19+
20+
void CancelThumbnailGeneration(void *thisInterface, QLThumbnailRequestRef thumbnail)
21+
{
22+
// Implement only if supported
23+
}

0 commit comments

Comments
 (0)