//
- // Explorer clone, lean version
+ // Explorer clone
//
// globals.h
//
//
+#include "utility/xmlstorage.h"
+
+using namespace XMLStorage;
+
+#include "taskbar/favorites.h"
+
+
/// management of file types
struct FileTypeInfo {
String _classname;
ICID_NETWORK,
ICID_COMPUTER,
ICID_LOGOFF,
+ ICID_BOOKMARK,
ICID_DYNAMIC
};
void draw(HDC hdc, int x, int y, int cx, int cy, COLORREF bk_color, HBRUSH bk_brush) const;
HBITMAP create_bitmap(COLORREF bk_color, HBRUSH hbrBkgnd, HDC hdc_wnd) const;
+ int add_to_imagelist(HIMAGELIST himl, HDC hdc_wnd, COLORREF bk_color=GetSysColor(COLOR_WINDOW), HBRUSH bk_brush=GetSysColorBrush(COLOR_WINDOW)) const;
int get_sysiml_idx() const {return _itype==IT_SYSCACHE? _sys_idx: -1;}
/// create a bitmap from an icon
extern HBITMAP create_bitmap_from_icon(HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd);
+ /// add icon with alpha channel to imagelist using the specified background color
+extern int ImageList_AddAlphaIcon(HIMAGELIST himl, HICON hIcon, HBRUSH hbrush_bkgnd, HDC hdc_wnd);
+
+ /// retrieve icon from window
+extern HICON get_window_icon_small(HWND hwnd);
+extern HICON get_window_icon_big(HWND hwnd, bool allow_from_class=true);
+
/// desktop management
+#ifdef _USE_HDESK
+
+typedef auto_ptr<struct DesktopThread> DesktopThreadPtr;
+
+struct Desktop
+{
+ HDESK _hdesktop;
+// HWINSTA _hwinsta;
+ DesktopThreadPtr _pThread;
+ WindowHandle _hwndDesktop;
+
+ Desktop(HDESK hdesktop=0/*, HWINSTA hwinsta=0*/);
+ ~Desktop();
+};
+
+typedef auto_ptr<Desktop> DesktopPtr;
+typedef DesktopPtr DesktopRef;
+
+ /// Thread class for additional desktops
+struct DesktopThread : public Thread
+{
+ DesktopThread(Desktop& desktop)
+ : _desktop(desktop)
+ {
+ }
+
+ int Run();
+
+protected:
+ Desktop& _desktop;
+};
+
+#else
typedef pair<HWND, DWORD> MinimizeStruct;
};
typedef Desktop DesktopRef;
+#endif
+
#define DESKTOP_COUNT 4
void SwitchToDesktop(int idx);
void ToggleMinimize();
+#ifdef _USE_HDESK
+ DesktopRef& get_current_Desktop() {return (*this)[_current_desktop];}
+#endif
+
int _current_desktop;
};
{
ExplorerGlobals();
- void init(HINSTANCE hInstance);
+ void init(HINSTANCE hInstance);
+
+ void read_persistent();
+ void write_persistent();
+
+ XMLPos get_cfg();
+ XMLPos get_cfg(const char* path);
HINSTANCE _hInstance;
UINT _cfStrFName;
HWND _hwndDesktop;
Desktops _desktops;
+
+ XMLDoc _cfg;
+ String _cfg_dir;
+ String _cfg_path;
+
+ Favorites _favorites;
+ String _favorites_path;
} g_Globals;