Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate with latest gir files #1869

Merged
merged 8 commits into from
Oct 18, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
conf:
- {
name: "gtk4",
features: "v4_16,xml_validation,blueprint",
features: "v4_18,xml_validation,blueprint",
test_sys: false,
}
- { name: "gsk4", features: "v4_14,broadway,vulkan", test_sys: true }
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --features v4_14,xml_validation --manifest-path ./gtk4/Cargo.toml
args: --features v4_16,xml_validation --manifest-path ./gtk4/Cargo.toml
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --features v4_14,xml_validation --manifest-path ./gtk4/Cargo.toml
args: --features v4_16,xml_validation --manifest-path ./gtk4/Cargo.toml
# FIXME: renable once https://github.com/gtk-rs/gtk4-rs/issues/1235 is fixed
#- name: Tests
# uses: actions-rs/cargo@v1
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/windows-msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
id: cache
with:
path: c:/gnome
key: ${{ runner.os }}-gtk4-15.4
key: ${{ runner.os }}-gtk4-17.1
restore-keys: |
${{ runner.os }}-gtk4-15.4
${{ runner.os }}-gtk4-17.1

- name: Set up the PATH environment
run: |
Expand Down Expand Up @@ -94,17 +94,17 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --features v4_16,xml_validation
args: --features v4_18,xml_validation
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --features v4_16,xml_validation
args: --features v4_18,xml_validation
- name: Tests
uses: actions-rs/cargo@v1
with:
command: test
args: --features v4_16,xml_validation
args: --features v4_18,xml_validation

- name: Build gdk-win32
uses: actions-rs/cargo@v1
Expand Down
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 @ eff839d4745d)
from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd)
Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545)
from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81)
2 changes: 1 addition & 1 deletion gdk4-wayland/sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ version = "4.10"
version = "4.12"

[package.metadata.system-deps.gtk4_wayland.v4_16]
version = "4.15"
version = "4.16"

[package.metadata.docs.rs]
rustc-args = ["--cfg", "docsrs"]
Expand Down
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 @ eff839d4745d)
from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd)
Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545)
from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81)
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 @ eff839d4745d)
from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd)
Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545)
from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81)
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 @ eff839d4745d)
from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd)
Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545)
from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81)
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 @ eff839d4745d)
from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd)
Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545)
from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81)
2 changes: 1 addition & 1 deletion gdk4-x11/sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ version = "4.4"
version = "4.10"

[package.metadata.system-deps.gtk4_x11.v4_16]
version = "4.15"
version = "4.16"

[package.metadata.docs.rs]
rustc-args = ["--cfg", "docsrs"]
Expand Down
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 @ eff839d4745d)
from gir-files (https://github.com/gtk-rs/gir-files @ 62da9eb7c4bd)
Generated by gir (https://github.com/gtk-rs/gir @ af6703cf6545)
from gir-files (https://github.com/gtk-rs/gir-files @ e45712216c81)
3 changes: 3 additions & 0 deletions gdk4/Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ generate = [
"Gdk.AxisFlags",
"Gdk.ButtonEvent",
"Gdk.CairoContext",
"Gdk.CicpParams",
"Gdk.CicpRange",
"Gdk.ColorState",
"Gdk.CrossingEvent",
"Gdk.CrossingMode",
"Gdk.DeleteEvent",
Expand Down
217 changes: 217 additions & 0 deletions gdk4/src/auto/cicp_params.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::{ffi, CicpRange, ColorState};
use glib::{
prelude::*,
signal::{connect_raw, SignalHandlerId},
translate::*,
};
use std::boxed::Box as Box_;

glib::wrapper! {
#[doc(alias = "GdkCicpParams")]
pub struct CicpParams(Object<ffi::GdkCicpParams, ffi::GdkCicpParamsClass>);

match fn {
type_ => || ffi::gdk_cicp_params_get_type(),
}
}

impl CicpParams {
#[doc(alias = "gdk_cicp_params_new")]
pub fn new() -> CicpParams {
assert_initialized_main_thread!();
unsafe { from_glib_full(ffi::gdk_cicp_params_new()) }
}

#[doc(alias = "gdk_cicp_params_build_color_state")]
pub fn build_color_state(&self) -> Result<Option<ColorState>, glib::Error> {
unsafe {
let mut error = std::ptr::null_mut();
let ret = ffi::gdk_cicp_params_build_color_state(self.to_glib_none().0, &mut error);
if error.is_null() {
Ok(from_glib_full(ret))
} else {
Err(from_glib_full(error))
}
}
}

#[doc(alias = "gdk_cicp_params_get_color_primaries")]
#[doc(alias = "get_color_primaries")]
#[doc(alias = "color-primaries")]
pub fn color_primaries(&self) -> u32 {
unsafe { ffi::gdk_cicp_params_get_color_primaries(self.to_glib_none().0) }
}

#[doc(alias = "gdk_cicp_params_get_matrix_coefficients")]
#[doc(alias = "get_matrix_coefficients")]
#[doc(alias = "matrix-coefficients")]
pub fn matrix_coefficients(&self) -> u32 {
unsafe { ffi::gdk_cicp_params_get_matrix_coefficients(self.to_glib_none().0) }
}

#[doc(alias = "gdk_cicp_params_get_range")]
#[doc(alias = "get_range")]
pub fn range(&self) -> CicpRange {
unsafe { from_glib(ffi::gdk_cicp_params_get_range(self.to_glib_none().0)) }
}

#[doc(alias = "gdk_cicp_params_get_transfer_function")]
#[doc(alias = "get_transfer_function")]
#[doc(alias = "transfer-function")]
pub fn transfer_function(&self) -> u32 {
unsafe { ffi::gdk_cicp_params_get_transfer_function(self.to_glib_none().0) }
}

#[doc(alias = "gdk_cicp_params_set_color_primaries")]
#[doc(alias = "color-primaries")]
pub fn set_color_primaries(&self, color_primaries: u32) {
unsafe {
ffi::gdk_cicp_params_set_color_primaries(self.to_glib_none().0, color_primaries);
}
}

#[doc(alias = "gdk_cicp_params_set_matrix_coefficients")]
#[doc(alias = "matrix-coefficients")]
pub fn set_matrix_coefficients(&self, matrix_coefficients: u32) {
unsafe {
ffi::gdk_cicp_params_set_matrix_coefficients(
self.to_glib_none().0,
matrix_coefficients,
);
}
}

#[doc(alias = "gdk_cicp_params_set_range")]
#[doc(alias = "range")]
pub fn set_range(&self, range: CicpRange) {
unsafe {
ffi::gdk_cicp_params_set_range(self.to_glib_none().0, range.into_glib());
}
}

#[doc(alias = "gdk_cicp_params_set_transfer_function")]
#[doc(alias = "transfer-function")]
pub fn set_transfer_function(&self, transfer_function: u32) {
unsafe {
ffi::gdk_cicp_params_set_transfer_function(self.to_glib_none().0, transfer_function);
}
}

#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
#[doc(alias = "color-primaries")]
pub fn connect_color_primaries_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_color_primaries_trampoline<F: Fn(&CicpParams) + 'static>(
this: *mut ffi::GdkCicpParams,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::color-primaries\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_color_primaries_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}

#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
#[doc(alias = "matrix-coefficients")]
pub fn connect_matrix_coefficients_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_matrix_coefficients_trampoline<F: Fn(&CicpParams) + 'static>(
this: *mut ffi::GdkCicpParams,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::matrix-coefficients\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_matrix_coefficients_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}

#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
#[doc(alias = "range")]
pub fn connect_range_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn notify_range_trampoline<F: Fn(&CicpParams) + 'static>(
this: *mut ffi::GdkCicpParams,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::range\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_range_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}

#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
#[doc(alias = "transfer-function")]
pub fn connect_transfer_function_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId {
unsafe extern "C" fn notify_transfer_function_trampoline<F: Fn(&CicpParams) + 'static>(
this: *mut ffi::GdkCicpParams,
_param_spec: glib::ffi::gpointer,
f: glib::ffi::gpointer,
) {
let f: &F = &*(f as *const F);
f(&from_glib_borrow(this))
}
unsafe {
let f: Box_<F> = Box_::new(f);
connect_raw(
self.as_ptr() as *mut _,
b"notify::transfer-function\0".as_ptr() as *const _,
Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
notify_transfer_function_trampoline::<F> as *const (),
)),
Box_::into_raw(f),
)
}
}
}

#[cfg(feature = "v4_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v4_16")))]
impl Default for CicpParams {
fn default() -> Self {
Self::new()
}
}
Loading
Loading