From c7a9d4a6bd53ed7d61731770f2f10e8b9fd435f9 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 12 Feb 2026 22:33:32 -0800 Subject: Initial commit --- NET/worlds/console/IEWebControlImp.java | 130 ++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 NET/worlds/console/IEWebControlImp.java (limited to 'NET/worlds/console/IEWebControlImp.java') diff --git a/NET/worlds/console/IEWebControlImp.java b/NET/worlds/console/IEWebControlImp.java new file mode 100644 index 0000000..e06310a --- /dev/null +++ b/NET/worlds/console/IEWebControlImp.java @@ -0,0 +1,130 @@ +package NET.worlds.console; + +class IEWebControlImp extends WebControlImp { + private int nativeIEInstance; + private int m_hwnd; + private boolean detached; + + private native boolean nativeInit(int var1, boolean var2); + + private native void nativeDestroy(); + + private native void nativeSetURL(String var1, String var2); + + private native void nativeGoBack(); + + private native void nativeGoForward(); + + private native void nativeStop(); + + private native void nativeRefresh(); + + private native void nativeHome(); + + private native void nativePrint(int var1, int var2); + + private native void nativeResize(int var1, int var2, int var3, int var4); + + private native void nativeAddToolbar(); + + private native int nativeGetHWND(); + + public IEWebControlImp(int hwnd, boolean toolbar, boolean isBanner) throws NoWebControlException { + super(hwnd); + this.m_hwnd = hwnd; + this.nativeIEInstance = 0; + this.detached = false; + if (!this.nativeInit(hwnd, isBanner)) { + this.detached = true; + throw new NoWebControlException("Could not initialize IE control"); + } else { + if (toolbar) { + this.nativeAddToolbar(); + } + } + } + + @Override + public void finalize() { + this.detach(); + } + + @Override + public void renderTo(int dc) { + this.nativePrint(dc, this.m_hwnd); + } + + @Override + public boolean setURL(String pURL) { + pURL = processURL(pURL); + if (pURL == null) { + return false; + } else { + this.nativeSetURL(pURL, null); + return true; + } + } + + @Override + public boolean setURL(String pURL, String pPostData) { + pURL = processURL(pURL); + if (pURL == null) { + return false; + } else { + if (pPostData != null) { + pPostData = processURL(pPostData); + if (pPostData == null) { + return false; + } + } + + this.nativeSetURL(pURL, pPostData); + return true; + } + } + + @Override + public void detach() { + if (!this.detached) { + this.nativeDestroy(); + super.detach(); + this.nativeIEInstance = 0; + this.detached = true; + } + } + + @Override + public void resize(int w, int h, int xPer, int yPer) { + this.nativeResize(w, h, xPer, yPer); + } + + @Override + public void goBack() { + this.nativeGoBack(); + } + + @Override + public void goForward() { + this.nativeGoForward(); + } + + @Override + public void stop() { + this.nativeStop(); + } + + @Override + public void refresh() { + this.nativeRefresh(); + } + + @Override + public void home() { + this.nativeHome(); + } + + @Override + public int getHWND() { + return this.nativeGetHWND(); + } +} -- cgit v1.2.3