Skip to content

Commit 0c94048

Browse files
committed
libhelium: sync with latest GIR
1 parent 41fb0c6 commit 0c94048

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+23938
-10488
lines changed

He-1.gir

Lines changed: 2519 additions & 192 deletions
Large diffs are not rendered by default.

libhelium/Gir.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ manual = [
151151
"GLib.Regex",
152152
"Gtk.Grid",
153153
"Gtk.DropDown",
154-
"Pango.EllipsizeMode",
154+
"Pango.EllipsizeMode"
155155
]
156156

157157
[[object]]

libhelium/src/auto/about_window.rs

Lines changed: 663 additions & 290 deletions
Large diffs are not rendered by default.

libhelium/src/auto/animation.rs

Lines changed: 87 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
// This file was generated by gir (https://github.com/gtk-rs/gir)
2-
// from
2+
// from
33
// from gir-files (https://github.com/gtk-rs/gir-files.git)
44
// DO NOT EDIT
55

6-
use crate::{ffi,AnimationState,AnimationTarget};
7-
use glib::{prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
8-
use std::{boxed::Box as Box_};
6+
use crate::{ffi, AnimationState, AnimationTarget};
7+
use glib::{
8+
prelude::*,
9+
signal::{connect_raw, SignalHandlerId},
10+
translate::*,
11+
};
12+
use std::boxed::Box as Box_;
913

1014
glib::wrapper! {
1115
#[doc(alias = "HeAnimation")]
@@ -17,8 +21,7 @@ glib::wrapper! {
1721
}
1822

1923
impl Animation {
20-
pub const NONE: Option<&'static Animation> = None;
21-
24+
pub const NONE: Option<&'static Animation> = None;
2225
}
2326

2427
mod sealed {
@@ -64,24 +67,18 @@ pub trait AnimationExt: IsA<Animation> + sealed::Sealed + 'static {
6467

6568
#[doc(alias = "he_animation_estimate_duration")]
6669
fn estimate_duration(&self) -> u32 {
67-
unsafe {
68-
ffi::he_animation_estimate_duration(self.as_ref().to_glib_none().0)
69-
}
70+
unsafe { ffi::he_animation_estimate_duration(self.as_ref().to_glib_none().0) }
7071
}
7172

7273
#[doc(alias = "he_animation_calculate_value")]
7374
fn calculate_value(&self, t: u32) -> f64 {
74-
unsafe {
75-
ffi::he_animation_calculate_value(self.as_ref().to_glib_none().0, t)
76-
}
75+
unsafe { ffi::he_animation_calculate_value(self.as_ref().to_glib_none().0, t) }
7776
}
7877

7978
#[doc(alias = "he_animation_get_state")]
8079
#[doc(alias = "get_state")]
8180
fn state(&self) -> AnimationState {
82-
unsafe {
83-
from_glib(ffi::he_animation_get_state(self.as_ref().to_glib_none().0))
84-
}
81+
unsafe { from_glib(ffi::he_animation_get_state(self.as_ref().to_glib_none().0)) }
8582
}
8683

8784
#[doc(alias = "he_animation_set_state")]
@@ -94,39 +91,39 @@ pub trait AnimationExt: IsA<Animation> + sealed::Sealed + 'static {
9491
#[doc(alias = "he_animation_get_target")]
9592
#[doc(alias = "get_target")]
9693
fn target(&self) -> AnimationTarget {
97-
unsafe {
98-
from_glib_none(ffi::he_animation_get_target(self.as_ref().to_glib_none().0))
99-
}
94+
unsafe { from_glib_none(ffi::he_animation_get_target(self.as_ref().to_glib_none().0)) }
10095
}
10196

10297
#[doc(alias = "he_animation_set_target")]
10398
fn set_target(&self, value: &impl IsA<AnimationTarget>) {
10499
unsafe {
105-
ffi::he_animation_set_target(self.as_ref().to_glib_none().0, value.as_ref().to_glib_none().0);
100+
ffi::he_animation_set_target(
101+
self.as_ref().to_glib_none().0,
102+
value.as_ref().to_glib_none().0,
103+
);
106104
}
107105
}
108106

109107
#[doc(alias = "he_animation_get_widget")]
110108
#[doc(alias = "get_widget")]
111109
fn widget(&self) -> gtk::Widget {
112-
unsafe {
113-
from_glib_none(ffi::he_animation_get_widget(self.as_ref().to_glib_none().0))
114-
}
110+
unsafe { from_glib_none(ffi::he_animation_get_widget(self.as_ref().to_glib_none().0)) }
115111
}
116112

117113
#[doc(alias = "he_animation_set_widget")]
118114
fn set_widget(&self, value: &impl IsA<gtk::Widget>) {
119115
unsafe {
120-
ffi::he_animation_set_widget(self.as_ref().to_glib_none().0, value.as_ref().to_glib_none().0);
116+
ffi::he_animation_set_widget(
117+
self.as_ref().to_glib_none().0,
118+
value.as_ref().to_glib_none().0,
119+
);
121120
}
122121
}
123122

124123
#[doc(alias = "he_animation_get_avalue")]
125124
#[doc(alias = "get_avalue")]
126125
fn avalue(&self) -> f64 {
127-
unsafe {
128-
ffi::he_animation_get_avalue(self.as_ref().to_glib_none().0)
129-
}
126+
unsafe { ffi::he_animation_get_avalue(self.as_ref().to_glib_none().0) }
130127
}
131128

132129
#[doc(alias = "he_animation_set_avalue")]
@@ -138,66 +135,115 @@ pub trait AnimationExt: IsA<Animation> + sealed::Sealed + 'static {
138135

139136
#[doc(alias = "done")]
140137
fn connect_done<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
141-
unsafe extern "C" fn done_trampoline<P: IsA<Animation>, F: Fn(&P) + 'static>(this: *mut ffi::HeAnimation, f: glib::ffi::gpointer) {
138+
unsafe extern "C" fn done_trampoline<P: IsA<Animation>, F: Fn(&P) + 'static>(
139+
this: *mut ffi::HeAnimation,
140+
f: glib::ffi::gpointer,
141+
) {
142142
let f: &F = &*(f as *const F);
143143
f(Animation::from_glib_borrow(this).unsafe_cast_ref())
144144
}
145145
unsafe {
146146
let f: Box_<F> = Box_::new(f);
147-
connect_raw(self.as_ptr() as *mut _, b"done\0".as_ptr() as *const _,
148-
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(done_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
147+
connect_raw(
148+
self.as_ptr() as *mut _,
149+
b"done\0".as_ptr() as *const _,
150+
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
151+
done_trampoline::<Self, F> as *const (),
152+
)),
153+
Box_::into_raw(f),
154+
)
149155
}
150156
}
151157

152158
#[doc(alias = "state")]
153159
fn connect_state_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
154-
unsafe extern "C" fn notify_state_trampoline<P: IsA<Animation>, F: Fn(&P) + 'static>(this: *mut ffi::HeAnimation, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
160+
unsafe extern "C" fn notify_state_trampoline<P: IsA<Animation>, F: Fn(&P) + 'static>(
161+
this: *mut ffi::HeAnimation,
162+
_param_spec: glib::ffi::gpointer,
163+
f: glib::ffi::gpointer,
164+
) {
155165
let f: &F = &*(f as *const F);
156166
f(Animation::from_glib_borrow(this).unsafe_cast_ref())
157167
}
158168
unsafe {
159169
let f: Box_<F> = Box_::new(f);
160-
connect_raw(self.as_ptr() as *mut _, b"notify::state\0".as_ptr() as *const _,
161-
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_state_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
170+
connect_raw(
171+
self.as_ptr() as *mut _,
172+
b"notify::state\0".as_ptr() as *const _,
173+
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
174+
notify_state_trampoline::<Self, F> as *const (),
175+
)),
176+
Box_::into_raw(f),
177+
)
162178
}
163179
}
164180

165181
#[doc(alias = "target")]
166182
fn connect_target_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
167-
unsafe extern "C" fn notify_target_trampoline<P: IsA<Animation>, F: Fn(&P) + 'static>(this: *mut ffi::HeAnimation, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
183+
unsafe extern "C" fn notify_target_trampoline<P: IsA<Animation>, F: Fn(&P) + 'static>(
184+
this: *mut ffi::HeAnimation,
185+
_param_spec: glib::ffi::gpointer,
186+
f: glib::ffi::gpointer,
187+
) {
168188
let f: &F = &*(f as *const F);
169189
f(Animation::from_glib_borrow(this).unsafe_cast_ref())
170190
}
171191
unsafe {
172192
let f: Box_<F> = Box_::new(f);
173-
connect_raw(self.as_ptr() as *mut _, b"notify::target\0".as_ptr() as *const _,
174-
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_target_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
193+
connect_raw(
194+
self.as_ptr() as *mut _,
195+
b"notify::target\0".as_ptr() as *const _,
196+
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
197+
notify_target_trampoline::<Self, F> as *const (),
198+
)),
199+
Box_::into_raw(f),
200+
)
175201
}
176202
}
177203

178204
#[doc(alias = "widget")]
179205
fn connect_widget_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
180-
unsafe extern "C" fn notify_widget_trampoline<P: IsA<Animation>, F: Fn(&P) + 'static>(this: *mut ffi::HeAnimation, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
206+
unsafe extern "C" fn notify_widget_trampoline<P: IsA<Animation>, F: Fn(&P) + 'static>(
207+
this: *mut ffi::HeAnimation,
208+
_param_spec: glib::ffi::gpointer,
209+
f: glib::ffi::gpointer,
210+
) {
181211
let f: &F = &*(f as *const F);
182212
f(Animation::from_glib_borrow(this).unsafe_cast_ref())
183213
}
184214
unsafe {
185215
let f: Box_<F> = Box_::new(f);
186-
connect_raw(self.as_ptr() as *mut _, b"notify::widget\0".as_ptr() as *const _,
187-
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_widget_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
216+
connect_raw(
217+
self.as_ptr() as *mut _,
218+
b"notify::widget\0".as_ptr() as *const _,
219+
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
220+
notify_widget_trampoline::<Self, F> as *const (),
221+
)),
222+
Box_::into_raw(f),
223+
)
188224
}
189225
}
190226

191227
#[doc(alias = "avalue")]
192228
fn connect_avalue_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
193-
unsafe extern "C" fn notify_avalue_trampoline<P: IsA<Animation>, F: Fn(&P) + 'static>(this: *mut ffi::HeAnimation, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
229+
unsafe extern "C" fn notify_avalue_trampoline<P: IsA<Animation>, F: Fn(&P) + 'static>(
230+
this: *mut ffi::HeAnimation,
231+
_param_spec: glib::ffi::gpointer,
232+
f: glib::ffi::gpointer,
233+
) {
194234
let f: &F = &*(f as *const F);
195235
f(Animation::from_glib_borrow(this).unsafe_cast_ref())
196236
}
197237
unsafe {
198238
let f: Box_<F> = Box_::new(f);
199-
connect_raw(self.as_ptr() as *mut _, b"notify::avalue\0".as_ptr() as *const _,
200-
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_avalue_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
239+
connect_raw(
240+
self.as_ptr() as *mut _,
241+
b"notify::avalue\0".as_ptr() as *const _,
242+
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
243+
notify_avalue_trampoline::<Self, F> as *const (),
244+
)),
245+
Box_::into_raw(f),
246+
)
201247
}
202248
}
203249
}

libhelium/src/auto/animation_target.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// This file was generated by gir (https://github.com/gtk-rs/gir)
2-
// from
2+
// from
33
// from gir-files (https://github.com/gtk-rs/gir-files.git)
44
// DO NOT EDIT
55

6-
use crate::{ffi};
7-
use glib::{prelude::*,translate::*};
6+
use crate::ffi;
7+
use glib::{prelude::*, translate::*};
88

99
glib::wrapper! {
1010
#[doc(alias = "HeAnimationTarget")]
@@ -16,8 +16,7 @@ glib::wrapper! {
1616
}
1717

1818
impl AnimationTarget {
19-
pub const NONE: Option<&'static AnimationTarget> = None;
20-
19+
pub const NONE: Option<&'static AnimationTarget> = None;
2120
}
2221

2322
mod sealed {

0 commit comments

Comments
 (0)