Class DBusMenuModel

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class DBusMenuModel extends MenuModel
GDBusMenuModel is an implementation of MenuModel that can be used as a proxy for a menu model that is exported over D-Bus with DBusConnection.exportMenuModel(String, MenuModel).
  • Constructor Details

    • DBusMenuModel

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

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

    • getType

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

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

      protected DBusMenuModel 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 MenuModel
      Returns:
      the instance as if it were its parent type
    • get

      public static DBusMenuModel get(DBusConnection connection, @Nullable String busName, String objectPath)

      Obtains a GDBusMenuModel for the menu model which is exported at the given busName and objectPath.

      The thread default main context is taken at the time of this call. All signals on the menu model (and any linked models) are reported with respect to this context. All calls on the returned menu model (and linked models) must also originate from this same context, with the thread default main context unchanged.

      Parameters:
      connection - a GDBusConnection
      busName - the bus name which exports the menu model or null if connection is not a message bus connection
      objectPath - the object path at which the menu model is exported
      Returns:
      a GDBusMenuModel object. Free with g_object_unref().
      Since:
      2.32
    • builder

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