home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cl-lib07.zip / pm.zip / usr / include / pm / interfacefile.h < prev    next >
C/C++ Source or Header  |  1995-06-27  |  1KB  |  71 lines

  1. #ifndef _INTERFACEFILE_H_
  2. #define _INTERFACEFILE_H_
  3.  
  4. #ifndef _BUTTON_H_
  5. #include <pm/Button.h>
  6. #endif
  7.  
  8. #include <objc/Object.h>
  9. #include <objc/TypedStream.h>
  10.  
  11. typedef struct {
  12.   char *key;
  13.   id    object;
  14. } KeyedObject;
  15.  
  16. struct outlet_action_structure {
  17.   char *source;
  18.   char *target;
  19.   char *command;
  20. };
  21.  
  22. typedef struct {
  23.   char *key;
  24.   char *class;
  25. } Classes;
  26.  
  27. typedef struct outlet_action_structure Action;
  28. typedef struct outlet_action_structure Outlet;
  29.  
  30. #define INVALID_INDEX (int) -1
  31.  
  32. @interface InterfaceFile : Object
  33. {
  34.   int          objectCount;
  35.   KeyedObject *keyedObject;
  36.  
  37.   int          actionCount;
  38.   Action      *action;
  39.  
  40.   int          outletCount;
  41.   Outlet      *outlet;
  42.  
  43.   int          classCount;
  44.   Classes     *classes;
  45. }
  46.  
  47. - init;
  48. - free;          /* only free this object */
  49. - freeObjects;   /* also free objects in the list */
  50. - freeAll;       /* free this object, all objects in list and key strings */
  51.  
  52. - (char *) keyFor: (int) index;
  53. - objectFor: (int) index;
  54. - (int) objectCount;
  55.  
  56. - addObject: anObject withKey: (char *) aKey;
  57. - objectForKey: (char *) aKey;
  58. - deleteObjectWithKey: (char *) aKey;
  59. - (int) indexForKey: (char *) aKey;
  60. - (int) indexForObject: anObject;
  61.  
  62. - (KeyedObject *) keyedObjectAt: (int) index;
  63.  
  64. - awake;
  65. - read: (TypedStream *) aStream;
  66. - write: (TypedStream *) aStrem;
  67.  
  68. @end
  69.  
  70. #endif
  71.