qedit: Implement IAMTimelineObj_GetTimelineType and add tests.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2016-04-26 23:12:48 -06:00 committed by Alexandre Julliard
parent fca60cb558
commit 41d0860d41
2 changed files with 13 additions and 2 deletions

View File

@ -75,6 +75,13 @@ static void test_timeline(void)
hr = IAMTimelineObj_QueryInterface(obj, &IID_IAMTimeline, (void **)&timeline2);
ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08x\n", hr);
ok(!timeline2, "Expected NULL got %p\n", timeline2);
hr = IAMTimelineObj_GetTimelineType(obj, NULL);
ok(hr == E_POINTER, "Expected E_POINTER got %08x\n", hr);
hr = IAMTimelineObj_GetTimelineType(obj, &type);
ok(hr == S_OK, "GetTimelineType failed: %08x\n", hr);
ok(type == TIMELINE_MAJOR_TYPE_COMPOSITE, "Expected TIMELINE_MAJOR_TYPE_COMPOSITE got %d\n", type);
}
START_TEST(timeline)

View File

@ -52,6 +52,7 @@ static inline TimelineImpl *impl_from_IAMTimeline(IAMTimeline *iface)
typedef struct {
IAMTimelineObj IAMTimelineObj_iface;
LONG ref;
TIMELINE_MAJOR_TYPE timeline_type;
} TimelineObjImpl;
static inline TimelineObjImpl *impl_from_IAMTimelineObj(IAMTimelineObj *iface)
@ -169,6 +170,7 @@ static HRESULT WINAPI Timeline_IAMTimeline_CreateEmptyNode(IAMTimeline *iface, I
obj_impl->ref = 1;
obj_impl->IAMTimelineObj_iface.lpVtbl = &IAMTimelineObj_VTable;
obj_impl->timeline_type = type;
*obj = &obj_impl->IAMTimelineObj_iface;
return S_OK;
@ -592,8 +594,10 @@ static HRESULT WINAPI TimelineObj_GetSubObjectLoaded(IAMTimelineObj *iface, BOOL
static HRESULT WINAPI TimelineObj_GetTimelineType(IAMTimelineObj *iface, TIMELINE_MAJOR_TYPE *type)
{
TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
FIXME("(%p)->(%p): not implemented!\n", This, type);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, type);
if (!type) return E_POINTER;
*type = This->timeline_type;
return S_OK;
}
static HRESULT WINAPI TimelineObj_SetTimelineType(IAMTimelineObj *iface, TIMELINE_MAJOR_TYPE type)