New Gtk3 UI

From vice-emu
Revision as of 08:29, 16 November 2017 by McMartin (talk | contribs)
Jump to navigation Jump to search

New Gtk3 UI

This page is meant to keep track of development efforts on the new Gtk3 UI. Once the Gtk3 UI is the de-facto UI standard, this page can be (re)moved. For now, I'd like to keep it here so it can quickly be found.


The how and why we go Gtk3 for *nix, Windows and OSX should be clear, but I'll reiterate: since we don't have any Windows or OSX maintainters left and failed to attract new ones, the decision was made to use Gtk3 as the new UI for 'modern' OSes.

Gtk3 is portable and widely supported and has a C interface. So we should be able to write the UI code once and have it run on our major platforms: Linux, Windows and OSX. Using GLib (a dependency of Gtk3) a lot of platform-dependent code in the UI can be avoided and many standard dialogs, such as open/save/select-dir need to written only once, Gtk3/GLib will handle most of the platform-dependent stuff.

Current development state

  • All emulators except VSID work, though a lot of UI code still needs to be written or updated to properly support all machines
  • Rendering is currently handled by Cairo, meaning we don't have HW rendering yet, which should be handled using GtkGlArea (requires Gtk3 3.16)
  • All UI code is hand-written, we tried using Glade/GtkBuilder, but the amount of machines and extra hardware VICE supports is way too much what a static UI can handle
  • Though many UI elements look okay, some don't. This isn't lazyness but rather to avoid tweaking the layout only to discover later that it still needs to be changed. So any layout/style issues will eventually get fixed. So don't complain about it, unless there are glaring bugs (such as dialogs that are too large to fit on a decent screen)
  • The developers currently working on Gtk3 are:
    • compyx - UI, archdep, documentation, bug fixes
    • McMartin - rendering backends, UI, archdep, bug fixes
    • loggedoubt - testing, bug fixes
    • groepaz - testing, monitor code, QA
    • blacky startdust - testing, build system, QA


This is a list of things to do and bugs to fix. This is no way an exhaustive list, to get a better understanding of what needs to be fixed/altered, run this command inside VICE's top dir: grep -n 'FIXME\|TODO\|XXX' `find src/arch/gtk3 -name '*.c'`, and be amazed.

  • Implement image content preview widget for open/attach dialogs (2017-11-08)
  • Monitor support for Windows (2017-11-08)
  • Mouse-grab. The UI items is there, but the actual mouse code isn't implemented yet (2017-11-08)
  • Fix full screen with x128 (2017-11-08)
  • Keymaps in C128 are flaky (aren't they all the same? --compyx) (2017-11-08)
  • x128: C64 memory hacks shouldn't be available (2017-11-08)
  • x64dtv: DTV has no tape port, disable tape port widget (2017-11-08)
  • Only activate "media input file" widgets when Sampler Device is "media input file" (2017-11-08)
  • Implement drive settings UI glue code (enable/disable widgets depending on drive model and machine class) (2017-11-08)
  • Grey-out other widgets when a certain memory hack is selected (x64) (2017-11-08)
  • x128 Video Settings UI is too large (2017-11-08)
  • x64dtv: this machine has only one SID (2017-11-08)
  • x64dtv: no userport printer available (userport has only 5 pins) (2017-11-08)
  • x64dtv: no SmartMouse available (2017-11-08)
  • Drive settings UI: machines without IEC cause resource errors due to 'IEDevice[8-11]' etc (2017-11-08)
  • xcbm5x0: doesn't support userport printer, remove (2017-11-08)
  • xplus4: doesn't support userport printer, remove (2017-11-08)
  • xplus4: may support 1351/SmartMouse through SidCard, research needed (2017-11-08)
  • xpet: doesn't support SmartMouse, fix (2017-11-08)
  • xpet: SidCard only supports a single SID, fix (2017-11-08)
  • xvic: joystick settings UI is scrambled (20170-11-08)
  • xpet: SidCard only supports a single SID, fix (2017-11-08
  • On Windows (and perhaps OSX) the MIDI widget should show a combobox with supported drivers (2017-11-14)
  • The Tape Devices widget needs to check if resources can be set to avoid segfaults (2017-11-14)
  • Mouse cursor should vanish, or be a light pen, as needed. (2017-11-15)
  • The OpenGL renderer should transform itself into a Cairo renderer if the system doesn't support OpenGL. (2017-11-15)
  • Do-not-scale option. Important for Cairo renderer, possible for OpenGL. (2017-11-15)
  • Rework OpenGL support on Windows and optionally on Linux to check for OpenGL library/driver compatibility at runtime instead of compile time. (2017-11-15)
  • Stretch goal: the OpenGL renderer should fall back to legacy mode (the SDL renderer) if GTK3 itself has, instead of failing. (2017-11-15)

Upstream bugs

  • Some combobox contents appear to have 'empty' entries and sometimes the colors of the items change (upstream Gtk3 bug) (2017-11-08)

Feature requests

  • Add preview of the RAM init pattern (2017-11-08)