Add in-window view switcher (clickable tabs); v3.5 - #16
Merged
Conversation
VLC's Audio > Visualizations menu only toggles Dix on/off -- picking a layout required diving into advanced preferences. Add a clickable tab bar across the top of every layout so users switch views with a mouse click inside the Dix window: DASH, KEYS (compose/key view), SPECTRO, SPECTRUM, WAVE, STEREO. Implementation: - draw_tab_bar() renders the tabs (active tab highlighted) in the top bar, alongside the DIX wordmark and the track-title/status block. - DixTabClick() hooks the vout "mouse-clicked" coords variable; clicks arrive in 1280x720 source space and are hit-tested against dix_tab_rect(), which the renderer and the click handler share so drawing and hit-testing never drift. - Callback added in Open, removed in Close before releasing the vout. The handler only writes an aligned int (layout) read by the render thread next frame -- no lock needed, a one-frame lag is imperceptible. Closes #15. Bumps DIX_VERSION to 3.5; documents the switcher in the README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JpVzsy8Wrc9DYEXns2Njzb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a clickable tab bar across the top of every Dix layout so users can switch views inside the window — no VLC menu diving.
Tabs: DASH · KEYS · SPECTRO · SPECTRUM · WAVE · STEREO (KEYS = the compose/key view). The active tab is highlighted.
Why
VLC's Audio ▸ Visualizations menu only toggles the visualization on/off; picking a Dix layout previously meant digging into advanced preferences. This makes view-switching a one-click, in-window action.
How
draw_tab_bar()renders the tabs in the top bar next to the DIX wordmark and the track-title/status block.DixTabClick()hooks the voutmouse-clickedcoords variable; clicks arrive in 1280×720 source space and are hit-tested againstdix_tab_rect(), which the renderer and click handler share so drawing and hit-testing can't drift.Open, removed inClosebefore the vout is released. The handler writes only an alignedint(the layout) that the render thread reads next frame — no lock, one-frame lag is imperceptible.Verification
Closes #15.
🤖 Generated with Claude Code
Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/