Author: zbowling
Date: 2006-05-18 18:43:05 -0400 (Thu, 18 May 2006)
New Revision: 60846
Added:
trunk/mozembed/tests/browser/
trunk/mozembed/tests/browser/AssemblyInfo.cs
trunk/mozembed/tests/browser/Main.cs
trunk/mozembed/tests/browser/WebBrowser.cs
trunk/mozembed/tests/browser/browser.mdp
trunk/mozembed/tests/test.cpp
Log:
testing stuff
Added: trunk/mozembed/tests/browser/AssemblyInfo.cs
===================================================================
--- trunk/mozembed/tests/browser/AssemblyInfo.cs 2006-05-18 22:39:50 UTC
(rev 60845)
+++ trunk/mozembed/tests/browser/AssemblyInfo.cs 2006-05-18 22:43:05 UTC
(rev 60846)
@@ -0,0 +1,32 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following
+// attributes.
+//
+// change them to the information which is associated with the assembly
+// you compile.
+
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has following format :
+//
+// Major.Minor.Build.Revision
+//
+// You can specify all values by your own or you can build default build and
revision
+// numbers with the '*' character (the default):
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes specify the key for the sign of your assembly. See
the
+// .NET Framework documentation for more information about signing.
+// This is not required, if you don't want signing let these attributes like
they're.
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
Added: trunk/mozembed/tests/browser/Main.cs
===================================================================
--- trunk/mozembed/tests/browser/Main.cs 2006-05-18 22:39:50 UTC (rev
60845)
+++ trunk/mozembed/tests/browser/Main.cs 2006-05-18 22:43:05 UTC (rev
60846)
@@ -0,0 +1,26 @@
+// project created on 5/15/2006 at 9:39 AM
+using System;
+using System.Threading;
+using System.Windows.Forms;
+using Mono.Mozilla;
+
+namespace browser
+{
+ class MainClass : Form
+ {
+ private WebBrowser wb;
+ public MainClass()
+ {
+ wb = new WebBrowser();
+ wb.Show();
+ this.Controls.Add(wb);
+ }
+
+ [STAThread]
+ public static void Main(string[] args)
+ {
+ MainClass c = new MainClass();
+ Application.Run(c);
+ }
+ }
+}
\ No newline at end of file
Added: trunk/mozembed/tests/browser/WebBrowser.cs
===================================================================
--- trunk/mozembed/tests/browser/WebBrowser.cs 2006-05-18 22:39:50 UTC (rev
60845)
+++ trunk/mozembed/tests/browser/WebBrowser.cs 2006-05-18 22:43:05 UTC (rev
60846)
@@ -0,0 +1,278 @@
+
+using System;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+
+namespace Mono.Mozilla
+{
+ public class WebBrowser: Control, IWebBrowser, IDisposable
+ {
+ //Got to keep an eye on this
+ private CallbackBinder callback;
+ private IntPtr nptr;
+ public WebBrowser()
+ {
+ callback = CallbackBinder.WrapIWebBrowser(this);
+ nptr = MozillaInvoke.mozembed_create(this.callback);
+ }
+#region callbacks
+
+
+ protected override void OnHandleCreated(EventArgs e)
+ {
+ MozillaInvoke.mozembed_init(nptr, this.Handle);
+ base.OnHandleCreated(e);
+ }
+
+ SizeInfo IWebBrowser.GetControlSize()
+ {
+#if _DEBUG_
+ Console.WriteLine("GetControlSize Signal");
+#endif
+ SizeInfo sz;
+ sz.width = (uint)this.Width;
+ sz.height = (uint)this.Height;
+ return sz;
+ }
+
+ void IWebBrowser.OnJSStatus()
+ {
+#if _DEBUG_
+ Console.WriteLine("JSStatus Signal");
+#endif
+ }
+
+ void IWebBrowser.OnLinkStatus()
+ {
+#if _DEBUG_
+ Console.WriteLine("JSStatus Signal");
+#endif
+ }
+
+ void IWebBrowser.OnDestoryBrowser()
+ {
+#if _DEBUG_
+ Console.WriteLine("OnDestoryBrowser Signal");
+#endif
+ }
+
+ void IWebBrowser.OnClientSizeTo(Int32 width, Int32 height)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientSizeTo Signal - Width: {0}, Height: {1}",
width, height);
+#endif
+ }
+
+ void IWebBrowser.OnFocusNext()
+ {
+#if _DEBUG_
+ Console.WriteLine("OnFocusNext Signal");
+#endif
+ }
+
+ void IWebBrowser.OnFocusPrev()
+ {
+#if _DEBUG_
+ Console.WriteLine("OnFocusPrev Signal");
+#endif
+ }
+
+ void IWebBrowser.OnTitleChanged()
+ {
+#if _DEBUG_
+ Console.WriteLine("OnTitleChanged Signal");
+#endif
+ }
+
+ void IWebBrowser.OnShowTooltipWindow(Int32 x, Int32 y, string
tiptext)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnShowTooltipWindow Signal - x: {0}, y: {1},
text: {2}", x, y,tiptext);
+#endif
+ }
+
+ void IWebBrowser.OnHideTooltipWindow()
+ {
+#if _DEBUG_
+ Console.WriteLine("OnHideTooltipWindow Signal");
+#endif
+ }
+
+ void IWebBrowser.OnStateNetStart()
+ {
+#if _DEBUG_
+ Console.WriteLine("OnStateNetStart Signal");
+#endif
+ }
+
+ void IWebBrowser.OnStateNetStop()
+ {
+#if _DEBUG_
+ Console.WriteLine("OnStateNetStop Signal");
+#endif
+ }
+
+ void IWebBrowser.OnStateSpecial(UInt32 stateFlags, Int32 status)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnStateSpecial Signal - stateFlags: {0}, status:
{1}", stateFlags, status);
+#endif
+ }
+
+ void IWebBrowser.OnStateChange(string URI, UInt32 stateFlags,
Int32 status)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnStateChange Signal - URI: {0}, stateFlags: {1},
status: {2}", URI, stateFlags, status);
+#endif
+ }
+
+ void IWebBrowser.OnProgress(Int32 currentTotalProgress, Int32
maxTotalProgress)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnProgress Signal - TotalProgress: {0},
maxTotalProgress: {1}", currentTotalProgress, maxTotalProgress);
+#endif
+ }
+
+ void IWebBrowser.OnProgressAll(string URI, Int32
currentTotalProgress, Int32 maxTotalProgress)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnProgressAll Signal - URI: {0}, TotalProgress:
{1}, maxTotalProgress: {2}", URI, currentTotalProgress, maxTotalProgress);
+#endif
+ }
+
+ void IWebBrowser.OnLocationChanged()
+ {
+#if _DEBUG_
+ Console.WriteLine("OnLocationChanged Signal");
+#endif
+ }
+
+ void IWebBrowser.OnStatusChange(Int32 status, string message)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnStatusChange Signal - status: {0}, message:
{1}", status, message);
+#endif
+ }
+
+ void IWebBrowser.OnSecurityChange(UInt32 state)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnSecurityChange Signal - state: {0}", state);
+#endif
+ }
+
+ void IWebBrowser.OnVisibility(bool val)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnVisibility Signal - val: {0}", val);
+#endif
+ }
+
+ //Don't have to worry about marshelling bool, PRBool seems very
constant and uses 4 bit int underneath
+ bool IWebBrowser.OnClientDomKeyDown (ModifierKeys modKey,
KeyInfo keyInfo)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientDomKeyDown Signal");
+ return false;
+#endif
+ }
+
+ bool IWebBrowser.OnClientDomKeyUp (ModifierKeys modKey, KeyInfo
keyInfo)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientDomKeyUp Signal");
+ return false;
+#endif
+ }
+
+ bool IWebBrowser.OnClientDomKeyPress (ModifierKeys modKey,
KeyInfo keyInfo)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientDomKeyPress Signal");
+ return false;
+#endif
+ }
+
+ bool IWebBrowser.OnClientMouseDown (ModifierKeys aModKey,
MouseInfo aMouseInfo)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientMouseDown Signal");
+ return false;
+#endif
+ }
+
+ bool IWebBrowser.OnClientMouseUp (ModifierKeys aModKey,
MouseInfo aMouseInfo)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientMouseUp Signal");
+ return false;
+#endif
+ }
+
+ bool IWebBrowser.OnClientMouseClick (ModifierKeys aModKey,
MouseInfo aMouseInfo)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientMouseClick Signal");
+ return false;
+#endif
+ }
+
+ bool IWebBrowser.OnClientMouseDoubleClick (ModifierKeys aModKey,
MouseInfo aMouseInfo)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientMouseDoubleClick Signal");
+ return false;
+#endif
+ }
+
+ bool IWebBrowser.OnClientMouseOver (ModifierKeys aModKey,
MouseInfo aMouseInfo)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientMouseOver Signal");
+ return false;
+#endif
+ }
+
+ bool IWebBrowser.OnClientMouseOut (ModifierKeys aModKey, MouseInfo
aMouseInfo)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientMouseOut Signal");
+ return false;
+#endif
+ }
+
+ bool IWebBrowser.OnClientActivate (Int32 detail)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientActivate Signal - detail: {0}", detail);
+ return false;
+#endif
+ }
+
+ // TODO: These two may not fire correctly in Firefox 1.0.x
+ bool IWebBrowser.OnClientFocusIn (Int32 detail)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientFocusIn Signal - detail: {0}", detail);
+ return false;
+#endif
+ }
+
+ bool IWebBrowser.OnClientFocusOut (Int32 detail)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnClientFocusOut Signal - detail: {0}", detail);
+ return false;
+#endif
+ }
+
+ bool IWebBrowser.OnBeforeURIOpen (string URL)
+ {
+#if _DEBUG_
+ Console.WriteLine("OnBeforeURIOpen Signal - URL: {0}", URL);
+ return false;
+#endif
+ }
+#endregion
+ }
+}
Added: trunk/mozembed/tests/browser/browser.mdp
===================================================================
--- trunk/mozembed/tests/browser/browser.mdp 2006-05-18 22:39:50 UTC (rev
60845)
+++ trunk/mozembed/tests/browser/browser.mdp 2006-05-18 22:43:05 UTC (rev
60846)
@@ -0,0 +1,29 @@
+<Project name="browser" fileversion="2.0" language="C#" clr-version="Net_1_1"
ctype="DotNetProject">
+ <Configurations active="Debug">
+ <Configuration name="Debug" ctype="DotNetProjectConfiguration">
+ <Output directory="./bin/Debug" assembly="browser" />
+ <Build debugmode="True" target="Exe" />
+ <Execution runwithwarnings="True" consolepause="True" runtime="MsNet"
clr-version="Net_1_1" />
+ <CodeGeneration compiler="Csc" warninglevel="4" optimize="True"
unsafecodeallowed="False" generateoverflowchecks="True" mainclass=""
definesymbols="_DEBUG_" generatexmldocumentation="False"
ctype="CSharpCompilerParameters" />
+ </Configuration>
+ <Configuration name="Release" ctype="DotNetProjectConfiguration">
+ <Output directory="./bin/Release" assembly="browser" />
+ <Build debugmode="False" target="Exe" />
+ <Execution runwithwarnings="True" consolepause="True" runtime="MsNet"
clr-version="Net_1_1" />
+ <CodeGeneration compiler="Csc" warninglevel="4" optimize="True"
unsafecodeallowed="False" generateoverflowchecks="True"
generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
+ </Configuration>
+ </Configurations>
+ <DeploymentInformation strategy="File">
+ <excludeFiles />
+ </DeploymentInformation>
+ <Contents>
+ <File name="./Main.cs" subtype="Code" buildaction="Compile" />
+ <File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
+ <File name="./WebBrowser.cs" subtype="Code" buildaction="Compile" />
+ </Contents>
+ <References>
+ <ProjectReference type="Gac" localcopy="True" refto="System,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Gac" localcopy="True" refto="System.Windows.Forms,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+ <ProjectReference type="Project" localcopy="True" refto="mozilla" />
+ </References>
+</Project>
\ No newline at end of file
Added: trunk/mozembed/tests/test.cpp
===================================================================
--- trunk/mozembed/tests/test.cpp 2006-05-18 22:39:50 UTC (rev 60845)
+++ trunk/mozembed/tests/test.cpp 2006-05-18 22:43:05 UTC (rev 60846)
@@ -0,0 +1,16 @@
+/***************************************************************************
+ * test.cpp
+ *
+ * Mon May 15 11:26:07 2006
+ * Copyright 2006 User
+ * Email
+ ****************************************************************************/
+
+#include "mozembed.h"
+
+int main(const char** args, int len)
+{
+ CallbackBin bin;
+ Handle *ptr = mozembed_create(&bin);
+ return 0;
+};
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches