Thread: [Wnd-commit] wnd/wnd_doc/doc/api/shell/shellnamespace shellnamespace.dtpl,1.4,1.5
Status: Alpha
Brought to you by:
jurner
|
From: jürgen u. <cer...@us...> - 2005-07-02 09:35:06
|
Update of /cvsroot/wnd/wnd/wnd_doc/doc/api/shell/shellnamespace In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14306 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.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** shellnamespace.dtpl 18 May 2005 19:33:57 -0000 1.4 --- shellnamespace.dtpl 2 Jul 2005 09:34:56 -0000 1.5 *************** *** 168,172 **** ::item:: GetData <code>GetData(pIdl)</code><br> ! <P>Returns some additional data for an iotem. <br><br> pIdl must be a pIdl relative to the current folder. --- 168,172 ---- ::item:: GetData <code>GetData(pIdl)</code><br> ! <P>Returns some additional data for an item. <br><br> pIdl must be a pIdl relative to the current folder. *************** *** 199,209 **** <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> --- 199,271 ---- <code>GetContextMenu(version, pIdl=None)</code><br> <P> ! Returns a tuple (IContextMenu, version) containing the IContextMenu pointer for the item and the version retrieved. In case something goes ! wrong, return value is None. For the desktop folder the return value ! is always None. pIdl may also be an aray of relative pIdls to ! retrieve the common context menu for a number of items. ! ! <br><br> ! Use the version parameter to request a specified version of the contextmenu. ! <TABLE class="table1" BORDER="1"> ! <TH>context menu versions</TH> ! <TR> ! <TD>None</TD> ! <TD>retrieves the highest available version</TD> ! </TR> ! <TR> ! <TD>1</TD> ! <TD>retrieves version 1</TD> ! </TR> ! <TR> ! <TD>2</TD> ! <TD>retrieves version 2 (not supported for all shell items)</TD> ! </TR> ! <TR> ! <TD>3</TD> ! <TD>retrieves version 3 (not supported for all shell items)</TD> ! </TR> ! ! </TABLE> ! </P> + ::item:: GetDataObject + <code>GetDataObject(pIdl=None)</code><br> + <P>Returns the DataObject of the folder or one or more items in the + folder. + <br><br> + pIdl may be a single pIdl relative to the parent folder or an array + of relative pIdls. + <br><br> + The DataObject returned will contain one ore more clipboard + formats describing the objects. + <br><br> + <b>Notes</b><br> + + <UL> + <LI>For the desktop folder the return value is always None + <br><br> + <LI>the DataObject returned does not allow for enumerating + formats that can be set, but nevertheless it is possible to + add any additional format to the DataObject. + <br><br> + + </UL> + <P> + + + ::item:: GetDropTarget + <code>GetDropTarget(pIdl=None)</code><br> + <P>Returns the DropTarget of the folder or an item in the + folder or None. + <br><br> + <b>Return value</b><br> + a DropTargetPointer instance as defined in + <code class="import">wnd.api.ole.dragdrop</code> + + <P> + + + ::item:: ParseDisplayName <code>ParseDisplayName(path)</code><br> *************** *** 248,251 **** --- 310,316 ---- Note:<br> Having some problems here. Returns allways False + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes + of all objects </P> *************** *** 253,256 **** --- 318,323 ---- <code>IsFolder(pIdl=None)</code><br> <P>Returns True if the item is a folder. + <br><br> + pIdl may be an array of pIdls aswell to query if the attribute is common to all items </P> *************** *** 261,264 **** --- 328,333 ---- Returns True if the item is a file system thing (file/folder/root) + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 267,270 **** --- 336,341 ---- <P> Returns True if the item is removable media. + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 273,276 **** --- 344,349 ---- <P> Returns True if the item is a link. + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 280,283 **** --- 353,358 ---- Returns True when a ghosted icon should be used for displaying the item + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 287,290 **** --- 362,367 ---- <P> Returns True if the item is shared + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 293,296 **** --- 370,375 ---- <P> Returns True if the item is a droptarget + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 300,303 **** --- 379,384 ---- Returns True if the item is non-enumerated. ?? Dono what this is. + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 306,314 **** --- 387,401 ---- <P> Returns True if the item is In-place browsable + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> ::item:: IsCompressed <code>IsCompressed(pIdl=None)</code><br> + <P> Returns True if the item is compressed + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes + </P> ::item:: IsNewContent *************** *** 317,320 **** --- 404,409 ---- Returns True if the item should show bold in explorer tree + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 324,327 **** --- 413,418 ---- Returns True if the item should be displayed using a ghosted icon. + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 331,334 **** --- 422,427 ---- <P> Returns True if the item has a property sheet + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 338,341 **** --- 431,436 ---- Returns True if the item has subfolder(s). Used to indicate the item is expandable in a directory tree. + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 346,349 **** --- 441,446 ---- <a HREF=" IsFileSystemAnchestor.html"> IsFileSystemAnchestor</a> instead + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 358,361 **** --- 455,460 ---- folder. + other virtual folders may have set themselves as root items aswell. + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 364,367 **** --- 463,468 ---- <P> Returns True if the item can be renamed + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 371,374 **** --- 472,477 ---- <P> Returns True if the item can be renamed + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 377,380 **** --- 480,485 ---- <P> Returns True if the item can be copied + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> *************** *** 383,406 **** <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_* --- 488,515 ---- <P> Returns True if the item can be moved + <br><br> + pIdl may be an array of pIdls aswell to query the common attributes </P> ::item:: CanLink <code>CanLink(pIdl=None)</code><br> ! <P>Returns True if the pIdl supports linking to it, False otherwise. ! <br><br> ! pIdl may be an array of pIdls aswell to query the common attributes </P> ::item:: Validate ! <code>Validate(pIdl=None,)</code><br> <P> The shell keeps all item attributes cached. ! Use this to update the cached information for one or more the items. ! <br><br> ! If pIdl is None the all nformation for the contents of the folder is refreshed </P> ::item:: GetAttributes ! <code>GetAttributes(pIdl, attr)</code><br> ! <P>Returns file attributes of pIdl or an array of pIdls. <br><br> attr should be the a combination of the SFGAO_* or DROPEFFECT_* *************** *** 421,424 **** --- 530,566 ---- <br><br> + For those being unfamilliar with ctypes arrays, here is the drill how to query + if an attribute is common to multiple items + <pre> + + pIdls= # assume a list of pIdls + arr= (PIDL*len(pIdls))() # setup an array of pIdls + for n, i in enumerate(pIdls): + arr[n]= i + + try: + attrs= GetAttributes(arr, shell.SFGAO_SHARE | shell.DROPEFFECT_COPY) + finally: + for i in pIdls: # or arr + PidlFree(i) + + if attrs & shell.SFGAO_SHARE: + print 'all items are shared' + + if attrs & shell.DROPEFFECT_COPY + print 'all items can be copied' + + + + </pre> + + + + + + + + + <br><br> This proceses slightly faster then requesting attribute by attribute if multiple attributes are requested. |