Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: WidgetPaintable

[25:7] extends: object

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 [signal@Gdk.Paintable::invalidate-size] signal whenever the size of the widget changes as well as for visual changes by emitting the [signal@Gdk.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 [property@Gtk.Picture:can-shrink] property is set to %TRUE or you might end up with an infinitely growing widget.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • WidgetPaintable (widget = null)

    Creates a new widget paintable observing the given widget.

    • @p widget is a GtkWidget.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • asPaintable ()

    Wraps this handle as Paintable.

    • @r A Paintable object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setWidget (object Value)

    The observed widget or %NULL if none.

    • @p Value is the new property value.
    • @r None.
  • get_widget ()

    Returns the widget that is observed or %NULL if none.

  • set_widget (object widget)

    Sets the widget that should be observed.

    • @p widget is the widget to observe.
    • @r None.

class: WidgetPaintableMeta

[175:14] static extends: object

Generated metadata helpers for WidgetPaintable class surfaces.

Methods

  • properties ()

    Returns property metadata for WidgetPaintable.

    • @r A list.