From 2022177e42224f24d1350d7bdebe4d6badc3d821 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 21 May 2007 20:50:53 +0000 Subject: Expose some more properties --- (limited to 'src') diff --git a/src/hulahop-web-view.cpp b/src/hulahop-web-view.cpp index 1ee6da4..3fcc3a7 100644 --- a/src/hulahop-web-view.cpp +++ b/src/hulahop-web-view.cpp @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include #include @@ -252,3 +254,15 @@ hulahop_web_view_get_window_root(HulahopWebView *web_view) return PyObject_FromNSInterface(eventTarget, NS_GET_IID(nsIDOMEventTarget)); } + +PyObject * +hulahop_web_view_get_doc_shell(HulahopWebView *web_view) +{ + nsresult rv; + + nsCOMPtr docShell(do_GetInterface(web_view->browser, &rv)); + NS_ENSURE_SUCCESS (rv, NULL); + + return PyObject_FromNSInterface(docShell, + NS_GET_IID(nsIDocShell)); +} diff --git a/src/hulahop-web-view.h b/src/hulahop-web-view.h index e47431b..84db17b 100644 --- a/src/hulahop-web-view.h +++ b/src/hulahop-web-view.h @@ -38,6 +38,7 @@ typedef struct _HulahopWebViewClass HulahopWebViewClass; GType hulahop_web_view_get_type (void); PyObject *hulahop_web_view_get_browser (HulahopWebView *web_view); PyObject *hulahop_web_view_get_window_root (HulahopWebView *web_view); +PyObject *hulahop_web_view_get_doc_shell (HulahopWebView *web_view); G_END_DECLS -- cgit v0.9.1