#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
Go to the source code of this file.
|
typedef struct _lives_struct_def | lives_struct_def_t |
|
typedef void(* | lives_struct_new_cb) (void *strct, void *parent, const char *strct_type, void *new_user_data) |
|
typedef void(* | lives_struct_copied_cb) (void *strct, void *child, const char *strct_type, void *copied_user_data) |
|
typedef void(* | lives_struct_destroy_cb) (void *strct, const char *strct_type, void *delete_user_data) |
|
typedef void(* | lives_field_init_cb) (void *strct, const char *struct_type, const char *field_name, void *ptr_to_field) |
|
typedef void(* | lives_field_copy_cb) (void *dst_struct, void *src_struct, const char *strct_type, const char *field_name, void *ptr_to_dst_field, void *ptr_to_src_field) |
|
typedef void(* | lives_field_delete_cb) (void *strct, const char *struct_type, const char *field_name, void *ptr_to_field) |
| d->*field_name = s->(field_name) + 10; or using anonymous fields: *(int *)dst_field = *(int *)src_field + 10; More...
|
|
|
| error ("LSD_RANDFUNC(ptr, size) must be defined") |
|
◆ _MEM_ALIGNMENT_
#define _MEM_ALIGNMENT_ 0 |
Definition at line 87 of file lsd.h.
◆ ALLOW_UNUSED
Definition at line 45 of file lsd.h.
◆ baderr_print
#define baderr_print |
( |
|
... | ) |
fprintf(stderr, __VA_ARGS__) |
Definition at line 37 of file lsd.h.
◆ debug_print
#define debug_print |
( |
|
... | ) |
|
Definition at line 23 of file lsd.h.
◆ LIVES_FIELD_ARRAY
◆ LIVES_FIELD_BLOB
◆ LIVES_FIELD_CHARPTR
◆ LIVES_FIELD_FLAG_ALLOC_AND_COPY
#define LIVES_FIELD_FLAG_ALLOC_AND_COPY (1l << 0) |
AUTONATION FLAGS.
copy flags alloc and copy on copy. If bytesize is set that will be the alocated size, if 0 then we do a strdup. Fixed size is ignored for arrays. if bytesize is 0, field will be set to NULL in lives_struct_copy, if ALLOC_AND_COPY is also set, will be set to empty string if bytesize > 0 and not IS_NULLT_ARRAY then field will will be filled with bytesize zeros dest->field = NULL or memset(dets->field, 0, bytesize) for ARRAYS, the process will be appied to each element in turn however, since a NULL element marks the end of a NULLT_ARRAY, the combination ALLOC_AND_COPY | ZERO_ON_COPY | IS_NULLT_ARRAY may interfere with subsequent copying
Definition at line 118 of file lsd.h.
◆ LIVES_FIELD_FLAG_FREE_ALL_ON_DELETE
#define LIVES_FIELD_FLAG_FREE_ALL_ON_DELETE (1l << 17) |
for (i = 0; struct->field[i], i++) free(struct->field[i];
combined with IS_NULLT_ARRAY, frees all elements, combine with FREE_ON_DELETE to free elemnt after
Definition at line 127 of file lsd.h.
◆ LIVES_FIELD_FLAG_FREE_ON_DELETE
#define LIVES_FIELD_FLAG_FREE_ON_DELETE (1l << 16) |
< field wiill be freed in lives_struct_delete free(struct->field)
Definition at line 124 of file lsd.h.
◆ LIVES_FIELD_FLAG_IS_NULLT_ARRAY
#define LIVES_FIELD_FLAG_IS_NULLT_ARRAY (1l << 33) |
◆ LIVES_FIELD_FLAG_IS_SUBSTRUCT
#define LIVES_FIELD_FLAG_IS_SUBSTRUCT (1l << 32) |
flags giving extra info about the field (affects copy and delete)
< field is a substruct with its own lives_struct_def_t; functions should be called recursively it must be possible to locate the lives_struct_def_t field from the first byte sequence matching LIVES_STRUCT_ID in its identifier field lives_struct_copy(struct->field if this is set, all other flag bits are ignored for the field field is an array of elements of size bytelen, last element has all bytes set to zero if bytesize is zero, it is an array of NUL terminated char may be combined with ALLOC_AND_COPY, FREE_ON_DELETE, FREE_ALL_ON_DELETE
Definition at line 140 of file lsd.h.
◆ LIVES_FIELD_FLAG_ZERO_ON_COPY
#define LIVES_FIELD_FLAG_ZERO_ON_COPY (1l << 1) |
◆ LIVES_FIELD_PTR_ARRAY
#define LIVES_FIELD_PTR_ARRAY |
Value:
Definition at line 176 of file lsd.h.
◆ LIVES_FIELD_TO_EMPTY_STRING
◆ LIVES_STRUCT_ID
#define LIVES_STRUCT_ID 0x4C7C56332D2D3035 |
Definition at line 51 of file lsd.h.
◆ LSD_MAX_ALLOC
#define LSD_MAX_ALLOC 65535 |
Definition at line 50 of file lsd.h.
◆ LSD_NAMELEN
Definition at line 49 of file lsd.h.
◆ LSD_TEXTLEN
Definition at line 48 of file lsd.h.
◆ memerr_print
#define memerr_print |
( |
|
size, |
|
|
|
name, |
|
|
|
struct |
|
) |
| |
Value: fprintf(stderr, "WARNING: memory failure allocating " \
"%lu bytes for field %s in struct %s", \
size, name, struct)
Definition at line 28 of file lsd.h.
◆ SELF_STRUCT_TYPE
#define SELF_STRUCT_TYPE "lives_struct_def_t" |
256 bytes
Definition at line 275 of file lsd.h.
◆ lives_field_copy_cb
typedef void(* lives_field_copy_cb) (void *dst_struct, void *src_struct, const char *strct_type, const char *field_name, void *ptr_to_dst_field, void *ptr_to_src_field) |
◆ lives_field_delete_cb
typedef void(* lives_field_delete_cb) (void *strct, const char *struct_type, const char *field_name, void *ptr_to_field) |
d->*field_name = s->(field_name) + 10; or using anonymous fields: *(int *)dst_field = *(int *)src_field + 10;
Definition at line 220 of file lsd.h.
◆ lives_field_init_cb
typedef void(* lives_field_init_cb) (void *strct, const char *struct_type, const char *field_name, void *ptr_to_field) |
◆ lives_struct_copied_cb
typedef void(* lives_struct_copied_cb) (void *strct, void *child, const char *strct_type, void *copied_user_data) |
◆ lives_struct_def_t
Definition at line 94 of file lsd.h.
◆ lives_struct_destroy_cb
typedef void(* lives_struct_destroy_cb) (void *strct, const char *strct_type, void *delete_user_data) |
◆ lives_struct_new_cb
typedef void(* lives_struct_new_cb) (void *strct, void *parent, const char *strct_type, void *new_user_data) |
◆ error()
error |
( |
"LSD_RANDFUNC(ptr, size) must be defined" |
| ) |
|
Referenced by add_param_connections(), alpha_unpremult(), append_frame_event(), deinterlace_frame(), do_effect(), free_n_msgs(), fx_changed(), get_master_vol_param(), get_nth_info_message(), insert_blank_frames(), insert_frame_event_at(), is_perchannel_multiw(), lives_event_list_new(), lives_pixbuf_new_from_file(), load_theme_images(), move_filter_deinit_event(), move_filter_init_event(), multitrack_delete(), num_out_params(), on_del_node_clicked(), pl_key_function(), realfx_progress(), rec_param_change(), remove_filter_from_event_list(), render_events(), resize(), splash_init(), transition_add_in_out(), update_visual_params(), weed_call_deinit_func(), weed_call_init_func(), weed_deinit_effect(), weed_error_to_text(), weed_filter_out_paramtmpl(), weed_generator_start(), weed_get_all_names(), weed_init_effect(), weed_inst_in_param(), weed_inst_out_param(), weed_instance_from_filter(), weed_layer_get_gamma(), weed_layer_set_from_yuv4m(), weed_playback_gen_start(), weed_unload_all(), and wge_inner().