Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-05-21 12:41:16 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-05-21 12:41:16 (GMT)
commite4a8e189e7cf25236ffebc72ac8d7bed6893b70d (patch)
treee2bef921f0fb1161e1cc89b6df6312a6c1ae3c5f /src
parentd8d3d5a63b7934f0740cdebb5f3b1d8fc99ed16b (diff)
Split the python bindings to their own directory
Diffstat (limited to 'src')
-rw-r--r--src/.gitignore3
-rw-r--r--src/Makefile.am36
-rw-r--r--src/__init__.py27
-rw-r--r--src/hulahop.defs44
-rw-r--r--src/hulahop.override31
-rw-r--r--src/hulahopmodule.c26
-rw-r--r--src/webview.py43
7 files changed, 3 insertions, 207 deletions
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index 89f50e0..0000000
--- a/src/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.deps
-.libs
-hulahop.c
diff --git a/src/Makefile.am b/src/Makefile.am
index efe531b..f023591 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,12 +1,6 @@
-sugardir = $(pythondir)/hulahop
-sugar_PYTHON = \
- __init__.py \
- webview.py
-
INCLUDES = \
$(DEPS_CFLAGS) \
$(PYTHON_INCLUDES) \
- $(PYGTK_CFLAGS) \
$(MOZILLA_CFLAGS) \
-I$(MOZILLA_INCLUDE_ROOT)/docshell \
-I$(MOZILLA_INCLUDE_ROOT)/dom \
@@ -19,34 +13,10 @@ INCLUDES = \
-I$(MOZILLA_INCLUDE_ROOT)/xpcom \
-DMOZILLA_HOME=\"$(MOZILLA_HOME)\"
-pkgpyexec_LTLIBRARIES = _hulahop.la
-
-_hulahop_la_LDFLAGS = -module -avoid-version -R$(MOZILLA_HOME) -dlopen self
-_hulahop_la_LIBADD = \
- $(GECKO_LIBS) \
- $(DEPS_LIBS) \
- $(MOZILLA_EXTRA_LIBS) \
- $(MOZILLA_GLUE_LIBS)
+noinst_LTLIBRARIES = libhulahop.la
-_hulahop_la_SOURCES = \
+libhulahop_la_SOURCES = \
HulahopDirectoryProvider.cpp \
HulahopDirectoryProvider.h \
hulahop-web-view.cpp \
- hulahop-web-view.h \
- hulahop.c \
- hulahopmodule.c
-
-hulahop.c: hulahop.defs hulahop.override
-
-CLEANFILES = hulahop.c
-EXTRA_DIST = hulahop.override hulahop.defs
-
-.defs.c:
- (cd $(srcdir)\
- && $(PYGTK_CODEGEN) \
- --register $(PYGTK_DEFSDIR)/gdk-types.defs \
- --register $(PYGTK_DEFSDIR)/gtk-types.defs \
- --override $*.override \
- --prefix py$* $*.defs) > gen-$*.c \
- && cp gen-$*.c $*.c \
- && rm -f gen-$*.c
+ hulahop-web-view.h
diff --git a/src/__init__.py b/src/__init__.py
deleted file mode 100644
index aaa29a9..0000000
--- a/src/__init__.py
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2007, Red Hat, Inc.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-from hulahop._hulahop import shutdown
-from hulahop import _hulahop
-
-def startup(profile_path, components_dirs=[]):
- _hulahop.set_profile_path(profile_path)
-
- for path in components_dirs:
- _hulahop.add_components_path(path)
-
- _hulahop.startup()
diff --git a/src/hulahop.defs b/src/hulahop.defs
deleted file mode 100644
index 811b6c5..0000000
--- a/src/hulahop.defs
+++ /dev/null
@@ -1,44 +0,0 @@
-(define-object WebView
- (in-module "Hulahop")
- (parent "GtkBin")
- (c-name "HulahopWebView")
- (gtype-id "HULAHOP_TYPE_WEB_VIEW")
-)
-
-(define-method get_browser
- (of-object "HulahopWebView")
- (c-name "hulahop_web_view_get_browser")
- (return-type "none")
-)
-
-(define-method get_window_root
- (of-object "HulahopWebView")
- (c-name "hulahop_web_view_get_window_root")
- (return-type "none")
-)
-
-(define-function startup
- (c-name "hulahop_startup")
- (return-type "gboolean")
-)
-
-(define-function shutdown
- (c-name "hulahop_shutdown")
- (return-type "none")
-)
-
-(define-function set_profile_path
- (c-name "hulahop_set_profile_path")
- (parameters
- '("gchar*" "path")
- )
- (return-type "none")
-)
-
-(define-function add_components_path
- (c-name "hulahop_add_components_path")
- (parameters
- '("gchar*" "path")
- )
- (return-type "none")
-)
diff --git a/src/hulahop.override b/src/hulahop.override
deleted file mode 100644
index d846c64..0000000
--- a/src/hulahop.override
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*- */
-%%
-headers
-#include <Python.h>
-#include <pygtk/pygtk.h>
-
-#include "hulahop-web-view.h"
-
-%%
-modulename _hulahop
-%%
-import gtk.Bin as PyGtkBin_Type
-%%
-ignore-glob
- *_get_type
- _*
-%%
-override hulahop_web_view_get_browser noargs
-static PyObject *
-_wrap_hulahop_web_view_get_browser(PyGObject *self)
-{
- return hulahop_web_view_get_browser(HULAHOP_WEB_VIEW(self->obj));
-}
-%%
-override hulahop_web_view_get_window_root noargs
-static PyObject *
-_wrap_hulahop_web_view_get_window_root(PyGObject *self)
-{
- return hulahop_web_view_get_window_root(HULAHOP_WEB_VIEW(self->obj));
-}
-%%
diff --git a/src/hulahopmodule.c b/src/hulahopmodule.c
deleted file mode 100644
index ccbb773..0000000
--- a/src/hulahopmodule.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <pygobject.h>
-
-void py_hulahop_register_classes (PyObject *d);
-
-extern PyMethodDef pyhulahop_functions[];
-
-DL_EXPORT(void)
-init_hulahop(void)
-{
- PyObject *m, *d;
-
- init_pygobject ();
-
- m = Py_InitModule ("_hulahop", pyhulahop_functions);
- d = PyModule_GetDict (m);
-
- pyhulahop_register_classes (d);
-
- if (PyErr_Occurred ()) {
- Py_FatalError ("can't initialise module hulahop");
- }
-}
diff --git a/src/webview.py b/src/webview.py
deleted file mode 100644
index 3b5e380..0000000
--- a/src/webview.py
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (C) 2007, Red Hat, Inc.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-from hulahop import _hulahop
-
-from xpcom import components
-from xpcom.components import interfaces
-
-class WebView(_hulahop.WebView):
- def __init__(self):
- _hulahop.WebView.__init__(self)
-
- def get_window_root(self):
- return _hulahop.WebView.get_window_root(self)
-
- def get_browser(self):
- return _hulahop.WebView.get_browser(self)
-
- def get_window(self):
- return self.browser.contentDOMWindow
-
- def load_uri(self, uri):
- web_nav = self.browser.queryInterface(interfaces.nsIWebNavigation)
- web_nav.loadURI(uri, interfaces.nsIWebNavigation.LOAD_FLAGS_NONE,
- None, None, None)
-
- window = property(get_window)
- browser = property(get_browser)
- window_root = property(get_window_root)