ReactOS 0.4.15-dev-8235-gcd88a97
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}
#define InterlockedIncrement
Definition: armddk.h:53
static HTMLScreen * impl_from_IHTMLScreen(IHTMLScreen *iface)
Definition: htmlscreen.c:28
long LONG
Definition: pedump.c:60
#define TRACE(s)
Definition: solgame.cpp:4
Definition: send.c:48

◆ 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}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const IHTMLScreenVtbl HTMLSreenVtbl
Definition: htmlscreen.c:203
static dispex_static_data_t HTMLScreen_dispex
Definition: htmlscreen.c:227
#define S_OK
Definition: intsafe.h:52
HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *builtin_info, jsdisp_t *prototype)
Definition: dispex.c:919
char screen[SCREENY][SCREENX]
Definition: polytest.cpp:65
int ret

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}
#define E_FAIL
Definition: ddrawi.h:102
GLfloat GLfloat p
Definition: glext.h:8902
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)

◆ 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 right
Definition: windef.h:308
LONG left
Definition: windef.h:306

◆ 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:114
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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}
HDC get_display_dc(void)
Definition: main.c:173
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define BITSPIXEL
Definition: wingdi.h:720

◆ 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}

◆ 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 VERTRES
Definition: wingdi.h:717

◆ 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}

◆ 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:716

◆ 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: atlbase.h:39

◆ 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}

◆ 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}

◆ 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}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ 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}
const GLdouble * v
Definition: gl.h:2040

◆ 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}

◆ 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}
const GUID IID_IUnknown
#define WARN(fmt,...)
Definition: debug.h:115
#define NULL
Definition: types.h:112
const char * debugstr_mshtml_guid(const GUID *iid)
Definition: main.c:542
REFIID LPVOID * ppv
Definition: atlbase.h:39
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
Definition: dispex.c:1656
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ 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);
75 }
76
77 return ref;
78}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedDecrement
Definition: armddk.h:52
void release_dispex(DispatchEx *This)
Definition: dispex.c:1706

◆ impl_from_IHTMLScreen()

Variable Documentation

◆ HTMLScreen_dispex

dispex_static_data_t HTMLScreen_dispex
static
Initial value:
= {
DispHTMLScreen_tid,
}
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_QueryInterface(IHTMLScreen *iface, REFIID riid, void **ppv)
Definition: htmlscreen.c:33
static HRESULT WINAPI HTMLScreen_get_bufferDepth(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:127
static HRESULT WINAPI HTMLScreen_get_availWidth(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:182
static HRESULT WINAPI HTMLScreen_get_availHeight(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:168
static ULONG WINAPI HTMLScreen_AddRef(IHTMLScreen *iface)
Definition: htmlscreen.c:55
static HRESULT WINAPI HTMLScreen_get_colorDepth(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:110
static HRESULT WINAPI HTMLScreen_put_updateInterval(IHTMLScreen *iface, LONG v)
Definition: htmlscreen.c:154
static HRESULT WINAPI HTMLScreen_put_bufferDepth(IHTMLScreen *iface, LONG v)
Definition: htmlscreen.c:120
static HRESULT WINAPI HTMLScreen_get_updateInterval(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:161
static HRESULT WINAPI HTMLScreen_get_height(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:144
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_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_GetTypeInfoCount(IHTMLScreen *iface, UINT *pctinfo)
Definition: htmlscreen.c:80
static ULONG WINAPI HTMLScreen_Release(IHTMLScreen *iface)
Definition: htmlscreen.c:65
static HRESULT WINAPI HTMLScreen_get_width(IHTMLScreen *iface, LONG *p)
Definition: htmlscreen.c:134
static HRESULT WINAPI HTMLScreen_GetTypeInfo(IHTMLScreen *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: htmlscreen.c:86

Definition at line 203 of file htmlscreen.c.

Referenced by HTMLScreen_Create().