summaryrefslogtreecommitdiffstatshomepage
path: root/window.go
diff options
context:
space:
mode:
authorAlexander Neumann <an2048@gmail.com>2019-05-01 17:31:54 +0200
committerAlexander Neumann <an2048@gmail.com>2019-05-01 17:31:54 +0200
commit41a835dfa001d5cfe645d0666c63a29bb03a7205 (patch)
tree4015b4a5c3ee1a383c856a53b1b69b92107368e1 /window.go
parentMerge pull request #497 from zx2c4-forks/jd/tableview (diff)
downloadwireguard-windows-41a835dfa001d5cfe645d0666c63a29bb03a7205.tar.xz
wireguard-windows-41a835dfa001d5cfe645d0666c63a29bb03a7205.zip
Add DoubleBuffering getter and declarative stuff
Diffstat (limited to 'window.go')
-rw-r--r--window.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/window.go b/window.go
index b15b79a1..8760d296 100644
--- a/window.go
+++ b/window.go
@@ -86,6 +86,10 @@ type Window interface {
// of.
Disposing() *Event
+ // DoubleBuffering returns whether double buffering of the
+ // drawing is enabled, which may help reduce flicker.
+ DoubleBuffering() bool
+
// DPI returns the current DPI value of the Window.
DPI() int
@@ -774,6 +778,12 @@ func (wb *WindowBase) SetCursor(value Cursor) {
wb.cursor = value
}
+// DoubleBuffering returns whether double buffering of the
+// drawing is enabled, which may help reduce flicker.
+func (wb *WindowBase) DoubleBuffering() bool {
+ return wb.hasExtendedStyleBits(win.WS_EX_COMPOSITED)
+}
+
// SetDoubleBuffering enables or disables double buffering of the
// drawing, which may help reduce flicker.
func (wb *WindowBase) SetDoubleBuffering(enabled bool) error {