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.


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, and we use 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.


  • 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 file there for more details.

  • 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:


    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]:*WindowGeomPrefs).RecordPref(0x1a4c268, 0xc000258d80)
    /home/afr/clones/gi/gi/window.go:3286 +0x12d*Window).Resized(0xc000258d80, 0x0, 0x0)
    /home/afr/clones/gi/gi/window.go:568 +0x32c*Window).EventLoop(0xc000258d80)
    /home/afr/clones/gi/gi/window.go:1325 +0x6fe*Window).StartEventLoop(0xc000258d80)
    /home/afr/clones/gi/gi/window.go:690 +0x63
    /home/afr/clones/gi/examples/widgets/widgets.go:368 +0x3ed9
    /home/afr/clones/gi/examples/widgets/widgets.go:24 +0x20, 0xc0001f0000)
    /home/afr/clones/gi/gimain/gimain.go:27 +0x24, 0x0, 0x0)
    /home/afr/clones/gi/oswin/driver/x11driver/x11driver.go:65 +0x274
    /home/afr/clones/gi/oswin/driver/x11driver/x11driver.go:38 +0x2f
    /home/afr/clones/gi/oswin/driver/driver_x11.go:22 +0x2b
    /home/afr/clones/gi/oswin/driver/driver.go:27 +0x2b
    /home/afr/clones/gi/gimain/gimain.go:26 +0x49
    /home/afr/clones/gi/examples/widgets/widgets.go:23 +0x2d

    This is also the case for the other examples.

    enhancement help wanted 
    opened by xyproto 18
  • 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}:

    opened by rohrlich 14
  • 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.

    opened by rcoreilly 14
  • 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.

    opened by rcoreilly 13
  • 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.

    opened by rcoreilly 13
  • 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?

    opened by rcoreilly 13
  • 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?

    opened by rohrlich 12
  • 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

    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:

    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.

    opened by rcoreilly 11
  • 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.

    opened by StephenJRead 9
  • 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

    opened by thazy 9
  • 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?

    opened by rohrlich 8
  • 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:

    [email protected]:~/opt$ git clone
    Cloning into 'gi'...
    remote: Enumerating objects: 20652, done.
    ... elided ...
    Resolving deltas: 100% (15942/15942), done.
    [email protected]:~/opt$ cd gi/examples/widgets/
    [email protected]:~/opt/gi/examples/widgets$ go build -v
    go: downloading v1.1.8
    ... elided ...
    In file included from ../../../gows/pkg/mod/[email protected]/c_glfw_lin.go:20:
    ../../../gows/pkg/mod/[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
    [email protected]:~/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
    	/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, 0x27b6d60, 0x0, 0xc000545dd8)
    	_cgo_gotypes.go:7932 +0x4c fp=0xc000021ca8 sp=0xc000021c80 pc=0x96ec2c, 0x0?, 0xc000021d30?, 0x4219e7?)
    	/home/mark/opt/gows/pkg/mod/[email protected]/vulkan.go:841 +0xb1 fp=0xc000021cf8 sp=0xc000021ca8 pc=0x9a1e31, 0x9a4f8f?, 0x7f9e3d91ce60?, 0x8?)
    	/home/mark/opt/gows/pkg/mod/[email protected]/vulkan.go:841 +0x47 fp=0xc000021d40 sp=0xc000021cf8 pc=0x9a1d27*CmdPool).ConfigResettable(0xc0003ed538, 0xc0003ed520)
    	/home/mark/opt/gows/pkg/mod/[email protected]/vgpu/cmds.go:36 +0x7f fp=0xc000021dc0 sp=0xc000021d40 pc=0x9c1f1f*System).InitCmd(0x9d15a9?)
    	/home/mark/opt/gows/pkg/mod/[email protected]/vgpu/system.go:60 +0x30 fp=0xc000021df0 sp=0xc000021dc0 pc=0x9d30b0*System).InitGraphics(0xc0003ed508, 0xc0003dd800, {0x1265fa3?, 0x27b3a10?}, 0xc0003a6dc0?)
    	/home/mark/opt/gows/pkg/mod/[email protected]/vgpu/system.go:41 +0x85 fp=0xc000021e18 sp=0xc000021df0 pc=0x9d2f05*Drawer).ConfigSurface(0xc0003ed508, 0xc0003a6dc0, 0xc000545d88?)
    	/home/mark/opt/gows/pkg/mod/[email protected]/vdraw/vdraw.go:35 +0x65 fp=0xc000021e58 sp=0xc000021e18 pc=0x9e32c5*appImpl).NewWindow.func2()
    	/home/mark/opt/gi/oswin/driver/vkos/app.go:248 +0xf2 fp=0xc000021eb0 sp=0xc000021e58 pc=0xf29992*appImpl).mainLoop(0x1ebf740)
    	/home/mark/opt/gi/oswin/driver/vkos/app.go:158 +0x104 fp=0xc000021f30 sp=0xc000021eb0 pc=0xf28724
    	/home/mark/opt/gi/oswin/driver/vkos/app.go:80 +0x91 fp=0xc000021f48 sp=0xc000021f30 pc=0xf28231
    	/home/mark/opt/gi/gimain/gimain.go:31 +0x57 fp=0xc000021f68 sp=0xc000021f48 pc=0xfd58d7
    	/home/mark/opt/gi/examples/widgets/widgets.go:24 +0x25 fp=0xc000021f80 sp=0xc000021f68 pc=0xfd5ac5
    	/home/mark/opt/go/src/runtime/proc.go:250 +0x212 fp=0xc000021fe0 sp=0xc000021f80 pc=0x44d732
    	/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
    	/home/mark/opt/go/src/runtime/proc.go:302 +0xad fp=0xc00005efe0 sp=0xc00005efb0 pc=0x44d98d
    	/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
    	/home/mark/opt/go/src/runtime/mgcsweep.go:297 +0xd7 fp=0xc00005f7c8 sp=0xc00005f790 pc=0x4390d7
    	/home/mark/opt/go/src/runtime/mgc.go:178 +0x26 fp=0xc00005f7e0 sp=0xc00005f7c8 pc=0x42dd46
    	/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.(*scavengerState).sleep(0x237cb20, 0x410655d000000000)
    	/home/mark/opt/go/src/runtime/mgcscavenge.go:468 +0x125 fp=0xc00005ffa0 sp=0xc00005ff30 pc=0x437345
    	/home/mark/opt/go/src/runtime/mgcscavenge.go:626 +0x7f fp=0xc00005ffc8 sp=0xc00005ffa0 pc=0x43773f
    	/home/mark/opt/go/src/runtime/mgc.go:179 +0x26 fp=0xc00005ffe0 sp=0xc00005ffc8 pc=0x42dce6
    	/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
    	/home/mark/opt/go/src/runtime/mfinal.go:180 +0x10f fp=0xc00005e7e0 sp=0xc00005e628 pc=0x42ce4f
    	/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
    	/home/mark/opt/go/src/runtime/mgc.go:1235 +0xf1 fp=0xc0000607e0 sp=0xc000060750 pc=0x42fe91
    	/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*appImpl).RunOnMain(0x1ebf740, 0xc000555488)
    	/home/mark/opt/gi/oswin/driver/vkos/app.go:95 +0x6c fp=0xc000657a98 sp=0xc000657a60 pc=0xf282cc*appImpl).NewWindow(0x1ebf740, 0xc0004a0540?)
    	/home/mark/opt/gi/oswin/driver/vkos/app.go:241 +0x3a8 fp=0xc000657b38 sp=0xc000657a98 pc=0xf29148{0x127cb24, 0x11}, {0x127a68d, 0x11}, 0xc00006fbe8?)
    	/home/mark/opt/gi/gi/window.go:345 +0x157 fp=0xc000657ba0 sp=0xc000657b38 pc=0xc2ccf7{0x127cb24, 0x11}, {0x127a68d, 0x11}, 0x400, 0x300)
    	/home/mark/opt/gi/gi/window.go:393 +0x145 fp=0xc000657bf8 sp=0xc000657ba0 pc=0xc2d165
    	/home/mark/opt/gi/examples/widgets/widgets.go:49 +0xf4 fp=0xc000657fa0 sp=0xc000657bf8 pc=0xfd6cb4
    	/home/mark/opt/gi/examples/widgets/widgets.go:25 +0x17 fp=0xc000657fb0 sp=0xc000657fa0 pc=0xfd5a77{0x0?, 0x0?})
    	/home/mark/opt/gi/gimain/gimain.go:32 +0x1b fp=0xc000657fc0 sp=0xc000657fb0 pc=0xfd591b
    	/home/mark/opt/gi/oswin/driver/vkos/app.go:77 +0x2e fp=0xc000657fe0 sp=0xc000657fc0 pc=0xf2816e
    	/home/mark/opt/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000657fe8 sp=0xc000657fe0 pc=0x47c081
    created by
    opened by mark-summerfield 1
  • 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. reads-Mac-mini:widgets read$ ./widgets panic: vulkan error: vulkan error: incompatible driver (-9) on /Users/read/go/pkg/mod/[email protected]/vgpu/errors.go:23 (0x459d1be) NewError: pc, _, _, ok := runtime.Caller(0)

    goroutine 1 [running, locked to thread]: /Users/read/go/pkg/mod/[email protected]/vgpu/errors.go:40*GPU).Config(0xc00043b000, {0x4e12151?, 0x4e42ef3?}) /Users/read/go/pkg/mod/[email protected]/vgpu/gpu.go:172 +0xbb5*appImpl).initVk(0x5f0db80) /Users/read/go/gi/oswin/driver/vkos/app.go:195 +0x22a /Users/read/go/gi/oswin/driver/vkos/app.go:74 +0x45 /Users/read/go/gi/oswin/driver/driver_vkos.go:18 /Users/read/go/gi/oswin/driver/driver.go:27 /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$

    opened by StephenJRead 4
  • library not found for -lMoltenVK

    library not found for -lMoltenVK

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

    opened by Wsyspringsun 1
  • 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
    /usr/bin/ld: cannot find -lXxf86vm
    collect2: error: ld returned 1 exit status
    In file included from /home/sauterp/go/pkg/mod/[email protected]/c_glfw_lin.go:20:
    /home/sauterp/go/pkg/mod/[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.

    opened by sauterp 0
  • v1.3.0(Jun 2, 2022)

    This release is now based on the new framework for Vulkan, which is a much more modern and widely supported way of interfacing with the GPU.

    Everything should work more-or-less the same as before, just faster and less buggy :)

    Internally, there is a new window drawing logic using vdraw.Drawer that fixes a few rough edges around embedding a gi3d Scene into the rest of the 2D world.

    Please file issues for anything that doesn't work. Mac users have a new dependency as noted in the wiki Install page:

    • As of June 2022, the new Vulkan-based version 1.3.0+ requires the vulkan sdk to be installed: -- download the installer for the mac, follow default prompts. The homebrew molten-vk unfortunately does not seem to work by itself, and there is no formula for the whole SDK.

    Source code(tar.gz)
    Source code(zip)
  • v1.2.17(Apr 3, 2022)

  • v1.1.0(Nov 22, 2020)

    The gist package now has all the styling parameters and code for setting from props, etc.

    The girl package has all the rendering code, separated out from all the widgets etc, which are now main focus of gi proper.

    Added example for using girl independent of GoGi: useful for improved text rendering.

    For existing code that complains about gi.* name not found, change it to gist.*

    Source code(tar.gz)
    Source code(zip)
  • v1.0.16(Sep 19, 2020)

  • v1.0.11(Aug 23, 2020)

  • v1.0.6(May 16, 2020)

    Added various sync.Mutex and methods protecting Style, BBox, Viewport access -- gi3d animation and emer/leabra/examples/ra25 are now clean under race detector. TextView and SVG still need some more investigation but seem fine.

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Apr 8, 2020)

  • v0.9.16(Mar 25, 2020)

  • v0.9.15(Mar 25, 2020)

  • v0.9.14(Mar 16, 2020)

    Complete revamp of spell checking (in pi). mat32 is standalone and generally useful so really needed to break it out, despite additional hassle.

    Source code(tar.gz)
    Source code(zip)
  • v0.9.13(Mar 3, 2020)

    • updated to glfw 3.3.2 which eliminates crash at startup and delay needed to try to prevent that.
    • vcs (git) support much better and should be complete -- added better blame mode and vcs log view.
    • moved vci and spell packages to pi -- now has all file-related support packages.
    Source code(tar.gz)
    Source code(zip)
  • v0.9.12(Feb 16, 2020)

    see pi 0.9.12 update: "Although the impact is mitigated by other changes in TextBuf, somehow packages.Load is causing a big block on everything even though in a separate goroutine, so editing is significantly smoother now using previous GOPATH mode and our own file loading code."

    TextBuf now using delayed markup for everything, which is smoother overall.

    Source code(tar.gz)
    Source code(zip)
  • v0.9.11(Feb 15, 2020)

  • v0.9.10(Dec 30, 2019)

    all existing programs will need to rename NewWindow2D -> NewMainWindow and remove the last bool arg (usually true).

    now fully tested, fixed on windows, linux.

    window sizing logic under glfw 3.3. with highdpi / pixelratio / contentscale should now all be working -- some platform differences there.

    has a new much more efficient window geometry file format, with dev pixel ratio -- opening windows on a new screen should work much better.

    giv.MethView now remembers arg values for same method.

    1.0 release will be coming up soon after a few major improvements to 3D.

    Source code(tar.gz)
    Source code(zip)
  • v0.9.9(Nov 20, 2019)

    The Flag field now accurately shows flags relevant for that type. And generally bitflags now work. Also fixed sorting of TableView and a few other misc fixes.

    Source code(tar.gz)
    Source code(zip)
  • v0.9.8(Jun 6, 2019)

    Only using the glfw backend now on all platforms -- gives easier OpenGL access although it does have some issues, especially with keyboard events.

    Added new oswin/gpu package with pretty high-level abstraction of OpenGL functionality, with eye toward switching to Vulkan at some point to not be deprecated on Mac, and more easily support mobile, etc.

    Completely rewrote all the backend oswin/glos (glfw driver) stuff using new gpu framework. much cleaner and clearer.

    Start on gi3d 3D framework -- basic lights, camera, scene etc in place, but no action / events and none of envisaged integration with 2D.

    Much simpler Overlay processing, only using Sprites (images) -- also fixed issues with e.g., DND not clearing etc.

    Generalized giv.SliceViewBase with interface to handle all such tabular / row / column widgets, and now using its own scrollbar and only rendering what is visible -- much faster. multiple DND etc bugs fixed.

    Everything is much faster and more robust to operation from different goroutines -- optimized Viewport updating routines, fixed issues in tab view, caching if styles, font metrics, etc. All major perf bottlenecks optimized -- significant impact on apparent "snappiness" of gui..

    Added ColorMap, ColorName with lookups, etc.

    Source code(tar.gz)
    Source code(zip)
  • v0.9.7(Mar 22, 2019)

    See examples for new simpler methods: e.g., use gi.AddNewLabel(parent, "lbl1", "This is the label")

    much cleaner -- should have done this originally!

    also updated to ki.KnownProp -> Prop, PropTry

    and updated TabView API with *Try methods, and don't always return index -- allows simpler conversion.

    and new gopy python wrapper -- can use full GoGi functionality in Python!

    Source code(tar.gz)
    Source code(zip)
  • v0.9.1(Nov 15, 2018)

    This is the beta version as announced on golang-nuts on 11/12/2018, with go.mod added, some spelling fixes, and version info added using make version.

    Source code(tar.gz)
    Source code(zip)
GoKi framework for Trees (Ki in Japanese) in Go language, including GoGi 2D & 3D GUI framework
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.

null 159 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

Richard Wilkes 25 Dec 20, 2022
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

null 0 Nov 2, 2021
Hedgex Single User Interface With Golang

Hedgex Single User Interface With Golang

null 0 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

Pietro Gagliardi 8.2k 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

vgo 8.1k Jan 7, 2023
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

Jeff Lindsay 3.9k 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 Import import "github.

MoonChant 2 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

Grant Moore 51 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

Grant Moore 51 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.

Grant Moore 51 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

Owen Moore 51 Dec 3, 2022
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

Allen Dang 1.6k 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

null 235 Nov 6, 2022
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

mattn 127 Jan 6, 2023
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

Ralph Caraveo III 575 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

Allen Dang 278 Jan 1, 2023
domui: DOM UI framework for Go

domui: DOM UI framework for Go

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

Pglet - Web UI framework for backend developers

Web UI framework for backend developers 585 Nov 15, 2022