This repository has been archived by the owner on Oct 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruminoid_rendercore.h
37 lines (30 loc) · 1.67 KB
/
ruminoid_rendercore.h
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
#pragma once
#ifdef RUMINOID_RC_DLL
#define RUMINOID_API __declspec(dllexport)
#else
#define RUMINOID_API __declspec(dllimport)
#endif
#define RUMINOID_CALL __stdcall
#ifdef __cplusplus
extern "C" {
#endif
using ruminoid_image_t = struct {
int width, height, stride;
unsigned char* buffer;
size_t compressed_size;
};
using ruminoid_rc_context_t = void*;
using ruminoid_rc_render_context_t = void*;
RUMINOID_API ruminoid_rc_context_t RUMINOID_CALL ruminoid_rc_new_context();
RUMINOID_API void RUMINOID_CALL ruminoid_rc_destroy_context(ruminoid_rc_context_t context);
RUMINOID_API bool RUMINOID_CALL ruminoid_rc_update_subtitle(ruminoid_rc_context_t context, const char* content, size_t length);
RUMINOID_API ruminoid_rc_render_context_t RUMINOID_CALL ruminoid_rc_new_render_context(ruminoid_rc_context_t context);
RUMINOID_API void RUMINOID_CALL ruminoid_rc_destroy_render_context(ruminoid_rc_render_context_t render_context);
RUMINOID_API void RUMINOID_CALL ruminoid_rc_render_frame(ruminoid_rc_render_context_t render_context, int width, int height, int timeMs);
RUMINOID_API ruminoid_image_t* RUMINOID_CALL ruminoid_rc_get_result(ruminoid_rc_render_context_t render_context);
RUMINOID_API void RUMINOID_CALL ruminoid_rc_set_cache_limits(ruminoid_rc_render_context_t render_context, int glyph_max_num, int bitmap_max_mb);
using ruminoid_rc_log_callback = void (*)(int, const char*);
RUMINOID_API void RUMINOID_CALL ruminoid_rc_attach_log_callback(ruminoid_rc_context_t context, ruminoid_rc_log_callback callback);
#ifdef __cplusplus
}
#endif