Class EditorState

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public final class EditorState extends GObject

Web editor state.

WebKitEditorState represents the state of a WebKitWebView editor. Use webkit_web_view_get_editor_state() to get the WebKitEditorState of a WebKitWebView.

Since:
2.10
  • Constructor Details

    • EditorState

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

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

    • getType

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

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

      protected EditorState 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 GObject
      Returns:
      the instance as if it were its parent type
    • getTypingAttributes

      public int getTypingAttributes()

      Gets the typing attributes at the current cursor position.

      If there is a selection, this returns the typing attributes of the selected text. Note that in case of a selection, typing attributes are considered active only when they are present throughout the selection.

      Returns:
      a bitmask of WebKitEditorTypingAttributes flags
      Since:
      2.10
    • isCopyAvailable

      public boolean isCopyAvailable()
      Gets whether a copy command can be issued.
      Returns:
      true if copy is currently available
      Since:
      2.20
    • isCutAvailable

      public boolean isCutAvailable()
      Gets whether a cut command can be issued.
      Returns:
      true if cut is currently available
      Since:
      2.20
    • isPasteAvailable

      public boolean isPasteAvailable()
      Gets whether a paste command can be issued.
      Returns:
      true if paste is currently available
      Since:
      2.20
    • isRedoAvailable

      public boolean isRedoAvailable()
      Gets whether a redo command can be issued.
      Returns:
      true if redo is currently available
      Since:
      2.20
    • isUndoAvailable

      public boolean isUndoAvailable()
      Gets whether an undo command can be issued.
      Returns:
      true if undo is currently available
      Since:
      2.20
    • onChanged

      Emitted when the WebKitEdtorState is changed.
      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      Since:
      2.44
      See Also:
    • emitChanged

      public void emitChanged()
      Emits the "changed" signal. See onChanged(EditorState.ChangedCallback).
    • builder

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