Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.15 KB

2_05_simple_plugin_ui_xputty_1.md

File metadata and controls

40 lines (27 loc) · 1.15 KB

05 - Make A Simple Amp Plugin UI With XPutty

See video: https://youtu.be/no9pBAi-F1c

We create an X11, Cairo-based graphical user interface with Xputty.

Topics

New requirements for X11

  • Declare as an X11 user interface: ui:X11UI
  • Information about the host-provided parent window
  • Interface for the to call the plugin UI event loops: idle interface
    • lv2:requiredFeature ui:idleInterface
    • lv2:extensionData ui:idleInterface
  • Destructor to cleanup / deallocate plugin UI widgets

Construct the UI

  • Init Xputty:main_init ()
  • Create a top level widget: create_window ()
  • Create a dial widget inside the top level widget: add_knob ()
  • Link the dial to valueChangedCallback
  • Add values and a value range: set_adjustment ()
  • Visualize: widget_show_all ()

Set / Get dial

  • Set dial value via portEvent: adj_set_value ()
  • Get dial value in valueChangedCallback: adj_get_value ()

Idle interface

  • Provide a static idle interface function
  • Call run_embedded ()
  • Link idle interface function in extension data