@@ -16,6 +16,7 @@ type config struct {
1616	windowInitializerDeprecated  func (* glfw.Window ) error 
1717	windowIconProvider           func () ([]image.Image , error )
1818	windowInitialDimensions      windowDimensions 
19+ 	windowInitialLocations       windowLocations 
1920	windowDimensionLimits        windowDimensionLimits 
2021	windowMode                   windowMode 
2122
@@ -30,6 +31,11 @@ type windowDimensions struct {
3031	height  int 
3132}
3233
34+ type  windowLocations  struct  {
35+ 	xpos  int 
36+ 	ypos  int 
37+ }
38+ 
3339type  windowDimensionLimits  struct  {
3440	minWidth   int 
3541	minHeight  int 
@@ -118,6 +124,25 @@ func WindowInitialDimensions(width, height int) Option {
118124	}
119125}
120126
127+ // WindowInitialLocations specify the startup's position of the window. 
128+ // Location, in screen coordinates, of the upper-left corner of the client area 
129+ // of the window. 
130+ func  WindowInitialLocations (xpos , ypos  int ) Option  {
131+ 	if  xpos  <  1  {
132+ 		fmt .Println ("go-flutter: invalid initial value for xpos location, must be 1 or greater." )
133+ 		os .Exit (1 )
134+ 	}
135+ 	if  ypos  <  1  {
136+ 		fmt .Println ("go-flutter: invalid initial value for ypos location, must be 1 or greater." )
137+ 		os .Exit (1 )
138+ 	}
139+ 
140+ 	return  func (c  * config ) {
141+ 		c .windowInitialLocations .xpos  =  xpos 
142+ 		c .windowInitialLocations .ypos  =  ypos 
143+ 	}
144+ }
145+ 
121146// WindowDimensionLimits specify the dimension limits of the window. 
122147// Does not work when the window is fullscreen or not resizable. 
123148func  WindowDimensionLimits (minWidth , minHeight , maxWidth , maxHeight  int ) Option  {
0 commit comments