ReactOS  0.4.13-dev-656-g74bcf30
htmlscreen.c File Reference
#include "mshtml_private.h"
Include dependency graph for htmlscreen.c:

Go to the source code of this file.

Classes

struct  HTMLScreen
 

Functions

static HTMLScreenimpl_from_IHTMLScreen (IHTMLScreen *iface)
 
static HRESULT WINAPI HTMLScreen_QueryInterface (IHTMLScreen *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HTMLScreen_AddRef (IHTMLScreen *iface)
 
static ULONG WINAPI HTMLScreen_Release (IHTMLScreen *iface)
 
static HRESULT WINAPI HTMLScreen_GetTypeInfoCount (IHTMLScreen *iface, UINT *pctinfo)
 
static HRESULT WINAPI HTMLScreen_GetTypeInfo (IHTMLScreen *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI HTMLScreen_GetIDsOfNames (IHTMLScreen *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI HTMLScreen_Invoke (IHTMLScreen *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI HTMLScreen_get_colorDepth (IHTMLScreen *iface, LONG *p)
 
static HRESULT WINAPI HTMLScreen_put_bufferDepth (IHTMLScreen *iface, LONG v)
 
static HRESULT WINAPI HTMLScreen_get_bufferDepth (IHTMLScreen *iface, LONG *p)
 
static HRESULT WINAPI HTMLScreen_get_width (IHTMLScreen *iface, LONG *p)
 
static HRESULT WINAPI HTMLScreen_get_height (IHTMLScreen *iface, LONG *p)
 
static HRESULT WINAPI HTMLScreen_put_updateInterval (IHTMLScreen *iface, LONG v)
 
static HRESULT WINAPI HTMLScreen_get_updateInterval (IHTMLScreen *iface, LONG *p)
 
static HRESULT WINAPI HTMLScreen_get_availHeight (IHTMLScreen *iface, LONG *p)
 
static HRESULT WINAPI HTMLScreen_get_availWidth (IHTMLScreen *iface, LONG *p)
 
static HRESULT WINAPI HTMLScreen_get_fontSmoothingEnabled (IHTMLScreen *iface, VARIANT_BOOL *p)
 
HRESULT HTMLScreen_Create (IHTMLScreen **ret)
 

Variables

static const IHTMLScreenVtbl HTMLSreenVtbl
 
static const tid_t HTMLScreen_iface_tids []
 
static dispex_static_data_t HTMLScreen_dispex
 

Function Documentation

◆ HTMLScreen_AddRef()

static ULONG WINAPI HTMLScreen_AddRef ( IHTMLScreen *  iface)
static

Definition at line 55 of file htmlscreen.c.

56 {
59 
60  TRACE("(%p) ref=%d\n", This, ref);
61 
62  return ref;
63 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
#define InterlockedIncrement
Definition: armddk.h:53

◆ HTMLScreen_Create()

HRESULT HTMLScreen_Create ( IHTMLScreen **  ret)

Definition at line 234 of file htmlscreen.c.

235 {
237 
238  screen = heap_alloc_zero(sizeof(HTMLScreen));
239  if(!screen)
240  return E_OUTOFMEMORY;
241 
242  screen->IHTMLScreen_iface.lpVtbl = &HTMLSreenVtbl;
243  screen->ref = 1;
244 
245  init_dispex(&screen->dispex, (IUnknown*)&screen->IHTMLScreen_iface, &HTMLScreen_dispex);
246 
247  *ret = &screen->IHTMLScreen_iface;
248  return S_OK;
249 }
static dispex_static_data_t HTMLScreen_dispex
Definition: htmlscreen.c:227
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const IHTMLScreenVtbl HTMLSreenVtbl
Definition: htmlscreen.c:203
int ret
char screen[SCREENY][SCREENX]
Definition: polytest.cpp:65
#define S_OK
Definition: intsafe.h:59
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:940

Referenced by HTMLWindow2_get_screen().

◆ HTMLScreen_get_availHeight()

static HRESULT WINAPI HTMLScreen_get_availHeight ( IHTMLScreen *  iface,
LONG p 
)
static

Definition at line 168 of file htmlscreen.c.

169 {
171  RECT work_area;
172 
173  TRACE("(%p)->(%p)\n", This, p);
174 
175  if(!SystemParametersInfoW(SPI_GETWORKAREA, 0, &work_area, 0))
176  return E_FAIL;
177 
178  *p = work_area.bottom-work_area.top;
179  return S_OK;
180 }
LONG top
Definition: windef.h:292
#define E_FAIL
Definition: ddrawi.h:102
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
#define TRACE(s)
Definition: solgame.cpp:4
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
#define S_OK
Definition: intsafe.h:59
LONG bottom
Definition: windef.h:294
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLScreen_get_availWidth()

static HRESULT WINAPI HTMLScreen_get_availWidth ( IHTMLScreen *  iface,
LONG p 
)
static

Definition at line 182 of file htmlscreen.c.

183 {
185  RECT work_area;
186 
187  TRACE("(%p)->(%p)\n", This, p);
188 
189  if(!SystemParametersInfoW(SPI_GETWORKAREA, 0, &work_area, 0))
190  return E_FAIL;
191 
192  *p = work_area.right-work_area.left;
193  return S_OK;
194 }
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
#define E_FAIL
Definition: ddrawi.h:102
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
#define TRACE(s)
Definition: solgame.cpp:4
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
#define S_OK
Definition: intsafe.h:59
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLScreen_get_bufferDepth()

static HRESULT WINAPI HTMLScreen_get_bufferDepth ( IHTMLScreen *  iface,
LONG p 
)
static

Definition at line 127 of file htmlscreen.c.

128 {
130  FIXME("(%p)->(%p)\n", This, p);
131  return E_NOTIMPL;
132 }
#define FIXME(fmt,...)
Definition: debug.h:110
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
#define E_NOTIMPL
Definition: ddrawi.h:99
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLScreen_get_colorDepth()

static HRESULT WINAPI HTMLScreen_get_colorDepth ( IHTMLScreen *  iface,
LONG p 
)
static

Definition at line 110 of file htmlscreen.c.

111 {
113 
114  TRACE("(%p)->(%p)\n", This, p);
115 
117  return S_OK;
118 }
#define BITSPIXEL
Definition: wingdi.h:719
#define TRACE(s)
Definition: solgame.cpp:4
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
#define S_OK
Definition: intsafe.h:59
GLfloat GLfloat p
Definition: glext.h:8902
HDC get_display_dc(void)
Definition: main.c:166

◆ HTMLScreen_get_fontSmoothingEnabled()

static HRESULT WINAPI HTMLScreen_get_fontSmoothingEnabled ( IHTMLScreen *  iface,
VARIANT_BOOL p 
)
static

Definition at line 196 of file htmlscreen.c.

197 {
199  FIXME("(%p)->(%p)\n", This, p);
200  return E_NOTIMPL;
201 }
#define FIXME(fmt,...)
Definition: debug.h:110
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
#define E_NOTIMPL
Definition: ddrawi.h:99
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLScreen_get_height()

static HRESULT WINAPI HTMLScreen_get_height ( IHTMLScreen *  iface,
LONG p 
)
static

Definition at line 144 of file htmlscreen.c.

145 {
147 
148  TRACE("(%p)->(%p)\n", This, p);
149 
151  return S_OK;
152 }
#define TRACE(s)
Definition: solgame.cpp:4
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
#define S_OK
Definition: intsafe.h:59
#define VERTRES
Definition: wingdi.h:716
GLfloat GLfloat p
Definition: glext.h:8902
HDC get_display_dc(void)
Definition: main.c:166

◆ HTMLScreen_get_updateInterval()

static HRESULT WINAPI HTMLScreen_get_updateInterval ( IHTMLScreen *  iface,
LONG p 
)
static

Definition at line 161 of file htmlscreen.c.

162 {
164  FIXME("(%p)->(%p)\n", This, p);
165  return E_NOTIMPL;
166 }
#define FIXME(fmt,...)
Definition: debug.h:110
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
#define E_NOTIMPL
Definition: ddrawi.h:99
GLfloat GLfloat p
Definition: glext.h:8902

◆ HTMLScreen_get_width()

static HRESULT WINAPI HTMLScreen_get_width ( IHTMLScreen *  iface,
LONG p 
)
static

Definition at line 134 of file htmlscreen.c.

135 {
137 
138  TRACE("(%p)->(%p)\n", This, p);
139 
141  return S_OK;
142 }
#define HORZRES
Definition: wingdi.h:715
#define TRACE(s)
Definition: solgame.cpp:4
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
#define S_OK
Definition: intsafe.h:59
GLfloat GLfloat p
Definition: glext.h:8902
HDC get_display_dc(void)
Definition: main.c:166

◆ HTMLScreen_GetIDsOfNames()

static HRESULT WINAPI HTMLScreen_GetIDsOfNames ( IHTMLScreen *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 93 of file htmlscreen.c.

95 {
97  return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames,
98  lcid, rgDispId);
99 }
REFIID riid
Definition: precomp.h:44
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28

◆ HTMLScreen_GetTypeInfo()

static HRESULT WINAPI HTMLScreen_GetTypeInfo ( IHTMLScreen *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 86 of file htmlscreen.c.

88 {
90  return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo);
91 }
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28

◆ HTMLScreen_GetTypeInfoCount()

static HRESULT WINAPI HTMLScreen_GetTypeInfoCount ( IHTMLScreen *  iface,
UINT pctinfo 
)
static

Definition at line 80 of file htmlscreen.c.

81 {
83  return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo);
84 }
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28

◆ HTMLScreen_Invoke()

static HRESULT WINAPI HTMLScreen_Invoke ( IHTMLScreen *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 101 of file htmlscreen.c.

104 {
106  return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, wFlags,
107  pDispParams, pVarResult, pExcepInfo, puArgErr);
108 }
REFIID riid
Definition: precomp.h:44
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28

◆ HTMLScreen_put_bufferDepth()

static HRESULT WINAPI HTMLScreen_put_bufferDepth ( IHTMLScreen *  iface,
LONG  v 
)
static

Definition at line 120 of file htmlscreen.c.

121 {
123  FIXME("(%p)->(%d)\n", This, v);
124  return E_NOTIMPL;
125 }
#define FIXME(fmt,...)
Definition: debug.h:110
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
const GLdouble * v
Definition: gl.h:2040
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ HTMLScreen_put_updateInterval()

static HRESULT WINAPI HTMLScreen_put_updateInterval ( IHTMLScreen *  iface,
LONG  v 
)
static

Definition at line 154 of file htmlscreen.c.

155 {
157  FIXME("(%p)->(%d)\n", This, v);
158  return E_NOTIMPL;
159 }
#define FIXME(fmt,...)
Definition: debug.h:110
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
const GLdouble * v
Definition: gl.h:2040
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ HTMLScreen_QueryInterface()

static HRESULT WINAPI HTMLScreen_QueryInterface ( IHTMLScreen *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 33 of file htmlscreen.c.

34 {
36 
37  TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
38 
40  *ppv = &This->IHTMLScreen_iface;
41  }else if(IsEqualGUID(&IID_IHTMLScreen, riid)) {
42  *ppv = &This->IHTMLScreen_iface;
43  }else if(dispex_query_interface(&This->dispex, riid, ppv)) {
44  return *ppv ? S_OK : E_NOINTERFACE;
45  }else {
46  *ppv = NULL;
47  WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
48  return E_NOINTERFACE;
49  }
50 
51  IUnknown_AddRef((IUnknown*)*ppv);
52  return S_OK;
53 }
#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 char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:535
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
#define S_OK
Definition: intsafe.h:59
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021

◆ HTMLScreen_Release()

static ULONG WINAPI HTMLScreen_Release ( IHTMLScreen *  iface)
static

Definition at line 65 of file htmlscreen.c.

66 {
69 
70  TRACE("(%p) ref=%d\n", This, ref);
71 
72  if(!ref) {
73  release_dispex(&This->dispex);
74  heap_free(This);
75  }
76 
77  return ref;
78 }
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 HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
void release_dispex(DispatchEx *This)
Definition: dispex.c:1706
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ impl_from_IHTMLScreen()

static HTMLScreen* impl_from_IHTMLScreen ( IHTMLScreen *  iface)
inlinestatic

Definition at line 28 of file htmlscreen.c.

29 {
30  return CONTAINING_RECORD(iface, HTMLScreen, IHTMLScreen_iface);
31 }
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 HTMLScreen_AddRef(), HTMLScreen_get_availHeight(), HTMLScreen_get_availWidth(), HTMLScreen_get_bufferDepth(), HTMLScreen_get_colorDepth(), HTMLScreen_get_fontSmoothingEnabled(), HTMLScreen_get_height(), HTMLScreen_get_updateInterval(), HTMLScreen_get_width(), HTMLScreen_GetIDsOfNames(), HTMLScreen_GetTypeInfo(), HTMLScreen_GetTypeInfoCount(), HTMLScreen_Invoke(), HTMLScreen_put_bufferDepth(), HTMLScreen_put_updateInterval(), HTMLScreen_QueryInterface(), and HTMLScreen_Release().

Variable Documentation

◆ HTMLScreen_dispex

dispex_static_data_t HTMLScreen_dispex
static
Initial value:
= {
DispHTMLScreen_tid,
}
smooth NULL
Definition: ftsmooth.c:416
static const tid_t HTMLScreen_iface_tids[]
Definition: htmlscreen.c:223

Definition at line 227 of file htmlscreen.c.

Referenced by HTMLScreen_Create().

◆ HTMLScreen_iface_tids

const tid_t HTMLScreen_iface_tids[]
static
Initial value:
= {
IHTMLScreen_tid,
0
}

Definition at line 223 of file htmlscreen.c.

◆ HTMLSreenVtbl

const IHTMLScreenVtbl HTMLSreenVtbl
static
Initial value:
= {
}
static HRESULT WINAPI HTMLScreen_get_width(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:134
static ULONG WINAPI HTMLScreen_Release(IHTMLScreen *iface)
Definition: htmlscreen.c:65
static HRESULT WINAPI HTMLScreen_GetTypeInfoCount(IHTMLScreen *iface, UINT *pctinfo)
Definition: htmlscreen.c:80
static ULONG WINAPI HTMLScreen_AddRef(IHTMLScreen *iface)
Definition: htmlscreen.c:55
static HRESULT WINAPI HTMLScreen_put_updateInterval(IHTMLScreen *iface, LONG v)
Definition: htmlscreen.c:154
static HRESULT WINAPI HTMLScreen_QueryInterface(IHTMLScreen *iface, REFIID riid, void **ppv)
Definition: htmlscreen.c:33
static HRESULT WINAPI HTMLScreen_GetTypeInfo(IHTMLScreen *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlscreen.c:86
static HRESULT WINAPI HTMLScreen_get_availWidth(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:182
static HRESULT WINAPI HTMLScreen_get_bufferDepth(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:127
static HRESULT WINAPI HTMLScreen_get_colorDepth(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:110
static HRESULT WINAPI HTMLScreen_get_fontSmoothingEnabled(IHTMLScreen *iface, VARIANT_BOOL *p)
Definition: htmlscreen.c:196
static HRESULT WINAPI HTMLScreen_Invoke(IHTMLScreen *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: htmlscreen.c:101
static HRESULT WINAPI HTMLScreen_GetIDsOfNames(IHTMLScreen *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: htmlscreen.c:93
static HRESULT WINAPI HTMLScreen_get_height(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:144
static HRESULT WINAPI HTMLScreen_get_availHeight(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:168
static HRESULT WINAPI HTMLScreen_get_updateInterval(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:161
static HRESULT WINAPI HTMLScreen_put_bufferDepth(IHTMLScreen *iface, LONG v)
Definition: htmlscreen.c:120

Definition at line 203 of file htmlscreen.c.

Referenced by HTMLScreen_Create().