Struct gegl::Buffer

source ·
#[repr(transparent)]
pub struct Buffer { /* private fields */ }
Expand description

Properties

abyss-height

Readable | Writeable | Construct Only

abyss-width

Readable | Writeable | Construct Only

abyss-x

Readable | Writeable | Construct Only

abyss-y

Readable | Writeable | Construct Only

backend

Readable | Writeable | Construct Only

format

Readable | Writeable | Construct

height

Readable | Writeable | Construct

initialized

Readable | Writeable | Construct Only

path

Readable | Writeable | Construct Only

pixels

Readable

px-size

Readable

shift-x

Readable | Writeable | Construct Only

shift-y

Readable | Writeable | Construct Only

tile-height

Readable | Writeable | Construct Only

tile-width

Readable | Writeable | Construct Only

width

Readable | Writeable | Construct

x

Readable | Writeable | Construct

y

Readable | Writeable | Construct

TileHandler

source

Readable | Writeable | Construct

Signals

changed

Implements

TileHandlerExt, [TileSourceExt][trait@crate::prelude::TileSourceExt]

GLib type: GObject with reference counted clone semantics.

Implementations§

source§

impl Buffer

source

pub fn introspectable_new( format_name: &str, x: i32, y: i32, width: i32, height: i32 ) -> Buffer

Create a new GeglBuffer with the given format and dimensions.

format_name

The Babl format name for this buffer, e.g. “RGBA float”

x

x origin of the buffer’s extent

y

y origin of the buffer’s extent

width

width of the buffer’s extent

height

height of the buffer’s extent

source

pub fn for_backend( extent: &Rectangle, backend: &impl IsA<TileBackend> ) -> Buffer

Create a new GeglBuffer from a backend, if NULL is passed in the extent of the buffer will be inherited from the extent of the backend.

returns a GeglBuffer, that holds a reference to the provided backend.

extent

the geometry of the buffer (origin, width and height) a GeglRectangle.

backend

an instance of a GeglTileBackend subclass.

source

pub fn builder() -> BufferBuilder

Creates a new builder-pattern struct instance to construct Buffer objects.

This method returns an instance of BufferBuilder which can be used to create Buffer objects.

source

pub fn clear(&self, roi: &Rectangle)

Clears the provided rectangular region by setting all the associated memory to 0.

roi

a rectangular region

source

pub fn copy( &self, src_rect: &Rectangle, repeat_mode: AbyssPolicy, dst: &Buffer, dst_rect: &Rectangle )

source

pub fn create_sub_buffer(&self, extent: &Rectangle) -> Option<Buffer>

Create a new sub GeglBuffer, that is a view on a larger buffer.

extent

coordinates of new buffer.

Returns

the new sub buffer

source

pub fn dup(&self) -> Option<Buffer>

Duplicate a buffer (internally uses gegl_buffer_copy). Aligned tiles will create copy-on-write clones in the new buffer.

Returns

the new buffer

source

pub fn flush(&self)

Flushes all unsaved data to disk, this is not necessary for shared geglbuffers opened with gegl_buffer_open since they auto-sync on writes.

source

pub fn flush_ext(&self, rect: &Rectangle)

Invokes the external flush function, if any is set on the provided buffer - this ensures that data pending - in the current implementation only OpenCL - externally to be synchronized with the buffer. Multi threaded code should call such a synchronization before branching out to avoid each of the threads having an implicit synchronization of its own.

rect

rectangle

source

pub fn freeze_changed(&self)

Blocks emission of the “changed” signal for self.

While the signal is blocked, changes to self are accumulated, and will be emitted once the signal is unblocked, using thaw_changed().

source

pub fn abyss(&self) -> Option<Rectangle>

Return the abyss extent of a buffer, this expands out to the parents extent in subbuffers.

source

pub fn extent(&self) -> Option<Rectangle>

Returns a pointer to a GeglRectangle structure defining the geometry of a specific GeglBuffer, this is also the default width/height of buffers passed in to gegl_buffer_set and gegl_buffer_get (with a scale of 1.0 at least).

source

pub fn introspectable_get( &self, rect: &Rectangle, scale: f64, format_name: Option<&str>, repeat_mode: AbyssPolicy ) -> Vec<u8>

Fetch a rectangular linear buffer of pixel data from the GeglBuffer.

rect

the coordinates we want to retrieve data from.

scale

sampling scale, 1.0 = pixel for pixel 2.0 = magnify, 0.5 scale down.

format_name

the format to store data in, if NULL the format of the buffer is used.

repeat_mode

how requests outside the buffer extent are handled. Valid values: GEGL_ABYSS_NONE (abyss pixels are zeroed), GEGL_ABYSS_WHITE (abyss pixels are white), GEGL_ABYSS_BLACK (abyss pixels are black), GEGL_ABYSS_CLAMP (coordinates are clamped to the abyss rectangle), GEGL_ABYSS_LOOP (buffer contents are tiled if outside of the abyss rectangle).

Returns

A copy of the requested data

source

pub fn introspectable_set( &self, rect: &Rectangle, format_name: &str, src: &[u8] )

Store a linear raster buffer into the GeglBuffer.

rect

the rectangle to write.

format_name

the format of the input data.

src

pixel data to write to self.

source

pub fn sample_cleanup(&self)

👎Deprecated: Since 0.4.2

Clean up resources used by sampling framework of buffer.

Deprecated since 0.4.2

This function has no effect. It is not necessary to call it after using gegl_buffer_sample() or gegl_buffer_sample_at_level().

source

pub fn save(&self, path: &str, roi: &Rectangle)

Write a GeglBuffer to a file.

path

the path where the gegl buffer will be saved, any writable GIO uri is valid.

roi

the region of interest to write, this is the tiles that will be collected and written to disk.

source

pub fn set_abyss(&self, abyss: &Rectangle) -> bool

Changes the size and position of the abyss rectangle of a buffer.

Returns TRUE if the change of abyss was successful.

abyss

new abyss.

source

pub fn set_color(&self, rect: &Rectangle, color: &impl IsA<Color>)

Sets the region covered by rect to the specified color.

rect

a rectangular region to fill with a color.

color

the GeglColor to fill with.

source

pub fn set_extent(&self, extent: &Rectangle) -> bool

Changes the size and position that is considered active in a buffer, this operation is valid on any buffer, reads on subbuffers outside the master buffer’s extent are at the moment undefined.

Returns TRUE if the change of extent was successful.

extent

new extent.

source

pub fn set_pattern( &self, rect: &Rectangle, pattern: &Buffer, x_offset: i32, y_offset: i32 )

Fill a region with a repeating pattern. Offsets parameters are relative to the origin (0, 0) and not to the rectangle. So be carefull about the origin of pattern and self extents.

rect

the region of self to fill

pattern

a Buffer to be repeated as a pattern

x_offset

where the pattern starts horizontally

y_offset

where the pattern starts vertical

source

pub fn share_storage(&self, buffer2: &Buffer) -> bool

Checks if a pair of buffers share the same underlying tile storage.

Returns TRUE if self and buffer2 share the same storage.

buffer2

a Buffer.

source

pub fn thaw_changed(&self)

Unblocks emission of the “changed” signal for self.

Once all calls to freeze_changed() are matched by corresponding calls to freeze_changed(), all accumulated changes are emitted.

source

pub fn abyss_height(&self) -> i32

source

pub fn abyss_width(&self) -> i32

source

pub fn abyss_x(&self) -> i32

source

pub fn abyss_y(&self) -> i32

source

pub fn backend(&self) -> Option<TileBackend>

source

pub fn height(&self) -> i32

source

pub fn set_height(&self, height: i32)

source

pub fn is_initialized(&self) -> bool

source

pub fn path(&self) -> Option<GString>

source

pub fn pixels(&self) -> i32

source

pub fn px_size(&self) -> i32

source

pub fn shift_x(&self) -> i32

source

pub fn shift_y(&self) -> i32

source

pub fn tile_height(&self) -> i32

source

pub fn tile_width(&self) -> i32

source

pub fn width(&self) -> i32

source

pub fn set_width(&self, width: i32)

source

pub fn x(&self) -> i32

source

pub fn set_x(&self, x: i32)

source

pub fn y(&self) -> i32

source

pub fn set_y(&self, y: i32)

source

pub fn load(path: &str) -> Option<Buffer>

Loads an existing GeglBuffer from disk, if it has previously been saved with gegl_buffer_save it should be possible to open through any GIO transport, buffers that have been used as swap needs random access to be opened.

path

the path to a gegl buffer on disk.

Returns

a Buffer object.

source

pub fn open(path: &str) -> Option<Buffer>

Open an existing on-disk GeglBuffer, this buffer is opened in a monitored state so multiple instances of gegl can share the same buffer. Sets on one buffer are reflected in the other.

path

the path to a gegl buffer on disk.

Returns

a GeglBuffer object.

source

pub fn swap_create_file(suffix: Option<&str>) -> Option<PathBuf>

Generates a unique filename in the GEGL swap directory, suitable for using as swap space. When the file is no longer needed, it may be removed with swap_remove_file(); otherwise, it will be removed when exit() is called.

suffix

a string to suffix the filename with, for identification purposes, or None.

Returns

a string containing the full file path, or None is the swap is disabled. The returned string should be freed with g_free() when no longer needed.

source

pub fn swap_has_file(path: impl AsRef<Path>) -> bool

Tests if path is a swap file, that is, if it has been created with swap_create_file(), and hasn’t been removed yet.

path

a filename

source

pub fn swap_remove_file(path: impl AsRef<Path>)

Removes a swap file, generated using swap_create_file(), unlinking the file, if exists.

path

the swap file to remove, as returned by swap_create_file()

source

pub fn connect_changed<F: Fn(&Self, &Rectangle) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_format_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_height_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_pixels_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_px_size_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_width_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

pub fn connect_x_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source

pub fn connect_y_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Trait Implementations§

source§

impl Clone for Buffer

source§

fn clone(&self) -> Self

Makes a clone of this shared reference.

This increments the strong reference count of the object. Dropping the object will decrement it again.

1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Buffer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl HasParamSpec for Buffer

§

type ParamSpec = ParamSpecObject

§

type SetValue = Buffer

Preferred value to be used as setter for the associated ParamSpec.
§

type BuilderFn = fn(_: &str) -> ParamSpecObjectBuilder<'_, Buffer>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl Hash for Buffer

source§

fn hash<H>(&self, state: &mut H)where H: Hasher,

Hashes the memory address of this object.

1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Buffer

source§

fn cmp(&self, other: &Self) -> Ordering

Comparison for two GObjects.

Compares the memory addresses of the provided objects.

1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl ParentClassIs for Buffer

source§

impl<OT: ObjectType> PartialEq<OT> for Buffer

source§

fn eq(&self, other: &OT) -> bool

Equality for two GObjects.

Two GObjects are equal if their memory addresses are equal.

1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<OT: ObjectType> PartialOrd<OT> for Buffer

source§

fn partial_cmp(&self, other: &OT) -> Option<Ordering>

Partial comparison for two GObjects.

Compares the memory addresses of the provided objects.

1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl StaticType for Buffer

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl Eq for Buffer

source§

impl IsA<TileHandler> for Buffer

source§

impl IsA<TileSource> for Buffer

Auto Trait Implementations§

§

impl RefUnwindSafe for Buffer

§

impl !Send for Buffer

§

impl !Sync for Buffer

§

impl Unpin for Buffer

§

impl UnwindSafe for Buffer

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Cast for Twhere T: ObjectType,

§

fn upcast<T>(self) -> Twhere T: ObjectType, Self: IsA<T>,

Upcasts an object to a superclass or interface T. Read more
§

fn upcast_ref<T>(&self) -> &Twhere T: ObjectType, Self: IsA<T>,

Upcasts an object to a reference of its superclass or interface T. Read more
§

fn downcast<T>(self) -> Result<T, Self>where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a subclass or interface implementor T. Read more
§

fn downcast_ref<T>(&self) -> Option<&T>where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a reference of its subclass or interface implementor T. Read more
§

fn dynamic_cast<T>(self) -> Result<T, Self>where T: ObjectType,

Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while upcast will do many checks at compile-time already. downcast will perform the same checks at runtime as dynamic_cast, but will also ensure some amount of compile-time safety. Read more
§

fn dynamic_cast_ref<T>(&self) -> Option<&T>where T: ObjectType,

Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
§

unsafe fn unsafe_cast<T>(self) -> Twhere T: ObjectType,

Casts to T unconditionally. Read more
§

unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere T: ObjectType,

Casts to &T unconditionally. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

§

unsafe fn from_glib_none_num_as_vec( ptr: *const GList, num: usize ) -> Vec<T, Global>

§

unsafe fn from_glib_container_num_as_vec( _: *const GList, _: usize ) -> Vec<T, Global>

§

unsafe fn from_glib_full_num_as_vec(_: *const GList, _: usize) -> Vec<T, Global>

§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

§

unsafe fn from_glib_none_num_as_vec( ptr: *const GPtrArray, num: usize ) -> Vec<T, Global>

§

unsafe fn from_glib_container_num_as_vec( _: *const GPtrArray, _: usize ) -> Vec<T, Global>

§

unsafe fn from_glib_full_num_as_vec( _: *const GPtrArray, _: usize ) -> Vec<T, Global>

§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

§

unsafe fn from_glib_none_num_as_vec( ptr: *const GSList, num: usize ) -> Vec<T, Global>

§

unsafe fn from_glib_container_num_as_vec( _: *const GSList, _: usize ) -> Vec<T, Global>

§

unsafe fn from_glib_full_num_as_vec( _: *const GSList, _: usize ) -> Vec<T, Global>

§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

§

unsafe fn from_glib_none_num_as_vec( ptr: *mut GList, num: usize ) -> Vec<T, Global>

§

unsafe fn from_glib_container_num_as_vec( ptr: *mut GList, num: usize ) -> Vec<T, Global>

§

unsafe fn from_glib_full_num_as_vec( ptr: *mut GList, num: usize ) -> Vec<T, Global>

§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

§

unsafe fn from_glib_none_num_as_vec( ptr: *mut GPtrArray, num: usize ) -> Vec<T, Global>

§

unsafe fn from_glib_container_num_as_vec( ptr: *mut GPtrArray, num: usize ) -> Vec<T, Global>

§

unsafe fn from_glib_full_num_as_vec( ptr: *mut GPtrArray, num: usize ) -> Vec<T, Global>

§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

§

unsafe fn from_glib_none_num_as_vec( ptr: *mut GSList, num: usize ) -> Vec<T, Global>

§

unsafe fn from_glib_container_num_as_vec( ptr: *mut GSList, num: usize ) -> Vec<T, Global>

§

unsafe fn from_glib_full_num_as_vec( ptr: *mut GSList, num: usize ) -> Vec<T, Global>

§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

§

unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T, Global>

§

unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T, Global>

§

unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T, Global>

§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

§

unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T, Global>

§

unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T, Global>

§

unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T, Global>

§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

§

unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T, Global>

§

unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T, Global>

§

unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T, Global>

§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

§

unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T, Global>

§

unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T, Global>

§

unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T, Global>

§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

§

unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T, Global>

§

unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T, Global>

§

unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T, Global>

§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,

§

unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T, Global>

§

unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T, Global>

§

unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T, Global>

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoClosureReturnValue for Twhere T: Into<Value>,

§

impl<U> IsSubclassableExt for Uwhere U: IsClass + ParentClassIs,

§

fn parent_class_init<T>(class: &mut Class<U>)where T: ObjectSubclass, <U as ParentClassIs>::Parent: IsSubclassable<T>,

§

fn parent_instance_init<T>(instance: &mut InitializingObject<T>)where T: ObjectSubclass, <U as ParentClassIs>::Parent: IsSubclassable<T>,

§

impl<T> ObjectExt for Twhere T: ObjectType,

§

fn is<U>(&self) -> boolwhere U: StaticType,

Returns true if the object is an instance of (can be cast to) T.
§

fn type_(&self) -> Type

Returns the type of the object.
§

fn object_class(&self) -> &Class<Object>

Returns the [ObjectClass] of the object. Read more
§

fn class(&self) -> &Class<T>where T: IsClass,

Returns the class of the object.
§

fn class_of<U>(&self) -> Option<&Class<U>>where U: IsClass,

Returns the class of the object in the given type T. Read more
§

fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where U: IsInterface,

Returns the interface T of the object. Read more
§

fn set_property(&self, property_name: &str, value: impl Into<Value>)

Sets the property property_name of the object to value value. Read more
§

fn set_property_from_value(&self, property_name: &str, value: &Value)

Sets the property property_name of the object to value value. Read more
§

fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])

Sets multiple properties of the object at once. Read more
§

fn set_properties_from_value(&self, property_values: &[(&str, Value)])

Sets multiple properties of the object at once. Read more
§

fn property<V>(&self, property_name: &str) -> Vwhere V: for<'b> FromValue<'b> + 'static,

Gets the property property_name of the object and cast it to the type V. Read more
§

fn property_value(&self, property_name: &str) -> Value

Gets the property property_name of the object. Read more
§

fn has_property(&self, property_name: &str, type_: Option<Type>) -> bool

Check if the object has a property property_name of the given type_. Read more
§

fn property_type(&self, property_name: &str) -> Option<Type>

Get the type of the property property_name of this object. Read more
§

fn find_property(&self, property_name: &str) -> Option<ParamSpec>

Get the ParamSpec of the property property_name of this object.
§

fn list_properties(&self) -> PtrSlice<ParamSpec>

Return all ParamSpec of the properties of this object.
§

fn freeze_notify(&self) -> PropertyNotificationFreezeGuard

Freeze all property notifications until the return guard object is dropped. Read more
§

unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where QD: 'static,

Set arbitrary data on this object with the given key. Read more
§

unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
§

unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
§

unsafe fn set_data<QD>(&self, key: &str, value: QD)where QD: 'static,

Set arbitrary data on this object with the given key. Read more
§

unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
§

unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
§

fn block_signal(&self, handler_id: &SignalHandlerId)

Block a given signal handler. Read more
§

fn unblock_signal(&self, handler_id: &SignalHandlerId)

Unblock a given signal handler.
§

fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)

Stop emission of the currently emitted signal.
§

fn stop_signal_emission_by_name(&self, signal_name: &str)

Stop emission of the currently emitted signal by the (possibly detailed) signal name.
§

fn connect<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_name on this object. Read more
§

fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_id on this object. Read more
§

fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_name on this object. Read more
§

fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_id on this object. Read more
§

unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_name on this object. Read more
§

unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerIdwhere F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_id on this object. Read more
§

fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure ) -> SignalHandlerId

Connect a closure to the signal signal_name on this object. Read more
§

fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure ) -> SignalHandlerId

Connect a closure to the signal signal_id on this object. Read more
§

fn watch_closure(&self, closure: &impl AsRef<Closure>)

Limits the lifetime of closure to the lifetime of the object. When the object’s reference count drops to zero, the closure will be invalidated. An invalidated closure will ignore any calls to invoke_with_values, or invoke when using Rust closures.
§

fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere R: TryFromClosureReturnValue,

Emit signal by signal id. Read more
§

fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>

Same as [Self::emit] but takes Value for the arguments.
§

fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere R: TryFromClosureReturnValue,

Emit signal by its name. Read more
§

fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value] ) -> Option<Value>

Emit signal by its name. Read more
§

fn emit_by_name_with_details<R>( &self, signal_name: &str, details: Quark, args: &[&dyn ToValue] ) -> Rwhere R: TryFromClosureReturnValue,

Emit signal by its name with details. Read more
§

fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value] ) -> Option<Value>

Emit signal by its name with details. Read more
§

fn emit_with_details<R>( &self, signal_id: SignalId, details: Quark, args: &[&dyn ToValue] ) -> Rwhere R: TryFromClosureReturnValue,

Emit signal by signal id with details. Read more
§

fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value] ) -> Option<Value>

Emit signal by signal id with details. Read more
§

fn disconnect(&self, handler_id: SignalHandlerId)

Disconnect a previously connected signal handler.
§

fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere F: Fn(&T, &ParamSpec) + Send + Sync + 'static,

Connect to the notify signal of the object. Read more
§

fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerIdwhere F: Fn(&T, &ParamSpec) + 'static,

Connect to the notify signal of the object. Read more
§

unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F ) -> SignalHandlerIdwhere F: Fn(&T, &ParamSpec),

Connect to the notify signal of the object. Read more
§

fn notify(&self, property_name: &str)

Notify that the given property has changed its value. Read more
§

fn notify_by_pspec(&self, pspec: &ParamSpec)

Notify that the given property has changed its value. Read more
§

fn downgrade(&self) -> WeakRef<T>

Downgrade this object to a weak reference.
§

fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>where F: FnOnce() + Send + 'static,

Add a callback to be notified when the Object is disposed.
§

fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where F: FnOnce() + 'static,

Add a callback to be notified when the Object is disposed. Read more
§

fn bind_property<'f, 't, O, 'a>( &'a self, source_property: &'a str, target: &'a O, target_property: &'a str ) -> BindingBuilder<'a, 'f, 't>where O: ObjectType,

Bind property source_property on this object to the target_property on the target object. Read more
§

fn ref_count(&self) -> u32

Returns the strong reference count of this object.
§

unsafe fn run_dispose(&self)

Runs the dispose mechanism of the object. Read more
§

impl<T> Property for Twhere T: HasParamSpec,

§

type Value = T

§

impl<T> PropertyGet for Twhere T: HasParamSpec,

§

type Value = T

§

fn get<R, F>(&self, f: F) -> Rwhere F: Fn(&<T as PropertyGet>::Value) -> R,

§

impl<T> StaticTypeExt for Twhere T: StaticType,

§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<O> TileHandlerExt for Owhere O: IsA<TileHandler>,

source§

fn damage_rect(&self, rect: &Rectangle)

source§

fn damage_tile(&self, x: i32, y: i32, z: i32, damage: u64)

source§

fn lock(&self)

source§

fn set_source(&self, source: &impl IsA<TileSource>)

source§

fn unlock(&self)

source§

fn connect_source_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TransparentType for Twhere T: TransparentPtrType,

§

type GlibType = <T as GlibPtrDefault>::GlibType

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T> TryFromClosureReturnValue for Twhere T: for<'a> FromValue<'a> + StaticType + 'static,

§

fn try_from_closure_return_value(v: Option<Value>) -> Result<T, BoolError>

source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<'a, T, C, E> FromValueOptional<'a> for Twhere T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,

§

impl<Super, Sub> MayDowncastTo<Sub> for Superwhere Super: IsA<Super>, Sub: IsA<Super>,