Type Alias GTypeValueTable

Source
pub type GTypeValueTable = _GTypeValueTable;
Expand description

GTypeValueTable: @value_init: Function to initialize a GValue @value_free: Function to free a GValue @value_copy: Function to copy a GValue @value_peek_pointer: Function to peek the contents of a GValue if they fit into a pointer @collect_format: A string format describing how to collect the contents of this value bit-by-bit. Each character in the format represents an argument to be collected, and the characters themselves indicate the type of the argument. Currently supported arguments are:

  • 'i': Integers, passed as collect_values[].v_int
  • 'l': Longs, passed as collect_values[].v_long
  • 'd': Doubles, passed as collect_values[].v_double
  • 'p': Pointers, passed as collect_values[].v_pointer It should be noted that for variable argument list construction, ANSI C promotes every type smaller than an integer to an int, and floats to doubles. So for collection of short int or char, 'i' needs to be used, and for collection of floats 'd'. @collect_value: Function to initialize a GValue from the values collected from variadic arguments @lcopy_format: Format description of the arguments to collect for @lcopy_value, analogous to @collect_format. Usually, @lcopy_format string consists only of 'p's to provide lcopy_value() with pointers to storage locations. @lcopy_value: Function to store the contents of a value into the locations collected from variadic arguments

The #GTypeValueTable provides the functions required by the #GValue implementation, to serve as a container for values of a type.

Aliased Type§

struct GTypeValueTable {
    pub value_init: Option<unsafe extern "C" fn(*mut _GValue)>,
    pub value_free: Option<unsafe extern "C" fn(*mut _GValue)>,
    pub value_copy: Option<unsafe extern "C" fn(*const _GValue, *mut _GValue)>,
    pub value_peek_pointer: Option<unsafe extern "C" fn(*const _GValue) -> *mut c_void>,
    pub collect_format: *const i8,
    pub collect_value: Option<unsafe extern "C" fn(*mut _GValue, u32, *mut _GTypeCValue, u32) -> *mut i8>,
    pub lcopy_format: *const i8,
    pub lcopy_value: Option<unsafe extern "C" fn(*const _GValue, u32, *mut _GTypeCValue, u32) -> *mut i8>,
}

Fields§

§value_init: Option<unsafe extern "C" fn(*mut _GValue)>§value_free: Option<unsafe extern "C" fn(*mut _GValue)>§value_copy: Option<unsafe extern "C" fn(*const _GValue, *mut _GValue)>§value_peek_pointer: Option<unsafe extern "C" fn(*const _GValue) -> *mut c_void>§collect_format: *const i8§collect_value: Option<unsafe extern "C" fn(*mut _GValue, u32, *mut _GTypeCValue, u32) -> *mut i8>§lcopy_format: *const i8§lcopy_value: Option<unsafe extern "C" fn(*const _GValue, u32, *mut _GTypeCValue, u32) -> *mut i8>