blob: 70aca537549912e86ecd8b28c5e2cf6a21d20ec8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/*! @file emb-thread.h */
#ifndef EMB_THREAD_H
#define EMB_THREAD_H
/* TODO: what the heck is math.h doing here? This needs moved to the source file instead of being here. */
#include <math.h>
#include "emb-color.h"
#include "api-start.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct EmbThread_
{
EmbColor color;
const char* description;
const char* catalogNumber;
} EmbThread;
typedef struct EmbThreadList_
{
EmbThread thread;
struct EmbThreadList_* next;
} EmbThreadList;
extern EMB_PUBLIC int EMB_CALL embThread_findNearestColor(EmbColor color, EmbThreadList* colors);
extern EMB_PUBLIC int EMB_CALL embThread_findNearestColorInArray(EmbColor color, EmbThread* colorArray, int count);
extern EMB_PUBLIC EmbThread EMB_CALL embThread_getRandom(void);
extern EMB_PUBLIC EmbThreadList* EMB_CALL embThreadList_create(EmbThread data);
extern EMB_PUBLIC EmbThreadList* EMB_CALL embThreadList_add(EmbThreadList* pointer, EmbThread data);
extern EMB_PUBLIC int EMB_CALL embThreadList_count(EmbThreadList* pointer);
extern EMB_PUBLIC int EMB_CALL embThreadList_empty(EmbThreadList* pointer);
extern EMB_PUBLIC void EMB_CALL embThreadList_free(EmbThreadList* pointer);
extern EMB_PUBLIC EmbThread EMB_CALL embThreadList_getAt(EmbThreadList* pointer, int num);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#include "api-stop.h"
#endif /* EMB_THREAD_H */
/* kate: bom off; indent-mode cstyle; indent-width 4; replace-trailing-space-save on; */
|