mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
app: add Window.Maximize and Center, add Windows implementation
Signed-off-by: Jan Kare Vatne <jkvatne@online.no>
This commit is contained in:
committed by
Elias Naur
parent
dce453e130
commit
9835cd5996
@@ -311,6 +311,22 @@ func (w *Window) Close() {
|
||||
})
|
||||
}
|
||||
|
||||
// Maximize the window.
|
||||
// Note: only implemented on Windows.
|
||||
func (w *Window) Maximize() {
|
||||
w.driverDefer(func(d driver) {
|
||||
d.Maximize()
|
||||
})
|
||||
}
|
||||
|
||||
// Center the window.
|
||||
// Note: only implemented on Windows.
|
||||
func (w *Window) Center() {
|
||||
w.driverDefer(func(d driver) {
|
||||
d.Center()
|
||||
})
|
||||
}
|
||||
|
||||
// Run f in the same thread as the native window event loop, and wait for f to
|
||||
// return or the window to close. Run is guaranteed not to deadlock if it is
|
||||
// invoked during the handling of a ViewEvent, system.FrameEvent,
|
||||
|
||||
Reference in New Issue
Block a user