ReactOS  0.4.15-dev-313-g8fde48b
nsservice.c File Reference
#include "mshtml_private.h"
Include dependency graph for nsservice.c:

Go to the source code of this file.

Classes

struct  nsServiceFactory
 

Macros

#define NS_PROMPTSERVICE_CONTRACTID   "@mozilla.org/embedcomp/prompt-service;1"
 
#define NS_TOOLTIPTEXTPROVIDER_CONTRACTID   "@mozilla.org/embedcomp/tooltiptextprovider;1"
 
#define NS_TOOLTIPTEXTPROVIDER_CLASSNAME   "nsTooltipTextProvider"
 

Functions

static nsresult NSAPI nsPromptService_QueryInterface (nsIPromptService *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsPromptService_AddRef (nsIPromptService *iface)
 
static nsrefcnt NSAPI nsPromptService_Release (nsIPromptService *iface)
 
static nsresult NSAPI nsPromptService_Alert (nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText)
 
static nsresult NSAPI nsPromptService_AlertCheck (nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, cpp_bool *aCheckState)
 
static nsresult NSAPI nsPromptService_Confirm (nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, cpp_bool *_retval)
 
static nsresult NSAPI nsPromptService_ConfirmCheck (nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, cpp_bool *aCheckState, cpp_bool *_retval)
 
static nsresult NSAPI nsPromptService_ConfirmEx (nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, UINT32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, cpp_bool *aCheckState, LONG *_retval)
 
static nsresult NSAPI nsPromptService_Prompt (nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, cpp_bool *aCheckState, cpp_bool *_retval)
 
static nsresult NSAPI nsPromptService_PromptUsernameAndPassword (nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, cpp_bool *aCheckState, cpp_bool *_retval)
 
static nsresult NSAPI nsPromptService_PromptPassword (nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, cpp_bool *aCheckState, cpp_bool *_retval)
 
static nsresult NSAPI nsPromptService_Select (nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, UINT32 aCount, const PRUnichar **aSelectList, LONG *aOutSelection, cpp_bool *_retval)
 
static nsresult NSAPI nsTooltipTextProvider_QueryInterface (nsITooltipTextProvider *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsTooltipTextProvider_AddRef (nsITooltipTextProvider *iface)
 
static nsrefcnt NSAPI nsTooltipTextProvider_Release (nsITooltipTextProvider *iface)
 
static nsresult NSAPI nsTooltipTextProvider_GetNodeText (nsITooltipTextProvider *iface, nsIDOMNode *aNode, PRUnichar **aText, cpp_bool *_retval)
 
static nsServiceFactoryimpl_from_nsIFactory (nsIFactory *iface)
 
static nsresult NSAPI nsServiceFactory_QueryInterface (nsIFactory *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsServiceFactory_AddRef (nsIFactory *iface)
 
static nsrefcnt NSAPI nsServiceFactory_Release (nsIFactory *iface)
 
static nsresult NSAPI nsServiceFactory_CreateInstance (nsIFactory *iface, nsISupports *aOuter, const nsIID *iid, void **result)
 
static nsresult NSAPI nsServiceFactory_LockFactory (nsIFactory *iface, cpp_bool lock)
 
void register_nsservice (nsIComponentRegistrar *registrar, nsIServiceManager *service_manager)
 

Variables

static const nsIID NS_PROMPTSERVICE_CID
 
static const nsIID NS_TOOLTIPTEXTPROVIDER_CID
 
static const nsIPromptServiceVtbl PromptServiceVtbl
 
static nsIPromptService nsPromptService = { &PromptServiceVtbl }
 
static const nsITooltipTextProviderVtbl nsTooltipTextProviderVtbl
 
static nsITooltipTextProvider nsTooltipTextProvider = { &nsTooltipTextProviderVtbl }
 
static const nsIFactoryVtbl nsServiceFactoryVtbl
 
static nsServiceFactory nsPromptServiceFactory
 
static nsServiceFactory nsTooltipTextFactory
 

Macro Definition Documentation

◆ NS_PROMPTSERVICE_CONTRACTID

#define NS_PROMPTSERVICE_CONTRACTID   "@mozilla.org/embedcomp/prompt-service;1"

Definition at line 21 of file nsservice.c.

◆ NS_TOOLTIPTEXTPROVIDER_CLASSNAME

#define NS_TOOLTIPTEXTPROVIDER_CLASSNAME   "nsTooltipTextProvider"

Definition at line 24 of file nsservice.c.

◆ NS_TOOLTIPTEXTPROVIDER_CONTRACTID

#define NS_TOOLTIPTEXTPROVIDER_CONTRACTID   "@mozilla.org/embedcomp/tooltiptextprovider;1"

Definition at line 22 of file nsservice.c.

Function Documentation

◆ impl_from_nsIFactory()

static nsServiceFactory* impl_from_nsIFactory ( nsIFactory iface)
inlinestatic

Definition at line 300 of file nsservice.c.

301 {
302  return CONTAINING_RECORD(iface, nsServiceFactory, nsIFactory_iface);
303 }
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 nsServiceFactory_CreateInstance(), nsServiceFactory_LockFactory(), and nsServiceFactory_QueryInterface().

◆ nsPromptService_AddRef()

static nsrefcnt NSAPI nsPromptService_AddRef ( nsIPromptService iface)
static

Definition at line 51 of file nsservice.c.

52 {
53  return 2;
54 }

◆ nsPromptService_Alert()

static nsresult NSAPI nsPromptService_Alert ( nsIPromptService iface,
nsIDOMWindow aParent,
const PRUnichar aDialogTitle,
const PRUnichar aText 
)
static

Definition at line 61 of file nsservice.c.

63 {
65  BSTR text;
66 
67  TRACE("(%p %s %s)\n", aParent, debugstr_w(aDialogTitle), debugstr_w(aText));
68 
69  window = nswindow_to_window(aParent);
70  if(!window) {
71  WARN("Could not find HTMLWindow for nsIDOMWindow %p\n", aParent);
72  return NS_ERROR_UNEXPECTED;
73  }
74 
75  text = SysAllocString(aText);
76  IHTMLWindow2_alert(&window->base.IHTMLWindow2_iface, text);
78 
79  return NS_OK;
80 }
const WCHAR * text
Definition: package.c:1827
#define WARN(fmt,...)
Definition: debug.h:112
OLECHAR * BSTR
Definition: compat.h:1943
#define NS_OK
#define debugstr_w
Definition: kernel32.h:32
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
HTMLOuterWindow * nswindow_to_window(const nsIDOMWindow *nswindow)
Definition: htmlwindow.c:3099
#define TRACE(s)
Definition: solgame.cpp:4
static IHTMLWindow2 * window
Definition: events.c:77
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define NS_ERROR_UNEXPECTED

◆ nsPromptService_AlertCheck()

static nsresult NSAPI nsPromptService_AlertCheck ( nsIPromptService iface,
nsIDOMWindow aParent,
const PRUnichar aDialogTitle,
const PRUnichar aText,
const PRUnichar aCheckMsg,
cpp_bool aCheckState 
)
static

Definition at line 82 of file nsservice.c.

85 {
86  FIXME("(%p %s %s %s %p)\n", aParent, debugstr_w(aDialogTitle), debugstr_w(aText),
87  debugstr_w(aCheckMsg), aCheckState);
89 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ nsPromptService_Confirm()

static nsresult NSAPI nsPromptService_Confirm ( nsIPromptService iface,
nsIDOMWindow aParent,
const PRUnichar aDialogTitle,
const PRUnichar aText,
cpp_bool _retval 
)
static

Definition at line 91 of file nsservice.c.

94 {
95  FIXME("(%p %s %s %p)\n", aParent, debugstr_w(aDialogTitle), debugstr_w(aText), _retval);
97 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ nsPromptService_ConfirmCheck()

static nsresult NSAPI nsPromptService_ConfirmCheck ( nsIPromptService iface,
nsIDOMWindow aParent,
const PRUnichar aDialogTitle,
const PRUnichar aText,
const PRUnichar aCheckMsg,
cpp_bool aCheckState,
cpp_bool _retval 
)
static

Definition at line 99 of file nsservice.c.

103 {
104  FIXME("(%p %s %s %s %p %p)\n", aParent, debugstr_w(aDialogTitle), debugstr_w(aText),
105  debugstr_w(aCheckMsg), aCheckState, _retval);
107 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ nsPromptService_ConfirmEx()

static nsresult NSAPI nsPromptService_ConfirmEx ( nsIPromptService iface,
nsIDOMWindow aParent,
const PRUnichar aDialogTitle,
const PRUnichar aText,
UINT32  aButtonFlags,
const PRUnichar aButton0Title,
const PRUnichar aButton1Title,
const PRUnichar aButton2Title,
const PRUnichar aCheckMsg,
cpp_bool aCheckState,
LONG _retval 
)
static

Definition at line 109 of file nsservice.c.

114 {
115  static const PRUnichar wszContinue[] = {'C','o','n','t','i','n','u','e',0};
116 
117  FIXME("(%p %s %s %08x %s %s %s %s %p %p) hack!\n", aParent, debugstr_w(aDialogTitle),
118  debugstr_w(aText), aButtonFlags, debugstr_w(aButton0Title),
119  debugstr_w(aButton1Title), debugstr_w(aButton2Title), debugstr_w(aCheckMsg),
120  aCheckState, _retval);
121 
122  /*
123  * FIXME:
124  * This is really very very ugly hack!!!
125  */
126 
127  if(aButton0Title && !memcmp(aButton0Title, wszContinue, sizeof(wszContinue)))
128  *_retval = 0;
129  else if(aButton1Title && !memcmp(aButton1Title, wszContinue, sizeof(wszContinue)))
130  *_retval = 1;
131  else if(aButton2Title && !memcmp(aButton2Title, wszContinue, sizeof(wszContinue)))
132  *_retval = 2;
133  /* else
134  * let's hope that _retval is set to the default value */
135 
136  return NS_OK;
137 }
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define NS_OK
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
WCHAR PRUnichar
Definition: nsiface.idl:48

◆ nsPromptService_Prompt()

static nsresult NSAPI nsPromptService_Prompt ( nsIPromptService iface,
nsIDOMWindow aParent,
const PRUnichar aDialogTitle,
const PRUnichar aText,
PRUnichar **  aValue,
const PRUnichar aCheckMsg,
cpp_bool aCheckState,
cpp_bool _retval 
)
static

Definition at line 139 of file nsservice.c.

143 {
144  FIXME("(%p %s %s %p %s %p %p)\n", aParent, debugstr_w(aDialogTitle), debugstr_w(aText),
145  aValue, debugstr_w(aCheckMsg), aCheckState, _retval);
147 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ nsPromptService_PromptPassword()

static nsresult NSAPI nsPromptService_PromptPassword ( nsIPromptService iface,
nsIDOMWindow aParent,
const PRUnichar aDialogTitle,
const PRUnichar aText,
PRUnichar **  aPassword,
const PRUnichar aCheckMsg,
cpp_bool aCheckState,
cpp_bool _retval 
)
static

Definition at line 160 of file nsservice.c.

164 {
165  FIXME("(%p %s %s %p %s %p %p)\n", aParent, debugstr_w(aDialogTitle),
166  debugstr_w(aText), aPassword, debugstr_w(aCheckMsg), aCheckState, _retval);
168 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ nsPromptService_PromptUsernameAndPassword()

static nsresult NSAPI nsPromptService_PromptUsernameAndPassword ( nsIPromptService iface,
nsIDOMWindow aParent,
const PRUnichar aDialogTitle,
const PRUnichar aText,
PRUnichar **  aUsername,
PRUnichar **  aPassword,
const PRUnichar aCheckMsg,
cpp_bool aCheckState,
cpp_bool _retval 
)
static

Definition at line 149 of file nsservice.c.

153 {
154  FIXME("(%p %s %s %p %p %s %p %p)\n", aParent, debugstr_w(aDialogTitle),
155  debugstr_w(aText), aUsername, aPassword, debugstr_w(aCheckMsg), aCheckState,
156  _retval);
158 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ nsPromptService_QueryInterface()

static nsresult NSAPI nsPromptService_QueryInterface ( nsIPromptService iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 31 of file nsservice.c.

33 {
34  *result = NULL;
35 
36  if(IsEqualGUID(&IID_nsISupports, riid)) {
37  TRACE("(IID_nsISupports %p)\n", result);
38  *result = iface;
39  }else if(IsEqualGUID(&IID_nsIPromptService, riid)) {
40  TRACE("(IID_nsIPromptService %p)\n", result);
41  *result = iface;
42  }
43 
44  if(*result)
45  return NS_OK;
46 
47  TRACE("(%s %p)\n", debugstr_guid(riid), result);
48  return NS_NOINTERFACE;
49 }
REFIID riid
Definition: precomp.h:44
#define NS_OK
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
#define NS_NOINTERFACE
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
GLuint64EXT * result
Definition: glext.h:11304

◆ nsPromptService_Release()

static nsrefcnt NSAPI nsPromptService_Release ( nsIPromptService iface)
static

Definition at line 56 of file nsservice.c.

57 {
58  return 1;
59 }

◆ nsPromptService_Select()

static nsresult NSAPI nsPromptService_Select ( nsIPromptService iface,
nsIDOMWindow aParent,
const PRUnichar aDialogTitle,
const PRUnichar aText,
UINT32  aCount,
const PRUnichar **  aSelectList,
LONG aOutSelection,
cpp_bool _retval 
)
static

Definition at line 170 of file nsservice.c.

174 {
175  FIXME("(%p %s %s %d %p %p %p)\n", aParent, debugstr_w(aDialogTitle),
176  debugstr_w(aText), aCount, aSelectList, aOutSelection, _retval);
178 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define NS_ERROR_NOT_IMPLEMENTED

◆ nsServiceFactory_AddRef()

static nsrefcnt NSAPI nsServiceFactory_AddRef ( nsIFactory iface)
static

Definition at line 327 of file nsservice.c.

328 {
329  return 2;
330 }

◆ nsServiceFactory_CreateInstance()

static nsresult NSAPI nsServiceFactory_CreateInstance ( nsIFactory iface,
nsISupports aOuter,
const nsIID iid,
void **  result 
)
static

Definition at line 337 of file nsservice.c.

339 {
341 
342  TRACE("(%p)->(%p %s %p)\n", This, aOuter, debugstr_guid(iid), result);
343 
344  return nsISupports_QueryInterface(This->service, iid, result);
345 }
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
GLuint64EXT * result
Definition: glext.h:11304
static nsServiceFactory * impl_from_nsIFactory(nsIFactory *iface)
Definition: nsservice.c:300

◆ nsServiceFactory_LockFactory()

static nsresult NSAPI nsServiceFactory_LockFactory ( nsIFactory iface,
cpp_bool  lock 
)
static

Definition at line 347 of file nsservice.c.

348 {
350  WARN("(%p)->(%x)\n", This, lock);
351  return NS_OK;
352 }
rwlock_t lock
Definition: tcpcore.h:1163
#define WARN(fmt,...)
Definition: debug.h:112
#define NS_OK
static nsServiceFactory * impl_from_nsIFactory(nsIFactory *iface)
Definition: nsservice.c:300

◆ nsServiceFactory_QueryInterface()

static nsresult NSAPI nsServiceFactory_QueryInterface ( nsIFactory iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 305 of file nsservice.c.

307 {
309 
310  *result = NULL;
311 
312  if(IsEqualGUID(&IID_nsISupports, riid)) {
313  TRACE("(%p)->(IID_nsISupports %p)\n", This, result);
314  *result = &This->nsIFactory_iface;
315  }else if(IsEqualGUID(&IID_nsIFactory, riid)) {
316  TRACE("(%p)->(IID_nsIFactory %p)\n", This, result);
317  *result = &This->nsIFactory_iface;
318  }
319 
320  if(*result)
321  return NS_OK;
322 
323  WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), result);
324  return NS_NOINTERFACE;
325 }
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:112
#define NS_OK
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
#define NS_NOINTERFACE
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
GLuint64EXT * result
Definition: glext.h:11304
static nsServiceFactory * impl_from_nsIFactory(nsIFactory *iface)
Definition: nsservice.c:300

◆ nsServiceFactory_Release()

static nsrefcnt NSAPI nsServiceFactory_Release ( nsIFactory iface)
static

Definition at line 332 of file nsservice.c.

333 {
334  return 1;
335 }

◆ nsTooltipTextProvider_AddRef()

static nsrefcnt NSAPI nsTooltipTextProvider_AddRef ( nsITooltipTextProvider iface)
static

Definition at line 219 of file nsservice.c.

220 {
221  return 2;
222 }

◆ nsTooltipTextProvider_GetNodeText()

static nsresult NSAPI nsTooltipTextProvider_GetNodeText ( nsITooltipTextProvider iface,
nsIDOMNode aNode,
PRUnichar **  aText,
cpp_bool _retval 
)
static

Definition at line 229 of file nsservice.c.

231 {
232  nsIDOMHTMLElement *nselem;
233  nsIDOMNode *node = aNode, *parent;
234  nsAString title_str;
235  const PRUnichar *title = NULL;
236  nsresult nsres;
237 
238  TRACE("(%p %p %p)\n", aNode, aText, _retval);
239 
240  *aText = NULL;
241 
242  nsAString_Init(&title_str, NULL);
243 
244  do {
245  nsres = nsIDOMNode_QueryInterface(node, &IID_nsIDOMHTMLElement, (void**)&nselem);
246  if(NS_SUCCEEDED(nsres)) {
247  title = NULL;
248 
249  nsIDOMHTMLElement_GetTitle(nselem, &title_str);
250  nsIDOMHTMLElement_Release(nselem);
251 
252  nsAString_GetData(&title_str, &title);
253  if(title && *title) {
254  if(node != aNode)
255  nsIDOMNode_Release(node);
256  break;
257  }
258  }
259 
260  nsres = nsIDOMNode_GetParentNode(node, &parent);
261  if(NS_FAILED(nsres))
262  parent = NULL;
263 
264  if(node != aNode)
265  nsIDOMNode_Release(node);
266  node = parent;
267  } while(node);
268 
269  if(title && *title) {
270  int size = (strlenW(title)+1)*sizeof(PRUnichar);
271 
272  *aText = nsalloc(size);
273  memcpy(*aText, title, size);
274  TRACE("aText = %s\n", debugstr_w(*aText));
275 
276  *_retval = TRUE;
277  }else {
278  *_retval = FALSE;
279  }
280 
281  nsAString_Finish(&title_str);
282 
283  return NS_OK;
284 }
#define TRUE
Definition: types.h:120
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
void * nsalloc(size_t) __WINE_ALLOC_SIZE(1) DECLSPEC_HIDDEN
Definition: nsembed.c:778
#define NS_OK
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define NS_FAILED(res)
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
r parent
Definition: btrfs.c:2944
#define NS_SUCCEEDED(res)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
UINT32 nsAString_GetData(const nsAString *, const PRUnichar **) DECLSPEC_HIDDEN
Definition: nsembed.c:831
BOOL nsAString_Init(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:817
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
HRESULT nsresult
Definition: nsiface.idl:39
WCHAR PRUnichar
Definition: nsiface.idl:48
static char title[]
Definition: ps.c:92
Definition: dlist.c:348

◆ nsTooltipTextProvider_QueryInterface()

static nsresult NSAPI nsTooltipTextProvider_QueryInterface ( nsITooltipTextProvider iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 197 of file nsservice.c.

199 {
200  *result = NULL;
201 
202  if(IsEqualGUID(&IID_nsISupports, riid)) {
203  TRACE("(IID_nsISupports %p)\n", result);
204  *result = iface;
205  }else if(IsEqualGUID(&IID_nsITooltipTextProvider, riid)) {
206  TRACE("(IID_nsITooltipTextProvider %p)\n", result);
207  *result = iface;
208  }
209 
210  if(*result) {
211  nsITooltipTextProvider_AddRef(iface);
212  return NS_OK;
213  }
214 
215  WARN("(%s %p)\n", debugstr_guid(riid), result);
216  return NS_NOINTERFACE;
217 }
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:112
#define NS_OK
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
#define NS_NOINTERFACE
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
GLuint64EXT * result
Definition: glext.h:11304

◆ nsTooltipTextProvider_Release()

static nsrefcnt NSAPI nsTooltipTextProvider_Release ( nsITooltipTextProvider iface)
static

Definition at line 224 of file nsservice.c.

225 {
226  return 1;
227 }

◆ register_nsservice()

void register_nsservice ( nsIComponentRegistrar registrar,
nsIServiceManager service_manager 
)

Definition at line 372 of file nsservice.c.

373 {
374  nsresult nsres;
375 
376  nsres = nsIComponentRegistrar_RegisterFactory(registrar, &NS_PROMPTSERVICE_CID,
378  if(NS_FAILED(nsres))
379  ERR("RegisterFactory failed: %08x\n", nsres);
380 
381  nsres = nsIComponentRegistrar_RegisterFactory(registrar, &NS_TOOLTIPTEXTPROVIDER_CID,
384  if(NS_FAILED(nsres))
385  ERR("RegisterFactory failed: %08x\n", nsres);
386 }
nsIFactory nsIFactory_iface
Definition: nsservice.c:296
#define NS_PROMPTSERVICE_CONTRACTID
Definition: nsservice.c:21
#define NS_TOOLTIPTEXTPROVIDER_CONTRACTID
Definition: nsservice.c:22
#define NS_TOOLTIPTEXTPROVIDER_CLASSNAME
Definition: nsservice.c:24
static const nsIID NS_TOOLTIPTEXTPROVIDER_CID
Definition: nsservice.c:28
#define NS_FAILED(res)
static const nsIID NS_PROMPTSERVICE_CID
Definition: nsservice.c:26
#define ERR(fmt,...)
Definition: debug.h:110
static nsServiceFactory nsPromptServiceFactory
Definition: nsservice.c:362
static nsServiceFactory nsTooltipTextFactory
Definition: nsservice.c:367
HRESULT nsresult
Definition: nsiface.idl:39

Referenced by init_xpcom().

Variable Documentation

◆ NS_PROMPTSERVICE_CID

const nsIID NS_PROMPTSERVICE_CID
static
Initial value:
=
{0xa2112d6a,0x0e28,0x421f,{0xb4,0x6a,0x25,0xc0,0xb3,0x8,0xcb,0xd0}}

Definition at line 26 of file nsservice.c.

Referenced by register_nsservice().

◆ NS_TOOLTIPTEXTPROVIDER_CID

const nsIID NS_TOOLTIPTEXTPROVIDER_CID
static
Initial value:
=
{0x0b666e3e,0x569a,0x462c,{0xa7,0xf0,0xb1,0x6b,0xb1,0x5d,0x42,0xff}}

Definition at line 28 of file nsservice.c.

Referenced by register_nsservice().

◆ nsPromptService

nsIPromptService nsPromptService = { &PromptServiceVtbl }
static

Definition at line 195 of file nsservice.c.

◆ nsPromptServiceFactory

nsServiceFactory nsPromptServiceFactory
static
Initial value:
= {
}
static nsIPromptService nsPromptService
Definition: nsservice.c:195
static const nsIFactoryVtbl nsServiceFactoryVtbl
Definition: nsservice.c:354

Definition at line 362 of file nsservice.c.

Referenced by register_nsservice().

◆ nsServiceFactoryVtbl

const nsIFactoryVtbl nsServiceFactoryVtbl
static
Initial value:
= {
}
static nsrefcnt NSAPI nsServiceFactory_AddRef(nsIFactory *iface)
Definition: nsservice.c:327
static nsrefcnt NSAPI nsServiceFactory_Release(nsIFactory *iface)
Definition: nsservice.c:332
static nsresult NSAPI nsServiceFactory_LockFactory(nsIFactory *iface, cpp_bool lock)
Definition: nsservice.c:347
static nsresult NSAPI nsServiceFactory_CreateInstance(nsIFactory *iface, nsISupports *aOuter, const nsIID *iid, void **result)
Definition: nsservice.c:337
static nsresult NSAPI nsServiceFactory_QueryInterface(nsIFactory *iface, nsIIDRef riid, void **result)
Definition: nsservice.c:305

Definition at line 354 of file nsservice.c.

◆ nsTooltipTextFactory

nsServiceFactory nsTooltipTextFactory
static
Initial value:
= {
}
static nsITooltipTextProvider nsTooltipTextProvider
Definition: nsservice.c:293
static const nsIFactoryVtbl nsServiceFactoryVtbl
Definition: nsservice.c:354

Definition at line 367 of file nsservice.c.

Referenced by register_nsservice().

◆ nsTooltipTextProvider

nsITooltipTextProvider nsTooltipTextProvider = { &nsTooltipTextProviderVtbl }
static

Definition at line 293 of file nsservice.c.

◆ nsTooltipTextProviderVtbl

const nsITooltipTextProviderVtbl nsTooltipTextProviderVtbl
static
Initial value:
= {
}
static nsrefcnt NSAPI nsTooltipTextProvider_AddRef(nsITooltipTextProvider *iface)
Definition: nsservice.c:219
static nsresult NSAPI nsTooltipTextProvider_QueryInterface(nsITooltipTextProvider *iface, nsIIDRef riid, void **result)
Definition: nsservice.c:197
static nsrefcnt NSAPI nsTooltipTextProvider_Release(nsITooltipTextProvider *iface)
Definition: nsservice.c:224
static nsresult NSAPI nsTooltipTextProvider_GetNodeText(nsITooltipTextProvider *iface, nsIDOMNode *aNode, PRUnichar **aText, cpp_bool *_retval)
Definition: nsservice.c:229

Definition at line 286 of file nsservice.c.

◆ PromptServiceVtbl

const nsIPromptServiceVtbl PromptServiceVtbl
static
Initial value:
= {
}
static nsresult NSAPI nsPromptService_QueryInterface(nsIPromptService *iface, nsIIDRef riid, void **result)
Definition: nsservice.c:31
static nsresult NSAPI nsPromptService_Confirm(nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, cpp_bool *_retval)
Definition: nsservice.c:91
static nsrefcnt NSAPI nsPromptService_Release(nsIPromptService *iface)
Definition: nsservice.c:56
static nsrefcnt NSAPI nsPromptService_AddRef(nsIPromptService *iface)
Definition: nsservice.c:51
static nsresult NSAPI nsPromptService_ConfirmEx(nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, UINT32 aButtonFlags, const PRUnichar *aButton0Title, const PRUnichar *aButton1Title, const PRUnichar *aButton2Title, const PRUnichar *aCheckMsg, cpp_bool *aCheckState, LONG *_retval)
Definition: nsservice.c:109
static nsresult NSAPI nsPromptService_PromptUsernameAndPassword(nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aUsername, PRUnichar **aPassword, const PRUnichar *aCheckMsg, cpp_bool *aCheckState, cpp_bool *_retval)
Definition: nsservice.c:149
static nsresult NSAPI nsPromptService_AlertCheck(nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, cpp_bool *aCheckState)
Definition: nsservice.c:82
static nsresult NSAPI nsPromptService_Prompt(nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aValue, const PRUnichar *aCheckMsg, cpp_bool *aCheckState, cpp_bool *_retval)
Definition: nsservice.c:139
static nsresult NSAPI nsPromptService_PromptPassword(nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, PRUnichar **aPassword, const PRUnichar *aCheckMsg, cpp_bool *aCheckState, cpp_bool *_retval)
Definition: nsservice.c:160
static nsresult NSAPI nsPromptService_ConfirmCheck(nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, const PRUnichar *aCheckMsg, cpp_bool *aCheckState, cpp_bool *_retval)
Definition: nsservice.c:99
static nsresult NSAPI nsPromptService_Alert(nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText)
Definition: nsservice.c:61
static nsresult NSAPI nsPromptService_Select(nsIPromptService *iface, nsIDOMWindow *aParent, const PRUnichar *aDialogTitle, const PRUnichar *aText, UINT32 aCount, const PRUnichar **aSelectList, LONG *aOutSelection, cpp_bool *_retval)
Definition: nsservice.c:170

Definition at line 180 of file nsservice.c.