Commit 41d0860d authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

qedit: Implement IAMTimelineObj_GetTimelineType and add tests.

parent fca60cb5
...@@ -75,6 +75,13 @@ static void test_timeline(void) ...@@ -75,6 +75,13 @@ static void test_timeline(void)
hr = IAMTimelineObj_QueryInterface(obj, &IID_IAMTimeline, (void **)&timeline2); hr = IAMTimelineObj_QueryInterface(obj, &IID_IAMTimeline, (void **)&timeline2);
ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08x\n", hr); ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE got %08x\n", hr);
ok(!timeline2, "Expected NULL got %p\n", timeline2); 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) START_TEST(timeline)
......
...@@ -52,6 +52,7 @@ static inline TimelineImpl *impl_from_IAMTimeline(IAMTimeline *iface) ...@@ -52,6 +52,7 @@ static inline TimelineImpl *impl_from_IAMTimeline(IAMTimeline *iface)
typedef struct { typedef struct {
IAMTimelineObj IAMTimelineObj_iface; IAMTimelineObj IAMTimelineObj_iface;
LONG ref; LONG ref;
TIMELINE_MAJOR_TYPE timeline_type;
} TimelineObjImpl; } TimelineObjImpl;
static inline TimelineObjImpl *impl_from_IAMTimelineObj(IAMTimelineObj *iface) static inline TimelineObjImpl *impl_from_IAMTimelineObj(IAMTimelineObj *iface)
...@@ -169,6 +170,7 @@ static HRESULT WINAPI Timeline_IAMTimeline_CreateEmptyNode(IAMTimeline *iface, I ...@@ -169,6 +170,7 @@ static HRESULT WINAPI Timeline_IAMTimeline_CreateEmptyNode(IAMTimeline *iface, I
obj_impl->ref = 1; obj_impl->ref = 1;
obj_impl->IAMTimelineObj_iface.lpVtbl = &IAMTimelineObj_VTable; obj_impl->IAMTimelineObj_iface.lpVtbl = &IAMTimelineObj_VTable;
obj_impl->timeline_type = type;
*obj = &obj_impl->IAMTimelineObj_iface; *obj = &obj_impl->IAMTimelineObj_iface;
return S_OK; return S_OK;
...@@ -592,8 +594,10 @@ static HRESULT WINAPI TimelineObj_GetSubObjectLoaded(IAMTimelineObj *iface, BOOL ...@@ -592,8 +594,10 @@ static HRESULT WINAPI TimelineObj_GetSubObjectLoaded(IAMTimelineObj *iface, BOOL
static HRESULT WINAPI TimelineObj_GetTimelineType(IAMTimelineObj *iface, TIMELINE_MAJOR_TYPE *type) static HRESULT WINAPI TimelineObj_GetTimelineType(IAMTimelineObj *iface, TIMELINE_MAJOR_TYPE *type)
{ {
TimelineObjImpl *This = impl_from_IAMTimelineObj(iface); TimelineObjImpl *This = impl_from_IAMTimelineObj(iface);
FIXME("(%p)->(%p): not implemented!\n", This, type); TRACE("(%p)->(%p)\n", This, type);
return E_NOTIMPL; if (!type) return E_POINTER;
*type = This->timeline_type;
return S_OK;
} }
static HRESULT WINAPI TimelineObj_SetTimelineType(IAMTimelineObj *iface, TIMELINE_MAJOR_TYPE type) static HRESULT WINAPI TimelineObj_SetTimelineType(IAMTimelineObj *iface, TIMELINE_MAJOR_TYPE type)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment