package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Simple_action

type t = [ `simple_action | `object_ ] Gobject.obj
val new_ : string -> Gvariant_type.t option -> t

Create a new SimpleAction

val new_stateful : string -> Gvariant_type.t option -> Gvariant.t -> t

Create a new SimpleAction

val set_state_hint : t -> Gvariant.t option -> unit

Sets the state hint for the action.

See g_action_get_state_hint() for more information about action state hints.

val set_state : t -> Gvariant.t -> unit

Sets the state of the action.

This directly updates the 'state' property to the given value.

This should only be called by the implementor of the action. Users of the action should not attempt to directly modify the 'state' property. Instead, they should call g_action_change_state() to request the change.

If the @value GVariant is floating, it is consumed.

val set_enabled : t -> bool -> unit

Sets the action as enabled or not.

An action must be enabled in order to be activated or in order to have its state changed from outside callers.

This should only be called by the implementor of the action. Users of the action should not attempt to modify its enabled flag.

val get_name : t -> string

Get property: name

val get_parameter_type : t -> Gvariant_type.t

Get property: parameter-type

val get_state_type : t -> Gvariant_type.t

Get property: state-type

val on_activate : ?after:bool -> t -> callback:(parameter:Gvariant.t -> unit) -> Gobject.Signal.handler_id
val on_change_state : ?after:bool -> t -> callback:(value:Gvariant.t -> unit) -> Gobject.Signal.handler_id