Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add settings api (#191) (#211) #212

Merged
merged 1 commit into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/LCUI/display.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ LCUI_API size_t LCUIDisplay_Render(void);
/** 呈现渲染后的内容 */
LCUI_API void LCUIDisplay_Present(void);

LCUI_API void LCUIDisplay_EnablePaintFlashing(LCUI_BOOL enable);

/** 设置显示区域的尺寸,仅在窗口化、全屏模式下有效 */
LCUI_API void LCUIDisplay_SetSize(int width, int height);

Expand Down
8 changes: 8 additions & 0 deletions src/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,14 @@ int LCUIDisplay_GetMode(void)
return display.mode;
}

void LCUIDisplay_EnablePaintFlashing(LCUI_BOOL enable)
{
LCUI_SettingsRec settings;
Settings_Init(&settings);
settings.paint_flashing = enable;
LCUI_ApplySettings(&settings);
}

/** 设置显示区域的尺寸,仅在窗口化、全屏模式下有效 */
void LCUIDisplay_SetSize(int width, int height)
{
Expand Down