Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
introspection.h File Reference
#include <inttypes.h>
#include <glib.h>
#include <stdlib.h>
+ Include dependency graph for introspection.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_introspection_type_header_t
 
struct  dt_introspection_type_opaque_t
 
struct  dt_introspection_type_float_t
 
struct  dt_introspection_type_double_t
 
struct  dt_introspection_type_float_complex_t
 
struct  dt_introspection_type_char_t
 
struct  dt_introspection_type_int8_t
 
struct  dt_introspection_type_uint8_t
 
struct  dt_introspection_type_short_t
 
struct  dt_introspection_type_ushort_t
 
struct  dt_introspection_type_int_t
 
struct  dt_introspection_type_uint_t
 
struct  dt_introspection_type_long_t
 
struct  dt_introspection_type_ulong_t
 
struct  dt_introspection_type_bool_t
 
struct  dt_introspection_type_array_t
 
struct  dt_introspection_type_enum_tuple_t
 
struct  dt_introspection_type_enum_t
 
struct  dt_introspection_type_struct_t
 
struct  dt_introspection_type_union_t
 
union  dt_introspection_field_t
 
struct  dt_introspection_t
 

Macros

#define DT_INTROSPECTION_VERSION   8
 

Typedefs

typedef enum dt_introspection_type_t dt_introspection_type_t
 
typedef struct dt_introspection_type_header_t dt_introspection_type_header_t
 
typedef struct dt_introspection_type_opaque_t dt_introspection_type_opaque_t
 
typedef struct dt_introspection_type_float_t dt_introspection_type_float_t
 
typedef struct dt_introspection_type_double_t dt_introspection_type_double_t
 
typedef struct dt_introspection_type_float_complex_t dt_introspection_type_float_complex_t
 
typedef struct dt_introspection_type_char_t dt_introspection_type_char_t
 
typedef struct dt_introspection_type_int8_t dt_introspection_type_int8_t
 
typedef struct dt_introspection_type_uint8_t dt_introspection_type_uint8_t
 
typedef struct dt_introspection_type_short_t dt_introspection_type_short_t
 
typedef struct dt_introspection_type_ushort_t dt_introspection_type_ushort_t
 
typedef struct dt_introspection_type_int_t dt_introspection_type_int_t
 
typedef struct dt_introspection_type_uint_t dt_introspection_type_uint_t
 
typedef struct dt_introspection_type_long_t dt_introspection_type_long_t
 
typedef struct dt_introspection_type_ulong_t dt_introspection_type_ulong_t
 
typedef struct dt_introspection_type_bool_t dt_introspection_type_bool_t
 
typedef struct dt_introspection_type_array_t dt_introspection_type_array_t
 
typedef struct dt_introspection_type_enum_tuple_t dt_introspection_type_enum_tuple_t
 
typedef struct dt_introspection_type_enum_t dt_introspection_type_enum_t
 
typedef struct dt_introspection_type_struct_t dt_introspection_type_struct_t
 
typedef struct dt_introspection_type_union_t dt_introspection_type_union_t
 
typedef union dt_introspection_field_t dt_introspection_field_t
 
typedef struct dt_introspection_t dt_introspection_t
 

Enumerations

enum  dt_introspection_type_t {
  DT_INTROSPECTION_TYPE_NONE = 0 ,
  DT_INTROSPECTION_TYPE_OPAQUE ,
  DT_INTROSPECTION_TYPE_FLOAT ,
  DT_INTROSPECTION_TYPE_DOUBLE ,
  DT_INTROSPECTION_TYPE_FLOATCOMPLEX ,
  DT_INTROSPECTION_TYPE_CHAR ,
  DT_INTROSPECTION_TYPE_INT8 ,
  DT_INTROSPECTION_TYPE_UINT8 ,
  DT_INTROSPECTION_TYPE_SHORT ,
  DT_INTROSPECTION_TYPE_USHORT ,
  DT_INTROSPECTION_TYPE_INT ,
  DT_INTROSPECTION_TYPE_UINT ,
  DT_INTROSPECTION_TYPE_LONG ,
  DT_INTROSPECTION_TYPE_ULONG ,
  DT_INTROSPECTION_TYPE_BOOL ,
  DT_INTROSPECTION_TYPE_ARRAY ,
  DT_INTROSPECTION_TYPE_ENUM ,
  DT_INTROSPECTION_TYPE_STRUCT ,
  DT_INTROSPECTION_TYPE_UNION
}
 

Functions

static voiddt_introspection_access_array (dt_introspection_field_t *self, void *start, unsigned int element, dt_introspection_field_t **child)
 
static voiddt_introspection_get_child (dt_introspection_field_t *self, void *start, const char *name, dt_introspection_field_t **child)
 
static const char * dt_introspection_get_enum_name (dt_introspection_field_t *self, int value)
 
static gboolean dt_introspection_get_enum_value (dt_introspection_field_t *self, const char *name, int *value)
 

Macro Definition Documentation

◆ DT_INTROSPECTION_VERSION

#define DT_INTROSPECTION_VERSION   8

Typedef Documentation

◆ dt_introspection_field_t

◆ dt_introspection_t

◆ dt_introspection_type_array_t

◆ dt_introspection_type_bool_t

◆ dt_introspection_type_char_t

◆ dt_introspection_type_double_t

◆ dt_introspection_type_enum_t

◆ dt_introspection_type_enum_tuple_t

◆ dt_introspection_type_float_complex_t

◆ dt_introspection_type_float_t

◆ dt_introspection_type_header_t

◆ dt_introspection_type_int8_t

◆ dt_introspection_type_int_t

◆ dt_introspection_type_long_t

◆ dt_introspection_type_opaque_t

◆ dt_introspection_type_short_t

◆ dt_introspection_type_struct_t

◆ dt_introspection_type_t

◆ dt_introspection_type_uint8_t

◆ dt_introspection_type_uint_t

◆ dt_introspection_type_ulong_t

◆ dt_introspection_type_union_t

◆ dt_introspection_type_ushort_t

Enumeration Type Documentation

◆ dt_introspection_type_t

Enumerator
DT_INTROSPECTION_TYPE_NONE 
DT_INTROSPECTION_TYPE_OPAQUE 
DT_INTROSPECTION_TYPE_FLOAT 
DT_INTROSPECTION_TYPE_DOUBLE 
DT_INTROSPECTION_TYPE_FLOATCOMPLEX 
DT_INTROSPECTION_TYPE_CHAR 
DT_INTROSPECTION_TYPE_INT8 
DT_INTROSPECTION_TYPE_UINT8 
DT_INTROSPECTION_TYPE_SHORT 
DT_INTROSPECTION_TYPE_USHORT 
DT_INTROSPECTION_TYPE_INT 
DT_INTROSPECTION_TYPE_UINT 
DT_INTROSPECTION_TYPE_LONG 
DT_INTROSPECTION_TYPE_ULONG 
DT_INTROSPECTION_TYPE_BOOL 
DT_INTROSPECTION_TYPE_ARRAY 
DT_INTROSPECTION_TYPE_ENUM 
DT_INTROSPECTION_TYPE_STRUCT 
DT_INTROSPECTION_TYPE_UNION 

Function Documentation

◆ dt_introspection_access_array()

static void * dt_introspection_access_array ( dt_introspection_field_t self,
void start,
unsigned int  element,
dt_introspection_field_t **  child 
)
inlinestatic

helper function to access array elements – make sure to cast the result correctly!

Parameters
selffield description of the array
startpointer into the params blob to the start of the array
elementthe element of the array to return
childif non-NULL, it returns the field description of the child element
Returns
the pointer into the params blob to the requested element, or NULL if not found

References dt_introspection_field_t::Array, DT_INTROSPECTION_TYPE_ARRAY, dt_introspection_type_array_t::field, dt_introspection_field_t::header, dt_introspection_type_header_t::size, and dt_introspection_type_header_t::type.

◆ dt_introspection_get_child()

static void * dt_introspection_get_child ( dt_introspection_field_t self,
void start,
const char *  name,
dt_introspection_field_t **  child 
)
inlinestatic

helper function to access elements in a struct – make sure to cast the result correctly!

Parameters
selffield description of the struct
startpointer into the params blob to the start of the struct
namethe name of the child to look for
childif non-NULL, it returns the field description of the child element
Returns
the pointer into the params blob to the requested element, or NULL if not found

References DT_INTROSPECTION_TYPE_STRUCT, DT_INTROSPECTION_TYPE_UNION, dt_introspection_type_struct_t::fields, dt_introspection_type_union_t::fields, dt_introspection_field_t::header, name, dt_introspection_type_header_t::offset, dt_introspection_field_t::Struct, dt_introspection_type_header_t::type, and dt_introspection_field_t::Union.

◆ dt_introspection_get_enum_name()

static const char * dt_introspection_get_enum_name ( dt_introspection_field_t self,
int  value 
)
inlinestatic

helper function to get the symbolic name of an enum value

Parameters
selffield description of the enum
valuethe value that should be looked up
Returns
the pointer to the name string, or NULL if not found

References DT_INTROSPECTION_TYPE_ENUM, dt_introspection_field_t::Enum, dt_introspection_field_t::header, dt_introspection_type_header_t::type, and dt_introspection_type_enum_t::values.

◆ dt_introspection_get_enum_value()

static gboolean dt_introspection_get_enum_value ( dt_introspection_field_t self,
const char *  name,
int *  value 
)
inlinestatic

helper function to get the enum value of a symbolic name

Parameters
selffield description of the enum
namethe name that should be looked up
valuethe value that was found
Returns
TRUE if the name was found, or FALSE otherwise

References DT_INTROSPECTION_TYPE_ENUM, dt_introspection_field_t::Enum, FALSE, dt_introspection_field_t::header, name, TRUE, dt_introspection_type_header_t::type, and dt_introspection_type_enum_t::values.