PromptService2 () { createCOMInterfaces (); }
int Release () { refCount--; if (refCount == 0) disposeCOMInterfaces (); return refCount; }
int CreateInstance (long /*int*/ aOuter, long /*int*/ iid, long /*int*/ result) { nsID guid = new nsID (); XPCOM.memmove (guid, iid, nsID.sizeof); if (guid.Equals (XPCOM.NS_IPROMPTSERVICE2_IID) || guid.Equals(nsIPromptService.NS_IPROMPTSERVICE_IID)) { PromptService2 promptService = new PromptService2 (); promptService.AddRef (); XPCOM.memmove (result, new long /*int*/[] {promptService.getAddress ()}, C.PTR_SIZEOF); return XPCOM.NS_OK; } if (guid.Equals (XPCOM.NS_IPROMPTFACTORY_IID)) { PromptFactory promptFactory = new PromptFactory(); promptFactory.AddRef (); XPCOM.memmove (result, new long /*int*/[] {promptFactory.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } return XPCOM.NS_ERROR_NOT_IMPLEMENTED; }
int AlertCheck (long /*int*/ aParent, long /*int*/ aDialogTitle, long /*int*/ aText, long /*int*/ aCheckMsg, long /*int*/ aCheckState) { Browser browser = getBrowser (aParent); int length = XPCOM.strlen_PRUnichar (aDialogTitle); char[] dest = new char[length]; XPCOM.memmove (dest, aDialogTitle, length * 2); String titleLabel = new String (dest); length = XPCOM.strlen_PRUnichar (aText); dest = new char[length]; XPCOM.memmove (dest, aText, length * 2); String textLabel = new String (dest); length = XPCOM.strlen_PRUnichar (aCheckMsg); dest = new char[length]; XPCOM.memmove (dest, aCheckMsg, length * 2); String checkLabel = new String (dest); Shell shell = browser == null ? new Shell () : browser.getShell (); PromptDialog dialog = new PromptDialog (shell); boolean[] check = new boolean[1]; if (aCheckState != 0) XPCOM.memmove (check, aCheckState); dialog.alertCheck (titleLabel, textLabel, checkLabel, check); if (aCheckState != 0) XPCOM.memmove (aCheckState, check); return XPCOM.NS_OK; }
int ConfirmEx (int /*long*/ aParent, int /*long*/ aDialogTitle, int /*long*/ aText, int aButtonFlags, int /*long*/ aButton0Title, int /*long*/ aButton1Title, int /*long*/ aButton2Title, int /*long*/ aCheckMsg, int /*long*/ aCheckState, int /*long*/ _retval) { Browser browser = getBrowser (aParent); String button0Label = getLabel (aButtonFlags, nsIPromptService.BUTTON_POS_0, aButton0Title); String button1Label = getLabel (aButtonFlags, nsIPromptService.BUTTON_POS_1, aButton1Title); String button2Label = getLabel (aButtonFlags, nsIPromptService.BUTTON_POS_2, aButton2Title);
int QueryInterface (long /*int*/ riid, long /*int*/ ppvObject) { if (riid == 0 || ppvObject == 0) return XPCOM.NS_ERROR_NO_INTERFACE; nsID guid = new nsID (); XPCOM.memmove (guid, riid, nsID.sizeof); if (guid.Equals (nsISupports.NS_ISUPPORTS_IID)) { XPCOM.memmove (ppvObject, new long /*int*/[] {supports.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } if (guid.Equals (nsIPromptService.NS_IPROMPTSERVICE_IID)) { XPCOM.memmove (ppvObject, new long /*int*/[] {promptService.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } if (guid.Equals (XPCOM.NS_IPROMPTSERVICE2_IID)) { XPCOM.memmove (ppvObject, new long /*int*/[] {promptService2.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } XPCOM.memmove (ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF); return XPCOM.NS_ERROR_NO_INTERFACE; }
int CreateInstance (int /*long*/ aOuter, int /*long*/ iid, int /*long*/ result) { nsID guid = new nsID (); XPCOM.memmove (guid, iid, nsID.sizeof); if (guid.Equals (XPCOM.NS_IPROMPTSERVICE2_IID) || guid.Equals(IIDStore.GetIID (nsIPromptService.class))) { PromptService2 promptService = new PromptService2 (); promptService.AddRef (); XPCOM.memmove (result, new int /*long*/[] {promptService.getAddress ()}, C.PTR_SIZEOF); return XPCOM.NS_OK; } if (guid.Equals (XPCOM.NS_IPROMPTFACTORY_IID)) { PromptFactory promptFactory = new PromptFactory(); promptFactory.AddRef (); XPCOM.memmove (result, new int /*long*/[] {promptFactory.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } return XPCOM.NS_ERROR_NOT_IMPLEMENTED; }
int AlertCheck (long /*int*/ aParent, long /*int*/ aDialogTitle, long /*int*/ aText, long /*int*/ aCheckMsg, long /*int*/ aCheckState) { Browser browser = getBrowser (aParent); int length = XPCOM.strlen_PRUnichar (aDialogTitle); char[] dest = new char[length]; XPCOM.memmove (dest, aDialogTitle, length * 2); String titleLabel = new String (dest); length = XPCOM.strlen_PRUnichar (aText); dest = new char[length]; XPCOM.memmove (dest, aText, length * 2); String textLabel = new String (dest); length = XPCOM.strlen_PRUnichar (aCheckMsg); dest = new char[length]; XPCOM.memmove (dest, aCheckMsg, length * 2); String checkLabel = new String (dest); Shell shell = browser == null ? new Shell () : browser.getShell (); PromptDialog dialog = new PromptDialog (shell); boolean[] check = new boolean[1]; if (aCheckState != 0) XPCOM.memmove (check, aCheckState); dialog.alertCheck (titleLabel, textLabel, checkLabel, check); if (aCheckState != 0) XPCOM.memmove (aCheckState, check); return XPCOM.NS_OK; }
int ConfirmEx (long /*int*/ aParent, long /*int*/ aDialogTitle, long /*int*/ aText, int aButtonFlags, long /*int*/ aButton0Title, long /*int*/ aButton1Title, long /*int*/ aButton2Title, long /*int*/ aCheckMsg, long /*int*/ aCheckState, long /*int*/ _retval) { Browser browser = getBrowser (aParent); String button0Label = getLabel (aButtonFlags, nsIPromptService.BUTTON_POS_0, aButton0Title); String button1Label = getLabel (aButtonFlags, nsIPromptService.BUTTON_POS_1, aButton1Title); String button2Label = getLabel (aButtonFlags, nsIPromptService.BUTTON_POS_2, aButton2Title);
int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) { if (riid == 0 || ppvObject == 0) return XPCOM.NS_ERROR_NO_INTERFACE; nsID guid = new nsID (); XPCOM.memmove (guid, riid, nsID.sizeof); if (guid.Equals (XPCOM.NS_ISUPPORTS_IID)) { XPCOM.memmove (ppvObject, new int /*long*/[] {supports.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } if (guid.Equals (IIDStore.GetIID (nsIPromptService.class))) { XPCOM.memmove (ppvObject, new int /*long*/[] {promptService.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } if (guid.Equals (XPCOM.NS_IPROMPTSERVICE2_IID)) { XPCOM.memmove (ppvObject, new int /*long*/[] {promptService2.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } XPCOM.memmove (ppvObject, new int /*long*/[] {0}, C.PTR_SIZEOF); return XPCOM.NS_ERROR_NO_INTERFACE; }
int CreateInstance (int /*long*/ aOuter, int /*long*/ iid, int /*long*/ result) { nsID guid = new nsID (); XPCOM.memmove (guid, iid, nsID.sizeof); if (guid.Equals (XPCOM.NS_IPROMPTSERVICE2_IID) || guid.Equals(IIDStore.GetIID (nsIPromptService.class))) { PromptService2 promptService = new PromptService2 (); promptService.AddRef (); XPCOM.memmove (result, new int /*long*/[] {promptService.getAddress ()}, C.PTR_SIZEOF); return XPCOM.NS_OK; } if (guid.Equals (XPCOM.NS_IPROMPTFACTORY_IID)) { PromptFactory promptFactory = new PromptFactory(); promptFactory.AddRef (); XPCOM.memmove (result, new int /*long*/[] {promptFactory.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } return XPCOM.NS_ERROR_NOT_IMPLEMENTED; }
int AlertCheck (int /*long*/ aParent, int /*long*/ aDialogTitle, int /*long*/ aText, int /*long*/ aCheckMsg, int /*long*/ aCheckState) { Browser browser = getBrowser (aParent); int length = XPCOM.strlen_PRUnichar (aDialogTitle); char[] dest = new char[length]; XPCOM.memmove (dest, aDialogTitle, length * 2); String titleLabel = new String (dest); length = XPCOM.strlen_PRUnichar (aText); dest = new char[length]; XPCOM.memmove (dest, aText, length * 2); String textLabel = new String (dest); length = XPCOM.strlen_PRUnichar (aCheckMsg); dest = new char[length]; XPCOM.memmove (dest, aCheckMsg, length * 2); String checkLabel = new String (dest); Shell shell = browser == null ? new Shell () : browser.getShell (); PromptDialog dialog = new PromptDialog (shell); boolean[] check = new boolean[1]; if (aCheckState != 0) XPCOM.memmove (check, aCheckState); dialog.alertCheck (titleLabel, textLabel, checkLabel, check); if (aCheckState != 0) XPCOM.memmove (aCheckState, check); return XPCOM.NS_OK; }
int ConfirmEx (int /*long*/ aParent, int /*long*/ aDialogTitle, int /*long*/ aText, int aButtonFlags, int /*long*/ aButton0Title, int /*long*/ aButton1Title, int /*long*/ aButton2Title, int /*long*/ aCheckMsg, int /*long*/ aCheckState, int /*long*/ _retval) { Browser browser = getBrowser (aParent); String button0Label = getLabel (aButtonFlags, nsIPromptService.BUTTON_POS_0, aButton0Title); String button1Label = getLabel (aButtonFlags, nsIPromptService.BUTTON_POS_1, aButton1Title); String button2Label = getLabel (aButtonFlags, nsIPromptService.BUTTON_POS_2, aButton2Title);
int Release () { refCount--; if (refCount == 0) disposeCOMInterfaces (); return refCount; }
PromptService2 () { createCOMInterfaces (); }
int QueryInterface (int /*long*/ riid, int /*long*/ ppvObject) { if (riid == 0 || ppvObject == 0) return XPCOM.NS_ERROR_NO_INTERFACE; nsID guid = new nsID (); XPCOM.memmove (guid, riid, nsID.sizeof); if (guid.Equals (XPCOM.NS_ISUPPORTS_IID)) { XPCOM.memmove (ppvObject, new int /*long*/[] {supports.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } if (guid.Equals (IIDStore.GetIID (nsIPromptService.class))) { XPCOM.memmove (ppvObject, new int /*long*/[] {promptService.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } if (guid.Equals (XPCOM.NS_IPROMPTSERVICE2_IID)) { XPCOM.memmove (ppvObject, new int /*long*/[] {promptService2.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } XPCOM.memmove (ppvObject, new int /*long*/[] {0}, C.PTR_SIZEOF); return XPCOM.NS_ERROR_NO_INTERFACE; }
int CreateInstance (int /*long*/ aOuter, int /*long*/ iid, int /*long*/ result) { nsID guid = new nsID (); XPCOM.memmove (guid, iid, nsID.sizeof); if (guid.Equals (XPCOM.NS_IPROMPTSERVICE2_IID) || guid.Equals(IIDStore.GetIID (nsIPromptService.class))) { PromptService2 promptService = new PromptService2 (); promptService.AddRef (); XPCOM.memmove (result, new int /*long*/[] {promptService.getAddress ()}, C.PTR_SIZEOF); return XPCOM.NS_OK; } if (guid.Equals (XPCOM.NS_IPROMPTFACTORY_IID)) { PromptFactory promptFactory = new PromptFactory(); promptFactory.AddRef (); XPCOM.memmove (result, new int /*long*/[] {promptFactory.getAddress ()}, C.PTR_SIZEOF); AddRef (); return XPCOM.NS_OK; } return XPCOM.NS_ERROR_NOT_IMPLEMENTED; }
int AlertCheck (int /*long*/ aParent, int /*long*/ aDialogTitle, int /*long*/ aText, int /*long*/ aCheckMsg, int /*long*/ aCheckState) { Browser browser = getBrowser (aParent); int length = XPCOM.strlen_PRUnichar (aDialogTitle); char[] dest = new char[length]; XPCOM.memmove (dest, aDialogTitle, length * 2); String titleLabel = new String (dest); length = XPCOM.strlen_PRUnichar (aText); dest = new char[length]; XPCOM.memmove (dest, aText, length * 2); String textLabel = new String (dest); length = XPCOM.strlen_PRUnichar (aCheckMsg); dest = new char[length]; XPCOM.memmove (dest, aCheckMsg, length * 2); String checkLabel = new String (dest); Shell shell = browser == null ? new Shell () : browser.getShell (); PromptDialog dialog = new PromptDialog (shell); boolean[] check = new boolean[1]; if (aCheckState != 0) XPCOM.memmove (check, aCheckState); dialog.alertCheck (titleLabel, textLabel, checkLabel, check); if (aCheckState != 0) XPCOM.memmove (aCheckState, check); return XPCOM.NS_OK; }
int ConfirmEx (int /*long*/ aParent, int /*long*/ aDialogTitle, int /*long*/ aText, int aButtonFlags, int /*long*/ aButton0Title, int /*long*/ aButton1Title, int /*long*/ aButton2Title, int /*long*/ aCheckMsg, int /*long*/ aCheckState, int /*long*/ _retval) { Browser browser = getBrowser (aParent); String button0Label = getLabel (aButtonFlags, nsIPromptService.BUTTON_POS_0, aButton0Title); String button1Label = getLabel (aButtonFlags, nsIPromptService.BUTTON_POS_1, aButton1Title); String button2Label = getLabel (aButtonFlags, nsIPromptService.BUTTON_POS_2, aButton2Title);
int Release () { refCount--; if (refCount == 0) disposeCOMInterfaces (); return refCount; }