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
2952219e
Commit
2952219e
authored
Jun 02, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf/range: Update to ITfRangeACP.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c41ccf89
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
96 deletions
+96
-96
range.c
dlls/msctf/range.c
+95
-95
inputprocessor.c
dlls/msctf/tests/inputprocessor.c
+1
-1
No files found.
dlls/msctf/range.c
View file @
2952219e
...
...
@@ -37,8 +37,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msctf
);
typedef
struct
tagRange
{
ITfRange
ITfRange_iface
;
/* const ITfRangeACPVtb *RangeACPVtbl; */
ITfRangeACP
ITfRangeACP_iface
;
LONG
refCount
;
ITfContext
*
context
;
...
...
@@ -48,9 +47,14 @@ typedef struct tagRange {
}
Range
;
static
inline
Range
*
impl_from_ITfRange
(
ITfRange
*
iface
)
static
inline
Range
*
impl_from_ITfRange
ACP
(
ITfRangeACP
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
Range
,
ITfRange_iface
);
return
CONTAINING_RECORD
(
iface
,
Range
,
ITfRangeACP_iface
);
}
static
Range
*
unsafe_impl_from_ITfRange
(
ITfRange
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
Range
,
ITfRangeACP_iface
);
}
static
void
Range_Destructor
(
Range
*
This
)
...
...
@@ -60,19 +64,22 @@ static void Range_Destructor(Range *This)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
static
HRESULT
WINAPI
Range_QueryInterface
(
ITfRange
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
static
HRESULT
WINAPI
Range_QueryInterface
(
ITfRange
ACP
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
Range
*
range
=
impl_from_ITfRangeACP
(
iface
);
*
ppvOut
=
NULL
;
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_ITfRange
))
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_ITfRange
)
||
IsEqualIID
(
iid
,
&
IID_ITfRangeACP
))
{
*
ppvOut
=
&
This
->
ITfRange
_iface
;
*
ppvOut
=
&
range
->
ITfRangeACP
_iface
;
}
if
(
*
ppvOut
)
{
ITfRange_AddRef
(
iface
);
ITfRange
ACP
_AddRef
(
iface
);
return
S_OK
;
}
...
...
@@ -80,136 +87,121 @@ static HRESULT WINAPI Range_QueryInterface(ITfRange *iface, REFIID iid, LPVOID *
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
Range_AddRef
(
ITfRange
*
iface
)
static
ULONG
WINAPI
Range_AddRef
(
ITfRange
ACP
*
iface
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
return
InterlockedIncrement
(
&
This
->
refCount
);
Range
*
range
=
impl_from_ITfRangeACP
(
iface
);
return
InterlockedIncrement
(
&
range
->
refCount
);
}
static
ULONG
WINAPI
Range_Release
(
ITfRange
*
iface
)
static
ULONG
WINAPI
Range_Release
(
ITfRange
ACP
*
iface
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
Range
*
range
=
impl_from_ITfRangeACP
(
iface
);
ULONG
ret
;
ret
=
InterlockedDecrement
(
&
This
->
refCount
);
ret
=
InterlockedDecrement
(
&
range
->
refCount
);
if
(
ret
==
0
)
Range_Destructor
(
This
);
Range_Destructor
(
range
);
return
ret
;
}
/*****************************************************
* ITfRange functions
*****************************************************/
static
HRESULT
WINAPI
Range_GetText
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_GetText
(
ITfRangeACP
*
iface
,
TfEditCookie
ec
,
DWORD
dwFlags
,
WCHAR
*
pchText
,
ULONG
cchMax
,
ULONG
*
pcch
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_SetText
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_SetText
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
DWORD
dwFlags
,
const
WCHAR
*
pchText
,
LONG
cch
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_GetFormattedText
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_GetFormattedText
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
IDataObject
**
ppDataObject
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_GetEmbedded
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_GetEmbedded
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
REFGUID
rguidService
,
REFIID
riid
,
IUnknown
**
ppunk
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_InsertEmbedded
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_InsertEmbedded
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
DWORD
dwFlags
,
IDataObject
*
pDataObject
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_ShiftStart
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_ShiftStart
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
LONG
cchReq
,
LONG
*
pcch
,
const
TF_HALTCOND
*
pHalt
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_ShiftEnd
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_ShiftEnd
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
LONG
cchReq
,
LONG
*
pcch
,
const
TF_HALTCOND
*
pHalt
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_ShiftStartToRange
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_ShiftStartToRange
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
ITfRange
*
pRange
,
TfAnchor
aPos
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_ShiftEndToRange
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_ShiftEndToRange
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
ITfRange
*
pRange
,
TfAnchor
aPos
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_ShiftStartRegion
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_ShiftStartRegion
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
TfShiftDir
dir
,
BOOL
*
pfNoRegion
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_ShiftEndRegion
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_ShiftEndRegion
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
TfShiftDir
dir
,
BOOL
*
pfNoRegion
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_IsEmpty
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_IsEmpty
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
BOOL
*
pfEmpty
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_Collapse
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_Collapse
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
TfAnchor
aPos
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
TRACE
(
"(%p) %i %i
\n
"
,
This
,
ec
,
aPos
);
Range
*
range
=
impl_from_ITfRangeACP
(
iface
);
TRACE
(
"%p, %i, %i.
\n
"
,
iface
,
ec
,
aPos
);
switch
(
aPos
)
{
case
TF_ANCHOR_START
:
This
->
anchorEnd
=
This
->
anchorStart
;
range
->
anchorEnd
=
range
->
anchorStart
;
break
;
case
TF_ANCHOR_END
:
This
->
anchorStart
=
This
->
anchorEnd
;
range
->
anchorStart
=
range
->
anchorEnd
;
break
;
default:
return
E_INVALIDARG
;
...
...
@@ -218,90 +210,95 @@ static HRESULT WINAPI Range_Collapse(ITfRange *iface, TfEditCookie ec,
return
S_OK
;
}
static
HRESULT
WINAPI
Range_IsEqualStart
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_IsEqualStart
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
ITfRange
*
pWith
,
TfAnchor
aPos
,
BOOL
*
pfEqual
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_IsEqualEnd
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_IsEqualEnd
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
ITfRange
*
pWith
,
TfAnchor
aPos
,
BOOL
*
pfEqual
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_CompareStart
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_CompareStart
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
ITfRange
*
pWith
,
TfAnchor
aPos
,
LONG
*
plResult
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_CompareEnd
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_CompareEnd
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
ITfRange
*
pWith
,
TfAnchor
aPos
,
LONG
*
plResult
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_AdjustForInsert
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_AdjustForInsert
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
ULONG
cchInsert
,
BOOL
*
pfInsertOk
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_GetGravity
(
ITfRange
*
iface
,
static
HRESULT
WINAPI
Range_GetGravity
(
ITfRange
ACP
*
iface
,
TfGravity
*
pgStart
,
TfGravity
*
pgEnd
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_SetGravity
(
ITfRange
*
iface
,
TfEditCookie
ec
,
static
HRESULT
WINAPI
Range_SetGravity
(
ITfRange
ACP
*
iface
,
TfEditCookie
ec
,
TfGravity
gStart
,
TfGravity
gEnd
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_Clone
(
ITfRange
*
iface
,
ITfRange
**
ppClone
)
static
HRESULT
WINAPI
Range_Clone
(
ITfRange
ACP
*
iface
,
ITfRange
**
ppClone
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
FIXME
(
"STUB:(%p)
\n
"
,
This
);
FIXME
(
"STUB:(%p)
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_GetContext
(
ITfRange
*
iface
,
ITfContext
**
context
)
static
HRESULT
WINAPI
Range_GetContext
(
ITfRange
ACP
*
iface
,
ITfContext
**
context
)
{
Range
*
This
=
impl_from_ITfRange
(
iface
);
Range
*
range
=
impl_from_ITfRangeACP
(
iface
);
TRACE
(
"
(%p, %p)
\n
"
,
This
,
context
);
TRACE
(
"
%p, %p.
\n
"
,
iface
,
context
);
if
(
!
context
)
return
E_INVALIDARG
;
*
context
=
This
->
context
;
*
context
=
range
->
context
;
ITfContext_AddRef
(
*
context
);
return
S_OK
;
}
static
const
ITfRangeVtbl
Range_RangeVtbl
=
static
HRESULT
WINAPI
Range_GetExtent
(
ITfRangeACP
*
iface
,
LONG
*
anchor
,
LONG
*
count
)
{
FIXME
(
"%p, %p, %p.
\n
"
,
iface
,
anchor
,
count
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Range_SetExtent
(
ITfRangeACP
*
iface
,
LONG
anchor
,
LONG
count
)
{
FIXME
(
"%p, %d, %d.
\n
"
,
iface
,
anchor
,
count
);
return
E_NOTIMPL
;
}
static
const
ITfRangeACPVtbl
rangevtbl
=
{
Range_QueryInterface
,
Range_AddRef
,
Range_Release
,
Range_GetText
,
Range_SetText
,
Range_GetFormattedText
,
...
...
@@ -323,7 +320,9 @@ static const ITfRangeVtbl Range_RangeVtbl =
Range_GetGravity
,
Range_SetGravity
,
Range_Clone
,
Range_GetContext
Range_GetContext
,
Range_GetExtent
,
Range_SetExtent
,
};
HRESULT
Range_Constructor
(
ITfContext
*
context
,
DWORD
anchorStart
,
DWORD
anchorEnd
,
ITfRange
**
ppOut
)
...
...
@@ -336,14 +335,15 @@ HRESULT Range_Constructor(ITfContext *context, DWORD anchorStart, DWORD anchorEn
TRACE
(
"(%p) %p
\n
"
,
This
,
context
);
This
->
ITfRange
_iface
.
lpVtbl
=
&
Range_RangeV
tbl
;
This
->
ITfRange
ACP_iface
.
lpVtbl
=
&
rangev
tbl
;
This
->
refCount
=
1
;
This
->
context
=
context
;
ITfContext_AddRef
(
This
->
context
);
This
->
anchorStart
=
anchorStart
;
This
->
anchorEnd
=
anchorEnd
;
*
ppOut
=
&
This
->
ITfRange_iface
;
*
ppOut
=
(
ITfRange
*
)
&
This
->
ITfRangeACP_iface
;
TRACE
(
"returning %p
\n
"
,
*
ppOut
);
return
S_OK
;
...
...
@@ -358,7 +358,7 @@ HRESULT TF_SELECTION_to_TS_SELECTION_ACP(const TF_SELECTION *tf, TS_SELECTION_AC
if
(
!
tf
||
!
tsAcp
||
!
tf
->
range
)
return
E_INVALIDARG
;
This
=
impl_from_ITfRange
(
tf
->
range
);
This
=
unsafe_
impl_from_ITfRange
(
tf
->
range
);
tsAcp
->
acpStart
=
This
->
anchorStart
;
tsAcp
->
acpEnd
=
This
->
anchorEnd
;
...
...
dlls/msctf/tests/inputprocessor.c
View file @
2952219e
...
...
@@ -2130,8 +2130,8 @@ TfEditCookie ec)
ITfContext_Release
(
context2
);
hr
=
ITfRange_QueryInterface
(
range
,
&
IID_ITfRangeACP
,
(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
unk
);
ITfRange_Release
(
range
);
...
...
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