Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
efbd3b4f
Commit
efbd3b4f
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 Context.
parent
d09f4c0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
context.c
dlls/msctf/context.c
+57
-0
No files found.
dlls/msctf/context.c
View file @
efbd3b4f
...
@@ -42,12 +42,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctf);
...
@@ -42,12 +42,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctf);
typedef
struct
tagContext
{
typedef
struct
tagContext
{
const
ITfContextVtbl
*
ContextVtbl
;
const
ITfContextVtbl
*
ContextVtbl
;
const
ITfSourceVtbl
*
SourceVtbl
;
LONG
refCount
;
LONG
refCount
;
TfClientId
tidOwner
;
TfClientId
tidOwner
;
IUnknown
*
punk
;
/* possible ITextStoreACP or ITfContextOwnerCompositionSink */
IUnknown
*
punk
;
/* possible ITextStoreACP or ITfContextOwnerCompositionSink */
}
Context
;
}
Context
;
static
inline
Context
*
impl_from_ITfSourceVtbl
(
ITfSource
*
iface
)
{
return
(
Context
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
Context
,
SourceVtbl
));
}
static
void
Context_Destructor
(
Context
*
This
)
static
void
Context_Destructor
(
Context
*
This
)
{
{
TRACE
(
"destroying %p
\n
"
,
This
);
TRACE
(
"destroying %p
\n
"
,
This
);
...
@@ -63,6 +69,10 @@ static HRESULT WINAPI Context_QueryInterface(ITfContext *iface, REFIID iid, LPVO
...
@@ -63,6 +69,10 @@ static HRESULT WINAPI Context_QueryInterface(ITfContext *iface, REFIID iid, LPVO
{
{
*
ppvOut
=
This
;
*
ppvOut
=
This
;
}
}
else
if
(
IsEqualIID
(
iid
,
&
IID_ITfSource
))
{
*
ppvOut
=
&
This
->
SourceVtbl
;
}
if
(
*
ppvOut
)
if
(
*
ppvOut
)
{
{
...
@@ -241,6 +251,52 @@ static const ITfContextVtbl Context_ContextVtbl =
...
@@ -241,6 +251,52 @@ static const ITfContextVtbl Context_ContextVtbl =
Context_CreateRangeBackup
Context_CreateRangeBackup
};
};
static
HRESULT
WINAPI
Source_QueryInterface
(
ITfSource
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
Context
*
This
=
impl_from_ITfSourceVtbl
(
iface
);
return
Context_QueryInterface
((
ITfContext
*
)
This
,
iid
,
*
ppvOut
);
}
static
ULONG
WINAPI
Source_AddRef
(
ITfSource
*
iface
)
{
Context
*
This
=
impl_from_ITfSourceVtbl
(
iface
);
return
Context_AddRef
((
ITfContext
*
)
This
);
}
static
ULONG
WINAPI
Source_Release
(
ITfSource
*
iface
)
{
Context
*
This
=
impl_from_ITfSourceVtbl
(
iface
);
return
Context_Release
((
ITfContext
*
)
This
);
}
/*****************************************************
* ITfSource functions
*****************************************************/
static
WINAPI
HRESULT
ContextSource_AdviseSink
(
ITfSource
*
iface
,
REFIID
riid
,
IUnknown
*
punk
,
DWORD
*
pdwCookie
)
{
Context
*
This
=
impl_from_ITfSourceVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
WINAPI
HRESULT
ContextSource_UnadviseSink
(
ITfSource
*
iface
,
DWORD
pdwCookie
)
{
Context
*
This
=
impl_from_ITfSourceVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
const
ITfSourceVtbl
Context_SourceVtbl
=
{
Source_QueryInterface
,
Source_AddRef
,
Source_Release
,
ContextSource_AdviseSink
,
ContextSource_UnadviseSink
,
};
HRESULT
Context_Constructor
(
TfClientId
tidOwner
,
IUnknown
*
punk
,
ITfContext
**
ppOut
,
TfEditCookie
*
pecTextStore
)
HRESULT
Context_Constructor
(
TfClientId
tidOwner
,
IUnknown
*
punk
,
ITfContext
**
ppOut
,
TfEditCookie
*
pecTextStore
)
{
{
Context
*
This
;
Context
*
This
;
...
@@ -250,6 +306,7 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp
...
@@ -250,6 +306,7 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
This
->
ContextVtbl
=
&
Context_ContextVtbl
;
This
->
ContextVtbl
=
&
Context_ContextVtbl
;
This
->
SourceVtbl
=
&
Context_SourceVtbl
;
This
->
refCount
=
1
;
This
->
refCount
=
1
;
This
->
tidOwner
=
tidOwner
;
This
->
tidOwner
=
tidOwner
;
This
->
punk
=
punk
;
This
->
punk
=
punk
;
...
...
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