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
e842f250
Commit
e842f250
authored
Jun 22, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Jun 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Define ITfCompartment.
parent
a7c8dad0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
101 additions
and
0 deletions
+101
-0
compartmentmgr.c
dlls/msctf/compartmentmgr.c
+101
-0
No files found.
dlls/msctf/compartmentmgr.c
View file @
e842f250
...
...
@@ -67,7 +67,17 @@ typedef struct tagCompartmentEnumGuid {
struct
list
*
cursor
;
}
CompartmentEnumGuid
;
typedef
struct
tagCompartment
{
const
ITfCompartmentVtbl
*
Vtbl
;
LONG
refCount
;
/* Only VT_I4, VT_UNKNOWN and VT_BSTR data types are allowed */
VARIANT
variant
;
CompartmentValue
*
valueData
;
}
Compartment
;
static
HRESULT
CompartmentEnumGuid_Constructor
(
struct
list
*
values
,
IEnumGUID
**
ppOut
);
static
HRESULT
Compartment_Constructor
(
CompartmentValue
*
value
,
ITfCompartment
**
ppOut
);
HRESULT
CompartmentMgr_Destructor
(
ITfCompartmentMgr
*
iface
)
{
...
...
@@ -367,3 +377,94 @@ static HRESULT CompartmentEnumGuid_Constructor(struct list *values, IEnumGUID **
*
ppOut
=
(
IEnumGUID
*
)
This
;
return
S_OK
;
}
/**************************************************
* ITfCompartment
**************************************************/
static
void
Compartment_Destructor
(
Compartment
*
This
)
{
TRACE
(
"destroying %p
\n
"
,
This
);
VariantClear
(
&
This
->
variant
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
static
HRESULT
WINAPI
Compartment_QueryInterface
(
ITfCompartment
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
Compartment
*
This
=
(
Compartment
*
)
iface
;
*
ppvOut
=
NULL
;
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_ITfCompartment
))
{
*
ppvOut
=
This
;
}
if
(
*
ppvOut
)
{
IUnknown_AddRef
(
iface
);
return
S_OK
;
}
WARN
(
"unsupported interface: %s
\n
"
,
debugstr_guid
(
iid
));
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
Compartment_AddRef
(
ITfCompartment
*
iface
)
{
Compartment
*
This
=
(
Compartment
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
refCount
);
}
static
ULONG
WINAPI
Compartment_Release
(
ITfCompartment
*
iface
)
{
Compartment
*
This
=
(
Compartment
*
)
iface
;
ULONG
ret
;
ret
=
InterlockedDecrement
(
&
This
->
refCount
);
if
(
ret
==
0
)
Compartment_Destructor
(
This
);
return
ret
;
}
static
HRESULT
WINAPI
Compartment_SetValue
(
ITfCompartment
*
iface
,
TfClientId
tid
,
const
VARIANT
*
pvarValue
)
{
Compartment
*
This
=
(
Compartment
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Compartment_GetValue
(
ITfCompartment
*
iface
,
VARIANT
*
pvarValue
)
{
Compartment
*
This
=
(
Compartment
*
)
iface
;
FIXME
(
"STUB:(%p)
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
const
ITfCompartmentVtbl
ITfCompartment_Vtbl
=
{
Compartment_QueryInterface
,
Compartment_AddRef
,
Compartment_Release
,
Compartment_SetValue
,
Compartment_GetValue
};
static
HRESULT
Compartment_Constructor
(
CompartmentValue
*
valueData
,
ITfCompartment
**
ppOut
)
{
Compartment
*
This
;
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
Compartment
));
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
This
->
Vtbl
=
&
ITfCompartment_Vtbl
;
This
->
refCount
=
1
;
This
->
valueData
=
valueData
;
VariantInit
(
&
This
->
variant
);
TRACE
(
"returning %p
\n
"
,
This
);
*
ppOut
=
(
ITfCompartment
*
)
This
;
return
S_OK
;
}
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