Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f4a0e349
Commit
f4a0e349
authored
Dec 08, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
browseui: Use an iface instead of a vtbl pointer in ProgressDialog.
parent
0d61c7ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
progressdlg.c
dlls/browseui/progressdlg.c
+18
-13
No files found.
dlls/browseui/progressdlg.c
View file @
f4a0e349
...
@@ -59,7 +59,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(browseui);
...
@@ -59,7 +59,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(browseui);
#define WM_DLG_DESTROY (WM_APP+2)
/* DestroyWindow must be called from the owning thread */
#define WM_DLG_DESTROY (WM_APP+2)
/* DestroyWindow must be called from the owning thread */
typedef
struct
tagProgressDialog
{
typedef
struct
tagProgressDialog
{
const
IProgressDialogVtbl
*
vtbl
;
IProgressDialog
IProgressDialog_iface
;
LONG
refCount
;
LONG
refCount
;
CRITICAL_SECTION
cs
;
CRITICAL_SECTION
cs
;
HWND
hwnd
;
HWND
hwnd
;
...
@@ -74,6 +74,11 @@ typedef struct tagProgressDialog {
...
@@ -74,6 +74,11 @@ typedef struct tagProgressDialog {
HWND
hwndDisabledParent
;
/* For modal dialog: the parent that need to be re-enabled when the dialog ends */
HWND
hwndDisabledParent
;
/* For modal dialog: the parent that need to be re-enabled when the dialog ends */
}
ProgressDialog
;
}
ProgressDialog
;
static
inline
ProgressDialog
*
impl_from_IProgressDialog
(
IProgressDialog
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ProgressDialog
,
IProgressDialog_iface
);
}
static
void
set_buffer
(
LPWSTR
*
buffer
,
LPCWSTR
string
)
static
void
set_buffer
(
LPWSTR
*
buffer
,
LPCWSTR
string
)
{
{
static
const
WCHAR
empty_string
[]
=
{
0
};
static
const
WCHAR
empty_string
[]
=
{
0
};
...
@@ -260,7 +265,7 @@ static void ProgressDialog_Destructor(ProgressDialog *This)
...
@@ -260,7 +265,7 @@ static void ProgressDialog_Destructor(ProgressDialog *This)
static
HRESULT
WINAPI
ProgressDialog_QueryInterface
(
IProgressDialog
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
static
HRESULT
WINAPI
ProgressDialog_QueryInterface
(
IProgressDialog
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
{
ProgressDialog
*
This
=
(
ProgressDialog
*
)
iface
;
ProgressDialog
*
This
=
impl_from_IProgressDialog
(
iface
)
;
*
ppvOut
=
NULL
;
*
ppvOut
=
NULL
;
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_IProgressDialog
))
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_IProgressDialog
))
...
@@ -280,13 +285,13 @@ static HRESULT WINAPI ProgressDialog_QueryInterface(IProgressDialog *iface, REFI
...
@@ -280,13 +285,13 @@ static HRESULT WINAPI ProgressDialog_QueryInterface(IProgressDialog *iface, REFI
static
ULONG
WINAPI
ProgressDialog_AddRef
(
IProgressDialog
*
iface
)
static
ULONG
WINAPI
ProgressDialog_AddRef
(
IProgressDialog
*
iface
)
{
{
ProgressDialog
*
This
=
(
ProgressDialog
*
)
iface
;
ProgressDialog
*
This
=
impl_from_IProgressDialog
(
iface
)
;
return
InterlockedIncrement
(
&
This
->
refCount
);
return
InterlockedIncrement
(
&
This
->
refCount
);
}
}
static
ULONG
WINAPI
ProgressDialog_Release
(
IProgressDialog
*
iface
)
static
ULONG
WINAPI
ProgressDialog_Release
(
IProgressDialog
*
iface
)
{
{
ProgressDialog
*
This
=
(
ProgressDialog
*
)
iface
;
ProgressDialog
*
This
=
impl_from_IProgressDialog
(
iface
)
;
ULONG
ret
;
ULONG
ret
;
ret
=
InterlockedDecrement
(
&
This
->
refCount
);
ret
=
InterlockedDecrement
(
&
This
->
refCount
);
...
@@ -297,7 +302,7 @@ static ULONG WINAPI ProgressDialog_Release(IProgressDialog *iface)
...
@@ -297,7 +302,7 @@ static ULONG WINAPI ProgressDialog_Release(IProgressDialog *iface)
static
HRESULT
WINAPI
ProgressDialog_StartProgressDialog
(
IProgressDialog
*
iface
,
HWND
hwndParent
,
IUnknown
*
punkEnableModeless
,
DWORD
dwFlags
,
LPCVOID
reserved
)
static
HRESULT
WINAPI
ProgressDialog_StartProgressDialog
(
IProgressDialog
*
iface
,
HWND
hwndParent
,
IUnknown
*
punkEnableModeless
,
DWORD
dwFlags
,
LPCVOID
reserved
)
{
{
ProgressDialog
*
This
=
(
ProgressDialog
*
)
iface
;
ProgressDialog
*
This
=
impl_from_IProgressDialog
(
iface
)
;
struct
create_params
params
;
struct
create_params
params
;
HANDLE
hThread
;
HANDLE
hThread
;
...
@@ -341,7 +346,7 @@ static HRESULT WINAPI ProgressDialog_StartProgressDialog(IProgressDialog *iface,
...
@@ -341,7 +346,7 @@ static HRESULT WINAPI ProgressDialog_StartProgressDialog(IProgressDialog *iface,
static
HRESULT
WINAPI
ProgressDialog_StopProgressDialog
(
IProgressDialog
*
iface
)
static
HRESULT
WINAPI
ProgressDialog_StopProgressDialog
(
IProgressDialog
*
iface
)
{
{
ProgressDialog
*
This
=
(
ProgressDialog
*
)
iface
;
ProgressDialog
*
This
=
impl_from_IProgressDialog
(
iface
)
;
EnterCriticalSection
(
&
This
->
cs
);
EnterCriticalSection
(
&
This
->
cs
);
if
(
This
->
hwnd
)
if
(
This
->
hwnd
)
...
@@ -353,7 +358,7 @@ static HRESULT WINAPI ProgressDialog_StopProgressDialog(IProgressDialog *iface)
...
@@ -353,7 +358,7 @@ static HRESULT WINAPI ProgressDialog_StopProgressDialog(IProgressDialog *iface)
static
HRESULT
WINAPI
ProgressDialog_SetTitle
(
IProgressDialog
*
iface
,
LPCWSTR
pwzTitle
)
static
HRESULT
WINAPI
ProgressDialog_SetTitle
(
IProgressDialog
*
iface
,
LPCWSTR
pwzTitle
)
{
{
ProgressDialog
*
This
=
(
ProgressDialog
*
)
iface
;
ProgressDialog
*
This
=
impl_from_IProgressDialog
(
iface
)
;
HWND
hwnd
;
HWND
hwnd
;
TRACE
(
"(%p, %s)
\n
"
,
This
,
wine_dbgstr_w
(
pwzTitle
));
TRACE
(
"(%p, %s)
\n
"
,
This
,
wine_dbgstr_w
(
pwzTitle
));
...
@@ -378,13 +383,13 @@ static HRESULT WINAPI ProgressDialog_SetAnimation(IProgressDialog *iface, HINSTA
...
@@ -378,13 +383,13 @@ static HRESULT WINAPI ProgressDialog_SetAnimation(IProgressDialog *iface, HINSTA
static
BOOL
WINAPI
ProgressDialog_HasUserCancelled
(
IProgressDialog
*
iface
)
static
BOOL
WINAPI
ProgressDialog_HasUserCancelled
(
IProgressDialog
*
iface
)
{
{
ProgressDialog
*
This
=
(
ProgressDialog
*
)
iface
;
ProgressDialog
*
This
=
impl_from_IProgressDialog
(
iface
)
;
return
This
->
isCancelled
;
return
This
->
isCancelled
;
}
}
static
HRESULT
WINAPI
ProgressDialog_SetProgress64
(
IProgressDialog
*
iface
,
ULONGLONG
ullCompleted
,
ULONGLONG
ullTotal
)
static
HRESULT
WINAPI
ProgressDialog_SetProgress64
(
IProgressDialog
*
iface
,
ULONGLONG
ullCompleted
,
ULONGLONG
ullTotal
)
{
{
ProgressDialog
*
This
=
(
ProgressDialog
*
)
iface
;
ProgressDialog
*
This
=
impl_from_IProgressDialog
(
iface
)
;
HWND
hwnd
;
HWND
hwnd
;
TRACE
(
"(%p, 0x%s, 0x%s)
\n
"
,
This
,
wine_dbgstr_longlong
(
ullCompleted
),
wine_dbgstr_longlong
(
ullTotal
));
TRACE
(
"(%p, 0x%s, 0x%s)
\n
"
,
This
,
wine_dbgstr_longlong
(
ullCompleted
),
wine_dbgstr_longlong
(
ullTotal
));
...
@@ -409,7 +414,7 @@ static HRESULT WINAPI ProgressDialog_SetProgress(IProgressDialog *iface, DWORD d
...
@@ -409,7 +414,7 @@ static HRESULT WINAPI ProgressDialog_SetProgress(IProgressDialog *iface, DWORD d
static
HRESULT
WINAPI
ProgressDialog_SetLine
(
IProgressDialog
*
iface
,
DWORD
dwLineNum
,
LPCWSTR
pwzLine
,
BOOL
bPath
,
LPCVOID
reserved
)
static
HRESULT
WINAPI
ProgressDialog_SetLine
(
IProgressDialog
*
iface
,
DWORD
dwLineNum
,
LPCWSTR
pwzLine
,
BOOL
bPath
,
LPCVOID
reserved
)
{
{
ProgressDialog
*
This
=
(
ProgressDialog
*
)
iface
;
ProgressDialog
*
This
=
impl_from_IProgressDialog
(
iface
)
;
HWND
hwnd
;
HWND
hwnd
;
TRACE
(
"(%p, %d, %s, %d)
\n
"
,
This
,
dwLineNum
,
wine_dbgstr_w
(
pwzLine
),
bPath
);
TRACE
(
"(%p, %d, %s, %d)
\n
"
,
This
,
dwLineNum
,
wine_dbgstr_w
(
pwzLine
),
bPath
);
...
@@ -435,7 +440,7 @@ static HRESULT WINAPI ProgressDialog_SetLine(IProgressDialog *iface, DWORD dwLin
...
@@ -435,7 +440,7 @@ static HRESULT WINAPI ProgressDialog_SetLine(IProgressDialog *iface, DWORD dwLin
static
HRESULT
WINAPI
ProgressDialog_SetCancelMsg
(
IProgressDialog
*
iface
,
LPCWSTR
pwzMsg
,
LPCVOID
reserved
)
static
HRESULT
WINAPI
ProgressDialog_SetCancelMsg
(
IProgressDialog
*
iface
,
LPCWSTR
pwzMsg
,
LPCVOID
reserved
)
{
{
ProgressDialog
*
This
=
(
ProgressDialog
*
)
iface
;
ProgressDialog
*
This
=
impl_from_IProgressDialog
(
iface
)
;
HWND
hwnd
;
HWND
hwnd
;
TRACE
(
"(%p, %s)
\n
"
,
This
,
wine_dbgstr_w
(
pwzMsg
));
TRACE
(
"(%p, %s)
\n
"
,
This
,
wine_dbgstr_w
(
pwzMsg
));
...
@@ -457,7 +462,7 @@ static HRESULT WINAPI ProgressDialog_SetCancelMsg(IProgressDialog *iface, LPCWST
...
@@ -457,7 +462,7 @@ static HRESULT WINAPI ProgressDialog_SetCancelMsg(IProgressDialog *iface, LPCWST
static
HRESULT
WINAPI
ProgressDialog_Timer
(
IProgressDialog
*
iface
,
DWORD
dwTimerAction
,
LPCVOID
reserved
)
static
HRESULT
WINAPI
ProgressDialog_Timer
(
IProgressDialog
*
iface
,
DWORD
dwTimerAction
,
LPCVOID
reserved
)
{
{
ProgressDialog
*
This
=
(
ProgressDialog
*
)
iface
;
ProgressDialog
*
This
=
impl_from_IProgressDialog
(
iface
)
;
FIXME
(
"(%p, %d, %p) - stub
\n
"
,
This
,
dwTimerAction
,
reserved
);
FIXME
(
"(%p, %d, %p) - stub
\n
"
,
This
,
dwTimerAction
,
reserved
);
...
@@ -495,7 +500,7 @@ HRESULT ProgressDialog_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
...
@@ -495,7 +500,7 @@ HRESULT ProgressDialog_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
if
(
This
==
NULL
)
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
This
->
v
tbl
=
&
ProgressDialogVtbl
;
This
->
IProgressDialog_iface
.
lpV
tbl
=
&
ProgressDialogVtbl
;
This
->
refCount
=
1
;
This
->
refCount
=
1
;
InitializeCriticalSection
(
&
This
->
cs
);
InitializeCriticalSection
(
&
This
->
cs
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment