Native Go (golang) Graphical Interface system (2D and 3D), built on GoKi tree framework

alt tag

GoGi is part of the GoKi Go language (golang) full strength tree structure system (ki = 木 = tree in Japanese)

package gi is a scenegraph-based 2D and 3D GUI / graphics interface (Gi) in Go, that functions similar to HTML / CSS / SVG and Qt.

Go Report Card GoDoc Travis TODOs

NOTE: Requires Go version 1.13+ due to use of math.Round, os.UserCacheDir, and reflect.Value.IsZero().

See the Wiki for more docs (increasingly extensive), Install instructions (mostly basic go build procedure, but does now depend on cgo on all platforms due to glfw, so see details for each platform), and Google Groups goki-gi email list, and the new github Discussions tool.

GoGi uses the GoKi tree infrastructure to implement a scenegraph-based GUI framework in full native idiomatic Go, with minimal OS-specific backend interfaces based originally on the Shiny drivers, now using go-gl/glfw, and supporting MacOS, Linux, and Windows.

The overall design integrates existing standards and conventions from widely-used frameworks, including Qt (overall widget design), HTML / CSS (styling), and SVG (rendering). The core Layout object automates most of the complexity associated with GUI construction (including scrolling), so the programmer mainly just needs to add the elements, and set their style properties -- similar to HTML. The main 2D framework also integrates with a 3D scenegraph, supporting interesting combinations of these frameworks (see gi3d package and examples/gi3d). Currently GoGi is focused on desktop systems, but nothing should prevent adaptation to mobile.

See Gide for a complete, complex application written in GoGi (an IDE), and likewise the Emergent neural network simulation environment (the prime motivator for the whole project), along with the various examples in this repository for lots of useful demonstrations -- start with the Widgets example which has a bit of a tutorial introduction.

Main Features

  • Has all the standard widgets: Button, Menu, Slider, TextField, SpinBox, ComboBox etc, with tooltips, hover, focus, copy / paste (full native clipboard support), drag-n-drop -- the full set of standard GUI functionality. See gi/examples/widgets for a demo of all the widgets.

  • Layout auto-organizes and auto-sizes everything to configure interfaces that "just work" across different scales, resolutions, platforms. Automatically remembers and reinstates window positions and sizes across sessions, and supports standard Ctrl+ and Ctrl- zooming of display scale.

  • CSS-based styling allows customization of everything -- native style properties are HTML compatible (with all standard em, px, pct etc units), including HTML "rich text" styling for all text rendering (e.g., in Label widget) -- can decorate any text with inline tags (<strong>, <em> etc), and even include links. Styling is now separated out into gist package, for easier navigation.

  • Compiles in seconds, compared to many minutes to hours for comparable alternatives such as Qt, and with minimal cgo dependency. As of April 2019 we now depend on the glfw cross-platform GUI infrastructure system, and the go-gl/gl OpenGL bindings, to support the 3D (gi3d) aspect of the framework.

  • Fully self-contained -- does not use OS-specific native widgets -- results in simpler, consistent code across platforms, and is HiDPI capable and scalable using standard Ctrl/Cmd+Plus or Minus key, and in Preferences. This also allows a complete 2D GUI to be embedded into a 3D scene, for example.

  • SVG element (in svg sub-package) supports SVG rendering -- used for Icons internally and available for advanced graphics displays -- see gi/examples/svg for viewer and start on editor, along with a number of test .svg files.

  • Model / View paradigm with reflection-based view elements that display and manipulate all the standard Go types (in giv sub-package), from individual types (e.g., int, float display in a SpinBox, "enum" const int types in a ComboBox chooser) to composite data structures, including StructView editor of struct fields, MapView and SliceView displays of map and slice elements (including full editing / adding / deleting of elements), and full-featured TableView for a slice-of-struct and TreeView for GoKi trees.

    • TreeView enables a built-in GUI editor / inspector for designing gui elements themselves. Just press Control+Alt+I in any window to pull up this editor / inspector. Scene graphs can be automatically saved / loaded from JSON files, to provide a basic GUI designer framework -- just load and add appropriate connections..
  • GoGi is a "standard" retained-mode (scenegraph-based) GUI, as compared to immediate-mode GUIs such as Gio. As such, GoGi automatically takes care of everything for you, but as a result you sacrifice control over every last detail. Immediate mode gives you full control, but also the full burden of control -- you have to code every last behavior yourself. In GoGi, you have extensive control through styling and closure-based "callback" methods, in the same way you would in a standard front-end web application (so it will likely be more familiar to many users), but if you want to do something very different, you will likely need to code a new type of Widget, which can be more difficult as then you need to know more about the overall infrastructure. Thus, if you are likely to be doing fairly standard things and don't feel the need for absolute control, GoGi will likely be an easier experience.

Screenshot of Widgets demo

Screenshot of Gi3D demo

Screenshot of GiEditor, Dark mode

Code Overview

There are three main types of 2D nodes:

  • Viewport2D nodes that manage their own image.RGBA bitmap and can upload that directly to the oswin.Texture (GPU based) that then uploads directly to the oswin.Window. The parent Window has a master Viewport2D that backs the entire window, and is what most Widget's render into.

    • Popup Dialog and Menu's have their own viewports that are layered on top of the main window viewport.
    • SVG and its subclass Icon are containers for SVG-rendering nodes.
  • Widget nodes that use the full CSS-based styling (e.g., the Box model etc), are typically placed within a Layout -- they use units system with arbitrary DPI to transform sizes into actual rendered dots (term for actual raw resolution-dependent pixels -- "pixel" has been effectively co-opted as a 96dpi display-independent unit at this point). Widgets have non-overlapping bounding boxes (BBox -- cached for all relevant reference frames).

  • SVG rendering nodes that directly set properties on the girl.Paint object and typically have their own geometry etc -- they should be within a parent SVG viewport, and their geom units are determined entirely by the transforms etc and we do not support any further unit specification -- just raw float values.

General Widget method conventions:

  • SetValue kinds of methods are wrapped in UpdateStart / End, but do NOT emit a signal.
  • SetValueAction calls SetValue and emits the signal. This allows other users of the widget that also recv the signal to not trigger themselves, but typically you want the update, so it makes sense to have that in the basic version. ValueView in particular requires this kind of behavior.

The best way to see how the system works are in the examples directory, and by interactively modifying any existing gui using the interactive reflective editor via Control+Alt+I.

Backend

The oswin and gpu packages provide interface abstractions for hardware-level implementations. Currently the gpu implementation is OpenGL, but Vulkan is planned, hopefully with not too many changes to the gpu interface. The basic platform-specific details are handled by glfw (version 3.3), along with a few other bits of platform-specific code.

All of the main "front end" code just deals with image.RGBA through the girl rendering library, using girl.Paint methods, which was adapted from https://github.com/fogleman/gg, and we use https://github.com/srwiley/rasterx for CPU-based rasterization to the image, which is fast and SVG performant. The Viewport2D image is uploaded to a GPU-backed oswin.Texture and composited with sprite overlays up to the window.

Status

  • Version 1.1 released Nov, 2020, has the styling parameters and code broken out in the gist style package, and basic rendering code, including a complete text layout and rendering system, in the girl render library.

  • Version 1.0 released April, 2020! The 3D gi3d component is ready for use, and the code has been widely tested by students and researchers, including extensive testing under gide. The API will remain stable at this point.

  • Active users should join Google Groups goki-gi emailing list to receive more detailed status updates.

  • Please file Issues for anything that does not work.

  • 3/2019: python wrapper is now available! you can do most of GoGi from python now. See README.md file there for more details.

Owner
GoKi
GoKi framework for Trees (Ki in Japanese) in Go language, including GoGi 2D & 3D GUI framework
GoKi
Comments
  • Support Wayland

    Support Wayland

    I'm on 64-bit Arch Linux, using the Sway windowmanager.

    When compiling and running the widgets example with:

    GOOS=windows GOARCH=amd64 go build && wine widgets.exe
    

    It works fine:

    gogi_widgets

    However, building and running the Linux version results in a segfault:

    $ go build && ./widgets
    gi.FontLib: error accessing path "/usr/share/fonts/truetype": lstat /usr/share/fonts/truetype: no such file or directory
    2018/11/14 11:35:36 gi.FontLib: error walking the path "/usr/share/fonts/truetype": lstat /usr/share/fonts/truetype: no such file or directory
    2018/11/14 11:35:36 open /home/afr/.config/GoGi/win_geom_prefs.json: no such file or directory
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x7c7f5d]
    goroutine 1 [running]:
    github.com/goki/gi/gi.(*WindowGeomPrefs).RecordPref(0x1a4c268, 0xc000258d80)
    /home/afr/clones/gi/gi/window.go:3286 +0x12d
    github.com/goki/gi/gi.(*Window).Resized(0xc000258d80, 0x0, 0x0)
    /home/afr/clones/gi/gi/window.go:568 +0x32c
    github.com/goki/gi/gi.(*Window).EventLoop(0xc000258d80)
    /home/afr/clones/gi/gi/window.go:1325 +0x6fe
    github.com/goki/gi/gi.(*Window).StartEventLoop(0xc000258d80)
    /home/afr/clones/gi/gi/window.go:690 +0x63
    main.mainrun()
    /home/afr/clones/gi/examples/widgets/widgets.go:368 +0x3ed9
    main.main.func1()
    /home/afr/clones/gi/examples/widgets/widgets.go:24 +0x20
    github.com/goki/gi/gimain.Main.func1(0xf3ed60, 0xc0001f0000)
    /home/afr/clones/gi/gimain/gimain.go:27 +0x24
    github.com/goki/gi/oswin/driver/x11driver.main(0xc00054bf60, 0x0, 0x0)
    /home/afr/clones/gi/oswin/driver/x11driver/x11driver.go:65 +0x274
    github.com/goki/gi/oswin/driver/x11driver.Main(0xc00069df60)
    /home/afr/clones/gi/oswin/driver/x11driver/x11driver.go:38 +0x2f
    github.com/goki/gi/oswin/driver.main(0xc00054bf60)
    /home/afr/clones/gi/oswin/driver/driver_x11.go:22 +0x2b
    github.com/goki/gi/oswin/driver.Main(0xc00054bf60)
    /home/afr/clones/gi/oswin/driver/driver.go:27 +0x2b
    github.com/goki/gi/gimain.Main(0xdd1888)
    /home/afr/clones/gi/gimain/gimain.go:26 +0x49
    main.main()
    /home/afr/clones/gi/examples/widgets/widgets.go:23 +0x2d
    

    This is also the case for the other examples.

  • Zoom on open/close problems

    Zoom on open/close problems

    With the latest build my window opens with one font and then goes through a couple of dpi/zoom changes and then goes black. At first I wasn't looking and I thought it went directly to black. Resizing the screen eventually got the window back to normal but again it cycled a bit before it looked correct. Then clicking the close box led to similar behavior.

    Got a bunch of duplicate error messages, only copied one set.

    OpenGL version 4.1 ATI-2.11.20 Saving epoch log to: Aud_Base_epc.csv 2019/11/26 17:19:58 glos gl error in context: Uniform SetValue: AmbLights type: {Float32 3 0}: 501 = INVALID_VALUE: Given when a value parameter is not a legal value for that function. This is only given for local problems; if the spec allows the value in certain circumstances, where other parameters or state dictate those circumstances, then GL_INVALID_OPERATION is the result instead. 2019/11/26 17:19:58 glos gl error in context: Uniform SetValue: AmbLights type: {Float32 3 0}: 502 = INVALID_OPERATION: Given when the set of state for a command is not legal for the parameters given to that command. It is also given for commands where combinations of parameters define what the legal parameters are. glgpu gpu.Framebuffer: not complete -- this usually means you need to set your GoGi prefs to Smooth3D = off, and restart 2019/11/26 17:19:58 glos gl error in context: Uniform SetValue: mvp type: {Float32 0 3}:

  • do spellcheck when cursor goes over text, not just after space / return

    do spellcheck when cursor goes over text, not just after space / return

    if you go back and fix a spelling error, then moving past the end of the word should trigger an update and clear the error tag if corrected. right now you have to re-enter a space to trigger the update.

  • add mutex's for all view updates?

    add mutex's for all view updates?

    StructView, TreeView etc. make them robust to parallel update triggers.

    example case: StructView usually does not explicitly update its fields (UpdateFields) b/c they are updated by user interaction or signals directly to the fields. But if you have something changing from a parallel goroutine and want to trigger an update, then the call to UpdateFields can collide with other updates.. John has example of this.

  • filetree dnd issues

    filetree dnd issues

    I just did a move drag of a file into a new folder, and it copied (did not move) the wrong file! it was the first file in the source dir but not the one I had dragged.

  • completion issues

    completion issues

    now that completion is usable :) looks like are some issues:

    • in giv/fileview.go:628 -- completion on ef (*gi.TextField) shows .Text as a variable, but it is a function.

    • strings. does not complete with all the strings methods -- that is one of the most important use-cases -- remembering all those package methods! but then it DID complete with .Split when i was typing: strings.Split(exts.

    • typing: ef : gives a large list of options.. (only valid completion should be := right?)

    seems like maybe it is not quite getting the right seed or something?

  • Menu button menu - key shortcut not working

    Menu button menu - key shortcut not working

    widgets demo - looks like shift+control and 1 should select the first item and control and 3 the third but neither work.

    Also why shift + control for first item?

  • more spell checking issues

    more spell checking issues

    • I'm getting a popup for things like 1. 2. a or A

    • would be good somehow to put the word being checked into the menu, at the top, as a Label, so you know for sure exactly what it is referring to right there in the menu. Mechanically, a Menu is just a slice of Ki elements, and it is easy to add a Label — not sure how the code works exactly but hopefully easy to add that..

    also adding stuff from email thread into ticket, for records and if anyone else has any input..

    FWIW, emacs uses “accept”, duration = “editing session”, versus “insert” into dictionary

    https://www.gnu.org/software/emacs/manual/html_node/emacs/Spelling.html

    And looks like word and openoffice use: Ignore Once, Ignore All, and Add

    Anyway, I gather that “ignore” is still just for the editing session and “learn” or “add” is permanent. Somehow I thought that Ignore All might be permanent too, but that doesn’t make any sense — that would be “Ignore Always" which is the same as Add..

    I guess I do still feel like there are really 4 categories of actions at the finest grain:

    • Ignore Once — like your quoted guys or a “sic” case

    • Ignore Session — fully ignore for now but for whatever reason I’m not sure if I’d want to ignore later or not.. this seems like kicking the can down the road? somehow it is very context sensitive, to this particular session (?) about whether this is a word to be ignored or not? Why are we ignoring such words in the first place? because they are somehow correct in this situation. So, again, what is so special about this situation vs. any other one later? Perhaps document type etc but then it seems like we need to have “ignore for all Markdown” or “ignore for this document” (in which case you’d need a dictionary per document..)

    • Ignore Always — permanently ignore this word. If it ever shows up again, don’t bug me about it, but it is not something that I want to add to an official dictionary or anything — e.g., latex formatting commands, names of random people, any cite keys that I might use, etc. (btw, would be good if your word filter cut out the numbers at the end of cite keys).

    • Add / Learn — this is a “real” word and should be used for generating completions next time etc.

    I just did some more googling and it seems like I’m not the only one overthinking this:

    https://ux.stackexchange.com/questions/83396/what-does-ignore-and-ignore-all-really-mean-in-spell-check

    And, surprisingly, ignore actually means “for that specific word in that specific document” — how is that even done? what does “that specific word” even mean? somehow they are memorizing the context in which the word is appearing?? And, likewise, ignore all appears to be similarly document-specific.

  • Problems with external monitor recurring

    Problems with external monitor recurring

    I had the bg project open on my external LG monitor (Mac laptop) and initially it behaved itself. But it has been open for at least the last day or so and I just noticed that the main window had expanded to many times its normal size and it had turned completely black. It used to do this immediately upon opening, but now it takes a day or so.

  • Can't open existing file...

    Can't open existing file...

    This might just be user error but when I tried to open existing Untitled.tex (in svn_docs/bg/pvlv/bvpvlv sub direction) file by clicking OK as in the picture below - but nothing happened. img_0182

  • Context menu on word should always provide cut/copy/paste

    Context menu on word should always provide cut/copy/paste

    This won't work: func (tv *TextView) ContextMenu() { if tv.Buf.SpellCorrect != nil { if tv.OfferCorrect() { return } } tv.WidgetBase.ContextMenu() }

    What we want is to add "check spelling" to context menu with the shortcut. If the user types the shortcut then check spelling and popup suggestions but if they invoke menu give them the standard with additional action.

    What is the mechanism for adding to context menu. Should the menu be returned from WidgetBase allowing additional actions?

  • Failure on fresh Debian 11

    Failure on fresh Debian 11

    I created a new Debian 11 64-bit VM inside VirtualBox and installed Go 1.19 by unpacking the binary. I used apt to install the dependencies listed in the Install doc. Then I tried to install and build, but it failed:

    mark@debianvm:~/opt$ git clone https://github.com/goki/gi
    Cloning into 'gi'...
    remote: Enumerating objects: 20652, done.
    ... elided ...
    Resolving deltas: 100% (15942/15942), done.
    mark@debianvm:~/opt$ cd gi/examples/widgets/
    mark@debianvm:~/opt/gi/examples/widgets$ go build -v
    go: downloading github.com/goki/ki v1.1.8
    ... elided ...
    github.com/go-gl/glfw/v3.3/glfw
    # github.com/go-gl/glfw/v3.3/glfw
    In file included from ../../../gows/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/c_glfw_lin.go:20:
    ../../../gows/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/glfw/src/x11_window.c:30: warning: "_GNU_SOURCE" redefined
       30 | #define _GNU_SOURCE
          | 
    <command-line>: note: this is the location of the previous definition
    github.com/goki/gi/oswin/driver/internal/event
    github.com/goki/gi/oswin/driver/vkos
    github.com/goki/gi/gi3d
    github.com/goki/gi/gi3d/io/obj
    github.com/goki/gi/oswin/driver
    github.com/goki/gi/svg
    github.com/goki/gi/gimain
    github.com/goki/gi/examples/widgets
    mark@debianvm:~/opt/gi/examples/widgets$ ./widgets
    2022/12/02 08:43:20 vulkan warning: missing 1 required device extensions during Config
    vulkan: No DRI3 support detected - required for presentation
    Note: you can probably enable DRI3 in your Xorg config
    fatal error: unexpected signal during runtime execution
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7f9e3cecdf70]
    
    runtime stack:
    runtime.throw({0x12af97a?, 0x7f9e3fce5211?})
    	/home/mark/opt/go/src/runtime/panic.go:1047 +0x5d fp=0x7ffc5e00f038 sp=0x7ffc5e00f008 pc=0x44aedd
    runtime.sigpanic()
    	/home/mark/opt/go/src/runtime/signal_unix.go:819 +0x369 fp=0x7ffc5e00f088 sp=0x7ffc5e00f038 pc=0x4614a9
    
    goroutine 1 [syscall, locked to thread]:
    runtime.cgocall(0xfdcdf0, 0xc000021ca8)
    	/home/mark/opt/go/src/runtime/cgocall.go:158 +0x5c fp=0xc000021c80 sp=0xc000021c48 pc=0x417c5c
    github.com/goki/vulkan._Cfunc_callVkCreateCommandPool(0x0, 0x27b6d60, 0x0, 0xc000545dd8)
    	_cgo_gotypes.go:7932 +0x4c fp=0xc000021ca8 sp=0xc000021c80 pc=0x96ec2c
    github.com/goki/vulkan.CreateCommandPool.func1(0x0, 0x0?, 0xc000021d30?, 0x4219e7?)
    	/home/mark/opt/gows/pkg/mod/github.com/goki/[email protected]/vulkan.go:841 +0xb1 fp=0xc000021cf8 sp=0xc000021ca8 pc=0x9a1e31
    github.com/goki/vulkan.CreateCommandPool(0x0, 0x9a4f8f?, 0x7f9e3d91ce60?, 0x8?)
    	/home/mark/opt/gows/pkg/mod/github.com/goki/[email protected]/vulkan.go:841 +0x47 fp=0xc000021d40 sp=0xc000021cf8 pc=0x9a1d27
    github.com/goki/vgpu/vgpu.(*CmdPool).ConfigResettable(0xc0003ed538, 0xc0003ed520)
    	/home/mark/opt/gows/pkg/mod/github.com/goki/[email protected]/vgpu/cmds.go:36 +0x7f fp=0xc000021dc0 sp=0xc000021d40 pc=0x9c1f1f
    github.com/goki/vgpu/vgpu.(*System).InitCmd(0x9d15a9?)
    	/home/mark/opt/gows/pkg/mod/github.com/goki/[email protected]/vgpu/system.go:60 +0x30 fp=0xc000021df0 sp=0xc000021dc0 pc=0x9d30b0
    github.com/goki/vgpu/vgpu.(*System).InitGraphics(0xc0003ed508, 0xc0003dd800, {0x1265fa3?, 0x27b3a10?}, 0xc0003a6dc0?)
    	/home/mark/opt/gows/pkg/mod/github.com/goki/[email protected]/vgpu/system.go:41 +0x85 fp=0xc000021e18 sp=0xc000021df0 pc=0x9d2f05
    github.com/goki/vgpu/vdraw.(*Drawer).ConfigSurface(0xc0003ed508, 0xc0003a6dc0, 0xc000545d88?)
    	/home/mark/opt/gows/pkg/mod/github.com/goki/[email protected]/vdraw/vdraw.go:35 +0x65 fp=0xc000021e58 sp=0xc000021e18 pc=0x9e32c5
    github.com/goki/gi/oswin/driver/vkos.(*appImpl).NewWindow.func2()
    	/home/mark/opt/gi/oswin/driver/vkos/app.go:248 +0xf2 fp=0xc000021eb0 sp=0xc000021e58 pc=0xf29992
    github.com/goki/gi/oswin/driver/vkos.(*appImpl).mainLoop(0x1ebf740)
    	/home/mark/opt/gi/oswin/driver/vkos/app.go:158 +0x104 fp=0xc000021f30 sp=0xc000021eb0 pc=0xf28724
    github.com/goki/gi/oswin/driver/vkos.Main(0xfdbca0?)
    	/home/mark/opt/gi/oswin/driver/vkos/app.go:80 +0x91 fp=0xc000021f48 sp=0xc000021f30 pc=0xf28231
    github.com/goki/gi/oswin/driver.driverMain(...)
    	/home/mark/opt/gi/oswin/driver/driver_vkos.go:18
    github.com/goki/gi/oswin/driver.Main(...)
    	/home/mark/opt/gi/oswin/driver/driver.go:27
    github.com/goki/gi/gimain.Main(0x131b120?)
    	/home/mark/opt/gi/gimain/gimain.go:31 +0x57 fp=0xc000021f68 sp=0xc000021f48 pc=0xfd58d7
    main.main()
    	/home/mark/opt/gi/examples/widgets/widgets.go:24 +0x25 fp=0xc000021f80 sp=0xc000021f68 pc=0xfd5ac5
    runtime.main()
    	/home/mark/opt/go/src/runtime/proc.go:250 +0x212 fp=0xc000021fe0 sp=0xc000021f80 pc=0x44d732
    runtime.goexit()
    	/home/mark/opt/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000021fe8 sp=0xc000021fe0 pc=0x47c081
    
    goroutine 2 [force gc (idle)]:
    runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
    	/home/mark/opt/go/src/runtime/proc.go:363 +0xd6 fp=0xc00005efb0 sp=0xc00005ef90 pc=0x44daf6
    runtime.goparkunlock(...)
    	/home/mark/opt/go/src/runtime/proc.go:369
    runtime.forcegchelper()
    	/home/mark/opt/go/src/runtime/proc.go:302 +0xad fp=0xc00005efe0 sp=0xc00005efb0 pc=0x44d98d
    runtime.goexit()
    	/home/mark/opt/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00005efe8 sp=0xc00005efe0 pc=0x47c081
    created by runtime.init.6
    	/home/mark/opt/go/src/runtime/proc.go:290 +0x25
    
    goroutine 3 [GC sweep wait]:
    runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
    	/home/mark/opt/go/src/runtime/proc.go:363 +0xd6 fp=0xc00005f790 sp=0xc00005f770 pc=0x44daf6
    runtime.goparkunlock(...)
    	/home/mark/opt/go/src/runtime/proc.go:369
    runtime.bgsweep(0x0?)
    	/home/mark/opt/go/src/runtime/mgcsweep.go:297 +0xd7 fp=0xc00005f7c8 sp=0xc00005f790 pc=0x4390d7
    runtime.gcenable.func1()
    	/home/mark/opt/go/src/runtime/mgc.go:178 +0x26 fp=0xc00005f7e0 sp=0xc00005f7c8 pc=0x42dd46
    runtime.goexit()
    	/home/mark/opt/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00005f7e8 sp=0xc00005f7e0 pc=0x47c081
    created by runtime.gcenable
    	/home/mark/opt/go/src/runtime/mgc.go:178 +0x6b
    
    goroutine 4 [runnable]:
    runtime.gopark(0xc00008c000?, 0xdbab26de84?, 0x0?, 0x0?, 0x131b4c0?)
    	/home/mark/opt/go/src/runtime/proc.go:363 +0xd6 fp=0xc00005ff30 sp=0xc00005ff10 pc=0x44daf6
    runtime.goparkunlock(...)
    	/home/mark/opt/go/src/runtime/proc.go:369
    runtime.(*scavengerState).sleep(0x237cb20, 0x410655d000000000)
    	/home/mark/opt/go/src/runtime/mgcscavenge.go:468 +0x125 fp=0xc00005ffa0 sp=0xc00005ff30 pc=0x437345
    runtime.bgscavenge(0x0?)
    	/home/mark/opt/go/src/runtime/mgcscavenge.go:626 +0x7f fp=0xc00005ffc8 sp=0xc00005ffa0 pc=0x43773f
    runtime.gcenable.func2()
    	/home/mark/opt/go/src/runtime/mgc.go:179 +0x26 fp=0xc00005ffe0 sp=0xc00005ffc8 pc=0x42dce6
    runtime.goexit()
    	/home/mark/opt/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00005ffe8 sp=0xc00005ffe0 pc=0x47c081
    created by runtime.gcenable
    	/home/mark/opt/go/src/runtime/mgc.go:179 +0xaa
    
    goroutine 5 [finalizer wait]:
    runtime.gopark(0x0?, 0xc0002094b0?, 0x30?, 0x54?, 0x1000000010?)
    	/home/mark/opt/go/src/runtime/proc.go:363 +0xd6 fp=0xc00005e628 sp=0xc00005e608 pc=0x44daf6
    runtime.goparkunlock(...)
    	/home/mark/opt/go/src/runtime/proc.go:369
    runtime.runfinq()
    	/home/mark/opt/go/src/runtime/mfinal.go:180 +0x10f fp=0xc00005e7e0 sp=0xc00005e628 pc=0x42ce4f
    runtime.goexit()
    	/home/mark/opt/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00005e7e8 sp=0xc00005e7e0 pc=0x47c081
    created by runtime.createfing
    	/home/mark/opt/go/src/runtime/mfinal.go:157 +0x45
    
    goroutine 6 [GC worker (idle)]:
    runtime.gopark(0xdb6f883d66?, 0x0?, 0x0?, 0x0?, 0x0?)
    	/home/mark/opt/go/src/runtime/proc.go:363 +0xd6 fp=0xc000060750 sp=0xc000060730 pc=0x44daf6
    runtime.gcBgMarkWorker()
    	/home/mark/opt/go/src/runtime/mgc.go:1235 +0xf1 fp=0xc0000607e0 sp=0xc000060750 pc=0x42fe91
    runtime.goexit()
    	/home/mark/opt/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000607e8 sp=0xc0000607e0 pc=0x47c081
    created by runtime.gcBgMarkStartWorkers
    	/home/mark/opt/go/src/runtime/mgc.go:1159 +0x25
    
    goroutine 7 [runnable]:
    runtime.gopark(0xf1e565?, 0xc00004c000?, 0x5c?, 0x7c?, 0xc0006579d8?)
    	/home/mark/opt/go/src/runtime/proc.go:363 +0xd6 fp=0xc0006579a8 sp=0xc000657988 pc=0x44daf6
    runtime.chansend(0xc00003c6c0, 0xc000657a78, 0x1, 0xc000555488?)
    	/home/mark/opt/go/src/runtime/chan.go:259 +0x42c fp=0xc000657a30 sp=0xc0006579a8 pc=0x419e4c
    runtime.chansend1(0xc000657a88?, 0x0?)
    	/home/mark/opt/go/src/runtime/chan.go:145 +0x1d fp=0xc000657a60 sp=0xc000657a30 pc=0x4199fd
    github.com/goki/gi/oswin/driver/vkos.(*appImpl).RunOnMain(0x1ebf740, 0xc000555488)
    	/home/mark/opt/gi/oswin/driver/vkos/app.go:95 +0x6c fp=0xc000657a98 sp=0xc000657a60 pc=0xf282cc
    github.com/goki/gi/oswin/driver/vkos.(*appImpl).NewWindow(0x1ebf740, 0xc0004a0540?)
    	/home/mark/opt/gi/oswin/driver/vkos/app.go:241 +0x3a8 fp=0xc000657b38 sp=0xc000657a98 pc=0xf29148
    github.com/goki/gi/gi.NewWindow({0x127cb24, 0x11}, {0x127a68d, 0x11}, 0xc00006fbe8?)
    	/home/mark/opt/gi/gi/window.go:345 +0x157 fp=0xc000657ba0 sp=0xc000657b38 pc=0xc2ccf7
    github.com/goki/gi/gi.NewMainWindow({0x127cb24, 0x11}, {0x127a68d, 0x11}, 0x400, 0x300)
    	/home/mark/opt/gi/gi/window.go:393 +0x145 fp=0xc000657bf8 sp=0xc000657ba0 pc=0xc2d165
    main.mainrun()
    	/home/mark/opt/gi/examples/widgets/widgets.go:49 +0xf4 fp=0xc000657fa0 sp=0xc000657bf8 pc=0xfd6cb4
    main.main.func1()
    	/home/mark/opt/gi/examples/widgets/widgets.go:25 +0x17 fp=0xc000657fb0 sp=0xc000657fa0 pc=0xfd5a77
    github.com/goki/gi/gimain.Main.func1({0x0?, 0x0?})
    	/home/mark/opt/gi/gimain/gimain.go:32 +0x1b fp=0xc000657fc0 sp=0xc000657fb0 pc=0xfd591b
    github.com/goki/gi/oswin/driver/vkos.Main.func1()
    	/home/mark/opt/gi/oswin/driver/vkos/app.go:77 +0x2e fp=0xc000657fe0 sp=0xc000657fc0 pc=0xf2816e
    runtime.goexit()
    	/home/mark/opt/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000657fe8 sp=0xc000657fe0 pc=0x47c081
    created by github.com/goki/gi/oswin/driver/vkos.Main
    	/home/mark/opt/gi/oswin/driver/vkos
    
  • Problem with vgpu when installing GoGi and building widgets

    Problem with vgpu when installing GoGi and building widgets

    Just tried to install gogi and build widgets. Latest version of macOS BigSur and go1.19. Got the following error.

    github.com/goki/gi/gimain github.com/goki/gi/examples/widgets reads-Mac-mini:widgets read$ ./widgets panic: vulkan error: vulkan error: incompatible driver (-9) on /Users/read/go/pkg/mod/github.com/goki/[email protected]/vgpu/errors.go:23 (0x459d1be) NewError: pc, _, _, ok := runtime.Caller(0)

    goroutine 1 [running, locked to thread]: github.com/goki/vgpu/vgpu.IfPanic(...) /Users/read/go/pkg/mod/github.com/goki/[email protected]/vgpu/errors.go:40 github.com/goki/vgpu/vgpu.(*GPU).Config(0xc00043b000, {0x4e12151?, 0x4e42ef3?}) /Users/read/go/pkg/mod/github.com/goki/[email protected]/vgpu/gpu.go:172 +0xbb5 github.com/goki/gi/oswin/driver/vkos.(*appImpl).initVk(0x5f0db80) /Users/read/go/gi/oswin/driver/vkos/app.go:195 +0x22a github.com/goki/gi/oswin/driver/vkos.Main(0x4bba0a0?) /Users/read/go/gi/oswin/driver/vkos/app.go:74 +0x45 github.com/goki/gi/oswin/driver.driverMain(...) /Users/read/go/gi/oswin/driver/driver_vkos.go:18 github.com/goki/gi/oswin/driver.Main(...) /Users/read/go/gi/oswin/driver/driver.go:27 github.com/goki/gi/gimain.Main(0x4efe160?) /Users/read/go/gi/gimain/gimain.go:31 +0x57 main.main() /Users/read/go/gi/examples/widgets/widgets.go:24 +0x25 reads-Mac-mini:widgets read$

  • library not found for -lMoltenVK

    library not found for -lMoltenVK

    I have installed VulkanSDK to ~/VulkanSDK/1.3.216.0,but when go build under /examples/widgets failed with error "library not found for -lMoltenVK" .how to fix it

  • missing documentation: on Fedora the `libXxf86vm-devel` is necessary to build `examples/basic`

    missing documentation: on Fedora the `libXxf86vm-devel` is necessary to build `examples/basic`

    I'm using Fedora and I followed the Wiki to install the dependencies for gi. When I tried to run make build in examples/basic, I would get:

    go build -v
    github.com/go-gl/glfw/v3.3/glfw
    # github.com/go-gl/glfw/v3.3/glfw
    /usr/bin/ld: cannot find -lXxf86vm
    collect2: error: ld returned 1 exit status
    # github.com/go-gl/glfw/v3.3/glfw
    In file included from /home/sauterp/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/c_glfw_lin.go:20:
    /home/sauterp/go/pkg/mod/github.com/go-gl/glfw/v3.3/[email protected]/glfw/src/x11_window.c:30: warning: "_GNU_SOURCE" redefined
       30 | #define _GNU_SOURCE
          |
    <command-line>: note: this is the location of the previous definition
    make: *** [Makefile:13: build] Error 1
    

    To fix this I needed to run sudo dnf install libXxf86vm-devel. This could be documented here.

Windows GUI library for Go (Golang). Comes with a graphical UI designer.

Version 2 Please go to Version 2 of this library for the latest version. Windows GUI Library This is a pure Go library to create native Windows GUIs.

Jan 1, 2023
A unified graphical user experience toolkit for Go desktop applications

Unison A unified graphical user experience toolkit for Go desktop applications. macOS, Windows, and Linux are supported. Required setup Unison is buil

Dec 20, 2022
Built Virtual Operating System and integrated application like calculator, gallery app , weather app, and text editor.
Built Virtual Operating System and integrated application like calculator, gallery app , weather app, and text editor.

Virtual Operating System Built Virtual Operating System and integrated application like calculator, gallery app , weather app, and text editor. Langua

Nov 2, 2021
Hedgex Single User Interface With Golang

Hedgex Single User Interface With Golang

Nov 3, 2021
Platform-native GUI library for Go.

ui: platform-native GUI library for Go This is a library that aims to provide simple GUI software development in Go. It is based on my libui, a simple

Jan 9, 2023
RobotGo, Go Native cross-platform GUI automation @vcaesar

Robotgo Golang Desktop Automation. Control the mouse, keyboard, bitmap, read the screen, Window Handle and global event listener. RobotGo supports Mac

Jan 7, 2023
Native Mac APIs for Go
Native Mac APIs for Go

Native Mac APIs for Golang! MacDriver is a toolkit for working with Apple/Mac APIs and frameworks in Go. It currently has 2 parts: 1. Bindings for Obj

Dec 26, 2022
Wmi - One hot Go WMI package. Package wmi provides an interface to WMI. (Windows Management Instrumentation)

wmi Package wmi provides an interface to WMI. (Windows Management Instrumentation) Install go get -v github.com/moonchant12/wmi Import import "github.

Apr 22, 2022
An example desktop system tray application that can launch HTML5 windows. Go source with a build process for Windows, Mac and Linux.

ExampleTrayGUI An example cross-platform (Mac, Windows, Linux) system tray application that can launch HTML5 windows, developed in Go including functi

Dec 3, 2022
An example desktop system tray application that can launch HTML5 windows. Go source with a build process for Windows, Mac and Linux.

ExampleTrayGUI An example cross-platform (Mac, Windows, Linux) system tray application that can launch HTML5 windows, developed in Go including functi

Dec 3, 2022
An example desktop system tray application that can launch HTML5 windows. Go source with a build process for Windows, Mac and Linux.

An example cross-platform (Mac, Windows, Linux) system tray application that can launch HTML5 windows, developed in Go including functional build process. This repository is intended as a quick reference to help others start similar projects using the referenced libraries and will not be actively maintained.

Dec 3, 2022
An example desktop system tray application that can launch HTML5 windows. Go source with a build process for Windows, Mac and Linux.

ExampleTrayGUI An example cross-platform (Mac, Windows, Linux) system tray application that can launch HTML5 windows, developed in Go including functi

Dec 3, 2022
Cross platform rapid GUI framework for golang based on Dear ImGui.
Cross platform rapid GUI framework for golang based on Dear ImGui.

giu Cross platform rapid GUI framework for golang based on Dear ImGui and the great golang binding imgui-go. Any contribution (features, widgets, tuto

Dec 28, 2022
Cross-platform Go library to place an icon in the host operating system's taskbar.

trayhost Package trayhost is a cross-platform Go library to place an icon in the host operating system's taskbar. Platform Support macOS - Fully imple

Nov 6, 2022
Linux port of tailscale system tray menu.
Linux port of tailscale system tray menu.

tailscale-systray Linux port of tailscale system tray menu. Usage $ tailscale-systray Requirements tailscale Installation Building app require gcc, l

Jan 6, 2023
gosx-notifier is a Go framework for sending desktop notifications to OSX 10.8 or higher
gosx-notifier is a Go framework for sending desktop notifications to OSX 10.8 or higher

gosx-notifier A Go lib for sending desktop notifications to OSX Mountain Lion's (10.8 or higher REQUIRED) Notification Center. Update 4/3/2014 On OSX

Dec 28, 2022
Windows GUI framework for Go.

gform is an easy to use Windows GUI toolkit for Go It provides two approaches to create UI. 1. Pure code. gform.Init() mainWindow := gform.NewForm(ni

Jan 1, 2023
domui: DOM UI framework for Go

domui: DOM UI framework for Go

Jul 23, 2022
Pglet - Web UI framework for backend developers
Pglet - Web UI framework for backend developers

Pglet - Web UI framework for backend developers

Nov 15, 2022