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
8525f695
Commit
8525f695
authored
Jul 29, 2008
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Jul 30, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: autocomplete: There is no need for separate IAutoComplete and IAutoComplete2 vtbls.
parent
112effb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
125 deletions
+27
-125
autocomplete.c
dlls/shell32/autocomplete.c
+27
-125
No files found.
dlls/shell32/autocomplete.c
View file @
8525f695
...
@@ -61,8 +61,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
...
@@ -61,8 +61,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
typedef
struct
typedef
struct
{
{
const
IAutoCompleteVtbl
*
lpVtbl
;
const
IAutoComplete2Vtbl
*
lpVtbl
;
const
IAutoComplete2Vtbl
*
lpvtblAutoComplete2
;
LONG
ref
;
LONG
ref
;
BOOL
enabled
;
BOOL
enabled
;
HWND
hwndEdit
;
HWND
hwndEdit
;
...
@@ -75,20 +74,14 @@ typedef struct
...
@@ -75,20 +74,14 @@ typedef struct
AUTOCOMPLETEOPTIONS
options
;
AUTOCOMPLETEOPTIONS
options
;
}
IAutoCompleteImpl
;
}
IAutoCompleteImpl
;
static
const
IAutoCompleteVtbl
acvt
;
static
const
IAutoComplete2Vtbl
acvt
;
static
const
IAutoComplete2Vtbl
ac2vt
;
static
inline
IAutoCompleteImpl
*
impl_from_IAutoComplete2
(
IAutoComplete2
*
iface
)
{
return
(
IAutoCompleteImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
IAutoCompleteImpl
,
lpvtblAutoComplete2
));
}
/*
/*
converts This to an interface pointer
converts This to an interface pointer
*/
*/
#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
#define _IAutoComplete2_(This) (IAutoComplete2*)&(This->lpvtbl
AutoComplete2)
#define _IAutoComplete2_(This) (IAutoComplete2*)&(This->lpvtbl
)
static
LRESULT
APIENTRY
ACEditSubclassProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
static
LRESULT
APIENTRY
ACEditSubclassProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
static
LRESULT
APIENTRY
ACLBoxSubclassProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
static
LRESULT
APIENTRY
ACLBoxSubclassProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
...
@@ -109,7 +102,6 @@ HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVO
...
@@ -109,7 +102,6 @@ HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVO
lpac
->
ref
=
1
;
lpac
->
ref
=
1
;
lpac
->
lpVtbl
=
&
acvt
;
lpac
->
lpVtbl
=
&
acvt
;
lpac
->
lpvtblAutoComplete2
=
&
ac2vt
;
lpac
->
enabled
=
TRUE
;
lpac
->
enabled
=
TRUE
;
lpac
->
enumstr
=
NULL
;
lpac
->
enumstr
=
NULL
;
lpac
->
options
=
ACO_AUTOAPPEND
;
lpac
->
options
=
ACO_AUTOAPPEND
;
...
@@ -131,8 +123,8 @@ HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVO
...
@@ -131,8 +123,8 @@ HRESULT WINAPI IAutoComplete_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVO
/**************************************************************************
/**************************************************************************
* AutoComplete_QueryInterface
* AutoComplete_QueryInterface
*/
*/
static
HRESULT
WINAPI
IAutoComplete_fnQueryInterface
(
static
HRESULT
WINAPI
IAutoComplete
2
_fnQueryInterface
(
IAutoComplete
*
iface
,
IAutoComplete
2
*
iface
,
REFIID
riid
,
REFIID
riid
,
LPVOID
*
ppvObj
)
LPVOID
*
ppvObj
)
{
{
...
@@ -141,22 +133,16 @@ static HRESULT WINAPI IAutoComplete_fnQueryInterface(
...
@@ -141,22 +133,16 @@ static HRESULT WINAPI IAutoComplete_fnQueryInterface(
TRACE
(
"(%p)->(
\n\t
IID:
\t
%s,%p)
\n
"
,
This
,
shdebugstr_guid
(
riid
),
ppvObj
);
TRACE
(
"(%p)->(
\n\t
IID:
\t
%s,%p)
\n
"
,
This
,
shdebugstr_guid
(
riid
),
ppvObj
);
*
ppvObj
=
NULL
;
*
ppvObj
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
{
IsEqualIID
(
riid
,
&
IID_IAutoComplete
)
||
*
ppvObj
=
This
;
IsEqualIID
(
riid
,
&
IID_IAutoComplete2
))
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IAutoComplete
))
{
{
*
ppvObj
=
(
IAutoComplete
*
)
This
;
*
ppvObj
=
(
IAutoComplete2
*
)
This
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IAutoComplete2
))
{
*
ppvObj
=
_IAutoComplete2_
(
This
);
}
}
if
(
*
ppvObj
)
if
(
*
ppvObj
)
{
{
I
AutoComplete_AddRef
((
IAutoComplete
*
)
*
ppvObj
);
I
Unknown_AddRef
((
IUnknown
*
)
*
ppvObj
);
TRACE
(
"-- Interface: (%p)->(%p)
\n
"
,
ppvObj
,
*
ppvObj
);
TRACE
(
"-- Interface: (%p)->(%p)
\n
"
,
ppvObj
,
*
ppvObj
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -165,10 +151,10 @@ static HRESULT WINAPI IAutoComplete_fnQueryInterface(
...
@@ -165,10 +151,10 @@ static HRESULT WINAPI IAutoComplete_fnQueryInterface(
}
}
/******************************************************************************
/******************************************************************************
* IAutoComplete_fnAddRef
* IAutoComplete
2
_fnAddRef
*/
*/
static
ULONG
WINAPI
IAutoComplete_fnAddRef
(
static
ULONG
WINAPI
IAutoComplete
2
_fnAddRef
(
IAutoComplete
*
iface
)
IAutoComplete
2
*
iface
)
{
{
IAutoCompleteImpl
*
This
=
(
IAutoCompleteImpl
*
)
iface
;
IAutoCompleteImpl
*
This
=
(
IAutoCompleteImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
...
@@ -179,10 +165,10 @@ static ULONG WINAPI IAutoComplete_fnAddRef(
...
@@ -179,10 +165,10 @@ static ULONG WINAPI IAutoComplete_fnAddRef(
}
}
/******************************************************************************
/******************************************************************************
* IAutoComplete_fnRelease
* IAutoComplete
2
_fnRelease
*/
*/
static
ULONG
WINAPI
IAutoComplete_fnRelease
(
static
ULONG
WINAPI
IAutoComplete
2
_fnRelease
(
IAutoComplete
*
iface
)
IAutoComplete
2
*
iface
)
{
{
IAutoCompleteImpl
*
This
=
(
IAutoCompleteImpl
*
)
iface
;
IAutoCompleteImpl
*
This
=
(
IAutoCompleteImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
...
@@ -203,10 +189,10 @@ static ULONG WINAPI IAutoComplete_fnRelease(
...
@@ -203,10 +189,10 @@ static ULONG WINAPI IAutoComplete_fnRelease(
}
}
/******************************************************************************
/******************************************************************************
* IAutoComplete_fnEnable
* IAutoComplete
2
_fnEnable
*/
*/
static
HRESULT
WINAPI
IAutoComplete_fnEnable
(
static
HRESULT
WINAPI
IAutoComplete
2
_fnEnable
(
IAutoComplete
*
iface
,
IAutoComplete
2
*
iface
,
BOOL
fEnable
)
BOOL
fEnable
)
{
{
IAutoCompleteImpl
*
This
=
(
IAutoCompleteImpl
*
)
iface
;
IAutoCompleteImpl
*
This
=
(
IAutoCompleteImpl
*
)
iface
;
...
@@ -221,10 +207,10 @@ static HRESULT WINAPI IAutoComplete_fnEnable(
...
@@ -221,10 +207,10 @@ static HRESULT WINAPI IAutoComplete_fnEnable(
}
}
/******************************************************************************
/******************************************************************************
* IAutoComplete_fnInit
* IAutoComplete
2
_fnInit
*/
*/
static
HRESULT
WINAPI
IAutoComplete_fnInit
(
static
HRESULT
WINAPI
IAutoComplete
2
_fnInit
(
IAutoComplete
*
iface
,
IAutoComplete
2
*
iface
,
HWND
hwndEdit
,
HWND
hwndEdit
,
IUnknown
*
punkACL
,
IUnknown
*
punkACL
,
LPCOLESTR
pwzsRegKeyPath
,
LPCOLESTR
pwzsRegKeyPath
,
...
@@ -312,91 +298,7 @@ static HRESULT WINAPI IAutoComplete_fnInit(
...
@@ -312,91 +298,7 @@ static HRESULT WINAPI IAutoComplete_fnInit(
}
}
/**************************************************************************
/**************************************************************************
* IAutoComplete_fnVTable
* IAutoComplete2_fnGetOptions
*/
static
const
IAutoCompleteVtbl
acvt
=
{
IAutoComplete_fnQueryInterface
,
IAutoComplete_fnAddRef
,
IAutoComplete_fnRelease
,
IAutoComplete_fnInit
,
IAutoComplete_fnEnable
,
};
/**************************************************************************
* AutoComplete2_QueryInterface
*/
static
HRESULT
WINAPI
IAutoComplete2_fnQueryInterface
(
IAutoComplete2
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
IAutoCompleteImpl
*
This
=
impl_from_IAutoComplete2
(
iface
);
TRACE
(
"(%p)->(%s,%p)
\n
"
,
This
,
shdebugstr_guid
(
riid
),
ppvObj
);
return
IAutoComplete_QueryInterface
((
IAutoComplete
*
)
This
,
riid
,
ppvObj
);
}
/******************************************************************************
* IAutoComplete2_fnAddRef
*/
static
ULONG
WINAPI
IAutoComplete2_fnAddRef
(
IAutoComplete2
*
iface
)
{
IAutoCompleteImpl
*
This
=
impl_from_IAutoComplete2
(
iface
);
TRACE
(
"(%p)->(count=%u)
\n
"
,
This
,
This
->
ref
);
return
IAutoComplete2_AddRef
((
IAutoComplete
*
)
This
);
}
/******************************************************************************
* IAutoComplete2_fnRelease
*/
static
ULONG
WINAPI
IAutoComplete2_fnRelease
(
IAutoComplete2
*
iface
)
{
IAutoCompleteImpl
*
This
=
impl_from_IAutoComplete2
(
iface
);
TRACE
(
"(%p)->(count=%u)
\n
"
,
This
,
This
->
ref
);
return
IAutoComplete_Release
((
IAutoComplete
*
)
This
);
}
/******************************************************************************
* IAutoComplete2_fnEnable
*/
static
HRESULT
WINAPI
IAutoComplete2_fnEnable
(
IAutoComplete2
*
iface
,
BOOL
fEnable
)
{
IAutoCompleteImpl
*
This
=
impl_from_IAutoComplete2
(
iface
);
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
(
fEnable
)
?
"true"
:
"false"
);
return
IAutoComplete_Enable
((
IAutoComplete
*
)
This
,
fEnable
);
}
/******************************************************************************
* IAutoComplete2_fnInit
*/
static
HRESULT
WINAPI
IAutoComplete2_fnInit
(
IAutoComplete2
*
iface
,
HWND
hwndEdit
,
IUnknown
*
punkACL
,
LPCOLESTR
pwzsRegKeyPath
,
LPCOLESTR
pwszQuickComplete
)
{
IAutoCompleteImpl
*
This
=
impl_from_IAutoComplete2
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
IAutoComplete_Init
((
IAutoComplete
*
)
This
,
hwndEdit
,
punkACL
,
pwzsRegKeyPath
,
pwszQuickComplete
);
}
/**************************************************************************
* IAutoComplete_fnGetOptions
*/
*/
static
HRESULT
WINAPI
IAutoComplete2_fnGetOptions
(
static
HRESULT
WINAPI
IAutoComplete2_fnGetOptions
(
IAutoComplete2
*
iface
,
IAutoComplete2
*
iface
,
...
@@ -404,7 +306,7 @@ static HRESULT WINAPI IAutoComplete2_fnGetOptions(
...
@@ -404,7 +306,7 @@ static HRESULT WINAPI IAutoComplete2_fnGetOptions(
{
{
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
IAutoCompleteImpl
*
This
=
impl_from_IAutoComplete2
(
iface
)
;
IAutoCompleteImpl
*
This
=
(
IAutoCompleteImpl
*
)
iface
;
TRACE
(
"(%p) -> (%p)
\n
"
,
This
,
pdwFlag
);
TRACE
(
"(%p) -> (%p)
\n
"
,
This
,
pdwFlag
);
...
@@ -414,7 +316,7 @@ static HRESULT WINAPI IAutoComplete2_fnGetOptions(
...
@@ -414,7 +316,7 @@ static HRESULT WINAPI IAutoComplete2_fnGetOptions(
}
}
/**************************************************************************
/**************************************************************************
* IAutoComplete_fnSetOptions
* IAutoComplete
2
_fnSetOptions
*/
*/
static
HRESULT
WINAPI
IAutoComplete2_fnSetOptions
(
static
HRESULT
WINAPI
IAutoComplete2_fnSetOptions
(
IAutoComplete2
*
iface
,
IAutoComplete2
*
iface
,
...
@@ -422,7 +324,7 @@ static HRESULT WINAPI IAutoComplete2_fnSetOptions(
...
@@ -422,7 +324,7 @@ static HRESULT WINAPI IAutoComplete2_fnSetOptions(
{
{
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
IAutoCompleteImpl
*
This
=
impl_from_IAutoComplete2
(
iface
)
;
IAutoCompleteImpl
*
This
=
(
IAutoCompleteImpl
*
)
iface
;
TRACE
(
"(%p) -> (0x%x)
\n
"
,
This
,
dwFlag
);
TRACE
(
"(%p) -> (0x%x)
\n
"
,
This
,
dwFlag
);
...
@@ -434,7 +336,7 @@ static HRESULT WINAPI IAutoComplete2_fnSetOptions(
...
@@ -434,7 +336,7 @@ static HRESULT WINAPI IAutoComplete2_fnSetOptions(
/**************************************************************************
/**************************************************************************
* IAutoComplete2_fnVTable
* IAutoComplete2_fnVTable
*/
*/
static
const
IAutoComplete2Vtbl
ac
2
vt
=
static
const
IAutoComplete2Vtbl
acvt
=
{
{
IAutoComplete2_fnQueryInterface
,
IAutoComplete2_fnQueryInterface
,
IAutoComplete2_fnAddRef
,
IAutoComplete2_fnAddRef
,
...
...
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