Hiroyuki Ikezoe
ikezo****@users*****
Tue Mar 20 08:40:42 JST 2007
Index: kazehakase/module/embed/gecko/Makefile.am diff -u /dev/null kazehakase/module/embed/gecko/Makefile.am:1.1 --- /dev/null Tue Mar 20 08:40:42 2007 +++ kazehakase/module/embed/gecko/Makefile.am Tue Mar 20 08:40:42 2007 @@ -0,0 +1,45 @@ +CLEANFILES = *~ *.bak + +AM_CPPFLAGS = \ + -DLOCALEDIR=\""$(localedir)"\" \ + -DSYSCONFDIR=\""$(sysconfdir)"\" \ + -DDATADIR=\""$(datadir)"\" \ + -DEXTDIR=\""$(extdir)"\" \ + -DKZ_SYSCONFDIR=\""$(sysconfdir)/$(PACKAGE)"\" \ + -DKZ_DATADIR=\""$(datadir)/$(PACKAGE)"\" \ + -DGTK_DISABLE_DEPRECATED=1 \ + -DGDK_DISABLE_DEPRECATED=1 \ + -DG_LOG_DOMAIN=\"Kazehakase-Gecko\" \ + -DG_DISABLE_DEPRECATED=1 + +INCLUDES = $(GLIB_CFLAGS) \ + $(GTK_CFLAGS) \ + $(LIBGNUTLS_CFLAGS) \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/actions \ + -I$(top_srcdir)/src/bookmarks \ + -I$(top_srcdir)/src/libegg/pixbufthumbnail \ + -I$(top_srcdir)/src/libegg/md5 \ + -I$(top_srcdir)/src/mozilla \ + -I$(top_srcdir)/src/net \ + -I$(top_srcdir)/src/sidebar \ + -I$(top_srcdir)/src/utils \ + -I$(top_srcdir)/src/widget + +LIBADD = $(GLIB_LIBS) + +LDFLAGS = \ + -version-info $(LT_VERSION_INFO) \ + -export-dynamic $(no_undefined) $(LIBTOOL_EXPORT_OPTIONS) + + +search_LTLIBRARIES = + +if WITH_GECKO +search_LTLIBRARIES += libgecko.la + +libgecko_la_SOURCES = kz-gecko-embed.c kz-gecko-embed.h +libgecko_la_LIBADD = +libgecko_la_CPPFLAGS = + +endif Index: kazehakase/module/embed/gecko/kz-gecko-embed.c diff -u /dev/null kazehakase/module/embed/gecko/kz-gecko-embed.c:1.1 --- /dev/null Tue Mar 20 08:40:42 2007 +++ kazehakase/module/embed/gecko/kz-gecko-embed.c Tue Mar 20 08:40:42 2007 @@ -0,0 +1,130 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +/* + * Copyright (C) 2007 Hiroyuki Ikezoe + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <glib/gi18n.h> +#include <glib.h> + +#include "kazehakase.h" +#include "utils/utils.h" +#include "glib-utils.h" +#include "kz-embed.h" +#include "kz-gecko-embed.h" + +#include "gtkmozembed.h" + + +typedef struct _KzGeckoEmbedPrivate KzGeckoEmbedPrivate; +struct _KzGeckoEmbedPrivate +{ +}; + +typedef struct _KzGeckoEmbedClass KzGeckoEmbedClass; +struct _KzGeckoEmbedClass +{ + GtkMozEmbedClass parent_class; +}; + +#define KZ_GECKO_EMBED_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), KZ_TYPE_GECKO_EMBED, KzGeckoEmbedPrivate)) + +#define KZ_GECKO_EMBED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), KZ_TYPE_GECKO_EMBED, KzGeckoEmbedClass)) +#define KZ_IS_GECKO_EMBED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), KZ_TYPE_GECKO_EMBED)) +#define KZ_GECKO_EMBED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), KZ_TYPE_GECKO_EMBED, KzGeckoEmbedClass)) + +/* for module */ +void kz_embed_module_init (GTypeModule *module); +void kz_embed_module_exit (void); +GtkWidget *kz_embed_module_create (void); + +/* for interface */ +static void kz_gecko_embed_iface_init (KzEmbedIFace *iface); + +/* KzGeckoEmbed Class */ +static void kz_gecko_embed_class_init (KzGeckoEmbedClass *klass); +static void kz_gecko_embed_init (KzGeckoEmbed *embed); + +static GtkMozEmbed *parent_class; +static GType kz_gecko_embed_type = 0; + +static void +kz_gecko_embed_register_type (GTypeModule *module) +{ + static const GTypeInfo kz_gecko_embed_info = + { + sizeof (KzGeckoEmbedClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) kz_gecko_embed_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (KzGeckoEmbed), + 0, /* n_preallocs */ + (GInstanceInitFunc) kz_gecko_embed_init, + }; + + const GInterfaceInfo kz_embed_info = + { + (GInterfaceInitFunc) kz_gecko_embed_iface_init, + NULL, + NULL + }; + + kz_gecko_embed_type = g_type_module_register_type(module, + GTK_TYPE_MOZ_EMBED, + "KzGeckoEmbed", + &kz_gecko_embed_info, 0); + g_type_module_add_interface(module, + KZ_TYPE_GECKO_EMBED, + KZ_TYPE_EMBED, + &kz_embed_info); +} + +G_MODULE_EXPORT void +kz_embed_module_init (GTypeModule *module) +{ + kz_gecko_embed_register_type(module); +} + +G_MODULE_EXPORT void +kz_embed_module_exit (void) +{ +} + +G_MODULE_EXPORT GtkWidget * +kz_embed_module_create (void) +{ + return kz_gecko_embed_new(); +} + +GType +kz_gecko_embed_get_type (void) +{ + return kz_gecko_embed_type; +} + +static void +kz_gecko_embed_class_init (KzGeckoEmbedClass *klass) +{ + GObjectClass *object_class; + + parent_class = g_type_class_peek_parent (klass); + object_class = (GObjectClass *) klass; + + g_type_class_add_private (object_class, sizeof(KzGeckoEmbedPrivate)); +} Index: kazehakase/module/embed/gecko/kz-gecko-embed.h diff -u /dev/null kazehakase/module/embed/gecko/kz-gecko-embed.h:1.1 --- /dev/null Tue Mar 20 08:40:42 2007 +++ kazehakase/module/embed/gecko/kz-gecko-embed.h Tue Mar 20 08:40:42 2007 @@ -0,0 +1,46 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +/* + * Copyright (C) 2007 Hiroyuki Ikezoe + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef __KZ_GECKO_EMBED_H__ +#define __KZ_GECKO_EMBED_H__ + +#include <glib-object.h> +#include "gtkmozembed.h" + +G_BEGIN_DECLS + +#define KZ_TYPE_GECKO_EMBED (kz_gecko_embed_get_type ()) +#define KZ_GECKO_EMBED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), KZ_TYPE_GECKO_EMBED, KzGeckoEmbed)) +#define KZ_IS_GECKO_EMBED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), KZ_TYPE_GECKO_EMBED)) + +typedef struct _KzGeckoEmbed KzGeckoEmbed; + +struct _KzGeckoEmbed +{ + GtkMozEmbed parent; +}; + +GType kz_gecko_embed_get_type (void) G_GNUC_CONST; + +GtkWidget *kz_gecko_embed_new (void); + +G_END_DECLS + +#endif /* __KZ_GECKOEMBED_H__ */