gtkieembed r207 - in trunk: . src



Author: hiikezoe
Date: Tue Feb  3 01:00:18 2009
New Revision: 207
URL: http://svn.gnome.org/viewvc/gtkieembed?rev=207&view=rev

Log:
	* src/gtk-ie-embed.[ch]: Added
	gtk_ie_embed_go_relative_position().
	* src/ie-bridge.[cpp|h]: Added
	_ie_bridge_go_relative_position().



Modified:
   trunk/ChangeLog
   trunk/src/gtk-ie-embed.c
   trunk/src/gtk-ie-embed.h
   trunk/src/gtkieembed.def
   trunk/src/ie-bridge.cpp
   trunk/src/ie-bridge.h

Modified: trunk/src/gtk-ie-embed.c
==============================================================================
--- trunk/src/gtk-ie-embed.c	(original)
+++ trunk/src/gtk-ie-embed.c	Tue Feb  3 01:00:18 2009
@@ -456,6 +456,17 @@
     _ie_bridge_go_forward (priv->bridge);
 }
 
+void
+gtk_ie_embed_go_relative_position (GtkIEEmbed *ie, gint offset)
+{
+    GtkIEEmbedPriv *priv = GTK_IE_EMBED_GET_PRIVATE (ie);
+
+    if (!priv->bridge)
+        return;
+
+    _ie_bridge_go_relative_position (priv->bridge, offset);
+}
+
 gchar *
 gtk_ie_embed_get_location (GtkIEEmbed *ie)
 {

Modified: trunk/src/gtk-ie-embed.h
==============================================================================
--- trunk/src/gtk-ie-embed.h	(original)
+++ trunk/src/gtk-ie-embed.h	Tue Feb  3 01:00:18 2009
@@ -115,6 +115,9 @@
 gboolean    gtk_ie_embed_is_loading      (GtkIEEmbed *ie);
 void        gtk_ie_embed_go_back         (GtkIEEmbed *ie);
 void        gtk_ie_embed_go_forward      (GtkIEEmbed *ie);
+void        gtk_ie_embed_go_relative_position
+                                         (GtkIEEmbed *ie,
+                                          gint offset);
 gboolean    gtk_ie_embed_can_go_forward  (GtkIEEmbed *ie);
 gboolean    gtk_ie_embed_can_go_back     (GtkIEEmbed *ie);
 gchar      *gtk_ie_embed_get_location    (GtkIEEmbed *ie);

Modified: trunk/src/gtkieembed.def
==============================================================================
--- trunk/src/gtkieembed.def	(original)
+++ trunk/src/gtkieembed.def	Tue Feb  3 01:00:18 2009
@@ -10,6 +10,7 @@
     gtk_ie_embed_is_loading
     gtk_ie_embed_go_back
     gtk_ie_embed_go_forward
+    gtk_ie_embed_go_relative_position
     gtk_ie_embed_can_go_forward
     gtk_ie_embed_can_go_back
     gtk_ie_embed_get_location
@@ -38,6 +39,7 @@
     gtk_ie_embed_get_forward_history
     gtk_ie_embed_get_history_count
     gtk_ie_embed_get_current_position_in_history
+    gtk_ie_embed_get_history_item_at_relative_position
     gtk_ie_embed_dom_event_target_get_name
     gtk_ie_embed_dom_event_target_get_attribute_value
     gtk_ie_embed_dom_event_target_get_attributes

Modified: trunk/src/ie-bridge.cpp
==============================================================================
--- trunk/src/ie-bridge.cpp	(original)
+++ trunk/src/ie-bridge.cpp	Tue Feb  3 01:00:18 2009
@@ -1357,7 +1357,7 @@
 }
 
 GtkIEEmbedHistoryItem *
-_ie_bridge_get_history_item_at_relative_position (IEBridge *ie, gint position)
+_ie_bridge_get_history_item_at_relative_position (IEBridge *ie, gint offset)
 {
     GtkIEEmbedHistoryItem *item = NULL;
 #ifdef HAVE_TLOGSTG_H
@@ -1368,7 +1368,7 @@
     if (!travel_log)
         return NULL;
 
-    travel_log->GetRelativeEntry (position, &entry);
+    travel_log->GetRelativeEntry (offset, &entry);
     if (entry) {
         item = travel_log_entry_to_history_item (entry);
         entry->Release ();
@@ -1378,6 +1378,26 @@
     return item;
 }
 
+void
+_ie_bridge_go_relative_position (IEBridge *ie, gint offset)
+{
+#ifdef HAVE_TLOGSTG_H
+    ITravelLogStg *travel_log = NULL;
+    ITravelLogEntry *entry = NULL;
+
+    travel_log = _get_travel_log (ie);
+    if (!travel_log)
+        return;
+
+    travel_log->GetRelativeEntry (offset, &entry);
+    if (entry) {
+        travel_log->TravelTo (entry);
+        entry->Release ();
+    }
+    travel_log->Release ();
+#endif
+}
+
 
 /*
 vi:ts=4:nowrap:ai:expandtab:sw=4

Modified: trunk/src/ie-bridge.h
==============================================================================
--- trunk/src/ie-bridge.h	(original)
+++ trunk/src/ie-bridge.h	Tue Feb  3 01:00:18 2009
@@ -71,6 +71,9 @@
 gboolean    _ie_bridge_is_loading       (IEBridge *ie);
 void        _ie_bridge_go_back          (IEBridge *ie);
 void        _ie_bridge_go_forward       (IEBridge *ie);
+void        _ie_bridge_go_relative_position
+                                        (IEBridge *ie,
+                                         gint offset);
 gchar      *_ie_bridge_get_location     (IEBridge *ie);
 gchar      *_ie_bridge_get_title        (IEBridge *ie);
 
@@ -158,7 +161,7 @@
 GtkIEEmbedHistoryItem *
             _ie_bridge_get_history_item_at_relative_position
                                         (IEBridge *ie,
-                                         gint position);
+                                         gint offset);
 G_END_DECLS
 
 #endif /* __IE_BRIDGE_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]