home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks3 / AppKit.framework / Headers / NSDataLink.h < prev    next >
Text File  |  1994-11-15  |  2KB  |  97 lines

  1. /*
  2.     NXDataLink
  3.     Application Kit, Release 3.0
  4.     Copyright (c) 1991, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import <Foundation/NSObject.h>
  8. #import <objc/hashtable.h>
  9. #import "NSPasteboard.h"
  10. #import <sys/types.h>
  11. #import "NSSelection.h"
  12. @class NSDataLinkManager;
  13. @class NSArray;
  14.  
  15. typedef enum _NXDataLinkUpdateMode {
  16.     NSUpdateContinuously = 1,
  17.     NSUpdateWhenSourceSaved = 2,
  18.     NSUpdateManually = 3,
  19.     NSUpdateNever = 4
  20. } NSDataLinkUpdateMode;
  21.  
  22. typedef enum _NXDataLinkDisposition {
  23.     NSLinkInDestination = 1,
  24.     NSLinkInSource = 2,
  25.     NSLinkBroken = 3
  26. } NSDataLinkDisposition;
  27.  
  28. extern NSString * NSDataLinkPboardType;
  29.  
  30. /* A persistent identifier of links on the destination side. Never 0. */
  31. typedef int NSDataLinkNumber;
  32.  
  33. /* filename suffix used for saved links */
  34. extern NSString * NSDataLinkFilenameExtension;
  35.  
  36. @interface NSDataLink : NSObject {
  37.   /* these instance variables are NOT part of the API, are subject to change in future releases */
  38.   @private
  39.     NSSelection *srcSelection;
  40.     id srcFile;
  41.     char *srcAppName;
  42.     id srcMgr;
  43.     NSSelection *destSelection;
  44.     char *destFileName;
  45.     char *destAppName;
  46.     id destMgr;
  47.     time_t lastUpdateTime;
  48.     NSDataLinkNumber linkNum;
  49.     struct _dlFlags {
  50.     unsigned int dirty:1;
  51.     unsigned int memorable:1;
  52.     unsigned int mode:2;
  53.     unsigned int canUpdateContinuously:1;
  54.     unsigned int updateMode:4;
  55.     unsigned int appVerifiesLinks:1;
  56.     unsigned int willOpenSource:1;
  57.     unsigned int willUpdate:1;
  58.     unsigned int dead:1;
  59.     unsigned int cyclical:1;
  60.     unsigned int RESERVED:2;
  61.     } dlFlags;
  62.     NSString * *types;
  63.     unsigned int _reservedDataLink1;
  64. }
  65.  
  66. - initLinkedToSourceSelection:(NSSelection *)selection managedBy:linkManager supportingTypes:(NSArray *)newTypes;
  67. - initLinkedToFile:(NSString *)filename;
  68. - initFromPasteboard:(NSPasteboard *)pasteboard;
  69. - initFromFile:(NSString *)filename;
  70. - copyFromZone:(NSZone *)zone;
  71.  
  72. - writeToPasteboard:(NSPasteboard *)pasteboard;
  73. - writeToFile:(NSString *)filename;
  74.  
  75. - saveLinkIn:(NSString *)directoryName;
  76.  
  77. - (NSArray *)types;
  78. - (NSSelection *)sourceSelection;
  79. - (NSSelection *)destinationSelection;
  80. - (NSString *)sourceFilename;
  81. - (NSString *)destinationFilename;
  82. - (NSString *)sourceAppName;
  83. - (NSString *)destinationAppName;
  84. - (NSDataLinkManager *)manager;
  85. - (time_t)lastUpdateTime;
  86. - (NSDataLinkNumber)linkNumber;
  87. - (NSDataLinkDisposition)disposition;
  88.  
  89. - updateDestination;
  90. - openSource;
  91. - break;
  92. - setUpdateMode:(NSDataLinkUpdateMode)mode;
  93. - (NSDataLinkUpdateMode)updateMode;
  94. - sourceEdited;
  95.  
  96. @end
  97.