1 module webkit2.BackForwardListItem; 2 3 private import glib.Str; 4 private import gobject.ObjectG; 5 private import webkit2.c.functions; 6 public import webkit2.c.types; 7 8 9 /** 10 * A history item is part of the #WebKitBackForwardList and consists 11 * out of a title and a URI. 12 */ 13 public class BackForwardListItem : ObjectG 14 { 15 /** the main Gtk struct */ 16 protected WebKitBackForwardListItem* webKitBackForwardListItem; 17 18 /** Get the main Gtk struct */ 19 public WebKitBackForwardListItem* getBackForwardListItemStruct(bool transferOwnership = false) 20 { 21 if (transferOwnership) 22 ownedRef = false; 23 return webKitBackForwardListItem; 24 } 25 26 /** the main Gtk struct as a void* */ 27 protected override void* getStruct() 28 { 29 return cast(void*)webKitBackForwardListItem; 30 } 31 32 /** 33 * Sets our main struct and passes it to the parent class. 34 */ 35 public this (WebKitBackForwardListItem* webKitBackForwardListItem, bool ownedRef = false) 36 { 37 this.webKitBackForwardListItem = webKitBackForwardListItem; 38 super(cast(GObject*)webKitBackForwardListItem, ownedRef); 39 } 40 41 42 /** */ 43 public static GType getType() 44 { 45 return webkit_back_forward_list_item_get_type(); 46 } 47 48 /** 49 * See also webkit_back_forward_list_item_get_uri(). 50 * 51 * Returns: the original URI of @list_item or %NULL 52 * when the original URI is empty. 53 */ 54 public string getOriginalUri() 55 { 56 return Str.toString(webkit_back_forward_list_item_get_original_uri(webKitBackForwardListItem)); 57 } 58 59 /** 60 * Returns: the page title of @list_item or %NULL 61 * when the title is empty. 62 */ 63 public string getTitle() 64 { 65 return Str.toString(webkit_back_forward_list_item_get_title(webKitBackForwardListItem)); 66 } 67 68 /** 69 * This URI may differ from the original URI if the page was, 70 * for example, redirected to a new location. 71 * See also webkit_back_forward_list_item_get_original_uri(). 72 * 73 * Returns: the URI of @list_item or %NULL 74 * when the URI is empty. 75 */ 76 public string getUri() 77 { 78 return Str.toString(webkit_back_forward_list_item_get_uri(webKitBackForwardListItem)); 79 } 80 }