Class MediaControls

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, Proxy

@Generated("org.javagi.JavaGI") public class MediaControls extends Widget implements Accessible, Buildable, ConstraintTarget

Shows controls for video playback.

An example GtkMediaControls

Usually, GtkMediaControls is used as part of Video.

  • Constructor Details

    • MediaControls

      public MediaControls(MemorySegment address)
      Create a MediaControls instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • MediaControls

      public MediaControls(@Nullable MediaStream stream)
      Creates a new GtkMediaControls managing the stream passed to it.
      Parameters:
      stream - a GtkMediaStream to manage
    • MediaControls

      public MediaControls()
      Create a new MediaControls.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the MediaControls class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected MediaControls asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Widget
      Returns:
      the instance as if it were its parent type
    • getMediaStream

      public @Nullable MediaStream getMediaStream()
      Gets the media stream managed by this MediaControls or null if none.
      Returns:
      The media stream managed by this MediaControls
    • setMediaStream

      public void setMediaStream(@Nullable MediaStream stream)
      Sets the stream that is controlled by controls.
      Parameters:
      stream - a GtkMediaStream
    • builder

      public static MediaControls.Builder<? extends MediaControls.Builder> builder()
      A MediaControls.Builder object constructs a MediaControls with the specified properties. Use the various set...() methods to set properties, and finish construction with MediaControls.Builder.build().
      Returns:
      the builder object