github.com/secoba/wails/v2@v2.6.4/pkg/options/linux/linux.go (about) 1 package linux 2 3 // WebviewGpuPolicy values used for determining the webview's hardware acceleration policy. 4 type WebviewGpuPolicy int 5 6 const ( 7 // WebviewGpuPolicyAlways Hardware acceleration is always enabled. 8 WebviewGpuPolicyAlways WebviewGpuPolicy = iota 9 // WebviewGpuPolicyOnDemand Hardware acceleration is enabled/disabled as request by web contents. 10 WebviewGpuPolicyOnDemand 11 // WebviewGpuPolicyNever Hardware acceleration is always disabled. 12 WebviewGpuPolicyNever 13 ) 14 15 // Options specific to Linux builds 16 type Options struct { 17 // Icon Sets up the icon representing the window. This icon is used when the window is minimized 18 // (also known as iconified). 19 Icon []byte 20 21 // WindowIsTranslucent sets the window's background to transparent when enabled. 22 WindowIsTranslucent bool 23 24 // Messages are messages that can be customised 25 Messages *Messages 26 27 // WebviewGpuPolicy used for determining the hardware acceleration policy for the webview. 28 // - WebviewGpuPolicyAlways 29 // - WebviewGpuPolicyOnDemand 30 // - WebviewGpuPolicyNever 31 // 32 // Due to https://github.com/wailsapp/wails/issues/2977, if options.Linux is nil 33 // in the call to wails.Run(), WebviewGpuPolicy is set by default to WebviewGpuPolicyNever. 34 // Client code may override this behavior by passing a non-nil Options and set 35 // WebviewGpuPolicy as needed. 36 WebviewGpuPolicy WebviewGpuPolicy 37 38 // ProgramName is used to set the program's name for the window manager via GTK's g_set_prgname(). 39 //This name should not be localized. [see the docs] 40 // 41 //When a .desktop file is created this value helps with window grouping and desktop icons when the .desktop file's Name 42 //property differs form the executable's filename. 43 // 44 //[see the docs]: https://docs.gtk.org/glib/func.set_prgname.html 45 ProgramName string 46 } 47 48 type Messages struct { 49 WebKit2GTKMinRequired string 50 } 51 52 func DefaultMessages() *Messages { 53 return &Messages{ 54 WebKit2GTKMinRequired: "This application requires at least WebKit2GTK %s to be installed.", 55 } 56 }