WidgetPaintableProtocol
public protocol WidgetPaintableProtocol : ObjectProtocol, PaintableProtocolGtkWidgetPaintable is a GdkPaintable that displays the contents
of a widget.
GtkWidgetPaintable will also take care of the widget not being in a
state where it can be drawn (like when it isn’t shown) and just draw
nothing or where it does not have a size (like when it is hidden) and
report no size in that case.
Of course, GtkWidgetPaintable allows you to monitor widgets for size
changes by emitting the [signalGdk.Paintable::invalidate-size] signal
whenever the size of the widget changes as well as for visual changes by
emitting the [signalGdk.Paintable::invalidate-contents] signal whenever
the widget changes.
You can use a GtkWidgetPaintable everywhere a GdkPaintable is allowed,
including using it on a GtkPicture (or one of its parents) that it was
set on itself via gtk_picture_set_paintable(). The paintable will take care
of recursion when this happens. If you do this however, ensure that the
[propertyGtk.Picture:can-shrink] property is set to true or you might
end up with an infinitely growing widget.
The WidgetPaintableProtocol protocol exposes the methods and properties of an underlying GtkWidgetPaintable instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see WidgetPaintable.
Alternatively, use WidgetPaintableRef as a lighweight, unowned reference if you already have an instance you just want to use.
- 
                  
                  Untyped pointer to the underlying GtkWidgetPaintableinstance.DeclarationSwift var ptr: UnsafeMutableRawPointer! { get }
- 
                  widget_paintable_ptrDefault implementationTyped pointer to the underlying GtkWidgetPaintableinstance.Default ImplementationReturn the stored, untyped pointer as a typed pointer to the GtkWidgetPaintableinstance.DeclarationSwift var widget_paintable_ptr: UnsafeMutablePointer<GtkWidgetPaintable>! { get }
- 
                  
                  Required Initialiser for types conforming to WidgetPaintableProtocolDeclarationSwift init(raw: UnsafeMutableRawPointer)
- 
                  bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a WidgetPaintablePropertyNamesource property to a given target object.DeclarationSwift @discardableResult @inlinable func bind<Q, T>(property source_property: WidgetPaintablePropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocolParameterssource_propertythe source property to bind targetthe target object to bind to target_propertythe target property to bind to flagsthe flags to pass to the Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Valuebinding reference or nilin case of an error
- 
                  get(property:Extension method) Get the value of a WidgetPaintable property DeclarationSwift @inlinable func get(property: WidgetPaintablePropertyName) -> GLibObject.ValueParameterspropertythe property to get the value for Return Valuethe value of the named property 
- 
                  set(property:Extension methodvalue: ) Set the value of a WidgetPaintable property. Note that this will only have an effect on properties that are writable and not construct-only! DeclarationSwift @inlinable func set(property: WidgetPaintablePropertyName, value v: GLibObject.Value)Parameterspropertythe property to get the value for Return Valuethe value of the named property 
- 
                  getWidget()Extension methodReturns the widget that is observed or nilif none.DeclarationSwift @inlinable func getWidget() -> WidgetRef!
- 
                  set(widget:Extension method) Sets the widget that should be observed. DeclarationSwift @inlinable func set(widget: WidgetRef? = nil)
- 
                  set(widget:Extension method) Sets the widget that should be observed. DeclarationSwift @inlinable func set<WidgetT>(widget: WidgetT?) where WidgetT : WidgetProtocol
- 
                  widgetExtension methodThe observed widget or nilif none.DeclarationSwift @inlinable var widget: WidgetRef! { get nonmutating set }
 View on GitHub
            View on GitHub
           Install in Dash
            Install in Dash
           WidgetPaintableProtocol Protocol Reference
      WidgetPaintableProtocol Protocol Reference