Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
conf:
- {
name: "gtk4",
features: "v4_20,xml_validation,blueprint",
features: "v4_22,xml_validation,blueprint",
test_sys: false,
}
- { name: "gsk4", features: "v4_20,broadway,vulkan", test_sys: true }
Expand Down Expand Up @@ -140,6 +140,7 @@ jobs:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- run: git submodule update --checkout
- run: python3 ./generator.py --yes ./
- run: git diff --exit-code
Expand All @@ -157,6 +158,7 @@ jobs:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- run: git submodule update --checkout
- run: cargo install rustdoc-stripper
- run: python3 generator.py --embed-docs
Expand Down
4 changes: 2 additions & 2 deletions gdk4-macos/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 @ 7047e1b433e2)
from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)
Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
4 changes: 2 additions & 2 deletions gdk4-macos/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 @ 7047e1b433e2)
from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)
Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
4 changes: 2 additions & 2 deletions 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 @ 7047e1b433e2)
from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)
Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
4 changes: 2 additions & 2 deletions 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 @ 7047e1b433e2)
from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)
Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
4 changes: 2 additions & 2 deletions gdk4-win32/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 @ 7047e1b433e2)
from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)
Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
4 changes: 2 additions & 2 deletions gdk4-win32/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 @ 7047e1b433e2)
from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)
Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
4 changes: 2 additions & 2 deletions 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 @ 7047e1b433e2)
from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)
Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
4 changes: 2 additions & 2 deletions 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 @ 7047e1b433e2)
from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)
Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
2 changes: 1 addition & 1 deletion gdk4/src/auto/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ pub trait SurfaceExt: IsA<Surface> + 'static {
}

#[doc(alias = "gdk_surface_set_input_region")]
fn set_input_region(&self, region: &cairo::Region) {
fn set_input_region(&self, region: Option<&cairo::Region>) {
unsafe {
ffi::gdk_surface_set_input_region(
self.as_ref().to_glib_none().0,
Expand Down
4 changes: 2 additions & 2 deletions 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 @ 7047e1b433e2)
from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)
Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
4 changes: 2 additions & 2 deletions 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 @ 7047e1b433e2)
from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)
Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
2 changes: 1 addition & 1 deletion gir
2 changes: 1 addition & 1 deletion gir-files
4 changes: 2 additions & 2 deletions 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 @ 7047e1b433e2)
from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)
Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
4 changes: 2 additions & 2 deletions 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 @ 7047e1b433e2)
from gir-files (https://github.com/gtk-rs/gir-files @ 1490bcc19dc8)
Generated by gir (https://github.com/gtk-rs/gir @ be9aa145267c)
from gir-files (https://github.com/gtk-rs/gir-files @ e121d92cee84)
1 change: 1 addition & 0 deletions gtk4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ v4_14 = ["gtk4-sys/v4_14", "v4_12", "gdk/v4_14", "gsk/v4_14"]
v4_16 = ["gtk4-sys/v4_16", "v4_14", "gdk/v4_16", "gsk/v4_16"]
v4_18 = ["gtk4-sys/v4_18", "gdk/v4_18", "v4_16"]
v4_20 = ["gtk4-sys/v4_20", "gdk/v4_20", "gsk/v4_20", "v4_18"]
v4_22 = ["gtk4-sys/v4_22", "v4_20"]
gio_v2_80 = ["gio/v2_80"]
xml_validation = ["gtk4-macros/xml_validation"]
blueprint = ["gtk4-macros/blueprint"]
Expand Down
1 change: 1 addition & 0 deletions gtk4/Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ generate = [
"Gtk.PanDirection",
"Gtk.PasswordEntry",
"Gtk.PasswordEntryBuffer",
"Gtk.PathPaintable",
"Gtk.PickFlags",
"Gtk.PolicyType",
"Gtk.PopoverMenu",
Expand Down
1 change: 1 addition & 0 deletions gtk4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ gtk = { git = "https://github.com/gtk-rs/gtk4-rs.git", package = "gtk4" }

| Feature | Description |
| --- | ----------- |
| `v4_22` | Enable the new APIs part of GTK 4.22 |
| `v4_20` | Enable the new APIs part of GTK 4.20 |
| `v4_18` | Enable the new APIs part of GTK 4.18 |
| `v4_16` | Enable the new APIs part of GTK 4.16 |
Expand Down
8 changes: 8 additions & 0 deletions gtk4/src/auto/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11320,6 +11320,10 @@ pub enum SymbolicColor {
Warning,
#[doc(alias = "GTK_SYMBOLIC_COLOR_SUCCESS")]
Success,
#[cfg(feature = "v4_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
#[doc(alias = "GTK_SYMBOLIC_COLOR_ACCENT")]
Accent,
#[doc(hidden)]
__Unknown(i32),
}
Expand All @@ -11337,6 +11341,8 @@ impl IntoGlib for SymbolicColor {
Self::Error => ffi::GTK_SYMBOLIC_COLOR_ERROR,
Self::Warning => ffi::GTK_SYMBOLIC_COLOR_WARNING,
Self::Success => ffi::GTK_SYMBOLIC_COLOR_SUCCESS,
#[cfg(feature = "v4_22")]
Self::Accent => ffi::GTK_SYMBOLIC_COLOR_ACCENT,
Self::__Unknown(value) => value,
}
}
Expand All @@ -11355,6 +11361,8 @@ impl FromGlib<ffi::GtkSymbolicColor> for SymbolicColor {
ffi::GTK_SYMBOLIC_COLOR_ERROR => Self::Error,
ffi::GTK_SYMBOLIC_COLOR_WARNING => Self::Warning,
ffi::GTK_SYMBOLIC_COLOR_SUCCESS => Self::Success,
#[cfg(feature = "v4_22")]
ffi::GTK_SYMBOLIC_COLOR_ACCENT => Self::Accent,
value => Self::__Unknown(value),
}
}
Expand Down
35 changes: 35 additions & 0 deletions gtk4/src/auto/im_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,41 @@ pub trait IMContextExt: IsA<IMContext> + 'static {
}
}

#[cfg(feature = "v4_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
#[doc(alias = "invalid-composition")]
fn connect_invalid_composition<F: Fn(&Self, &str) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn invalid_composition_trampoline<
P: IsA<IMContext>,
F: Fn(&P, &str) -> bool + 'static,
>(
this: *mut ffi::GtkIMContext,
str: *mut std::ffi::c_char,
f: glib::ffi::gpointer,
) -> glib::ffi::gboolean {
let f: &F = &*(f as *const F);
f(
IMContext::from_glib_borrow(this).unsafe_cast_ref(),
&glib::GString::from_glib_borrow(str),
)
.into_glib()
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
c"invalid-composition".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
invalid_composition_trampoline::<Self, F> as *const (),
)),
Box_::into_raw(f),
)
}
}

#[doc(alias = "preedit-changed")]
fn connect_preedit_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn preedit_changed_trampoline<P: IsA<IMContext>, F: Fn(&P) + 'static>(
Expand Down
10 changes: 10 additions & 0 deletions gtk4/src/auto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,13 @@ mod password_entry_buffer;
#[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))]
pub use self::password_entry_buffer::PasswordEntryBuffer;

#[cfg(feature = "v4_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
mod path_paintable;
#[cfg(feature = "v4_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
pub use self::path_paintable::PathPaintable;

mod picture;
pub use self::picture::Picture;

Expand Down Expand Up @@ -1755,6 +1762,9 @@ pub(crate) mod builders {
#[cfg(feature = "v4_4")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_4")))]
pub use super::password_entry_buffer::PasswordEntryBufferBuilder;
#[cfg(feature = "v4_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_22")))]
pub use super::path_paintable::PathPaintableBuilder;
pub use super::picture::PictureBuilder;
pub use super::popover::PopoverBuilder;
pub use super::popover_menu::PopoverMenuBuilder;
Expand Down
Loading
Loading