4 #include "../Sylph/Core/Application.h"
6 int sylph_init(int argc
, char** argv
, sylph_apptype_t app
, char* name
) {
8 if (argv
== 0 || name
== 0) {
15 type
= Sylph::S_APPTYPE_BUNDLE
;
18 type
= Sylph::S_APPTYPE_FHS
;
21 type
= Sylph::S_APPTYPE_MACOS
;
24 type
= Sylph::S_APPTYPE_MACOS_FHS
;
30 Sylph::Application::init(argc
, argv
, 0, type
, name
);
32 } catch (Sylph::Exception ex
) {
33 strncpy(sy_excp
, ex
.what(), 255);
39 int sylph_initm(int argc
, char** argv
, char** apple
, sylph_apptype_t app
,
42 if (argv
== 0 || name
== 0) {
49 type
= Sylph::S_APPTYPE_BUNDLE
;
52 type
= Sylph::S_APPTYPE_FHS
;
55 type
= Sylph::S_APPTYPE_MACOS
;
58 type
= Sylph::S_APPTYPE_MACOS_FHS
;
64 Sylph::Application::init(argc
, argv
, apple
, type
, name
);
65 } catch (Sylph::Exception ex
) {
66 strncpy(sy_excp
, ex
.what(), 255);
72 int sy_bundle(sylph_file_t
* in
) {
78 static Sylph::File f
= thisapp
->bundle();
79 in
->sy_f_loc
= f
.nativeString();
81 } catch (Sylph::Exception ex
) {
82 strncpy(sy_excp
, ex
.what(), 255);
88 int sy_rscdir(sylph_file_t
* in
) {
94 static Sylph::File f
= thisapp
->resourceDir();
95 in
->sy_f_loc
= f
.nativeString();
97 } catch (Sylph::Exception ex
) {
98 strncpy(sy_excp
, ex
.what(), 255);
104 int sy_rsc(sylph_file_t
* in
, const char* fname
) {
106 if (in
== 0 || fname
== 0) {
110 Sylph::File f
= thisapp
->resource(fname
);
111 in
->sy_f_loc
= f
.nativeString();
113 } catch (Sylph::Exception ex
) {
114 strncpy(sy_excp
, ex
.what(), 255);
120 int sy_libdir(sylph_file_t
* in
) {
126 static Sylph::File f
= thisapp
->libraryDir();
127 in
->sy_f_loc
= f
.nativeString();
129 } catch (Sylph::Exception ex
) {
130 strncpy(sy_excp
, ex
.what(), 255);
136 int sy_pldir(sylph_file_t
* in
) {
142 static Sylph::File f
= thisapp
->pluginDir();
143 in
->sy_f_loc
= f
.nativeString();
145 } catch (Sylph::Exception ex
) {
146 strncpy(sy_excp
, ex
.what(), 255);
152 int sy_plddir(sylph_file_t
* in
) {
158 static Sylph::File f
= thisapp
->plugindisabledDir();
159 in
->sy_f_loc
= f
.nativeString();
161 } catch (Sylph::Exception ex
) {
162 strncpy(sy_excp
, ex
.what(), 255);
168 int sy_sys_libdir(sylph_file_t
* in
) {
174 static Sylph::File f
= thisapp
->systemLibraryDir();
175 in
->sy_f_loc
= f
.nativeString();
177 } catch (Sylph::Exception ex
) {
178 strncpy(sy_excp
, ex
.what(), 255);
184 int sy_sys_sts(sylph_file_t
* in
) {
190 static Sylph::File f
= thisapp
->systemSettings();
191 in
->sy_f_loc
= f
.nativeString();
193 } catch (Sylph::Exception ex
) {
194 strncpy(sy_excp
, ex
.what(), 255);
200 int sy_sys_stsdir(sylph_file_t
* in
) {
206 static Sylph::File f
= thisapp
->systemSettingsDir();
207 in
->sy_f_loc
= f
.nativeString();
209 } catch (Sylph::Exception ex
) {
210 strncpy(sy_excp
, ex
.what(), 255);
216 int sy_sys_pldir(sylph_file_t
* in
) {
222 static Sylph::File f
= thisapp
->systemPluginDir();
223 in
->sy_f_loc
= f
.nativeString();
225 } catch (Sylph::Exception ex
) {
226 strncpy(sy_excp
, ex
.what(), 255);
232 int sy_sys_plddir(sylph_file_t
* in
) {
238 static Sylph::File f
= thisapp
->systemPluginDisabledDir();
239 in
->sy_f_loc
= f
.nativeString();
241 } catch (Sylph::Exception ex
) {
242 strncpy(sy_excp
, ex
.what(), 255);
248 int sy_sys_rscdir(sylph_file_t
* in
) {
254 static Sylph::File f
= thisapp
->systemResourceDir();
255 in
->sy_f_loc
= f
.nativeString();
257 } catch (Sylph::Exception ex
) {
258 strncpy(sy_excp
, ex
.what(), 255);
264 int sy_sys_rsc(sylph_file_t
* in
, const char* fname
) {
266 if (in
== 0 || fname
== 0) {
270 Sylph::File f
= thisapp
->systemResource(fname
);
271 in
->sy_f_loc
= f
.nativeString();
273 } catch (Sylph::Exception ex
) {
274 strncpy(sy_excp
, ex
.what(), 255);
280 int sy_usr(sylph_file_t
* in
) {
286 static Sylph::File f
= thisapp
->userHome();
287 in
->sy_f_loc
= f
.nativeString();
289 } catch (Sylph::Exception ex
) {
290 strncpy(sy_excp
, ex
.what(), 255);
296 int sy_usr_libdir(sylph_file_t
* in
) {
302 static Sylph::File f
= thisapp
->userLibraryDir();
303 in
->sy_f_loc
= f
.nativeString();
305 } catch (Sylph::Exception ex
) {
306 strncpy(sy_excp
, ex
.what(), 255);
312 int sy_usr_sts(sylph_file_t
* in
) {
318 static Sylph::File f
= thisapp
->userSettings();
319 in
->sy_f_loc
= f
.nativeString();
321 } catch (Sylph::Exception ex
) {
322 strncpy(sy_excp
, ex
.what(), 255);
328 int sy_usr_stsdir(sylph_file_t
* in
) {
334 static Sylph::File f
= thisapp
->userSettingsDir();
335 in
->sy_f_loc
= f
.nativeString();
337 } catch (Sylph::Exception ex
) {
338 strncpy(sy_excp
, ex
.what(), 255);
344 int sy_usr_pldir(sylph_file_t
* in
) {
350 static Sylph::File f
= thisapp
->userPluginDir();
351 in
->sy_f_loc
= f
.nativeString();
353 } catch (Sylph::Exception ex
) {
354 strncpy(sy_excp
, ex
.what(), 255);
360 int sy_usr_plddir(sylph_file_t
* in
)
366 static Sylph::File f
= thisapp
->userPluginDisabledDir();
367 in
->sy_f_loc
= f
.nativeString();
369 } catch (Sylph::Exception ex
) {
370 strncpy(sy_excp
, ex
.what(), 255);
376 int sy_usr_rscdir(sylph_file_t
* in
) {
382 static Sylph::File f
= thisapp
->userResourceDir();
383 in
->sy_f_loc
= f
.nativeString();
385 } catch (Sylph::Exception ex
) {
386 strncpy(sy_excp
, ex
.what(), 255);
392 int sy_usr_rsc(sylph_file_t
* in
, const char* fname
) {
394 if (in
== 0 || fname
== 0) {
398 Sylph::File f
= thisapp
->systemResource(fname
);
399 in
->sy_f_loc
= f
.nativeString();
401 } catch (Sylph::Exception ex
) {
402 strncpy(sy_excp
, ex
.what(), 255);
408 int sy_prefix(sylph_file_t
* in
) {
414 static Sylph::File f
= thisapp
->prefix();
415 in
->sy_f_loc
= f
.nativeString();
417 } catch (Sylph::Exception ex
) {
418 strncpy(sy_excp
, ex
.what(), 255);
424 const char* sy_cppexp() {