47 *
ppv = &
This->IHTMLSelectionObject_iface;
49 *
ppv = &
This->IHTMLSelectionObject_iface;
51 *
ppv = &
This->IHTMLSelectionObject_iface;
53 *
ppv = &
This->IHTMLSelectionObject2_iface;
85 nsISelection_Release(
This->nsselection);
99 return IDispatchEx_GetTypeInfoCount(&
This->dispex.IDispatchEx_iface, pctinfo);
107 return IDispatchEx_GetTypeInfo(&
This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
116 return IDispatchEx_GetIDsOfNames(&
This->dispex.IDispatchEx_iface,
riid, rgszNames,
117 cNames, lcid, rgDispId);
122 VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
UINT *puArgErr)
127 return IDispatchEx_Invoke(&
This->dispex.IDispatchEx_iface, dispIdMember,
riid,
128 lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
134 IHTMLTxtRange *range_obj =
NULL;
140 if(
This->nsselection) {
141 LONG nsrange_cnt = 0;
144 nsISelection_GetRangeCount(
This->nsselection, &nsrange_cnt);
148 TRACE(
"nsrange_cnt = 0\n");
150 if(!
This->doc->nsdoc) {
151 WARN(
"nsdoc is NULL\n");
155 nsres = nsIDOMHTMLDocument_GetBody(
This->doc->nsdoc, &nsbody);
157 ERR(
"Could not get body: %08x\n", nsres);
161 nsres = nsISelection_Collapse(
This->nsselection, (
nsIDOMNode*)nsbody, 0);
162 nsIDOMHTMLElement_Release(nsbody);
164 ERR(
"Collapse failed: %08x\n", nsres);
165 }
else if(nsrange_cnt > 1) {
166 FIXME(
"range_cnt = %d\n", nsrange_cnt);
169 nsres = nsISelection_GetRangeAt(
This->nsselection, 0, &nsrange);
171 ERR(
"GetRangeAt failed: %08x\n", nsres);
176 if (nsrange) nsIDOMRange_Release(nsrange);
200 static const WCHAR wszNone[] = {
'N',
'o',
'n',
'e',0};
201 static const WCHAR wszText[] = {
'T',
'e',
'x',
't',0};
205 if(
This->nsselection)
206 nsISelection_GetIsCollapsed(
This->nsselection, &collapsed);
236 return IHTMLSelectionObject_QueryInterface(&
This->IHTMLSelectionObject_iface,
riid,
ppv);
243 return IHTMLSelectionObject_AddRef(&
This->IHTMLSelectionObject_iface);
250 return IHTMLSelectionObject_Release(&
This->IHTMLSelectionObject_iface);
257 return IDispatchEx_GetTypeInfoCount(&
This->dispex.IDispatchEx_iface, pctinfo);
265 return IDispatchEx_GetTypeInfo(&
This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
273 return IDispatchEx_GetIDsOfNames(&
This->dispex.IDispatchEx_iface,
riid, rgszNames,
274 cNames, lcid, rgDispId);
279 EXCEPINFO *pExcepInfo,
UINT *puArgErr)
283 return IDispatchEx_Invoke(&
This->dispex.IDispatchEx_iface, dispIdMember,
riid,
284 lcid,
wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
290 FIXME(
"(%p)->(%p)\n",
This, rangeCollection);
314 IHTMLSelectionObject_tid,
315 IHTMLSelectionObject2_tid,
320 IHTMLSelectionObject_tid,
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
static void list_remove(struct list_entry *entry)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
const char * debugstr_mshtml_guid(const GUID *iid)
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
static VARIANTARG static DISPID
void release_dispex(DispatchEx *This)
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
HRESULT HTMLSelectionObject_Create(HTMLDocumentNode *doc, nsISelection *nsselection, IHTMLSelectionObject **ret)
static HRESULT WINAPI HTMLSelectionObject2_GetIDsOfNames(IHTMLSelectionObject2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
static HRESULT WINAPI HTMLSelectionObject2_GetTypeInfo(IHTMLSelectionObject2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
static dispex_static_data_t HTMLSelectionObject_dispex
static HRESULT WINAPI HTMLSelectionObject_GetTypeInfo(IHTMLSelectionObject *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
static ULONG WINAPI HTMLSelectionObject2_Release(IHTMLSelectionObject2 *iface)
static ULONG WINAPI HTMLSelectionObject_AddRef(IHTMLSelectionObject *iface)
static ULONG WINAPI HTMLSelectionObject_Release(IHTMLSelectionObject *iface)
static HRESULT WINAPI HTMLSelectionObject2_GetTypeInfoCount(IHTMLSelectionObject2 *iface, UINT *pctinfo)
static const IHTMLSelectionObjectVtbl HTMLSelectionObjectVtbl
static HTMLSelectionObject * impl_from_IHTMLSelectionObject2(IHTMLSelectionObject2 *iface)
static ULONG WINAPI HTMLSelectionObject2_AddRef(IHTMLSelectionObject2 *iface)
static HTMLSelectionObject * impl_from_IHTMLSelectionObject(IHTMLSelectionObject *iface)
void detach_selection(HTMLDocumentNode *This)
static HRESULT WINAPI HTMLSelectionObject_GetIDsOfNames(IHTMLSelectionObject *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
static HRESULT WINAPI HTMLSelectionObject_empty(IHTMLSelectionObject *iface)
static const IHTMLSelectionObject2Vtbl HTMLSelectionObject2Vtbl
static HRESULT WINAPI HTMLSelectionObject_GetTypeInfoCount(IHTMLSelectionObject *iface, UINT *pctinfo)
static HRESULT WINAPI HTMLSelectionObject2_get_typeDetail(IHTMLSelectionObject2 *iface, BSTR *p)
static HRESULT WINAPI HTMLSelectionObject2_createRangeCollection(IHTMLSelectionObject2 *iface, IDispatch **rangeCollection)
static HRESULT WINAPI HTMLSelectionObject_get_type(IHTMLSelectionObject *iface, BSTR *p)
static HRESULT WINAPI HTMLSelectionObject_Invoke(IHTMLSelectionObject *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
static HRESULT WINAPI HTMLSelectionObject_QueryInterface(IHTMLSelectionObject *iface, REFIID riid, void **ppv)
static HRESULT WINAPI HTMLSelectionObject_clear(IHTMLSelectionObject *iface)
static const tid_t HTMLSelectionObject_iface_tids[]
static HRESULT WINAPI HTMLSelectionObject2_Invoke(IHTMLSelectionObject2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
static HRESULT WINAPI HTMLSelectionObject_createRange(IHTMLSelectionObject *iface, IDispatch **range)
static HRESULT WINAPI HTMLSelectionObject2_QueryInterface(IHTMLSelectionObject2 *iface, REFIID riid, void **ppv)
HRESULT HTMLTxtRange_Create(HTMLDocumentNode *, nsIDOMRange *, IHTMLTxtRange **) DECLSPEC_HIDDEN
BSTR WINAPI SysAllocString(LPCOLESTR str)
#define IsEqualGUID(rguid1, rguid2)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
struct list selection_list
IHTMLSelectionObject2 IHTMLSelectionObject2_iface
IHTMLSelectionObject IHTMLSelectionObject_iface
nsISelection * nsselection
#define CONTAINING_RECORD(address, type, field)
_In_ DWORD _Out_ _In_ WORD wFlags