128 entry->smart_scan(sortOrder, scan_flags);
131 entry->_expanded =
true;
134 p =
entry->get_next_path_component(
p);
145 CONTEXT(
"Entry::read_directory_base()");
154 entry->read_directory(scan_flags);
155 entry->sort_directory(sortOrder);
191 if (
name[0] ==
'.') {
224 return order2==order1? 0: order1<order2? -1: 1;
287 cmp = entry2->
_data.nFileSizeHigh - entry1->
_data.nFileSizeHigh;
294 cmp = entry2->
_data.nFileSizeLow - entry1->
_data.nFileSizeLow;
296 return cmp<0? -1:
cmp>0? 1: 0;
355 CONTEXT(
"Entry::smart_scan()");
377 IExtractIcon* pExtract;
379 unsigned gil_flags = 0;
383 gil_flags |= GIL_OPENICON;
386 if (gil_flags & GIL_NOTFILENAME)
468 if (!pidl || !pidl->mkid.cb)
517#define USE_MY_SHBINDTOPARENT
527#ifdef USE_MY_SHBINDTOPARENT
549 HRESULT hr = (*SHBindToParent)(pidl_abs, IID_IShellFolder, (
LPVOID*)&parentFolder, &pidlLast);
647 if (!
path || path_count==0)
651 if ( path_count > 1 )
656 if (
entry->_etype == etype) {
673 if (
len+
l >= path_count )
675 if (
l + 1 > path_count )
678 len = path_count -
l - 1;
681 if (
l+1 >= path_count )
692 if (
len+
l+1 >= path_count )
695 if (
l + 2 > path_count )
698 len = path_count -
l - 2;
702 if (
l+2 >= path_count )
719 if (
len+
l >= path_count )
721 if (
l + 1 > path_count )
724 len = path_count -
l - 1;
727 if (
l+1 >= path_count )
733 if ( !
level && (
len+1 < path_count) )
754 entry->free_subentries();
VOID WaitCursor(BOOL bBegin)
#define MultiByteToWideChar
LONG WINAPI CompareFileTime(IN CONST FILETIME *lpFileTime1, IN CONST FILETIME *lpFileTime2)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static TYPE_ORDER TypeOrderFromDirname(LPCTSTR name)
static int compareExt(const void *arg1, const void *arg2)
static int compareNothing(const void *arg1, const void *arg2)
static HRESULT my_SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, VOID **ppv, LPCITEMIDLIST *ppidlLast)
static int(* sortFunctions[])(const void *arg1, const void *arg2)
static int compareName(const void *arg1, const void *arg2)
static int compareType(const Entry *entry1, const Entry *entry2)
static int compareDate(const void *arg1, const void *arg2)
static int compareSize(const void *arg1, const void *arg2)
GLuint GLuint GLuint GLuint arg1
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
GLuint GLsizei GLsizei * length
void Free([in] LPVOID pv)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
ExplorerGlobals g_Globals
BOOL launch_file(HWND hwnd, LPCTSTR cmd, UINT nCmdShow, LPCTSTR parameters)
#define cmp(status, error)
#define FILE_ATTRIBUTE_DIRECTORY
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
static unsigned __int64 next
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
ShellFolder & GetDesktopFolder()
HRESULT ShellFolderContextMenu(IShellFolder *shell_folder, HWND hwndParent, int cidl, LPCITEMIDLIST *apidl, int x, int y, CtxMenuInterfaces &cm_ifs)
void WINAPI SHAddToRecentDocs(UINT uFlags, LPCVOID pv)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Exception with context information.
base of all file and directory entries
virtual BOOL launch_entry(HWND hwnd, UINT nCmdShow=SW_SHOWNORMAL)
void sort_directory(SORT_ORDER sortOrder)
BY_HANDLE_FILE_INFORMATION _bhfi
virtual void read_directory(int scan_flags=0)
void read_directory_base(SORT_ORDER sortOrder=SORT_NAME, int scan_flags=0)
virtual HRESULT GetUIObjectOf(HWND hWnd, REFIID riid, LPVOID *ppvOut)
bool get_path_base(PTSTR path, size_t path_count, ENTRY_TYPE etype) const
virtual HRESULT do_context_menu(HWND hwnd, const POINT &pos, CtxMenuInterfaces &cm_ifs)
int extract_icon(ICONCACHE_FLAGS flags=ICF_NORMAL)
virtual bool get_path(PTSTR path, size_t path_count) const =0
Entry * read_tree(const void *path, SORT_ORDER sortOrder=SORT_NAME, int scan_flags=0)
void smart_scan(SORT_ORDER sortOrder=SORT_NAME, int scan_flags=0)
virtual ShellPath create_absolute_pidl() const
int safe_extract_icon(ICONCACHE_FLAGS flags=ICF_NORMAL)
const Icon & extract(LPCTSTR path, ICONCACHE_FLAGS flags=ICF_NORMAL)
void free_icon(int icon_id)
root entry for file system trees
Entry * read_tree(LPCTSTR path, int scan_flags=0)
HRESULT QueryInterface(REFIID riid, I *p)
IShellFolder smart pointer.
wrapper class for IMalloc with usage of common allocator
wrapper class for item ID lists