Use native context menus on Mac OS
I have always wanted to implement pie menus as a Firefox or Chrome extension, but I&#x27;ve never been able to find a sufficient API that enables me to pop up a modal dialog window at any place on the screen (specifically: centered on the current mouse cursor position, and in an operating system window that exists outside of the browser tab, overlapping all other windows). Or reshape it to any shape (or simply respect the alpha channel of the document and not show any chrome), so I can make a round or arbitrarily shaped window shrink wrapped to the items.<p><a href="https:&#x2F;&#x2F;developer.chrome.com&#x2F;docs&#x2F;extensions&#x2F;reference&#x2F;windows&#x2F;#type-CreateType" rel="nofollow">https:&#x2F;&#x2F;developer.chrome.com&#x2F;docs&#x2F;extensions&#x2F;reference&#x2F;windo...</a><p>Is there a way with that (or any other) API to pop up and precisely measure and position an arbitrarily shaped (alpha channeled) window, without any other chrome or window frames? And then globally capture and track mouse and keyboard events?<p>Does anyone know if there&#x27;s now a way for a browser extension to do that in any browser? Or would it require hacking platform specific C++ operating system code?<p>Here&#x27;s a demo of an ancient implementation of pie menus I made for ActiveX around 1997, that shows pie menus with arbitrarily shaped windows:<p>ActiveX Pie Menus: Demo of the free ActiveX Pie Menu Control, developed and demonstrated by Don Hopkins.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=nnC8x9x3Xag" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=nnC8x9x3Xag</a><p>ActiveX Pie Menus doc, examples, sources, etc:<p><a href="https:&#x2F;&#x2F;www.donhopkins.com&#x2F;home&#x2F;catalog&#x2F;piemenus&#x2F;ActiveXPieMenus.html" rel="nofollow">https:&#x2F;&#x2F;www.donhopkins.com&#x2F;home&#x2F;catalog&#x2F;piemenus&#x2F;ActiveXPieM...</a><p><a href="https:&#x2F;&#x2F;www.donhopkins.com&#x2F;home&#x2F;catalog&#x2F;piemenus&#x2F;PieMenuDescription.html" rel="nofollow">https:&#x2F;&#x2F;www.donhopkins.com&#x2F;home&#x2F;catalog&#x2F;piemenus&#x2F;PieMenuDesc...</a><p>I did all the drawing with Win32 calls, so you could configure the fonts and colors and sizes and window shapes and styles, but you couldn&#x27;t style everything arbitrarily with css, embed arbitrary web content, or anything nice like that.<p>At the end of the demo video, I concluded that:<p>&gt;I ran up into a wall of complexity with this ActiveX control, in that I wanted to be able to have as the menu items animated gifs, mpeg movies, fonts with nice attributes, and things like that.<p>&gt;So the first thought was &quot;well let&#x27;s just put a whole web browser in every item!&quot;<p>&gt;But that was a little heavy-handed. So instead, I put the pie menus into the web browser as a Dynamic HTML Component. Which I&#x27;ll show next.<p>Of course it makes a lot more sense to draw and style the pie menus with the browser&#x27;s renderer, but I still want the best of both worlds, where I can pop browser-drawn pie menus in arbitrarily shaped and positioned operating system windows, and track the mouse globally (capturing the mouse and keyboard events and receiving mouse motion and up and key events outside the window, to pop up and track sub-menus properly).<p>JavaScript Pie Menus: Pie menus for JavaScript on Internet Explorer version 5, configured in XML, rendered with dynamic HTML, by Don Hopkins:<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=R5k4gJK-aWw&amp;ab_channel=DonHopkinsDonHopkins" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=R5k4gJK-aWw&amp;ab_channel=DonHo...</a>