Author: mhutch
Date: 2007-05-13 11:06:18 -0400 (Sun, 13 May 2007)
New Revision: 77317
Added:
trunk/monodevelop/Extras/AspNetEdit/libs/
trunk/monodevelop/Extras/AspNetEdit/libs/JSCall.js
trunk/monodevelop/Extras/AspNetEdit/libs/jscall.dll
Modified:
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.UI/RootDesignerView.cs
trunk/monodevelop/Extras/AspNetEdit/ChangeLog
trunk/monodevelop/Extras/AspNetEdit/Makefile.am
trunk/monodevelop/Extras/AspNetEdit/chrome/Makefile.am
trunk/monodevelop/Extras/AspNetEdit/chrome/content/aspdesigner/editor.js
Log:
2007-05-13 Michael Hutchinson <[EMAIL PROTECTED]>
* libs/jscall.dll, libs/JSCall.js: Having removed the unmanaged
dependencies from JSCall#, we can now bundle it. Yay!
* chrome/content/aspdesigner/editor.js,
AspNetEdit.Editor.UI/RootDesignerView.cs: Track JSCall# API changes.
* Makefile.am: Add libs/jscall.dll to build.
* chrome/Makefile.am: Take account of new JSCALL_SCRIPT location.
Modified:
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.UI/RootDesignerView.cs
===================================================================
---
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.UI/RootDesignerView.cs
2007-05-13 14:56:50 UTC (rev 77316)
+++
trunk/monodevelop/Extras/AspNetEdit/AspNetEdit.Editor.UI/RootDesignerView.cs
2007-05-13 15:06:18 UTC (rev 77317)
@@ -436,7 +436,7 @@
/// string content: The HTML content of the control
/// Returns: none
///</summary>
- public static readonly string AddControl = "AddControl";
+ public static readonly string AddControl =
"JSCall_AddControl";
///<summary>
/// Updates the design-time HTML of a control to the
document
@@ -445,7 +445,7 @@
/// string content: The HTML content of the control
/// Returns: none
///</summary>
- public static readonly string UpdateControl =
"UpdateControl";
+ public static readonly string UpdateControl =
"JSCall_UpdateControl";
///<summary>
/// Removes a control from the document
@@ -453,7 +453,7 @@
/// string id: the unique ID of the
control.
/// Returns: none
///</summary>
- public static readonly string RemoveControl =
"RemoveControl";
+ public static readonly string RemoveControl =
"JSCall_RemoveControl";
///<summary>
/// Selects a control
@@ -461,7 +461,7 @@
/// string id: the unique ID of the
control, or empty to clear selection.
/// Returns: none
///</summary>
- public static readonly string SelectControl =
"SelectControl";
+ public static readonly string SelectControl =
"JSCall_SelectControl";
///<summary>
/// Replaces the currently loaded document
@@ -469,14 +469,14 @@
/// string document: the document text, with
placeholder'd controls.
/// Returns: none
///</summary>
- public static readonly string LoadPage = "LoadPage";
+ public static readonly string LoadPage =
"JSCall_LoadPage";
///<summary>
/// Replaces the currently loaded document
/// Args: none
/// Returns: none
///</summary>
- public static readonly string GetPage = "GetPage";
+ public static readonly string GetPage =
"JSCall_GetPage";
///<summary>
/// Passes a simple command to Gecko
@@ -484,7 +484,7 @@
/// string command: Use the enum
EditorCommand
/// Returns: none
///</summary>
- public static readonly string DoCommand = "DoCommand";
+ public static readonly string DoCommand =
"JSCall_DoCommand";
///<summary>
/// Inserts a document fragment. Host should have
deserialised it.
@@ -492,7 +492,7 @@
/// string fragment: The
document fragment
/// Returns: none
///</summary>
- public static readonly string InsertFragment =
"InsertFragment";
+ public static readonly string InsertFragment =
"JSCall_InsertFragment";
}
Modified: trunk/monodevelop/Extras/AspNetEdit/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/ChangeLog 2007-05-13 14:56:50 UTC
(rev 77316)
+++ trunk/monodevelop/Extras/AspNetEdit/ChangeLog 2007-05-13 15:06:18 UTC
(rev 77317)
@@ -1,3 +1,15 @@
+2007-05-13 Michael Hutchinson <[EMAIL PROTECTED]>
+
+ * libs/jscall.dll, libs/JSCall.js: Having removed the unmanaged
+ dependencies from JSCall#, we can now bundle it. Yay!
+
+ * chrome/content/aspdesigner/editor.js,
+ AspNetEdit.Editor.UI/RootDesignerView.cs: Track JSCall# API changes.
+
+ * Makefile.am: Add libs/jscall.dll to build.
+
+ * chrome/Makefile.am: Take account of new JSCALL_SCRIPT location.
+
2007-05-11 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* AspNetEdit.mdp: Copy the .addins.xml file to the output dir.
Modified: trunk/monodevelop/Extras/AspNetEdit/Makefile.am
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/Makefile.am 2007-05-13 14:56:50 UTC
(rev 77316)
+++ trunk/monodevelop/Extras/AspNetEdit/Makefile.am 2007-05-13 15:06:18 UTC
(rev 77317)
@@ -10,7 +10,6 @@
$(GLADE_SHARP_LIBS) \
$(GNOME_SHARP_LIBS) \
$(GTK_SHARP_LIBS) \
- -pkg:jscall-sharp \
-r:$(top_builddir)/build/AddIns/AspNetAddIn/AspNetAddIn.dll \
-r:$(top_builddir)/build/AddIns/MonoDevelop.Components.dll \
-r:$(top_builddir)/build/AddIns/MonoDevelop.Core.Gui.dll \
@@ -20,6 +19,8 @@
-r:$(top_builddir)/build/AddIns/MonoDevelop.Projects.dll \
-r:$(top_builddir)/build/AddIns/MonoDevelop.SourceEditor.dll \
-r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
+ -r:$(top_srcdir)/contrib/Mono.Addins.dll \
+ -r:$(top_srcdir)/build/AddIns/AspNetEdit/jscall.dll \
-r:System \
-r:System.Design \
-r:System.Drawing \
@@ -71,12 +72,17 @@
DATA_FILES = \
data/WebControlsToolbox.xml
+LOCAL_LIBS = \
+ libs/jscall.dll
+
DATA_FILE_BUILD = $(addprefix $(ADDIN_BUILD)/, $(notdir $(DATA_FILES)))
+LOCAL_LIBS_BUILD = $(addprefix $(ADDIN_BUILD)/, $(notdir $(LOCAL_LIBS)))
+
ADDIN = AspNetEdit.addin.xml
if ENABLE_ASPNETEDIT
- all: $(ASSEMBLY) $(ADDIN_BUILD)/$(ADDIN) $(DATA_FILE_BUILD)
+ all: $(ASSEMBLY) $(ADDIN_BUILD)/$(ADDIN) $(DATA_FILE_BUILD)
$(LOCAL_LIBS_BUILD)
else
all:
endif
@@ -85,7 +91,7 @@
mkdir -p $(ADDIN_BUILD)
cp $(srcdir)/$(ADDIN) $(ADDIN_BUILD)/$(ADDIN)
-$(ASSEMBLY): $(build_sources) $(RES)
+$(ASSEMBLY): $(build_sources) $(RES) $(LOCAL_LIBS_BUILD)
mkdir -p $(ADDIN_BUILD)
$(CSC) $(CSC_FLAGS) -debug -d:TRACE -out:$@ -target:library $(REFS) \
$(RES:%=/resource:%) $(build_sources)
@@ -94,14 +100,18 @@
mkdir -p $(ADDIN_BUILD)
cp $(srcdir)/data/$(notdir $@) $(ADDIN_BUILD)/.
+$(LOCAL_LIBS_BUILD): $(srcdir)/libs/$(notdir $@)
+ mkdir -p $(ADDIN_BUILD)
+ cp $(srcdir)/libs/$(notdir $@) $(ADDIN_BUILD)/.
+
if ENABLE_ASPNETEDIT
aspneteditlibdir = $(MD_ADDIN_DIR)/AspNetEdit
- aspneteditlib_DATA = $(ASSEMBLY) $(ADDIN) $(DATA_FILES)
+ aspneteditlib_DATA = $(ASSEMBLY) $(ADDIN) $(DATA_FILES) $(LOCAL_LIBS)
endif
-CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb $(DATA_FILE_BUILD)
+CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb $(DATA_FILE_BUILD) $(LOCAL_LIBS_BUILD)
-EXTRA_DIST = $(FILES) $(ADDIN) $(RES) $(DATA_FILES)
+EXTRA_DIST = $(FILES) $(ADDIN) $(RES) $(DATA_FILES) $(LOCAL_LIBS)
include $(top_srcdir)/Makefile.include
Modified: trunk/monodevelop/Extras/AspNetEdit/chrome/Makefile.am
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/chrome/Makefile.am 2007-05-13
14:56:50 UTC (rev 77316)
+++ trunk/monodevelop/Extras/AspNetEdit/chrome/Makefile.am 2007-05-13
15:06:18 UTC (rev 77317)
@@ -3,8 +3,8 @@
packagedir=$(MD_ADDIN_DIR)/AspNetEdit
chromedir = $(MOZILLA_HOME)/chrome
installed_chrome_txt = $(chromedir)/installed-chrome.txt
+JSCALL_SCRIPT = ../libs/JSCall.js
-
### Build the JAR ###
local_jar_files = \
Modified:
trunk/monodevelop/Extras/AspNetEdit/chrome/content/aspdesigner/editor.js
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/chrome/content/aspdesigner/editor.js
2007-05-13 14:56:50 UTC (rev 77316)
+++ trunk/monodevelop/Extras/AspNetEdit/chrome/content/aspdesigner/editor.js
2007-05-13 15:06:18 UTC (rev 77317)
@@ -51,31 +51,6 @@
initialize: function()
{
- // Register our interface methods with the host
- JSCallInit ();
-
- // Loading/Saving/ControlState
- JSCallRegisterClrHandler ('LoadPage', JSCall_LoadPage);
- JSCallRegisterClrHandler ('GetPage', JSCall_GetPage);
- JSCallRegisterClrHandler ('AddControl', JSCall_AddControl);
- JSCallRegisterClrHandler ('RemoveControl',
JSCall_RemoveControl);
- JSCallRegisterClrHandler ('UpdateControl',
JSCall_UpdateControl);
- JSCallRegisterClrHandler ('RenameControl',
JSCall_RenameControl);
- // Control selection
- JSCallRegisterClrHandler ('SelectControl',
JSCall_SelectControl);
- // HTML editing
- JSCallRegisterClrHandler ('DoCommand',
- JSCall_DoCommand);
- JSCallRegisterClrHandler ('IsCommandEnabled',
- JSCall_IsCommandEnabled);
- JSCallRegisterClrHandler ('InsertFragment',
- JSCall_InsertFragment);
- // Misc
- JSCallRegisterClrHandler ('SerializeReturn',
- JSCall_SerializeReturn);
- JSCallRegisterClrHandler ('DeserializeAndAddReturn',
- JSCall_DeserializeAndAddReturn);
-
//tell the host we're ready for business
JSCallPlaceClrCall ('Activate', '', '');
},
@@ -174,62 +149,53 @@
* surrogate functions instead
*/
-function JSCall_SelectControl (arg) {
- aControlId = arg [0];
- aAdd = true;
+function JSCall_SelectControl (aControlId) {
aAdd = true;
aPrimary = true;
return editor.selectControl (aControlId, aAdd, aPrimary);
}
-function JSCall_UpdateControl (arg) {
- aControlId = arg [0];
- aNewDesignTimeHtml = arg [1];
+function JSCall_UpdateControl (aControlId, aNewDesignTimeHtml) {
return editor.updateControl (aControlId, aNewDesignTimeHtml);
}
-function JSCall_RemoveControl (arg) {
- return editor.removeControl (arg [0]);
+function JSCall_RemoveControl (aControlId) {
+ return editor.removeControl (aControlId);
}
-function JSCall_RenameControl (arg) {
- return editor.renameControl (arg [0], arg [1]);
+function JSCall_RenameControl (arg1, arg2) {
+ return editor.renameControl (arg1, arg2);
}
-function JSCall_AddControl (arg) {
- aControlId = arg [0];
- aControlHtml = arg [1];
- return editor.addControl (aControlHtml, aControlId);
+function JSCall_AddControl (aControlId, aControlHtml) {
return editor.addControl (aControlHtml, aControlId);
}
function JSCall_GetPage () {
return editor.getPage ();
}
-function JSCall_LoadPage (arg) {
- return editor.loadPage (arg [0]);
+function JSCall_LoadPage (pageHtml) {
+ return editor.loadPage (pageHtml);
}
-function JSCall_DoCommand (arg) {
- var command = arg [0];
+function JSCall_DoCommand (command) {
editor.doCommand (command);
return "";
}
-function JSCall_IsCommandEnabled (arg) {
- var command = arg [0];
+function JSCall_IsCommandEnabled (command) {
return editor.isCommandEnabled (command);
}
-function JSCall_InsertFragment (arg) {
- return editor.insertFragment (arg [0]);
+function JSCall_InsertFragment (fragment) {
+ return editor.insertFragment (fragment);
}
function JSCall_SerializeReturn (arg) {
- host.serialize (arg [0], true);
+ host.serialize (arg, true);
}
function JSCall_DeserializeAndAddReturn (arg) {
- host.deserializeAndAdd (arg [0], true);
+ host.deserializeAndAdd (arg, true);
}
//* ___________________________________________________________________________
Added: trunk/monodevelop/Extras/AspNetEdit/libs/JSCall.js
===================================================================
--- trunk/monodevelop/Extras/AspNetEdit/libs/JSCall.js 2007-05-13 14:56:50 UTC
(rev 77316)
+++ trunk/monodevelop/Extras/AspNetEdit/libs/JSCall.js 2007-05-13 15:06:18 UTC
(rev 77317)
@@ -0,0 +1,45 @@
+ /*
+ * JSCall.js - The JS side of the JSCall Gecko#/C# glue layer
+ *
+ * Authors:
+ * Michael Hutchinson <[EMAIL PROTECTED]>
+ *
+ * Copyright (C) 2005-2007 Michael Hutchinson
+ *
+ * This sourcecode is licenced under The MIT License:
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to permit
+ * persons to whom the Software is furnished to do so, subject to the
+ * following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+ * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ * USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+function JSCallPlaceClrCall(fn, returnTo, args) {
+ var delimiter = unescape ("%ea");
+
+ var str = "JSCall" + delimiter + fn + delimiter + returnTo + delimiter;
+
+ if (args && args.length > 0)
+ {
+ str += args.join(delimiter);
+ }
+
+ var oldTitle = document.title;
+ document.title = str;
+ document.title = oldTitle;
+}
Added: trunk/monodevelop/Extras/AspNetEdit/libs/jscall.dll
===================================================================
(Binary files differ)
Property changes on: trunk/monodevelop/Extras/AspNetEdit/libs/jscall.dll
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches