42typedef struct _awk_text_style_t {
60typedef struct _awk_dash_style_t {
69typedef struct _awk_paint_style_t {
81typedef struct _awk_render_context_t {
184typedef struct _awk_file_node {
192typedef struct _awk_readdir_result {
206 void* (*file_open) (
const char *filename,
const char *mode);
221 size_t (*
file_read) (
void *ptr,
size_t size,
void* handler);
230 size_t (*
file_write) (
void *ptr,
size_t size,
void* handler);
238 int (*
file_seek) (
void *handler,
long offset,
int where);
281 void* (*file_opendir)(
const char *path);
320 bool (*
file_unzip)(
const char *zip_file,
const char *out_dir);
343 void* (*mem_malloc) (
size_t size);
348 void* (*mem_calloc) (
size_t count,
size_t size);
353 void* (*mem_realloc) (
void* ptr,
size_t size);
372 void* (*mem_malloc) (
size_t size,
int type);
380#define awk_http_header_t awk_map_http_header_t
385typedef enum _awk_http_method {
393typedef enum _awk_http_priority {
411typedef struct _awk_http_request_t {
422typedef struct _awk_http_response_t {
507typedef struct _awk_thread_adapter_t {
512 uint64_t (*get_thread_id)(void);
523typedef struct _awk_map_tile_file_adapter_t {
528 bool (*on_tile_file)(
const char* tile_file_key,
char *file_path,
size_t *file_offset,
size_t *file_size);
540typedef struct _awk_map_custom_adapter_t {
545 int (*custom_sscanf)(
const char *s,
const char *format, ...);
551 void (*custom_assert)(
int expression);
@ AWK_FILL_STYLE_DRAWING_AND_STROKE
@ AWK_FILL_STYLE_DRAWING_ONLY
@ AWK_FILL_STYLE_STROKE_ONLY
awk_align_style_t
文字排布的对齐样式
@ AWK_HTTP_PRIORITY_MEDIUM
普通优先级
@ AWK_HTTP_PRIORITY_HIGH
高优先级
@ AWK_HTTP_PRIORITY_LOW
低优先级
#define awk_http_header_t
#define AWK_DATA_MAP_DEFINE(name, K, V)
void(* mem_free)(void *ptr)
释放内存时回调,参考free
size_t(* file_get_size)(const char *path)
获取文件大小时的回调
int(* file_flush)(void *handler)
参考fflush
int(* file_rmdir)(const char *path)
删除文件夹时回调,参考rmdir
int(* file_close)(void *handler)
关闭文件的回调,参考fclose
bool(* file_readdir)(void *dir, awk_readdir_result *result)
读文件夹的内容
int(* file_remove)(const char *path)
移除文件,参考remove
long(* file_get_last_access)(const char *path)
获取文件最后访问的回调
int(* file_closedir)(void *dir)
关闭文件夹时的回调
bool(* file_dir_exists)(const char *path)
文件夹是否存在
size_t(* file_write)(void *ptr, size_t size, void *handler)
写文件时回调,参考fwrite
bool(* file_unzip)(const char *zip_file, const char *out_dir)
解压适配接口
int(* file_mkdir)(const char *path, uint16_t model)
创建文件夹时回调,参考mkdir
bool(* file_exists)(const char *path)
文件是否存在
int(* file_seek)(void *handler, long offset, int where)
参考fseek
int(* file_rename)(const char *old_name, const char *new_name)
重命名文件,参考rename
size_t(* file_read)(void *ptr, size_t size, void *handler)
读文件的回调,参考fread
aos返回结果回调接口,网络代理方法的回调时需要在主流程线程中进行回调
void(* on_receive_body)(awk_http_response_callback_t *callback, const awk_http_response_t *response)
接收到body后回调,根据body大小,可回调多次,body为必填
void(* on_success)(awk_http_response_callback_t *callback, const awk_http_response_t *response)
所有数据返回成功后回调,最多只回调一次,可以不携带body,header数据
void(* on_receive_header)(awk_http_response_callback_t *callback, const awk_http_response_t *response)
接收到header后回调,最多只需回调一次,需要包含响应的头信息,header为必填
void(* on_canceled)(awk_http_response_callback_t *callback, const awk_http_response_t *response)
取消请求后,如果请求仍然在队列中,则回调该方法,最多只会回调一次
void(* on_fail)(awk_http_response_callback_t *callback, const awk_http_response_t *response, int32_t error)
请求数据失败后回调
void(* mem_free)(void *ptr)
释放内存时回调,参考free
uint64_t(* send)(awk_http_request_t *request, awk_http_response_callback_t *callback)
发送请求,请求的处理可以在异步线程中发起
void(* cancel)(uint64_t request_id)
取消请求,需要在主流程线程中处理
void(* begin_drawing)(uint32_t map_id, awk_render_context_t status)
开始绘制时回调方法
void(* draw_text)(uint32_t map_id, awk_point_t center, const char *text, const awk_paint_style_t *style)
需要绘制文字时回调
void(* draw_polyline)(uint32_t map_id, awk_point_t *points, uint32_t point_size, const awk_paint_style_t *style)
需要绘制线时回调
bool(* measure_text)(uint32_t map_id, const char *text, const awk_paint_style_t *style, int32_t *width, int32_t *ascender, int32_t *descender)
测量文字宽度
void(* draw_point)(uint32_t map_id, awk_point_t *point, uint32_t point_size, const awk_paint_style_t *style)
需要绘制点时回调
void(* draw_color)(uint32_t map_id, awk_rect_area_t area, const awk_paint_style_t *style)
需要绘制颜色时回调
void(* draw_bitmap)(uint32_t map_id, awk_rect_area_t area, awk_bitmap_t bitmap, const awk_paint_style_t *style)
需要绘制bitmap时回调
void(* commit_drawing)(uint32_t map_id)
绘制结束时回调方方法
void(* draw_polygon)(uint32_t map_id, awk_point_t *points, uint32_t point_size, const awk_paint_style_t *style)
需要绘制面时回调
int(* log_printf)(const char *__fmt,...)
print回调,参考printf
uint64_t(* get_system_time)(void)
获取系统时间回调
int32_t unpainted_length
空白长度
int32_t painted_length
绘制长度
awk_http_priority priority
请求优先级
awk_http_buffer_t * body
body内容
awk_http_header_t headers
header项
awk_http_method method
请求访问方式,默认值为get请求
uint32_t status_code
请求返回的状态码,如200、404
awk_http_header_t headers
header项
awk_http_buffer_t * body
body内容
awk_text_style_t text_style
文字样式
uint32_t width
画笔宽度, 单位:像素
awk_dash_style_t dash_style
虚线样式
awk_fill_style_t fill_ttyle
float angle
旋转角度,[0-360),正东为0,逆时针为正
awk_file_node * nodes
文件节点信息
int32_t height
画布高度, 单位:像素
awk_font_weight_t font_weight