diff options
author | Xan Lopez <xan@src.gnome.org> | 2007-12-10 06:05:34 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2007-12-10 06:05:34 +0800 |
commit | 04d807546492d1dc26d75faf184e1face508a128 (patch) | |
tree | f74a67a26af47300c803ee1b84d2436a7da66261 /embed/webkit/webkit-embed-persist.c | |
parent | 98ca0fc609810f0024179654484f8428fa50d020 (diff) | |
download | gsoc2013-epiphany-04d807546492d1dc26d75faf184e1face508a128.tar.gz gsoc2013-epiphany-04d807546492d1dc26d75faf184e1face508a128.tar.zst gsoc2013-epiphany-04d807546492d1dc26d75faf184e1face508a128.zip |
Rename cpp files to c in the WebKit backend; they are pure C.
Also fix a couple of compiler warnings.
svn path=/trunk/; revision=7764
Diffstat (limited to 'embed/webkit/webkit-embed-persist.c')
-rw-r--r-- | embed/webkit/webkit-embed-persist.c | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/embed/webkit/webkit-embed-persist.c b/embed/webkit/webkit-embed-persist.c new file mode 100644 index 000000000..254a10973 --- /dev/null +++ b/embed/webkit/webkit-embed-persist.c @@ -0,0 +1,92 @@ +/* + * Copyright © 2007 Xan Lopez <xan@gnome.org> + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $Id$ + */ + +#include "webkit-embed-persist.h" + +static void +webkit_embed_persist_class_init (WebKitEmbedPersistClass *klass); +static void +webkit_embed_persist_init (WebKitEmbedPersist *ges); +static void +webkit_embed_persist_finalize (GObject *object); + +#define WEBKIT_EMBED_PERSIST_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), WEBKIT_TYPE_EMBED_PERSIST, WebKitEmbedPersistPrivate)) + +G_DEFINE_TYPE (WebKitEmbedPersist, webkit_embed_persist, EPHY_TYPE_EMBED_PERSIST) + +static void +webkit_embed_persist_init (WebKitEmbedPersist *persist) +{ +} + +static void +webkit_embed_persist_finalize (GObject *object) +{ + G_OBJECT_CLASS (webkit_embed_persist_parent_class)->finalize (object); +} + +void +webkit_embed_persist_completed (WebKitEmbedPersist *persist) +{ + g_signal_emit_by_name (persist, "completed"); + g_object_unref (persist); +} + +void +webkit_embed_persist_cancelled (WebKitEmbedPersist *persist) +{ + g_signal_emit_by_name (persist, "cancelled"); + g_object_unref (persist); +} + +static void +impl_cancel (EphyEmbedPersist *persist) +{ + g_object_unref (persist); +} + +static gboolean +impl_save (EphyEmbedPersist *persist) +{ + g_object_ref (persist); + + return FALSE; +} + +static char * +impl_to_string (EphyEmbedPersist *persist) +{ + return NULL; +} + +static void +webkit_embed_persist_class_init (WebKitEmbedPersistClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + EphyEmbedPersistClass *persist_class = EPHY_EMBED_PERSIST_CLASS (klass); + + object_class->finalize = webkit_embed_persist_finalize; + + persist_class->save = impl_save; + persist_class->cancel = impl_cancel; + persist_class->to_string = impl_to_string; + + // g_type_class_add_private (object_class, sizeof(WebKitEmbedPersistPrivate)); +} |