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
45210447
Commit
45210447
authored
Mar 25, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlink: Implement IHlinkBrowseContext_UpdateHlink().
parent
ba40bbfc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
30 deletions
+50
-30
browse_ctx.c
dlls/hlink/browse_ctx.c
+50
-30
No files found.
dlls/hlink/browse_ctx.c
View file @
45210447
...
...
@@ -212,12 +212,56 @@ static HRESULT WINAPI IHlinkBC_OnNavigateHlink(IHlinkBrowseContext *iface,
return
S_OK
;
}
static
struct
link_entry
*
context_get_entry
(
HlinkBCImpl
*
ctxt
,
ULONG
hlid
)
{
struct
list
*
entry
;
switch
(
hlid
)
{
case
HLID_PREVIOUS
:
entry
=
list_prev
(
&
ctxt
->
links
,
&
ctxt
->
current
->
entry
);
break
;
case
HLID_NEXT
:
entry
=
list_next
(
&
ctxt
->
links
,
&
ctxt
->
current
->
entry
);
break
;
case
HLID_CURRENT
:
entry
=
&
ctxt
->
current
->
entry
;
break
;
case
HLID_STACKBOTTOM
:
entry
=
list_tail
(
&
ctxt
->
links
);
break
;
case
HLID_STACKTOP
:
entry
=
list_head
(
&
ctxt
->
links
);
break
;
default:
WARN
(
"unknown id 0x%x
\n
"
,
hlid
);
entry
=
NULL
;
}
return
entry
?
LIST_ENTRY
(
entry
,
struct
link_entry
,
entry
)
:
NULL
;
}
static
HRESULT
WINAPI
IHlinkBC_UpdateHlink
(
IHlinkBrowseContext
*
iface
,
ULONG
uHLID
,
IMoniker
*
pimkTarget
,
LPCWSTR
pwzLocation
,
LPCWSTR
pwzFriendlyName
)
ULONG
hlid
,
IMoniker
*
target
,
LPCWSTR
location
,
LPCWSTR
friendly_name
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
HlinkBCImpl
*
This
=
impl_from_IHlinkBrowseContext
(
iface
);
struct
link_entry
*
entry
=
context_get_entry
(
This
,
hlid
);
IHlink
*
link
;
HRESULT
hr
;
TRACE
(
"(%p)->(0x%x %p %s %s)
\n
"
,
This
,
hlid
,
target
,
debugstr_w
(
location
),
debugstr_w
(
friendly_name
));
if
(
!
entry
)
return
E_INVALIDARG
;
hr
=
HlinkCreateFromMoniker
(
target
,
location
,
friendly_name
,
NULL
,
0
,
NULL
,
&
IID_IHlink
,
(
void
**
)
&
link
);
if
(
FAILED
(
hr
))
return
hr
;
IHlink_Release
(
entry
->
link
);
entry
->
link
=
link
;
return
S_OK
;
}
static
HRESULT
WINAPI
IHlinkBC_EnumNavigationStack
(
IHlinkBrowseContext
*
iface
,
...
...
@@ -238,37 +282,13 @@ static HRESULT WINAPI IHlinkBC_GetHlink(IHlinkBrowseContext* iface, ULONG hlid,
{
HlinkBCImpl
*
This
=
impl_from_IHlinkBrowseContext
(
iface
);
struct
link_entry
*
link
;
struct
list
*
entry
;
TRACE
(
"(%p)->(0x%x %p)
\n
"
,
This
,
hlid
,
ret
);
switch
(
hlid
)
{
case
HLID_PREVIOUS
:
entry
=
list_prev
(
&
This
->
links
,
&
This
->
current
->
entry
);
break
;
case
HLID_NEXT
:
entry
=
list_next
(
&
This
->
links
,
&
This
->
current
->
entry
);
break
;
case
HLID_CURRENT
:
entry
=
&
This
->
current
->
entry
;
break
;
case
HLID_STACKBOTTOM
:
entry
=
list_tail
(
&
This
->
links
);
break
;
case
HLID_STACKTOP
:
entry
=
list_head
(
&
This
->
links
);
break
;
default:
WARN
(
"unknown id 0x%x
\n
"
,
hlid
);
entry
=
NULL
;
}
if
(
!
entry
)
link
=
context_get_entry
(
This
,
hlid
);
if
(
!
link
)
return
E_FAIL
;
link
=
LIST_ENTRY
(
entry
,
struct
link_entry
,
entry
);
*
ret
=
link
->
link
;
IHlink_AddRef
(
*
ret
);
...
...
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