Commit 9b62d9df authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

winefile: Use the explicit W-form for the rest of the types.

parent e75b496d
...@@ -86,7 +86,7 @@ typedef struct _Entry { ...@@ -86,7 +86,7 @@ typedef struct _Entry {
BOOL scanned; BOOL scanned;
int level; int level;
WIN32_FIND_DATA data; WIN32_FIND_DATAW data;
#ifndef _NO_EXTENSIONS #ifndef _NO_EXTENSIONS
BY_HANDLE_FILE_INFORMATION bhfi; BY_HANDLE_FILE_INFORMATION bhfi;
...@@ -263,7 +263,7 @@ static inline void choose_font(HWND hwnd) ...@@ -263,7 +263,7 @@ static inline void choose_font(HWND hwnd)
LOGFONTW lFont; LOGFONTW lFont;
HDC hdc = GetDC(hwnd); HDC hdc = GetDC(hwnd);
chFont.lStructSize = sizeof(CHOOSEFONT); chFont.lStructSize = sizeof(CHOOSEFONTW);
chFont.hwndOwner = hwnd; chFont.hwndOwner = hwnd;
chFont.hDC = NULL; chFont.hDC = NULL;
chFont.lpLogFont = &lFont; chFont.lpLogFont = &lFont;
...@@ -367,7 +367,7 @@ static void read_directory_win(Entry* dir, LPCWSTR path) ...@@ -367,7 +367,7 @@ static void read_directory_win(Entry* dir, LPCWSTR path)
Entry* entry; Entry* entry;
int level = dir->level + 1; int level = dir->level + 1;
WIN32_FIND_DATA w32fd; WIN32_FIND_DATAW w32fd;
HANDLE hFind; HANDLE hFind;
#ifndef _NO_EXTENSIONS #ifndef _NO_EXTENSIONS
HANDLE hFile; HANDLE hFile;
...@@ -402,7 +402,7 @@ static void read_directory_win(Entry* dir, LPCWSTR path) ...@@ -402,7 +402,7 @@ static void read_directory_win(Entry* dir, LPCWSTR path)
if (last) if (last)
last->next = entry; last->next = entry;
memcpy(&entry->data, &w32fd, sizeof(WIN32_FIND_DATA)); memcpy(&entry->data, &w32fd, sizeof(WIN32_FIND_DATAW));
entry->down = NULL; entry->down = NULL;
entry->up = dir; entry->up = dir;
entry->expanded = FALSE; entry->expanded = FALSE;
...@@ -781,9 +781,9 @@ static LPITEMIDLIST get_to_absolute_pidl(Entry* entry, HWND hwnd) ...@@ -781,9 +781,9 @@ static LPITEMIDLIST get_to_absolute_pidl(Entry* entry, HWND hwnd)
static HICON extract_icon(IShellFolder* folder, LPCITEMIDLIST pidl) static HICON extract_icon(IShellFolder* folder, LPCITEMIDLIST pidl)
{ {
IExtractIcon* pExtract; IExtractIconW* pExtract;
if (SUCCEEDED(IShellFolder_GetUIObjectOf(folder, 0, 1, (LPCITEMIDLIST*)&pidl, &IID_IExtractIcon, 0, (LPVOID*)&pExtract))) { if (SUCCEEDED(IShellFolder_GetUIObjectOf(folder, 0, 1, (LPCITEMIDLIST*)&pidl, &IID_IExtractIconW, 0, (LPVOID*)&pExtract))) {
WCHAR path[_MAX_PATH]; WCHAR path[_MAX_PATH];
unsigned flags; unsigned flags;
HICON hicon; HICON hicon;
...@@ -881,7 +881,7 @@ static Entry* read_tree_shell(Root* root, LPITEMIDLIST pidl, SORT_ORDER sortOrde ...@@ -881,7 +881,7 @@ static Entry* read_tree_shell(Root* root, LPITEMIDLIST pidl, SORT_ORDER sortOrde
} }
static void fill_w32fdata_shell(IShellFolder* folder, LPCITEMIDLIST pidl, SFGAOF attribs, WIN32_FIND_DATA* w32fdata) static void fill_w32fdata_shell(IShellFolder* folder, LPCITEMIDLIST pidl, SFGAOF attribs, WIN32_FIND_DATAW* w32fdata)
{ {
if (!(attribs & SFGAO_FILESYSTEM) || if (!(attribs & SFGAO_FILESYSTEM) ||
FAILED(SHGetDataFromIDListW(folder, pidl, SHGDFIL_FINDDATA, w32fdata, sizeof(WIN32_FIND_DATAW)))) { FAILED(SHGetDataFromIDListW(folder, pidl, SHGDFIL_FINDDATA, w32fdata, sizeof(WIN32_FIND_DATAW)))) {
...@@ -977,7 +977,7 @@ static void read_directory_shell(Entry* dir, HWND hwnd) ...@@ -977,7 +977,7 @@ static void read_directory_shell(Entry* dir, HWND hwnd)
if (last) if (last)
last->next = entry; last->next = entry;
memset(&entry->data, 0, sizeof(WIN32_FIND_DATA)); memset(&entry->data, 0, sizeof(WIN32_FIND_DATAW));
entry->bhfi_valid = FALSE; entry->bhfi_valid = FALSE;
attribs = ~SFGAO_FILESYSTEM; /*SFGAO_HASSUBFOLDER|SFGAO_FOLDER; SFGAO_FILESYSTEM sorgt dafür, daß "My Documents" anstatt von "Martin's Documents" angezeigt wird */ attribs = ~SFGAO_FILESYSTEM; /*SFGAO_HASSUBFOLDER|SFGAO_FOLDER; SFGAO_FILESYSTEM sorgt dafür, daß "My Documents" anstatt von "Martin's Documents" angezeigt wird */
...@@ -1071,7 +1071,7 @@ static int TypeOrderFromDirname(LPCWSTR name) ...@@ -1071,7 +1071,7 @@ static int TypeOrderFromDirname(LPCWSTR name)
} }
/* directories first... */ /* directories first... */
static int compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA* fd2) static int compareType(const WIN32_FIND_DATAW* fd1, const WIN32_FIND_DATAW* fd2)
{ {
int order1 = fd1->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY? TO_DIR: TO_FILE; int order1 = fd1->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY? TO_DIR: TO_FILE;
int order2 = fd2->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY? TO_DIR: TO_FILE; int order2 = fd2->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY? TO_DIR: TO_FILE;
...@@ -1088,8 +1088,8 @@ static int compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA* fd2) ...@@ -1088,8 +1088,8 @@ static int compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA* fd2)
static int compareName(const void* arg1, const void* arg2) static int compareName(const void* arg1, const void* arg2)
{ {
const WIN32_FIND_DATA* fd1 = &(*(const Entry* const*)arg1)->data; const WIN32_FIND_DATAW* fd1 = &(*(const Entry* const*)arg1)->data;
const WIN32_FIND_DATA* fd2 = &(*(const Entry* const*)arg2)->data; const WIN32_FIND_DATAW* fd2 = &(*(const Entry* const*)arg2)->data;
int cmp = compareType(fd1, fd2); int cmp = compareType(fd1, fd2);
if (cmp) if (cmp)
...@@ -1100,8 +1100,8 @@ static int compareName(const void* arg1, const void* arg2) ...@@ -1100,8 +1100,8 @@ static int compareName(const void* arg1, const void* arg2)
static int compareExt(const void* arg1, const void* arg2) static int compareExt(const void* arg1, const void* arg2)
{ {
const WIN32_FIND_DATA* fd1 = &(*(const Entry* const*)arg1)->data; const WIN32_FIND_DATAW* fd1 = &(*(const Entry* const*)arg1)->data;
const WIN32_FIND_DATA* fd2 = &(*(const Entry* const*)arg2)->data; const WIN32_FIND_DATAW* fd2 = &(*(const Entry* const*)arg2)->data;
const WCHAR *name1, *name2, *ext1, *ext2; const WCHAR *name1, *name2, *ext1, *ext2;
int cmp = compareType(fd1, fd2); int cmp = compareType(fd1, fd2);
...@@ -1133,8 +1133,8 @@ static int compareExt(const void* arg1, const void* arg2) ...@@ -1133,8 +1133,8 @@ static int compareExt(const void* arg1, const void* arg2)
static int compareSize(const void* arg1, const void* arg2) static int compareSize(const void* arg1, const void* arg2)
{ {
const WIN32_FIND_DATA* fd1 = &(*(const Entry* const*)arg1)->data; const WIN32_FIND_DATAW* fd1 = &(*(const Entry* const*)arg1)->data;
const WIN32_FIND_DATA* fd2 = &(*(const Entry* const*)arg2)->data; const WIN32_FIND_DATAW* fd2 = &(*(const Entry* const*)arg2)->data;
int cmp = compareType(fd1, fd2); int cmp = compareType(fd1, fd2);
if (cmp) if (cmp)
...@@ -1154,8 +1154,8 @@ static int compareSize(const void* arg1, const void* arg2) ...@@ -1154,8 +1154,8 @@ static int compareSize(const void* arg1, const void* arg2)
static int compareDate(const void* arg1, const void* arg2) static int compareDate(const void* arg1, const void* arg2)
{ {
const WIN32_FIND_DATA* fd1 = &(*(const Entry* const*)arg1)->data; const WIN32_FIND_DATAW* fd1 = &(*(const Entry* const*)arg1)->data;
const WIN32_FIND_DATA* fd2 = &(*(const Entry* const*)arg2)->data; const WIN32_FIND_DATAW* fd2 = &(*(const Entry* const*)arg2)->data;
int cmp = compareType(fd1, fd2); int cmp = compareType(fd1, fd2);
if (cmp) if (cmp)
...@@ -1508,7 +1508,7 @@ static windowOptions load_registry_settings(void) ...@@ -1508,7 +1508,7 @@ static windowOptions load_registry_settings(void)
DWORD type; DWORD type;
HKEY hKey; HKEY hKey;
windowOptions opts; windowOptions opts;
LOGFONT logfont; LOGFONTW logfont;
RegOpenKeyExW( HKEY_CURRENT_USER, registry_key, RegOpenKeyExW( HKEY_CURRENT_USER, registry_key,
0, KEY_QUERY_VALUE, &hKey ); 0, KEY_QUERY_VALUE, &hKey );
...@@ -1546,7 +1546,7 @@ static void save_registry_settings(void) ...@@ -1546,7 +1546,7 @@ static void save_registry_settings(void)
WINDOWINFO wi; WINDOWINFO wi;
HKEY hKey; HKEY hKey;
INT width, height; INT width, height;
LOGFONT logfont; LOGFONTW logfont;
wi.cbSize = sizeof( WINDOWINFO ); wi.cbSize = sizeof( WINDOWINFO );
GetWindowInfo(Globals.hMainWnd, &wi); GetWindowInfo(Globals.hMainWnd, &wi);
...@@ -1576,7 +1576,7 @@ static void save_registry_settings(void) ...@@ -1576,7 +1576,7 @@ static void save_registry_settings(void)
(LPBYTE) &height, sizeof(DWORD) ); (LPBYTE) &height, sizeof(DWORD) );
GetObjectW(Globals.hfont, sizeof(logfont), &logfont); GetObjectW(Globals.hfont, sizeof(logfont), &logfont);
RegSetValueExW( hKey, reg_logfont, 0, REG_BINARY, RegSetValueExW( hKey, reg_logfont, 0, REG_BINARY,
(LPBYTE) &logfont, sizeof(LOGFONT) ); (LPBYTE)&logfont, sizeof(LOGFONTW) );
/* TODO: Save more settings here (List vs. Detailed View, etc.) */ /* TODO: Save more settings here (List vs. Detailed View, etc.) */
RegCloseKey( hKey ); RegCloseKey( hKey );
...@@ -1655,7 +1655,7 @@ static LRESULT CALLBACK CBTProc(int code, WPARAM wparam, LPARAM lparam) ...@@ -1655,7 +1655,7 @@ static LRESULT CALLBACK CBTProc(int code, WPARAM wparam, LPARAM lparam)
static HWND create_child_window(ChildWnd* child) static HWND create_child_window(ChildWnd* child)
{ {
MDICREATESTRUCT mcs; MDICREATESTRUCTW mcs;
int idx; int idx;
mcs.szClass = sWINEFILETREE; mcs.szClass = sWINEFILETREE;
...@@ -1917,10 +1917,10 @@ static INT_PTR CALLBACK PropertiesDialogDlgProc(HWND hwnd, UINT nmsg, WPARAM wpa ...@@ -1917,10 +1917,10 @@ static INT_PTR CALLBACK PropertiesDialogDlgProc(HWND hwnd, UINT nmsg, WPARAM wpa
case WM_INITDIALOG: { case WM_INITDIALOG: {
static const WCHAR sByteFmt[] = {'%','s',' ','B','y','t','e','s','\0'}; static const WCHAR sByteFmt[] = {'%','s',' ','B','y','t','e','s','\0'};
WCHAR b1[BUFFER_LEN], b2[BUFFER_LEN]; WCHAR b1[BUFFER_LEN], b2[BUFFER_LEN];
LPWIN32_FIND_DATA pWFD; LPWIN32_FIND_DATAW pWFD;
dlg = (struct PropertiesDialog*) lparam; dlg = (struct PropertiesDialog*) lparam;
pWFD = (LPWIN32_FIND_DATA) &dlg->entry.data; pWFD = (LPWIN32_FIND_DATAW)&dlg->entry.data;
GetWindowTextW(hwnd, b1, MAX_PATH); GetWindowTextW(hwnd, b1, MAX_PATH);
wsprintfW(b2, b1, pWFD->cFileName); wsprintfW(b2, b1, pWFD->cFileName);
...@@ -2464,7 +2464,7 @@ static void resize_tree(ChildWnd* child, int cx, int cy) ...@@ -2464,7 +2464,7 @@ static void resize_tree(ChildWnd* child, int cx, int cy)
static HWND create_header(HWND parent, Pane* pane, UINT id) static HWND create_header(HWND parent, Pane* pane, UINT id)
{ {
HD_ITEM hdi; HDITEMW hdi;
int idx; int idx;
HWND hwnd = CreateWindowW(WC_HEADERW, 0, WS_CHILD|WS_VISIBLE|HDS_HORZ|HDS_FULLDRAG/*TODO: |HDS_BUTTONS + sort orders*/, HWND hwnd = CreateWindowW(WC_HEADERW, 0, WS_CHILD|WS_VISIBLE|HDS_HORZ|HDS_FULLDRAG/*TODO: |HDS_BUTTONS + sort orders*/,
...@@ -3430,7 +3430,7 @@ static void draw_splitbar(HWND hwnd, int x) ...@@ -3430,7 +3430,7 @@ static void draw_splitbar(HWND hwnd, int x)
static void set_header(Pane* pane) static void set_header(Pane* pane)
{ {
HD_ITEM item; HDITEMW item;
int scroll_pos = GetScrollPos(pane->hwnd, SB_HORZ); int scroll_pos = GetScrollPos(pane->hwnd, SB_HORZ);
int i=0, x=0; int i=0, x=0;
...@@ -3458,8 +3458,8 @@ static void set_header(Pane* pane) ...@@ -3458,8 +3458,8 @@ static void set_header(Pane* pane)
static LRESULT pane_notify(Pane* pane, NMHDR* pnmh) static LRESULT pane_notify(Pane* pane, NMHDR* pnmh)
{ {
switch(pnmh->code) { switch(pnmh->code) {
case HDN_ITEMCHANGED: { case HDN_ITEMCHANGEDW: {
HD_NOTIFY* phdn = (HD_NOTIFY*) pnmh; LPNMHEADERW phdn = (LPNMHEADERW)pnmh;
int idx = phdn->iItem; int idx = phdn->iItem;
int dx = phdn->pitem->cxy - pane->widths[idx]; int dx = phdn->pitem->cxy - pane->widths[idx];
int i; int i;
...@@ -3495,7 +3495,7 @@ static LRESULT pane_notify(Pane* pane, NMHDR* pnmh) ...@@ -3495,7 +3495,7 @@ static LRESULT pane_notify(Pane* pane, NMHDR* pnmh)
rt_clip.right = pane->positions[idx+1]; rt_clip.right = pane->positions[idx+1];
RedrawWindow(pane->hwnd, &rt_clip, 0, RDW_INVALIDATE|RDW_UPDATENOW); RedrawWindow(pane->hwnd, &rt_clip, 0, RDW_INVALIDATE|RDW_UPDATENOW);
if (pnmh->code == HDN_ENDTRACK) { if (pnmh->code == HDN_ENDTRACKW) {
SendMessageW(pane->hwnd, LB_SETHORIZONTALEXTENT, pane->positions[COLUMNS], 0); SendMessageW(pane->hwnd, LB_SETHORIZONTALEXTENT, pane->positions[COLUMNS], 0);
if (GetScrollPos(pane->hwnd, SB_HORZ) != scroll_pos) if (GetScrollPos(pane->hwnd, SB_HORZ) != scroll_pos)
...@@ -3506,9 +3506,9 @@ static LRESULT pane_notify(Pane* pane, NMHDR* pnmh) ...@@ -3506,9 +3506,9 @@ static LRESULT pane_notify(Pane* pane, NMHDR* pnmh)
return FALSE; return FALSE;
} }
case HDN_DIVIDERDBLCLICK: { case HDN_DIVIDERDBLCLICKW: {
HD_NOTIFY* phdn = (HD_NOTIFY*) pnmh; LPNMHEADERW phdn = (LPNMHEADERW)pnmh;
HD_ITEM item; HDITEMW item;
calc_single_width(pane, phdn->iItem); calc_single_width(pane, phdn->iItem);
item.mask = HDI_WIDTH; item.mask = HDI_WIDTH;
...@@ -3826,9 +3826,9 @@ static BOOL launch_entry(Entry* entry, HWND hwnd, UINT nCmdShow) ...@@ -3826,9 +3826,9 @@ static BOOL launch_entry(Entry* entry, HWND hwnd, UINT nCmdShow)
if (entry->etype == ET_SHELL) { if (entry->etype == ET_SHELL) {
BOOL ret = TRUE; BOOL ret = TRUE;
SHELLEXECUTEINFO shexinfo; SHELLEXECUTEINFOW shexinfo;
shexinfo.cbSize = sizeof(SHELLEXECUTEINFO); shexinfo.cbSize = sizeof(SHELLEXECUTEINFOW);
shexinfo.fMask = SEE_MASK_IDLIST; shexinfo.fMask = SEE_MASK_IDLIST;
shexinfo.hwnd = hwnd; shexinfo.hwnd = hwnd;
shexinfo.lpVerb = NULL; shexinfo.lpVerb = NULL;
...@@ -4308,7 +4308,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM ...@@ -4308,7 +4308,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
WCHAR source[BUFFER_LEN], target[BUFFER_LEN]; WCHAR source[BUFFER_LEN], target[BUFFER_LEN];
if (prompt_target(pane, source, target)) { if (prompt_target(pane, source, target)) {
SHFILEOPSTRUCT shfo = {hwnd, FO_MOVE, source, target}; SHFILEOPSTRUCTW shfo = {hwnd, FO_MOVE, source, target};
source[lstrlenW(source)+1] = '\0'; source[lstrlenW(source)+1] = '\0';
target[lstrlenW(target)+1] = '\0'; target[lstrlenW(target)+1] = '\0';
...@@ -4322,7 +4322,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM ...@@ -4322,7 +4322,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
WCHAR source[BUFFER_LEN], target[BUFFER_LEN]; WCHAR source[BUFFER_LEN], target[BUFFER_LEN];
if (prompt_target(pane, source, target)) { if (prompt_target(pane, source, target)) {
SHFILEOPSTRUCT shfo = {hwnd, FO_COPY, source, target}; SHFILEOPSTRUCTW shfo = {hwnd, FO_COPY, source, target};
source[lstrlenW(source)+1] = '\0'; source[lstrlenW(source)+1] = '\0';
target[lstrlenW(target)+1] = '\0'; target[lstrlenW(target)+1] = '\0';
...@@ -4334,7 +4334,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM ...@@ -4334,7 +4334,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
case ID_FILE_DELETE: { case ID_FILE_DELETE: {
WCHAR path[BUFFER_LEN]; WCHAR path[BUFFER_LEN];
SHFILEOPSTRUCT shfo = {hwnd, FO_DELETE, path, NULL, FOF_ALLOWUNDO}; SHFILEOPSTRUCTW shfo = {hwnd, FO_DELETE, path, NULL, FOF_ALLOWUNDO};
get_path(pane->cur, path); get_path(pane->cur, path);
...@@ -4532,8 +4532,8 @@ static void InitInstance(HINSTANCE hinstance) ...@@ -4532,8 +4532,8 @@ static void InitInstance(HINSTANCE hinstance)
{ {
static const WCHAR sFont[] = {'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f','\0'}; static const WCHAR sFont[] = {'M','i','c','r','o','s','o','f','t',' ','S','a','n','s',' ','S','e','r','i','f','\0'};
WNDCLASSEX wcFrame; WNDCLASSEXW wcFrame;
WNDCLASS wcChild; WNDCLASSW wcChild;
ATOM hChildClass; ATOM hChildClass;
int col; int col;
...@@ -4551,7 +4551,7 @@ static void InitInstance(HINSTANCE hinstance) ...@@ -4551,7 +4551,7 @@ static void InitInstance(HINSTANCE hinstance)
/* register frame window class */ /* register frame window class */
wcFrame.cbSize = sizeof(WNDCLASSEX); wcFrame.cbSize = sizeof(WNDCLASSEXW);
wcFrame.style = 0; wcFrame.style = 0;
wcFrame.lpfnWndProc = FrameWndProc; wcFrame.lpfnWndProc = FrameWndProc;
wcFrame.cbClsExtra = 0; wcFrame.cbClsExtra = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment