Skip to content

Commit

Permalink
Merge pull request gtk-rs#124 from gtk-rs/bilelmoussaoui/gtk-4.0.0
Browse files Browse the repository at this point in the history
Regenerate with gtk 4.0.0
  • Loading branch information
sdroege authored Dec 17, 2020
2 parents 0eeb567 + bae2b4f commit ed42cea
Show file tree
Hide file tree
Showing 19 changed files with 63 additions and 63 deletions.
2 changes: 1 addition & 1 deletion gdk4-wayland/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 6ec2baf)
from gir-files (https://github.com/gtk-rs/gir-files @ 071f41f)
from gir-files (https://github.com/gtk-rs/gir-files @ a8cfb0c)
2 changes: 1 addition & 1 deletion gdk4-wayland/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 6ec2baf)
from gir-files (https://github.com/gtk-rs/gir-files @ 071f41f)
from gir-files (https://github.com/gtk-rs/gir-files @ a8cfb0c)
2 changes: 1 addition & 1 deletion gdk4-x11/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 6ec2baf)
from gir-files (https://github.com/gtk-rs/gir-files @ 071f41f)
from gir-files (https://github.com/gtk-rs/gir-files @ a8cfb0c)
17 changes: 0 additions & 17 deletions gdk4-x11/src/auto/x11_device_xi2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::X11DeviceType;
use glib::object::Cast;
use glib::object::IsA;
use glib::object::ObjectType as ObjectType_;
Expand All @@ -20,22 +19,6 @@ glib::glib_wrapper! {
}

impl X11DeviceXI2 {
#[doc(alias = "gdk_x11_device_xi2_get_device_type")]
pub fn get_device_type(&self) -> X11DeviceType {
unsafe {
from_glib(ffi::gdk_x11_device_xi2_get_device_type(
self.to_glib_none().0,
))
}
}

#[doc(alias = "gdk_x11_device_xi2_set_device_type")]
pub fn set_device_type(&self, type_: X11DeviceType) {
unsafe {
ffi::gdk_x11_device_xi2_set_device_type(self.to_glib_none().0, type_.to_glib());
}
}

pub fn get_property_device_id(&self) -> i32 {
unsafe {
let mut value = glib::Value::from_type(<i32 as StaticType>::static_type());
Expand Down
5 changes: 0 additions & 5 deletions gdk4-x11/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@ extern "C" {
// GdkX11DeviceXI2
//=========================================================================
pub fn gdk_x11_device_xi2_get_type() -> GType;
pub fn gdk_x11_device_xi2_get_device_type(device: *mut GdkX11DeviceXI2) -> GdkX11DeviceType;
pub fn gdk_x11_device_xi2_set_device_type(
device: *mut GdkX11DeviceXI2,
type_: GdkX11DeviceType,
);

//=========================================================================
// GdkX11Display
Expand Down
2 changes: 1 addition & 1 deletion gdk4-x11/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 6ec2baf)
from gir-files (https://github.com/gtk-rs/gir-files @ 071f41f)
from gir-files (https://github.com/gtk-rs/gir-files @ a8cfb0c)
29 changes: 23 additions & 6 deletions gdk4/src/auto/toplevel_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use crate::Monitor;
use glib::translate::*;
use std::mem;

glib::glib_wrapper! {
#[derive(Debug, PartialOrd, Ord, Hash)]
Expand Down Expand Up @@ -39,11 +40,19 @@ impl ToplevelLayout {
}

#[doc(alias = "gdk_toplevel_layout_get_fullscreen")]
pub fn get_fullscreen(&self) -> bool {
pub fn get_fullscreen(&self) -> Option<bool> {
unsafe {
from_glib(ffi::gdk_toplevel_layout_get_fullscreen(
let mut fullscreen = mem::MaybeUninit::uninit();
let ret = from_glib(ffi::gdk_toplevel_layout_get_fullscreen(
self.to_glib_none().0,
))
fullscreen.as_mut_ptr(),
));
let fullscreen = fullscreen.assume_init();
if ret {
Some(from_glib(fullscreen))
} else {
None
}
}
}

Expand All @@ -57,11 +66,19 @@ impl ToplevelLayout {
}

#[doc(alias = "gdk_toplevel_layout_get_maximized")]
pub fn get_maximized(&self) -> bool {
pub fn get_maximized(&self) -> Option<bool> {
unsafe {
from_glib(ffi::gdk_toplevel_layout_get_maximized(
let mut maximized = mem::MaybeUninit::uninit();
let ret = from_glib(ffi::gdk_toplevel_layout_get_maximized(
self.to_glib_none().0,
))
maximized.as_mut_ptr(),
));
let maximized = maximized.assume_init();
if ret {
Some(from_glib(maximized))
} else {
None
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 6ec2baf)
from gir-files (https://github.com/gtk-rs/gir-files @ 071f41f)
from gir-files (https://github.com/gtk-rs/gir-files @ a8cfb0c)
10 changes: 8 additions & 2 deletions gdk4/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3618,11 +3618,17 @@ extern "C" {
layout: *mut GdkToplevelLayout,
other: *mut GdkToplevelLayout,
) -> gboolean;
pub fn gdk_toplevel_layout_get_fullscreen(layout: *mut GdkToplevelLayout) -> gboolean;
pub fn gdk_toplevel_layout_get_fullscreen(
layout: *mut GdkToplevelLayout,
fullscreen: *mut gboolean,
) -> gboolean;
pub fn gdk_toplevel_layout_get_fullscreen_monitor(
layout: *mut GdkToplevelLayout,
) -> *mut GdkMonitor;
pub fn gdk_toplevel_layout_get_maximized(layout: *mut GdkToplevelLayout) -> gboolean;
pub fn gdk_toplevel_layout_get_maximized(
layout: *mut GdkToplevelLayout,
maximized: *mut gboolean,
) -> gboolean;
pub fn gdk_toplevel_layout_get_resizable(layout: *mut GdkToplevelLayout) -> gboolean;
pub fn gdk_toplevel_layout_ref(layout: *mut GdkToplevelLayout) -> *mut GdkToplevelLayout;
pub fn gdk_toplevel_layout_set_fullscreen(
Expand Down
2 changes: 1 addition & 1 deletion gdk4/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 6ec2baf)
from gir-files (https://github.com/gtk-rs/gir-files @ 071f41f)
from gir-files (https://github.com/gtk-rs/gir-files @ a8cfb0c)
2 changes: 1 addition & 1 deletion gir-files
Submodule gir-files updated 4 files
+32 −6 Gdk-4.0.gir
+0 −25 GdkX11-4.0.gir
+1 −0 Gsk-4.0.gir
+106 −31 Gtk-4.0.gir
2 changes: 1 addition & 1 deletion gsk4/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 6ec2baf)
from gir-files (https://github.com/gtk-rs/gir-files @ 071f41f)
from gir-files (https://github.com/gtk-rs/gir-files @ a8cfb0c)
2 changes: 1 addition & 1 deletion gsk4/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 6ec2baf)
from gir-files (https://github.com/gtk-rs/gir-files @ 071f41f)
from gir-files (https://github.com/gtk-rs/gir-files @ a8cfb0c)
6 changes: 3 additions & 3 deletions gtk4/src/auto/cell_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub trait CellRendererExt: 'static {
fn set_fixed_size(&self, width: i32, height: i32);

#[doc(alias = "gtk_cell_renderer_set_is_expanded")]
fn set_is_expanded(&self, is_expander: bool);
fn set_is_expanded(&self, is_expanded: bool);

#[doc(alias = "gtk_cell_renderer_set_is_expander")]
fn set_is_expander(&self, is_expander: bool);
Expand Down Expand Up @@ -479,11 +479,11 @@ impl<O: IsA<CellRenderer>> CellRendererExt for O {
}
}

fn set_is_expanded(&self, is_expander: bool) {
fn set_is_expanded(&self, is_expanded: bool) {
unsafe {
ffi::gtk_cell_renderer_set_is_expanded(
self.as_ref().to_glib_none().0,
is_expander.to_glib(),
is_expanded.to_glib(),
);
}
}
Expand Down
24 changes: 12 additions & 12 deletions gtk4/src/auto/gesture_stylus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ impl GestureStylus {
pub fn connect_down<F: Fn(&GestureStylus, f64, f64) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn down_trampoline<F: Fn(&GestureStylus, f64, f64) + 'static>(
this: *mut ffi::GtkGestureStylus,
object: libc::c_double,
p0: libc::c_double,
x: libc::c_double,
y: libc::c_double,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this), object, p0)
f(&from_glib_borrow(this), x, y)
}
unsafe {
let f: Box_<F> = Box_::new(f);
Expand All @@ -113,12 +113,12 @@ impl GestureStylus {
) -> SignalHandlerId {
unsafe extern "C" fn motion_trampoline<F: Fn(&GestureStylus, f64, f64) + 'static>(
this: *mut ffi::GtkGestureStylus,
object: libc::c_double,
p0: libc::c_double,
x: libc::c_double,
y: libc::c_double,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this), object, p0)
f(&from_glib_borrow(this), x, y)
}
unsafe {
let f: Box_<F> = Box_::new(f);
Expand All @@ -139,12 +139,12 @@ impl GestureStylus {
) -> SignalHandlerId {
unsafe extern "C" fn proximity_trampoline<F: Fn(&GestureStylus, f64, f64) + 'static>(
this: *mut ffi::GtkGestureStylus,
object: libc::c_double,
p0: libc::c_double,
x: libc::c_double,
y: libc::c_double,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this), object, p0)
f(&from_glib_borrow(this), x, y)
}
unsafe {
let f: Box_<F> = Box_::new(f);
Expand All @@ -162,12 +162,12 @@ impl GestureStylus {
pub fn connect_up<F: Fn(&GestureStylus, f64, f64) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn up_trampoline<F: Fn(&GestureStylus, f64, f64) + 'static>(
this: *mut ffi::GtkGestureStylus,
object: libc::c_double,
p0: libc::c_double,
x: libc::c_double,
y: libc::c_double,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this), object, p0)
f(&from_glib_borrow(this), x, y)
}
unsafe {
let f: Box_<F> = Box_::new(f);
Expand Down
10 changes: 5 additions & 5 deletions gtk4/src/auto/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ impl Settings {
}
}

pub fn get_property_gtk_cursor_aspect_ratio(&self) -> f32 {
pub fn get_property_gtk_cursor_aspect_ratio(&self) -> f64 {
unsafe {
let mut value = glib::Value::from_type(<f32 as StaticType>::static_type());
let mut value = glib::Value::from_type(<f64 as StaticType>::static_type());
glib::gobject_ffi::g_object_get_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
b"gtk-cursor-aspect-ratio\0".as_ptr() as *const _,
Expand All @@ -129,7 +129,7 @@ impl Settings {
}
}

pub fn set_property_gtk_cursor_aspect_ratio(&self, gtk_cursor_aspect_ratio: f32) {
pub fn set_property_gtk_cursor_aspect_ratio(&self, gtk_cursor_aspect_ratio: f64) {
unsafe {
glib::gobject_ffi::g_object_set_property(
self.as_ptr() as *mut glib::gobject_ffi::GObject,
Expand Down Expand Up @@ -2582,7 +2582,7 @@ pub struct SettingsBuilder {
gtk_alternative_button_order: Option<bool>,
gtk_alternative_sort_arrows: Option<bool>,
gtk_application_prefer_dark_theme: Option<bool>,
gtk_cursor_aspect_ratio: Option<f32>,
gtk_cursor_aspect_ratio: Option<f64>,
gtk_cursor_blink: Option<bool>,
gtk_cursor_blink_time: Option<i32>,
gtk_cursor_blink_timeout: Option<i32>,
Expand Down Expand Up @@ -2822,7 +2822,7 @@ impl SettingsBuilder {
self
}

pub fn gtk_cursor_aspect_ratio(mut self, gtk_cursor_aspect_ratio: f32) -> Self {
pub fn gtk_cursor_aspect_ratio(mut self, gtk_cursor_aspect_ratio: f64) -> Self {
self.gtk_cursor_aspect_ratio = Some(gtk_cursor_aspect_ratio);
self
}
Expand Down
2 changes: 1 addition & 1 deletion gtk4/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 6ec2baf)
from gir-files (https://github.com/gtk-rs/gir-files @ 071f41f)
from gir-files (https://github.com/gtk-rs/gir-files @ a8cfb0c)
3 changes: 1 addition & 2 deletions gtk4/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3235,7 +3235,6 @@ pub struct GtkNativeDialogClass {
impl ::std::fmt::Debug for GtkNativeDialogClass {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GtkNativeDialogClass @ {:?}", self as *const _))
.field("parent_class", &self.parent_class)
.field("response", &self.response)
.field("show", &self.show)
.field("hide", &self.hide)
Expand Down Expand Up @@ -10069,7 +10068,7 @@ extern "C" {
width: c_int,
height: c_int,
);
pub fn gtk_cell_renderer_set_is_expanded(cell: *mut GtkCellRenderer, is_expander: gboolean);
pub fn gtk_cell_renderer_set_is_expanded(cell: *mut GtkCellRenderer, is_expanded: gboolean);
pub fn gtk_cell_renderer_set_is_expander(cell: *mut GtkCellRenderer, is_expander: gboolean);
pub fn gtk_cell_renderer_set_padding(cell: *mut GtkCellRenderer, xpad: c_int, ypad: c_int);
pub fn gtk_cell_renderer_set_sensitive(cell: *mut GtkCellRenderer, sensitive: gboolean);
Expand Down
2 changes: 1 addition & 1 deletion gtk4/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 6ec2baf)
from gir-files (https://github.com/gtk-rs/gir-files @ 071f41f)
from gir-files (https://github.com/gtk-rs/gir-files @ a8cfb0c)

0 comments on commit ed42cea

Please sign in to comment.