package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gio/Ocgtk_gio/Gio/Wrappers/Action_map/index.html

Module Wrappers.Action_map

type t = [ `action_map ] Gobject.obj
val from_gobject : 'a Gobject.obj -> t
val remove_action_entries : t -> [ `action_entry ] Gobject.obj array -> int -> unit

Remove actions from a #GActionMap. This is meant as the reverse of g_action_map_add_action_entries().

|<!-- language="C" --> static const GActionEntry entries[] = { { "quit", activate_quit }, { "print-string", activate_print_string, "s" } }; void add_actions (GActionMap *map) { g_action_map_add_action_entries (map, entries, G_N_ELEMENTS (entries), NULL); } void remove_actions (GActionMap *map) { g_action_map_remove_action_entries (map, entries, G_N_ELEMENTS (entries)); } |

val remove_action : t -> string -> unit

Removes the named action from the action map.

If no action of this name is in the map then nothing happens.

val lookup_action : t -> string -> [ `action ] Gobject.obj option

Looks up the action with the name @action_name in @action_map.

If no such action exists, returns %NULL.

val add_action : t -> [ `action ] Gobject.obj -> unit

Adds an action to the @action_map.

If the action map already contains an action with the same name as @action then the old action is dropped from the action map.

The action map takes its own reference on @action.