1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from webkit-gir-files
// DO NOT EDIT
use crate::ffi;
use glib::translate::*;
glib::wrapper! {
/// One item of the #WebKitBackForwardList.
///
/// A history item is part of the #WebKitBackForwardList and consists
/// out of a title and a URI.
#[doc(alias = "WebKitBackForwardListItem")]
pub struct BackForwardListItem(Object<ffi::WebKitBackForwardListItem, ffi::WebKitBackForwardListItemClass>);
match fn {
type_ => || ffi::webkit_back_forward_list_item_get_type(),
}
}
impl BackForwardListItem {
/// Obtain the original URI of the item.
///
/// See also webkit_back_forward_list_item_get_uri().
///
/// # Returns
///
/// the original URI of @self or [`None`]
/// when the original URI is empty.
#[doc(alias = "webkit_back_forward_list_item_get_original_uri")]
#[doc(alias = "get_original_uri")]
pub fn original_uri(&self) -> Option<glib::GString> {
unsafe {
from_glib_none(ffi::webkit_back_forward_list_item_get_original_uri(
self.to_glib_none().0,
))
}
}
/// Obtain the title of the item.
///
/// # Returns
///
/// the page title of @self or [`None`]
/// when the title is empty.
#[doc(alias = "webkit_back_forward_list_item_get_title")]
#[doc(alias = "get_title")]
pub fn title(&self) -> Option<glib::GString> {
unsafe {
from_glib_none(ffi::webkit_back_forward_list_item_get_title(
self.to_glib_none().0,
))
}
}
/// Obtain the URI of the item.
///
/// This URI may differ from the original URI if the page was,
/// for example, redirected to a new location.
/// See also webkit_back_forward_list_item_get_original_uri().
///
/// # Returns
///
/// the URI of @self or [`None`]
/// when the URI is empty.
#[doc(alias = "webkit_back_forward_list_item_get_uri")]
#[doc(alias = "get_uri")]
pub fn uri(&self) -> Option<glib::GString> {
unsafe {
from_glib_none(ffi::webkit_back_forward_list_item_get_uri(
self.to_glib_none().0,
))
}
}
}