/ src / frameworks / Carbon / OpenScripting / src / OpenScripting.m
OpenScripting.m
  1  /*
  2   This file is part of Darling.
  3  
  4   Copyright (C) 2021 Lubos Dolezel
  5  
  6   Darling is free software: you can redistribute it and/or modify
  7   it under the terms of the GNU General Public License as published by
  8   the Free Software Foundation, either version 3 of the License, or
  9   (at your option) any later version.
 10  
 11   Darling is distributed in the hope that it will be useful,
 12   but WITHOUT ANY WARRANTY; without even the implied warranty of
 13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 14   GNU General Public License for more details.
 15  
 16   You should have received a copy of the GNU General Public License
 17   along with Darling.  If not, see <http://www.gnu.org/licenses/>.
 18  */
 19  
 20  
 21  #include <OpenScripting/OpenScripting.h>
 22  #include <stdlib.h>
 23  #include <stdio.h>
 24  
 25  static int verbose = 0;
 26  
 27  __attribute__((constructor))
 28  static void initme(void) {
 29      verbose = getenv("STUB_VERBOSE") != NULL;
 30  }
 31  
 32  void* ASCopySourceAttributes(void)
 33  {
 34      if (verbose) puts("STUB: ASCopySourceAttributes called");
 35      return NULL;
 36  }
 37  
 38  void* ASGetSourceStyleNames(void)
 39  {
 40      if (verbose) puts("STUB: ASGetSourceStyleNames called");
 41      return NULL;
 42  }
 43  
 44  void* ASGetSourceStyles(void)
 45  {
 46      if (verbose) puts("STUB: ASGetSourceStyles called");
 47      return NULL;
 48  }
 49  
 50  void* ASInit(void)
 51  {
 52      if (verbose) puts("STUB: ASInit called");
 53      return NULL;
 54  }
 55  
 56  void* ASSetSourceAttributes(void)
 57  {
 58      if (verbose) puts("STUB: ASSetSourceAttributes called");
 59      return NULL;
 60  }
 61  
 62  void* ASSetSourceStyles(void)
 63  {
 64      if (verbose) puts("STUB: ASSetSourceStyles called");
 65      return NULL;
 66  }
 67  
 68  void* OSAAddStorageType(void)
 69  {
 70      if (verbose) puts("STUB: OSAAddStorageType called");
 71      return NULL;
 72  }
 73  
 74  void* OSAAuthorizeEvent(void)
 75  {
 76      if (verbose) puts("STUB: OSAAuthorizeEvent called");
 77      return NULL;
 78  }
 79  
 80  void* OSAAvailableDialectCodeList(void)
 81  {
 82      if (verbose) puts("STUB: OSAAvailableDialectCodeList called");
 83      return NULL;
 84  }
 85  
 86  void* OSAAvailableDialects(void)
 87  {
 88      if (verbose) puts("STUB: OSAAvailableDialects called");
 89      return NULL;
 90  }
 91  
 92  void* OSACoerceFromDesc(void)
 93  {
 94      if (verbose) puts("STUB: OSACoerceFromDesc called");
 95      return NULL;
 96  }
 97  
 98  void* OSACoerceToDesc(void)
 99  {
100      if (verbose) puts("STUB: OSACoerceToDesc called");
101      return NULL;
102  }
103  
104  void* OSACompile(void)
105  {
106      if (verbose) puts("STUB: OSACompile called");
107      return NULL;
108  }
109  
110  void* OSACompileExecute(void)
111  {
112      if (verbose) puts("STUB: OSACompileExecute called");
113      return NULL;
114  }
115  
116  void* OSACopyDisplayString(void)
117  {
118      if (verbose) puts("STUB: OSACopyDisplayString called");
119      return NULL;
120  }
121  
122  void* OSACopyID(void)
123  {
124      if (verbose) puts("STUB: OSACopyID called");
125      return NULL;
126  }
127  
128  void* OSACopyScript(void)
129  {
130      if (verbose) puts("STUB: OSACopyScript called");
131      return NULL;
132  }
133  
134  void* OSACopyScriptingDefinition(void)
135  {
136      if (verbose) puts("STUB: OSACopyScriptingDefinition called");
137      return NULL;
138  }
139  
140  void* OSACopyScriptingDefinitionFromFile(void)
141  {
142      if (verbose) puts("STUB: OSACopyScriptingDefinitionFromFile called");
143      return NULL;
144  }
145  
146  void* OSACopyScriptingDefinitionFromURL(void)
147  {
148      if (verbose) puts("STUB: OSACopyScriptingDefinitionFromURL called");
149      return NULL;
150  }
151  
152  void* OSACopySourceString(void)
153  {
154      if (verbose) puts("STUB: OSACopySourceString called");
155      return NULL;
156  }
157  
158  void* OSACopyURLForLibraryInDomainURL(void)
159  {
160      if (verbose) puts("STUB: OSACopyURLForLibraryInDomainURL called");
161      return NULL;
162  }
163  
164  void* OSACopyURLForLibraryInFolderURL(void)
165  {
166      if (verbose) puts("STUB: OSACopyURLForLibraryInFolderURL called");
167      return NULL;
168  }
169  
170  void* OSACopyURLForLibraryInScriptURL(void)
171  {
172      if (verbose) puts("STUB: OSACopyURLForLibraryInScriptURL called");
173      return NULL;
174  }
175  
176  void* OSACopyURLForLibraryName(void)
177  {
178      if (verbose) puts("STUB: OSACopyURLForLibraryName called");
179      return NULL;
180  }
181  
182  void* OSACreateFile(void)
183  {
184      if (verbose) puts("STUB: OSACreateFile called");
185      return NULL;
186  }
187  
188  void* OSADebuggerCreateSession(void)
189  {
190      if (verbose) puts("STUB: OSADebuggerCreateSession called");
191      return NULL;
192  }
193  
194  void* OSADebuggerDisposeCallFrame(void)
195  {
196      if (verbose) puts("STUB: OSADebuggerDisposeCallFrame called");
197      return NULL;
198  }
199  
200  void* OSADebuggerDisposeSession(void)
201  {
202      if (verbose) puts("STUB: OSADebuggerDisposeSession called");
203      return NULL;
204  }
205  
206  void* OSADebuggerGetBreakpoint(void)
207  {
208      if (verbose) puts("STUB: OSADebuggerGetBreakpoint called");
209      return NULL;
210  }
211  
212  void* OSADebuggerGetCallFrameState(void)
213  {
214      if (verbose) puts("STUB: OSADebuggerGetCallFrameState called");
215      return NULL;
216  }
217  
218  void* OSADebuggerGetCurrentCallFrame(void)
219  {
220      if (verbose) puts("STUB: OSADebuggerGetCurrentCallFrame called");
221      return NULL;
222  }
223  
224  void* OSADebuggerGetDefaultBreakpoint(void)
225  {
226      if (verbose) puts("STUB: OSADebuggerGetDefaultBreakpoint called");
227      return NULL;
228  }
229  
230  void* OSADebuggerGetPreviousCallFrame(void)
231  {
232      if (verbose) puts("STUB: OSADebuggerGetPreviousCallFrame called");
233      return NULL;
234  }
235  
236  void* OSADebuggerGetSessionState(void)
237  {
238      if (verbose) puts("STUB: OSADebuggerGetSessionState called");
239      return NULL;
240  }
241  
242  void* OSADebuggerGetStatementRanges(void)
243  {
244      if (verbose) puts("STUB: OSADebuggerGetStatementRanges called");
245      return NULL;
246  }
247  
248  void* OSADebuggerGetVariable(void)
249  {
250      if (verbose) puts("STUB: OSADebuggerGetVariable called");
251      return NULL;
252  }
253  
254  void* OSADebuggerSessionStep(void)
255  {
256      if (verbose) puts("STUB: OSADebuggerSessionStep called");
257      return NULL;
258  }
259  
260  void* OSADebuggerSetBreakpoint(void)
261  {
262      if (verbose) puts("STUB: OSADebuggerSetBreakpoint called");
263      return NULL;
264  }
265  
266  void* OSADebuggerSetVariable(void)
267  {
268      if (verbose) puts("STUB: OSADebuggerSetVariable called");
269      return NULL;
270  }
271  
272  void* OSADisplay(void)
273  {
274      if (verbose) puts("STUB: OSADisplay called");
275      return NULL;
276  }
277  
278  void* OSADispose(void)
279  {
280      if (verbose) puts("STUB: OSADispose called");
281      return NULL;
282  }
283  
284  void* OSADoEvent(void)
285  {
286      if (verbose) puts("STUB: OSADoEvent called");
287      return NULL;
288  }
289  
290  void* OSADoScript(void)
291  {
292      if (verbose) puts("STUB: OSADoScript called");
293      return NULL;
294  }
295  
296  void* OSADoScriptFile(void)
297  {
298      if (verbose) puts("STUB: OSADoScriptFile called");
299      return NULL;
300  }
301  
302  void* OSAExecute(void)
303  {
304      if (verbose) puts("STUB: OSAExecute called");
305      return NULL;
306  }
307  
308  void* OSAExecuteEvent(void)
309  {
310      if (verbose) puts("STUB: OSAExecuteEvent called");
311      return NULL;
312  }
313  
314  void* OSAFindEventHandler(void)
315  {
316      if (verbose) puts("STUB: OSAFindEventHandler called");
317      return NULL;
318  }
319  
320  void* OSAGenericToRealID(void)
321  {
322      if (verbose) puts("STUB: OSAGenericToRealID called");
323      return NULL;
324  }
325  
326  void* OSAGetActiveProc(void)
327  {
328      if (verbose) puts("STUB: OSAGetActiveProc called");
329      return NULL;
330  }
331  
332  void* OSAGetCreateProc(void)
333  {
334      if (verbose) puts("STUB: OSAGetCreateProc called");
335      return NULL;
336  }
337  
338  void* OSAGetCreateProgressProc(void)
339  {
340      if (verbose) puts("STUB: OSAGetCreateProgressProc called");
341      return NULL;
342  }
343  
344  void* OSAGetCurrentDialect(void)
345  {
346      if (verbose) puts("STUB: OSAGetCurrentDialect called");
347      return NULL;
348  }
349  
350  void* OSAGetDefaultScriptingComponent(void)
351  {
352      if (verbose) puts("STUB: OSAGetDefaultScriptingComponent called");
353      return NULL;
354  }
355  
356  void* OSAGetDialectInfo(void)
357  {
358      if (verbose) puts("STUB: OSAGetDialectInfo called");
359      return NULL;
360  }
361  
362  void* OSAGetEventHandler(void)
363  {
364      if (verbose) puts("STUB: OSAGetEventHandler called");
365      return NULL;
366  }
367  
368  void* OSAGetHandler(void)
369  {
370      if (verbose) puts("STUB: OSAGetHandler called");
371      return NULL;
372  }
373  
374  void* OSAGetHandlerNames(void)
375  {
376      if (verbose) puts("STUB: OSAGetHandlerNames called");
377      return NULL;
378  }
379  
380  void* OSAGetProperty(void)
381  {
382      if (verbose) puts("STUB: OSAGetProperty called");
383      return NULL;
384  }
385  
386  void* OSAGetPropertyNames(void)
387  {
388      if (verbose) puts("STUB: OSAGetPropertyNames called");
389      return NULL;
390  }
391  
392  void* OSAGetReleaseProgressProc(void)
393  {
394      if (verbose) puts("STUB: OSAGetReleaseProgressProc called");
395      return NULL;
396  }
397  
398  void* OSAGetResumeDispatchProc(void)
399  {
400      if (verbose) puts("STUB: OSAGetResumeDispatchProc called");
401      return NULL;
402  }
403  
404  void* OSAGetScriptDataFromURL(void)
405  {
406      if (verbose) puts("STUB: OSAGetScriptDataFromURL called");
407      return NULL;
408  }
409  
410  void* OSAGetScriptInfo(void)
411  {
412      if (verbose) puts("STUB: OSAGetScriptInfo called");
413      return NULL;
414  }
415  
416  void* OSAGetScriptingComponent(void)
417  {
418      if (verbose) puts("STUB: OSAGetScriptingComponent called");
419      return NULL;
420  }
421  
422  void* OSAGetScriptingComponentFromStored(void)
423  {
424      if (verbose) puts("STUB: OSAGetScriptingComponentFromStored called");
425      return NULL;
426  }
427  
428  void* OSAGetSendProc(void)
429  {
430      if (verbose) puts("STUB: OSAGetSendProc called");
431      return NULL;
432  }
433  
434  void* OSAGetSource(void)
435  {
436      if (verbose) puts("STUB: OSAGetSource called");
437      return NULL;
438  }
439  
440  void* OSAGetStorageType(void)
441  {
442      if (verbose) puts("STUB: OSAGetStorageType called");
443      return NULL;
444  }
445  
446  void* OSAGetSysTerminology(void)
447  {
448      if (verbose) puts("STUB: OSAGetSysTerminology called");
449      return NULL;
450  }
451  
452  void* OSAInstallEventHandler(void)
453  {
454      if (verbose) puts("STUB: OSAInstallEventHandler called");
455      return NULL;
456  }
457  
458  void* OSAInstallGestaltValues(void)
459  {
460      if (verbose) puts("STUB: OSAInstallGestaltValues called");
461      return NULL;
462  }
463  
464  void* OSAInstallScriptingDescCoercions(void)
465  {
466      if (verbose) puts("STUB: OSAInstallScriptingDescCoercions called");
467      return NULL;
468  }
469  
470  void* OSAInstallScriptingEventHandlers(void)
471  {
472      if (verbose) puts("STUB: OSAInstallScriptingEventHandlers called");
473      return NULL;
474  }
475  
476  void* OSAInstallStdDescCoercions(void)
477  {
478      if (verbose) puts("STUB: OSAInstallStdDescCoercions called");
479      return NULL;
480  }
481  
482  void* OSAInstallStdEventHandlers(void)
483  {
484      if (verbose) puts("STUB: OSAInstallStdEventHandlers called");
485      return NULL;
486  }
487  
488  void* OSAInstallStdPtrCoercions(void)
489  {
490      if (verbose) puts("STUB: OSAInstallStdPtrCoercions called");
491      return NULL;
492  }
493  
494  void* OSAInstallUnitPtrCoercions(void)
495  {
496      if (verbose) puts("STUB: OSAInstallUnitPtrCoercions called");
497      return NULL;
498  }
499  
500  void* OSAIsEventAuthorizationRequested(void)
501  {
502      if (verbose) puts("STUB: OSAIsEventAuthorizationRequested called");
503      return NULL;
504  }
505  
506  void* OSAIsEventAuthorized(void)
507  {
508      if (verbose) puts("STUB: OSAIsEventAuthorized called");
509      return NULL;
510  }
511  
512  void* OSAIsScriptableBundle(void)
513  {
514      if (verbose) puts("STUB: OSAIsScriptableBundle called");
515      return NULL;
516  }
517  
518  void* OSAIsScriptableRef(void)
519  {
520      if (verbose) puts("STUB: OSAIsScriptableRef called");
521      return NULL;
522  }
523  
524  void* OSAIsScriptableURL(void)
525  {
526      if (verbose) puts("STUB: OSAIsScriptableURL called");
527      return NULL;
528  }
529  
530  void* OSALoad(void)
531  {
532      if (verbose) puts("STUB: OSALoad called");
533      return NULL;
534  }
535  
536  void* OSALoadExecute(void)
537  {
538      if (verbose) puts("STUB: OSALoadExecute called");
539      return NULL;
540  }
541  
542  void* OSALoadExecuteFile(void)
543  {
544      if (verbose) puts("STUB: OSALoadExecuteFile called");
545      return NULL;
546  }
547  
548  void* OSALoadFile(void)
549  {
550      if (verbose) puts("STUB: OSALoadFile called");
551      return NULL;
552  }
553  
554  void* OSALoadScriptData(void)
555  {
556      if (verbose) puts("STUB: OSALoadScriptData called");
557      return NULL;
558  }
559  
560  void* OSALoadScriptDataFromFile(void)
561  {
562      if (verbose) puts("STUB: OSALoadScriptDataFromFile called");
563      return NULL;
564  }
565  
566  void* OSAMakeContext(void)
567  {
568      if (verbose) puts("STUB: OSAMakeContext called");
569      return NULL;
570  }
571  
572  void* OSARealToGenericID(void)
573  {
574      if (verbose) puts("STUB: OSARealToGenericID called");
575      return NULL;
576  }
577  
578  void* OSARecordEvent(void)
579  {
580      if (verbose) puts("STUB: OSARecordEvent called");
581      return NULL;
582  }
583  
584  void* OSARemoveEventHandler(void)
585  {
586      if (verbose) puts("STUB: OSARemoveEventHandler called");
587      return NULL;
588  }
589  
590  void* OSARemoveStorageType(void)
591  {
592      if (verbose) puts("STUB: OSARemoveStorageType called");
593      return NULL;
594  }
595  
596  void* OSARequestEventAuthorization(void)
597  {
598      if (verbose) puts("STUB: OSARequestEventAuthorization called");
599      return NULL;
600  }
601  
602  void* OSAScriptError(void)
603  {
604      if (verbose) puts("STUB: OSAScriptError called");
605      return NULL;
606  }
607  
608  void* OSAScriptingComponentName(void)
609  {
610      if (verbose) puts("STUB: OSAScriptingComponentName called");
611      return NULL;
612  }
613  
614  void* OSASetActiveProc(void)
615  {
616      if (verbose) puts("STUB: OSASetActiveProc called");
617      return NULL;
618  }
619  
620  void* OSASetCreateProc(void)
621  {
622      if (verbose) puts("STUB: OSASetCreateProc called");
623      return NULL;
624  }
625  
626  void* OSASetCreateProgressProc(void)
627  {
628      if (verbose) puts("STUB: OSASetCreateProgressProc called");
629      return NULL;
630  }
631  
632  void* OSASetCurrentDialect(void)
633  {
634      if (verbose) puts("STUB: OSASetCurrentDialect called");
635      return NULL;
636  }
637  
638  void* OSASetDefaultScriptingComponent(void)
639  {
640      if (verbose) puts("STUB: OSASetDefaultScriptingComponent called");
641      return NULL;
642  }
643  
644  void* OSASetDefaultTarget(void)
645  {
646      if (verbose) puts("STUB: OSASetDefaultTarget called");
647      return NULL;
648  }
649  
650  void* OSASetHandler(void)
651  {
652      if (verbose) puts("STUB: OSASetHandler called");
653      return NULL;
654  }
655  
656  void* OSASetProperty(void)
657  {
658      if (verbose) puts("STUB: OSASetProperty called");
659      return NULL;
660  }
661  
662  void* OSASetReleaseProgressProc(void)
663  {
664      if (verbose) puts("STUB: OSASetReleaseProgressProc called");
665      return NULL;
666  }
667  
668  void* OSASetResumeDispatchProc(void)
669  {
670      if (verbose) puts("STUB: OSASetResumeDispatchProc called");
671      return NULL;
672  }
673  
674  void* OSASetScriptInfo(void)
675  {
676      if (verbose) puts("STUB: OSASetScriptInfo called");
677      return NULL;
678  }
679  
680  void* OSASetSendProc(void)
681  {
682      if (verbose) puts("STUB: OSASetSendProc called");
683      return NULL;
684  }
685  
686  void* OSAStartRecording(void)
687  {
688      if (verbose) puts("STUB: OSAStartRecording called");
689      return NULL;
690  }
691  
692  void* OSAStopRecording(void)
693  {
694      if (verbose) puts("STUB: OSAStopRecording called");
695      return NULL;
696  }
697  
698  void* OSAStore(void)
699  {
700      if (verbose) puts("STUB: OSAStore called");
701      return NULL;
702  }
703  
704  void* OSAStoreFile(void)
705  {
706      if (verbose) puts("STUB: OSAStoreFile called");
707      return NULL;
708  }
709  
710  void* OSAStoreScriptDataToFile(void)
711  {
712      if (verbose) puts("STUB: OSAStoreScriptDataToFile called");
713      return NULL;
714  }
715  
716  void* OSAStoreScriptDataToNewFile(void)
717  {
718      if (verbose) puts("STUB: OSAStoreScriptDataToNewFile called");
719      return NULL;
720  }
721  
722  void* _HandleGDUT(void)
723  {
724      if (verbose) puts("STUB: _HandleGDUT called");
725      return NULL;
726  }
727  
728  void* _OSACopyDisplayString(void)
729  {
730      if (verbose) puts("STUB: _OSACopyDisplayString called");
731      return NULL;
732  }
733  
734  void* _OSACopyScriptingDefinitionFromFile(void)
735  {
736      if (verbose) puts("STUB: _OSACopyScriptingDefinitionFromFile called");
737      return NULL;
738  }
739  
740  void* _OSACopySourceString(void)
741  {
742      if (verbose) puts("STUB: _OSACopySourceString called");
743      return NULL;
744  }
745  
746  void* _OSACreateURL(void)
747  {
748      if (verbose) puts("STUB: _OSACreateURL called");
749      return NULL;
750  }
751  
752  void* _OSADoScriptURL(void)
753  {
754      if (verbose) puts("STUB: _OSADoScriptURL called");
755      return NULL;
756  }
757  
758  void* _OSALoadExecuteURL(void)
759  {
760      if (verbose) puts("STUB: _OSALoadExecuteURL called");
761      return NULL;
762  }
763  
764  void* _OSALoadURL(void)
765  {
766      if (verbose) puts("STUB: _OSALoadURL called");
767      return NULL;
768  }
769  
770  void* _OSAStoreScriptDataToURL(void)
771  {
772      if (verbose) puts("STUB: _OSAStoreScriptDataToURL called");
773      return NULL;
774  }
775  
776  void* _OSAStoreURL(void)
777  {
778      if (verbose) puts("STUB: _OSAStoreURL called");
779      return NULL;
780  }