diff --git a/configure b/configure index 35854f6eb79..62ab42dcde6 100755 --- a/configure +++ b/configure @@ -13125,7 +13125,7 @@ MAKE_DLL_RULES=dlls/Makedll.rules MAKE_PROG_RULES=programs/Makeprog.rules -ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules programs/Makeprog.rules Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/netapi32/Makefile dlls/ntdll/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/user/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile" +ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules programs/Makeprog.rules Makefile debugger/Makefile dlls/Makefile dlls/advapi32/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/netapi32/Makefile dlls/ntdll/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/user/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wrc/Makefile tsx11/Makefile unicode/Makefile" cat >confcache <<\_ACEOF @@ -13721,6 +13721,7 @@ do "programs/view/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/view/Makefile" ;; "programs/wcmd/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/wcmd/Makefile" ;; "programs/wineconsole/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/wineconsole/Makefile" ;; + "programs/winefile/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/winefile/Makefile" ;; "programs/winemine/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/winemine/Makefile" ;; "programs/winepath/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/winepath/Makefile" ;; "programs/winetest/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/winetest/Makefile" ;; diff --git a/configure.ac b/configure.ac index b373c8436b8..34e90e9a0dd 100644 --- a/configure.ac +++ b/configure.ac @@ -1348,6 +1348,7 @@ programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile +programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile diff --git a/programs/Makefile.in b/programs/Makefile.in index acaccfecd58..7b0a71349a3 100644 --- a/programs/Makefile.in +++ b/programs/Makefile.in @@ -22,6 +22,7 @@ SUBDIRS = \ view \ wcmd \ wineconsole \ + winefile \ winemine \ winepath \ winetest \ @@ -40,6 +41,7 @@ INSTALLPROGS = \ wcmd \ wineconsole \ winedbg \ + winefile \ winemine \ winepath \ winhelp diff --git a/programs/winefile/.cvsignore b/programs/winefile/.cvsignore new file mode 100644 index 00000000000..18700baed78 --- /dev/null +++ b/programs/winefile/.cvsignore @@ -0,0 +1,4 @@ +Makefile +rsrc.res +winefile.exe.dbg.c +winefile.exe.spec.c diff --git a/programs/winefile/De.rc b/programs/winefile/De.rc new file mode 100644 index 00000000000..2338bde1f68 --- /dev/null +++ b/programs/winefile/De.rc @@ -0,0 +1,162 @@ +/* + * Winefile + * German Language Support + * + * Copyright 2000 Martin Fuchs + * Copyright 2002 Steven Edwards + * Copyright 2002 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN +#pragma code_page(1252) + + +/* Menu */ + +IDM_WINEFILE MENU FIXED IMPURE +{ + POPUP "&Datei" { + MENUITEM "Ö&ffnen\tEingabetaste" , 101 + MENUITEM "&Verschieben...\tF7" , 106 + MENUITEM "&Kopieren...\tF8" , 107 + MENUITEM "&In Zwischenablage...\tF9" , 118 + MENUITEM "&Löschen\tEntf" , 108 + MENUITEM "&Umbenennen..." , 109 + MENUITEM "&Eigenschaften...\tAlt+Eingabetaste" , ID_EDIT_PROPERTIES + MENUITEM SEPARATOR + MENUITEM "K&omprimieren..." , 119 + MENUITEM "Deko&mprimieren..." , 120 + MENUITEM SEPARATOR + MENUITEM "&Ausführen..." , ID_EXECUTE + MENUITEM "&Drucken..." , 102 + MENUITEM "Zuord&nen..." , 103 + MENUITEM SEPARATOR + MENUITEM "Ver&zeichnis erstellen..." , 111 + MENUITEM "&Suchen..." , 104 + MENUITEM "Dateien aus&wählen..." , 116 + MENUITEM SEPARATOR + MENUITEM "&Beenden\tAlt+X" , ID_FILE_EXIT + } + + POPUP "Da&tenträger" { + MENUITEM "Datenträger &kopieren..." , 201 + MENUITEM "Datenträger &benennen..." , 202 + MENUITEM SEPARATOR + MENUITEM "Datenträger &formatieren..." , 203 +#ifdef _WIN95 + MENUITEM "...", -1 //@@ +#endif + MENUITEM SEPARATOR + MENUITEM "Netzwerklaufwerk &verbinden..." , 252 + MENUITEM "Netzwerklaufwerk &trennen..." , 253 + MENUITEM SEPARATOR + MENUITEM "F&reigeben als..." , 254 + MENUITEM "Freigabe been&den..." , 255 + MENUITEM SEPARATOR + MENUITEM "Laufwerk aus&wählen..." , 251 + } + + + POPUP "&Verzeichnisse" { + MENUITEM "&Nächste Ebene einblenden\t+" , 301 + MENUITEM "&Zweig einblenden\t*" , 302 + MENUITEM "Alle &Ebenen einblenden\tStrg+*" , 303 + MENUITEM "Zweig &ausblenden\t-" , 304 + MENUITEM SEPARATOR + MENUITEM "&Verzweigungen kennzeichnen" , 505 + } + + POPUP "&Ansicht" { + MENUITEM "Struktur &und Verzeichnis" , 413 + MENUITEM "Nur St&ruktur" , 411 + MENUITEM "Nur &Verzeichnis" , 412 + MENUITEM SEPARATOR + MENUITEM "&Teilen" , 414 + MENUITEM SEPARATOR + MENUITEM "&Name" , ID_VIEW_NAME + MENUITEM "A&lle Dateiangaben" , ID_VIEW_ALL_ATTRIBUTES, CHECKED + MENUITEM "&Bestimmte Dateiangaben..." , ID_VIEW_SELECTED_ATTRIBUTES + MENUITEM SEPARATOR + MENUITEM "Nach N&ame" , 404 + MENUITEM "Nach T&yp" , 405 + MENUITEM "Nach &Größe" , 406 + MENUITEM "Nach &Datum" , 407 + MENUITEM SEPARATOR + MENUITEM "Angaben ausw&ählen..." , 409 + } + + POPUP "&Optionen" { + MENUITEM "&Bestätigen..." , -1 + MENUITEM "Schrift&art..." , -1 + MENUITEM "Symbolleiste &definieren..." , -1 + MENUITEM SEPARATOR + MENUITEM "Sy&mbolleiste" , ID_VIEW_TOOL_BAR, CHECKED + MENUITEM "Lauf&werkleiste" , ID_VIEW_DRIVE_BAR, CHECKED + MENUITEM "&Statusleiste" , ID_VIEW_STATUSBAR, CHECKED +#ifndef _NO_EXTENSIONS + MENUITEM "Vollb&ild\tStrg+Umschalt+S" , ID_VIEW_FULLSCREEN +#endif + MENUITEM SEPARATOR + MENUITEM "&Symbol nach Programmstart" , -1 + MENUITEM "&Einstellungen beim Beenden speichern" , 511 + } + + POPUP "&Sicherheit" { + MENUITEM "&Berechtigungen..." , 605 + MENUITEM "Über&wachen..." , 606 + MENUITEM "Besi&tzer..." , 607 + } + + POPUP "&Fenster" { + MENUITEM "Neues &Fenster" , ID_WINDOW_NEW + MENUITEM "Über&lappend\tUmschalt+F5" , ID_WINDOW_CASCADE + MENUITEM "&Untereinander" , ID_WINDOW_TILE_HORZ + MENUITEM "&Nebeneinander\tUmschalt+F4" , ID_WINDOW_TILE_VERT +#ifndef _NO_EXTENSIONS + MENUITEM "au&tomatisch anordnen" , ID_WINDOW_AUTOSORT +#endif + MENUITEM "&Symbole anordnen" , ID_WINDOW_ARRANGE + MENUITEM "&Aktualisieren\tF5" , ID_REFRESH + } + + POPUP "&?" { + MENUITEM "&Hilfethemen\tF1" , ID_HELP + MENUITEM "&Suchen...\tF1" , ID_HELP + MENUITEM "Hilfe &verwenden\tF1" , ID_HELP_USING + MENUITEM SEPARATOR + POPUP "Inf&o..." { + MENUITEM "Info über &Wine..." , ID_ABOUT_WINE +// MENUITEM "&Lizenz" ID_LICENSE +// MENUITEM "&KEINE GARANTIE" ID_NO_WARRANTY + } + } +} + + +IDD_EXECUTE DIALOG FIXED IMPURE 15, 13, 210, 63 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Ausführen" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", 101, "Static", SS_SIMPLE|SS_NOPREFIX, 3, 6, 162, 10 + CONTROL "Befehls&zeile:" , -1, "Static", SS_LEFTNOWORDWRAP|WS_GROUP, 3, 18, 60, 10 + EDITTEXT 201, 3, 29, 134, 12, ES_AUTOHSCROLL + CONTROL "Als &Symbol" , 214, "Button", BS_AUTOCHECKBOX|WS_TABSTOP,3, 45, 71, 12 + DEFPUSHBUTTON "OK" , 1, 158, 6, 47, 14 + PUSHBUTTON "Abbrechen" , 2, 158, 23, 47, 14 + PUSHBUTTON "&Hilfe" , 254, 158, 43, 47, 14 +} diff --git a/programs/winefile/En.rc b/programs/winefile/En.rc new file mode 100644 index 00000000000..33a1a335a89 --- /dev/null +++ b/programs/winefile/En.rc @@ -0,0 +1,166 @@ +/* + * WineFile + * English Language Support + * + * Copyright 2000 Martin Fuchs + * Copyright 2002 Steven Edwards + * Copyright 2002 Alexandre Julliard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(850) + + +/* Menu */ + +IDM_WINEFILE MENU FIXED IMPURE +{ + POPUP "&File" { + MENUITEM "&Open\tEnter" , 101 + MENUITEM "&Move...\tF7" , 106 + MENUITEM "&Copy...\tF8" , 107 + MENUITEM "&In Clipboard...\tF9" , 118 + MENUITEM "&Delete\tDel" , 108 + MENUITEM "Re&name..." , 109 + MENUITEM "Propert&ies...\tAlt+Enter" , ID_EDIT_PROPERTIES + MENUITEM SEPARATOR + MENUITEM "C&ompress..." , 119 + MENUITEM "Dec&ompress..." , 120 + MENUITEM SEPARATOR + MENUITEM "&Run..." , ID_EXECUTE + MENUITEM "&Print..." , 102 + MENUITEM "Associate..." , 103 + MENUITEM SEPARATOR + MENUITEM "Cr&eate Directory..." , 111 + MENUITEM "Searc&h..." , 104 + MENUITEM "&Select Files..." , 116 + MENUITEM SEPARATOR +#ifndef _NO_EXTENSIONS + MENUITEM "E&xit\tAlt+X" , ID_FILE_EXIT +#else + MENUITEM "E&xit", ID_FILE_EXIT +#endif + } + + POPUP "&Disk" { + MENUITEM "&Copy Disk..." , 201 + MENUITEM "&Label Disk..." , 202 + MENUITEM SEPARATOR + MENUITEM "&Format Disk..." , 203 +#ifdef _WIN95 + MENUITEM "&Make System Disk...", -1 //@@ +#endif + MENUITEM SEPARATOR + MENUITEM "Connect &Network Drive" , 252 + MENUITEM "&Disconnect Network Drive" , 253 + MENUITEM SEPARATOR + MENUITEM "Share as..." , 254 + MENUITEM "&Remove Share..." , 255 + MENUITEM SEPARATOR + MENUITEM "&Select Drive..." , 251 + } + + POPUP "&Directories" { + MENUITEM "&Next Level\t+" , 301 + MENUITEM "Expand &Tree\t*" , 302 + MENUITEM "Expand &all\tStrg+*" , 303 + MENUITEM "Collapse &Tree\t-" , 304 + MENUITEM SEPARATOR + MENUITEM "&Mark Childs" , 505 + } + + POPUP "&View" { + MENUITEM "T&ree and Directory" , 413 + MENUITEM "Tr&ee Only" , 411 + MENUITEM "Directory &Only" , 412 + MENUITEM SEPARATOR + MENUITEM "Sp&lit" , 414 + MENUITEM SEPARATOR + MENUITEM "&Name" , ID_VIEW_NAME + MENUITEM "&All File Details" , ID_VIEW_ALL_ATTRIBUTES, CHECKED + MENUITEM "&Partial Details..." , ID_VIEW_SELECTED_ATTRIBUTES + MENUITEM SEPARATOR + MENUITEM "&Sort by Name" , 404 + MENUITEM "Sort &by Type" , 405 + MENUITEM "Sort by Si&ze" , 406 + MENUITEM "Sort by &Date" , 407 + MENUITEM SEPARATOR + MENUITEM "Sort by &..." , 409 + } + + POPUP "&Options" { + MENUITEM "&Confirmation..." , -1 + MENUITEM "&Font..." , -1 + MENUITEM "Customize Tool&bar..." , -1 + MENUITEM SEPARATOR + MENUITEM "&Toolbar" , ID_VIEW_TOOL_BAR, CHECKED + MENUITEM "&Drivebar" , ID_VIEW_DRIVE_BAR, CHECKED + MENUITEM "&Status Bar" , ID_VIEW_STATUSBAR, CHECKED +#ifndef _NO_EXTENSIONS + MENUITEM "F&ull Screen\tCtrl+Shift+S" , ID_VIEW_FULLSCREEN +#endif + MENUITEM SEPARATOR + MENUITEM "&Symbol nach Programmstart" , -1 + MENUITEM "&Einstellungen beim Beenden speichern" , 511 + } + + + POPUP "&Security" { + MENUITEM "&Access..." , 605 + MENUITEM "&Logging..." , 606 + MENUITEM "&Owner..." , 607 + } + + POPUP "&Window" { + MENUITEM "New &Window" , ID_WINDOW_NEW + MENUITEM "Cascading\tCtrl+F5" , ID_WINDOW_CASCADE + MENUITEM "Tile &Horizontally" , ID_WINDOW_TILE_HORZ + MENUITEM "Tile &Vertically\tCtrl+F4" , ID_WINDOW_TILE_VERT +#ifndef _NO_EXTENSIONS + MENUITEM "Arrange Automatically" , ID_WINDOW_AUTOSORT +#endif + MENUITEM "Arrange &Symbols" , ID_WINDOW_ARRANGE + MENUITEM "&Refresh\tF5" , ID_REFRESH + } + + POPUP "&?" { + MENUITEM "&Help Topics\tF1" , ID_HELP + MENUITEM "Help &Search...\tF1" , ID_HELP + MENUITEM "&Using Help\tF1" , ID_HELP_USING + MENUITEM SEPARATOR + POPUP "Info..." { + MENUITEM "Info about &Wine..." , ID_ABOUT_WINE +// MENUITEM "&License..." ID_LICENSE +// MENUITEM "&NO WARRANTY" ID_NO_WARRANTY + } + } +} + + +IDD_EXECUTE DIALOG FIXED IMPURE 15, 13, 210, 63 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Execute" +FONT 8, "MS Shell Dlg" +{ + CONTROL "", 101, "Static", SS_SIMPLE|SS_NOPREFIX, 3, 6, 162, 10 + CONTROL "&Command:" , -1, "Static", SS_LEFTNOWORDWRAP|WS_GROUP, 3, 18, 60, 10 + EDITTEXT 201, 3, 29, 134, 12, ES_AUTOHSCROLL + CONTROL "As &Symbol" , 214, "Button", BS_AUTOCHECKBOX|WS_TABSTOP,3, 45, 71, 12 + DEFPUSHBUTTON "OK" , 1, 158, 6, 47, 14 + PUSHBUTTON "Cancel" , 2, 158, 23, 47, 14 + PUSHBUTTON "&Help" , 254, 158, 43, 47, 14 +} diff --git a/programs/winefile/Makefile.in b/programs/winefile/Makefile.in new file mode 100644 index 00000000000..ffa8d0fc7e5 --- /dev/null +++ b/programs/winefile/Makefile.in @@ -0,0 +1,18 @@ +TOPSRCDIR = @top_srcdir@ +TOPOBJDIR = ../.. +SRCDIR = @srcdir@ +VPATH = @srcdir@ +MODULE = winefile.exe +APPMODE = gui +IMPORTS = shell32 comctl32 user32 gdi32 kernel32 + +C_SRCS = \ + license.c \ + splitpath.c \ + winefile.c + +RC_SRCS = rsrc.rc + +@MAKE_PROG_RULES@ + +### Dependencies: diff --git a/programs/winefile/license.c b/programs/winefile/license.c new file mode 100644 index 00000000000..8e666970819 --- /dev/null +++ b/programs/winefile/license.c @@ -0,0 +1,52 @@ +/* + * Copyright 2000 Martin Fuchs + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "windows.h" + +static const CHAR LicenseCaption[] = "LICENSE"; +static const CHAR License[] = +"This library is free software; you can redistribute it and/or " +"modify it under the terms of the GNU Lesser General Public " +"License as published by the Free Software Foundation; either " +"version 2.1 of the License, or (at your option) any later version.\n" + +"This library is distributed in the hope that it will be useful, " +"but WITHOUT ANY WARRANTY; without even the implied warranty of " +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " +"Lesser General Public License for more details.\n" + +"You should have received a copy of the GNU Lesser General Public " +"License along with this library; if not, write to the Free Software " +"Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA"; + +static const CHAR NoWarrantyCaption[] = "NO WARRANTY"; +static const CHAR NoWarranty[] = +"This library is distributed in the hope that it will be useful, " +"but WITHOUT ANY WARRANTY; without even the implied warranty of " +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " +"Lesser General Public License for more details."; + +VOID WineLicense(HWND hwnd) +{ + MessageBoxA(hwnd, License, LicenseCaption, MB_ICONINFORMATION|MB_OK); +} + +VOID WineWarranty(HWND hwnd) +{ + MessageBoxA(hwnd, NoWarranty, NoWarrantyCaption, MB_ICONEXCLAMATION|MB_OK); +} diff --git a/programs/winefile/resource.h b/programs/winefile/resource.h new file mode 100644 index 00000000000..6996df2bcad --- /dev/null +++ b/programs/winefile/resource.h @@ -0,0 +1,75 @@ +/* + * Copyright 2000 Martin Fuchs + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* images */ +#define IDB_TOOLBAR 100 +#define IDB_DRIVEBAR 101 +#define IDB_IMAGES 102 +#define IDI_WINEFILE 100 + + +/* accellerators and menus */ + +#define IDA_WINEFILE 101 +#define IDM_WINEFILE 102 + + +/* dialogs */ + +#define IDD_EXECUTE 103 + + +/* control ids */ + +#define ID_ACTIVATE 101 +#define ID_EXECUTE 105 +#define ID_FILE_EXIT 115 +#define ID_VIEW_NAME 401 +#define ID_VIEW_ALL_ATTRIBUTES 402 +#define ID_VIEW_SELECTED_ATTRIBUTES 403 +#define ID_VIEW_TOOL_BAR 508 +#define ID_VIEW_DRIVE_BAR 507 +#define ID_VIEW_STATUSBAR 503 + +#define ID_ABOUT 1803 +#define ID_REFRESH 1704 +#define ID_EDIT_PROPERTIES 57656 +#define ID_WINDOW_NEW 0xE130 +#define ID_WINDOW_ARRANGE 0xE131 +#define ID_WINDOW_CASCADE 0xE132 +#define ID_WINDOW_TILE_HORZ 0xE133 +#define ID_WINDOW_TILE_VERT 0xE134 +#define ID_WINDOW_SPLIT 0xE135 +#define ID_HELP_USING 0xE144 +#define ID_HELP 0xE146 + +/* range for drive bar command ids: 0x9000..0x90FF */ +#define ID_DRIVE_FIRST 0x9001 + + +/* winefile extensions */ +#define ID_ABOUT_WINE 0x8000 +#define ID_LICENSE 0x8001 +#define ID_NO_WARRANTY 0x8002 +#define ID_WINDOW_AUTOSORT 0x8003 +#define ID_VIEW_FULLSCREEN 0x8004 +#define ID_PREFERED_SIZES 0x8005 + +#ifdef __linux__ +#define ID_DRIVE_UNIX_FS 0x9000 +#endif diff --git a/programs/winefile/resource.rc b/programs/winefile/resource.rc new file mode 100644 index 00000000000..8f6cedc9615 --- /dev/null +++ b/programs/winefile/resource.rc @@ -0,0 +1,289 @@ +/* + * Copyright 2000 Martin Fuchs + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +IDA_WINEFILE ACCELERATORS DISCARDABLE +{ + VK_F1, ID_HELP, VIRTKEY, NOINVERT + VK_F5, ID_REFRESH, VIRTKEY, NOINVERT + VK_RETURN, ID_ACTIVATE, VIRTKEY, NOINVERT +#ifndef _NO_EXTENSIONS + "X", ID_FILE_EXIT, VIRTKEY, ALT, NOINVERT + "S", ID_VIEW_FULLSCREEN, VIRTKEY, SHIFT, CONTROL, NOINVERT + VK_ADD, ID_PREFERED_SIZES, VIRTKEY, CONTROL, NOINVERT +#endif +} + +IDI_WINEFILE ICON DISCARDABLE +#ifdef _WIN32 + "winefile.ico" +#else +{ + '00 00 01 00 01 00 20 20 10 00 00 00 00 00 E8 02' + '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 04 00 00 00 00 00 80 02 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 80 00 00 80 00 00 00 80 80 00 80 00' + '00 00 80 00 80 00 80 80 00 00 C0 C0 C0 00 80 80' + '80 00 00 00 FF 00 00 FF 00 00 00 FF FF 00 FF 00' + '00 00 FF 00 FF 00 FF FF 00 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 B7' + 'B7 B7 B7 B7 B7 B7 B7 70 00 00 00 00 00 00 00 70' + '00 00 00 00 00 00 0B 73 00 00 00 00 00 00 00 B3' + 'F7 B7 B7 B7 B7 B7 07 73 30 00 00 00 00 00 00 73' + 'FB 7B 7B 7B 7B 7B 0B 73 33 00 00 00 00 00 00 B3' + 'F7 BF FF FF F7 B7 07 73 33 00 00 00 00 00 00 73' + 'FB 70 33 33 0B 7B 0B 73 33 00 0F FF FF 00 00 B3' + 'F7 B0 33 33 07 B7 07 73 33 00 F0 00 00 F0 00 73' + 'FB 70 00 00 0B 7B 0B 73 33 00 00 00 00 00 00 B3' + 'F7 B7 B7 B7 B7 B7 07 73 33 00 00 00 00 00 00 73' + 'FF FF FF FF FF FF 0B 73 33 00 00 02 00 00 00 B3' + '33 33 33 33 33 33 07 73 33 00 00 09 00 00 00 7B' + '7B 7B 7B 7B 7B 7B 7B 73 33 00 00 99 90 00 00 B0' + '00 00 00 00 00 00 07 73 33 00 0B BB BB 00 00 73' + 'FB 7B 7B 7B 7B 7B 0B 73 33 00 BB BB BB B0 00 B3' + 'F7 B7 B7 B7 B7 B7 07 73 33 00 00 00 E0 00 00 73' + 'FB 7F FF FF FB 7B 0B 73 33 00 00 00 0E 00 00 B3' + 'F7 B0 33 33 07 B7 07 73 33 00 00 00 00 00 00 73' + 'FB 70 33 33 0B 7B 0B 73 33 00 00 00 00 00 00 B3' + 'F7 B0 00 00 07 B7 07 73 33 00 00 00 00 00 00 73' + 'FB 7B 7B 7B 7B 7B 0B 73 33 00 00 00 00 00 00 B3' + 'FF FF FF FF FF FF 07 73 33 00 00 00 00 00 00 73' + '33 33 33 33 33 33 0B 73 33 00 00 00 00 00 00 B7' + 'B7 B7 B7 B7 B7 B7 B7 73 33 00 00 00 00 00 00 FF' + 'FF FF FF FF FF FF FF F3 33 00 00 00 00 00 00 07' + 'B7 B7 B7 B7 B7 B7 B7 BF 33 00 00 00 00 00 00 00' + '7B 7B 7B 7B 7B 7B 7B 7B F3 00 00 00 00 00 00 00' + '07 B7 B7 B7 B7 B7 B7 B7 BF 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF 80 00 1F FF 80 00 0F FF 80 00 07 FF 80 00' + '03 FF 80 00 01 FF 80 00 01 FF 80 00 01 83 80 00' + '01 39 80 00 01 C7 80 00 01 EF 80 00 01 EF 80 00' + '01 EF 80 00 01 C7 80 00 01 83 80 00 01 01 80 00' + '01 F7 80 00 01 FB 80 00 01 FF 80 00 01 FF 80 00' + '01 FF 80 00 01 FF 80 00 01 FF 80 00 01 FF 80 00' + '01 FF 80 00 01 FF C0 00 01 FF E0 00 01 FF F0 00' + '01 FF F8 00 01 FF FF FF FF FF FF FF FF FF' +} +#endif + +IDB_TOOLBAR BITMAP DISCARDABLE +#ifdef _WIN32 + "toolbar.bmp" +#else +{ + '42 4D BE 03 00 00 00 00 00 00 76 00 00 00 28 00' + '00 00 70 00 00 00 0F 00 00 00 01 00 04 00 00 00' + '00 00 48 03 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80' + '00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80' + '00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF' + '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF' + '00 00 FF FF FF 00 77 77 77 88 88 88 88 88 77 77' + '77 77 77 77 77 77 77 88 88 88 88 88 88 87 77 88' + '88 88 88 88 88 87 77 88 88 88 88 88 88 88 78 88' + '88 88 88 88 88 87 77 77 77 07 07 07 07 07 77 77' + '74 44 44 44 44 48 77 77 77 88 88 88 88 88 74 44' + '44 44 44 44 44 87 74 44 44 44 44 44 44 87 74 44' + '44 44 44 44 44 48 44 44 44 44 44 44 44 87 77 77' + '77 77 77 77 77 70 77 77 74 FF FF FF FF 48 77 77' + '74 44 44 44 44 48 74 FF FF FF FF FF F4 87 74 FF' + 'FF F4 FF FF F4 87 74 FF FF F4 FF FF FF 48 4F FF' + 'FF 4F FF FF F4 87 07 07 07 07 77 77 77 77 77 77' + '74 FF FF FF FF 48 77 77 74 FF FF FF FF 48 74 FF' + 'FF FF FF FF F4 87 74 FF FF F4 FF FF F4 87 74 FF' + 'FF F4 FF FF FF 48 4F FF FF 44 44 44 44 87 77 77' + '77 77 77 77 77 70 77 88 88 88 88 88 FF 48 77 77' + '84 FF FF FF FF 48 74 FF FF FF FF FF F4 87 74 FF' + 'FF F4 FF FF F4 87 74 FF FF F4 44 44 44 48 4F FF' + 'FF 44 44 44 44 87 07 77 77 07 77 77 77 77 74 44' + '8B 44 44 48 44 48 77 74 44 FF FF FF FF 48 74 44' + '44 44 44 44 44 87 74 FF FF F4 FF FF F4 87 74 FF' + 'FF F4 44 44 44 48 4F FF FF 4F FF 4F F4 87 77 77' + '77 70 70 70 70 70 7B FF 8B FF FF 48 44 47 77 74' + 'F4 44 44 44 44 48 74 44 44 44 44 44 44 87 74 FF' + 'FF F4 FF FF F4 87 74 FF FF F4 FF F4 FF 48 44 44' + '44 44 44 44 44 87 07 77 77 07 07 07 07 07 78 B8' + '8B F8 BF 48 77 77 77 84 F4 44 44 44 44 47 74 44' + '44 44 44 44 44 87 74 FF FF F4 FF FF F4 87 74 44' + '44 44 FF F4 FF 48 44 44 44 44 44 44 44 77 70 70' + '70 70 70 77 77 77 74 8B 8B 8B FF 48 88 87 74 44' + 'FF FF FF FF 48 77 74 FF FF FF FF FF F4 87 74 FF' + 'FF F4 FF FF F4 87 74 44 44 44 FF F4 FF 48 77 77' + '77 77 77 77 77 77 00 F7 07 07 07 70 70 77 7B B8' + 'BB B4 44 48 44 87 74 F4 44 44 44 44 48 77 74 FF' + 'FF FF FF FF F4 87 74 FF FF F4 FF FF F4 87 74 FF' + 'FF F4 FF F4 FF 48 7C CC 77 CC 77 C7 7C 77 00 F7' + '78 87 77 77 77 07 74 88 BB B4 44 44 F4 87 74 F4' + '44 44 44 44 47 77 74 FF FF FF FF FF F4 87 74 FF' + 'FF F4 FF FF F4 87 74 FF FF F4 FF F4 FF 48 C7 7C' + '7C 7C 7C 77 C7 C7 70 0F 00 F7 77 77 77 77 77 8B' + '8B 8B FF FF F4 87 74 FF FF FF FF 48 77 77 74 44' + '44 44 44 44 44 87 74 44 44 44 44 44 44 87 74 FF' + 'FF F4 FF F4 FF 48 7C CC 7C 7C 7C 77 C7 C7 77 08' + '07 77 77 77 77 07 78 B7 8B FF FF FF F4 87 74 44' + '44 44 44 48 77 77 74 44 44 44 44 44 44 87 74 44' + '44 44 44 44 44 87 74 44 44 44 44 44 44 48 77 7C' + '7C 7C 7C 77 C7 C7 77 80 0F 77 77 77 77 77 7B 77' + '8B 44 8B 44 44 87 74 44 44 44 44 47 77 77 74 44' + '44 44 44 44 44 77 74 44 44 44 44 44 44 77 74 44' + '44 44 44 44 44 47 7C C7 7C 7C 7C C7 7C 77 80 07' + '70 F7 07 07 07 07 77 77 8B 44 54 44 44 77 77 77' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 7C 77 77 77 08 77 70 00 70 70 70 77' +} +#endif + +IDB_DRIVEBAR BITMAP DISCARDABLE +#ifdef _WIN32 + "drivebar.bmp" +#else +{ + '42 4D E6 02 00 00 00 00 00 00 76 00 00 00 28 00' + '00 00 60 00 00 00 0D 00 00 00 01 00 04 00 00 00' + '00 00 70 02 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80' + '00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80' + '00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF' + '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF' + '00 00 FF FF FF 00 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 08 88 88 88 88 88 88 80 08 88' + '88 88 88 88 88 80 08 88 88 88 88 88 88 80 08 88' + '88 88 88 88 88 80 08 88 88 88 88 88 88 80 08 88' + '88 88 88 88 88 80 07 70 07 77 77 70 00 80 0F 77' + '77 77 77 77 77 80 0F 00 77 77 77 77 77 80 0F 77' + '77 77 77 79 97 80 0F 77 70 00 77 77 77 80 0F 77' + '07 07 07 07 77 80 07 77 70 07 00 00 77 80 0F 77' + '70 00 00 07 77 80 0F 00 00 00 00 00 00 80 0F 77' + '70 00 07 77 77 80 0F 77 77 07 77 77 77 80 0F 70' + '00 00 00 00 77 80 07 77 77 00 00 77 77 80 0F 00' + '00 00 00 00 00 80 0F 77 77 77 77 77 77 80 0F 77' + '07 7F 70 77 77 80 0F 77 70 00 77 77 77 80 0F 70' + '70 70 70 70 77 80 07 70 00 77 70 00 77 80 0F 77' + '70 00 00 07 77 80 0F 00 00 00 00 00 00 80 0F 00' + '87 F8 78 00 77 80 0F 00 00 70 00 00 07 80 0F 70' + '00 00 00 00 77 80 07 07 77 77 77 70 00 80 0F 77' + '77 77 77 77 70 80 0F 77 77 77 77 77 77 80 0F 00' + '00 00 00 00 77 80 0F 77 77 77 77 77 77 80 0F 77' + '07 07 07 07 77 80 07 77 77 77 77 77 77 80 0F FF' + 'FF FF FF FF FF 80 0F FF FF FF FF FF FF 80 0F FF' + 'FF FF FF FF FF 80 0F FF FF FF FF FF FF 80 0F FF' + 'FF FF FF FF FF 80 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77' + '77 77 77 77 77 77' +} +#endif + +IDB_IMAGES BITMAP DISCARDABLE +#ifdef _WIN32 + "images.bmp" +#else +{ + '42 4D 86 04 00 00 00 00 00 00 76 00 00 00 28 00' + '00 00 A0 00 00 00 0D 00 00 00 01 00 04 00 00 00' + '00 00 10 04 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80' + '00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80' + '00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF' + '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF' + '00 00 FF FF FF 00 AA AA 00 00 00 00 00 AA AA AA' + '00 00 00 00 00 AA AA 00 00 00 00 00 00 00 AA 00' + '00 00 00 00 00 00 AA A0 00 00 00 00 00 0A AA 00' + '00 00 00 00 00 00 AA A0 00 00 00 00 00 0A AA A0' + '00 00 00 00 00 0A AA AA AA AA AA AA AA AA AA AA' + 'AA AA AA AA AA AA AA A7 77 77 77 77 70 AA AA A7' + '77 77 77 77 70 AA A7 77 77 77 77 77 77 70 A7 77' + '77 77 77 77 77 80 AA 77 77 77 77 77 77 0A A7 77' + '77 77 77 77 77 80 AA 77 77 77 77 77 77 0A AA 77' + '77 77 77 77 77 0A AA AA AA AA AA AA AA AA AA AA' + 'AA AA AA AA AA AA AA A7 FF FF FF FF 70 AA AA A7' + 'FF FF FF FF 70 AA A7 7F 7F 7F 7F 7F 7F 70 A7 FB' + 'FB FB FB FB FB 80 AA 7F BF BF BF BF B7 0A A7 FB' + 'FB FB FB FB FB 80 AA 7F BF BF BF BF B7 0A AA 7F' + 'BF BF BF BF B7 0A AA AA AA 00 00 00 0A AA AA AA' + 'AA 00 AA AA AA AA AA A7 FF FF FF FF 70 AA AA A7' + 'FF 44 44 FF 70 AA A7 F7 F7 F7 F7 F7 F7 70 A7 FF' + 'BF BF BF BF BF 80 A7 FB FB FB FB FB F0 8A A7 FF' + 'BF B0 BF BF BF 80 A7 FB FB F0 FB FB F0 8A A7 FB' + 'FB FB FB FB F0 8A AA AA A0 E6 68 86 0A AA AA AA' + 'A0 E8 0A AA AA AA AA A7 FF FF FF FF 70 AA AA A7' + 'FF FF FF FF 70 AA A7 7F 7F 7F 7F 7F 7F 70 A7 FB' + 'FB FB FB FB FB 80 A7 BF BF BF BF BF 70 8A A7 FB' + 'FB F0 FB FB FB 80 A7 BF B0 00 0F BF 70 8A A7 BF' + 'B0 00 0F BF 70 8A AA AA A0 E0 00 00 AA AA AA AA' + 'A0 E8 0A AA AA AA AA A7 FF FF FF FF 70 AA AA A7' + 'FF 44 44 FF 70 AA A7 F7 F7 F7 F7 F7 F7 70 A7 FF' + 'BF BF BF BF BF 80 7B FB FB FB FB FB 88 8A A7 FF' + 'B0 00 00 BF BF 80 7B FB FB 0B FB FB 88 8A 7B FB' + 'FB FB FB FB 88 8A AA AA A0 E0 AA AA AA AA AA AA' + 'AA 00 AA AA AA AA AA A7 FF FF FF FF 70 AA AA A7' + 'FF FF FF FF 70 AA A7 7F 7F 7F 7F 7F 7F 70 A7 FB' + 'FB FB FB FB FB 80 7F FF FF FF FF F7 0F 8A A7 FB' + 'FB F0 FB FB FB 80 7F FF FF FF FF F7 0F 8A 7F FF' + 'FF FF FF F7 0F 8A AA AA A0 E0 AA AA AA AA AA AA' + 'AA AA AA AA AA AA AA A7 FF FF FF FF 70 AA AA A7' + 'FF 44 44 FF 70 AA A7 F7 F7 F7 F7 F7 F7 70 A7 FF' + 'BF BF BF BF BF 80 77 77 77 77 77 78 FB 8A A7 FF' + 'BF B0 BF BF BF 80 77 77 77 77 77 78 FB 8A 77 77' + '77 77 77 78 FB 8A AA A0 00 E0 00 AA AA AA AA AA' + 'AA AA AA AA AA AA AA A7 FF FF FF FF 70 AA AA A7' + 'FF FF FF FF 70 AA A7 7F 7F 7F 7F 7F 7F 70 A7 FB' + 'FB FB FB FB FB 80 A7 BF BF BF BF BF BF 8A A7 FB' + 'FB FB FB FB FB 80 A7 BF BF BF BF BF BF 8A A7 BF' + 'BF BF BF BF BF 8A AA A0 E6 66 60 AA AA AA AA AA' + 'AA AA AA AA AA AA AA A7 FF FF F7 77 7A AA AA A7' + 'FF 44 F7 77 7A AA A7 F7 F7 F7 F7 F7 F7 70 A7 FF' + 'FF FF FF FF FF 80 A7 FB FB FB FF FF FF 8A A7 FF' + 'FF FF FF FF FF 80 A7 FB FB FB FF FF FF 8A A7 FB' + 'FB FB FF FF FF 8A AA AA 0E 66 0A AA AA AA AA AA' + 'AA AA AA AA AA AA AA A7 FF FF F7 F7 AA AA AA A7' + 'FF FF F7 F7 AA AA A7 77 77 77 77 77 77 70 A7 FB' + 'FB FB F7 77 77 8A A7 BF BF BF F7 77 77 8A A7 FB' + 'FB FB F7 77 77 8A A7 BF BF BF F7 77 77 8A A7 BF' + 'BF BF F7 77 77 8A AA AA A0 E0 AA AA AA AA AA AA' + 'AA AA AA AA AA AA AA A7 FF FF F7 7A AA AA AA A7' + 'FF FF F7 7A AA AA A7 EE EE EE EE EE EE 70 AA 7F' + 'BF BF 7A AA AA AA AA 7F FF FF 7A AA AA AA AA 7F' + 'BF BF 7A AA AA AA AA 7F FF FF 7A AA AA AA AA 7F' + 'FF FF 7A AA AA AA AA AA AA 0A AA AA AA AA AA AA' + 'AA AA AA AA AA AA AA A7 77 77 77 AA AA AA AA A7' + '77 77 77 AA AA AA A7 77 77 77 77 77 77 7A AA A7' + '77 77 AA AA AA AA AA A7 77 77 AA AA AA AA AA A7' + '77 77 AA AA AA AA AA A7 77 77 AA AA AA AA AA A7' + '77 77 AA AA AA AA AA AA AA AA AA AA AA AA AA AA' + 'AA AA AA AA AA AA' +} +#endif diff --git a/programs/winefile/rsrc.rc b/programs/winefile/rsrc.rc new file mode 100644 index 00000000000..45980d569f1 --- /dev/null +++ b/programs/winefile/rsrc.rc @@ -0,0 +1,820 @@ +/* + * Copyright 2000 Martin Fuchs + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "windows.h" +#include "resource.h" + +/* define language neutral resources */ + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +#include "resource.rc" + +/* BINRES drivebar.bmp */ +DRIVEBAR BITMAP // DISCARDABLE //LOADONCALL +{ + '42 4D FE 0E 00 00 00 00 00 00 76 00 00 00 28 00' + '00 00 F0 01 00 00 0F 00 00 00 01 00 04 00 00 00' + '00 00 88 0E 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 10 00 00 00 00 00 00 00 00 00 80 00 00 80' + '80 00 80 80 80 00 C0 C0 C0 00 00 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 44 44 33 33 33 33 34 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '43 33 33 33 33 33 44 44 33 33 33 33 33 44 44 44' + '33 33 33 33 33 44 44 44 33 33 33 33 33 44 44 43' + '34 44 44 44 30 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '40 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 43 33 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 40 00' + '00 00 00 00 34 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 43 33 44 44 44 44 44' + '44 33 33 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 33 33 33 33 44 43' + '33 33 33 33 33 34 44 44 44 44 44 44 44 44 44 44' + '33 33 33 33 34 44 44 44 00 00 00 00 00 00 44 00' + '00 00 00 00 00 34 44 00 00 00 00 00 00 34 44 00' + '00 00 00 00 00 34 44 30 00 44 44 30 00 34 44 44' + '43 33 33 34 44 44 44 44 44 33 33 33 33 34 44 44' + '43 33 33 33 33 44 44 44 44 00 04 44 44 44 44 44' + '43 33 33 33 33 44 44 44 33 33 33 33 33 44 44 44' + '43 33 33 33 33 44 44 44 33 33 33 33 34 44 44 44' + '44 44 44 44 44 44 44 44 44 43 33 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 00 03 44 44 44 44' + '33 33 33 33 33 34 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 40 77 77 77 77 70 34 44 44 44' + '43 33 33 33 33 33 44 44 33 33 33 33 33 33 44 44' + '44 40 00 33 44 44 44 44 43 00 03 34 44 44 44 44' + '33 44 44 33 44 44 44 44 44 44 33 33 33 33 44 44' + '44 00 00 00 00 03 40 00 00 00 00 00 00 34 44 44' + '44 44 33 44 44 44 40 00 00 00 00 00 44 00 44 40' + '44 00 00 07 70 40 40 43 33 33 33 33 33 03 40 43' + '33 33 33 33 33 03 40 43 33 33 33 33 33 03 44 07' + '70 34 43 07 77 04 44 00 00 00 10 40 00 04 44 40' + '00 00 00 00 00 34 44 70 00 00 00 00 03 44 44 44' + '44 40 44 44 44 44 44 70 00 00 00 00 03 44 44 40' + '00 00 00 00 03 44 44 00 00 00 00 00 04 40 40 00' + '00 00 00 00 44 00 44 44 43 34 44 44 44 44 44 44' + '44 40 03 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 00 03 44 44 47 00 00 00 00 00 00 34 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 40 44' + '44 44 44 70 34 44 44 44 00 00 00 00 00 00 44 40' + '00 00 00 00 00 03 44 44 40 07 77 00 34 44 44 44' + '00 77 70 03 44 44 44 44 00 33 44 00 34 44 44 44' + '44 00 00 00 00 03 44 43 33 07 77 77 77 03 40 44' + '44 44 44 44 40 33 44 44 44 40 03 44 44 44 40 77' + '77 77 77 70 40 00 44 30 44 00 00 07 70 40 40 77' + '77 77 77 77 43 30 40 77 77 77 77 77 43 30 40 77' + '77 77 77 77 43 30 44 07 77 03 40 77 77 04 44 07' + '77 77 51 70 37 00 44 40 17 77 77 71 10 34 44 70' + '77 77 77 77 03 44 44 44 44 44 44 44 44 44 44 70' + '77 77 77 77 03 44 44 40 34 44 44 43 03 44 44 07' + '77 77 77 77 04 00 40 77 77 77 77 70 40 00 44 44' + '00 34 44 44 44 44 44 44 44 40 03 44 44 44 44 43' + '33 33 33 33 33 33 44 43 33 33 00 03 33 33 47 07' + '77 70 77 77 70 34 70 00 00 00 00 00 00 03 44 44' + '70 00 00 03 44 44 40 44 44 44 44 70 34 44 44 40' + '73 33 33 33 33 30 44 04 40 00 00 44 04 03 44 44' + '07 77 77 77 03 44 44 40 77 77 77 70 34 44 44 40' + '44 03 40 34 03 44 44 33 33 07 77 77 77 03 44 00' + '00 07 00 77 77 03 00 00 00 00 00 00 00 03 44 44' + '44 40 03 44 44 44 40 77 77 77 70 00 00 04 40 00' + '44 00 00 07 70 40 40 70 00 00 00 00 43 30 40 70' + '00 00 00 00 43 30 40 70 00 00 00 00 43 30 44 40' + '77 70 07 77 00 44 44 07 71 11 55 10 00 04 44 41' + '51 44 44 15 51 34 44 70 44 44 44 47 03 44 44 43' + '33 33 33 33 33 34 44 70 44 44 44 47 03 44 44 44' + '00 34 43 00 34 44 44 07 17 77 77 00 00 00 40 71' + '77 77 70 00 00 04 44 44 00 34 44 44 00 44 44 44' + '44 40 03 44 44 44 44 30 00 00 00 00 00 00 44 30' + '00 00 00 03 00 00 47 04 44 70 34 44 70 34 70 77' + '77 77 77 77 77 03 44 44 70 77 77 03 44 44 40 44' + '44 44 44 70 34 44 44 07 44 44 44 44 43 00 44 04' + '40 00 00 44 04 03 44 40 77 00 00 77 70 44 44 07' + '77 00 00 77 04 44 44 40 33 03 40 34 04 44 40 00' + '00 07 00 00 07 03 40 43 34 07 00 00 07 03 07 44' + '44 44 44 44 43 03 44 44 44 44 44 44 44 44 40 77' + '77 77 04 74 00 44 04 40 44 44 44 44 44 40 40 74' + '44 44 44 45 53 30 40 74 44 44 44 45 53 30 40 74' + '44 44 44 45 53 30 44 44 00 77 77 00 44 44 44 07' + '15 55 55 50 37 00 44 15 55 14 41 55 51 34 44 70' + '44 40 44 47 03 44 47 00 00 00 00 00 00 34 44 70' + '47 74 44 47 03 44 44 40 34 44 44 43 03 44 44 71' + '17 77 70 47 40 04 47 71 17 77 04 74 00 44 44 44' + '44 40 00 30 00 44 44 44 44 40 03 44 44 44 43 06' + '66 66 66 66 66 60 30 66 66 66 00 03 66 60 47 04' + '44 70 34 44 70 34 70 44 44 44 44 44 77 03 44 44' + '70 44 77 03 44 44 40 44 44 44 44 70 34 44 40 74' + '44 44 44 44 40 30 44 04 40 00 00 00 04 03 44 40' + '70 44 44 07 70 34 44 07 70 34 44 07 04 44 44 44' + '00 03 40 00 44 44 40 77 77 07 77 77 77 03 40 43' + '34 07 77 77 77 03 07 55 44 44 44 44 43 03 44 44' + '44 40 03 44 44 44 40 77 77 70 44 44 40 44 04 40' + '44 00 00 00 04 40 40 77 77 77 77 77 73 30 40 77' + '77 77 77 77 73 30 40 77 77 77 77 77 73 30 44 44' + '30 07 77 03 44 44 44 07 15 77 55 70 00 04 44 41' + '55 51 15 55 10 34 44 70 44 00 04 47 03 44 47 07' + '77 77 77 77 70 34 44 70 44 74 44 47 03 44 44 03' + '74 34 43 47 30 34 44 15 11 11 04 44 44 04 11 11' + '51 70 44 44 40 44 44 44 00 07 74 03 04 44 44 44' + '44 40 03 44 44 44 30 66 66 66 66 66 66 60 36 64' + '34 66 00 03 66 60 47 04 44 70 34 44 70 34 70 44' + '44 04 40 44 77 03 40 44 70 44 47 03 44 04 40 44' + '44 44 44 70 34 44 40 74 44 44 44 44 30 30 44 04' + '44 44 44 44 44 03 44 43 03 33 34 07 70 34 44 07' + '70 34 33 30 33 34 44 44 43 03 40 34 44 44 40 70' + '00 07 00 00 07 03 40 43 34 07 00 00 07 03 07 77' + '77 77 77 77 73 04 44 44 44 40 03 44 44 44 40 77' + '77 70 74 44 40 44 04 40 40 77 77 77 70 40 44 07' + '77 77 77 77 44 30 44 07 77 77 37 77 44 30 44 07' + '77 77 77 77 44 30 44 43 00 07 73 04 44 44 44 47' + '77 77 57 77 43 44 44 40 15 55 55 51 70 34 44 70' + '40 00 00 47 03 44 47 04 44 44 44 47 70 34 44 70' + '33 33 33 37 03 44 40 34 74 04 40 47 43 03 41 55' + '55 55 07 44 44 04 15 55 55 10 74 44 40 44 44 44' + '00 47 44 40 44 44 44 44 44 40 03 44 44 44 36 64' + '34 66 66 66 66 60 26 63 03 66 00 03 66 60 47 04' + '44 70 34 44 70 34 70 44 40 04 40 04 47 03 40 04' + '70 44 47 03 40 04 40 44 44 43 44 70 73 43 07 77' + '77 77 77 77 00 30 44 04 40 00 00 00 44 03 44 00' + '00 00 34 07 70 34 44 07 70 34 00 00 00 34 44 44' + '44 40 03 44 44 44 40 77 77 07 77 77 77 03 40 43' + '34 07 77 77 77 03 00 00 00 00 00 00 00 04 44 44' + '44 40 03 44 44 44 40 77 77 70 77 44 40 44 04 40' + '40 77 77 77 70 40 44 40 00 00 10 00 00 04 44 40' + '30 03 73 00 30 04 44 40 00 01 11 00 00 04 44 00' + '77 77 70 04 44 44 40 00 70 00 77 74 03 44 44 40' + '41 55 55 14 70 34 44 70 44 44 44 47 03 44 47 04' + '44 44 44 44 70 34 44 70 00 00 00 00 03 44 40 47' + '40 37 73 04 74 03 15 55 55 55 07 74 44 04 15 55' + '55 50 77 44 40 44 44 44 40 77 74 70 44 44 44 44' + '44 40 03 44 44 44 26 63 03 66 66 66 66 60 23 64' + '34 66 00 03 66 60 47 04 44 70 34 44 70 34 70 44' + '00 04 40 00 47 03 40 00 70 44 47 03 00 04 40 47' + '74 44 34 70 73 37 00 00 00 00 00 00 40 30 44 04' + '07 77 77 77 04 03 44 07 77 70 44 07 70 34 44 07' + '70 34 07 77 70 34 44 44 44 44 34 44 44 44 40 70' + '00 07 00 00 07 03 40 43 34 00 00 00 00 04 44 40' + '77 77 77 70 34 44 44 44 30 34 00 34 44 44 40 77' + '77 77 04 44 04 44 04 40 40 77 77 77 70 40 44 44' + '44 41 51 44 44 44 44 44 43 40 70 43 44 44 44 44' + '44 41 51 44 44 44 44 30 77 77 70 44 44 44 44 07' + '74 07 77 77 03 44 44 40 41 55 55 14 70 34 44 70' + '40 00 00 47 03 44 47 04 47 44 44 44 70 34 44 70' + '77 77 77 77 03 44 40 44 03 70 47 30 44 04 41 55' + '55 55 10 44 40 44 15 55 55 17 04 44 04 44 44 44' + '40 44 74 40 44 44 44 44 44 40 03 44 44 44 23 64' + '34 66 66 66 66 60 42 36 66 66 00 03 66 60 47 04' + '44 70 34 44 70 34 70 44 40 04 40 04 47 03 40 04' + '70 44 47 03 40 04 40 44 74 44 40 70 77 03 44 00' + '07 77 77 77 70 00 44 04 07 77 77 77 04 03 44 07' + '77 00 00 77 03 44 44 40 77 00 00 77 70 34 44 44' + '44 40 03 44 44 44 40 77 77 07 77 77 77 04 40 43' + '33 33 33 30 34 44 44 40 70 00 77 70 34 44 44 44' + '00 34 40 00 44 44 40 77 77 77 70 00 44 44 04 00' + '40 77 77 77 70 00 44 44 44 15 55 14 44 44 44 44' + '33 07 77 03 34 44 44 44 44 41 51 44 44 44 44 44' + '00 00 03 44 44 44 44 30 00 37 77 77 04 44 44 40' + '15 55 55 51 70 34 44 70 44 00 04 47 03 44 47 00' + '00 00 00 00 00 44 44 70 44 44 44 47 03 44 44 03' + '44 40 44 44 30 44 44 15 11 11 17 00 04 44 11 11' + '51 77 70 00 44 44 40 03 44 04 44 04 44 44 44 40' + '04 00 03 40 04 44 44 23 66 66 66 66 66 60 44 42' + '20 02 00 04 24 04 47 04 44 70 34 44 70 34 70 44' + '74 04 40 44 47 03 40 44 70 47 47 03 44 04 40 44' + '44 44 47 77 77 77 44 44 07 77 77 00 00 34 44 04' + '07 77 77 77 04 03 44 07 77 77 77 77 04 44 44 40' + '77 77 77 77 70 34 44 44 44 03 40 34 44 44 40 70' + '00 00 00 00 00 04 40 43 00 00 03 30 34 44 44 40' + '77 77 77 70 34 44 44 44 00 34 40 00 44 44 40 77' + '77 77 00 00 44 44 04 00 40 77 77 77 70 70 44 44' + '41 11 51 11 44 44 44 44 77 77 77 77 74 44 44 44' + '41 11 51 11 44 44 44 44 30 77 04 44 44 44 44 30' + '70 77 70 00 04 44 44 41 55 51 15 55 10 34 44 70' + '47 70 44 47 03 44 44 44 44 44 44 44 44 44 44 70' + '47 74 44 47 03 44 44 40 34 70 47 43 04 44 44 41' + '17 77 70 00 04 44 47 71 17 77 00 00 44 44 40 03' + '44 40 00 44 44 44 44 07 30 77 70 07 04 44 44 42' + '22 22 22 22 22 22 44 44 07 70 77 70 00 04 47 04' + '44 70 34 44 70 34 70 44 44 44 44 44 47 03 44 44' + '70 44 47 03 44 44 40 00 00 00 00 77 77 03 44 44' + '07 77 77 07 70 34 44 04 07 77 77 77 00 03 44 07' + '00 77 77 00 44 44 44 44 00 77 77 00 70 34 44 44' + '44 04 40 34 44 44 40 77 77 77 70 34 44 44 44 00' + '04 44 00 03 44 44 44 40 70 00 77 70 34 44 44 44' + '40 04 30 03 44 44 40 77 77 77 04 04 44 44 04 00' + '00 00 00 00 00 00 44 44 44 41 51 44 44 44 44 44' + '33 07 77 03 34 44 44 44 44 15 55 14 44 44 44 43' + '07 77 70 44 44 44 44 07 07 77 70 70 44 44 44 15' + '55 14 41 55 51 34 44 70 44 74 44 47 03 44 44 44' + '44 40 44 44 44 44 44 70 44 74 44 47 03 44 44 40' + '47 40 04 74 04 44 44 07 17 77 70 40 44 44 40 71' + '77 77 04 04 44 44 44 00 44 30 34 44 44 44 44 07' + '77 77 77 70 44 44 44 44 44 44 44 44 44 44 44 44' + '07 77 77 77 77 04 47 04 74 70 34 74 70 34 70 00' + '00 00 00 00 00 04 44 44 70 00 00 04 44 44 44 44' + '44 44 47 30 70 73 44 44 07 77 77 07 03 44 44 04' + '07 77 77 77 04 04 44 00 44 00 00 44 44 44 44 44' + '44 00 00 44 00 44 44 44 40 34 44 03 44 44 40 00' + '00 00 00 44 44 44 44 44 40 00 44 44 44 44 44 40' + '77 77 77 70 34 44 44 44 44 00 00 34 44 44 40 77' + '77 77 00 44 44 44 04 07 77 77 77 07 03 44 44 44' + '44 41 51 44 44 44 44 44 43 40 70 43 44 44 44 44' + '44 41 51 44 44 44 44 44 07 77 70 44 44 44 44 07' + '77 77 70 04 44 44 44 41 51 00 00 15 10 44 44 70' + '44 44 44 47 04 44 44 44 44 00 04 44 44 44 44 70' + '44 44 44 47 04 44 44 44 03 43 34 30 44 44 44 07' + '77 77 70 04 44 44 40 77 77 77 00 44 44 44 44 40' + '00 03 44 44 44 44 44 07 70 77 77 04 44 44 44 44' + '44 44 44 44 44 44 44 44 07 70 77 77 00 44 47 04' + '44 70 34 44 70 34 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 73 43 73 47 44 44' + '00 00 00 00 34 44 44 00 00 00 00 00 00 04 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '40 44 44 03 44 44 44 44 44 44 44 44 44 44 44 44' + '40 00 44 44 44 44 44 40 00 00 00 00 44 44 44 44' + '44 44 44 44 44 44 40 00 00 00 04 44 44 44 00 00' + '00 00 00 00 04 44 44 44 44 41 11 44 44 44 44 44' + '34 43 73 44 34 44 44 44 44 44 14 44 44 44 44 44' + '30 77 04 44 44 44 44 00 00 00 00 44 44 44 44 44' + '14 44 44 41 44 44 44 70 00 00 00 00 04 44 44 44' + '40 00 00 44 44 44 44 70 00 00 00 00 04 44 44 44' + '40 00 00 04 44 44 44 00 00 00 00 44 44 44 40 00' + '00 00 04 44 44 44 44 44 44 44 44 44 44 44 44 40' + '04 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44' + '40 04 00 00 44 44 47 00 00 00 00 00 00 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44' +} + + +/* BINRES images.bmp */ +IMAGES BITMAP // DISCARDABLE //LOADONCALL +{ + '42 4D FE 0E 00 00 00 00 00 00 76 00 00 00 28 00' + '00 00 F0 01 00 00 0F 00 00 00 01 00 04 00 00 00' + '00 00 88 0E 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 10 00 00 00 00 00 00 00 00 00 80 00 00 80' + '80 00 80 80 80 00 C0 C0 C0 00 00 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 44 44 33 33 33 33 34 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '43 33 33 33 33 33 44 44 33 33 33 33 33 44 44 44' + '33 33 33 33 33 44 44 44 33 33 33 33 33 44 44 43' + '34 44 44 44 30 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '40 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 43 33 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 40 00' + '00 00 00 00 34 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 43 33 44 44 44 44 44' + '44 33 33 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 33 33 33 33 44 43' + '33 33 33 33 33 34 44 44 44 44 44 44 44 44 44 44' + '33 33 33 33 34 44 44 44 00 00 00 00 00 00 44 00' + '00 00 00 00 00 34 44 00 00 00 00 00 00 34 44 00' + '00 00 00 00 00 34 44 30 00 44 44 30 00 34 44 44' + '43 33 33 34 44 44 44 44 44 33 33 33 33 34 44 44' + '43 33 33 33 33 44 44 44 44 00 04 44 44 44 44 44' + '43 33 33 33 33 44 44 44 33 33 33 33 33 44 44 44' + '43 33 33 33 33 44 44 44 33 33 33 33 34 44 44 44' + '44 44 44 44 44 44 44 44 44 43 33 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 00 03 44 44 44 44' + '33 33 33 33 33 34 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 40 77 77 77 77 70 34 44 44 44' + '43 33 33 33 33 33 44 44 33 33 33 33 33 33 44 44' + '44 40 00 33 44 44 44 44 43 00 03 34 44 44 44 44' + '33 44 44 33 44 44 44 44 44 44 33 33 33 33 44 44' + '44 00 00 00 00 03 40 00 00 00 00 00 00 34 44 44' + '44 44 33 44 44 44 40 00 00 00 00 00 44 00 44 40' + '44 00 00 07 70 40 40 43 33 33 33 33 33 03 40 43' + '33 33 33 33 33 03 40 43 33 33 33 33 33 03 44 07' + '70 34 43 07 77 04 44 00 00 00 10 40 00 04 44 40' + '00 00 00 00 00 34 44 70 00 00 00 00 03 44 44 44' + '44 40 44 44 44 44 44 70 00 00 00 00 03 44 44 40' + '00 00 00 00 03 44 44 00 00 00 00 00 04 40 40 00' + '00 00 00 00 44 00 44 44 43 34 44 44 44 44 44 44' + '44 40 03 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 00 03 44 44 47 00 00 00 00 00 00 34 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 40 44' + '44 44 44 70 34 44 44 44 00 00 00 00 00 00 44 40' + '00 00 00 00 00 03 44 44 40 07 77 00 34 44 44 44' + '00 77 70 03 44 44 44 44 00 33 44 00 34 44 44 44' + '44 00 00 00 00 03 44 43 33 07 77 77 77 03 40 44' + '44 44 44 44 40 33 44 44 44 40 03 44 44 44 40 77' + '77 77 77 70 40 00 44 30 44 00 00 07 70 40 40 77' + '77 77 77 77 43 30 40 77 77 77 77 77 43 30 40 77' + '77 77 77 77 43 30 44 07 77 03 40 77 77 04 44 07' + '77 77 51 70 37 00 44 40 17 77 77 71 10 34 44 70' + '77 77 77 77 03 44 44 44 44 44 44 44 44 44 44 70' + '77 77 77 77 03 44 44 40 34 44 44 43 03 44 44 07' + '77 77 77 77 04 00 40 77 77 77 77 70 40 00 44 44' + '00 34 44 44 44 44 44 44 44 40 03 44 44 44 44 43' + '33 33 33 33 33 33 44 43 33 33 00 03 33 33 47 07' + '77 70 77 77 70 34 70 00 00 00 00 00 00 03 44 44' + '70 00 00 03 44 44 40 44 44 44 44 70 34 44 44 40' + '73 33 33 33 33 30 44 04 40 00 00 44 04 03 44 44' + '07 77 77 77 03 44 44 40 77 77 77 70 34 44 44 40' + '44 03 40 34 03 44 44 33 33 07 77 77 77 03 44 00' + '00 07 00 77 77 03 00 00 00 00 00 00 00 03 44 44' + '44 40 03 44 44 44 40 77 77 77 70 00 00 04 40 00' + '44 00 00 07 70 40 40 70 00 00 00 00 43 30 40 70' + '00 00 00 00 43 30 40 70 00 00 00 00 43 30 44 40' + '77 70 07 77 00 44 44 07 71 11 55 10 00 04 44 41' + '51 44 44 15 51 34 44 70 44 44 44 47 03 44 44 43' + '33 33 33 33 33 34 44 70 44 44 44 47 03 44 44 44' + '00 34 43 00 34 44 44 07 17 77 77 00 00 00 40 71' + '77 77 70 00 00 04 44 44 00 34 44 44 00 44 44 44' + '44 40 03 44 44 44 44 30 00 00 00 00 00 00 44 30' + '00 00 00 03 00 00 47 04 44 70 34 44 70 34 70 77' + '77 77 77 77 77 03 44 44 70 77 77 03 44 44 40 44' + '44 44 44 70 34 44 44 07 44 44 44 44 43 00 44 04' + '40 00 00 44 04 03 44 40 77 00 00 77 70 44 44 07' + '77 00 00 77 04 44 44 40 33 03 40 34 04 44 40 00' + '00 07 00 00 07 03 40 43 34 07 00 00 07 03 07 44' + '44 44 44 44 43 03 44 44 44 44 44 44 44 44 40 77' + '77 77 04 74 00 44 04 40 44 44 44 44 44 40 40 74' + '44 44 44 45 53 30 40 74 44 44 44 45 53 30 40 74' + '44 44 44 45 53 30 44 44 00 77 77 00 44 44 44 07' + '15 55 55 50 37 00 44 15 55 14 41 55 51 34 44 70' + '44 40 44 47 03 44 47 00 00 00 00 00 00 34 44 70' + '47 74 44 47 03 44 44 40 34 44 44 43 03 44 44 71' + '17 77 70 47 40 04 47 71 17 77 04 74 00 44 44 44' + '44 40 00 30 00 44 44 44 44 40 03 44 44 44 43 06' + '66 66 66 66 66 60 30 66 66 66 00 03 66 60 47 04' + '44 70 34 44 70 34 70 44 44 44 44 44 77 03 44 44' + '70 44 77 03 44 44 40 44 44 44 44 70 34 44 40 74' + '44 44 44 44 40 30 44 04 40 00 00 00 04 03 44 40' + '70 44 44 07 70 34 44 07 70 34 44 07 04 44 44 44' + '00 03 40 00 44 44 40 77 77 07 77 77 77 03 40 43' + '34 07 77 77 77 03 07 55 44 44 44 44 43 03 44 44' + '44 40 03 44 44 44 40 77 77 70 44 44 40 44 04 40' + '44 00 00 00 04 40 40 77 77 77 77 77 73 30 40 77' + '77 77 77 77 73 30 40 77 77 77 77 77 73 30 44 44' + '30 07 77 03 44 44 44 07 15 77 55 70 00 04 44 41' + '55 51 15 55 10 34 44 70 44 00 04 47 03 44 47 07' + '77 77 77 77 70 34 44 70 44 74 44 47 03 44 44 03' + '74 34 43 47 30 34 44 15 11 11 04 44 44 04 11 11' + '51 70 44 44 40 44 44 44 00 07 74 03 04 44 44 44' + '44 40 03 44 44 44 30 66 66 66 66 66 66 60 36 64' + '34 66 00 03 66 60 47 04 44 70 34 44 70 34 70 44' + '44 04 40 44 77 03 40 44 70 44 47 03 44 04 40 44' + '44 44 44 70 34 44 40 74 44 44 44 44 30 30 44 04' + '44 44 44 44 44 03 44 43 03 33 34 07 70 34 44 07' + '70 34 33 30 33 34 44 44 43 03 40 34 44 44 40 70' + '00 07 00 00 07 03 40 43 34 07 00 00 07 03 07 77' + '77 77 77 77 73 04 44 44 44 40 03 44 44 44 40 77' + '77 70 74 44 40 44 04 40 40 77 77 77 70 40 44 07' + '77 77 77 77 44 30 44 07 77 77 37 77 44 30 44 07' + '77 77 77 77 44 30 44 43 00 07 73 04 44 44 44 47' + '77 77 57 77 43 44 44 40 15 55 55 51 70 34 44 70' + '40 00 00 47 03 44 47 04 44 44 44 47 70 34 44 70' + '33 33 33 37 03 44 40 34 74 04 40 47 43 03 41 55' + '55 55 07 44 44 04 15 55 55 10 74 44 40 44 44 44' + '00 47 44 40 44 44 44 44 44 40 03 44 44 44 36 64' + '34 66 66 66 66 60 26 63 03 66 00 03 66 60 47 04' + '44 70 34 44 70 34 70 44 40 04 40 04 47 03 40 04' + '70 44 47 03 40 04 40 44 44 43 44 70 73 43 07 77' + '77 77 77 77 00 30 44 04 40 00 00 00 44 03 44 00' + '00 00 34 07 70 34 44 07 70 34 00 00 00 34 44 44' + '44 40 03 44 44 44 40 77 77 07 77 77 77 03 40 43' + '34 07 77 77 77 03 00 00 00 00 00 00 00 04 44 44' + '44 40 03 44 44 44 40 77 77 70 77 44 40 44 04 40' + '40 77 77 77 70 40 44 40 00 00 10 00 00 04 44 40' + '30 03 73 00 30 04 44 40 00 01 11 00 00 04 44 00' + '77 77 70 04 44 44 40 00 70 00 77 74 03 44 44 40' + '41 55 55 14 70 34 44 70 44 44 44 47 03 44 47 04' + '44 44 44 44 70 34 44 70 00 00 00 00 03 44 40 47' + '40 37 73 04 74 03 15 55 55 55 07 74 44 04 15 55' + '55 50 77 44 40 44 44 44 40 77 74 70 44 44 44 44' + '44 40 03 44 44 44 26 63 03 66 66 66 66 60 23 64' + '34 66 00 03 66 60 47 04 44 70 34 44 70 34 70 44' + '00 04 40 00 47 03 40 00 70 44 47 03 00 04 40 47' + '74 44 34 70 73 37 00 00 00 00 00 00 40 30 44 04' + '07 77 77 77 04 03 44 07 77 70 44 07 70 34 44 07' + '70 34 07 77 70 34 44 44 44 44 34 44 44 44 40 70' + '00 07 00 00 07 03 40 43 34 00 00 00 00 04 44 40' + '77 77 77 70 34 44 44 44 30 34 00 34 44 44 40 77' + '77 77 04 44 04 44 04 40 40 77 77 77 70 40 44 44' + '44 41 51 44 44 44 44 44 43 40 70 43 44 44 44 44' + '44 41 51 44 44 44 44 30 77 77 70 44 44 44 44 07' + '74 07 77 77 03 44 44 40 41 55 55 14 70 34 44 70' + '40 00 00 47 03 44 47 04 47 44 44 44 70 34 44 70' + '77 77 77 77 03 44 40 44 03 70 47 30 44 04 41 55' + '55 55 10 44 40 44 15 55 55 17 04 44 04 44 44 44' + '40 44 74 40 44 44 44 44 44 40 03 44 44 44 23 64' + '34 66 66 66 66 60 42 36 66 66 00 03 66 60 47 04' + '44 70 34 44 70 34 70 44 40 04 40 04 47 03 40 04' + '70 44 47 03 40 04 40 44 74 44 40 70 77 03 44 00' + '07 77 77 77 70 00 44 04 07 77 77 77 04 03 44 07' + '77 00 00 77 03 44 44 40 77 00 00 77 70 34 44 44' + '44 40 03 44 44 44 40 77 77 07 77 77 77 04 40 43' + '33 33 33 30 34 44 44 40 70 00 77 70 34 44 44 44' + '00 34 40 00 44 44 40 77 77 77 70 00 44 44 04 00' + '40 77 77 77 70 00 44 44 44 15 55 14 44 44 44 44' + '33 07 77 03 34 44 44 44 44 41 51 44 44 44 44 44' + '00 00 03 44 44 44 44 30 00 37 77 77 04 44 44 40' + '15 55 55 51 70 34 44 70 44 00 04 47 03 44 47 00' + '00 00 00 00 00 44 44 70 44 44 44 47 03 44 44 03' + '44 40 44 44 30 44 44 15 11 11 17 00 04 44 11 11' + '51 77 70 00 44 44 40 03 44 04 44 04 44 44 44 40' + '04 00 03 40 04 44 44 23 66 66 66 66 66 60 44 42' + '20 02 00 04 24 04 47 04 44 70 34 44 70 34 70 44' + '74 04 40 44 47 03 40 44 70 47 47 03 44 04 40 44' + '44 44 47 77 77 77 44 44 07 77 77 00 00 34 44 04' + '07 77 77 77 04 03 44 07 77 77 77 77 04 44 44 40' + '77 77 77 77 70 34 44 44 44 03 40 34 44 44 40 70' + '00 00 00 00 00 04 40 43 00 00 03 30 34 44 44 40' + '77 77 77 70 34 44 44 44 00 34 40 00 44 44 40 77' + '77 77 00 00 44 44 04 00 40 77 77 77 70 70 44 44' + '41 11 51 11 44 44 44 44 77 77 77 77 74 44 44 44' + '41 11 51 11 44 44 44 44 30 77 04 44 44 44 44 30' + '70 77 70 00 04 44 44 41 55 51 15 55 10 34 44 70' + '47 70 44 47 03 44 44 44 44 44 44 44 44 44 44 70' + '47 74 44 47 03 44 44 40 34 70 47 43 04 44 44 41' + '17 77 70 00 04 44 47 71 17 77 00 00 44 44 40 03' + '44 40 00 44 44 44 44 07 30 77 70 07 04 44 44 42' + '22 22 22 22 22 22 44 44 07 70 77 70 00 04 47 04' + '44 70 34 44 70 34 70 44 44 44 44 44 47 03 44 44' + '70 44 47 03 44 44 40 00 00 00 00 77 77 03 44 44' + '07 77 77 07 70 34 44 04 07 77 77 77 00 03 44 07' + '00 77 77 00 44 44 44 44 00 77 77 00 70 34 44 44' + '44 04 40 34 44 44 40 77 77 77 70 34 44 44 44 00' + '04 44 00 03 44 44 44 40 70 00 77 70 34 44 44 44' + '40 04 30 03 44 44 40 77 77 77 04 04 44 44 04 00' + '00 00 00 00 00 00 44 44 44 41 51 44 44 44 44 44' + '33 07 77 03 34 44 44 44 44 15 55 14 44 44 44 43' + '07 77 70 44 44 44 44 07 07 77 70 70 44 44 44 15' + '55 14 41 55 51 34 44 70 44 74 44 47 03 44 44 44' + '44 40 44 44 44 44 44 70 44 74 44 47 03 44 44 40' + '47 40 04 74 04 44 44 07 17 77 70 40 44 44 40 71' + '77 77 04 04 44 44 44 00 44 30 34 44 44 44 44 07' + '77 77 77 70 44 44 44 44 44 44 44 44 44 44 44 44' + '07 77 77 77 77 04 47 04 74 70 34 74 70 34 70 00' + '00 00 00 00 00 04 44 44 70 00 00 04 44 44 44 44' + '44 44 47 30 70 73 44 44 07 77 77 07 03 44 44 04' + '07 77 77 77 04 04 44 00 44 00 00 44 44 44 44 44' + '44 00 00 44 00 44 44 44 40 34 44 03 44 44 40 00' + '00 00 00 44 44 44 44 44 40 00 44 44 44 44 44 40' + '77 77 77 70 34 44 44 44 44 00 00 34 44 44 40 77' + '77 77 00 44 44 44 04 07 77 77 77 07 03 44 44 44' + '44 41 51 44 44 44 44 44 43 40 70 43 44 44 44 44' + '44 41 51 44 44 44 44 44 07 77 70 44 44 44 44 07' + '77 77 70 04 44 44 44 41 51 00 00 15 10 44 44 70' + '44 44 44 47 04 44 44 44 44 00 04 44 44 44 44 70' + '44 44 44 47 04 44 44 44 03 43 34 30 44 44 44 07' + '77 77 70 04 44 44 40 77 77 77 00 44 44 44 44 40' + '00 03 44 44 44 44 44 07 70 77 77 04 44 44 44 44' + '44 44 44 44 44 44 44 44 07 70 77 77 00 44 47 04' + '44 70 34 44 70 34 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 73 43 73 47 44 44' + '00 00 00 00 34 44 44 00 00 00 00 00 00 04 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '40 44 44 03 44 44 44 44 44 44 44 44 44 44 44 44' + '40 00 44 44 44 44 44 40 00 00 00 00 44 44 44 44' + '44 44 44 44 44 44 40 00 00 00 04 44 44 44 00 00' + '00 00 00 00 04 44 44 44 44 41 11 44 44 44 44 44' + '34 43 73 44 34 44 44 44 44 44 14 44 44 44 44 44' + '30 77 04 44 44 44 44 00 00 00 00 44 44 44 44 44' + '14 44 44 41 44 44 44 70 00 00 00 00 04 44 44 44' + '40 00 00 44 44 44 44 70 00 00 00 00 04 44 44 44' + '40 00 00 04 44 44 44 00 00 00 00 44 44 44 40 00' + '00 00 04 44 44 44 44 44 44 44 44 44 44 44 44 40' + '04 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44' + '40 04 00 00 44 44 47 00 00 00 00 00 00 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44' +} + +/* BINRES toolbar.bmp */ +TOOLBAR BITMAP // DISCARDABLE // LOADONCALL +{ + '42 4D FE 0E 00 00 00 00 00 00 76 00 00 00 28 00' + '00 00 F0 01 00 00 0F 00 00 00 01 00 04 00 00 00' + '00 00 88 0E 00 00 00 00 00 00 00 00 00 00 10 00' + '00 00 10 00 00 00 00 00 00 00 00 00 80 00 00 80' + '80 00 80 80 80 00 C0 C0 C0 00 00 00 FF 00 00 FF' + 'FF 00 FF FF FF 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 44 44 33 33 33 33 34 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '43 33 33 33 33 33 44 44 33 33 33 33 33 44 44 44' + '33 33 33 33 33 44 44 44 33 33 33 33 33 44 44 43' + '34 44 44 44 30 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '40 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 43 33 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 40 00' + '00 00 00 00 34 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 43 33 44 44 44 44 44' + '44 33 33 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 33 33 33 33 44 43' + '33 33 33 33 33 34 44 44 44 44 44 44 44 44 44 44' + '33 33 33 33 34 44 44 44 00 00 00 00 00 00 44 00' + '00 00 00 00 00 34 44 00 00 00 00 00 00 34 44 00' + '00 00 00 00 00 34 44 30 00 44 44 30 00 34 44 44' + '43 33 33 34 44 44 44 44 44 33 33 33 33 34 44 44' + '43 33 33 33 33 44 44 44 44 00 04 44 44 44 44 44' + '43 33 33 33 33 44 44 44 33 33 33 33 33 44 44 44' + '43 33 33 33 33 44 44 44 33 33 33 33 34 44 44 44' + '44 44 44 44 44 44 44 44 44 43 33 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 00 03 44 44 44 44' + '33 33 33 33 33 34 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 40 77 77 77 77 70 34 44 44 44' + '43 33 33 33 33 33 44 44 33 33 33 33 33 33 44 44' + '44 40 00 33 44 44 44 44 43 00 03 34 44 44 44 44' + '33 44 44 33 44 44 44 44 44 44 33 33 33 33 44 44' + '44 00 00 00 00 03 40 00 00 00 00 00 00 34 44 44' + '44 44 33 44 44 44 40 00 00 00 00 00 44 00 44 40' + '44 00 00 07 70 40 40 43 33 33 33 33 33 03 40 43' + '33 33 33 33 33 03 40 43 33 33 33 33 33 03 44 07' + '70 34 43 07 77 04 44 00 00 00 10 40 00 04 44 40' + '00 00 00 00 00 34 44 70 00 00 00 00 03 44 44 44' + '44 40 44 44 44 44 44 70 00 00 00 00 03 44 44 40' + '00 00 00 00 03 44 44 00 00 00 00 00 04 40 40 00' + '00 00 00 00 44 00 44 44 43 34 44 44 44 44 44 44' + '44 40 03 44 44 44 44 44 44 44 44 44 44 44 44 44' + '44 44 00 03 44 44 47 00 00 00 00 00 00 34 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 40 44' + '44 44 44 70 34 44 44 44 00 00 00 00 00 00 44 40' + '00 00 00 00 00 03 44 44 40 07 77 00 34 44 44 44' + '00 77 70 03 44 44 44 44 00 33 44 00 34 44 44 44' + '44 00 00 00 00 03 44 43 33 07 77 77 77 03 40 44' + '44 44 44 44 40 33 44 44 44 40 03 44 44 44 40 77' + '77 77 77 70 40 00 44 30 44 00 00 07 70 40 40 77' + '77 77 77 77 43 30 40 77 77 77 77 77 43 30 40 77' + '77 77 77 77 43 30 44 07 77 03 40 77 77 04 44 07' + '77 77 51 70 37 00 44 40 17 77 77 71 10 34 44 70' + '77 77 77 77 03 44 44 44 44 44 44 44 44 44 44 70' + '77 77 77 77 03 44 44 40 34 44 44 43 03 44 44 07' + '77 77 77 77 04 00 40 77 77 77 77 70 40 00 44 44' + '00 34 44 44 44 44 44 44 44 40 03 44 44 44 44 43' + '33 33 33 33 33 33 44 43 33 33 00 03 33 33 47 07' + '77 70 77 77 70 34 70 00 00 00 00 00 00 03 44 44' + '70 00 00 03 44 44 40 44 44 44 44 70 34 44 44 40' + '73 33 33 33 33 30 44 04 40 00 00 44 04 03 44 44' + '07 77 77 77 03 44 44 40 77 77 77 70 34 44 44 40' + '44 03 40 34 03 44 44 33 33 07 77 77 77 03 44 00' + '00 07 00 77 77 03 00 00 00 00 00 00 00 03 44 44' + '44 40 03 44 44 44 40 77 77 77 70 00 00 04 40 00' + '44 00 00 07 70 40 40 70 00 00 00 00 43 30 40 70' + '00 00 00 00 43 30 40 70 00 00 00 00 43 30 44 40' + '77 70 07 77 00 44 44 07 71 11 55 10 00 04 44 41' + '51 44 44 15 51 34 44 70 44 44 44 47 03 44 44 43' + '33 33 33 33 33 34 44 70 44 44 44 47 03 44 44 44' + '00 34 43 00 34 44 44 07 17 77 77 00 00 00 40 71' + '77 77 70 00 00 04 44 44 00 34 44 44 00 44 44 44' + '44 40 03 44 44 44 44 30 00 00 00 00 00 00 44 30' + '00 00 00 03 00 00 47 04 44 70 34 44 70 34 70 77' + '77 77 77 77 77 03 44 44 70 77 77 03 44 44 40 44' + '44 44 44 70 34 44 44 07 44 44 44 44 43 00 44 04' + '40 00 00 44 04 03 44 40 77 00 00 77 70 44 44 07' + '77 00 00 77 04 44 44 40 33 03 40 34 04 44 40 00' + '00 07 00 00 07 03 40 43 34 07 00 00 07 03 07 44' + '44 44 44 44 43 03 44 44 44 44 44 44 44 44 40 77' + '77 77 04 74 00 44 04 40 44 44 44 44 44 40 40 74' + '44 44 44 45 53 30 40 74 44 44 44 45 53 30 40 74' + '44 44 44 45 53 30 44 44 00 77 77 00 44 44 44 07' + '15 55 55 50 37 00 44 15 55 14 41 55 51 34 44 70' + '44 40 44 47 03 44 47 00 00 00 00 00 00 34 44 70' + '47 74 44 47 03 44 44 40 34 44 44 43 03 44 44 71' + '17 77 70 47 40 04 47 71 17 77 04 74 00 44 44 44' + '44 40 00 30 00 44 44 44 44 40 03 44 44 44 43 06' + '66 66 66 66 66 60 30 66 66 66 00 03 66 60 47 04' + '44 70 34 44 70 34 70 44 44 44 44 44 77 03 44 44' + '70 44 77 03 44 44 40 44 44 44 44 70 34 44 40 74' + '44 44 44 44 40 30 44 04 40 00 00 00 04 03 44 40' + '70 44 44 07 70 34 44 07 70 34 44 07 04 44 44 44' + '00 03 40 00 44 44 40 77 77 07 77 77 77 03 40 43' + '34 07 77 77 77 03 07 55 44 44 44 44 43 03 44 44' + '44 40 03 44 44 44 40 77 77 70 44 44 40 44 04 40' + '44 00 00 00 04 40 40 77 77 77 77 77 73 30 40 77' + '77 77 77 77 73 30 40 77 77 77 77 77 73 30 44 44' + '30 07 77 03 44 44 44 07 15 77 55 70 00 04 44 41' + '55 51 15 55 10 34 44 70 44 00 04 47 03 44 47 07' + '77 77 77 77 70 34 44 70 44 74 44 47 03 44 44 03' + '74 34 43 47 30 34 44 15 11 11 04 44 44 04 11 11' + '51 70 44 44 40 44 44 44 00 07 74 03 04 44 44 44' + '44 40 03 44 44 44 30 66 66 66 66 66 66 60 36 64' + '34 66 00 03 66 60 47 04 44 70 34 44 70 34 70 44' + '44 04 40 44 77 03 40 44 70 44 47 03 44 04 40 44' + '44 44 44 70 34 44 40 74 44 44 44 44 30 30 44 04' + '44 44 44 44 44 03 44 43 03 33 34 07 70 34 44 07' + '70 34 33 30 33 34 44 44 43 03 40 34 44 44 40 70' + '00 07 00 00 07 03 40 43 34 07 00 00 07 03 07 77' + '77 77 77 77 73 04 44 44 44 40 03 44 44 44 40 77' + '77 70 74 44 40 44 04 40 40 77 77 77 70 40 44 07' + '77 77 77 77 44 30 44 07 77 77 37 77 44 30 44 07' + '77 77 77 77 44 30 44 43 00 07 73 04 44 44 44 47' + '77 77 57 77 43 44 44 40 15 55 55 51 70 34 44 70' + '40 00 00 47 03 44 47 04 44 44 44 47 70 34 44 70' + '33 33 33 37 03 44 40 34 74 04 40 47 43 03 41 55' + '55 55 07 44 44 04 15 55 55 10 74 44 40 44 44 44' + '00 47 44 40 44 44 44 44 44 40 03 44 44 44 36 64' + '34 66 66 66 66 60 26 63 03 66 00 03 66 60 47 04' + '44 70 34 44 70 34 70 44 40 04 40 04 47 03 40 04' + '70 44 47 03 40 04 40 44 44 43 44 70 73 43 07 77' + '77 77 77 77 00 30 44 04 40 00 00 00 44 03 44 00' + '00 00 34 07 70 34 44 07 70 34 00 00 00 34 44 44' + '44 40 03 44 44 44 40 77 77 07 77 77 77 03 40 43' + '34 07 77 77 77 03 00 00 00 00 00 00 00 04 44 44' + '44 40 03 44 44 44 40 77 77 70 77 44 40 44 04 40' + '40 77 77 77 70 40 44 40 00 00 10 00 00 04 44 40' + '30 03 73 00 30 04 44 40 00 01 11 00 00 04 44 00' + '77 77 70 04 44 44 40 00 70 00 77 74 03 44 44 40' + '41 55 55 14 70 34 44 70 44 44 44 47 03 44 47 04' + '44 44 44 44 70 34 44 70 00 00 00 00 03 44 40 47' + '40 37 73 04 74 03 15 55 55 55 07 74 44 04 15 55' + '55 50 77 44 40 44 44 44 40 77 74 70 44 44 44 44' + '44 40 03 44 44 44 26 63 03 66 66 66 66 60 23 64' + '34 66 00 03 66 60 47 04 44 70 34 44 70 34 70 44' + '00 04 40 00 47 03 40 00 70 44 47 03 00 04 40 47' + '74 44 34 70 73 37 00 00 00 00 00 00 40 30 44 04' + '07 77 77 77 04 03 44 07 77 70 44 07 70 34 44 07' + '70 34 07 77 70 34 44 44 44 44 34 44 44 44 40 70' + '00 07 00 00 07 03 40 43 34 00 00 00 00 04 44 40' + '77 77 77 70 34 44 44 44 30 34 00 34 44 44 40 77' + '77 77 04 44 04 44 04 40 40 77 77 77 70 40 44 44' + '44 41 51 44 44 44 44 44 43 40 70 43 44 44 44 44' + '44 41 51 44 44 44 44 30 77 77 70 44 44 44 44 07' + '74 07 77 77 03 44 44 40 41 55 55 14 70 34 44 70' + '40 00 00 47 03 44 47 04 47 44 44 44 70 34 44 70' + '77 77 77 77 03 44 40 44 03 70 47 30 44 04 41 55' + '55 55 10 44 40 44 15 55 55 17 04 44 04 44 44 44' + '40 44 74 40 44 44 44 44 44 40 03 44 44 44 23 64' + '34 66 66 66 66 60 42 36 66 66 00 03 66 60 47 04' + '44 70 34 44 70 34 70 44 40 04 40 04 47 03 40 04' + '70 44 47 03 40 04 40 44 74 44 40 70 77 03 44 00' + '07 77 77 77 70 00 44 04 07 77 77 77 04 03 44 07' + '77 00 00 77 03 44 44 40 77 00 00 77 70 34 44 44' + '44 40 03 44 44 44 40 77 77 07 77 77 77 04 40 43' + '33 33 33 30 34 44 44 40 70 00 77 70 34 44 44 44' + '00 34 40 00 44 44 40 77 77 77 70 00 44 44 04 00' + '40 77 77 77 70 00 44 44 44 15 55 14 44 44 44 44' + '33 07 77 03 34 44 44 44 44 41 51 44 44 44 44 44' + '00 00 03 44 44 44 44 30 00 37 77 77 04 44 44 40' + '15 55 55 51 70 34 44 70 44 00 04 47 03 44 47 00' + '00 00 00 00 00 44 44 70 44 44 44 47 03 44 44 03' + '44 40 44 44 30 44 44 15 11 11 17 00 04 44 11 11' + '51 77 70 00 44 44 40 03 44 04 44 04 44 44 44 40' + '04 00 03 40 04 44 44 23 66 66 66 66 66 60 44 42' + '20 02 00 04 24 04 47 04 44 70 34 44 70 34 70 44' + '74 04 40 44 47 03 40 44 70 47 47 03 44 04 40 44' + '44 44 47 77 77 77 44 44 07 77 77 00 00 34 44 04' + '07 77 77 77 04 03 44 07 77 77 77 77 04 44 44 40' + '77 77 77 77 70 34 44 44 44 03 40 34 44 44 40 70' + '00 00 00 00 00 04 40 43 00 00 03 30 34 44 44 40' + '77 77 77 70 34 44 44 44 00 34 40 00 44 44 40 77' + '77 77 00 00 44 44 04 00 40 77 77 77 70 70 44 44' + '41 11 51 11 44 44 44 44 77 77 77 77 74 44 44 44' + '41 11 51 11 44 44 44 44 30 77 04 44 44 44 44 30' + '70 77 70 00 04 44 44 41 55 51 15 55 10 34 44 70' + '47 70 44 47 03 44 44 44 44 44 44 44 44 44 44 70' + '47 74 44 47 03 44 44 40 34 70 47 43 04 44 44 41' + '17 77 70 00 04 44 47 71 17 77 00 00 44 44 40 03' + '44 40 00 44 44 44 44 07 30 77 70 07 04 44 44 42' + '22 22 22 22 22 22 44 44 07 70 77 70 00 04 47 04' + '44 70 34 44 70 34 70 44 44 44 44 44 47 03 44 44' + '70 44 47 03 44 44 40 00 00 00 00 77 77 03 44 44' + '07 77 77 07 70 34 44 04 07 77 77 77 00 03 44 07' + '00 77 77 00 44 44 44 44 00 77 77 00 70 34 44 44' + '44 04 40 34 44 44 40 77 77 77 70 34 44 44 44 00' + '04 44 00 03 44 44 44 40 70 00 77 70 34 44 44 44' + '40 04 30 03 44 44 40 77 77 77 04 04 44 44 04 00' + '00 00 00 00 00 00 44 44 44 41 51 44 44 44 44 44' + '33 07 77 03 34 44 44 44 44 15 55 14 44 44 44 43' + '07 77 70 44 44 44 44 07 07 77 70 70 44 44 44 15' + '55 14 41 55 51 34 44 70 44 74 44 47 03 44 44 44' + '44 40 44 44 44 44 44 70 44 74 44 47 03 44 44 40' + '47 40 04 74 04 44 44 07 17 77 70 40 44 44 40 71' + '77 77 04 04 44 44 44 00 44 30 34 44 44 44 44 07' + '77 77 77 70 44 44 44 44 44 44 44 44 44 44 44 44' + '07 77 77 77 77 04 47 04 74 70 34 74 70 34 70 00' + '00 00 00 00 00 04 44 44 70 00 00 04 44 44 44 44' + '44 44 47 30 70 73 44 44 07 77 77 07 03 44 44 04' + '07 77 77 77 04 04 44 00 44 00 00 44 44 44 44 44' + '44 00 00 44 00 44 44 44 40 34 44 03 44 44 40 00' + '00 00 00 44 44 44 44 44 40 00 44 44 44 44 44 40' + '77 77 77 70 34 44 44 44 44 00 00 34 44 44 40 77' + '77 77 00 44 44 44 04 07 77 77 77 07 03 44 44 44' + '44 41 51 44 44 44 44 44 43 40 70 43 44 44 44 44' + '44 41 51 44 44 44 44 44 07 77 70 44 44 44 44 07' + '77 77 70 04 44 44 44 41 51 00 00 15 10 44 44 70' + '44 44 44 47 04 44 44 44 44 00 04 44 44 44 44 70' + '44 44 44 47 04 44 44 44 03 43 34 30 44 44 44 07' + '77 77 70 04 44 44 40 77 77 77 00 44 44 44 44 40' + '00 03 44 44 44 44 44 07 70 77 77 04 44 44 44 44' + '44 44 44 44 44 44 44 44 07 70 77 77 00 44 47 04' + '44 70 34 44 70 34 44 44 44 44 44 44 44 44 44 44' + '44 44 44 44 44 44 44 44 44 44 73 43 73 47 44 44' + '00 00 00 00 34 44 44 00 00 00 00 00 00 04 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44' + '40 44 44 03 44 44 44 44 44 44 44 44 44 44 44 44' + '40 00 44 44 44 44 44 40 00 00 00 00 44 44 44 44' + '44 44 44 44 44 44 40 00 00 00 04 44 44 44 00 00' + '00 00 00 00 04 44 44 44 44 41 11 44 44 44 44 44' + '34 43 73 44 34 44 44 44 44 44 14 44 44 44 44 44' + '30 77 04 44 44 44 44 00 00 00 00 44 44 44 44 44' + '14 44 44 41 44 44 44 70 00 00 00 00 04 44 44 44' + '40 00 00 44 44 44 44 70 00 00 00 00 04 44 44 44' + '40 00 00 04 44 44 44 00 00 00 00 44 44 44 40 00' + '00 00 04 44 44 44 44 44 44 44 44 44 44 44 44 40' + '04 00 00 44 44 44 44 44 44 44 44 44 44 44 44 44' + '40 04 00 00 44 44 47 00 00 00 00 00 00 44 44 44' + '44 44 44 44 44 44 44 44 44 44 44 44 44 44' +} + +/* BINRES winefile.ico */ +WINEFILE ICON // DISCARDABLE // LOADONCALL +{ + '00 00 01 00 01 00 20 20 04 00 00 00 00 00 E8 02' + '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00' + '00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 80 00 00 80 00 00 00 80 80 00 80 00' + '00 00 80 00 80 00 80 80 00 00 80 80 80 00 C0 C0' + 'C0 00 00 00 FF 00 00 FF 00 00 00 FF FF 00 FF 00' + '00 00 FF 00 FF 00 FF FF 00 00 FF FF FF 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 07 77 77 77 77 77 77 77 77 70 00 00' + '00 00 00 00 77 77 77 77 77 77 77 77 77 70 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 07 70 00 00' + '00 00 00 08 88 07 77 77 77 70 88 08 07 70 00 00' + '00 00 00 88 88 07 70 07 77 70 88 08 07 70 00 00' + '00 00 70 88 88 07 70 07 77 70 88 08 07 70 00 00' + '00 00 00 88 88 07 70 07 77 70 88 08 07 70 00 00' + '00 08 80 88 88 07 77 77 77 70 88 08 07 70 00 00' + '00 88 80 88 88 00 00 00 00 00 00 08 07 70 00 00' + '70 88 80 88 88 88 88 88 88 88 88 88 07 70 00 00' + '00 88 80 88 88 88 88 88 88 88 88 88 07 70 00 08' + '80 88 80 80 00 00 00 00 00 00 00 08 07 70 00 88' + '80 88 80 80 FF FF FF FF FF FF FF 08 07 70 00 88' + '80 88 80 80 FF FF FF FF FF FF FF 08 07 70 00 88' + '80 88 80 80 FF FF FF FF FF FF FF 08 07 70 00 88' + '80 80 00 80 FF FF FF FF FF FF FF 08 07 70 00 88' + '80 80 F0 80 FF FF FF FF FF FF FF 08 07 70 00 88' + '80 80 F0 80 FF FF FF FF FF FF FF 08 07 70 00 88' + '80 80 F0 80 FF FF FF FF FF FF FF 08 07 70 00 80' + '00 80 F0 80 FF FF FF FF FF FF FF 08 07 70 00 80' + 'F0 80 F0 80 FF FF FF FF FF FF FF 08 07 70 00 80' + 'F0 80 F0 80 FF FF FF FF FF FF FF 08 00 00 00 80' + 'F0 80 FF 00 00 00 00 00 00 00 00 00 00 00 00 80' + 'F0 80 FF FF FF FF FF FF FF 08 07 70 00 00 00 80' + 'F0 80 FF FF FF FF FF FF FF 08 07 70 00 00 00 80' + 'F0 80 FF FF FF FF FF FF FF 08 00 00 00 00 00 80' + 'FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80' + 'FF FF FF FF FF FF FF 08 07 70 00 00 00 00 00 80' + 'FF FF FF FF FF FF FF 08 07 70 00 00 00 00 00 80' + 'FF FF FF FF FF FF FF 08 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF' + 'FF FF FF F8 00 01 FF F0 00 01 FF E0 00 01 FF C0' + '00 01 FF 80 00 01 FF 00 00 01 FE 00 00 01 FC 00' + '00 01 F8 00 00 01 F0 00 00 01 E0 00 00 01 C0 00' + '00 01 80 00 00 01 80 00 00 01 80 00 00 01 80 00' + '00 01 80 00 00 01 80 00 00 01 80 00 00 01 80 00' + '00 01 80 00 00 01 80 00 00 07 80 00 00 07 80 00' + '00 1F 80 00 00 1F 80 00 00 7F 80 00 00 7F 80 00' + '01 FF 80 00 01 FF 80 00 07 FF C0 00 07 FF' +} + +/* include localised resources */ + +#include "De.rc" +#include "En.rc" diff --git a/programs/winefile/splitpath.c b/programs/winefile/splitpath.c new file mode 100644 index 00000000000..6453194396d --- /dev/null +++ b/programs/winefile/splitpath.c @@ -0,0 +1,151 @@ +/* + * Copyright 2000 Martin Fuchs + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "winefile.h" + +#ifdef UNICODE + +void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext) +{ + const WCHAR* end; // end of processed string + const WCHAR* p; // search pointer + const WCHAR* s; // copy pointer + + // extract drive name + if (path[0] && path[1]==':') { + if (drv) { + *drv++ = *path++; + *drv++ = *path++; + *drv = L'\0'; + } + } else if (drv) + *drv = L'\0'; + + // search for end of string or stream separator + for(end=path; *end && *end!=L':'; ) + end++; + + // search for begin of file extension + for(p=end; p>path && *--p!=L'\\' && *p!=L'/'; ) + if (*p == L'.') { + end = p; + break; + } + + if (ext) + for(s=end; *ext=*s++; ) + ext++; + + // search for end of directory name + for(p=end; p>path; ) + if (*--p=='\\' || *p=='/') { + p++; + break; + } + + if (name) { + for(s=p; spath && *--p!='\\' && *p!='/'; ) + if (*p == '.') { + end = p; + break; + } + + if (ext) + for(s=end; (*ext=*s++); ) + ext++; + + // search for end of directory name + for(p=end; p>path; ) + if (*--p=='\\' || *p=='/') { + p++; + break; + } + + if (name) { + for(s=p; s +#include +#include +#include +#endif + +#ifdef _NO_EXTENSIONS +#undef _LEFT_FILES +#endif + +#ifndef _MAX_PATH +#define _MAX_DRIVE 3 +#define _MAX_FNAME 256 +#define _MAX_DIR _MAX_FNAME +#define _MAX_EXT _MAX_FNAME +#define _MAX_PATH 260 +#endif + +WINEFILE_GLOBALS Globals; + +extern void WineLicense(HWND hWnd); +extern void WineWarranty(HWND hWnd); + +typedef struct _Entry { + struct _Entry* next; + struct _Entry* down; + struct _Entry* up; + + BOOL expanded; + BOOL scanned; + int level; + + WIN32_FIND_DATA data; + +#ifndef _NO_EXTENSIONS + BY_HANDLE_FILE_INFORMATION bhfi; + BOOL bhfi_valid; + BOOL unix_dir; +#endif +} Entry; + +typedef struct { + Entry entry; + TCHAR path[MAX_PATH]; + TCHAR volname[_MAX_FNAME]; + TCHAR fs[_MAX_DIR]; + DWORD drive_type; + DWORD fs_flags; +} Root; + +enum COLUMN_FLAGS { + COL_SIZE = 0x01, + COL_DATE = 0x02, + COL_TIME = 0x04, + COL_ATTRIBUTES = 0x08, + COL_DOSNAMES = 0x10, +#ifdef _NO_EXTENSIONS + COL_ALL = COL_SIZE|COL_DATE|COL_TIME|COL_ATTRIBUTES|COL_DOSNAMES +#else + COL_INDEX = 0x20, + COL_LINKS = 0x40, + COL_ALL = COL_SIZE|COL_DATE|COL_TIME|COL_ATTRIBUTES|COL_DOSNAMES|COL_INDEX|COL_LINKS +#endif +}; + +typedef enum { + SORT_NAME, + SORT_EXT, + SORT_SIZE, + SORT_DATE +} SORT_ORDER; + +typedef struct { + HWND hwnd; +#ifndef _NO_EXTENSIONS + HWND hwndHeader; +#endif + +#ifndef _NO_EXTENSIONS +#define COLUMNS 10 +#else +#define COLUMNS 5 +#endif + int widths[COLUMNS]; + int positions[COLUMNS+1]; + + BOOL treePane; + int visible_cols; + Entry* root; + Entry* cur; +} Pane; + +typedef struct { + HWND hwnd; + Pane left; + Pane right; + int focus_pane; // 0: left 1: right + WINDOWPLACEMENT pos; + int split_pos; + BOOL header_wdths_ok; + + TCHAR path[MAX_PATH]; + Root root; + + SORT_ORDER sortOrder; +} ChildWnd; + + +static void read_directory(Entry* parent, LPCTSTR path, int sortOrder); +static void set_curdir(ChildWnd* child, Entry* entry); + +LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam); +LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam); +LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam); + + +static void display_error(HWND hwnd, DWORD error) +{ + PTSTR msg; + + if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, + 0, error, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), (PTSTR)&msg, 0, NULL)) + MessageBox(hwnd, msg, _T("Winefile"), MB_OK); + else + MessageBox(hwnd, _T("Error"), _T("Winefile"), MB_OK); + + LocalFree(msg); +} + + +static void read_directory_win(Entry* parent, LPCTSTR path) +{ + Entry* entry = (Entry*) malloc(sizeof(Entry)); + int level = parent->level + 1; + Entry* last = 0; + HANDLE hFind; +#ifndef _NO_EXTENSIONS + HANDLE hFile; +#endif + + TCHAR buffer[MAX_PATH], *p; + for(p=buffer; *path; ) + *p++ = *path++; + + lstrcpy(p, _T("\\*")); + + hFind = FindFirstFile(buffer, &entry->data); + + if (hFind != INVALID_HANDLE_VALUE) { + parent->down = entry; + + do { + entry->down = 0; + entry->up = parent; + entry->expanded = FALSE; + entry->scanned = FALSE; + entry->level = level; + +#ifdef _NO_EXTENSIONS + // hide directory entry "." + if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + LPCTSTR name = entry->data.cFileName; + + if (name[0]=='.' && name[1]=='\0') + continue; + } +#else + entry->unix_dir = FALSE; + entry->bhfi_valid = FALSE; + + lstrcpy(p+1, entry->data.cFileName); + + hFile = CreateFile(buffer, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, + 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); + + if (hFile != INVALID_HANDLE_VALUE) { + if (GetFileInformationByHandle(hFile, &entry->bhfi)) + entry->bhfi_valid = TRUE; + + CloseHandle(hFile); + } +#endif + + last = entry; + + entry = (Entry*) malloc(sizeof(Entry)); + + if (last) + last->next = entry; + } while(FindNextFile(hFind, &entry->data)); + + last->next = 0; + + FindClose(hFind); + } else + parent->down = 0; + + free(entry); + + parent->scanned = TRUE; +} + + +static Entry* find_entry_win(Entry* parent, LPCTSTR name) +{ + Entry* entry; + + for(entry=parent->down; entry; entry=entry->next) { + LPCTSTR p = name; + LPCTSTR q = entry->data.cFileName; + + do { + if (!*p || *p==_T('\\') || *p==_T('/')) + return entry; + } while(tolower(*p++) == tolower(*q++)); + + p = name; + q = entry->data.cAlternateFileName; + + do { + if (!*p || *p==_T('\\') || *p==_T('/')) + return entry; + } while(tolower(*p++) == tolower(*q++)); + } + + return 0; +} + + +static Entry* read_tree_win(Root* root, LPCTSTR path, int sortOrder) +{ + TCHAR buffer[MAX_PATH]; + Entry* entry = &root->entry; + LPCTSTR s = path; + PTSTR d = buffer; + +#ifndef _NO_EXTENSIONS + entry->unix_dir = FALSE; +#endif + + while(entry) { + while(*s && *s!=_T('\\') && *s!=_T('/')) + *d++ = *s++; + + while(*s==_T('\\') || *s==_T('/')) + s++; + + *d++ = _T('\\'); + *d = _T('\0'); + + read_directory(entry, buffer, sortOrder); + + if (entry->down) + entry->expanded = TRUE; + + if (!*s) + break; + + entry = find_entry_win(entry, s); + } + + return entry; +} + + +#if !defined(_NO_EXTENSIONS) && defined(__linux__) + +BOOL to_filetime(const time_t* t, FILETIME* ftime) +{ + struct tm* tm = gmtime(t); + SYSTEMTIME stime; + + if (!tm) + return FALSE; + + stime.wYear = tm->tm_year+1900; + stime.wMonth = tm->tm_mon+1; +// stime.wDayOfWeek + stime.wDay = tm->tm_mday; + stime.wHour = tm->tm_hour; + stime.wMinute = tm->tm_min; + stime.wSecond = tm->tm_sec; + + return SystemTimeToFileTime(&stime, ftime); +} + +static void read_directory_unix(Entry* parent, LPCTSTR path) +{ + Entry* entry = (Entry*) malloc(sizeof(Entry)); + int level = parent->level + 1; + Entry* last = 0; + + DIR* dir = opendir(path); + + if (dir) { + struct stat st; + struct dirent* ent; + TCHAR buffer[MAX_PATH], *p; + + for(p=buffer; *path; ) + *p++ = *path++; + + if (p==buffer || p[-1]!='/') + *p++ = '/'; + + parent->down = entry; + + while((ent=readdir(dir))) { + entry->unix_dir = TRUE; + lstrcpy(entry->data.cFileName, ent->d_name); + entry->data.dwFileAttributes = ent->d_name[0]=='.'? FILE_ATTRIBUTE_HIDDEN: 0; + + strcpy(p, ent->d_name); + + if (!stat(buffer, &st)) { + if (S_ISDIR(st.st_mode)) + entry->data.dwFileAttributes |= FILE_ATTRIBUTE_DIRECTORY; + + entry->data.nFileSizeLow = st.st_size & 0xFFFFFFFF; + entry->data.nFileSizeHigh = st.st_size >> 32; + + memset(&entry->data.ftCreationTime, 0, sizeof(FILETIME)); + to_filetime(&st.st_atime, &entry->data.ftLastAccessTime); + to_filetime(&st.st_mtime, &entry->data.ftLastWriteTime); + + entry->bhfi.nFileIndexLow = ent->d_ino; + entry->bhfi.nFileIndexHigh = 0; + + entry->bhfi.nNumberOfLinks = st.st_nlink; + + entry->bhfi_valid = TRUE; + } else { + entry->data.nFileSizeLow = 0; + entry->data.nFileSizeHigh = 0; + entry->bhfi_valid = FALSE; + } + + entry->down = 0; + entry->up = parent; + entry->expanded = FALSE; + entry->scanned = FALSE; + entry->level = level; + + last = entry; + + entry = (Entry*) malloc(sizeof(Entry)); + + if (last) + last->next = entry; + } + + last->next = 0; + + closedir(dir); + } else + parent->down = 0; + + free(entry); + + parent->scanned = TRUE; +} + +static Entry* find_entry_unix(Entry* parent, LPCTSTR name) +{ + Entry* entry; + + for(entry=parent->down; entry; entry=entry->next) { + LPCTSTR p = name; + LPCTSTR q = entry->data.cFileName; + + do { + if (!*p || *p==_T('/')) + return entry; + } while(*p++ == *q++); + } + + return 0; +} + +static Entry* read_tree_unix(Root* root, LPCTSTR path, int sortOrder) +{ + TCHAR buffer[MAX_PATH]; + Entry* entry = &root->entry; + LPCTSTR s = path; + PTSTR d = buffer; + + entry->unix_dir = TRUE; + + while(entry) { + while(*s && *s!=_T('/')) + *d++ = *s++; + + while(*s == _T('/')) + s++; + + *d++ = _T('/'); + *d = _T('\0'); + + read_directory(entry, buffer, sortOrder); + + if (entry->down) + entry->expanded = TRUE; + + if (!*s) + break; + + entry = find_entry_unix(entry, s); + } + + return entry; +} + +#endif + + + // directories first... +static int compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA* fd2) +{ + int dir1 = fd1->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; + int dir2 = fd2->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; + + return dir2==dir1? 0: dir2data; + const WIN32_FIND_DATA* fd2 = &(*(Entry**)arg2)->data; + + int cmp = compareType(fd1, fd2); + if (cmp) + return cmp; + + return lstrcmpi(fd1->cFileName, fd2->cFileName); +} + +static int compareExt(const void* arg1, const void* arg2) +{ + const WIN32_FIND_DATA* fd1 = &(*(Entry**)arg1)->data; + const WIN32_FIND_DATA* fd2 = &(*(Entry**)arg2)->data; + const TCHAR *name1, *name2, *ext1, *ext2; + + int cmp = compareType(fd1, fd2); + if (cmp) + return cmp; + + name1 = fd1->cFileName; + name2 = fd2->cFileName; + + ext1 = _tcsrchr(name1, _T('.')); + ext2 = _tcsrchr(name2, _T('.')); + + if (ext1) + ext1++; + else + ext1 = _T(""); + + if (ext2) + ext2++; + else + ext2 = _T(""); + + cmp = lstrcmpi(ext1, ext2); + if (cmp) + return cmp; + + return lstrcmpi(name1, name2); +} + +static int compareSize(const void* arg1, const void* arg2) +{ + WIN32_FIND_DATA* fd1 = &(*(Entry**)arg1)->data; + WIN32_FIND_DATA* fd2 = &(*(Entry**)arg2)->data; + + int cmp = compareType(fd1, fd2); + if (cmp) + return cmp; + + cmp = fd2->nFileSizeHigh - fd1->nFileSizeHigh; + + if (cmp < 0) + return -1; + else if (cmp > 0) + return 1; + + cmp = fd2->nFileSizeLow - fd1->nFileSizeLow; + + return cmp<0? -1: cmp>0? 1: 0; +} + +static int compareDate(const void* arg1, const void* arg2) +{ + WIN32_FIND_DATA* fd1 = &(*(Entry**)arg1)->data; + WIN32_FIND_DATA* fd2 = &(*(Entry**)arg2)->data; + + int cmp = compareType(fd1, fd2); + if (cmp) + return cmp; + + return CompareFileTime(&fd2->ftLastWriteTime, &fd1->ftLastWriteTime); +} + + +static int (*sortFunctions[])(const void* arg1, const void* arg2) = { + compareName, // SORT_NAME + compareExt, // SORT_EXT + compareSize, // SORT_SIZE + compareDate // SORT_DATE +}; + + +static void SortDirectory(Entry* parent, SORT_ORDER sortOrder) +{ + Entry* entry = parent->down; + Entry** array, **p; + int len; + + len = 0; + for(entry=parent->down; entry; entry=entry->next) + len++; + + if (len) { + array = (Entry**) alloca(len*sizeof(Entry*)); + + p = array; + for(entry=parent->down; entry; entry=entry->next) + *p++ = entry; + + // call qsort with the appropriate compare function + qsort(array, len, sizeof(array[0]), sortFunctions[sortOrder]); + + parent->down = array[0]; + + for(p=array; --len; p++) + p[0]->next = p[1]; + + (*p)->next = 0; + } +} + + +static void read_directory(Entry* parent, LPCTSTR path, int sortOrder) +{ + TCHAR buffer[MAX_PATH]; + Entry* entry; + LPCTSTR s; + PTSTR d; + +#if !defined(_NO_EXTENSIONS) && defined(__linux__) + if (parent->unix_dir) + { + read_directory_unix(parent, path); + + if (Globals.prescan_node) { + s = path; + d = buffer; + + while(*s) + *d++ = *s++; + + *d++ = _T('/'); + + for(entry=parent->down; entry; entry=entry->next) + if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + lstrcpy(d, entry->data.cFileName); + read_directory_unix(entry, buffer); + SortDirectory(entry, sortOrder); + } + } + } + else +#endif + { + read_directory_win(parent, path); + + if (Globals.prescan_node) { + s = path; + d = buffer; + + while(*s) + *d++ = *s++; + + *d++ = _T('\\'); + + for(entry=parent->down; entry; entry=entry->next) + if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + lstrcpy(d, entry->data.cFileName); + read_directory_win(entry, buffer); + SortDirectory(entry, sortOrder); + } + } + } + + SortDirectory(parent, sortOrder); +} + + +static ChildWnd* alloc_child_window(LPCTSTR path) +{ + TCHAR drv[_MAX_DRIVE+1], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT]; + ChildWnd* child = (ChildWnd*) malloc(sizeof(ChildWnd)); + Root* root = &child->root; + Entry* entry; + + memset(child, 0, sizeof(ChildWnd)); + + child->left.treePane = TRUE; + child->left.visible_cols = 0; + + child->right.treePane = FALSE; +#ifndef _NO_EXTENSIONS + child->right.visible_cols = COL_SIZE|COL_DATE|COL_TIME|COL_ATTRIBUTES|COL_INDEX|COL_LINKS; +#else + child->right.visible_cols = COL_SIZE|COL_DATE|COL_TIME|COL_ATTRIBUTES; +#endif + + child->pos.length = sizeof(WINDOWPLACEMENT); + child->pos.flags = 0; + child->pos.showCmd = SW_SHOWNORMAL; + child->pos.rcNormalPosition.left = CW_USEDEFAULT; + child->pos.rcNormalPosition.top = CW_USEDEFAULT; + child->pos.rcNormalPosition.right = CW_USEDEFAULT; + child->pos.rcNormalPosition.bottom = CW_USEDEFAULT; + + child->focus_pane = 0; + child->split_pos = 200; + child->sortOrder = SORT_NAME; + child->header_wdths_ok = FALSE; + + lstrcpy(child->path, path); + + _tsplitpath(path, drv, dir, name, ext); + +#if !defined(_NO_EXTENSIONS) && defined(__linux__) + if (*path == '/') + { + root->drive_type = GetDriveType(path); + + lstrcat(drv, _T("/")); + lstrcpy(root->volname, _T("root fs")); + root->fs_flags = 0; + lstrcpy(root->fs, _T("unixfs")); + + lstrcpy(root->path, _T("/")); + entry = read_tree_unix(root, path, child->sortOrder); + } + else +#endif + { + root->drive_type = GetDriveType(path); + + lstrcat(drv, _T("\\")); + GetVolumeInformation(drv, root->volname, _MAX_FNAME, 0, 0, &root->fs_flags, root->fs, _MAX_DIR); + + lstrcpy(root->path, drv); + entry = read_tree_win(root, path, child->sortOrder); + } + +//@@lstrcpy(root->entry.data.cFileName, drv); + wsprintf(root->entry.data.cFileName, _T("%s - %s"), drv, root->fs); + + root->entry.data.dwFileAttributes = FILE_ATTRIBUTE_DIRECTORY; + + child->left.root = &root->entry; + + set_curdir(child, entry); + + return child; +} + + + // recursively free all child entries +static void free_entries(Entry* parent) +{ + Entry *entry, *next=parent->down; + + if (next) { + parent->down = 0; + + do { + entry = next; + next = entry->next; + + free_entries(entry); + free(entry); + } while(next); + } +} + + // free all memory associated with a child window +static void free_child_window(ChildWnd* child) +{ + free_entries(&child->root.entry); + free(child); +} + + + // get full path of specified directory entry +static void get_path(Entry* dir, PTSTR path) +{ + Entry* entry; + int len = 0; + int level = 0; + + for(entry=dir; entry; level++) { + LPCTSTR name = entry->data.cFileName; + LPCTSTR s = name; + int l; + + for(l=0; *s && *s!=_T('/') && *s!=_T('\\'); s++) + l++; + + if (entry->up) { + memmove(path+l+1, path, len*sizeof(TCHAR)); + memcpy(path+1, name, l*sizeof(TCHAR)); + len += l+1; + +#ifndef _NO_EXTENSIONS + if (entry->unix_dir) + path[0] = _T('/'); + else +#endif + path[0] = _T('\\'); + + entry = entry->up; + } else { + memmove(path+l, path, len*sizeof(TCHAR)); + memcpy(path, name, l*sizeof(TCHAR)); + len += l; + break; + } + } + + if (!level) { +#ifndef _NO_EXTENSIONS + if (entry->unix_dir) + path[len++] = _T('/'); + else +#endif + path[len++] = _T('\\'); + } + + path[len] = _T('\0'); +} + + +static void resize_frame_rect(HWND hwnd, PRECT prect) +{ + int new_top; + RECT rt; + + if (IsWindowVisible(Globals.htoolbar)) { + SendMessage(Globals.htoolbar, WM_SIZE, 0, 0); + GetClientRect(Globals.htoolbar, &rt); + prect->top = rt.bottom+3; + prect->bottom -= rt.bottom+3; + } + + if (IsWindowVisible(Globals.hdrivebar)) { + SendMessage(Globals.hdrivebar, WM_SIZE, 0, 0); + GetClientRect(Globals.hdrivebar, &rt); + new_top = --prect->top + rt.bottom+3; + MoveWindow(Globals.hdrivebar, 0, prect->top, rt.right, new_top, TRUE); + prect->top = new_top; + prect->bottom -= rt.bottom+2; + } + + if (IsWindowVisible(Globals.hstatusbar)) { + int parts[] = {300, 500}; + + SendMessage(Globals.hstatusbar, WM_SIZE, 0, 0); + SendMessage(Globals.hstatusbar, SB_SETPARTS, 2, (LPARAM)&parts); + GetClientRect(Globals.hstatusbar, &rt); + prect->bottom -= rt.bottom; + } + + MoveWindow(Globals.hmdiclient, prect->left-1,prect->top-1,prect->right+2,prect->bottom+1, TRUE); +} + +static void resize_frame(HWND hwnd, int cx, int cy) +{ + RECT rect = {0, 0, cx, cy}; + + resize_frame_rect(hwnd, &rect); +} + +static void resize_frame_client(HWND hwnd) +{ + RECT rect; + + GetClientRect(hwnd, &rect); + + resize_frame_rect(hwnd, &rect); +} + + +static HHOOK hcbthook; +static ChildWnd* newchild = NULL; + +LRESULT CALLBACK CBTProc(int code, WPARAM wparam, LPARAM lparam) +{ + if (code==HCBT_CREATEWND && newchild) { + ChildWnd* child = newchild; + newchild = NULL; + + child->hwnd = (HWND) wparam; + SetWindowLong(child->hwnd, GWL_USERDATA, (LPARAM)child); + } + + return CallNextHookEx(hcbthook, code, wparam, lparam); +} + +static HWND create_child_window(ChildWnd* child) +{ + MDICREATESTRUCT mcs = { + WINEFILETREE, (LPTSTR)child->path, Globals.hInstance, + child->pos.rcNormalPosition.left, child->pos.rcNormalPosition.top, + child->pos.rcNormalPosition.right-child->pos.rcNormalPosition.left, + child->pos.rcNormalPosition.bottom-child->pos.rcNormalPosition.top, + 0/*style*/, 0/*lParam*/ + }; + int idx; + + hcbthook = SetWindowsHookEx(WH_CBT, CBTProc, 0, GetCurrentThreadId()); + + newchild = child; + child->hwnd = (HWND) SendMessage(Globals.hmdiclient, WM_MDICREATE, 0, (LPARAM)&mcs); + if (!child->hwnd) + return 0; + + UnhookWindowsHookEx(hcbthook); + + idx = ListBox_FindItemData(child->left.hwnd, ListBox_GetCurSel(child->left.hwnd), child->left.cur); + ListBox_SetCurSel(child->left.hwnd, idx); + + return child->hwnd; +} + + +struct ExecuteDialog { + TCHAR cmd[MAX_PATH]; + int cmdshow; +}; + + +static BOOL CALLBACK ExecuteDialogWndProg(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + static struct ExecuteDialog* dlg; + + switch(nmsg) { + case WM_INITDIALOG: + dlg = (struct ExecuteDialog*) lparam; + return 1; + + case WM_COMMAND: { + int id = (int)wparam; + + if (id == IDOK) { + GetWindowText(GetDlgItem(hwnd, 201), dlg->cmd, MAX_PATH); + dlg->cmdshow = Button_GetState(GetDlgItem(hwnd,214))&BST_CHECKED? + SW_SHOWMINIMIZED: SW_SHOWNORMAL; + EndDialog(hwnd, id); + } else if (id == IDCANCEL) + EndDialog(hwnd, id); + + return 1;} + } + + return 0; +} + + +#ifndef _NO_EXTENSIONS + +static struct FullScreenParameters { + BOOL mode; + RECT orgPos; + BOOL wasZoomed; +} g_fullscreen = { + FALSE // mode +}; + +void frame_get_clientspace(HWND hwnd, PRECT prect) +{ + RECT rt; + + if (!IsIconic(hwnd)) + GetClientRect(hwnd, prect); + else { + WINDOWPLACEMENT wp; + + GetWindowPlacement(hwnd, &wp); + + prect->left = prect->top = 0; + prect->right = wp.rcNormalPosition.right-wp.rcNormalPosition.left- + 2*(GetSystemMetrics(SM_CXSIZEFRAME)+GetSystemMetrics(SM_CXEDGE)); + prect->bottom = wp.rcNormalPosition.bottom-wp.rcNormalPosition.top- + 2*(GetSystemMetrics(SM_CYSIZEFRAME)+GetSystemMetrics(SM_CYEDGE))- + GetSystemMetrics(SM_CYCAPTION)-GetSystemMetrics(SM_CYMENUSIZE); + } + + if (IsWindowVisible(Globals.htoolbar)) { + GetClientRect(Globals.htoolbar, &rt); + prect->top += rt.bottom+2; + } + + if (IsWindowVisible(Globals.hdrivebar)) { + GetClientRect(Globals.hdrivebar, &rt); + prect->top += rt.bottom+2; + } + + if (IsWindowVisible(Globals.hstatusbar)) { + GetClientRect(Globals.hstatusbar, &rt); + prect->bottom -= rt.bottom; + } +} + +static BOOL toggle_fullscreen(HWND hwnd) +{ + RECT rt; + + if ((g_fullscreen.mode=!g_fullscreen.mode)) { + GetWindowRect(hwnd, &g_fullscreen.orgPos); + g_fullscreen.wasZoomed = IsZoomed(hwnd); + + Frame_CalcFrameClient(hwnd, &rt); + ClientToScreen(hwnd, (LPPOINT)&rt.left); + ClientToScreen(hwnd, (LPPOINT)&rt.right); + + rt.left = g_fullscreen.orgPos.left-rt.left; + rt.top = g_fullscreen.orgPos.top-rt.top; + rt.right = GetSystemMetrics(SM_CXSCREEN)+g_fullscreen.orgPos.right-rt.right; + rt.bottom = GetSystemMetrics(SM_CYSCREEN)+g_fullscreen.orgPos.bottom-rt.bottom; + + MoveWindow(hwnd, rt.left, rt.top, rt.right-rt.left, rt.bottom-rt.top, TRUE); + } else { + MoveWindow(hwnd, g_fullscreen.orgPos.left, g_fullscreen.orgPos.top, + g_fullscreen.orgPos.right-g_fullscreen.orgPos.left, + g_fullscreen.orgPos.bottom-g_fullscreen.orgPos.top, TRUE); + + if (g_fullscreen.wasZoomed) + ShowWindow(hwnd, WS_MAXIMIZE); + } + + return g_fullscreen.mode; +} + +static void fullscreen_move(HWND hwnd) +{ + RECT rt, pos; + GetWindowRect(hwnd, &pos); + + Frame_CalcFrameClient(hwnd, &rt); + ClientToScreen(hwnd, (LPPOINT)&rt.left); + ClientToScreen(hwnd, (LPPOINT)&rt.right); + + rt.left = pos.left-rt.left; + rt.top = pos.top-rt.top; + rt.right = GetSystemMetrics(SM_CXSCREEN)+pos.right-rt.right; + rt.bottom = GetSystemMetrics(SM_CYSCREEN)+pos.bottom-rt.bottom; + + MoveWindow(hwnd, rt.left, rt.top, rt.right-rt.left, rt.bottom-rt.top, TRUE); +} + +#endif + + +static void toggle_child(HWND hwnd, UINT cmd, HWND hchild) +{ + BOOL vis = IsWindowVisible(hchild); + + CheckMenuItem(Globals.hMenuOptions, cmd, vis?MF_BYCOMMAND:MF_BYCOMMAND|MF_CHECKED); + + ShowWindow(hchild, vis?SW_HIDE:SW_SHOW); + +#ifndef _NO_EXTENSIONS + if (g_fullscreen.mode) + fullscreen_move(hwnd); +#endif + + resize_frame_client(hwnd); +} + +BOOL activate_drive_window(LPCTSTR path) +{ + TCHAR drv1[_MAX_DRIVE], drv2[_MAX_DRIVE]; + HWND child_wnd; + + _tsplitpath(path, drv1, 0, 0, 0); + + // search for a already open window for the same drive + for(child_wnd=GetNextWindow(Globals.hmdiclient,GW_CHILD); child_wnd; child_wnd=GetNextWindow(child_wnd, GW_HWNDNEXT)) { + ChildWnd* child = (ChildWnd*) GetWindowLong(child_wnd, GWL_USERDATA); + + if (child) { + _tsplitpath(child->root.path, drv2, 0, 0, 0); + + if (!lstrcmpi(drv2, drv1)) { + SendMessage(Globals.hmdiclient, WM_MDIACTIVATE, (WPARAM)child_wnd, 0); + + if (IsMinimized(child_wnd)) + ShowWindow(child_wnd, SW_SHOWNORMAL); + + return TRUE; + } + } + } + + return FALSE; +} + +LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + switch(nmsg) { + case WM_CLOSE: + DestroyWindow(hwnd); + break; + + case WM_DESTROY: + PostQuitMessage(0); + break; + + case WM_COMMAND: { + UINT cmd = LOWORD(wparam); + HWND hwndClient = (HWND) SendMessage(Globals.hmdiclient, WM_MDIGETACTIVE, 0, 0); + + if (SendMessage(hwndClient, WM_DISPATCH_COMMAND, wparam, lparam)) + break; + + if (cmd>=ID_DRIVE_FIRST && cmd<=ID_DRIVE_FIRST+0xFF) { + TCHAR drv[_MAX_DRIVE], path[MAX_PATH]; + ChildWnd* child; + LPCTSTR root = Globals.drives; + int i; + + for(i=cmd-ID_DRIVE_FIRST; i--; root++) + while(*root) + root++; + + if (activate_drive_window(root)) + return 0; + + _tsplitpath(root, drv, 0, 0, 0); + + if (!SetCurrentDirectory(drv)) { + display_error(hwnd, GetLastError()); + return 0; + } + + GetCurrentDirectory(MAX_PATH, path); //@@ letztes Verzeichnis pro Laufwerk speichern + child = alloc_child_window(path); + + if (!create_child_window(child)) + free(child); + } else switch(cmd) { + case ID_FILE_EXIT: + PostQuitMessage(0); + break; + + case ID_WINDOW_NEW: { + TCHAR path[MAX_PATH]; + ChildWnd* child; + + GetCurrentDirectory(MAX_PATH, path); + child = alloc_child_window(path); + + if (!create_child_window(child)) + free(child); + break;} + + case ID_WINDOW_CASCADE: + SendMessage(Globals.hmdiclient, WM_MDICASCADE, 0, 0); + break; + + case ID_WINDOW_TILE_HORZ: + SendMessage(Globals.hmdiclient, WM_MDITILE, MDITILE_HORIZONTAL, 0); + break; + + case ID_WINDOW_TILE_VERT: + SendMessage(Globals.hmdiclient, WM_MDITILE, MDITILE_VERTICAL, 0); + break; + + case ID_WINDOW_ARRANGE: + SendMessage(Globals.hmdiclient, WM_MDIICONARRANGE, 0, 0); + break; + + case ID_VIEW_TOOL_BAR: + toggle_child(hwnd, cmd, Globals.htoolbar); + break; + + case ID_VIEW_DRIVE_BAR: + toggle_child(hwnd, cmd, Globals.hdrivebar); + break; + + case ID_VIEW_STATUSBAR: + toggle_child(hwnd, cmd, Globals.hstatusbar); + break; + + case ID_EXECUTE: { + struct ExecuteDialog dlg = {{0}}; + if (DialogBoxParam(Globals.hInstance, MAKEINTRESOURCE(IDD_EXECUTE), hwnd, ExecuteDialogWndProg, (LPARAM)&dlg) == IDOK) + ShellExecute(hwnd, _T("open")/*operation*/, dlg.cmd/*file*/, NULL/*parameters*/, NULL/*dir*/, dlg.cmdshow); + break;} + + case ID_HELP: + WinHelp(hwnd, _T("winfile"), HELP_INDEX, 0); + break; + +#ifndef _NO_EXTENSIONS + case ID_VIEW_FULLSCREEN: + CheckMenuItem(Globals.hMenuOptions, cmd, toggle_fullscreen(hwnd)?MF_CHECKED:0); + break; + +#ifdef __linux__ + case ID_DRIVE_UNIX_FS: { + TCHAR path[MAX_PATH]; + ChildWnd* child; + + if (activate_drive_window(_T("/"))) + break; + + getcwd(path, MAX_PATH); + child = alloc_child_window(path); + + if (!create_child_window(child)) + free(child); + break;} +#endif +#endif + + //TODO: There are even more menu items! + +#ifndef _NO_EXTENSIONS + case ID_LICENSE: + WineLicense(Globals.hMainWnd); + break; + + case ID_NO_WARRANTY: + WineWarranty(Globals.hMainWnd); + break; + + case ID_ABOUT_WINE: + ShellAbout(hwnd, _T("WINE"), _T("Winefile"), 0); + break; +#endif + + default: + /*@@if (wParam >= PM_FIRST_LANGUAGE && wParam <= PM_LAST_LANGUAGE) + STRING_SelectLanguageByNumber(wParam - PM_FIRST_LANGUAGE); + else */if ((cmd=IDW_FIRST_CHILD+0x100) && + (cmdSC_RESTORE)) + MessageBox(hwnd, _T("Not yet implemented"), _T("Winefile"), MB_OK); + + return DefFrameProc(hwnd, Globals.hmdiclient, nmsg, wparam, lparam); + } + break;} + + case WM_SIZE: + resize_frame(hwnd, LOWORD(lparam), HIWORD(lparam)); + break; // do not pass message to DefFrameProc + +#ifndef _NO_EXTENSIONS + case WM_GETMINMAXINFO: { + LPMINMAXINFO lpmmi = (LPMINMAXINFO)lparam; + + lpmmi->ptMaxTrackSize.x <<= 1;//2*GetSystemMetrics(SM_CXSCREEN) / SM_CXVIRTUALSCREEN + lpmmi->ptMaxTrackSize.y <<= 1;//2*GetSystemMetrics(SM_CYSCREEN) / SM_CYVIRTUALSCREEN + break;} + + case FRM_CALC_CLIENT: + frame_get_clientspace(hwnd, (PRECT)lparam); + return TRUE; +#endif + + default: + return DefFrameProc(hwnd, Globals.hmdiclient, nmsg, wparam, lparam); + } + + return 0; +} + + +const static LPTSTR g_pos_names[COLUMNS] = { + _T(""), // symbol + _T("Name"), + _T("Size"), + _T("CDate"), +#ifndef _NO_EXTENSIONS + _T("ADate"), + _T("MDate"), + _T("Index/Inode"), + _T("Links"), +#endif + _T("Attributes"), +#ifndef _NO_EXTENSIONS + _T("Security") +#endif +}; + +const static int g_pos_align[] = { + 0, + HDF_LEFT, // Name + HDF_RIGHT, // Size + HDF_LEFT, // CDate +#ifndef _NO_EXTENSIONS + HDF_LEFT, // ADate + HDF_LEFT, // MDate + HDF_LEFT, // Index + HDF_CENTER, // Links +#endif + HDF_CENTER, // Attributes +#ifndef _NO_EXTENSIONS + HDF_LEFT // Security +#endif +}; + +static void resize_tree(ChildWnd* child, int cx, int cy) +{ + HDWP hdwp = BeginDeferWindowPos(4); + RECT rt = {0, 0, cx, cy}; + + cx = child->split_pos + SPLIT_WIDTH/2; + +#ifndef _NO_EXTENSIONS + { + WINDOWPOS wp; + HD_LAYOUT hdl = {&rt, &wp}; + + Header_Layout(child->left.hwndHeader, &hdl); + + DeferWindowPos(hdwp, child->left.hwndHeader, wp.hwndInsertAfter, + wp.x-1, wp.y, child->split_pos-SPLIT_WIDTH/2+1, wp.cy, wp.flags); + DeferWindowPos(hdwp, child->right.hwndHeader, wp.hwndInsertAfter, + rt.left+cx+1, wp.y, wp.cx-cx+2, wp.cy, wp.flags); + } +#endif + + DeferWindowPos(hdwp, child->left.hwnd, 0, rt.left, rt.top, child->split_pos-SPLIT_WIDTH/2-rt.left, rt.bottom-rt.top, SWP_NOZORDER|SWP_NOACTIVATE); + DeferWindowPos(hdwp, child->right.hwnd, 0, rt.left+cx+1, rt.top, rt.right-cx, rt.bottom-rt.top, SWP_NOZORDER|SWP_NOACTIVATE); + + EndDeferWindowPos(hdwp); +} + + +#ifndef _NO_EXTENSIONS + +static HWND create_header(HWND parent, Pane* pane, int id) +{ + HD_ITEM hdi = {HDI_TEXT|HDI_WIDTH|HDI_FORMAT}; + int idx; + + HWND hwnd = CreateWindow(WC_HEADER, 0, WS_CHILD|WS_VISIBLE|HDS_HORZ/*TODO: |HDS_BUTTONS + sort orders*/, + 0, 0, 0, 0, parent, (HMENU)id, Globals.hInstance, 0); + if (!hwnd) + return 0; + + SendMessage(hwnd, WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT), FALSE); + + for(idx=0; idxwidths[idx]; + Header_InsertItem(hwnd, idx, &hdi); + } + + return hwnd; +} + +#endif + + +static void init_output(HWND hwnd) +{ + TCHAR b[16]; + HFONT old_font; + HDC hdc = GetDC(hwnd); + + if (GetNumberFormat(LOCALE_USER_DEFAULT, 0, _T("1000"), 0, b, 16) > 4) + Globals.num_sep = b[1]; + else + Globals.num_sep = _T('.'); + + old_font = SelectFont(hdc, Globals.hfont); + GetTextExtentPoint32(hdc, _T(" "), 1, &Globals.spaceSize); + SelectFont(hdc, old_font); + ReleaseDC(hwnd, hdc); +} + +static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol); + + + // calculate prefered width for all visible columns + +static BOOL calc_widths(Pane* pane, BOOL anyway) +{ + int col, x, cx, spc=3*Globals.spaceSize.cx; + int entries = ListBox_GetCount(pane->hwnd); + int orgWidths[COLUMNS]; + int orgPositions[COLUMNS+1]; + HFONT hfontOld; + HDC hdc; + int cnt; + + if (!anyway) { + memcpy(orgWidths, pane->widths, sizeof(orgWidths)); + memcpy(orgPositions, pane->positions, sizeof(orgPositions)); + } + + for(col=0; colwidths[col] = 0; + + hdc = GetDC(pane->hwnd); + hfontOld = SelectFont(hdc, Globals.hfont); + + for(cnt=0; cnthwnd, cnt); + + DRAWITEMSTRUCT dis = {0/*CtlType*/, 0/*CtlID*/, + 0/*itemID*/, 0/*itemAction*/, 0/*itemState*/, + pane->hwnd/*hwndItem*/, hdc}; + + draw_item(pane, &dis, entry, COLUMNS); + } + + SelectObject(hdc, hfontOld); + ReleaseDC(pane->hwnd, hdc); + + x = 0; + for(col=0; colpositions[col] = x; + cx = pane->widths[col]; + + if (cx) { + cx += spc; + + if (cx < IMAGE_WIDTH) + cx = IMAGE_WIDTH; + + pane->widths[col] = cx; + } + + x += cx; + } + + pane->positions[COLUMNS] = x; + + ListBox_SetHorizontalExtent(pane->hwnd, x); + + // no change? + if (!memcmp(orgWidths, pane->widths, sizeof(orgWidths))) + return FALSE; + + // don't move, if only collapsing an entry + if (!anyway && pane->widths[0]widths+1, sizeof(orgWidths)-sizeof(int))) { + pane->widths[0] = orgWidths[0]; + memcpy(pane->positions, orgPositions, sizeof(orgPositions)); + + return FALSE; + } + + InvalidateRect(pane->hwnd, 0, TRUE); + + return TRUE; +} + + + // calculate one prefered column width + +static void calc_single_width(Pane* pane, int col) +{ + HFONT hfontOld; + int x, cx; + int entries = ListBox_GetCount(pane->hwnd); + int cnt; + HDC hdc; + + pane->widths[col] = 0; + + hdc = GetDC(pane->hwnd); + hfontOld = SelectFont(hdc, Globals.hfont); + + for(cnt=0; cnthwnd, cnt); + DRAWITEMSTRUCT dis = {0, 0, 0, 0, 0, pane->hwnd, hdc}; + + draw_item(pane, &dis, entry, col); + } + + SelectObject(hdc, hfontOld); + ReleaseDC(pane->hwnd, hdc); + + cx = pane->widths[col]; + + if (cx) { + cx += 3*Globals.spaceSize.cx; + + if (cx < IMAGE_WIDTH) + cx = IMAGE_WIDTH; + } + + pane->widths[col] = cx; + + x = pane->positions[col] + cx; + + for(; colpositions[++col] = x; + x += pane->widths[col]; + } + + ListBox_SetHorizontalExtent(pane->hwnd, x); +} + + + // insert listbox entries after index idx + +static void insert_entries(Pane* pane, Entry* parent, int idx) +{ + Entry* entry = parent; + + if (!entry) + return; + + ShowWindow(pane->hwnd, SW_HIDE); + + for(; entry; entry=entry->next) { +#ifndef _LEFT_FILES + if (pane->treePane && !(entry->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) + continue; +#endif + + // don't display entries "." and ".." in the left pane + if (pane->treePane && (entry->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) + && entry->data.cFileName[0]==_T('.')) + if ( +#ifndef _NO_EXTENSIONS + entry->data.cFileName[1]==_T('\0') || +#endif + (entry->data.cFileName[1]==_T('.') && entry->data.cFileName[2]==_T('\0'))) + continue; + + if (idx != -1) + idx++; + + ListBox_InsertItemData(pane->hwnd, idx, entry); + + if (pane->treePane && entry->expanded) + insert_entries(pane, entry->down, idx); + } + + ShowWindow(pane->hwnd, SW_SHOW); +} + + +static WNDPROC g_orgTreeWndProc; + +static void create_tree_window(HWND parent, Pane* pane, int id, int id_header) +{ + static int s_init = 0; + Entry* entry = pane->root; + + pane->hwnd = CreateWindow(_T("ListBox"), _T(""), WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL| + LBS_DISABLENOSCROLL|LBS_NOINTEGRALHEIGHT|LBS_OWNERDRAWFIXED|LBS_NOTIFY, + 0, 0, 0, 0, parent, (HMENU)id, Globals.hInstance, 0); + + SetWindowLong(pane->hwnd, GWL_USERDATA, (LPARAM)pane); + g_orgTreeWndProc = SubclassWindow(pane->hwnd, TreeWndProc); + + SendMessage(pane->hwnd, WM_SETFONT, (WPARAM)Globals.hfont, FALSE); + + // insert entries into listbox + if (entry) + insert_entries(pane, entry, -1); + + // calculate column widths + if (!s_init) { + s_init = 1; + init_output(pane->hwnd); + } + + calc_widths(pane, TRUE); + +#ifndef _NO_EXTENSIONS + pane->hwndHeader = create_header(parent, pane, id_header); +#endif +} + + +static void InitChildWindow(ChildWnd* child) +{ + create_tree_window(child->hwnd, &child->left, IDW_TREE_LEFT, IDW_HEADER_LEFT); + create_tree_window(child->hwnd, &child->right, IDW_TREE_RIGHT, IDW_HEADER_RIGHT); +} + + +static void format_date(const FILETIME* ft, TCHAR* buffer, int visible_cols) +{ + SYSTEMTIME systime; + FILETIME lft; + int len = 0; + + *buffer = _T('\0'); + + if (!ft->dwLowDateTime && !ft->dwHighDateTime) + return; + + if (!FileTimeToLocalFileTime(ft, &lft)) + {err: _tcscpy(buffer,_T("???")); return;} + + if (!FileTimeToSystemTime(&lft, &systime)) + goto err; + + if (visible_cols & COL_DATE) { + len = GetDateFormat(LOCALE_USER_DEFAULT, 0, &systime, 0, buffer, BUFFER_LEN); + if (!len) + goto err; + } + + if (visible_cols & COL_TIME) { + if (len) + buffer[len-1] = ' '; + + buffer[len++] = ' '; + + if (!GetTimeFormat(LOCALE_USER_DEFAULT, 0, &systime, 0, buffer+len, BUFFER_LEN-len)) + buffer[len] = _T('\0'); + } +} + + +static void calc_width(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR str) +{ + RECT rt = {0}; + + DrawText(dis->hDC, (LPTSTR)str, -1, &rt, DT_CALCRECT|DT_SINGLELINE|DT_NOPREFIX); + + if (rt.right > pane->widths[col]) + pane->widths[col] = rt.right; +} + +static void calc_tabbed_width(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR str) +{ + RECT rt = {0}; + +/* DRAWTEXTPARAMS dtp = {sizeof(DRAWTEXTPARAMS), 2}; + DrawTextEx(dis->hDC, (LPTSTR)str, -1, &rt, DT_CALCRECT|DT_SINGLELINE|DT_NOPREFIX|DT_EXPANDTABS|DT_TABSTOP, &dtp);*/ + + DrawText(dis->hDC, (LPTSTR)str, -1, &rt, DT_CALCRECT|DT_SINGLELINE|DT_EXPANDTABS|DT_TABSTOP|(2<<8)); +//@@ rt (0,0) ??? + + if (rt.right > pane->widths[col]) + pane->widths[col] = rt.right; +} + + +static void output_text(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR str, DWORD flags) +{ + int x = dis->rcItem.left; + RECT rt = {x+pane->positions[col]+Globals.spaceSize.cx, dis->rcItem.top, x+pane->positions[col+1]-Globals.spaceSize.cx, dis->rcItem.bottom}; + + DrawText(dis->hDC, (LPTSTR)str, -1, &rt, DT_SINGLELINE|DT_NOPREFIX|flags); +} + +static void output_tabbed_text(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR str) +{ + int x = dis->rcItem.left; + RECT rt = {x+pane->positions[col]+Globals.spaceSize.cx, dis->rcItem.top, x+pane->positions[col+1]-Globals.spaceSize.cx, dis->rcItem.bottom}; + +/* DRAWTEXTPARAMS dtp = {sizeof(DRAWTEXTPARAMS), 2}; + DrawTextEx(dis->hDC, (LPTSTR)str, -1, &rt, DT_SINGLELINE|DT_NOPREFIX|DT_EXPANDTABS|DT_TABSTOP, &dtp);*/ + + DrawText(dis->hDC, (LPTSTR)str, -1, &rt, DT_SINGLELINE|DT_EXPANDTABS|DT_TABSTOP|(2<<8)); +} + +static void output_number(Pane* pane, LPDRAWITEMSTRUCT dis, int col, LPCTSTR str) +{ + int x = dis->rcItem.left; + RECT rt = {x+pane->positions[col]+Globals.spaceSize.cx, dis->rcItem.top, x+pane->positions[col+1]-Globals.spaceSize.cx, dis->rcItem.bottom}; + LPCTSTR s = str; + TCHAR b[128]; + LPTSTR d = b; + int pos; + + if (*s) + *d++ = *s++; + + // insert number separator characters + pos = lstrlen(s) % 3; + + while(*s) + if (pos--) + *d++ = *s++; + else { + *d++ = Globals.num_sep; + pos = 3; + } + + DrawText(dis->hDC, b, d-b, &rt, DT_RIGHT|DT_SINGLELINE|DT_NOPREFIX|DT_END_ELLIPSIS); +} + + +static int is_exe_file(LPCTSTR ext) +{ + const static LPCTSTR executable_extensions[] = { + _T("COM"), + _T("EXE"), + _T("BAT"), + _T("CMD"), +#ifndef _NO_EXTENSIONS + _T("CMM"), + _T("BTM"), + _T("AWK"), +#endif + 0 + }; + + TCHAR ext_buffer[_MAX_EXT]; + const LPCTSTR* p; + LPCTSTR s; + LPTSTR d; + + for(s=ext+1,d=ext_buffer; (*d=tolower(*s)); s++) + d++; + + for(p=executable_extensions; *p; p++) + if (!_tcscmp(ext_buffer, *p)) + return 1; + + return 0; +} + +static int is_registered_type(LPCTSTR ext) +{ + //TODO + + return 1; +} + + +static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWidthCol) +{ + TCHAR buffer[BUFFER_LEN]; + DWORD attrs; + int visible_cols = pane->visible_cols; + COLORREF bkcolor, textcolor; + RECT focusRect = dis->rcItem; + HBRUSH hbrush; + enum IMAGE img; +#ifndef _NO_EXTENSIONS + QWORD index; +#endif + int img_pos, cx; + int col = 0; + + if (entry) { + attrs = entry->data.dwFileAttributes; + + if (attrs & FILE_ATTRIBUTE_DIRECTORY) { + if (entry->data.cFileName[0]==_T('.') && entry->data.cFileName[1]==_T('.') + && entry->data.cFileName[2]==_T('\0')) + img = IMG_FOLDER_UP; +#ifndef _NO_EXTENSIONS + else if (entry->data.cFileName[0]==_T('.') && entry->data.cFileName[1]==_T('\0')) + img = IMG_FOLDER_CUR; +#endif + else if ( +#ifdef _NO_EXTENSIONS + entry->expanded || +#endif + (pane->treePane && (dis->itemState&ODS_FOCUS))) + img = IMG_OPEN_FOLDER; + else + img = IMG_FOLDER; + } else { + LPCTSTR ext = _tcsrchr(entry->data.cFileName, '.'); + if (!ext) + ext = _T(""); + + if (is_exe_file(ext)) + img = IMG_EXECUTABLE; + else if (is_registered_type(ext)) + img = IMG_DOCUMENT; + else + img = IMG_FILE; + } + } else { + attrs = 0; + img = IMG_NONE; + } + + if (pane->treePane) { + if (entry) { + img_pos = dis->rcItem.left + entry->level*(IMAGE_WIDTH+Globals.spaceSize.cx); + + if (calcWidthCol == -1) { + int x; + int y = dis->rcItem.top + IMAGE_HEIGHT/2; + Entry* up; + RECT rt_clip = {dis->rcItem.left, dis->rcItem.top, dis->rcItem.left+pane->widths[col], dis->rcItem.bottom}; + HRGN hrgn_org = CreateRectRgn(0, 0, 0, 0); + HRGN hrgn = CreateRectRgnIndirect(&rt_clip); + + if (!GetClipRgn(dis->hDC, hrgn_org)) { + DeleteObject(hrgn_org); + hrgn_org = 0; + } + +// HGDIOBJ holdPen = SelectObject(dis->hDC, GetStockObject(BLACK_PEN)); + ExtSelectClipRgn(dis->hDC, hrgn, RGN_AND); + DeleteObject(hrgn); + + if ((up=entry->up) != NULL) { + MoveToEx(dis->hDC, img_pos-IMAGE_WIDTH/2, y, 0); + LineTo(dis->hDC, img_pos-2, y); + + x = img_pos - IMAGE_WIDTH/2; + + do { + x -= IMAGE_WIDTH+Globals.spaceSize.cx; + + if (up->next +#ifndef _LEFT_FILES + && (up->next->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) +#endif + ) { + MoveToEx(dis->hDC, x, dis->rcItem.top, 0); + LineTo(dis->hDC, x, dis->rcItem.bottom); + } + } while((up=up->up) != NULL); + } + + x = img_pos - IMAGE_WIDTH/2; + + MoveToEx(dis->hDC, x, dis->rcItem.top, 0); + LineTo(dis->hDC, x, y); + + if (entry->next +#ifndef _LEFT_FILES + && (entry->next->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) +#endif + ) + LineTo(dis->hDC, x, dis->rcItem.bottom); + + if (entry->down && entry->expanded) { + x += IMAGE_WIDTH+Globals.spaceSize.cx; + MoveToEx(dis->hDC, x, dis->rcItem.top+IMAGE_HEIGHT, 0); + LineTo(dis->hDC, x, dis->rcItem.bottom); + } + + SelectClipRgn(dis->hDC, hrgn_org); + if (hrgn_org) DeleteObject(hrgn_org); +// SelectObject(dis->hDC, holdPen); + } else if (calcWidthCol==col || calcWidthCol==COLUMNS) { + int right = img_pos + IMAGE_WIDTH - Globals.spaceSize.cx; + + if (right > pane->widths[col]) + pane->widths[col] = right; + } + } else { + img_pos = dis->rcItem.left; + } + } else { + img_pos = dis->rcItem.left; + + if (calcWidthCol==col || calcWidthCol==COLUMNS) + pane->widths[col] = IMAGE_WIDTH; + } + + if (calcWidthCol == -1) { + focusRect.left = img_pos -2; + +#ifdef _NO_EXTENSIONS + if (pane->treePane && entry) { + RECT rt = {0}; + + DrawText(dis->hDC, entry->data.cFileName, -1, &rt, DT_CALCRECT|DT_SINGLELINE|DT_NOPREFIX); + + focusRect.right = dis->rcItem.left+pane->positions[col+1]+Globals.spaceSize.cx + rt.right +2; + } +#else + + if (attrs & FILE_ATTRIBUTE_COMPRESSED) + textcolor = COLOR_COMPRESSED; + else +#endif + textcolor = RGB(0,0,0); + + if (dis->itemState & ODS_FOCUS) { + textcolor = RGB(255,255,255); + bkcolor = COLOR_SELECTION; + } else { + bkcolor = RGB(255,255,255); + } + + hbrush = CreateSolidBrush(bkcolor); + FillRect(dis->hDC, &focusRect, hbrush); + DeleteObject(hbrush); + + SetBkMode(dis->hDC, TRANSPARENT); + SetTextColor(dis->hDC, textcolor); + + cx = pane->widths[col]; + + if (cx && img!=IMG_NONE) { + if (cx > IMAGE_WIDTH) + cx = IMAGE_WIDTH; + + ImageList_DrawEx(Globals.himl, img, dis->hDC, + img_pos, dis->rcItem.top, cx, + IMAGE_HEIGHT, bkcolor, CLR_DEFAULT, ILD_NORMAL); + } + } + + if (!entry) + return; + +#ifdef _NO_EXTENSIONS + if (img >= IMG_FOLDER_UP) + return; +#endif + + col++; + + // ouput file name + if (calcWidthCol == -1) + output_text(pane, dis, col, entry->data.cFileName, 0); + else if (calcWidthCol==col || calcWidthCol==COLUMNS) + calc_width(pane, dis, col, entry->data.cFileName); + + col++; + +#ifdef _NO_EXTENSIONS + if (!pane->treePane) { +#endif + + // display file size + if (visible_cols & COL_SIZE) { +#ifdef _NO_EXTENSIONS + if (!(attrs&FILE_ATTRIBUTE_DIRECTORY)) +#endif + { + QWORD size; + + *(DWORD*)(&size) = entry->data.nFileSizeLow; //TODO: platform spefific + *(((DWORD*)&size)+1) = entry->data.nFileSizeHigh; + + _stprintf(buffer, _T("%") LONGLONGARG _T("d"), size); + + if (calcWidthCol == -1) + output_number(pane, dis, col, buffer); + else if (calcWidthCol==col || calcWidthCol==COLUMNS) + calc_width(pane, dis, col, buffer);//TODO: not ever time enough + } + + col++; + } + + // display file date + if (visible_cols & (COL_DATE|COL_TIME)) { +#ifndef _NO_EXTENSIONS + format_date(&entry->data.ftCreationTime, buffer, visible_cols); + if (calcWidthCol == -1) + output_text(pane, dis, col, buffer, 0); + else if (calcWidthCol==col || calcWidthCol==COLUMNS) + calc_width(pane, dis, col, buffer); + col++; + + format_date(&entry->data.ftLastAccessTime, buffer, visible_cols); + if (calcWidthCol == -1) + output_text(pane, dis, col, buffer, 0); + else if (calcWidthCol==col || calcWidthCol==COLUMNS) + calc_width(pane, dis, col, buffer); + col++; +#endif + + format_date(&entry->data.ftLastWriteTime, buffer, visible_cols); + if (calcWidthCol == -1) + output_text(pane, dis, col, buffer, 0); + else if (calcWidthCol==col || calcWidthCol==COLUMNS) + calc_width(pane, dis, col, buffer); + col++; + } + +#ifndef _NO_EXTENSIONS + if (entry->bhfi_valid) { + ((DWORD*)&index)[0] = entry->bhfi.nFileIndexLow; //TODO: platform spefific + ((DWORD*)&index)[1] = entry->bhfi.nFileIndexHigh; + + if (visible_cols & COL_INDEX) { + _stprintf(buffer, _T("%") LONGLONGARG _T("X"), index); + if (calcWidthCol == -1) + output_text(pane, dis, col, buffer, DT_RIGHT); + else if (calcWidthCol==col || calcWidthCol==COLUMNS) + calc_width(pane, dis, col, buffer); + col++; + } + + if (visible_cols & COL_LINKS) { + wsprintf(buffer, _T("%d"), entry->bhfi.nNumberOfLinks); + if (calcWidthCol == -1) + output_text(pane, dis, col, buffer, DT_CENTER); + else if (calcWidthCol==col || calcWidthCol==COLUMNS) + calc_width(pane, dis, col, buffer); + col++; + } + } else + col += 2; +#endif + + // show file attributes + if (visible_cols & COL_ATTRIBUTES) { +#ifdef _NO_EXTENSIONS + _tcscpy(buffer, _T(" \t \t \t \t ")); +#else + _tcscpy(buffer, _T(" \t \t \t \t \t \t \t \t \t \t \t ")); +#endif + + if (attrs & FILE_ATTRIBUTE_NORMAL) buffer[ 0] = 'N'; + else { + if (attrs & FILE_ATTRIBUTE_READONLY) buffer[ 2] = 'R'; + if (attrs & FILE_ATTRIBUTE_HIDDEN) buffer[ 4] = 'H'; + if (attrs & FILE_ATTRIBUTE_SYSTEM) buffer[ 6] = 'S'; + if (attrs & FILE_ATTRIBUTE_ARCHIVE) buffer[ 8] = 'A'; + if (attrs & FILE_ATTRIBUTE_COMPRESSED) buffer[10] = 'C'; +#ifndef _NO_EXTENSIONS + if (attrs & FILE_ATTRIBUTE_DIRECTORY) buffer[12] = 'D'; + if (attrs & FILE_ATTRIBUTE_ENCRYPTED) buffer[14] = 'E'; + if (attrs & FILE_ATTRIBUTE_TEMPORARY) buffer[16] = 'T'; + if (attrs & FILE_ATTRIBUTE_SPARSE_FILE) buffer[18] = 'P'; + if (attrs & FILE_ATTRIBUTE_REPARSE_POINT) buffer[20] = 'Q'; + if (attrs & FILE_ATTRIBUTE_OFFLINE) buffer[22] = 'O'; + if (attrs & FILE_ATTRIBUTE_NOT_CONTENT_INDEXED) buffer[24] = 'X'; +#endif + } + + if (calcWidthCol == -1) + output_tabbed_text(pane, dis, col, buffer); + else if (calcWidthCol==col || calcWidthCol==COLUMNS) + calc_tabbed_width(pane, dis, col, buffer); + + col++; + } + +/*TODO + if (flags.security) { + DWORD rights = get_access_mask(); + + tcscpy(buffer, _T(" \t \t \t \t \t \t \t \t \t \t \t ")); + + if (rights & FILE_READ_DATA) buffer[ 0] = 'R'; + if (rights & FILE_WRITE_DATA) buffer[ 2] = 'W'; + if (rights & FILE_APPEND_DATA) buffer[ 4] = 'A'; + if (rights & FILE_READ_EA) {buffer[6] = 'entry'; buffer[ 7] = 'R';} + if (rights & FILE_WRITE_EA) {buffer[9] = 'entry'; buffer[10] = 'W';} + if (rights & FILE_EXECUTE) buffer[12] = 'X'; + if (rights & FILE_DELETE_CHILD) buffer[14] = 'D'; + if (rights & FILE_READ_ATTRIBUTES) {buffer[16] = 'a'; buffer[17] = 'R';} + if (rights & FILE_WRITE_ATTRIBUTES) {buffer[19] = 'a'; buffer[20] = 'W';} + if (rights & WRITE_DAC) buffer[22] = 'C'; + if (rights & WRITE_OWNER) buffer[24] = 'O'; + if (rights & SYNCHRONIZE) buffer[26] = 'S'; + + output_text(dis, col++, buffer, DT_LEFT, 3, psize); + } + + if (flags.description) { + get_description(buffer); + output_text(dis, col++, buffer, 0, psize); + } +*/ + +#ifdef _NO_EXTENSIONS + } + + // draw focus frame + if ((dis->itemState&ODS_FOCUS) && calcWidthCol==-1) { + // Currently [04/2000] Wine neither behaves exactly the same + // way as WIN 95 nor like Windows NT... + HGDIOBJ lastBrush; + HPEN lastPen; + HPEN hpen; + + if (!(GetVersion() & 0x80000000)) { // Windows NT? + LOGBRUSH lb = {PS_SOLID, RGB(255,255,255)}; + hpen = ExtCreatePen(PS_COSMETIC|PS_ALTERNATE, 1, &lb, 0, 0); + } else + hpen = CreatePen(PS_DOT, 0, RGB(255,255,255)); + + lastPen = SelectPen(dis->hDC, hpen); + lastBrush = SelectObject(dis->hDC, GetStockObject(HOLLOW_BRUSH)); + SetROP2(dis->hDC, R2_XORPEN); + Rectangle(dis->hDC, focusRect.left, focusRect.top, focusRect.right, focusRect.bottom); + SelectObject(dis->hDC, lastBrush); + SelectObject(dis->hDC, lastPen); + DeleteObject(hpen); + } +#endif +} + + +#ifdef _NO_EXTENSIONS + +static void draw_splitbar(HWND hwnd, int x) +{ + RECT rt; + HDC hdc = GetDC(hwnd); + + GetClientRect(hwnd, &rt); + + rt.left = x - SPLIT_WIDTH/2; + rt.right = x + SPLIT_WIDTH/2+1; + + InvertRect(hdc, &rt); + + ReleaseDC(hwnd, hdc); +} + +#endif + + +#ifndef _NO_EXTENSIONS + +static void set_header(Pane* pane) +{ + HD_ITEM item; + int scroll_pos = GetScrollPos(pane->hwnd, SB_HORZ); + int i=0, x=0; + + item.mask = HDI_WIDTH; + item.cxy = 0; + + for(; x+pane->widths[i]widths[i]; + Header_SetItem(pane->hwndHeader, i, &item); + } + + if (i < COLUMNS) { + x += pane->widths[i]; + item.cxy = x - scroll_pos; + Header_SetItem(pane->hwndHeader, i++, &item); + + for(; iwidths[i]; + x += pane->widths[i]; + Header_SetItem(pane->hwndHeader, i, &item); + } + } +} + +static LRESULT pane_notify(Pane* pane, NMHDR* pnmh) +{ + switch(pnmh->code) { + case HDN_TRACK: + case HDN_ENDTRACK: { + HD_NOTIFY* phdn = (HD_NOTIFY*) pnmh; + int idx = phdn->iItem; + int dx = phdn->pitem->cxy - pane->widths[idx]; + int i; + + RECT clnt; + GetClientRect(pane->hwnd, &clnt); + + // move immediate to simulate HDS_FULLDRAG (for now [04/2000] not realy needed with WINELIB) + Header_SetItem(pane->hwndHeader, idx, phdn->pitem); + + pane->widths[idx] += dx; + + for(i=idx; ++i<=COLUMNS; ) + pane->positions[i] += dx; + + { + int scroll_pos = GetScrollPos(pane->hwnd, SB_HORZ); + RECT rt_scr = {pane->positions[idx+1]-scroll_pos, 0, clnt.right, clnt.bottom}; + RECT rt_clip = {pane->positions[idx]-scroll_pos, 0, clnt.right, clnt.bottom}; + + if (rt_scr.left < 0) rt_scr.left = 0; + if (rt_clip.left < 0) rt_clip.left = 0; + + ScrollWindowEx(pane->hwnd, dx, 0, &rt_scr, &rt_clip, 0, 0, SW_INVALIDATE); + + rt_clip.right = pane->positions[idx+1]; + RedrawWindow(pane->hwnd, &rt_clip, 0, RDW_INVALIDATE|RDW_UPDATENOW); + + if (pnmh->code == HDN_ENDTRACK) { + ListBox_SetHorizontalExtent(pane->hwnd, pane->positions[COLUMNS]); + + if (GetScrollPos(pane->hwnd, SB_HORZ) != scroll_pos) + set_header(pane); + } + } + + return FALSE; + } + + case HDN_DIVIDERDBLCLICK: { + HD_NOTIFY* phdn = (HD_NOTIFY*) pnmh; + HD_ITEM item; + + calc_single_width(pane, phdn->iItem); + item.mask = HDI_WIDTH; + item.cxy = pane->widths[phdn->iItem]; + + Header_SetItem(pane->hwndHeader, phdn->iItem, &item); + InvalidateRect(pane->hwnd, 0, TRUE); + break;} + } + + return 0; +} + +#endif + + +static void scan_entry(ChildWnd* child, Entry* entry) +{ + TCHAR path[MAX_PATH]; + int idx = ListBox_GetCurSel(child->left.hwnd); + HCURSOR crsrOld = SetCursor(LoadCursor(0, IDC_WAIT)); + + // delete sub entries in left pane + for(;;) { + LRESULT res = ListBox_GetItemData(child->left.hwnd, idx+1); + Entry* sub = (Entry*) res; + + if (res==LB_ERR || !sub || sub->level<=entry->level) + break; + + ListBox_DeleteString(child->left.hwnd, idx+1); + } + + // empty right pane + ListBox_ResetContent(child->right.hwnd); + + // release memory + free_entries(entry); + + // read contents from disk + get_path(entry, path); + read_directory(entry, path, child->sortOrder); + + // insert found entries in right pane + insert_entries(&child->right, entry->down, -1); + calc_widths(&child->right, FALSE); +#ifndef _NO_EXTENSIONS + set_header(&child->right); +#endif + + child->header_wdths_ok = FALSE; + + SetCursor(crsrOld); +} + + + // expand a directory entry + +static BOOL expand_entry(ChildWnd* child, Entry* dir) +{ + int idx; + Entry* p; + + if (!dir || dir->expanded || !dir->down) + return FALSE; + + p = dir->down; + + if (p->data.cFileName[0]=='.' && p->data.cFileName[1]=='\0' && p->next) { + p = p->next; + + if (p->data.cFileName[0]=='.' && p->data.cFileName[1]=='.' && + p->data.cFileName[2]=='\0' && p->next) + p = p->next; + } + + // no subdirectories ? + if (!(p->data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) + return FALSE; + + idx = ListBox_FindItemData(child->left.hwnd, 0, dir); + + dir->expanded = TRUE; + + // insert entries in left pane + insert_entries(&child->left, p, idx); + + if (!child->header_wdths_ok) { + if (calc_widths(&child->left, FALSE)) { +#ifndef _NO_EXTENSIONS + set_header(&child->left); +#endif + + child->header_wdths_ok = TRUE; + } + } + + return TRUE; +} + + +static void collapse_entry(Pane* pane, Entry* dir) +{ + int idx = ListBox_FindItemData(pane->hwnd, 0, dir); + + ShowWindow(pane->hwnd, SW_HIDE); + + // hide sub entries + for(;;) { + LRESULT res = ListBox_GetItemData(pane->hwnd, idx+1); + Entry* sub = (Entry*) res; + + if (res==LB_ERR || !sub || sub->level<=dir->level) + break; + + ListBox_DeleteString(pane->hwnd, idx+1); + } + + dir->expanded = FALSE; + + ShowWindow(pane->hwnd, SW_SHOW); +} + + +static void set_curdir(ChildWnd* child, Entry* entry) +{ + TCHAR path[MAX_PATH]; + + child->left.cur = entry; + child->right.root = entry; + child->right.cur = entry; + + if (!entry->scanned) + scan_entry(child, entry); + else { + ListBox_ResetContent(child->right.hwnd); + insert_entries(&child->right, entry->down, -1); + calc_widths(&child->right, FALSE); +#ifndef _NO_EXTENSIONS + set_header(&child->right); +#endif + } + + get_path(entry, path); + lstrcpy(child->path, path); + SetWindowText(child->hwnd, path); + SetCurrentDirectory(path); +} + + +static void activate_entry(ChildWnd* child, Pane* pane) +{ + Entry* entry = pane->cur; + + if (!entry) + return; + + if (entry->data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + int scanned_old = entry->scanned; + + if (!scanned_old) + scan_entry(child, entry); + +#ifndef _NO_EXTENSIONS + if (entry->data.cFileName[0]=='.' && entry->data.cFileName[1]=='\0') + return; +#endif + + if (entry->data.cFileName[0]=='.' && entry->data.cFileName[1]=='.' && entry->data.cFileName[2]=='\0') { + entry = child->left.cur->up; + collapse_entry(&child->left, entry); + goto focus_entry; + } else if (entry->expanded) + collapse_entry(pane, child->left.cur); + else { + expand_entry(child, child->left.cur); + + if (!pane->treePane) focus_entry: { + int idx = ListBox_FindItemData(child->left.hwnd, ListBox_GetCurSel(child->left.hwnd), entry); + ListBox_SetCurSel(child->left.hwnd, idx); + set_curdir(child, entry); + } + } + + if (!scanned_old) { + calc_widths(pane, FALSE); + +#ifndef _NO_EXTENSIONS + set_header(pane); +#endif + } + } else { + + //TODO: start program, open document... + + } +} + + +static BOOL pane_command(Pane* pane, UINT cmd) +{ + switch(cmd) { + case ID_VIEW_NAME: + if (pane->visible_cols) { + pane->visible_cols = 0; + calc_widths(pane, TRUE); +#ifndef _NO_EXTENSIONS + set_header(pane); +#endif + InvalidateRect(pane->hwnd, 0, TRUE); + CheckMenuItem(Globals.hMenuView, ID_VIEW_NAME, MF_BYCOMMAND|MF_CHECKED); + CheckMenuItem(Globals.hMenuView, ID_VIEW_ALL_ATTRIBUTES, MF_BYCOMMAND); + CheckMenuItem(Globals.hMenuView, ID_VIEW_SELECTED_ATTRIBUTES, MF_BYCOMMAND); + } + break; + + case ID_VIEW_ALL_ATTRIBUTES: + if (pane->visible_cols != COL_ALL) { + pane->visible_cols = COL_ALL; + calc_widths(pane, TRUE); +#ifndef _NO_EXTENSIONS + set_header(pane); +#endif + InvalidateRect(pane->hwnd, 0, TRUE); + CheckMenuItem(Globals.hMenuView, ID_VIEW_NAME, MF_BYCOMMAND); + CheckMenuItem(Globals.hMenuView, ID_VIEW_ALL_ATTRIBUTES, MF_BYCOMMAND|MF_CHECKED); + CheckMenuItem(Globals.hMenuView, ID_VIEW_SELECTED_ATTRIBUTES, MF_BYCOMMAND); + } + break; + +#ifndef _NO_EXTENSIONS + case ID_PREFERED_SIZES: { + calc_widths(pane, TRUE); + set_header(pane); + InvalidateRect(pane->hwnd, 0, TRUE); + break;} +#endif + + // TODO: more command ids... + + default: + return FALSE; + } + + return TRUE; +} + + +LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + static int last_split; + + ChildWnd* child = (ChildWnd*) GetWindowLong(hwnd, GWL_USERDATA); + ASSERT(child); + + switch(nmsg) { + case WM_DRAWITEM: { + LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lparam; + Entry* entry = (Entry*) dis->itemData; + + if (dis->CtlID == IDW_TREE_LEFT) + draw_item(&child->left, dis, entry, -1); + else + draw_item(&child->right, dis, entry, -1); + + return TRUE;} + + case WM_CREATE: + InitChildWindow(child); + break; + + case WM_NCDESTROY: + free_child_window(child); + SetWindowLong(hwnd, GWL_USERDATA, 0); + break; + + case WM_PAINT: { + PAINTSTRUCT ps; + HBRUSH lastBrush; + RECT rt; + GetClientRect(hwnd, &rt); + BeginPaint(hwnd, &ps); + rt.left = child->split_pos-SPLIT_WIDTH/2; + rt.right = child->split_pos+SPLIT_WIDTH/2+1; + lastBrush = SelectBrush(ps.hdc, (HBRUSH)GetStockObject(COLOR_SPLITBAR)); + Rectangle(ps.hdc, rt.left, rt.top-1, rt.right, rt.bottom+1); + SelectObject(ps.hdc, lastBrush); +#ifdef _NO_EXTENSIONS + rt.top = rt.bottom - GetSystemMetrics(SM_CYHSCROLL); + FillRect(ps.hdc, &rt, GetStockObject(BLACK_BRUSH)); +#endif + EndPaint(hwnd, &ps); + break;} + + case WM_SETCURSOR: + if (LOWORD(lparam) == HTCLIENT) { + POINT pt; + GetCursorPos(&pt); + ScreenToClient(hwnd, &pt); + + if (pt.x>=child->split_pos-SPLIT_WIDTH/2 && pt.xsplit_pos+SPLIT_WIDTH/2+1) { + SetCursor(LoadCursor(0, IDC_SIZEWE)); + return TRUE; + } + } + goto def; + + case WM_LBUTTONDOWN: { + RECT rt; + int x = LOWORD(lparam); + + GetClientRect(hwnd, &rt); + + if (x>=child->split_pos-SPLIT_WIDTH/2 && xsplit_pos+SPLIT_WIDTH/2+1) { + last_split = child->split_pos; +#ifdef _NO_EXTENSIONS + draw_splitbar(hwnd, last_split); +#endif + SetCapture(hwnd); + } + + break;} + + case WM_LBUTTONUP: + if (GetCapture() == hwnd) { +#ifdef _NO_EXTENSIONS + RECT rt; + int x = LOWORD(lparam); + draw_splitbar(hwnd, last_split); + last_split = -1; + GetClientRect(hwnd, &rt); + child->split_pos = x; + resize_tree(child, rt.right, rt.bottom); +#endif + ReleaseCapture(); + } + break; + +#ifdef _NO_EXTENSIONS + case WM_CAPTURECHANGED: + if (GetCapture()==hwnd && last_split>=0) + draw_splitbar(hwnd, last_split); + break; +#endif + + case WM_KEYDOWN: + if (wparam == VK_ESCAPE) + if (GetCapture() == hwnd) { + RECT rt; +#ifdef _NO_EXTENSIONS + draw_splitbar(hwnd, last_split); +#else + child->split_pos = last_split; +#endif + GetClientRect(hwnd, &rt); + resize_tree(child, rt.right, rt.bottom); + last_split = -1; + ReleaseCapture(); + SetCursor(LoadCursor(0, IDC_ARROW)); + } + break; + + case WM_MOUSEMOVE: + if (GetCapture() == hwnd) { + RECT rt; + int x = LOWORD(lparam); + +#ifdef _NO_EXTENSIONS + HDC hdc = GetDC(hwnd); + GetClientRect(hwnd, &rt); + + rt.left = last_split-SPLIT_WIDTH/2; + rt.right = last_split+SPLIT_WIDTH/2+1; + InvertRect(hdc, &rt); + + last_split = x; + rt.left = x-SPLIT_WIDTH/2; + rt.right = x+SPLIT_WIDTH/2+1; + InvertRect(hdc, &rt); + + ReleaseDC(hwnd, hdc); +#else + GetClientRect(hwnd, &rt); + + if (x>=0 && xsplit_pos = x; + resize_tree(child, rt.right, rt.bottom); + rt.left = x-SPLIT_WIDTH/2; + rt.right = x+SPLIT_WIDTH/2+1; + InvalidateRect(hwnd, &rt, FALSE); + UpdateWindow(child->left.hwnd); + UpdateWindow(hwnd); + UpdateWindow(child->right.hwnd); + } +#endif + } + break; + +#ifndef _NO_EXTENSIONS + case WM_GETMINMAXINFO: + DefMDIChildProc(hwnd, nmsg, wparam, lparam); + + {LPMINMAXINFO lpmmi = (LPMINMAXINFO)lparam; + + lpmmi->ptMaxTrackSize.x <<= 1;//2*GetSystemMetrics(SM_CXSCREEN) / SM_CXVIRTUALSCREEN + lpmmi->ptMaxTrackSize.y <<= 1;//2*GetSystemMetrics(SM_CYSCREEN) / SM_CYVIRTUALSCREEN + break;} +#endif + + case WM_SETFOCUS: + SetCurrentDirectory(child->path); + SetFocus(child->focus_pane? child->right.hwnd: child->left.hwnd); + break; + + case WM_DISPATCH_COMMAND: { + Pane* pane = GetFocus()==child->left.hwnd? &child->left: &child->right; + + switch(LOWORD(wparam)) { + case ID_WINDOW_NEW: { + ChildWnd* new_child = alloc_child_window(child->path); + + if (!create_child_window(new_child)) + free(new_child); + + break;} + + case ID_REFRESH: + scan_entry(child, pane->cur); + break; + + case ID_ACTIVATE: + activate_entry(child, pane); + break; + + default: + return pane_command(pane, LOWORD(wparam)); + } + + return TRUE;} + + case WM_COMMAND: { + Pane* pane = GetFocus()==child->left.hwnd? &child->left: &child->right; + + switch(HIWORD(wparam)) { + case LBN_SELCHANGE: { + int idx = ListBox_GetCurSel(pane->hwnd); + Entry* entry = (Entry*) ListBox_GetItemData(pane->hwnd, idx); + + if (pane == &child->left) + set_curdir(child, entry); + else + pane->cur = entry; + break;} + + case LBN_DBLCLK: + activate_entry(child, pane); + break; + } + break;} + +#ifndef _NO_EXTENSIONS + case WM_NOTIFY: { + NMHDR* pnmh = (NMHDR*) lparam; + return pane_notify(pnmh->idFrom==IDW_HEADER_LEFT? &child->left: &child->right, pnmh);} +#endif + + case WM_SIZE: + if (wparam != SIZE_MINIMIZED) + resize_tree(child, LOWORD(lparam), HIWORD(lparam)); + // fall through + + default: def: + return DefMDIChildProc(hwnd, nmsg, wparam, lparam); + } + + return 0; +} + + +LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam) +{ + ChildWnd* child = (ChildWnd*) GetWindowLong(GetParent(hwnd), GWL_USERDATA); + Pane* pane = (Pane*) GetWindowLong(hwnd, GWL_USERDATA); + ASSERT(child); + + switch(nmsg) { +#ifndef _NO_EXTENSIONS + case WM_HSCROLL: + set_header(pane); + break; +#endif + + case WM_SETFOCUS: + child->focus_pane = pane==&child->right? 1: 0; + ListBox_SetSel(hwnd, TRUE, 1); + //TODO: check menu items + break; + + case WM_KEYDOWN: + if (wparam == VK_TAB) { + //TODO: SetFocus(Globals.hdrivebar) + SetFocus(child->focus_pane? child->left.hwnd: child->right.hwnd); + } + } + + return CallWindowProc(g_orgTreeWndProc, hwnd, nmsg, wparam, lparam); +} + + +static void InitInstance(HINSTANCE hinstance) +{ + WNDCLASSEX wcFrame = { + sizeof(WNDCLASSEX), + 0/*style*/, + FrameWndProc, + 0/*cbClsExtra*/, + 0/*cbWndExtra*/, + hinstance, + LoadIcon(hinstance, MAKEINTRESOURCE(IDI_WINEFILE)), + LoadCursor(0, IDC_ARROW), + 0/*hbrBackground*/, + 0/*lpszMenuName*/, + WINEFILEFRAME, + (HICON)LoadImage(hinstance, MAKEINTRESOURCE(IDI_WINEFILE), IMAGE_ICON, + GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED) + }; + + // register frame window class + ATOM hframeClass = RegisterClassEx(&wcFrame); + + + WNDCLASS wcChild = { + CS_CLASSDC|CS_DBLCLKS|CS_VREDRAW, + ChildWndProc, + 0/*cbClsExtra*/, + 0/*cbWndExtra*/, + hinstance, + 0/*hIcon*/, + LoadCursor(0, IDC_ARROW), + 0/*hbrBackground*/, + 0/*lpszMenuName*/, + WINEFILETREE + }; + + // register tree windows class + WINE_UNUSED ATOM hChildClass = RegisterClass(&wcChild); + + + HMENU hMenuFrame = LoadMenu(hinstance, MAKEINTRESOURCE(IDM_WINEFILE)); + HMENU hMenuWindow = GetSubMenu(hMenuFrame, GetMenuItemCount(hMenuFrame)-2); + + CLIENTCREATESTRUCT ccs = { + hMenuWindow, IDW_FIRST_CHILD + }; + + INITCOMMONCONTROLSEX icc = { + sizeof(INITCOMMONCONTROLSEX), + ICC_BAR_CLASSES + }; + + ChildWnd* child; + TCHAR path[MAX_PATH]; + + HDC hdc = GetDC(0); + + Globals.hMenuFrame = hMenuFrame; + Globals.hMenuView = GetSubMenu(hMenuFrame, 3); + Globals.hMenuOptions = GetSubMenu(hMenuFrame, 4); + + Globals.haccel = LoadAccelerators(hinstance, MAKEINTRESOURCE(IDA_WINEFILE)); + + Globals.hfont = CreateFont(-MulDiv(8,GetDeviceCaps(hdc,LOGPIXELSY),72), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, _T("MS Sans Serif")); + + ReleaseDC(0, hdc); + + Globals.hInstance = hinstance; + + // create main window + Globals.hMainWnd = CreateWindowEx(0, (LPCTSTR)(int)hframeClass, _T("Wine File"), WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + 0/*hWndParent*/, Globals.hMenuFrame, hinstance, 0/*lpParam*/); + + + Globals.hmdiclient = CreateWindowEx(0, _T("MDICLIENT"), NULL, + WS_CHILD|WS_CLIPCHILDREN|WS_VSCROLL|WS_HSCROLL|WS_VISIBLE|WS_BORDER, + 0, 0, 0, 0, + Globals.hMainWnd, 0, hinstance, &ccs); + + + InitCommonControlsEx(&icc); + + { + TBBUTTON drivebarBtn = {0, 0, TBSTATE_ENABLED, TBSTYLE_SEP}; + int btn = 1; + PTSTR p; + + Globals.hdrivebar = CreateToolbarEx(Globals.hMainWnd, WS_CHILD|WS_VISIBLE|CCS_NOMOVEY|TBSTYLE_LIST, + IDW_DRIVEBAR, 2, Globals.hInstance, IDB_DRIVEBAR, &drivebarBtn, + 1, 16, 13, 16, 13, sizeof(TBBUTTON)); + CheckMenuItem(Globals.hMenuOptions, ID_VIEW_DRIVE_BAR, MF_BYCOMMAND|MF_CHECKED); + + GetLogicalDriveStrings(BUFFER_LEN, Globals.drives); + + drivebarBtn.fsStyle = TBSTYLE_BUTTON; + +#ifndef _NO_EXTENSIONS +#ifdef __linux__ + // insert unix file system button + SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)_T("/\0")); + + drivebarBtn.idCommand = ID_DRIVE_UNIX_FS; + SendMessage(Globals.hdrivebar, TB_INSERTBUTTON, btn++, (LPARAM)&drivebarBtn); + drivebarBtn.iString++; +#endif + + // register windows drive root strings + SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)Globals.drives); +#endif + + drivebarBtn.idCommand = ID_DRIVE_FIRST; + + for(p=Globals.drives; *p; ) { +#ifdef _NO_EXTENSIONS + // insert drive letter + TCHAR b[3] = {tolower(*p)}; + SendMessage(Globals.hdrivebar, TB_ADDSTRING, 0, (LPARAM)b); +#endif + switch(GetDriveType(p)) { + case DRIVE_REMOVABLE: drivebarBtn.iBitmap = 1; break; + case DRIVE_CDROM: drivebarBtn.iBitmap = 3; break; + case DRIVE_REMOTE: drivebarBtn.iBitmap = 4; break; + case DRIVE_RAMDISK: drivebarBtn.iBitmap = 5; break; + default:/*DRIVE_FIXED*/ drivebarBtn.iBitmap = 2; + } + + SendMessage(Globals.hdrivebar, TB_INSERTBUTTON, btn++, (LPARAM)&drivebarBtn); + drivebarBtn.idCommand++; + drivebarBtn.iString++; + + while(*p++); + } + } + + { + TBBUTTON toolbarBtns[] = { + {0, 0, 0, TBSTYLE_SEP}, + {0, ID_WINDOW_NEW, TBSTATE_ENABLED, TBSTYLE_BUTTON}, + {1, ID_WINDOW_CASCADE, TBSTATE_ENABLED, TBSTYLE_BUTTON}, + {2, ID_WINDOW_TILE_HORZ, TBSTATE_ENABLED, TBSTYLE_BUTTON}, + {3, ID_WINDOW_TILE_VERT, TBSTATE_ENABLED, TBSTYLE_BUTTON}, + {4, 2/*TODO: ID_...*/, TBSTATE_ENABLED, TBSTYLE_BUTTON}, + {5, 2/*TODO: ID_...*/, TBSTATE_ENABLED, TBSTYLE_BUTTON}, + }; + + Globals.htoolbar = CreateToolbarEx(Globals.hMainWnd, WS_CHILD|WS_VISIBLE, + IDW_TOOLBAR, 2, Globals.hInstance, IDB_TOOLBAR, toolbarBtns, + sizeof(toolbarBtns)/sizeof(TBBUTTON), 16, 15, 16, 15, sizeof(TBBUTTON)); + CheckMenuItem(Globals.hMenuOptions, ID_VIEW_TOOL_BAR, MF_BYCOMMAND|MF_CHECKED); + } + + Globals.hstatusbar = CreateStatusWindow(WS_CHILD|WS_VISIBLE, 0, Globals.hMainWnd, IDW_STATUSBAR); + CheckMenuItem(Globals.hMenuOptions, ID_VIEW_STATUSBAR, MF_BYCOMMAND|MF_CHECKED); + +/* CreateStatusWindow does not accept WS_BORDER + Globals.hstatusbar = CreateWindowEx(WS_EX_NOPARENTNOTIFY, STATUSCLASSNAME, 0, + WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|WS_BORDER|CCS_NODIVIDER, 0,0,0,0, + Globals.hMainWnd, (HMENU)IDW_STATUSBAR, hinstance, 0);*/ + + //TODO: read paths and window placements from registry + GetCurrentDirectory(MAX_PATH, path); + child = alloc_child_window(path); + + child->pos.showCmd = SW_SHOWMAXIMIZED; + child->pos.rcNormalPosition.left = 0; + child->pos.rcNormalPosition.top = 0; + child->pos.rcNormalPosition.right = 320; + child->pos.rcNormalPosition.bottom = 280; + + if (!create_child_window(child)) + free(child); + + SetWindowPlacement(child->hwnd, &child->pos); + + Globals.himl = ImageList_LoadBitmap(Globals.hInstance, MAKEINTRESOURCE(IDB_IMAGES), 16, 0, RGB(0,255,0)); + + Globals.prescan_node = FALSE; +} + +void ExitInstance() +{ + ImageList_Destroy(Globals.himl); +} + + +#ifdef _NO_EXTENSIONS + + // search for already running win[e]files + +static int g_foundPrevInstance = 0; + +static BOOL CALLBACK EnumWndProc(HWND hwnd, LPARAM lparam) +{ + TCHAR cls[128]; + + GetClassName(hwnd, cls, 128); + + if (!lstrcmp(cls, (LPCTSTR)lparam)) { + g_foundPrevInstance++; + return FALSE; + } + + return TRUE; +} + +#endif + + +int APIENTRY WinMain(HINSTANCE hinstance, + HINSTANCE previnstance, + LPSTR cmdline, + int cmdshow) +{ + MSG msg; + +#ifdef _NO_EXTENSIONS + // allow only one running instance + EnumWindows(EnumWndProc, (LPARAM)WINEFILEFRAME); + + if (g_foundPrevInstance) + return 1; +#endif + + InitInstance(hinstance); + + if (cmdshow == SW_SHOWNORMAL) { + //TODO: read window placement from registry + cmdshow = SW_MAXIMIZE; + } + + ShowWindow(Globals.hMainWnd, cmdshow); + UpdateWindow(Globals.hMainWnd); + + while(GetMessage(&msg, 0, 0, 0)) { + if (!TranslateMDISysAccel(Globals.hmdiclient, &msg) && + !TranslateAccelerator(Globals.hMainWnd, Globals.haccel, &msg)) + { + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + + ExitInstance(); + + return 0; +} diff --git a/programs/winefile/winefile.h b/programs/winefile/winefile.h new file mode 100644 index 00000000000..eff307bad19 --- /dev/null +++ b/programs/winefile/winefile.h @@ -0,0 +1,142 @@ +/* + * Copyright 2000 Martin Fuchs + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#define WIN32_LEAN_AND_MEAN +#define WIN32_EXTRA_LEAN +#define NOSERVICE +#define NOMCX +#define NOIME +#define NOCOMM +#define NOKANJI +#define NORPC +#define NOPROXYSTUB +#define NOIMAGE +#define NOTAPE + +#ifdef UNICODE +#define _UNICODE +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef FILE_ATTRIBUTE_NOT_CONTENT_INDEXED +#define FILE_ATTRIBUTE_ENCRYPTED 0x00000040 +#define FILE_ATTRIBUTE_SPARSE_FILE 0x00000200 +#define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400 +#define FILE_ATTRIBUTE_NOT_CONTENT_INDEXED 0x00002000 +#endif + + +#ifdef _DEBUG +#define ASSERT(x) {if (!(x)) DebugBreak();} +#else +#define ASSERT(x) /* nothing */ +#endif + +typedef __uint64 QWORD; +#ifdef _MSC_VER +#define LONGLONGARG _T("I64") +#else +#define LONGLONGARG _T("L") +#endif + +#define BUFFER_LEN 1024 + + +enum IMAGE { + IMG_NONE=-1, IMG_FILE=0, IMG_DOCUMENT, IMG_EXECUTABLE, + IMG_FOLDER, IMG_OPEN_FOLDER, IMG_FOLDER_PLUS,IMG_OPEN_PLUS, IMG_OPEN_MINUS, + IMG_FOLDER_UP, IMG_FOLDER_CUR +}; + +#define IMAGE_WIDTH 16 +#define IMAGE_HEIGHT 13 +#define SPLIT_WIDTH 5 + +#define IDW_STATUSBAR 0x100 +#define IDW_TOOLBAR 0x101 +#define IDW_DRIVEBAR 0x102 +#define IDW_FIRST_CHILD 0xC000 //0x200 + +#define IDW_TREE_LEFT 3 +#define IDW_TREE_RIGHT 6 +#define IDW_HEADER_LEFT 2 +#define IDW_HEADER_RIGHT 5 + +#define WM_DISPATCH_COMMAND 0xBF80 + +#define COLOR_COMPRESSED RGB(0,0,255) +#define COLOR_SELECTION RGB(0,0,128) + +#ifdef _NO_EXTENSIONS +#define COLOR_SPLITBAR WHITE_BRUSH +#else +#define COLOR_SPLITBAR LTGRAY_BRUSH +#endif + +#define WINEFILEFRAME _T("WFS_Frame") +#define WINEFILETREE _T("WFS_Tree") +#define WINEFILEDRIVES _T("WFS_Drives") +#define WINEFILEMDICLIENT _T("WFS_MdiClient") + +#define FRM_CALC_CLIENT 0xBF83 +#define Frame_CalcFrameClient(hwnd, prt) ((BOOL)SNDMSG(hwnd, FRM_CALC_CLIENT, 0, (LPARAM)(PRECT)prt)) + + +typedef struct +{ + HANDLE hInstance; + HACCEL haccel; + HWND hMainWnd; + HMENU hMenuFrame; + HMENU hWindowsMenu; + HMENU hLanguageMenu; + HMENU hMenuView; + HMENU hMenuOptions; + HWND hmdiclient; + HWND hstatusbar; + HWND htoolbar; + HWND hdrivebar; + HFONT hfont; + + TCHAR num_sep; + SIZE spaceSize; + HIMAGELIST himl; + + TCHAR drives[BUFFER_LEN]; + BOOL prescan_node; //TODO + + UINT wStringTableOffset; +} WINEFILE_GLOBALS; + +extern WINEFILE_GLOBALS Globals; + +#ifdef UNICODE +extern void _wsplitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext); +#else +extern void _splitpath(const CHAR* path, CHAR* drv, CHAR* dir, CHAR* name, CHAR* ext); +#endif