Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-06-21 18:25:41 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-06-21 18:25:41 (GMT)
commit67d5a1dc989473f99b43e968ddec270803d978dc (patch)
tree31ea3baca50862e5156b7609c94548c4a44662a9 /src
parentf91a1b5b943b93074c86ac468131607ec01b1f20 (diff)
Finally put modal dialogs to work.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/hulahop-web-view.cpp19
-rw-r--r--src/hulahop-web-view.h3
3 files changed, 24 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 5afe7b3..15e63e7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,6 +4,7 @@ INCLUDES = \
$(MOZILLA_CFLAGS) \
-I$(MOZILLA_INCLUDE_ROOT)/docshell \
-I$(MOZILLA_INCLUDE_ROOT)/dom \
+ -I$(MOZILLA_INCLUDE_ROOT)/js \
-I$(MOZILLA_INCLUDE_ROOT)/xulapp \
-I$(MOZILLA_INCLUDE_ROOT)/nspr \
-I$(MOZILLA_INCLUDE_ROOT)/pyxpcom \
@@ -11,6 +12,7 @@ INCLUDES = \
-I$(MOZILLA_INCLUDE_ROOT)/webbrwsr \
-I$(MOZILLA_INCLUDE_ROOT)/widget \
-I$(MOZILLA_INCLUDE_ROOT)/xpcom \
+ -I$(MOZILLA_INCLUDE_ROOT)/xpconnect \
-DMOZILLA_HOME=\"$(MOZILLA_HOME)\" \
-DPLUGIN_PATH=\"$(libdir)/mozilla/plugins\" \
-DDATA_DIR=\"$(pkgdatadir)\"
diff --git a/src/hulahop-web-view.cpp b/src/hulahop-web-view.cpp
index 2eeebc6..286f3cf 100644
--- a/src/hulahop-web-view.cpp
+++ b/src/hulahop-web-view.cpp
@@ -28,6 +28,8 @@
#include <nsIDOMEventTarget.h>
#include <nsIBaseWindow.h>
#include <nsIInterfaceRequestorUtils.h>
+#include <jscntxt.h>
+#include <nsIJSContextStack.h>
#include <PyXPCOM.h>
#include <gtk/gtkfixed.h>
@@ -294,3 +296,20 @@ hulahop_web_view_grab_focus(HulahopWebView *web_view)
gtk_widget_grab_focus(web_view->mozilla_widget);
}
}
+
+void
+hulahop_web_view_push_js_context (HulahopWebView *web_view)
+{
+ nsCOMPtr<nsIJSContextStack> stack(do_GetService("@mozilla.org/js/xpc/ContextStack;1"));
+ nsresult rv = stack->Push(nsnull);
+ g_assert(NS_SUCCEEDED(rv));
+}
+
+void
+hulahop_web_view_pop_js_context (HulahopWebView *web_view)
+{
+ nsCOMPtr<nsIJSContextStack> stack(do_GetService("@mozilla.org/js/xpc/ContextStack;1"));
+ nsresult rv = stack->Pop(nsnull);
+ g_assert(NS_SUCCEEDED(rv));
+}
+
diff --git a/src/hulahop-web-view.h b/src/hulahop-web-view.h
index 7f56a63..40ea6e8 100644
--- a/src/hulahop-web-view.h
+++ b/src/hulahop-web-view.h
@@ -42,6 +42,9 @@ void hulahop_web_view_create_window (HulahopWebView *web_view);
PyObject *hulahop_web_view_get_browser (HulahopWebView *web_view);
PyObject *hulahop_web_view_get_window_root (HulahopWebView *web_view);
+void hulahop_web_view_push_js_context (HulahopWebView *web_view);
+void hulahop_web_view_pop_js_context (HulahopWebView *web_view);
+
G_END_DECLS
#endif