New nsIScriptable interface: Difference between revisions

No edit summary
Line 31: Line 31:
=== nsIScriptable interface ===
=== nsIScriptable interface ===


Something like:
Something like (recall that xpidl capitalizes names for C++):


     typedef nsDISPID PRUint32;
     typedef nsDISPID PRUint32;
Line 39: Line 39:
     {
     {
         // Deletes a member by DISPID.  
         // Deletes a member by DISPID.  
         DeleteMemberByDispID(in nsDISPID dispID);
         deleteMemberByDispID(in nsDISPID dispID);
      
      
         // Deletes a member by name.  
         // Deletes a member by name.  
         DeleteMemberByName(in DOMString &name);
         deleteMemberByName(in DOMString &name);
      
      
         // Maps a single member name to its corresponding DISPID, which can then  
         // Maps a single member name to its corresponding DISPID, which can then  
         // be used on subsequent calls to Invoke()
         // be used on subsequent calls to Invoke()
         nsDISPID GetDispID(in DOMString &name);
         nsDISPID getDispID(in DOMString &name);
      
      
         // Retrieves the name of a member.  
         // Retrieves the name of a member.  
         DOMString GetMemberName(in nsDISPID dispID);
         DOMString getMemberName(in nsDISPID dispID);
      
      
         // Retrieves a member's properties.
         // Retrieves a member's properties.
         PRUint32 GetMemberProperties(in nsDISPID dispID, in PRUint32 propsToFetch);
         PRUint32 getMemberProperties(in nsDISPID dispID, in PRUint32 propsToFetch);
      
      
         // Retrieves the interface for the namespace parent of an object.  
         // Retrieves the interface for the namespace parent of an object.  
         nsIScriptable GetNameSpaceParent();
         nsIScriptable getNameSpaceParent();
      
      
         // Enumerates the members of the object.  
         // Enumerates the members of the object.  
         nsDISPID GetNextDispID(in PRUint32 flags, in nsDISPID dispid);
         nsDISPID getNextDispID(in PRUint32 flags, in nsDISPID dispid);
      
      
         // Provides access to properties and methods exposed by an IScriptable object.
         // Provides access to properties and methods exposed by an IScriptable object.
         nsIVariant Invoke(in nsDISPID dispID, in nsLOCALE????? locale,
         nsIVariant invoke(in nsDISPID dispID, in nsLOCALE????? locale,
                           // flags for the call
                           // flags for the call
                           in PRUint32 flags,
                           in PRUint32 flags,
Line 107: Line 107:
     // fdexPropCannotSourceEvents The member cannot fire events  
     // fdexPropCannotSourceEvents The member cannot fire events  
     // fdexScriptablePropNoSideEffects The member does not have any side effects. For example, a debugger could safely get/set/call this member without changing the state of the script being debugged.  
     // fdexScriptablePropNoSideEffects The member does not have any side effects. For example, a debugger could safely get/set/call this member without changing the state of the script being debugged.  
     // fdexScriptablePropDynamicType The member is dynamic and can change during the lifetime of the object.  
     // fdexScriptablePropDynamicType The member is dynamic and can change during the lifetime of the object.
   


=== Language Helpers ===
=== Language Helpers ===
Confirmed users, Bureaucrats and Sysops emeriti
419

edits