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
374d41d5
Commit
374d41d5
authored
May 26, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
May 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Framework for ITfInsertAtSelection in ITfContext.
parent
acbefe5b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
1 deletion
+85
-1
context.c
dlls/msctf/context.c
+60
-1
msctf.idl
include/msctf.idl
+25
-0
No files found.
dlls/msctf/context.c
View file @
374d41d5
...
...
@@ -61,7 +61,7 @@ typedef struct tagContext {
/* const ITfContextCompositionVtbl *ContextCompositionVtbl; */
/* const ITfContextOwnerCompositionServicesVtbl *ContextOwnerCompositionServicesVtbl; */
/* const ITfContextOwnerServicesVtbl *ContextOwnerServicesVtbl; */
/* const ITfInsertAtSelectionVtbl *InsertAtSelectionVtbl; */
const
ITfInsertAtSelectionVtbl
*
InsertAtSelectionVtbl
;
/* const ITfMouseTrackerVtbl *MouseTrackerVtbl; */
/* const ITfQueryEmbeddedVtbl *QueryEmbeddedVtbl; */
/* const ITfSourceSingleVtbl *SourceSingleVtbl; */
...
...
@@ -108,6 +108,11 @@ static inline Context *impl_from_ITfSourceVtbl(ITfSource *iface)
return
(
Context
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
Context
,
SourceVtbl
));
}
static
inline
Context
*
impl_from_ITfInsertAtSelectionVtbl
(
ITfInsertAtSelection
*
iface
)
{
return
(
Context
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
Context
,
InsertAtSelectionVtbl
));
}
static
void
free_sink
(
ContextSink
*
sink
)
{
IUnknown_Release
(
sink
->
interfaces
.
pIUnknown
);
...
...
@@ -186,6 +191,10 @@ static HRESULT WINAPI Context_QueryInterface(ITfContext *iface, REFIID iid, LPVO
{
*
ppvOut
=
&
This
->
SourceVtbl
;
}
else
if
(
IsEqualIID
(
iid
,
&
IID_ITfInsertAtSelection
))
{
*
ppvOut
=
&
This
->
InsertAtSelectionVtbl
;
}
if
(
*
ppvOut
)
{
...
...
@@ -578,6 +587,55 @@ static const ITfSourceVtbl Context_SourceVtbl =
ContextSource_UnadviseSink
,
};
/*****************************************************
* ITfInsertAtSelection functions
*****************************************************/
static
HRESULT
WINAPI
InsertAtSelection_QueryInterface
(
ITfInsertAtSelection
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
Context
*
This
=
impl_from_ITfInsertAtSelectionVtbl
(
iface
);
return
Context_QueryInterface
((
ITfContext
*
)
This
,
iid
,
*
ppvOut
);
}
static
ULONG
WINAPI
InsertAtSelection_AddRef
(
ITfInsertAtSelection
*
iface
)
{
Context
*
This
=
impl_from_ITfInsertAtSelectionVtbl
(
iface
);
return
Context_AddRef
((
ITfContext
*
)
This
);
}
static
ULONG
WINAPI
InsertAtSelection_Release
(
ITfInsertAtSelection
*
iface
)
{
Context
*
This
=
impl_from_ITfInsertAtSelectionVtbl
(
iface
);
return
Context_Release
((
ITfContext
*
)
This
);
}
static
WINAPI
HRESULT
InsertAtSelection_InsertTextAtSelection
(
ITfInsertAtSelection
*
iface
,
TfEditCookie
ec
,
DWORD
dwFlags
,
const
WCHAR
*
pchText
,
LONG
cch
,
ITfRange
**
ppRange
)
{
Context
*
This
=
impl_from_ITfInsertAtSelectionVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
WINAPI
HRESULT
InsertAtSelection_InsertEmbeddedAtSelection
(
ITfInsertAtSelection
*
iface
,
TfEditCookie
ec
,
DWORD
dwFlags
,
IDataObject
*
pDataObject
,
ITfRange
**
ppRange
)
{
Context
*
This
=
impl_from_ITfInsertAtSelectionVtbl
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
const
ITfInsertAtSelectionVtbl
Context_InsertAtSelectionVtbl
=
{
InsertAtSelection_QueryInterface
,
InsertAtSelection_AddRef
,
InsertAtSelection_Release
,
InsertAtSelection_InsertTextAtSelection
,
InsertAtSelection_InsertEmbeddedAtSelection
,
};
HRESULT
Context_Constructor
(
TfClientId
tidOwner
,
IUnknown
*
punk
,
ITfContext
**
ppOut
,
TfEditCookie
*
pecTextStore
)
{
Context
*
This
;
...
...
@@ -598,6 +656,7 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp
This
->
ContextVtbl
=
&
Context_ContextVtbl
;
This
->
SourceVtbl
=
&
Context_SourceVtbl
;
This
->
InsertAtSelectionVtbl
=
&
Context_InsertAtSelectionVtbl
;
This
->
refCount
=
1
;
This
->
tidOwner
=
tidOwner
;
This
->
connected
=
FALSE
;
...
...
include/msctf.idl
View file @
374d41d5
...
...
@@ -868,3 +868,28 @@ interface ITfRange : IUnknown
HRESULT
GetContext
(
[
out
]
ITfContext
**
ppContext
)
;
}
;
[
object
,
uuid
(
55
ce16ba
-
3014
-
41
c1
-
9
ceb
-
fade1446ac6c
),
pointer_default
(
unique
)
]
interface
ITfInsertAtSelection
:
IUnknown
{
const
DWORD
TF_IAS_NOQUERY
=
0
x1
;
const
DWORD
TF_IAS_QUERYONLY
=
0
x2
;
const
DWORD
TF_IAS_NO_DEFAULT_COMPOSITION
=
0
x80000000
;
HRESULT
InsertTextAtSelection
(
[
in
]
TfEditCookie
ec
,
[
in
]
DWORD
dwFlags
,
[
in
,
size_is
(
cch
)
]
const
WCHAR
*
pchText
,
[
in
]
LONG
cch
,
[
out
]
ITfRange
**
ppRange
)
;
HRESULT
InsertEmbeddedAtSelection
(
[
in
]
TfEditCookie
ec
,
[
in
]
DWORD
dwFlags
,
[
in
]
IDataObject
*
pDataObject
,
[
out
]
ITfRange
**
ppRange
)
;
}
;
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