export main_loop_sdl2_dispatch

This commit is contained in:
lixianjing 2024-04-26 09:16:30 +08:00
parent d465f19169
commit 6bbf3cd357
4 changed files with 77 additions and 1 deletions

View File

@ -1,5 +1,8 @@
# 最新动态
2024/04/26
* 导出 main\_loop\_sdl2\_dispatch等函数。
2024/04/25
* 完善UI测试工具支持压力测试。
* 增加切换语言的压力测试用例。

View File

@ -283,7 +283,7 @@ static ret_t main_loop_sdl2_dispatch_window_event(main_loop_simple_t* loop, SDL_
return RET_OK;
}
static ret_t main_loop_sdl2_dispatch(main_loop_simple_t* loop) {
ret_t main_loop_sdl2_dispatch(main_loop_simple_t* loop) {
SDL_Event event;
ret_t ret = RET_OK;
widget_t* wm = loop->base.wm;

View File

@ -28,6 +28,16 @@ BEGIN_C_DECLS
main_loop_t* main_loop_init(int w, int h);
/**
* @method main_loop_sdl2_dispatch
* dispatch events.
* @annotation ["global"]
* @param {main_loop_simple_t*} loop the main loop.
*
* @return {ret_t} return RET_OK if successful, otherwise return RET_FAIL.
*/
ret_t main_loop_sdl2_dispatch(main_loop_simple_t* loop);
END_C_DECLS
#endif /*TK_MAIN_LOOP_SDL_H*/

View File

@ -0,0 +1,63 @@
/**
* File: vgcanvas_nanovg_gl.h
* Author: AWTK Develop Team
* Brief: vgcanvas_nanovg_gl
*
* Copyright (c) 2024 - 2024 Guangzhou ZHIYUAN Electronics Co.,Ltd.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* License file for more details.
*
*/
/**
* History:
* ================================================================
* 2024-04-26 Li XianJing <xianjimli@hotmail.com> created
*
*/
#ifndef TK_VG_NANOVG_GL_H
#define TK_VG_NANOVG_GL_H
#include "base/vgcanvas.h"
/**
* @class vgcanvas_nanovg_gl_t
* @annotation ["fake"]
* vgcanvas_nanovg_glx函数
*/
/**
* @method vgcanvas_create_gl2
* nanovg的vgcanvas对象
* @annotation ["static"]
* @param {uint32_t} w
* @param {uint32_t} h
* @param {uint32_t} stride
* @param {bitmap_format_t} format
* @param {void*} win
*
* @return {vgcanvas_t*} vgcanvas对象
*/
vgcanvas_t* vgcanvas_create_gl2(uint32_t w, uint32_t h, uint32_t stride, bitmap_format_t format,
void* win);
/**
* @method vgcanvas_create_gl3
* nanovg的vgcanvas对象
* @annotation ["static"]
* @param {uint32_t} w
* @param {uint32_t} h
* @param {uint32_t} stride
* @param {bitmap_format_t} format
* @param {void*} win
*
* @return {vgcanvas_t*} vgcanvas对象
*/
vgcanvas_t* vgcanvas_create_gl3(uint32_t w, uint32_t h, uint32_t stride, bitmap_format_t format,
void* win);
#endif /*TK_VG_NANOVG_GL_H*/