Make Gecko objects hold on to the System.Windows.Form that they're drawing in to hide HWND extraction code from embedders. Rely more on exceptions for error propagation. Not part of the build.

git-svn-id: svn://10.0.0.236/trunk@142812 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%netscape.com
2003-05-23 10:13:09 +00:00
parent a2edefd4d6
commit 65b0893deb
3 changed files with 59 additions and 53 deletions

View File

@@ -39,7 +39,12 @@
#include "nsString.h"
#using <mscorlib.dll>
#using <System.Windows.Forms.dll>
#using <System.dll>
using namespace System;
using namespace System::Windows::Forms;
namespace Mozilla
{
@@ -47,12 +52,18 @@ namespace Mozilla
{
public __gc class Gecko
{
public:
static bool InitEmbedding();
static bool TermEmbedding();
public:
Gecko(Form *Form);
bool OpenURL(IntPtr hWnd, String *url);
bool Resize(IntPtr hWnd);
static void TermEmbedding();
void OpenURL(String *url);
void Resize();
private:
Form *mForm;
static bool sIsInitialized = false;
}; // class Gecko
// Throw an exception if NS_FAILED(rv)