diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2022-06-27 22:07:56 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2022-06-27 22:07:56 +0200 |
| commit | babe3d394a600494c1db4e7daf40e39afd76da75 (patch) | |
| tree | 9bee0379d886123544a2426d531956d931c1b6ac /src_c/opcut.h | |
| parent | 8d1d7b7b4a48187f5849548bbc6bb543d6de33ba (diff) | |
WIP native implementation
Diffstat (limited to 'src_c/opcut.h')
| -rw-r--r-- | src_c/opcut.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src_c/opcut.h b/src_c/opcut.h index de4ae3c..2b7384a 100644 --- a/src_c/opcut.h +++ b/src_c/opcut.h @@ -20,7 +20,7 @@ typedef void (*opcut_free_t)(void *p); typedef struct opcut_allocator_t opcut_allocator_t; typedef struct opcut_panel_t { - char *id; + int id; double width; double height; @@ -30,7 +30,7 @@ typedef struct opcut_panel_t { } opcut_panel_t; typedef struct opcut_item_t { - char *id; + int id; double width; double height; bool can_rotate; @@ -85,26 +85,17 @@ opcut_allocator_t *opcut_allocator_create(opcut_malloc_t malloc, opcut_free_t free); void opcut_allocator_destroy(opcut_allocator_t *a); -opcut_panel_t *opcut_panel_create(opcut_allocator_t *a, char *id, double width, +opcut_panel_t *opcut_panel_create(opcut_allocator_t *a, int id, double width, double height, opcut_panel_t *next); -opcut_item_t *opcut_item_create(opcut_allocator_t *a, char *id, double width, +opcut_item_t *opcut_item_create(opcut_allocator_t *a, int id, double width, double height, bool can_rotate, opcut_item_t *next); opcut_params_t *opcut_params_create(opcut_allocator_t *a, double cut_width, bool min_initial_usage, opcut_panel_t *panels, opcut_item_t *items); -opcut_used_t *opcut_used_create(opcut_allocator_t *a, opcut_panel_t *panel, - opcut_item_t *item, double x, double y, - bool rotate, opcut_used_t *next); -opcut_unused_t *opcut_unused_create(opcut_allocator_t *a, opcut_panel_t *panel, - double width, double height, double x, - double y, bool rotate, - opcut_unused_t *next); -opcut_result_t *opcut_result_create(opcut_allocator_t *a, - opcut_params_t *params, opcut_used_t *used, - opcut_unused_t *unused); - -int opcut_calculate(opcut_allocator_t *a, int method, opcut_result_t *result); + +int opcut_calculate(opcut_allocator_t *a, int method, opcut_params_t *params, + opcut_result_t **result); #ifdef __cplusplus } |
