home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Misc / Wood.0.72 / Sources / OOE_Protocols.h < prev    next >
Encoding:
Text File  |  1995-03-22  |  3.9 KB  |  204 lines

  1.  
  2. //
  3. //    Xanthus
  4. //    Copyright (c) 1992, 1993, Bjorn Backlund & Jesper Lundh.  
  5. //    All rights reserved. 
  6. //
  7.  
  8. ///////////////////////////////////////////////////////////////////////////////
  9. //
  10. // Change Log
  11. //
  12. //
  13. // Wed Dec 28 19:25:17 GMT+0100 1994
  14. // Bjorn Backlund
  15. // Added OOE_APPINFO_PASTEBOARDTYPE
  16. //
  17. //
  18. // Mon Nov  7 19:18:00 GMT+0100 1994
  19. // Bjorn Backlund
  20. // Changed OOE_getSize: (out NXSize *) to 
  21. // to OOE_getSize: (NXSize *) 
  22. //
  23. //
  24. // Mon Nov  7 19:18:46 GMT+0100 1994
  25. // Bjorn Backlund
  26. // Added OAI_OOE_LAUNCH_TIMEOUT
  27. //
  28. //
  29. ///////////////////////////////////////////////////////////////////////////////
  30.  
  31. #import <appkit/appkit.h>
  32.  
  33. #define OOE_LAUNCH_DEFAULT        "OOE_Launch"
  34. #define OOE_PASTEBOARD            "OOE Pasteboard"
  35. #define OOE_BASELINE_PASTEBOARDTYPE    "OOE_Baseline"
  36.  
  37. //
  38. // OOE 2.0
  39. // Added 941228
  40. //
  41.  
  42. #define OOE_APPINFO_PASTEBOARDTYPE    "OOE_ApplicationInfoPboardType"
  43.  
  44. #define OAI_OOE_APPLICATION        "OOE_Application"
  45.  
  46. //
  47. //
  48.  
  49. #define OAI_OOE_VERSION            "OOE_Version"
  50. #define OAI_OOE_SERVER            "OOE_Server"
  51. #define OAI_OOE_PASTEBOARD        "OOE_PasteboardType"
  52. #define OAI_OOE_BASELINE_SUPPORT    "OOE_BaselineSupport"
  53. #define OAI_OOE_INTERFACE_PASTEBOARD    "OOE_InterfaceInfoPasteboardType"
  54. #define OAI_OOE_IN_TIMEOUT        "OOE_InTimeout"
  55. #define OAI_OOE_OUT_TIMEOUT        "OOE_OutTimeout"
  56. #define OAI_OOE_LAUNCH_TIMEOUT        "OOE_LaunchTimeout"    // Added 941105
  57.  
  58.  
  59. //
  60. //
  61.  
  62. @protocol OOE_ServerInterface
  63.  
  64.     // Top level interface
  65.     // Sent by Clients to Servers
  66.     
  67.     
  68. - OOE_newDocument:client;
  69.  
  70.     // Create a new server document and connect to client
  71.     // Return proxy to new document
  72.     
  73. - OOE_openDocument:client;
  74.  
  75.     // Create a new server document and connect to client
  76.     // Init new document using data on pasteboard
  77.     // Return proxy to new document
  78.     
  79. @end
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89. @protocol OOE_DocumentInterface
  90.  
  91.     // Server Document Interface
  92.     // Sent by Clients to Server Documents
  93.     
  94.     
  95. - (int)OOE_connectToClient:client;
  96.  
  97.     // Store client within document
  98.     
  99. - (int)OOE_isDocEdited;
  100.  
  101.     // Return 1 if server document is edited
  102.     // Return 0 otherwise
  103.     
  104.     
  105. - (int)OOE_orderDocumentFront:(in id)sender;
  106.  
  107.     // Bring the main editor window to front
  108.     // Return 1 is window brought front,
  109.     // 0 otherwise
  110.     
  111. - (oneway void)OOE_closeDocument:(in id)sender;
  112.  
  113.     // Close Server Document
  114.     
  115.     
  116. - (int)OOE_sizeTo:(NXCoord in)width:(NXCoord in)height;
  117.  
  118.     // Change size of server document
  119.     //
  120.     // The size should be the size of the image to 
  121.     // be displayed, which doesn't have to
  122.     // be the size of the editing area. 
  123.     // For example, in Xanthus Questor, the editing area
  124.     // is the whole worksheet but only parts of 
  125.     // it is sent back as an image
  126.     //
  127.     // Return 1 if size changed,
  128.     // 0 otherwise
  129.     
  130.      
  131. - (int)OOE_getSize:(NXSize *)aSize;
  132.     
  133.     // Return in aSize the size of the main editor window
  134.     // See note on size above.
  135.     
  136. - (int)OOE_provideData:(in id)sender;
  137.     
  138.     // Omit document, display and optional baseline and interface
  139.     // data to the OOE pasteboard
  140.     
  141.     
  142. - (int)OOE_document: client savedAs:(const char *)path;
  143.  
  144.     // Tells server that client document has been saved
  145.     // Server can decide to update its window title according
  146.     // to the new path
  147.     
  148.     
  149. @end
  150.  
  151.  
  152.  
  153.  
  154.  
  155. @protocol OOE_ClientInterface
  156.  
  157.     // Client Interface, messages sent from Server Documents to
  158.     // Clients
  159.  
  160.  
  161. - (const char *)OOE_documentPath:sender;
  162.  
  163.     // Return path of client document
  164.  
  165.  
  166. - (int)OOE_orderClientDocumentFront:(in id)sender;
  167.  
  168.     // Bring main client window to front
  169.     
  170.     
  171. - (int)OOE_documentWillClose:(in id)document;
  172.  
  173.     // Tell client that server document will be closed
  174.  
  175.  
  176. - (int) OOE_documentWasChanged:(in id)document;
  177.  
  178.     // Tell client that server document is dirty
  179.  
  180. @end
  181.  
  182.  
  183.  
  184.  
  185. @protocol OOE_Admin    // Optional protocol
  186.  
  187.             // Can be implemented by both
  188.             // servers and server documents
  189.  
  190. - (int)OOE_inTimeout;
  191.  
  192.     // Specifies in milliseconds the 'in'-timeout 
  193.     // the client should use. 
  194.     // See (NXConnection: setInTimeout:)
  195.  
  196. - (int)OOE_outTimeout;
  197.  
  198.     // Specifies in milliseconds the 
  199.     // 'out'-timeout the client should use    
  200.     // See (NXConnection: setOutTimeout:)
  201.  
  202.  
  203. @end
  204.