Mercurial > dwindows
comparison os2/dw.c @ 2355:fad0821cb953
Add new function dw_render_redraw() which will trigger expose event on render widgets.
This is to help optimize drawing on GTK4 and GTK3 with Wayland. To make existing code
function on GTK4 and GTK3 with Wayland, drawing outside of a callback will mark widgets
dirty and dw_flush() will trigger draw/expose callbacks on them. This may result in
double drawing the widgets. dw_render_redraw() will allow you to just trigger the
draw event without actually attempting to draw, allowing one draw pass in the expose
callback. Only tested on Windows, may require fixes on other platforms.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 08 Mar 2021 19:53:55 +0000 |
parents | 5113afb0aea9 |
children | 0286ac44d347 |
comparison
equal
deleted
inserted
replaced
2354:dfb52d2bddaa | 2355:fad0821cb953 |
---|---|
4973 WinShowWindow(client && mybox->items ? mybox->items[0].hwnd : handle, TRUE); | 4973 WinShowWindow(client && mybox->items ? mybox->items[0].hwnd : handle, TRUE); |
4974 } | 4974 } |
4975 } | 4975 } |
4976 | 4976 |
4977 /* | 4977 /* |
4978 * Invalidate the render widget triggering an expose event. | |
4979 * Parameters: | |
4980 * handle: A handle to a render widget to be redrawn. | |
4981 */ | |
4982 void API dw_render_redraw(HWND handle) | |
4983 { | |
4984 WinInvalidateRect(handle, NULL, FALSE); | |
4985 } | |
4986 | |
4987 /* | |
4978 * Changes a window's parent to newparent. | 4988 * Changes a window's parent to newparent. |
4979 * Parameters: | 4989 * Parameters: |
4980 * handle: The window handle to destroy. | 4990 * handle: The window handle to destroy. |
4981 * newparent: The window's new parent window. | 4991 * newparent: The window's new parent window. |
4982 */ | 4992 */ |