[Wnd-commit] wnd/wnd_doc/doc/api/shell/shellnamespace shellnamespace.dtpl,1.1.1.1,1.2
Status: Alpha
Brought to you by:
jurner
|
From: jürgen u. <cer...@us...> - 2005-05-15 10:19:20
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shellnamespace In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11169 Modified Files: shellnamespace.dtpl Log Message: bit of this and a bit of that Index: shellnamespace.dtpl =================================================================== RCS file: /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shellnamespace/shellnamespace.dtpl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** shellnamespace.dtpl 29 Apr 2005 15:15:55 -0000 1.1.1.1 --- shellnamespace.dtpl 15 May 2005 10:19:11 -0000 1.2 *************** *** 1,3 **** ! ::site:: Shell CLSIDLs <code class=import>defined in: wnd.api.shell</code><br><br> --- 1,3 ---- ! DROPEFFECT_ ::site:: Shell CLSIDLs <code class=import>defined in: wnd.api.shell</code><br><br> *************** *** 53,64 **** --- 53,68 ---- ::item:: __iter__ <code>__iter__()</code><br> + <P> Iterates over the contents of the current folder, returning a relative pIdl for each item in turn. You should free each pIdl using the 'FreePidl' method. + </P> ::item:: Close <code>Close()</code><br> + <P> Closes the shells namespace. Make shure to call this in your application to free all remaining resources. + </P> *************** *** 66,114 **** ::item:: OpenFolder <code> OpenFolder(path)</code><br> Opens a folder. And sets it as current folder. Return value is the pIdl of the folder. You do not have to free it. ::item:: OpenSpecialFolder <code>OpenSpecialFolder(self, CLSIDL)</code><br> Opens a special folder. CLSIDL should be one of the CLSIDL_* constants as defined in <a HREF="../Shell CLSIDLs.html">Shell CLSIDLs</a>. Return value is the pIdl of the folder. You do not have to free it. ::item:: DirUp <code>DirUp()</code><br> Climbs the directory tree one level up to the parent directory of the current. Return value is True if successfull, False if the desktop level was allreaddy reached. ! Return value is the pIdl of the folder. You do not have to ! free it. ::item:: DirDown <code>DirDown(pIdl)</code><br> Climbs the directory tree one level down. pIdl should be a pIdl of a folder relative to the current ! folder. The pIdl is passed is freed by this method, so you ! can no longer use it. ::item:: GetCwd <code>GetCwd()</code><br> Returns the absolute pIdl of the current working ! directory. The returned pIdl has to be freed. Do not free it if you want to use it as an argument to SetCwd ::item:: SetCwd <code>SetCwd(pIdl)</code><br> ! Sets the current working directory. pIdl should be an ! absolute pIdl, as returned from the 'GetCwd' method. The passed pIdl is taken care of and freed in the next directory switch or when calling Close. If you want to keep the pIdl for own use make a copy of it with the CopyPidl method first. ::item:: Compare <code>Compare(pIdl1, pIdl2, lp=0)</code><br> Compares two pIdls given their indexes in the folders cache and returns the result. 1 if the first item should --- 70,140 ---- ::item:: OpenFolder <code> OpenFolder(path)</code><br> + <P> Opens a folder. And sets it as current folder. Return value is the pIdl of the folder. You do not have to free it. + </P> ::item:: OpenSpecialFolder <code>OpenSpecialFolder(self, CLSIDL)</code><br> + <P> Opens a special folder. CLSIDL should be one of the CLSIDL_* constants as defined in <a HREF="../Shell CLSIDLs.html">Shell CLSIDLs</a>. Return value is the pIdl of the folder. You do not have to free it. + </P> + + ::item:: IsDesktopFolder + <code>IsDesktopFolder()</code><br> + <P> + Returns True if the current working directry is the desktop folder, + False otherwise. + </P> ::item:: DirUp <code>DirUp()</code><br> + <P> Climbs the directory tree one level up to the parent directory of the current. Return value is True if successfull, False if the desktop level was allreaddy reached. ! Return value is the pIdl of the folder. You should not free this pIdl. ! </P> ::item:: DirDown <code>DirDown(pIdl)</code><br> + <P> Climbs the directory tree one level down. pIdl should be a pIdl of a folder relative to the current ! folder. The pIdl is passed is not freed by this method. ! </P> ::item:: GetCwd <code>GetCwd()</code><br> + <P> Returns the absolute pIdl of the current working ! directory. ! The returned pIdl has to be freed. Do not free it if you want to use it as an argument to SetCwd + </P> ::item:: SetCwd <code>SetCwd(pIdl)</code><br> ! <P> ! Sets the current working directory. ! <br><br> ! pIdl should be an absolute pIdl, as returned from the 'GetCwd' method. The passed pIdl is taken care of and freed in the next directory switch or when calling Close. If you want to keep the pIdl for own use make a copy of it with the CopyPidl method first. + <br><br> + pIdl may be None to switch to the desktop directory. + </P> ::item:: Compare <code>Compare(pIdl1, pIdl2, lp=0)</code><br> + <P> Compares two pIdls given their indexes in the folders cache and returns the result. 1 if the first item should *************** *** 118,129 **** --- 144,159 ---- this method could be well used as an argument to a listviews Sort method. + </P> ::item:: CompareExt <code>CompareExt(pIdl1, pIdl2, lp=0)</code><br> + <P> Alterate comparison method. Compares two pIdls by comparing their extension first. + </P> ::item:: GetIconIndex <code>GetIconIndex(pIdl=None)</code><br> + <P> Retrieves the index for the icon in the shells icon cache. Return value is the index or None if no icon was *************** *** 132,149 **** Todo:<br> The undocumented function SHGetCachedImageIndex ! is used here. Test on NT systems. ::item:: GetContextMenu <code>GetContextMenu(version, pIdl=None)</code><br> Returns the IContextMenu pointer for a folder or file. <br> TODO: <br> version is currently not implemented ::item:: ParseDisplayName <code>ParseDisplayName(path)</code><br> Returns the pIdl of the specified path. Remember to free the pIdl after use ::item:: GetName --- 162,184 ---- Todo:<br> The undocumented function SHGetCachedImageIndex ! is used here. Test on NT systems. ! </P> ::item:: GetContextMenu <code>GetContextMenu(version, pIdl=None)</code><br> + <P> Returns the IContextMenu pointer for a folder or file. <br> TODO: <br> version is currently not implemented + </P> ::item:: ParseDisplayName <code>ParseDisplayName(path)</code><br> + <P> Returns the pIdl of the specified path. Remember to free the pIdl after use + </P> ::item:: GetName *************** *** 154,219 **** ::item:: GetParseName ! <code></code><br> ! Returns the name parsable for ParseDisplayname, i.e. the full path. ::item:: GetAddressBarName <code>GetAddressBarName(pIdl=None)</code><br> Returns the name meant to be displayed in an addressbar. ::item:: SetName <code>SetName(name, pIdl=None)</code><br> Sets the name of an item. Return value is the new pIdl of the item. The old pIdl is freed in this method, the new pIdl has to be freed by the caller. ::item:: IsReadOnly <code>IsReadOnly(pIdl=None)</code><br> Returns True if the item is readonly. <br> Note:<br> Having some problems here. Returns allways False ::item:: IsFolder <code>IsFolder(pIdl=None)</code><br> ! Returns True if the item is a folder. ::item:: IsFileSystem <code>IsFileSystem(pIdl=None)</code><br> Returns True if the item is a file system thing (file/folder/root) ::item:: IsRemovable <code>IsRemovable(pIdl=None)</code><br> Returns True if the item is removable media. ::item:: IsLink <code>IsLink(pIdl=None)</code><br> Returns True if the item is a link. ::item:: IsHidden <code>IsHidden(pIdl=None)</code><br> Returns True when a ghosted icon should be used for displaying the item ::item:: IsShared <code>IsShared(pIdl=None)</code><br> Returns True if the item is shared ::item:: IsDropTarget <code>IsDropTarget(pIdl=None)</code><br> Returns True if the item is a droptarget ::item:: IsNonEnumerated <code>IsNonEnumerated(pIdl=None)</code><br> Returns True if the item is non-enumerated. ?? Dono what this is. ::item:: IsBrowsable <code>IsBrowsable(pIdl=None)</code><br> Returns True if the item is In-place browsable ::item:: IsCompressed --- 189,279 ---- ::item:: GetParseName ! <code>GetParseName(pIdl=None)</code><br> ! <P> ! Returns the name parsable for ParseDisplayname, i.e. the full path. ! </P> ::item:: GetAddressBarName <code>GetAddressBarName(pIdl=None)</code><br> + <P> Returns the name meant to be displayed in an addressbar. + </P> ::item:: SetName <code>SetName(name, pIdl=None)</code><br> + <P> Sets the name of an item. Return value is the new pIdl of the item. The old pIdl is freed in this method, the new pIdl has to be freed by the caller. + </P> ::item:: IsReadOnly <code>IsReadOnly(pIdl=None)</code><br> + <P> Returns True if the item is readonly. <br> Note:<br> Having some problems here. Returns allways False + </P> ::item:: IsFolder <code>IsFolder(pIdl=None)</code><br> ! <P>Returns True if the item is a folder. ! </P> ::item:: IsFileSystem <code>IsFileSystem(pIdl=None)</code><br> + <P> Returns True if the item is a file system thing (file/folder/root) + </P> ::item:: IsRemovable <code>IsRemovable(pIdl=None)</code><br> + <P> Returns True if the item is removable media. + </P> ::item:: IsLink <code>IsLink(pIdl=None)</code><br> + <P> Returns True if the item is a link. + </P> ::item:: IsHidden <code>IsHidden(pIdl=None)</code><br> + <P> Returns True when a ghosted icon should be used for displaying the item + </P> ::item:: IsShared <code>IsShared(pIdl=None)</code><br> + <P> Returns True if the item is shared + </P> ::item:: IsDropTarget <code>IsDropTarget(pIdl=None)</code><br> + <P> Returns True if the item is a droptarget + </P> ::item:: IsNonEnumerated <code>IsNonEnumerated(pIdl=None)</code><br> + <P> Returns True if the item is non-enumerated. ?? Dono what this is. + </P> ::item:: IsBrowsable <code>IsBrowsable(pIdl=None)</code><br> + <P> Returns True if the item is In-place browsable + </P> ::item:: IsCompressed *************** *** 223,281 **** ::item:: IsNewContent <code>IsNewContent(pIdl=None)</code><br> Returns True if the item should show bold in explorer tree ::item:: IsGhosted <code> IsGhosted(pIdl=None)</code><br> Returns True if the item should be displayed using a ghosted icon. ::item:: HasPropertySheet <code>HasPropertySheet(pIdl=None)</code><br> Returns True if the item has a property sheet ::item:: HasSubFolder <code>HasSubFolder(pIdl=None)</code><br> Returns True if the item has subfolder(s). Used to indicate the item is expandable in a directory tree. ::item:: HasFileSystemSubFolder <code> HasFileSystemSubFolder( pIdl=None)</code><br> Returns True if the item has subfolder(s) that are part of the file system. ::item:: CanRename <code>CanRename(pIdl=None)</code><br> Returns True if the item can be renamed ::item:: CanDelete <code>CanDelete(pIdl=None)</code><br> Returns True if the item can be renamed ::item:: CanCopy <code>CanCopy(pIdl=None)</code><br> Returns True if the item can be copied ::item:: CanMove <code>CanMove(pIdl=None)</code><br> Returns True if the item can be moved ::item:: CanLink <code>CanLink(pIdl=None)</code><br> ::item:: Validate <code>Validate(pIdl=None, validateall=False)</code><br> The shell keeps all item attributes cached. Use this to update the cached information for the item. If 'validateall' is True all items in the folder the item resides in will be refreshed. If the item does no longer exist an error is be raised. ::item:: PrintAttrs <code>PrintAttrs(pIdl=None)</code><br> ! "For informational purposes. Print out all attributes of an item to stdout. # ::item:: --- 283,395 ---- ::item:: IsNewContent <code>IsNewContent(pIdl=None)</code><br> + <P> Returns True if the item should show bold in explorer tree + </P> ::item:: IsGhosted <code> IsGhosted(pIdl=None)</code><br> + <P> Returns True if the item should be displayed using a ghosted icon. + </P> ::item:: HasPropertySheet <code>HasPropertySheet(pIdl=None)</code><br> + <P> Returns True if the item has a property sheet + </P> ::item:: HasSubFolder <code>HasSubFolder(pIdl=None)</code><br> + <P> Returns True if the item has subfolder(s). Used to indicate the item is expandable in a directory tree. + </P> ::item:: HasFileSystemSubFolder <code> HasFileSystemSubFolder( pIdl=None)</code><br> + <P> Returns True if the item has subfolder(s) that are part of the file system. + </P> ::item:: CanRename <code>CanRename(pIdl=None)</code><br> + <P> Returns True if the item can be renamed + </P> ::item:: CanDelete <code>CanDelete(pIdl=None)</code><br> + <P> Returns True if the item can be renamed + </P> ::item:: CanCopy <code>CanCopy(pIdl=None)</code><br> + <P> Returns True if the item can be copied + </P> ::item:: CanMove <code>CanMove(pIdl=None)</code><br> + <P> Returns True if the item can be moved + </P> ::item:: CanLink <code>CanLink(pIdl=None)</code><br> + <P>Returns True if the pIdl supports linking to it, False otherwise + </P> ::item:: Validate <code>Validate(pIdl=None, validateall=False)</code><br> + <P> The shell keeps all item attributes cached. Use this to update the cached information for the item. If 'validateall' is True all items in the folder the item resides in will be refreshed. If the item does no longer exist an error is be raised. + </P> + ::item:: GetAttributes + <code>GetAttributes(pIdl, attr, nItems=1)</code><br> + <P>Returns file attributes of pIdl. + <br><br> + attr should be the a combination of the SFGAO_* or DROPEFFECT_* + consts defined in shell.consts. + <br><br> + <b>Return value</b><br> + a long value containing the attributes. Use bitwise AND to compare. + <br><br> + <pre> + attrs= GetAttributes(MyPidl, shell.SFGAO_SHARE | shell.DROPEFFECT_COPY) + if attrs & shell.SFGAO_SHARE: + print 'item is shared' + + if attrs & shell.DROPEFFECT_COPY + print 'item can be copied' + + </pre> + + <br><br> + This proceses slightly faster then requesting attribute by attribute if multiple + attributes are requested. + + <br><br> + <b>Note</b><br> + nItems parameter is not yet implemented and should allways be 1. + </P> + + ::item:: PrintAttrs <code>PrintAttrs(pIdl=None)</code><br> ! <P> ! For informational purposes. Print out all attributes of an item to stdout. + </P> # ::item:: |