return &ret->IOleUndoManager_iface;
}
-/**********************************************************
- * ISelectionServices implementation
- *
- * TODO: Declare other interfaces
- *
- */
-
-typedef struct {
- const ISelectionServicesVtbl *lpSelectionServicesVtbl;
-
- LONG ref;
-} SelectionServices;
-
-#define SELSRV(x) ((ISelectionServices*) &(x)->lpSelectionServicesVtbl)
-
-#define SELSRV_THIS(iface) DEFINE_THIS(SelectionServices, SelectionServices, iface)
-
-static HRESULT WINAPI SelectionServices_QueryInterface(ISelectionServices *iface, REFIID riid, void **ppv)
-{
- SelectionServices *This = SELSRV_THIS(iface);
-
- *ppv = NULL;
-
- if(IsEqualGUID(riid, &IID_IUnknown)) {
- TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
- *ppv = SELSRV_THIS(This);
- }else if(IsEqualGUID(riid, &IID_ISelectionServices)) {
- TRACE("(%p)->(IID_ISelectionServices %p)\n", This, ppv);
- *ppv = SELSRV(This);
- }
-
-
- FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
- return E_NOINTERFACE;
-}
-
-static ULONG WINAPI SelectionServices_AddRef(ISelectionServices *iface)
-{
- SelectionServices *This = SELSRV_THIS(iface);
- LONG ref = InterlockedIncrement(&This->ref);
-
- TRACE("(%p) ref=%d\n", This, ref);
-
- return ref;
-}
-
-static ULONG WINAPI SelectionServices_Release(ISelectionServices *iface)
-{
- SelectionServices *This = SELSRV_THIS(iface);
- LONG ref = InterlockedDecrement(&This->ref);
-
- TRACE("(%p) ref=%d\n", This, ref);
-
- if(!ref)
- heap_free(This);
-
- return ref;
-}
-
-static HRESULT WINAPI SelectionServices_SetSelectionType(
- ISelectionServices* iface,
- SELECTION_TYPE eType,
- ISelectionServicesListener *pIListener)
-{
- FIXME("is not implemented\n");
- return E_NOTIMPL;
-}
-
-static HRESULT WINAPI SelectionServices_GetMarkupContainer(
- ISelectionServices* iface,
- IMarkupContainer **ppIContainer)
-{
- FIXME("is not implemented\n");
- return E_NOTIMPL;
-}
-
-static HRESULT WINAPI SelectionServices_AddSegment(
- ISelectionServices* iface,
- IMarkupPointer *pIStart,
- IMarkupPointer *pIEnd,
- ISegment **ppISegmentAdded)
-{
- FIXME("is not implemented\n");
- return E_NOTIMPL;
-}
-
-static HRESULT WINAPI SelectionServices_AddElementSegment(
- ISelectionServices* iface,
- IHTMLElement *pIElement,
- IElementSegment **ppISegmentAdded)
-{
- FIXME("is not implemented\n");
- return E_NOTIMPL;
-}
-
-static HRESULT WINAPI SelectionServices_RemoveSegment(
- ISelectionServices* iface,
- ISegment *pISegment)
-{
- FIXME("is not implemented\n");
- return E_NOTIMPL;
-}
-
-static HRESULT WINAPI SelectionServices_GetSelectionServicesListener(
- ISelectionServices* iface,
- ISelectionServicesListener **ppISelectionServicesListener)
-{
- FIXME("is not implemented\n");
- return E_NOTIMPL;
-}
-
-#undef HTMLEDITSRV_THIS
-
-static const ISelectionServicesVtbl SelectionServicesVtbl = {
- SelectionServices_QueryInterface,
- SelectionServices_AddRef,
- SelectionServices_Release,
- SelectionServices_SetSelectionType,
- SelectionServices_GetMarkupContainer,
- SelectionServices_AddSegment,
- SelectionServices_AddElementSegment,
- SelectionServices_RemoveSegment,
- SelectionServices_GetSelectionServicesListener
-};
-
-static ISelectionServices *create_selectionsrv(void)
-{
- SelectionServices *ret = heap_alloc(sizeof(SelectionServices));
-
- ret->lpSelectionServicesVtbl = &SelectionServicesVtbl;
- ret->ref = 1;
-
- return SELSRV(ret);
-}
-
/**********************************************************
* IServiceProvider implementation
*/