Regen for libhandy 0.90.0 release

This commit is contained in:
Christopher Davis 2020-08-26 23:27:30 -07:00
parent 2e4f3feee7
commit f165d56cb4
6 changed files with 356 additions and 716 deletions

File diff suppressed because it is too large Load diff

View file

@ -1560,16 +1560,11 @@ extern "C" {
//=========================================================================
pub fn hdy_view_switcher_get_type() -> GType;
pub fn hdy_view_switcher_new() -> *mut gtk::GtkWidget;
pub fn hdy_view_switcher_get_icon_size(self_: *mut HdyViewSwitcher) -> gtk::GtkIconSize;
pub fn hdy_view_switcher_get_narrow_ellipsize(
self_: *mut HdyViewSwitcher,
) -> pango::PangoEllipsizeMode;
pub fn hdy_view_switcher_get_policy(self_: *mut HdyViewSwitcher) -> HdyViewSwitcherPolicy;
pub fn hdy_view_switcher_get_stack(self_: *mut HdyViewSwitcher) -> *mut gtk::GtkStack;
pub fn hdy_view_switcher_set_icon_size(
self_: *mut HdyViewSwitcher,
icon_size: gtk::GtkIconSize,
);
pub fn hdy_view_switcher_set_narrow_ellipsize(
self_: *mut HdyViewSwitcher,
mode: pango::PangoEllipsizeMode,
@ -1582,16 +1577,11 @@ extern "C" {
//=========================================================================
pub fn hdy_view_switcher_bar_get_type() -> GType;
pub fn hdy_view_switcher_bar_new() -> *mut gtk::GtkWidget;
pub fn hdy_view_switcher_bar_get_icon_size(self_: *mut HdyViewSwitcherBar) -> gtk::GtkIconSize;
pub fn hdy_view_switcher_bar_get_policy(
self_: *mut HdyViewSwitcherBar,
) -> HdyViewSwitcherPolicy;
pub fn hdy_view_switcher_bar_get_reveal(self_: *mut HdyViewSwitcherBar) -> gboolean;
pub fn hdy_view_switcher_bar_get_stack(self_: *mut HdyViewSwitcherBar) -> *mut gtk::GtkStack;
pub fn hdy_view_switcher_bar_set_icon_size(
self_: *mut HdyViewSwitcherBar,
icon_size: gtk::GtkIconSize,
);
pub fn hdy_view_switcher_bar_set_policy(
self_: *mut HdyViewSwitcherBar,
policy: HdyViewSwitcherPolicy,
@ -1607,9 +1597,6 @@ extern "C" {
//=========================================================================
pub fn hdy_view_switcher_title_get_type() -> GType;
pub fn hdy_view_switcher_title_new() -> *mut HdyViewSwitcherTitle;
pub fn hdy_view_switcher_title_get_icon_size(
self_: *mut HdyViewSwitcherTitle,
) -> gtk::GtkIconSize;
pub fn hdy_view_switcher_title_get_policy(
self_: *mut HdyViewSwitcherTitle,
) -> HdyViewSwitcherPolicy;
@ -1622,10 +1609,6 @@ extern "C" {
pub fn hdy_view_switcher_title_get_view_switcher_enabled(
self_: *mut HdyViewSwitcherTitle,
) -> gboolean;
pub fn hdy_view_switcher_title_set_icon_size(
self_: *mut HdyViewSwitcherTitle,
icon_size: gtk::GtkIconSize,
);
pub fn hdy_view_switcher_title_set_policy(
self_: *mut HdyViewSwitcherTitle,
policy: HdyViewSwitcherPolicy,

View file

@ -42,7 +42,6 @@ impl Default for ViewSwitcher {
#[derive(Clone, Default)]
pub struct ViewSwitcherBuilder {
icon_size: Option<i32>,
narrow_ellipsize: Option<pango::EllipsizeMode>,
policy: Option<ViewSwitcherPolicy>,
stack: Option<gtk::Stack>,
@ -91,9 +90,6 @@ impl ViewSwitcherBuilder {
pub fn build(self) -> ViewSwitcher {
let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
if let Some(ref icon_size) = self.icon_size {
properties.push(("icon-size", icon_size));
}
if let Some(ref narrow_ellipsize) = self.narrow_ellipsize {
properties.push(("narrow-ellipsize", narrow_ellipsize));
}
@ -215,11 +211,6 @@ impl ViewSwitcherBuilder {
ret
}
pub fn icon_size(mut self, icon_size: i32) -> Self {
self.icon_size = Some(icon_size);
self
}
pub fn narrow_ellipsize(mut self, narrow_ellipsize: pango::EllipsizeMode) -> Self {
self.narrow_ellipsize = Some(narrow_ellipsize);
self
@ -414,24 +405,18 @@ impl ViewSwitcherBuilder {
pub const NONE_VIEW_SWITCHER: Option<&ViewSwitcher> = None;
pub trait ViewSwitcherExt: 'static {
fn get_icon_size(&self) -> gtk::IconSize;
fn get_narrow_ellipsize(&self) -> pango::EllipsizeMode;
fn get_policy(&self) -> ViewSwitcherPolicy;
fn get_stack(&self) -> Option<gtk::Stack>;
fn set_icon_size(&self, icon_size: gtk::IconSize);
fn set_narrow_ellipsize(&self, mode: pango::EllipsizeMode);
fn set_policy(&self, policy: ViewSwitcherPolicy);
fn set_stack<P: IsA<gtk::Stack>>(&self, stack: Option<&P>);
fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_narrow_ellipsize_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
@ -443,14 +428,6 @@ pub trait ViewSwitcherExt: 'static {
}
impl<O: IsA<ViewSwitcher>> ViewSwitcherExt for O {
fn get_icon_size(&self) -> gtk::IconSize {
unsafe {
from_glib(handy_sys::hdy_view_switcher_get_icon_size(
self.as_ref().to_glib_none().0,
))
}
}
fn get_narrow_ellipsize(&self) -> pango::EllipsizeMode {
unsafe {
from_glib(handy_sys::hdy_view_switcher_get_narrow_ellipsize(
@ -475,15 +452,6 @@ impl<O: IsA<ViewSwitcher>> ViewSwitcherExt for O {
}
}
fn set_icon_size(&self, icon_size: gtk::IconSize) {
unsafe {
handy_sys::hdy_view_switcher_set_icon_size(
self.as_ref().to_glib_none().0,
icon_size.to_glib(),
);
}
}
fn set_narrow_ellipsize(&self, mode: pango::EllipsizeMode) {
unsafe {
handy_sys::hdy_view_switcher_set_narrow_ellipsize(
@ -511,30 +479,6 @@ impl<O: IsA<ViewSwitcher>> ViewSwitcherExt for O {
}
}
fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_icon_size_trampoline<P, F: Fn(&P) + 'static>(
this: *mut handy_sys::HdyViewSwitcher,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
) where
P: IsA<ViewSwitcher>,
{
let f: &F = &*(f as *const F);
f(&ViewSwitcher::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::icon-size\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
notify_icon_size_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
)
}
}
fn connect_property_narrow_ellipsize_notify<F: Fn(&Self) + 'static>(
&self,
f: F,

View file

@ -41,7 +41,6 @@ impl Default for ViewSwitcherBar {
#[derive(Clone, Default)]
pub struct ViewSwitcherBarBuilder {
icon_size: Option<i32>,
policy: Option<ViewSwitcherPolicy>,
reveal: Option<bool>,
stack: Option<gtk::Stack>,
@ -90,9 +89,6 @@ impl ViewSwitcherBarBuilder {
pub fn build(self) -> ViewSwitcherBar {
let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
if let Some(ref icon_size) = self.icon_size {
properties.push(("icon-size", icon_size));
}
if let Some(ref policy) = self.policy {
properties.push(("policy", policy));
}
@ -214,11 +210,6 @@ impl ViewSwitcherBarBuilder {
ret
}
pub fn icon_size(mut self, icon_size: i32) -> Self {
self.icon_size = Some(icon_size);
self
}
pub fn policy(mut self, policy: ViewSwitcherPolicy) -> Self {
self.policy = Some(policy);
self
@ -413,24 +404,18 @@ impl ViewSwitcherBarBuilder {
pub const NONE_VIEW_SWITCHER_BAR: Option<&ViewSwitcherBar> = None;
pub trait ViewSwitcherBarExt: 'static {
fn get_icon_size(&self) -> gtk::IconSize;
fn get_policy(&self) -> ViewSwitcherPolicy;
fn get_reveal(&self) -> bool;
fn get_stack(&self) -> Option<gtk::Stack>;
fn set_icon_size(&self, icon_size: gtk::IconSize);
fn set_policy(&self, policy: ViewSwitcherPolicy);
fn set_reveal(&self, reveal: bool);
fn set_stack<P: IsA<gtk::Stack>>(&self, stack: Option<&P>);
fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_policy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_reveal_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
@ -439,14 +424,6 @@ pub trait ViewSwitcherBarExt: 'static {
}
impl<O: IsA<ViewSwitcherBar>> ViewSwitcherBarExt for O {
fn get_icon_size(&self) -> gtk::IconSize {
unsafe {
from_glib(handy_sys::hdy_view_switcher_bar_get_icon_size(
self.as_ref().to_glib_none().0,
))
}
}
fn get_policy(&self) -> ViewSwitcherPolicy {
unsafe {
from_glib(handy_sys::hdy_view_switcher_bar_get_policy(
@ -471,15 +448,6 @@ impl<O: IsA<ViewSwitcherBar>> ViewSwitcherBarExt for O {
}
}
fn set_icon_size(&self, icon_size: gtk::IconSize) {
unsafe {
handy_sys::hdy_view_switcher_bar_set_icon_size(
self.as_ref().to_glib_none().0,
icon_size.to_glib(),
);
}
}
fn set_policy(&self, policy: ViewSwitcherPolicy) {
unsafe {
handy_sys::hdy_view_switcher_bar_set_policy(
@ -507,30 +475,6 @@ impl<O: IsA<ViewSwitcherBar>> ViewSwitcherBarExt for O {
}
}
fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_icon_size_trampoline<P, F: Fn(&P) + 'static>(
this: *mut handy_sys::HdyViewSwitcherBar,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
) where
P: IsA<ViewSwitcherBar>,
{
let f: &F = &*(f as *const F);
f(&ViewSwitcherBar::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::icon-size\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
notify_icon_size_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
)
}
}
fn connect_property_policy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_policy_trampoline<P, F: Fn(&P) + 'static>(
this: *mut handy_sys::HdyViewSwitcherBar,

View file

@ -42,7 +42,6 @@ impl Default for ViewSwitcherTitle {
#[derive(Clone, Default)]
pub struct ViewSwitcherTitleBuilder {
icon_size: Option<i32>,
policy: Option<ViewSwitcherPolicy>,
stack: Option<gtk::Stack>,
subtitle: Option<String>,
@ -93,9 +92,6 @@ impl ViewSwitcherTitleBuilder {
pub fn build(self) -> ViewSwitcherTitle {
let mut properties: Vec<(&str, &dyn ToValue)> = vec![];
if let Some(ref icon_size) = self.icon_size {
properties.push(("icon-size", icon_size));
}
if let Some(ref policy) = self.policy {
properties.push(("policy", policy));
}
@ -223,11 +219,6 @@ impl ViewSwitcherTitleBuilder {
ret
}
pub fn icon_size(mut self, icon_size: i32) -> Self {
self.icon_size = Some(icon_size);
self
}
pub fn policy(mut self, policy: ViewSwitcherPolicy) -> Self {
self.policy = Some(policy);
self
@ -432,8 +423,6 @@ impl ViewSwitcherTitleBuilder {
pub const NONE_VIEW_SWITCHER_TITLE: Option<&ViewSwitcherTitle> = None;
pub trait ViewSwitcherTitleExt: 'static {
fn get_icon_size(&self) -> gtk::IconSize;
fn get_policy(&self) -> ViewSwitcherPolicy;
fn get_stack(&self) -> Option<gtk::Stack>;
@ -446,8 +435,6 @@ pub trait ViewSwitcherTitleExt: 'static {
fn get_view_switcher_enabled(&self) -> bool;
fn set_icon_size(&self, icon_size: gtk::IconSize);
fn set_policy(&self, policy: ViewSwitcherPolicy);
fn set_stack<P: IsA<gtk::Stack>>(&self, stack: Option<&P>);
@ -458,8 +445,6 @@ pub trait ViewSwitcherTitleExt: 'static {
fn set_view_switcher_enabled(&self, enabled: bool);
fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_policy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_property_stack_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
@ -480,14 +465,6 @@ pub trait ViewSwitcherTitleExt: 'static {
}
impl<O: IsA<ViewSwitcherTitle>> ViewSwitcherTitleExt for O {
fn get_icon_size(&self) -> gtk::IconSize {
unsafe {
from_glib(handy_sys::hdy_view_switcher_title_get_icon_size(
self.as_ref().to_glib_none().0,
))
}
}
fn get_policy(&self) -> ViewSwitcherPolicy {
unsafe {
from_glib(handy_sys::hdy_view_switcher_title_get_policy(
@ -538,15 +515,6 @@ impl<O: IsA<ViewSwitcherTitle>> ViewSwitcherTitleExt for O {
}
}
fn set_icon_size(&self, icon_size: gtk::IconSize) {
unsafe {
handy_sys::hdy_view_switcher_title_set_icon_size(
self.as_ref().to_glib_none().0,
icon_size.to_glib(),
);
}
}
fn set_policy(&self, policy: ViewSwitcherPolicy) {
unsafe {
handy_sys::hdy_view_switcher_title_set_policy(
@ -592,30 +560,6 @@ impl<O: IsA<ViewSwitcherTitle>> ViewSwitcherTitleExt for O {
}
}
fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_icon_size_trampoline<P, F: Fn(&P) + 'static>(
this: *mut handy_sys::HdyViewSwitcherTitle,
_param_spec: glib_sys::gpointer,
f: glib_sys::gpointer,
) where
P: IsA<ViewSwitcherTitle>,
{
let f: &F = &*(f as *const F);
f(&ViewSwitcherTitle::from_glib_borrow(this).unsafe_cast_ref())
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::icon-size\0".as_ptr() as *const _,
Some(transmute::<_, unsafe extern "C" fn()>(
notify_icon_size_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
)
}
}
fn connect_property_policy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_policy_trampoline<P, F: Fn(&P) + 'static>(
this: *mut handy_sys::HdyViewSwitcherTitle,

View file

@ -1,3 +1,3 @@
[wrap-git]
url = https://gitlab.gnome.org/GNOME/libhandy.git
revision = ca9430d8e65d968013687f9b58b21d15187e74e5
revision = c7aaf6f4f50b64ee55fcfee84000e9525fc5f93a