26 #include <sol-common-buildopts.h>
58 #define _SOL_TYPE_CHECK(type, var, value) \
59 ({ type var = (value); var; })
95 #define SOL_TYPE_CHECK(type, value) \
96 _SOL_TYPE_CHECK(type, __dummy_ ## __COUNTER__, (value))
102 #define SSIZE_MAX LONG_MAX
109 #define SSIZE_MIN LONG_MIN
208 #define SOL_DRANGE_INIT() \
221 #define SOL_DRANGE_INIT_VALUE(value_) \
348 #define SOL_IRANGE_INIT() \
361 #define SOL_IRANGE_INIT_VALUE(value_) \
483 #ifndef SOL_NO_API_VERSION
484 #define SOL_BLOB_TYPE_API_VERSION (1)
591 memcpy(v, mem, size);
608 #define SOL_BLOB_NEW_DUP(mem_) sol_blob_new_dup((&mem_), sizeof(mem_))
struct sol_blob_type sol_blob_type
Data type describing a blob type.
int sol_drange_add(const struct sol_drange *var0, const struct sol_drange *var1, struct sol_drange *result)
Adds the double ranges var0 and var1 and stores the result in result.
int sol_rgb_set_max(struct sol_rgb *color, uint32_t max_value)
Set a maximum value for all components of a RGB color.
void(* free)(struct sol_blob *blob)
Callback to free an instance.
Definition: sol-types.h:488
Data type to describe <key, value> pairs of strings.
Definition: sol-types.h:629
struct sol_blob sol_blob
Data type describing the default blob implementation.
double alt
Altitude.
Definition: sol-types.h:149
int32_t step
Range step.
Definition: sol-types.h:342
static struct sol_blob * sol_blob_new_dup(const void *mem, size_t size)
Creates a new blob duplicating target memory,.
Definition: sol-types.h:579
uint32_t blue_max
Blue component maximum value.
Definition: sol-types.h:161
uint32_t green_max
Green component maximum value.
Definition: sol-types.h:160
Data type describing a blob type.
Definition: sol-types.h:482
int32_t max
Range maximum value.
Definition: sol-types.h:330
int sol_irange_div(const struct sol_irange *var0, const struct sol_irange *var1, struct sol_irange *result)
Divides the integer range var0 by var1 and stores the result in result.
int sol_drange_div(const struct sol_drange *var0, const struct sol_drange *var1, struct sol_drange *result)
Divides the double range var0 by var1 and stores the result in result.
uint32_t red_max
Red component maximum value.
Definition: sol-types.h:159
double max
Range maximum value.
Definition: sol-types.h:190
double max
Range maximum value.
Definition: sol-types.h:201
const char * value
Pair's value.
Definition: sol-types.h:631
double min
Range minimum value.
Definition: sol-types.h:189
int32_t max
Range maximum value.
Definition: sol-types.h:341
int sol_irange_sub(const struct sol_irange *var0, const struct sol_irange *var1, struct sol_irange *result)
Subtracts the integer range var1 from var0 and stores the result in result.
double val
Current value.
Definition: sol-types.h:188
uint32_t blue
Blue component.
Definition: sol-types.h:158
uint16_t refcnt
Blob reference counter.
Definition: sol-types.h:473
int sol_drange_mul(const struct sol_drange *var0, const struct sol_drange *var1, struct sol_drange *result)
Multiplies the double ranges var0 and var1 and stores the result in result.
Data type describing a Double range.
Definition: sol-types.h:187
int sol_blob_setup(struct sol_blob *blob, const struct sol_blob_type *type, const void *mem, size_t size)
Setup a blob structure with the given parameters.
int sol_irange_mul(const struct sol_irange *var0, const struct sol_irange *var1, struct sol_irange *result)
Multiplies the integer ranges var0 and var1 and stores the result in result.
uint32_t red
Red component.
Definition: sol-types.h:156
struct sol_location sol_location
Data type to describe a location.
double step
Range step.
Definition: sol-types.h:202
struct sol_blob * sol_blob_new(const struct sol_blob_type *type, struct sol_blob *parent, const void *mem, size_t size)
Creates a new blob instance of the given type type.
const struct sol_blob_type SOL_BLOB_TYPE_DEFAULT
Blob type object for the default implementation.
bool sol_rgb_eq(const struct sol_rgb *var0, const struct sol_rgb *var1)
Checks the ranges of var0 and var1 for equality.
struct sol_blob * sol_blob_ref(struct sol_blob *blob)
Increments the reference counter of the given blob.
int sol_drange_sub(const struct sol_drange *var0, const struct sol_drange *var1, struct sol_drange *result)
Subtracts the double range var1 from var0 and stores the result in result.
static struct sol_buffer value
Definition: server.c:42
Data type to describe a direction vector.
Definition: sol-types.h:125
double x
X coordinate.
Definition: sol-types.h:126
const struct sol_blob_type SOL_BLOB_TYPE_NO_FREE
Blob type object for the nofree implementation.
static struct sol_blob * sol_blob_new_dup_str(const char *str)
Creates a new blob duplicating target NUL terminated string.
Definition: sol-types.h:618
struct sol_blob * parent
Pointer to the parent Blob.
Definition: sol-types.h:470
uint16_t sub_api
Type API version.
Definition: sol-types.h:486
Data type describing Integer ranges.
Definition: sol-types.h:327
const char * key
Pair's key.
Definition: sol-types.h:630
void * mem
Blob data.
Definition: sol-types.h:471
bool sol_direction_vector_eq(const struct sol_direction_vector *var0, const struct sol_direction_vector *var1)
Checks the ranges of var0 and var1 for equality.
Data type to describe a location.
Definition: sol-types.h:146
struct sol_drange sol_drange
Data type describing a Double range.
Data type to describe a RGB color.
Definition: sol-types.h:155
double lat
Latitude.
Definition: sol-types.h:147
int32_t val
Current value.
Definition: sol-types.h:328
bool sol_irange_eq(const struct sol_irange *var0, const struct sol_irange *var1)
Checks the integer ranges var0 and var1 for equality.
int32_t step
Range step.
Definition: sol-types.h:331
double max
Maximum value of a coordinate for all axis.
Definition: sol-types.h:130
Data type describing the default blob implementation.
Definition: sol-types.h:468
struct sol_rgb sol_rgb
Data type to describe a RGB color.
int sol_drange_mod(const struct sol_drange *var0, const struct sol_drange *var1, struct sol_drange *result)
Calculates the module of the double range var0 by var1 and stores the result in result.
struct sol_drange_spec sol_drange_spec
Data type describing a spec for Double ranges.
bool sol_drange_eq(const struct sol_drange *var0, const struct sol_drange *var1)
Checks the double ranges var0 and var1 for equality.
int sol_irange_compose(const struct sol_irange_spec *spec, int32_t value, struct sol_irange *result)
Initializes result with the given spec and value.
double lon
Longitude.
Definition: sol-types.h:148
struct sol_irange sol_irange
Data type describing Integer ranges.
double step
Range step.
Definition: sol-types.h:191
size_t size
Blob size.
Definition: sol-types.h:472
int32_t min
Range minimum value.
Definition: sol-types.h:340
uint16_t api_version
API version.
Definition: sol-types.h:485
double min
Range minimum value.
Definition: sol-types.h:200
int sol_irange_mod(const struct sol_irange *var0, const struct sol_irange *var1, struct sol_irange *result)
Calculates the module of the integer range var0 by var1 and stores the result in result.
int sol_drange_compose(const struct sol_drange_spec *spec, double value, struct sol_drange *result)
Initializes result with the given spec and value.
double min
Minimum value of a coordinate for all axis.
Definition: sol-types.h:129
Data type describing a spec for Integer ranges.
Definition: sol-types.h:339
struct sol_key_value sol_key_value
Data type to describe <key, value> pairs of strings.
These are routines that Soletta provides for its vector implementation.
double z
Z coordinate.
Definition: sol-types.h:128
Data type describing a spec for Double ranges.
Definition: sol-types.h:199
double y
Y coordinate.
Definition: sol-types.h:127
struct sol_irange_spec sol_irange_spec
Data type describing a spec for Integer ranges.
const struct sol_blob_type * type
Blob type.
Definition: sol-types.h:469
int32_t min
Range minimum value.
Definition: sol-types.h:329
const struct sol_blob_type SOL_BLOB_TYPE_NO_FREE_DATA
Blob type object for the nofree implementation.
struct sol_direction_vector sol_direction_vector
Data type to describe a direction vector.
void sol_blob_set_parent(struct sol_blob *blob, struct sol_blob *parent)
Set the blob's parent.
int sol_irange_add(const struct sol_irange *var0, const struct sol_irange *var1, struct sol_irange *result)
Adds the integer ranges var0 and var1 and stores the result in result.
uint32_t green
Green component.
Definition: sol-types.h:157
void sol_blob_unref(struct sol_blob *blob)
Decreases the reference counter of the given blob.