Module GWindow

GtkWindow

class window_skel : 'a Gtk.obj -> object ... end

@gtkdoc gtk GtkWindow

class window : [> Gtk.window ] as 'a Gtk.obj -> object ... end

Toplevel widget which can contain other widgets @gtkdoc gtk GtkWindow

val window : ?⁠kind:Gtk.Tags.window_type -> ?⁠title:string -> ?⁠decorated:bool -> ?⁠deletable:bool -> ?⁠focus_on_map:bool -> ?⁠icon:GdkPixbuf.pixbuf -> ?⁠icon_name:string -> ?⁠modal:bool -> ?⁠position:Gtk.Tags.window_position -> ?⁠resizable:bool -> ?⁠screen:Gdk.screen -> ?⁠type_hint:Gdk.Tags.window_type_hint -> ?⁠urgency_hint:bool -> ?⁠wmclass:(string * string) -> ?⁠border_width:int -> ?⁠width:int -> ?⁠height:int -> ?⁠show:bool -> unit -> window

@gtkdoc gtk GtkWindow

parameter kind

default value is `TOPLEVEL

parameter allow_grow

default value is true

parameter allow_shrink

default value is false

parameter modal

default value is false

parameter resizable

default value is true

parameter type_hint

default value is `NORMAL

parameter position

default value is `NONE

val toplevel : GObj.#widget -> window option

return the toplevel window of this widget, if existing

GtkDialog

class 'a dialog_signals : [> Gtk.dialog ] as 'b Gtk.obj -> decode:(int -> 'a) -> object ... end

@gtkdoc gtk GtkDialog

class 'a dialog_skel : [> Gtk.dialog ] as 'b Gtk.obj -> object ... end

@gtkdoc gtk GtkDialog

class 'a dialog_ext : [> Gtk.dialog ] as 'b Gtk.obj -> object ... end

Create popup windows @gtkdoc gtk GtkDialog

class 'a dialog : [> Gtk.dialog ] Gtk.obj -> object ... end

Create popup windows @gtkdoc gtk GtkDialog

val dialog : ?⁠parent:window_skel -> ?⁠destroy_with_parent:bool -> ?⁠title:string -> ?⁠decorated:bool -> ?⁠deletable:bool -> ?⁠focus_on_map:bool -> ?⁠icon:GdkPixbuf.pixbuf -> ?⁠icon_name:string -> ?⁠modal:bool -> ?⁠position:Gtk.Tags.window_position -> ?⁠resizable:bool -> ?⁠screen:Gdk.screen -> ?⁠type_hint:Gdk.Tags.window_type_hint -> ?⁠urgency_hint:bool -> ?⁠wmclass:(string * string) -> ?⁠border_width:int -> ?⁠width:int -> ?⁠height:int -> ?⁠show:bool -> unit -> 'a dialog

@gtkdoc gtk GtkDialog

parameter no_separator

default value is false

parameter destroy_with_parent

default value is false

type any_response = [
| GtkEnums.response
| `OTHER of int
]

Variation for safe typing

class dialog_any : [> Gtk.dialog ] Gtk.obj -> any_response dialog

GtkMessageDialog

type 'a buttons
module Buttons : sig ... end
class type 'a message_dialog = object ... end

Convenient message window @gtkdoc gtk GtkMessageDialog

val message_dialog : buttons:'a buttons -> ?⁠message_type:Gtk.Tags.message_type -> ?⁠message:string -> ?⁠use_markup:bool -> ?⁠parent:window_skel -> ?⁠destroy_with_parent:bool -> ?⁠title:string -> ?⁠decorated:bool -> ?⁠deletable:bool -> ?⁠focus_on_map:bool -> ?⁠icon:GdkPixbuf.pixbuf -> ?⁠icon_name:string -> ?⁠modal:bool -> ?⁠position:Gtk.Tags.window_position -> ?⁠resizable:bool -> ?⁠screen:Gdk.screen -> ?⁠type_hint:Gdk.Tags.window_type_hint -> ?⁠urgency_hint:bool -> ?⁠wmclass:(string * string) -> ?⁠border_width:int -> ?⁠width:int -> ?⁠height:int -> ?⁠show:bool -> unit -> 'a message_dialog

@gtkdoc gtk GtkMessageDialog

GtkAboutDialog

class about_dialog : [> Gtk.about_dialog ] as 'a Gtk.obj -> object ... end

@gtkdoc gtk GtkAboutDialog

val about_dialog : ?⁠name:string -> ?⁠authors:string list -> ?⁠comments:string -> ?⁠copyright:string -> ?⁠license:string -> ?⁠logo:GdkPixbuf.pixbuf -> ?⁠logo_icon_name:string -> ?⁠translator_credits:string -> ?⁠version:string -> ?⁠website:string -> ?⁠website_label:string -> ?⁠wrap_license:bool -> ?⁠parent:window_skel -> ?⁠destroy_with_parent:bool -> ?⁠title:string -> ?⁠decorated:bool -> ?⁠deletable:bool -> ?⁠focus_on_map:bool -> ?⁠icon:GdkPixbuf.pixbuf -> ?⁠icon_name:string -> ?⁠modal:bool -> ?⁠position:Gtk.Tags.window_position -> ?⁠resizable:bool -> ?⁠screen:Gdk.screen -> ?⁠type_hint:Gdk.Tags.window_type_hint -> ?⁠urgency_hint:bool -> ?⁠wmclass:(string * string) -> ?⁠border_width:int -> ?⁠width:int -> ?⁠height:int -> ?⁠show:bool -> unit -> about_dialog

Display information about an application.

In GTK+ 2.6.x and 2.8.x, a default handler is already connected to the response signal. It simply hides the dialog. This is no longer the case since GTK+ 2.10.x though. You could use it like this:

let about_dialog = ref (fun () -> raise Not_found)
let show_dialog () =
  try !about_dialog ()
  with Not_found ->
    let dialog = GWindow.about_dialog ~name:"..." (* etc. *) () in
    about_dialog := dialog#present ;
    dialog#show () 

@gtkdoc gtk GtkAboutDialog

since
GTK 2.6

File Chooser Dialog

class 'a file_chooser_dialog_signals : [> Gtk.file_chooser | Gtk.dialog ] as 'b Gtk.obj -> decode:(int -> 'a) -> object ... end
class 'a file_chooser_dialog : [> Gtk.file_chooser | Gtk.dialog ] as 'b Gtk.obj -> object ... end
val file_chooser_dialog : action:GtkEnums.file_chooser_action -> ?⁠filename:string -> ?⁠parent:window_skel -> ?⁠destroy_with_parent:bool -> ?⁠title:string -> ?⁠decorated:bool -> ?⁠deletable:bool -> ?⁠focus_on_map:bool -> ?⁠icon:GdkPixbuf.pixbuf -> ?⁠icon_name:string -> ?⁠modal:bool -> ?⁠position:Gtk.Tags.window_position -> ?⁠resizable:bool -> ?⁠screen:Gdk.screen -> ?⁠type_hint:Gdk.Tags.window_type_hint -> ?⁠urgency_hint:bool -> ?⁠wmclass:(string * string) -> ?⁠border_width:int -> ?⁠width:int -> ?⁠height:int -> ?⁠show:bool -> unit -> 'a file_chooser_dialog
since
GTK 2.4

@gtkdoc gtk GtkFileChooserDialog

GtkPlug

class plug_signals : [> Gtk.plug ] as 'a Gtk.obj -> object ... end

@gtkdoc gtk GtkPlug

class plug : Gtk.plug Gtk.obj -> object ... end

Toplevel for embedding into other processes @gtkdoc gtk GtkPlug

GtkSocket

class socket_signals : [> Gtk.socket ] as 'a Gtk.obj -> object ... end

@gtkdoc gtk GtkSocket

class socket : Gtk.socket Gtk.obj -> object ... end

Container for widgets from other processes @gtkdoc gtk GtkSocket

val socket : ?⁠border_width:int -> ?⁠width:int -> ?⁠height:int -> ?⁠packing:(GObj.widget -> unit) -> ?⁠show:bool -> unit -> socket

@gtkdoc gtk GtkSocket