mshtml: Added IHTMLWindow2::clearTimeout implementation.

This commit is contained in:
Jacek Caban 2008-06-27 14:14:40 -05:00 committed by Alexandre Julliard
parent 74f29f1087
commit 8d3aa6799c
3 changed files with 24 additions and 2 deletions

View File

@ -197,8 +197,10 @@ static HRESULT WINAPI HTMLWindow2_setTimeout(IHTMLWindow2 *iface, BSTR expressio
static HRESULT WINAPI HTMLWindow2_clearTimeout(IHTMLWindow2 *iface, long timerID)
{
HTMLWindow *This = HTMLWINDOW2_THIS(iface);
FIXME("(%p)->(%ld)\n", This, timerID);
return E_NOTIMPL;
TRACE("(%p)->(%ld)\n", This, timerID);
return clear_task_timer(This->doc, FALSE, timerID);
}
static HRESULT WINAPI HTMLWindow2_alert(IHTMLWindow2 *iface, BSTR message)

View File

@ -624,6 +624,7 @@ HWND get_thread_hwnd(void);
void push_task(task_t*);
void remove_doc_tasks(const HTMLDocument*);
DWORD set_task_timer(HTMLDocument*,DWORD,BOOL,IDispatch*);
HRESULT clear_task_timer(HTMLDocument*,BOOL,DWORD);
HRESULT get_typeinfo(tid_t,ITypeInfo**);
void release_typelib(void);

View File

@ -169,6 +169,25 @@ DWORD set_task_timer(HTMLDocument *doc, DWORD msec, BOOL interval, IDispatch *di
return timer->id;
}
HRESULT clear_task_timer(HTMLDocument *doc, BOOL interval, DWORD id)
{
thread_data_t *thread_data = get_thread_data(FALSE);
task_timer_t *iter;
if(!thread_data)
return S_OK;
LIST_FOR_EACH_ENTRY(iter, &thread_data->timer_list, task_timer_t, entry) {
if(iter->id == id && iter->doc == doc && (iter->interval == 0) == !interval) {
release_task_timer(thread_data->thread_hwnd, iter);
return S_OK;
}
}
WARN("timet not found\n");
return S_OK;
}
static void set_downloading(HTMLDocument *doc)
{
IOleCommandTarget *olecmd;