Some minor fixes. Starting a glue layer to work around GtkMozEmbed API
issues. svn path=/trunk/gtkmozembed-sharp/; revision=15355
This commit is contained in:
Родитель
27eaed6801
Коммит
9f106489cf
|
@ -1 +1 @@
|
|||
SUBDIRS = sources api gtkmozembed sample
|
||||
SUBDIRS = sources api glue gtkmozembed sample
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<member cname="GTK_MOZ_EMBED_FLAG_DEPENDENT" name="Dependent" value="268435456U"/>
|
||||
<member cname="GTK_MOZ_EMBED_FLAG_MODAL" name="Modal" value="536870912U"/>
|
||||
<member cname="GTK_MOZ_EMBED_FLAG_OPENASDIALOG" name="Openasdialog" value="1073741824U"/>
|
||||
<member cname="GTK_MOZ_EMBED_FLAG_OPENASCHROME" name="Openaschrome" value="2147483648U "/>
|
||||
<member cname="GTK_MOZ_EMBED_FLAG_OPENASCHROME" name="Openaschrome" value="2147483648U"/>
|
||||
</enum>
|
||||
<enum name="ProgressFlags" cname="GtkMozEmbedProgressFlags" type="enum">
|
||||
<member cname="GTK_MOZ_EMBED_FLAG_START" name="Start" value="1"/>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<member cname="GTK_MOZ_EMBED_FLAG_IS_REQUEST" name="IsRequest" value="65536"/>
|
||||
<member cname="GTK_MOZ_EMBED_FLAG_IS_DOCUMENT" name="IsDocument" value="131072"/>
|
||||
<member cname="GTK_MOZ_EMBED_FLAG_IS_NETWORK" name="IsNetwork" value="262144"/>
|
||||
<member cname="GTK_MOZ_EMBED_FLAG_IS_WINDOW" name="IsWindow" value="524288 "/>
|
||||
<member cname="GTK_MOZ_EMBED_FLAG_IS_WINDOW" name="IsWindow" value="524288"/>
|
||||
</enum>
|
||||
<enum name="ReloadFlags" cname="GtkMozEmbedReloadFlags" type="enum">
|
||||
<member cname="GTK_MOZ_EMBED_FLAG_RELOADNORMAL" name="Reloadnormal"/>
|
||||
|
@ -355,9 +355,6 @@
|
|||
<method name="Get" cname="gtk_moz_embed_single_get" shared="true">
|
||||
<return-type type="GtkMozEmbedSingle*"/>
|
||||
</method>
|
||||
<method name="GetType" cname="gtk_moz_embed_single_get_type" shared="true">
|
||||
<return-type type="GtkType"/>
|
||||
</method>
|
||||
</object>
|
||||
</namespace>
|
||||
</api>
|
||||
|
|
36
configure.in
36
configure.in
|
@ -2,6 +2,7 @@ AC_INIT(README)
|
|||
AC_CANONICAL_SYSTEM
|
||||
AM_INIT_AUTOMAKE(gtkmozembed, 0.1)
|
||||
AM_MAINTAINER_MODE
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AC_MSG_CHECKING([whether we're compiling from CVS])
|
||||
if test -f "$srcdir/.cvs_version" ; then
|
||||
|
@ -39,10 +40,45 @@ fi
|
|||
AC_SUBST(PATH)
|
||||
AC_SUBST(LD_LIBRARY_PATH)
|
||||
|
||||
dnl Find pkg-config
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
if test "x$PKG_CONFIG" = "xno"; then
|
||||
AC_MSG_ERROR([You need to install pkg-config])
|
||||
fi
|
||||
|
||||
dnl Find GTK
|
||||
BUILD_GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
|
||||
BUILD_GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
|
||||
AC_SUBST(BUILD_GTK_CFLAGS)
|
||||
AC_SUBST(BUILD_GTK_LIBS)
|
||||
|
||||
GTK_REQUIRED_VERSION=2.0.0
|
||||
|
||||
PKG_CHECK_MODULES(BASE_DEPENDENCIES, gtk+-2.0 >= $GTK_REQUIRED_VERSION gmodule-2.0 >= $GTK_REQUIRED_VERSION)
|
||||
|
||||
AC_SUBST(BASE_DEPENDENCIES_CFLAGS)
|
||||
AC_SUBST(BASE_DEPENDENCIES_LIBS)
|
||||
|
||||
dnl Find Mozilla
|
||||
AC_ARG_WITH(mozilla-headers,
|
||||
[ --with-mozilla-headers Specify location of MOZILLA headers],
|
||||
[MOZ_CFLAGS="-I$withval"],
|
||||
[MOZ_CFLAGS="-I/usr/include/mozilla"])
|
||||
|
||||
AC_ARG_WITH(mozilla-libs,
|
||||
[ --with-mozilla-libs Specify location of MOZILLA libs],
|
||||
[MOZ_LIBS="-L$withval"],
|
||||
[MOZ_LIBS="-L/usr/lib/mozilla"])
|
||||
|
||||
AC_SUBST(MOZ_LIBS)
|
||||
AC_SUBST(MOZ_CFLAGS)
|
||||
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
api/Makefile
|
||||
gtkmozembed/Makefile
|
||||
glue/Makefile
|
||||
sample/Makefile
|
||||
sources/Makefile
|
||||
])
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
*.lo
|
||||
*.la
|
||||
Makefile.in
|
||||
Makefile
|
||||
.deps
|
||||
.libs
|
|
@ -0,0 +1,17 @@
|
|||
lib_LTLIBRARIES = libgtkmozembedsharpglue.la
|
||||
|
||||
BASESOURCES = \
|
||||
newwindow.c \
|
||||
#
|
||||
|
||||
libgtkmozembedsharpglue_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
libgtkmozembedsharpglue_la_SOURCES = \
|
||||
$(BASESOURCES)
|
||||
|
||||
libgtkmozembedsharpglue_la_LIBADD = $(BASE_DEPENDENCIES_LIBS) $(MOZ_LIBS)
|
||||
|
||||
INCLUDES = -I$(top_srcdir) $(BASE_DEPENDENCIES_CFLAGS) $(MOZ_CFLAGS)
|
||||
|
||||
CLEANFILES = lib*.a
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/* GO GO GADGET SPEW! */
|
||||
|
||||
#include <gtkembedmoz/gtkmozembed.h>
|
||||
#include <stdio.h>
|
||||
|
||||
void
|
||||
gtkmozembedsharp_fix_newwindow (GtkMozEmbed *widget)
|
||||
{
|
||||
printf("We need to fix NewWindow. Fun\n");
|
||||
|
||||
return;
|
||||
}
|
|
@ -1,10 +1,14 @@
|
|||
[DllImport("gtkembedmoz")]
|
||||
static extern IntPtr gtk_moz_embed_new();
|
||||
|
||||
[DllImport("gtkmozembedsharpglue")]
|
||||
static extern void gtkmozembedsharp_fix_newwindow(IntPtr a);
|
||||
|
||||
public EmbedWidget(string aPath, string aDir)
|
||||
{
|
||||
gtk_moz_embed_set_profile_path(aPath, aDir);
|
||||
Raw = gtk_moz_embed_new ();
|
||||
gtkmozembedsharp_fix_newwindow(Raw);
|
||||
}
|
||||
|
||||
public EmbedWidget()
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace GtkSamples {
|
|||
//moz.JsStatus += new EventHandler(moz_jsstatus_cb);
|
||||
|
||||
// Now the ones with args!
|
||||
moz.NewWindow += new NewWindowHandler(moz_new_win_cb);
|
||||
//moz.NewWindow += new NewWindowHandler(moz_new_win_cb);
|
||||
//moz.Progress += new ProgressHandler(moz_progress_cb);
|
||||
//moz.ProgressAll += new ProgressAllHandler(moz_progressall_cb);
|
||||
//moz.NetState += new NetStateHandler(moz_netstate_cb);
|
||||
|
@ -145,11 +145,6 @@ namespace GtkSamples {
|
|||
win.Destroy();
|
||||
}
|
||||
|
||||
static void moz_new_win_cb (object obj, NewWindowArgs args)
|
||||
{
|
||||
Console.Error.WriteLine("Mozilla threw a newwin.");
|
||||
//args.RetVal = new EmbedWidget();
|
||||
}
|
||||
static void entry_act (object obj, EventArgs args)
|
||||
{
|
||||
moz.LoadUrl(editbox.Text);
|
||||
|
|
|
@ -120,13 +120,12 @@
|
|||
</data>
|
||||
</rule>
|
||||
|
||||
<!-- These signals are a mess. We have to handle them differently -->
|
||||
<rule>
|
||||
<class name="GtkMozEmbed">
|
||||
<signal>NewWindow</signal>
|
||||
</class>
|
||||
<data>
|
||||
<attribute target="signal">
|
||||
<attribute target="method">
|
||||
<name>hidden</name>
|
||||
<value>1</value>
|
||||
</attribute>
|
||||
|
@ -138,7 +137,7 @@
|
|||
<signal>NewWindowOrphan</signal>
|
||||
</class>
|
||||
<data>
|
||||
<attribute target="signal">
|
||||
<attribute target="method">
|
||||
<name>hidden</name>
|
||||
<value>1</value>
|
||||
</attribute>
|
||||
|
|
Загрузка…
Ссылка в новой задаче