Enum Class ApplicationFlags

java.lang.Object
java.lang.Enum<ApplicationFlags>
org.gnome.gio.ApplicationFlags
All Implemented Interfaces:
Serializable, Comparable<ApplicationFlags>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum ApplicationFlags extends Enum<ApplicationFlags> implements Enumeration
Flags used to define the behaviour of a GApplication.
Since:
2.28
  • Enum Constant Details

    • FLAGS_NONE

      @Deprecated public static final ApplicationFlags FLAGS_NONE
      Deprecated.
      Use Gio.ApplicationFlags.DEFAULT_FLAGS.
      Default flags.
    • IS_SERVICE

      public static final ApplicationFlags IS_SERVICE
      Run as a service. In this mode, registration fails if the service is already running, and the application will initially wait up to 10 seconds for an initial activation message to arrive.
    • IS_LAUNCHER

      public static final ApplicationFlags IS_LAUNCHER
      Don't try to become the primary instance.
    • HANDLES_OPEN

      public static final ApplicationFlags HANDLES_OPEN
      This application handles opening files (in the primary instance). Note that this flag only affects the default implementation of local_command_line(), and has no effect if HANDLES_COMMAND_LINE is given. See g_application_run() for details.
    • HANDLES_COMMAND_LINE

      public static final ApplicationFlags HANDLES_COMMAND_LINE
      This application handles command line arguments (in the primary instance). Note that this flag only affect the default implementation of local_command_line(). See g_application_run() for details.
    • SEND_ENVIRONMENT

      public static final ApplicationFlags SEND_ENVIRONMENT
      Send the environment of the launching process to the primary instance. Set this flag if your application is expected to behave differently depending on certain environment variables. For instance, an editor might be expected to use the GIT_COMMITTER_NAME environment variable when editing a git commit message. The environment is available to the GApplication::command-line signal handler, via g_application_command_line_getenv().
    • NON_UNIQUE

      public static final ApplicationFlags NON_UNIQUE
      Make no attempts to do any of the typical single-instance application negotiation, even if the application ID is given. The application neither attempts to become the owner of the application ID nor does it check if an existing owner already exists. Everything occurs in the local process. Since: 2.30.
    • CAN_OVERRIDE_APP_ID

      public static final ApplicationFlags CAN_OVERRIDE_APP_ID
      Allow users to override the application ID from the command line with --gapplication-app-id. Since: 2.48
    • ALLOW_REPLACEMENT

      public static final ApplicationFlags ALLOW_REPLACEMENT
      Allow another instance to take over the bus name. Since: 2.60
    • REPLACE

      public static final ApplicationFlags REPLACE
      Take over from another instance. This flag is usually set by passing --gapplication-replace on the commandline. Since: 2.60
  • Field Details

    • DEFAULT_FLAGS

      public static final ApplicationFlags DEFAULT_FLAGS
      Default flags.
      Since:
      2.74
  • Method Details

    • values

      public static ApplicationFlags[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ApplicationFlags valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static Set<ApplicationFlags> of(int flags)
      Create a new EnumSet<ApplicationFlags> for the provided bitfield
      Parameters:
      flags - the ApplicationFlags bitfield
      Returns:
      the EnumSet for the provided bitfield
    • of

      public static Set<ApplicationFlags> of(MemorySegment address)
      Create a new EnumSet<ApplicationFlags> for the bitfield in the provided memory address.
      Parameters:
      address - the memory address holding a bitfield value
      Returns:
      the EnumSet for the bitfield in the provided memory address
    • getType

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