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/Notification/index.html

Module Wrappers.Notification

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

Create a new Notification

val set_urgent : t -> bool -> unit

Deprecated in favor of g_notification_set_priority().

val set_title : t -> string -> unit

Sets the title of @notification to @title.

val set_priority : t -> Gio_enums.notificationpriority -> unit

Sets the priority of @notification to @priority. See #GNotificationPriority for possible values.

val set_icon : t -> [ `icon ] Gobject.obj -> unit

Sets the icon of @notification to @icon.

val set_default_action_and_target_value : t -> string -> Gvariant.t option -> unit

Sets the default action of @notification to @action. This action is activated when the notification is clicked on. It must be an application-wide action (start with "app.").

If @target is non-%NULL, @action will be activated with @target as its parameter. If @target is floating, it will be consumed.

When no default action is set, the application that the notification was sent on is activated.

val set_default_action : t -> string -> unit

Sets the default action of @notification to @detailed_action. This action is activated when the notification is clicked on.

The action in @detailed_action must be an application-wide action (it must start with "app."). If @detailed_action contains a target, the given action will be activated with that target as its parameter. See g_action_parse_detailed_name() for a description of the format for @detailed_action.

When no default action is set, the application that the notification was sent on is activated.

val set_category : t -> string option -> unit

Sets the type of @notification to @category. Categories have a main type like `email`, `im` or `device` and can have a detail separated by a `.`, e.g. `im.received` or `email.arrived`. Setting the category helps the notification server to select proper feedback to the user.

Standard categories are listed in the specification(https://specifications.freedesktop.org/notification-spec/latest/ar01s06.html).

val set_body : t -> string option -> unit

Sets the body of @notification to @body.

val add_button_with_target_value : t -> string -> string -> Gvariant.t option -> unit

Adds a button to @notification that activates @action when clicked. @action must be an application-wide action (it must start with "app.").

If @target is non-%NULL, @action will be activated with @target as its parameter.

val add_button : t -> string -> string -> unit

Adds a button to @notification that activates the action in @detailed_action when clicked. That action must be an application-wide action (starting with "app."). If @detailed_action contains a target, the action will be activated with that target as its parameter.

See g_action_parse_detailed_name() for a description of the format for @detailed_action.