gtkieembed r205 - in trunk: . src



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

Log:
	* src/ie-bridge.[cpp|h]: Added _ie_bridge_set_history().
	* src/gtk-ie-embed.[ch]: Added gtk_ie_embed_get_history_count() and
	gtk_ie_embed_get_current_position_in_history().
	* src/ie-bridge.[cpp|h]: Added _ie_bridge_get_history_count() and
	_ie_bridge_get_current_position_in_history().



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 00:28:23 2009
@@ -772,6 +772,22 @@
     return priv->bridge ? _ie_bridge_set_history (priv->bridge, GTK_IE_EMBED_HISTORY_FORWARD, history) : NULL;
 }
 
+guint
+gtk_ie_embed_get_history_count (GtkIEEmbed *ie)
+{
+    GtkIEEmbedPriv *priv = GTK_IE_EMBED_GET_PRIVATE (ie);
+
+    return priv->bridge ? _ie_bridge_get_history_count (priv->bridge) : 0;
+}
+
+guint
+gtk_ie_embed_get_current_position_in_history (GtkIEEmbed *ie)
+{
+    GtkIEEmbedPriv *priv = GTK_IE_EMBED_GET_PRIVATE (ie);
+
+    return priv->bridge ? _ie_bridge_get_current_position_in_history (priv->bridge) : 0;
+}
+
 const gchar *
 gtk_ie_embed_dom_event_target_get_name (GtkIEEmbedDOMEventTarget *target)
 {

Modified: trunk/src/gtk-ie-embed.h
==============================================================================
--- trunk/src/gtk-ie-embed.h	(original)
+++ trunk/src/gtk-ie-embed.h	Tue Feb  3 00:28:23 2009
@@ -164,7 +164,10 @@
 void         gtk_ie_embed_set_forward_history
                                          (GtkIEEmbed *ie,
                                           const GList *history);
-
+guint        gtk_ie_embed_get_history_count
+                                         (GtkIEEmbed *ie);
+guint        gtk_ie_embed_get_current_position_in_history
+                                         (GtkIEEmbed *ie);
 /* event target */
 const gchar *gtk_ie_embed_dom_event_target_get_name
                                          (GtkIEEmbedDOMEventTarget *target);

Modified: trunk/src/gtkieembed.def
==============================================================================
--- trunk/src/gtkieembed.def	(original)
+++ trunk/src/gtkieembed.def	Tue Feb  3 00:28:23 2009
@@ -36,6 +36,8 @@
     gtk_ie_embed_get_use_context_menu
     gtk_ie_embed_get_backward_history
     gtk_ie_embed_get_forward_history
+    gtk_ie_embed_get_history_count
+    gtk_ie_embed_get_current_position_in_history
     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 00:28:23 2009
@@ -1307,6 +1307,41 @@
 #endif
 }
 
+guint
+_ie_bridge_get_history_count (IEBridge *ie)
+{
+    DWORD count = 0;
+#ifdef HAVE_TLOGSTG_H
+    ITravelLogStg *travel_log = NULL;
+
+    travel_log = _get_travel_log (ie);
+    if (!travel_log)
+        return 0;
+
+    travel_log->GetCount (TLEF_ABSOLUTE, &count);
+    travel_log->Release ();
+#endif
+    return (guint)count;
+}
+
+guint
+_ie_bridge_get_current_position_in_history (IEBridge *ie)
+{
+    DWORD count = 0;
+#ifdef HAVE_TLOGSTG_H
+    ITravelLogStg *travel_log = NULL;
+
+    travel_log = _get_travel_log (ie);
+    if (!travel_log)
+        return 0;
+
+    travel_log->GetCount (TLEF_RELATIVE_BACK | 
+                          TLEF_RELATIVE_INCLUDE_CURRENT, &count);
+    travel_log->Release ();
+#endif
+    return (guint)count;
+}
+
 
 /*
 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 00:28:23 2009
@@ -151,7 +151,10 @@
 void        _ie_bridge_set_history      (IEBridge *ie,
                                          GtkIEEmbedHistoryDirection direction,
                                          const GList *history);
-
+guint       _ie_bridge_get_history_count
+                                        (IEBridge *ie);
+guint       _ie_bridge_get_current_position_in_history
+                                        (IEBridge *ie);
 G_END_DECLS
 
 #endif /* __IE_BRIDGE_H__ */



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