package lablgtk3

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

Module GpointerSource

Gpointer: various kinds of pointers to C data

Sourcetype 'a optaddr

Marked pointers

Sourceval optaddr : 'a option -> 'a optaddr
Sourcetype boxed

Boxed pointers

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

Variant tables

Sourceval decode_variant : 'a variant_table -> int -> 'a
Sourceval encode_variant : 'a variant_table -> 'a -> int
Sourceval decode_flags : 'a variant_table -> int -> 'a list
Sourceval encode_flags : 'a variant_table -> 'a list -> int
Sourceexception Null

Null pointer exception

Sourcetype 'a stable

Ensure a value is copied in the old generation

Sourceval stable_copy : 'a -> 'a stable

Region handling

Sourcetype region

The abstract type of heap regions

Sourceval length : region -> int

the length of the region

Sourceval get_addr : region -> nativeint

the length of the region

the start address of the region

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

subregion of length len starting at offset pos

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

create a region sharing a string

Sourceval bytes_of_region : region -> bytes

create a region sharing a string

copy the contents of the region to a string

Sourceval region_of_bigarray : 'a bigarray -> region

create a region sharing a bigarray

Unsafe access

Sourceval 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

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

Innovation. Community. Security.