Table: All editor code files have been added from the flash drive.
The start date of development is September 12, 2024.
This commit is contained in:
63
includes/table_lib.h
Normal file
63
includes/table_lib.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#ifndef TABLE_LIB_H
|
||||
#define TABLE_LIB_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define table_dom_t uint32_t
|
||||
|
||||
#define TABLE_DIR_TYPE_DATA 0x1
|
||||
#define TABLE_DIR_TYPE_FORMAT 0x2
|
||||
|
||||
#define TABLE_OBJECT_TYPE_STR 0x01
|
||||
#define TABLE_OBJECT_TYPE_IMAGE 0x05
|
||||
#define TABLE_OBJECT_TYPE_NULL 0x00
|
||||
|
||||
typedef struct table_object {
|
||||
uint8_t type;
|
||||
uint16_t size;
|
||||
uint8_t ext_size;
|
||||
} table_object;
|
||||
|
||||
typedef struct table_object_str {
|
||||
uint8_t type;
|
||||
uint16_t size;
|
||||
uint8_t __zero;
|
||||
uint16_t str_len;
|
||||
char str;
|
||||
|
||||
} table_object_str;
|
||||
|
||||
typedef struct table_object_image {
|
||||
uint8_t type;
|
||||
uint16_t size;
|
||||
uint8_t __zero;
|
||||
uint16_t width;
|
||||
uint16_t height;
|
||||
uint32_t data;
|
||||
|
||||
} table_object_image;
|
||||
|
||||
typedef union table_addr{
|
||||
struct {
|
||||
uint32_t lo;
|
||||
uint32_t hi;
|
||||
};
|
||||
struct {
|
||||
uint16_t type;
|
||||
uint8_t index_w [3];
|
||||
uint8_t index_h [3];
|
||||
};
|
||||
}table_addr;
|
||||
|
||||
/*
|
||||
DLLAPI int __stdcall create_table_dom(table_dot_t* ptr);
|
||||
DLLAPI void __stdcall destruct_table_dom(table_dom_t ptr);
|
||||
|
||||
DLLAPI table_object* __stdcall get_table_value(table_dom_t ptr, table_addr* addr);
|
||||
DLLAPI int __stdcall set_table_value(table_dom_t ptr, table_addr* addr,table_object* tobj);
|
||||
*/
|
||||
|
||||
DLLAPI table_object* __stdcall create_table_object(uint32_t size);
|
||||
DLLAPI void __stdcall destruct_table_object(table_object* ptr);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user