ReactOS  0.4.13-dev-656-g74bcf30
events.c File Reference
#include <string.h>
#include "ieframe.h"
#include "wine/debug.h"
Include dependency graph for events.c:

Go to the source code of this file.

Classes

struct  ConnectionPoint< T >
 
struct  EnumConnections
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ieframe)
 
static ConnectionPointContainerimpl_from_IConnectionPointContainer (IConnectionPointContainer *iface)
 
static HRESULT WINAPI ConnectionPointContainer_QueryInterface (IConnectionPointContainer *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI ConnectionPointContainer_AddRef (IConnectionPointContainer *iface)
 
static ULONG WINAPI ConnectionPointContainer_Release (IConnectionPointContainer *iface)
 
static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints (IConnectionPointContainer *iface, LPENUMCONNECTIONPOINTS *ppEnum)
 
static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint (IConnectionPointContainer *iface, REFIID riid, LPCONNECTIONPOINT *ppCP)
 
static ConnectionPointimpl_from_IConnectionPoint (IConnectionPoint *iface)
 
static EnumConnectionsimpl_from_IEnumConnections (IEnumConnections *iface)
 
static HRESULT WINAPI EnumConnections_QueryInterface (IEnumConnections *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI EnumConnections_AddRef (IEnumConnections *iface)
 
static ULONG WINAPI EnumConnections_Release (IEnumConnections *iface)
 
static HRESULT WINAPI EnumConnections_Next (IEnumConnections *iface, ULONG cConnections, CONNECTDATA *pgcd, ULONG *pcFetched)
 
static HRESULT WINAPI EnumConnections_Skip (IEnumConnections *iface, ULONG cConnections)
 
static HRESULT WINAPI EnumConnections_Reset (IEnumConnections *iface)
 
static HRESULT WINAPI EnumConnections_Clone (IEnumConnections *iface, IEnumConnections **ppEnum)
 
static HRESULT WINAPI ConnectionPoint_QueryInterface (IConnectionPoint *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI ConnectionPoint_AddRef (IConnectionPoint *iface)
 
static ULONG WINAPI ConnectionPoint_Release (IConnectionPoint *iface)
 
static HRESULT WINAPI ConnectionPoint_GetConnectionInterface (IConnectionPoint *iface, IID *pIID)
 
static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer (IConnectionPoint *iface, IConnectionPointContainer **ppCPC)
 
static HRESULT WINAPI ConnectionPoint_Advise (IConnectionPoint *iface, IUnknown *pUnkSink, DWORD *pdwCookie)
 
static HRESULT WINAPI ConnectionPoint_Unadvise (IConnectionPoint *iface, DWORD dwCookie)
 
static HRESULT WINAPI ConnectionPoint_EnumConnections (IConnectionPoint *iface, IEnumConnections **ppEnum)
 
void call_sink (ConnectionPoint *This, DISPID dispid, DISPPARAMS *dispparams)
 
static void ConnectionPoint_Create (REFIID riid, ConnectionPoint **cp, IConnectionPointContainer *container)
 
static void ConnectionPoint_Destroy (ConnectionPoint *This)
 
void ConnectionPointContainer_Init (ConnectionPointContainer *This, IUnknown *impl)
 
void ConnectionPointContainer_Destroy (ConnectionPointContainer *This)
 

Variables

static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl
 
static const IEnumConnectionsVtbl EnumConnectionsVtbl
 
static const IConnectionPointVtbl ConnectionPointVtbl
 

Function Documentation

◆ call_sink()

void call_sink ( ConnectionPoint This,
DISPID  dispid,
DISPPARAMS *  dispparams 
)

Definition at line 391 of file events.c.

392 {
393  DWORD i;
394 
395  for(i=0; i<This->sinks_size; i++) {
396  if(This->sinks[i])
397  IDispatch_Invoke(This->sinks[i], dispid, &IID_NULL, LOCALE_SYSTEM_DEFAULT,
398  DISPATCH_METHOD, dispparams, NULL, NULL, NULL);
399  }
400 }
#define DISPATCH_METHOD
Definition: oleauto.h:1006
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define LOCALE_SYSTEM_DEFAULT
unsigned long DWORD
Definition: ntddk_ex.h:95
#define IID_NULL
Definition: guiddef.h:93

Referenced by DocObjectService_FireBeforeNavigate2(), DocObjectService_FireDocumentComplete(), DocObjectService_FireNavigateComplete2(), handle_navigation_error(), notif_complete(), notify_download_state(), on_before_navigate2(), on_commandstate_change(), set_status_text(), WebBrowser_put_AddressBar(), WebBrowser_put_FullScreen(), WebBrowser_put_MenuBar(), WebBrowser_put_Resizable(), WebBrowser_put_StatusBar(), WebBrowser_put_TheaterMode(), WebBrowser_put_ToolBar(), and WebBrowser_put_Visible().

◆ ConnectionPoint_AddRef()

static ULONG WINAPI ConnectionPoint_AddRef ( IConnectionPoint iface)
static

Definition at line 269 of file events.c.

270 {
272  return IConnectionPointContainer_AddRef(This->container);
273 }
static ConnectionPoint * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: events.c:126

◆ ConnectionPoint_Advise()

static HRESULT WINAPI ConnectionPoint_Advise ( IConnectionPoint iface,
IUnknown pUnkSink,
DWORD pdwCookie 
)
static

Definition at line 303 of file events.c.

305 {
307  IDispatch *disp;
308  DWORD i;
309  HRESULT hres;
310 
311  TRACE("(%p)->(%p %p)\n", This, pUnkSink, pdwCookie);
312 
313  hres = IUnknown_QueryInterface(pUnkSink, &This->iid, (void**)&disp);
314  if(FAILED(hres)) {
315  hres = IUnknown_QueryInterface(pUnkSink, &IID_IDispatch, (void**)&disp);
316  if(FAILED(hres))
318  }
319 
320  if(This->sinks) {
321  for(i=0; i<This->sinks_size; i++) {
322  if(!This->sinks[i])
323  break;
324  }
325 
326  if(i == This->sinks_size)
327  This->sinks = heap_realloc(This->sinks,
328  (++This->sinks_size)*sizeof(*This->sinks));
329  }else {
330  This->sinks = heap_alloc(sizeof(*This->sinks));
331  This->sinks_size = 1;
332  i = 0;
333  }
334 
335  This->sinks[i] = disp;
336  *pdwCookie = i+1;
337 
338  return S_OK;
339 }
disp
Definition: i386-dis.c:3181
#define CONNECT_E_CANNOTCONNECT
Definition: olectl.h:253
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
const GUID IID_IDispatch
#define S_OK
Definition: intsafe.h:59
static ConnectionPoint * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: events.c:126

◆ ConnectionPoint_Create()

static void ConnectionPoint_Create ( REFIID  riid,
ConnectionPoint **  cp,
IConnectionPointContainer container 
)
static

Definition at line 402 of file events.c.

404 {
406 
407  ret->IConnectionPoint_iface.lpVtbl = &ConnectionPointVtbl;
408 
409  ret->sinks = NULL;
410  ret->sinks_size = 0;
411  ret->container = container;
412 
413  ret->iid = *riid;
414 
415  *cp = ret;
416 }
static const IConnectionPointVtbl ConnectionPointVtbl
Definition: events.c:379
REFIID riid
Definition: precomp.h:44
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
struct container container
smooth NULL
Definition: ftsmooth.c:416
int ret
POINT cp
Definition: magnifier.c:59

Referenced by ConnectionPointContainer_Init().

◆ ConnectionPoint_Destroy()

static void ConnectionPoint_Destroy ( ConnectionPoint This)
static

Definition at line 418 of file events.c.

419 {
420  DWORD i;
421 
422  for(i=0; i<This->sinks_size; i++) {
423  if(This->sinks[i])
424  IDispatch_Release(This->sinks[i]);
425  }
426 
427  heap_free(This->sinks);
428  heap_free(This);
429 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned long DWORD
Definition: ntddk_ex.h:95
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by ConnectionPointContainer_Destroy().

◆ ConnectionPoint_EnumConnections()

static HRESULT WINAPI ConnectionPoint_EnumConnections ( IConnectionPoint iface,
IEnumConnections **  ppEnum 
)
static

Definition at line 356 of file events.c.

358 {
361 
362  TRACE("(%p)->(%p)\n", This, ppEnum);
363 
364  ret = heap_alloc(sizeof(*ret));
365  if(!ret)
366  return E_OUTOFMEMORY;
367 
368  ret->IEnumConnections_iface.lpVtbl = &EnumConnectionsVtbl;
369  ret->ref = 1;
370  ret->iter = 0;
371 
372  IConnectionPoint_AddRef(&This->IConnectionPoint_iface);
373  ret->cp = This;
374 
375  *ppEnum = &ret->IEnumConnections_iface;
376  return S_OK;
377 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const IEnumConnectionsVtbl EnumConnectionsVtbl
Definition: events.c:235
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define S_OK
Definition: intsafe.h:59
static ConnectionPoint * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: events.c:126

◆ ConnectionPoint_GetConnectionInterface()

static HRESULT WINAPI ConnectionPoint_GetConnectionInterface ( IConnectionPoint iface,
IID pIID 
)
static

Definition at line 281 of file events.c.

282 {
284 
285  TRACE("(%p)->(%p)\n", This, pIID);
286 
287  *pIID = This->iid;
288  return S_OK;
289 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static ConnectionPoint * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: events.c:126

◆ ConnectionPoint_GetConnectionPointContainer()

static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer ( IConnectionPoint iface,
IConnectionPointContainer **  ppCPC 
)
static

Definition at line 291 of file events.c.

293 {
295 
296  TRACE("(%p)->(%p)\n", This, ppCPC);
297 
298  *ppCPC = This->container;
299  IConnectionPointContainer_AddRef(This->container);
300  return S_OK;
301 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static ConnectionPoint * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: events.c:126

◆ ConnectionPoint_QueryInterface()

static HRESULT WINAPI ConnectionPoint_QueryInterface ( IConnectionPoint iface,
REFIID  riid,
LPVOID ppv 
)
static

Definition at line 245 of file events.c.

247 {
249 
250  *ppv = NULL;
251 
252  if(IsEqualGUID(&IID_IUnknown, riid)) {
253  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
254  *ppv = &This->IConnectionPoint_iface;
255  }else if(IsEqualGUID(&IID_IConnectionPoint, riid)) {
256  TRACE("(%p)->(IID_IConnectionPoint %p)\n", This, ppv);
257  *ppv = &This->IConnectionPoint_iface;
258  }
259 
260  if(*ppv) {
261  IConnectionPointContainer_AddRef(This->container);
262  return S_OK;
263  }
264 
265  WARN("Unsupported interface %s\n", debugstr_guid(riid));
266  return E_NOINTERFACE;
267 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IConnectionPoint
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static ConnectionPoint * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: events.c:126

◆ ConnectionPoint_Release()

static ULONG WINAPI ConnectionPoint_Release ( IConnectionPoint iface)
static

Definition at line 275 of file events.c.

276 {
278  return IConnectionPointContainer_Release(This->container);
279 }
static ConnectionPoint * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: events.c:126

◆ ConnectionPoint_Unadvise()

static HRESULT WINAPI ConnectionPoint_Unadvise ( IConnectionPoint iface,
DWORD  dwCookie 
)
static

Definition at line 341 of file events.c.

342 {
344 
345  TRACE("(%p)->(%d)\n", This, dwCookie);
346 
347  if(!dwCookie || dwCookie > This->sinks_size || !This->sinks[dwCookie-1])
348  return CONNECT_E_NOCONNECTION;
349 
350  IDispatch_Release(This->sinks[dwCookie-1]);
351  This->sinks[dwCookie-1] = NULL;
352 
353  return S_OK;
354 }
#define CONNECT_E_NOCONNECTION
Definition: olectl.h:251
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static ConnectionPoint * impl_from_IConnectionPoint(IConnectionPoint *iface)
Definition: events.c:126

◆ ConnectionPointContainer_AddRef()

static ULONG WINAPI ConnectionPointContainer_AddRef ( IConnectionPointContainer iface)
static

Definition at line 60 of file events.c.

61 {
63  return IUnknown_AddRef(This->impl);
64 }
static ConnectionPointContainer * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: events.c:48

◆ ConnectionPointContainer_Destroy()

void ConnectionPointContainer_Destroy ( ConnectionPointContainer This)

Definition at line 442 of file events.c.

443 {
447 }
static void ConnectionPoint_Destroy(ConnectionPoint *This)
Definition: events.c:418

Referenced by destroy_htmldoc(), DocHost_Release(), and HTMLElement_destructor().

◆ ConnectionPointContainer_EnumConnectionPoints()

static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints ( IConnectionPointContainer iface,
LPENUMCONNECTIONPOINTS *  ppEnum 
)
static

Definition at line 72 of file events.c.

74 {
76  FIXME("(%p)->(%p)\n", This, ppEnum);
77  return E_NOTIMPL;
78 }
#define FIXME(fmt,...)
Definition: debug.h:110
static ConnectionPointContainer * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: events.c:48
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ConnectionPointContainer_FindConnectionPoint()

static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint ( IConnectionPointContainer iface,
REFIID  riid,
LPCONNECTIONPOINT *  ppCP 
)
static

Definition at line 80 of file events.c.

82 {
84 
85  if(!ppCP) {
86  WARN("ppCP == NULL\n");
87  return E_POINTER;
88  }
89 
90  *ppCP = NULL;
91 
92  if(IsEqualGUID(&DIID_DWebBrowserEvents2, riid)) {
93  TRACE("(%p)->(DIID_DWebBrowserEvents2 %p)\n", This, ppCP);
94  *ppCP = &This->wbe2->IConnectionPoint_iface;
95  }else if(IsEqualGUID(&DIID_DWebBrowserEvents, riid)) {
96  TRACE("(%p)->(DIID_DWebBrowserEvents %p)\n", This, ppCP);
97  *ppCP = &This->wbe->IConnectionPoint_iface;
99  TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppCP);
100  *ppCP = &This->pns->IConnectionPoint_iface;
101  }
102 
103  if(*ppCP) {
104  IConnectionPoint_AddRef(*ppCP);
105  return S_OK;
106  }
107 
108  WARN("Unsupported IID %s\n", debugstr_guid(riid));
109  return CONNECT_E_NOCONNECTION;
110 }
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
#define CONNECT_E_NOCONNECTION
Definition: olectl.h:251
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static ConnectionPointContainer * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: events.c:48
#define S_OK
Definition: intsafe.h:59
const GUID IID_IPropertyNotifySink
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
#define E_POINTER
Definition: winerror.h:2365

◆ ConnectionPointContainer_Init()

void ConnectionPointContainer_Init ( ConnectionPointContainer This,
IUnknown impl 
)

Definition at line 431 of file events.c.

432 {
433  This->IConnectionPointContainer_iface.lpVtbl = &ConnectionPointContainerVtbl;
434 
435  ConnectionPoint_Create(&DIID_DWebBrowserEvents2, &This->wbe2, &This->IConnectionPointContainer_iface);
436  ConnectionPoint_Create(&DIID_DWebBrowserEvents, &This->wbe, &This->IConnectionPointContainer_iface);
437  ConnectionPoint_Create(&IID_IPropertyNotifySink, &This->pns, &This->IConnectionPointContainer_iface);
438 
439  This->impl = impl;
440 }
static const IConnectionPointContainerVtbl ConnectionPointContainerVtbl
Definition: events.c:112
static void ConnectionPoint_Create(REFIID riid, ConnectionPoint **cp, IConnectionPointContainer *container)
Definition: events.c:402
const GUID IID_IPropertyNotifySink

Referenced by DocHost_Init(), HTMLElement_Init(), and init_doc().

◆ ConnectionPointContainer_QueryInterface()

static HRESULT WINAPI ConnectionPointContainer_QueryInterface ( IConnectionPointContainer iface,
REFIID  riid,
LPVOID ppv 
)
static

Definition at line 53 of file events.c.

55 {
57  return IUnknown_QueryInterface(This->impl, riid, ppv);
58 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static ConnectionPointContainer * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: events.c:48

◆ ConnectionPointContainer_Release()

static ULONG WINAPI ConnectionPointContainer_Release ( IConnectionPointContainer iface)
static

Definition at line 66 of file events.c.

67 {
69  return IUnknown_Release(This->impl);
70 }
static ConnectionPointContainer * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: events.c:48

◆ EnumConnections_AddRef()

static ULONG WINAPI EnumConnections_AddRef ( IEnumConnections iface)
static

Definition at line 165 of file events.c.

166 {
169 
170  TRACE("(%p) ref=%d\n", This, ref);
171 
172  return ref;
173 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
static EnumConnections * impl_from_IEnumConnections(IEnumConnections *iface)
Definition: events.c:140

◆ EnumConnections_Clone()

static HRESULT WINAPI EnumConnections_Clone ( IEnumConnections iface,
IEnumConnections **  ppEnum 
)
static

Definition at line 228 of file events.c.

229 {
231  FIXME("(%p)->(%p)\n", This, ppEnum);
232  return E_NOTIMPL;
233 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static EnumConnections * impl_from_IEnumConnections(IEnumConnections *iface)
Definition: events.c:140

◆ EnumConnections_Next()

static HRESULT WINAPI EnumConnections_Next ( IEnumConnections iface,
ULONG  cConnections,
CONNECTDATA *  pgcd,
ULONG pcFetched 
)
static

Definition at line 190 of file events.c.

191 {
193  ULONG cnt = 0;
194 
195  TRACE("(%p)->(%u %p %p)\n", This, cConnections, pgcd, pcFetched);
196 
197  while(cConnections--) {
198  while(This->iter < This->cp->sinks_size && !This->cp->sinks[This->iter])
199  This->iter++;
200  if(This->iter == This->cp->sinks_size)
201  break;
202 
203  pgcd[cnt].pUnk = (IUnknown*)This->cp->sinks[This->iter];
204  pgcd[cnt].dwCookie = cnt+1;
205  This->iter++;
206  cnt++;
207  }
208 
209  if(pcFetched)
210  *pcFetched = cnt;
211  return cnt ? S_OK : S_FALSE;
212 }
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
unsigned int ULONG
Definition: retypes.h:1
static EnumConnections * impl_from_IEnumConnections(IEnumConnections *iface)
Definition: events.c:140

◆ EnumConnections_QueryInterface()

static HRESULT WINAPI EnumConnections_QueryInterface ( IEnumConnections iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 145 of file events.c.

146 {
148 
149  if(IsEqualGUID(&IID_IUnknown, riid)) {
150  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
151  *ppv = &This->IEnumConnections_iface;
152  }else if(IsEqualGUID(&IID_IEnumConnections, riid)) {
153  TRACE("(%p)->(IID_IEnumConnections %p)\n", This, ppv);
154  *ppv = &This->IEnumConnections_iface;
155  }else {
156  WARN("Unsupported interface %s\n", debugstr_guid(riid));
157  *ppv = NULL;
158  return E_NOINTERFACE;
159  }
160 
161  IUnknown_AddRef((IUnknown*)*ppv);
162  return S_OK;
163 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
REFIID LPVOID * ppv
Definition: atlbase.h:39
const GUID IID_IEnumConnections
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static EnumConnections * impl_from_IEnumConnections(IEnumConnections *iface)
Definition: events.c:140

◆ EnumConnections_Release()

static ULONG WINAPI EnumConnections_Release ( IEnumConnections iface)
static

Definition at line 175 of file events.c.

176 {
179 
180  TRACE("(%p) ref=%d\n", This, ref);
181 
182  if(!ref) {
183  IConnectionPoint_Release(&This->cp->IConnectionPoint_iface);
184  heap_free(This);
185  }
186 
187  return ref;
188 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
static EnumConnections * impl_from_IEnumConnections(IEnumConnections *iface)
Definition: events.c:140
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ EnumConnections_Reset()

static HRESULT WINAPI EnumConnections_Reset ( IEnumConnections iface)
static

Definition at line 221 of file events.c.

222 {
224  FIXME("(%p)\n", This);
225  return E_NOTIMPL;
226 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static EnumConnections * impl_from_IEnumConnections(IEnumConnections *iface)
Definition: events.c:140

◆ EnumConnections_Skip()

static HRESULT WINAPI EnumConnections_Skip ( IEnumConnections iface,
ULONG  cConnections 
)
static

Definition at line 214 of file events.c.

215 {
217  FIXME("(%p)->(%u)\n", This, cConnections);
218  return E_NOTIMPL;
219 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static EnumConnections * impl_from_IEnumConnections(IEnumConnections *iface)
Definition: events.c:140

◆ impl_from_IConnectionPoint()

static ConnectionPoint* impl_from_IConnectionPoint ( IConnectionPoint iface)
inlinestatic

Definition at line 126 of file events.c.

127 {
128  return CONTAINING_RECORD(iface, ConnectionPoint, IConnectionPoint_iface);
129 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by ConnectionPoint_AddRef(), ConnectionPoint_Advise(), ConnectionPoint_EnumConnections(), ConnectionPoint_GetConnectionInterface(), ConnectionPoint_GetConnectionPointContainer(), ConnectionPoint_QueryInterface(), ConnectionPoint_Release(), and ConnectionPoint_Unadvise().

◆ impl_from_IConnectionPointContainer()

static ConnectionPointContainer* impl_from_IConnectionPointContainer ( IConnectionPointContainer iface)
inlinestatic

Definition at line 48 of file events.c.

49 {
50  return CONTAINING_RECORD(iface, ConnectionPointContainer, IConnectionPointContainer_iface);
51 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by ConnectionPointContainer_AddRef(), ConnectionPointContainer_EnumConnectionPoints(), ConnectionPointContainer_FindConnectionPoint(), ConnectionPointContainer_QueryInterface(), and ConnectionPointContainer_Release().

◆ impl_from_IEnumConnections()

static EnumConnections* impl_from_IEnumConnections ( IEnumConnections iface)
inlinestatic

Definition at line 140 of file events.c.

141 {
142  return CONTAINING_RECORD(iface, EnumConnections, IEnumConnections_iface);
143 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by EnumConnections_AddRef(), EnumConnections_Clone(), EnumConnections_Next(), EnumConnections_QueryInterface(), EnumConnections_Release(), EnumConnections_Reset(), and EnumConnections_Skip().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ieframe  )

Variable Documentation

◆ ConnectionPointContainerVtbl

const IConnectionPointContainerVtbl ConnectionPointContainerVtbl
static
Initial value:
=
{
}
static ULONG WINAPI ConnectionPointContainer_AddRef(IConnectionPointContainer *iface)
Definition: events.c:60
static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface, REFIID riid, LPCONNECTIONPOINT *ppCP)
Definition: events.c:80
static HRESULT WINAPI ConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, REFIID riid, LPVOID *ppv)
Definition: events.c:53
static ULONG WINAPI ConnectionPointContainer_Release(IConnectionPointContainer *iface)
Definition: events.c:66
static HRESULT WINAPI ConnectionPointContainer_EnumConnectionPoints(IConnectionPointContainer *iface, LPENUMCONNECTIONPOINTS *ppEnum)
Definition: events.c:72

Definition at line 112 of file events.c.

Referenced by ConnectionPointContainer_Init().

◆ ConnectionPointVtbl

const IConnectionPointVtbl ConnectionPointVtbl
static
Initial value:
=
{
}
static HRESULT WINAPI ConnectionPoint_GetConnectionPointContainer(IConnectionPoint *iface, IConnectionPointContainer **ppCPC)
Definition: events.c:291
static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *pUnkSink, DWORD *pdwCookie)
Definition: events.c:303
static HRESULT WINAPI ConnectionPoint_EnumConnections(IConnectionPoint *iface, IEnumConnections **ppEnum)
Definition: events.c:356
static ULONG WINAPI ConnectionPoint_Release(IConnectionPoint *iface)
Definition: events.c:275
static ULONG WINAPI ConnectionPoint_AddRef(IConnectionPoint *iface)
Definition: events.c:269
static HRESULT WINAPI ConnectionPoint_GetConnectionInterface(IConnectionPoint *iface, IID *pIID)
Definition: events.c:281
static HRESULT WINAPI ConnectionPoint_QueryInterface(IConnectionPoint *iface, REFIID riid, LPVOID *ppv)
Definition: events.c:245
static HRESULT WINAPI ConnectionPoint_Unadvise(IConnectionPoint *iface, DWORD dwCookie)
Definition: events.c:341

Definition at line 379 of file events.c.

Referenced by ConnectionPoint_Create().

◆ EnumConnectionsVtbl

const IEnumConnectionsVtbl EnumConnectionsVtbl
static
Initial value:
= {
}
static HRESULT WINAPI EnumConnections_Skip(IEnumConnections *iface, ULONG cConnections)
Definition: events.c:214
static HRESULT WINAPI EnumConnections_Next(IEnumConnections *iface, ULONG cConnections, CONNECTDATA *pgcd, ULONG *pcFetched)
Definition: events.c:190
static HRESULT WINAPI EnumConnections_Reset(IEnumConnections *iface)
Definition: events.c:221
static HRESULT WINAPI EnumConnections_Clone(IEnumConnections *iface, IEnumConnections **ppEnum)
Definition: events.c:228
static ULONG WINAPI EnumConnections_AddRef(IEnumConnections *iface)
Definition: events.c:165
static HRESULT WINAPI EnumConnections_QueryInterface(IEnumConnections *iface, REFIID riid, void **ppv)
Definition: events.c:145
static ULONG WINAPI EnumConnections_Release(IEnumConnections *iface)
Definition: events.c:175

Definition at line 235 of file events.c.

Referenced by ConnectionPoint_EnumConnections().