You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: Form1Impl.go
    path of file: ./repos/govcl/samples/macOS/nswindowTest
    
    the code of the file until where you have to start completion: // +build darwin

package main

/*

   #cgo CFLAGS: -x objective
    
func (f *TForm1) OnPanel1DblClick(sender vcl.IObject) {
	// 全屏了
	if f.isFullScreen() {
		return
	}
	// 有bug。。。。
	// 换个方式吧
	if f.WindowState() != types.WsNormal {
		f.SetWindowState(types.WsNormal)
	} else {
		f.SetWindowState(types.WsMaximized)
	}
}