package lablgtk3

  1. Overview
  2. Docs
OCaml interface to GTK+3

Install

Dune Dependency

Authors

Maintainers

Sources

lablgtk3-3.0.beta7.tbz
sha256=d8649337faa63d6132d7af4582db835653b142cdf7ca3e23633bcd2e055bb80f
sha512=54fafe132386c5475102a69ff96669930a5cc454934d61d53becde0bfb8515934aa7b2424d917c0f27115cc39afd8b3172080f3a43db5f314ef3bec7b59d0168

doc/lablgtk3/Gpointer/index.html

Module Gpointer

Gpointer: various kinds of pointers to C data

type 'a optaddr

Marked pointers

val optaddr : 'a option -> 'a optaddr
type optstring

Naked pointers

val raw_null : optstring
val optstring : string option -> optstring
type boxed

Boxed pointers

val boxed_null : boxed
val peek_string : ?pos:int -> ?len:int -> boxed -> string
val peek_int : boxed -> int
val poke_int : boxed -> int -> unit
val peek_nativeint : boxed -> nativeint
val poke_nativeint : boxed -> nativeint -> unit
type 'a optboxed
val optboxed : 'a option -> 'a optboxed
val may_box : f:('a -> 'b) -> 'a option -> 'b optboxed
type 'a variant_table constraint 'a = [> ]

Variant tables

val decode_variant : 'a variant_table -> int -> 'a
val encode_variant : 'a variant_table -> 'a -> int
val decode_flags : 'a variant_table -> int -> 'a list
val encode_flags : 'a variant_table -> 'a list -> int
exception Null

Null pointer exception

type 'a stable

Ensure a value is copied in the old generation

val stable_copy : 'a -> 'a stable

Region handling

type region

The abstract type of heap regions

val length : region -> int

the length of the region

val get_addr : region -> nativeint

the length of the region

the start address of the region

val sub : ?pos:int -> ?len:int -> region -> region

subregion of length len starting at offset pos

val get_byte : region -> pos:int -> int
val set_byte : region -> pos:int -> int -> unit
val blit : src:region -> dst:region -> unit
val region_of_bytes : bytes -> region

create a region sharing a string

val bytes_of_region : region -> bytes

create a region sharing a string

copy the contents of the region to a string

type 'a bigarray = (int, Bigarray.int8_unsigned_elt, 'a) Bigarray.Array1.t
val region_of_bigarray : 'a bigarray -> region

create a region sharing a bigarray

Unsafe access

val unsafe_create_region : path:int array -> get_length:('a -> int) -> 'a -> region

unsafe_create_region ~path ~get_length returns a function to build regions from a specific kind of data abstraction

val unsafe_get_byte : region -> pos:int -> int
val unsafe_set_byte : region -> pos:int -> int -> unit
OCaml

Innovation. Community. Security.