home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / Languages / python / PyObjC-0.47-MIHS / pyobjc-0.47-src / Include / OC_PythonBundle.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-23  |  2.0 KB  |  76 lines

  1. /* Copyright (c) 1996 by Lele Gaifax.  All Rights Reserved
  2.  *
  3.  * This software may be used and distributed freely for any purpose
  4.  * provided that this notice is included unchanged on any and all
  5.  * copies. The author does not warrant or guarantee this software in
  6.  * any way.
  7.  *
  8.  * This file is part of the PyObjC package.
  9.  *
  10.  * $RCSfile: OC_PythonBundle.h,v $
  11.  * $Revision: 1.1.1.1 $
  12.  * $Date: 1996/10/23 17:19:36 $
  13.  *
  14.  * Created Wed Oct 16 17:35:05 1996.
  15.  * Thanx to Bill Bumgarner for the idea and first implementation.
  16.  */
  17.  
  18. #ifndef _OC_PythonBundle_H
  19. #define _OC_PythonBundle_H
  20.  
  21. #ifdef GNU_RUNTIME
  22. #ifndef WITH_FOUNDATION
  23. #define WITH_FOUNDATION
  24. #endif
  25. #include <Foundation/NSBundle.h>
  26. #define OC_PYTHONBUNDLE_SUPER_CLASS NSBundle
  27. #else
  28. #include <objc/NXBundle.h>
  29. #define OC_PYTHONBUNDLE_SUPER_CLASS NXBundle
  30. #endif
  31.  
  32. /*#C This class fills specific Python needs about bundles. */  
  33. @interface OC_PythonBundle : OC_PYTHONBUNDLE_SUPER_CLASS
  34. {
  35. }
  36.  
  37. //#M Initialize the version number of this class.
  38. + (void) initialize;
  39.  
  40. /*#M Find the name of the main script in  execution, and return a
  41.   bundle relative to the script's pathname; if we are in interactive
  42.   mode, a bundle on the current working directory is returned. */
  43. + (OC_PYTHONBUNDLE_SUPER_CLASS *) mainBundle;
  44.  
  45. @end
  46.  
  47. #ifndef WITH_FOUNDATION
  48.  
  49. @interface NXBundle (OC_PythonBundle)
  50.  
  51. /*#M Provides a Foundation-like access to NXBundle'
  52.   @code{-getPath:forResource:ofType:inDirectory:withVersion:}. Returns
  53.   the path on success, NULL otherwise. */
  54. + (const char *) pathForResource:(const char *) name
  55.               ofType:(const char *) ext
  56.              inDirectory:(const char *) bundlePath
  57.              withVersion:(int) version;
  58.  
  59. /*#M Provides a Foundation-like access to NXBundle'
  60.   @code{-getPath:forResource:}. Returns the path on success, NULL
  61.   otherwise. */
  62. - (const char *) pathForResource:(const char *) name
  63.               ofType:(const char *) ext;
  64.  
  65. @end /* OC_PythonBundle class interface */
  66.  
  67. #endif
  68.  
  69. #endif /* _OC_PythonBundle_H */
  70.  
  71. /*
  72. ** Local Variables:
  73. ** change-log-default-name:"../ChangeLog.PyObjC"
  74. ** End:
  75. */
  76.