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
aacbe97a
Commit
aacbe97a
authored
Feb 02, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Feb 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Add ITfSource interface to DocumentMgr.
parent
bc7dd32e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
documentmgr.c
dlls/msctf/documentmgr.c
+58
-0
No files found.
dlls/msctf/documentmgr.c
View file @
aacbe97a
...
@@ -42,11 +42,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctf);
...
@@ -42,11 +42,17 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctf);
typedef
struct
tagDocumentMgr
{
typedef
struct
tagDocumentMgr
{
const
ITfDocumentMgrVtbl
*
DocumentMgrVtbl
;
const
ITfDocumentMgrVtbl
*
DocumentMgrVtbl
;
const
ITfSourceVtbl
*
SourceVtbl
;
LONG
refCount
;
LONG
refCount
;
ITfContext
*
contextStack
[
2
];
/* limit of 2 contexts */
ITfContext
*
contextStack
[
2
];
/* limit of 2 contexts */
}
DocumentMgr
;
}
DocumentMgr
;
static
inline
DocumentMgr
*
impl_from_ITfSourceVtbl
(
ITfSource
*
iface
)
{
return
(
DocumentMgr
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
DocumentMgr
,
SourceVtbl
));
}
static
void
DocumentMgr_Destructor
(
DocumentMgr
*
This
)
static
void
DocumentMgr_Destructor
(
DocumentMgr
*
This
)
{
{
TRACE
(
"destroying %p
\n
"
,
This
);
TRACE
(
"destroying %p
\n
"
,
This
);
...
@@ -66,6 +72,10 @@ static HRESULT WINAPI DocumentMgr_QueryInterface(ITfDocumentMgr *iface, REFIID i
...
@@ -66,6 +72,10 @@ static HRESULT WINAPI DocumentMgr_QueryInterface(ITfDocumentMgr *iface, REFIID i
{
{
*
ppvOut
=
This
;
*
ppvOut
=
This
;
}
}
else
if
(
IsEqualIID
(
iid
,
&
IID_ITfSource
))
{
*
ppvOut
=
&
This
->
SourceVtbl
;
}
if
(
*
ppvOut
)
if
(
*
ppvOut
)
{
{
...
@@ -205,6 +215,53 @@ static const ITfDocumentMgrVtbl DocumentMgr_DocumentMgrVtbl =
...
@@ -205,6 +215,53 @@ static const ITfDocumentMgrVtbl DocumentMgr_DocumentMgrVtbl =
DocumentMgr_EnumContexts
DocumentMgr_EnumContexts
};
};
static
HRESULT
WINAPI
Source_QueryInterface
(
ITfSource
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
DocumentMgr
*
This
=
impl_from_ITfSourceVtbl
(
iface
);
return
DocumentMgr_QueryInterface
((
ITfDocumentMgr
*
)
This
,
iid
,
*
ppvOut
);
}
static
ULONG
WINAPI
Source_AddRef
(
ITfSource
*
iface
)
{
DocumentMgr
*
This
=
impl_from_ITfSourceVtbl
(
iface
);
return
DocumentMgr_AddRef
((
ITfDocumentMgr
*
)
This
);
}
static
ULONG
WINAPI
Source_Release
(
ITfSource
*
iface
)
{
DocumentMgr
*
This
=
impl_from_ITfSourceVtbl
(
iface
);
return
DocumentMgr_Release
((
ITfDocumentMgr
*
)
This
);
}
/*****************************************************
* ITfSource functions
*****************************************************/
static
WINAPI
HRESULT
DocumentMgrSource_AdviseSink
(
ITfSource
*
iface
,
REFIID
riid
,
IUnknown
*
punk
,
DWORD
*
pdwCookie
)
{
DocumentMgr
*
This
=
impl_from_ITfSourceVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
WINAPI
HRESULT
DocumentMgrSource_UnadviseSink
(
ITfSource
*
iface
,
DWORD
pdwCookie
)
{
DocumentMgr
*
This
=
impl_from_ITfSourceVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
const
ITfSourceVtbl
DocumentMgr_SourceVtbl
=
{
Source_QueryInterface
,
Source_AddRef
,
Source_Release
,
DocumentMgrSource_AdviseSink
,
DocumentMgrSource_UnadviseSink
,
};
HRESULT
DocumentMgr_Constructor
(
ITfDocumentMgr
**
ppOut
)
HRESULT
DocumentMgr_Constructor
(
ITfDocumentMgr
**
ppOut
)
{
{
DocumentMgr
*
This
;
DocumentMgr
*
This
;
...
@@ -214,6 +271,7 @@ HRESULT DocumentMgr_Constructor(ITfDocumentMgr **ppOut)
...
@@ -214,6 +271,7 @@ HRESULT DocumentMgr_Constructor(ITfDocumentMgr **ppOut)
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
This
->
DocumentMgrVtbl
=
&
DocumentMgr_DocumentMgrVtbl
;
This
->
DocumentMgrVtbl
=
&
DocumentMgr_DocumentMgrVtbl
;
This
->
SourceVtbl
=
&
DocumentMgr_SourceVtbl
;
This
->
refCount
=
1
;
This
->
refCount
=
1
;
TRACE
(
"returning %p
\n
"
,
This
);
TRACE
(
"returning %p
\n
"
,
This
);
...
...
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