home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12otk1.exe / include / screxten.idl < prev    next >
Text File  |  1997-04-02  |  33KB  |  801 lines

  1. //#====START_GENERATED_PROLOG======================================
  2. //#
  3. //#
  4. //#   COMPONENT_NAME: odscript
  5. //#
  6. //#   CLASSES: none
  7. //#
  8. //#   ORIGINS: 27
  9. //#
  10. //#
  11. //#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  12. //#   All Rights Reserved
  13. //#   Licensed Materials - Property of IBM
  14. //#   US Government Users Restricted Rights - Use, duplication or
  15. //#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16. //#
  17. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23. //#   OR PERFORMANCE OF THIS SOFTWARE.
  24. //#
  25. //#====END_GENERATED_PROLOG========================================
  26. //#
  27. // @(#) 1.14 com/src/odscript/idl/screxten.idl, odscript, od96os2, odos29712d 2/12/97 12:56:15 [3/21/97 17:41:24]
  28. // ===========================================================================
  29. //
  30. // ScriptExtension.
  31. //
  32. // This class is the basis class for any Part specific script extension
  33. // classes.
  34. //
  35. // Within a part specific script extension class the following modifications
  36. // will normally be made.
  37. //
  38. //      In Init - ensure that the ReqFlags and ReqFlagsMask are set to
  39. //                reflect the set of scripting component capabilities that
  40. //                are required for scripting that part.
  41. //
  42. //      Register - Override to ensure that the proper class and instance
  43. //              objects are registered to support the part. The default
  44. //              may be acceptable for simple, non-container parts. For
  45. //              container parts logic must be added to ensure that any
  46. //              contained scriptable parts are also registered.
  47. //
  48. //      DeRegister - Override to ensure that the same object which was
  49. //              registered is DeRegistered.  Also for container parts
  50. //              the overriding logic should ensure that any contained
  51. //              scriptable parts also are deregistered.
  52. //
  53. //      AddContainedPart - This needs to be overriden for container
  54. //              parts and needs to provide proper registration of a single
  55. //              new part that has been added to this container.
  56. //
  57. //
  58. // ===========================================================================
  59.  
  60.  
  61. // ===========================================================================
  62. //  Change History
  63. //      Monday August 26, 1996  at  4:08:26
  64. //              make ReqFlags, ReqFlagsMask into attributes.
  65. //
  66. // ===========================================================================
  67.  
  68.  
  69. #ifndef _SCREXTENS_
  70. #define _SCREXTENS_
  71.  
  72. #ifndef _EXTENSN_
  73. #include "Extensn.idl"
  74. #endif
  75.  
  76. //==============================================================================
  77. // Classes defined in this interface
  78. //==============================================================================
  79.  
  80. interface   ODScriptExtension;
  81.  
  82. //==============================================================================
  83. // Classes used by this interface
  84. //==============================================================================
  85.  
  86. interface ODPart ;
  87. interface ODStorageUnit ;
  88. interface ODScriptComponent;
  89.  
  90. //==============================================================================
  91. // ODScriptExtension
  92. //==============================================================================
  93.  
  94. interface ODScriptExtension : ODExtension
  95. {
  96.  
  97. //==============================================================================
  98. //
  99. // Return values from registration routines.
  100. //
  101. //==============================================================================
  102.  
  103.  typedef long ODScrRegRet ;
  104.  #define ODScrRegOK     0        // no error
  105.  #define ODScrRegDup    1        // Name collision, requested name previously used
  106.  #define ODScrRegMem    2        // Memory allocation error.
  107.  #define ODScrRegNone   3        // Registration not done - no script component
  108.  #define ODScrRegOver   4        // Method not overridden (AddContainedPart)
  109.  #define ODScrRegErr    5        // Component failure - call _GetComponentInstanceError
  110.                                  // for specific error value
  111.  
  112.  
  113.  
  114. //---------------------------------------------------------------------------
  115. //
  116. // InitScriptExtension
  117. //
  118. // Input - owner - base ODPart which is the owner of this extension part
  119. //
  120. // Output - none
  121. //
  122. // Function - provides initialization when there is no persistent form
  123. //            of the script information.
  124. //            N.B. this method should only be called ONCE at the time the
  125. //            object is initialized.
  126. //
  127. //---------------------------------------------------------------------------
  128.  
  129.  void   InitScriptExtension( in ODPart owner);
  130.  
  131. //---------------------------------------------------------------------------
  132. //
  133. // SetContainingExtension
  134. //
  135. // Input -  theContExt - pointer to ScriptExtension for containing part
  136. //
  137. // Output - none
  138. //
  139. // Function - provides the interface needed to allow a containing extension
  140. //            object to be identified for this object.
  141. //
  142. //---------------------------------------------------------------------------
  143.  
  144.  void   SetContainingExtension( in ODScriptExtension theContExt) ;
  145.  
  146.  
  147. //---------------------------------------------------------------------------
  148. //
  149. // InitScriptFromStorage
  150. //
  151. // Input - owner - base ODPart which is the owner of this extension part
  152. //         stor  - ODStorageUnit that contains the persistent form of the
  153. //                 script information (as produced by ScriptExternalize
  154. //                 below)
  155. //
  156. // Output - ODBoolean - Any error returns kODFalse
  157. //
  158. // Function - provides initialization when there is a persistent form
  159. //            of the script information.  Uses the Storage unit as follows:
  160. //              property kODPropAttachedScrptType is used to store three
  161. //                      values for the attached script.
  162. //              value kODDSExtensionNamesValue holds a string that is the
  163. //                      name assigned to the extension.
  164. //              value kODDSComponentIdValue holds a string that is the
  165. //                      subtype code for the supporting component. This
  166. //                      value is not present if no component is in use with
  167. //                      the current extension object.
  168. //              value kODDSComponentDataValue holds a binary large object
  169. //                      that is the persistent data that the Component needs
  170. //                      to save. This value is not present if there is no
  171. //                      component in use with the current extension object.
  172. //
  173. //---------------------------------------------------------------------------
  174.  
  175.  ODBoolean   InitScriptFromStorage(in  ODPart owner,
  176.                                    in  ODStorageUnit stor) ;
  177.  
  178.  
  179. //---------------------------------------------------------------------------
  180. //
  181. // RetrieveComponentData
  182. //
  183. // Input - pBufferSize - pointer to long integer that has size of the buffer
  184. //              passed.
  185. //         pBuffer - pointer to buffer to receive the data read.
  186. //
  187. // Output - BufferSize is set to reflect the size of the data for the Component
  188. //          Buffer receives the data. If Buffer is not large enough for the
  189. //              data, no data is transfered and the return value is false
  190. //
  191. // Function - return the binary large object that represents the component's
  192. //              persistent data.  This function is designed to be called from
  193. //              the component. To get the required size for the binary object,
  194. //              the component will call this routine with a buffer and a size.
  195. //              If that buffer is large enough to hold the data, it will be
  196. //              read into the buffer.  In all cases the size will be updated
  197. //              to reflect the size of the data.
  198. //
  199. //              If the data is read into the supplied buffer, the return value
  200. //              is kODTrue.  If the buffer is not large enough or if there is
  201. //              no data to be read, the size will be updated ( equal to zero
  202. //              if there is no data) and the return value will be kODFalse.
  203. //
  204. //---------------------------------------------------------------------------
  205.  
  206.  ODBoolean  RetrieveComponentData(in long *pBufferSize,
  207.                                   in void *pBuffer) ;
  208.  
  209. //---------------------------------------------------------------------------
  210. //
  211. // ScriptExternalize
  212. //
  213. // Input - stor  - ODStorageUnit to contain the scripting information for
  214. //                 the current part.
  215. //
  216. // Output - StorageUnit is updated with the script information
  217. //
  218. // Function - The scripting information for the current part (and its contained
  219. //            parts) will be placed in the storage unit supplied.  This routine
  220. //            will place the kODPropAttachedScriptType property in the SU and,
  221. //            will add the Value entries for kODDSExtensionNamesValue to
  222. //            reflect the names assigned to the part.  If there is a Script-
  223. //            Component associated with the extension, the Value
  224. //            kODDSComponentIdValue will be added with a value of the
  225. //            supporting Component's SubType.  If there is Component data
  226. //            to be saved, Value kODDSComponentDataValue will be added to
  227. //            contain that binary value.
  228. //
  229. //---------------------------------------------------------------------------
  230.  
  231.  void   ScriptExternalize( in ODStorageUnit stor);
  232.  
  233. //---------------------------------------------------------------------------
  234. //
  235. // ExternalizeComponentData
  236. //
  237. // Input - long BufferSZ - size of component's data block
  238. //         char * Buffer - Locationof component's data block
  239. //         ODStorageUnit *stor - Storage unit to receive the data
  240. //
  241. // Output - void
  242. //
  243. // Function - Cause the data in the indicated buffer to be written to the
  244. //            storage unit as the Component's binary data. If length is
  245. //            negative, the component's data has not changed since the last
  246. //            time it was retrieved and thus the Storage Unit should not be
  247. //            updated.  If the length is zero, there is no data to be written
  248. //            and any prior value is to be purged.  If length is a positive
  249. //            value the indicated data will be written to the SU.
  250. //
  251. //---------------------------------------------------------------------------
  252.  
  253.  void   ExternalizeComponentData(
  254.                                      in long BufferSZ,
  255.                                      in octet *Buffer,
  256.                                      in ODStorageUnit stor);
  257.  
  258. //---------------------------------------------------------------------------
  259. //
  260. // PutComponentData
  261. //
  262. // Input - long BufferSZ - size of component's data block
  263. //         octet *Buffer - location of component's data block
  264. //
  265. // Output - Data written to Storage unit for this part.
  266. //
  267. // Function - Will access the storage unit for this Part and will cause
  268. //              the data supplied to be written as the Component's data
  269. //              in that SU.   Length less than or equal to zero has special
  270. //              meaning - see ExternalizeComponentData.
  271. //
  272. //              This Method is intended to be called by the component when
  273. //              it identifies a need to save the current Script data, genrally
  274. //              in response to a user action.
  275. //
  276. //---------------------------------------------------------------------------
  277.  
  278.  ODBoolean  PutComponentData(
  279.                                       in long   BufferSZ,
  280.                                       in octet *Buffer);
  281.  
  282.  
  283. //---------------------------------------------------------------------------
  284. //
  285. // InitScriptEditor
  286. //
  287. // Input - none
  288. //
  289. // Output - ODBoolean - any error returns kODFalse ;
  290. //
  291. // Function - Initializes the Development Environment for the current part.
  292. //            The class of the current part, the class of any contained parts,
  293. //            the current part and the contained parts will be registered with
  294. //            the IDE.
  295. //
  296. //---------------------------------------------------------------------------
  297.  
  298.  ODBoolean   InitScriptEditor() ;
  299.  
  300. //---------------------------------------------------------------------------
  301. //
  302. // EndScripting
  303. //
  304. // Input - none
  305. //
  306. // Output - ODBoolean - any error returns kODFalse ;
  307. //
  308. // Function - This method is invoked when the user determines that the
  309. //      script associated with this part is to be removed.  The method will
  310. //      explicitly DeRegister this part and all contained parts at this scope
  311. //      only, remove any persistent information for this extension, and
  312. //      remove the script component that is associated with this extension.
  313. //
  314. //---------------------------------------------------------------------------
  315.  
  316.  void EndScripting() ;
  317.  
  318.  
  319. //---------------------------------------------------------------------------
  320. //
  321. // Register
  322. //
  323. // Input - RegScope - Script extension object that represents the context
  324. //              where registration is to begin.  This will be the current
  325. //              extension object or some container of that object. Objects
  326. //              to be registered for this extension should be passed to the
  327. //              scope indicated by this argument for registration to that
  328. //              scope and any scopes contained by it.
  329. //       - Prefix - a string that is the name prefix to be applied to all
  330. //              names at the current scope when registering to the extension
  331. //              specified by RegScope.
  332. //
  333. // Output - Register the BasePart to RegScoper and all containing Active Scopes
  334. //          return value from ODScrRegRet values
  335. //
  336. // Function - This method is commonly overridden in the Extension for a
  337. //              specific part.  The overriding code can provide a different
  338. //              default name, add logic to register support classes and
  339. //              instances, and should, for container parts, include logic
  340. //              to initiate the registration of all contained scriptable
  341. //              parts.
  342. //
  343. //              Normally the overriding code for this method would NOT
  344. //              invoke the parent class's logic.
  345. //
  346. //---------------------------------------------------------------------------
  347.  
  348.  ODScrRegRet   Register( in ODScriptExtension RegScope,
  349.                          in string Prefix );
  350.  
  351. //---------------------------------------------------------------------------
  352. //
  353. // DoRegisterClass
  354. //
  355. // Input - theClass - string that specifies the name of the class to register
  356. //
  357. // Output - Returns ODScrRegRet value.
  358. //
  359. // Function - This method registers the specified class with the current
  360. //              ScriptComponent and with all containing scopes.
  361. //
  362. //---------------------------------------------------------------------------
  363.  
  364.  ODScrRegRet DoRegisterClass( in string  theClassName);
  365.  
  366. //---------------------------------------------------------------------------
  367. //
  368. // DoRegisterObject
  369. //
  370. // Input - theObj - The object which is to be registered for scripting
  371. //         itsClass - the class name of that object
  372. //         itsDefaultName - the name to be assigned to this object
  373. //         thePrefix - the name prefix to be used for this object.
  374. //         theNameUsed - output value, if the registration is successful,
  375. //              this pointer will address the name that was actually assigned
  376. //              to this object.  This string must be 'SOMFree'd by the
  377. //              receiver.  If the registration fails, this value is not
  378. //              set.
  379. //         itsScope - the extension where this object is declared.
  380. //         mayAddDigits - boolean, indicates that, if a name collision is
  381. //              identified, then this routine should add a digit string to the
  382. //              name until a unique name is generated.
  383. //
  384. // Output - Returns ODScrRegRet value
  385. //
  386. // Function - This method ensures that each part that is registered
  387. //              properly all containing scopes.
  388. //
  389. //---------------------------------------------------------------------------
  390.  
  391.  ODScrRegRet DoRegisterObject(
  392.                            in  SOMObject          theObj,
  393.                            in  string             itsClass,
  394.                            in  string             itsDefaultName,
  395.                            in  string             thePrefix,
  396.                            out string             theNameUsed,
  397.                            in  ODScriptExtension  itsScope,
  398.                            in  ODBoolean          mayAddDigits);
  399.  
  400. //---------------------------------------------------------------------------
  401. //
  402. // DoRegisterObjToComp
  403. //
  404. // Input - theObj - The object which is to be registered for scripting
  405. //         itsClass - the class name of that object
  406. //         itsDefaultName - a name to be used for this object
  407. //         thePrefix - name prefix to be applied to that name in this scope.
  408. //         theNameUsed - return value holds the name actually used for this
  409. //              object.  Set only if registration is OK, must be SOMFree'd by
  410. //              receiver.
  411. //         itsScope - the extension where this object is declared.
  412. //         mayAddDigits - boolean, indicates that, if a name collision is
  413. //              identified, then this routine should add a digit string to the
  414. //              name until a unique name is generated.
  415. //         registeringObject - boolean, true if registering an object, false
  416. //              when registering a container.
  417. //
  418. // Output - Returns ODScrRegRet value
  419. //
  420. // Function - This method ensures that each part that is registered
  421. //              is properly registered in all containing scopes.
  422. //              This logic is used by both DoRegisterObject and
  423. //              DoRegisterContainedPart with the appopriate Component or
  424. //              containing extension routine being called based on which
  425. //              case we are dealing with.
  426. //---------------------------------------------------------------------------
  427.  
  428.  ODScrRegRet DoRegisterObjToComp(
  429.                             in SOMObject          theObj,
  430.                             in string             itsClass,
  431.                             in string             itsDefaultName,
  432.                             in string             thePrefix,
  433.                             out string            theNameUsed,
  434.                             in ODScriptExtension  itsScope,
  435.                             in ODBoolean          mayAddDigits,
  436.                             in ODBoolean          registeringObject);
  437.  
  438. //---------------------------------------------------------------------------
  439. //
  440. // DoRegisterContainedPart
  441. //
  442. // Input - thePart - a reference to and ODPart contained in the basepart of
  443. //              this extension.
  444. //         itsName - The name, in this scope, by which this part is identified
  445. //         thePrefix - Prefix to be applied to the name in this scope.
  446. //         RegScope - scope at which registration is to begin.
  447. //         nameUsed - output string pointer, holds name actually used for
  448. //              registration of successful, must be SOMFree'd by receiver.
  449. //              not valid if registration fails.
  450. //         mayAddDigits - boolean - true if this routine may add digits to the
  451. //              name if a name conflict is found.
  452. //
  453. // Output - Returns ODScrRegRet value
  454. //
  455. // Function - This method establishes the current scope as the containing
  456. //              scope of the referenced part, requests the Script Component
  457. //              to validate that the name specified is unambiguous, and
  458. //              adds the name, persistent id and object reference to the
  459. //              local name table.
  460. //
  461. //---------------------------------------------------------------------------
  462.  
  463.  ODScrRegRet DoRegisterContainedPart(
  464.                            in ODPart             thePart,
  465.                            in string             itsName,
  466.                            in string             itsPrefix,
  467.                            in ODScriptExtension  RegScope,
  468.                            out string            nameUsed,
  469.                            in ODBoolean          mayAddDigits) ;
  470.  
  471.  
  472. //---------------------------------------------------------------------------
  473. //
  474. // DeRegister
  475. //
  476. // Input - ExtScope - the ODScriptExtension that represents the scope at
  477. //              which deregistration is to occur (normally the scope where
  478. //              DropContainedPart is invoked.
  479. //         doContScopes - true if references from containing scopes are also
  480. //              to be dropped.  False when invoked by 'EndEditing' which
  481. //              only applies to the single scope.
  482. //
  483. // Output - TBD
  484. //
  485. // Function - This method will commonly be overridden for a Part specific
  486. //              ScriptExtension.  The overriding code should ensure that
  487. //              any objects which were registered, are appropriately
  488. //              deregistered.  Also container parts should provide logic
  489. //              to ensure that any contained parts are deRegistered.
  490. //
  491. //              Normally overriding code would not invoke the parent
  492. //              class version of this code.
  493. //
  494. //---------------------------------------------------------------------------
  495.  
  496.  void   DeRegister( in ODScriptExtension ExtScope,
  497.                     in ODBoolean doContScopes);
  498.  
  499. //---------------------------------------------------------------------------
  500. //
  501. // DoDeRegisterObject
  502. //
  503. // Input - theObject - The object which is to be DeRegistered.
  504. //         itsScope  - the Extension object that is the level at which
  505. //              the object is defined.
  506. //         doContScopes - true if references from containing scopes are to
  507. //              be deregistered, false if called from 'endScripting' when only
  508. //              the one scope is to be addressed
  509. //
  510. // Output - TBD
  511. //
  512. // Function - This method provides the logic to ensure that when an object
  513. //              is removed from the scripting environment, it is removed
  514. //              from all containing scopes as well.
  515. //
  516. //---------------------------------------------------------------------------
  517.  
  518.  void DoDeRegisterObject( in SOMObject          theObject,
  519.                           in ODScriptExtension  itsScope,
  520.                           in ODBoolean          doContScopes) ;
  521.  
  522. //---------------------------------------------------------------------------
  523. //
  524. // DoDeRegisterContainedPart
  525. //
  526. // Input - thePart - The part which needs to be removed from registration.
  527. //         ExtScope - the scope at which deregistration should begin.
  528. //         doContScopes - boolean, indicating registration should be cleared
  529. //              in any containing scopes as well.
  530. //
  531. // Output - TBD
  532. //
  533. // Function - This method provides the logic to ensure that when an object
  534. //              is removed from the scripting environment, it is removed
  535. //              from all containing scopes as well.
  536. //
  537. //---------------------------------------------------------------------------
  538.  
  539.  void DoDeRegisterContainedPart( in ODPart             thePart,
  540.                                  in ODScriptExtension  ExtScope,
  541.                                  in ODBoolean          doContScopes) ;
  542.  
  543. //---------------------------------------------------------------------------
  544. //
  545. // DoDeRegisterExtension
  546. //
  547. // Input - theExt - Registered extension object that should be deregistered
  548. //              at this scope and optionally any containing scopes.
  549. //         doContScopes - boolean - true if deregister is to proceed to the
  550. //              containing scopes.
  551. //
  552. // Output - void
  553. //
  554. // Function - This method deRegisters an extension object with the current
  555. //              ScriptComponent and ensures that any containing Script
  556. //              Components are appropriately notified.
  557. //
  558. //---------------------------------------------------------------------------
  559.  
  560.  void  DoDeRegisterExtension( in ODScriptExtension theExt,
  561.                               in ODBoolean         doContScopes) ;
  562.  
  563. //---------------------------------------------------------------------------
  564. //
  565. // AddContainedPart
  566. //
  567. // Input - part - ODPart that has been added to the current object or an
  568. //                object contained within the current object.
  569. //
  570. // Output -
  571. //
  572. // Function - This method is to be called when the part (a container)
  573. //            has a new part added to it.  If the current part is currently
  574. //            scripted or has a containing part that is scripted, we will
  575. //            register the new part for access by the script engine.
  576. //
  577. //---------------------------------------------------------------------------
  578.  
  579.  ODScrRegRet  AddContainedPart( in ODPart part) ;
  580.  
  581.  
  582. //---------------------------------------------------------------------------
  583. //
  584. // DropContainedPart
  585. //
  586. // Input - part - ODPart that has been removed from the current object or an
  587. //                object contained within the current object.
  588. //
  589. // Output -
  590. //
  591. // Function - This method is to be called when the part (a container)
  592. //            has a contained part removed from it.  If the current part is
  593. //            scripted or has a containing part that is scripted, we will
  594. //            drop the registration of the part from the scripting interface
  595. //
  596. //---------------------------------------------------------------------------
  597.  
  598.  void   DropContainedPart( in ODPart part) ;
  599.  
  600. //---------------------------------------------------------------------------
  601. //
  602. // GetScriptComponent
  603. //
  604. // Input - SubType - Unsigned long representing the subtype code for
  605. //              the required Component.  May be null if not known.
  606. //
  607. // Output - _ScrComp - set to a reference to an ODScriptComponent object
  608. //          return kODTrue if successful, or kODFalse if not successful
  609. //
  610. // Function - Uses the Component Manager to obtain an instance of an
  611. //              ODScriptComponent that supports the requirements of this
  612. //              part.  If unable to obtain such an object we will report an
  613. //              error. and return kODFalse.
  614. //---------------------------------------------------------------------------
  615.  
  616.  ODBoolean   GetScriptComponent( in ODULong SubType) ;
  617.  
  618. //---------------------------------------------------------------------------
  619. //
  620. // CheckComponent
  621. //
  622. // Input - theScope - the scope (Extension object) which is to be checked
  623. //              against the current scope's script component.
  624. //
  625. // Output - returns TRUE if the script component associated with the current
  626. //              extension can support the requirements (as indicated by its
  627. //              ReqFlags and ReqFlagsMask) of the specified extension object.
  628. //              else returns false.
  629. //
  630. // Function - If current script component is null or its flags are not
  631. //              compatible with those of the indicated extension object, return
  632. //              false.  If all is ok, return true.
  633. //
  634. //---------------------------------------------------------------------------
  635.  
  636.  ODBoolean   CheckComponent( in ODScriptExtension theScope) ;
  637.  
  638. //---------------------------------------------------------------------------
  639. //
  640. // getContainingExt
  641. //
  642. // Input - none
  643. //
  644. // Output - ODScriptExtension that represents the containing environment.
  645. //
  646. // Function - return the containing extension object.
  647. //
  648. //---------------------------------------------------------------------------
  649.  
  650.  ODScriptExtension  getContainingExt ();
  651.  
  652. //---------------------------------------------------------------------------
  653. //
  654. // getScrComp
  655. //
  656. // Input - none
  657. //
  658. // Output - ODScriptComponent that is associated with this extension
  659. //
  660. // Function - return the related ScriptComponent
  661. //
  662. //---------------------------------------------------------------------------
  663.  
  664.  ODScriptComponent  getScrComp ();
  665.  
  666. //---------------------------------------------------------------------------
  667. //
  668. // getExtName
  669. //
  670. // Input - none
  671. //
  672. // Output - Return pointer to name assigned to this extension
  673. //
  674. // Function - return the name
  675. //
  676. //---------------------------------------------------------------------------
  677.  
  678.  string getExtName() ;
  679.  
  680. //---------------------------------------------------------------------------
  681. //
  682. // setExtName
  683. //
  684. // Input - string - pointer to new name for this extension
  685. //
  686. // Output - none
  687. //
  688. // Function - free storage associated with any earlier name and take ownership
  689. //              of the string passed in.
  690. //
  691. //---------------------------------------------------------------------------
  692.  
  693.  void  setExtName( in string theName) ;
  694.  
  695. //---------------------------------------------------------------------------
  696. //
  697. // MarkChanged
  698. //
  699. // Input -none
  700. //
  701. // Output - none
  702. //
  703. // Function - Interface that allows the ability to track when the script
  704. //            has changed.  Will result in calling the draft function
  705. //            SetChangedFromPrev to indicate that the document is modified.
  706. //
  707. //---------------------------------------------------------------------------
  708.  
  709.  void  MarkChanged() ;
  710.  
  711. //---------------------------------------------------------------------------
  712. //
  713. // NameChanged
  714. //
  715. // Input - theObject - the Object being renamed
  716. //         newName - proposed name for the object
  717. //         oldName - current name for the object
  718. //
  719. // Output - Boolean - true if name change was acceptable
  720. //
  721. // Function - pass on a name change to the associated component, if an
  722. //            error return that error,  If no error notify any containing
  723. //            extension of the proposed name change.  If that returns an
  724. //            error, then restore previous name and return the error.
  725. //
  726. //---------------------------------------------------------------------------
  727.  
  728.  ODBoolean  NameChanged( in SOMObject theObject,
  729.                          in string newName,
  730.                          in string oldName) ;
  731.  
  732. //---------------------------------------------------------------------------
  733. // Attributes
  734. //---------------------------------------------------------------------------
  735.  
  736.     attribute
  737.         ODSLong            ReqFlags;        // The requirement flags for this
  738.                                             // class - set at initilaization time
  739.  
  740.     attribute
  741.         ODSLong            ReqFlagsMask;    // Mask of which support flags are
  742.                                             // significant for this class - set
  743.                                             // at initialization time
  744.  
  745.  
  746.  
  747. #ifdef __SOMIDL__
  748.         implementation
  749.         {
  750.                 functionprefix = ODScrExt_;
  751.  
  752.  
  753.  
  754.         majorversion = 1;
  755.         minorversion = 0;
  756.         dllname = "oddsscr.dll";
  757.  
  758.         somInit :       override;
  759.         somUninit :     override;
  760.  
  761.         releaseorder:
  762.             _get_ReqFlags              ,
  763.             _set_ReqFlags              ,
  764.             _get_ReqFlagsMask          ,
  765.             _set_ReqFlagsMask          ,
  766.             InitScriptExtension        ,
  767.             SetContainingExtension     ,
  768.             InitScriptFromStorage      ,
  769.             RetrieveComponentData      ,
  770.             ScriptExternalize          ,
  771.             ExternalizeComponentData   ,
  772.             PutComponentData           ,
  773.             InitScriptEditor           ,
  774.             EndScripting               ,
  775.             Register                   ,
  776.             DoRegisterClass            ,
  777.             DoRegisterObject           ,
  778.             DoRegisterObjToComp        ,
  779.             DoRegisterContainedPart    ,
  780.             DeRegister                 ,
  781.             DoDeRegisterObject         ,
  782.             DoDeRegisterContainedPart  ,
  783.             DoDeRegisterExtension      ,
  784.             AddContainedPart           ,
  785.             DropContainedPart          ,
  786.             GetScriptComponent         ,
  787.             CheckComponent             ,
  788.             getContainingExt           ,
  789.             getScrComp                 ,
  790.             getExtName                 ,
  791.             setExtName                 ,
  792.             MarkChanged                ,
  793.             NameChanged                 ;
  794.  
  795.         };
  796. #endif
  797. };
  798.  
  799.  
  800. #endif //# _SCREXTENS_
  801.