XDND Server: contribution, announce, extension, module?
Steven J Abner <[email protected]> Fri, 04 Apr 2025 19:57:06 -0400
| Newsgroups | gmane.comp.freedesktop.xcb |
|---|---|
| Message-ID | <[email protected]> |
Hello Writing this as a contribution, or as www/Specfications/XDND states "help get the snowball rolling". Figured I do this for reasons of it will be about 1 of 5 sources one can reference the use of XDND. Firstly, from above mentioned, "Paul Sheer has implemented XDND v2" is close to impossible to find, or was for me, and others are limited approaches. And I figure I better do this before I loose my nerve. My hopes are at worst, a source others can reference, and at most get an extension or module from the experts here at xcb. It has my limited testing, but deals with 6 different types of drags. The one for possible candidacy is with the switch 'EXTERNAL_ON'. I broke down application usage to a single file "drag.c". drag.c contains 3 sections: first connecting to normal event signals, second communication of dnd within a window (DNDI) and third, the xdnd server for window to window (DNDX). The DNDX or candidate for extension or module, has 12 API connections with drag.c hopefully easy enough to follow on usage. An additional "textviews_drag.c" file shows an object's usage/connection using the API connections. The XDNDServer has a few things I wish all dnd did, but a few I couldn't implement due to abstract nature of the specifications. They are however semi-included. I could use any feedback to improve the code, since this will hopefully be a reference for others. Even if it is a 'snowball' chance of being used. Please don't laugh too hard when you see it, and thanks to all that have helped me get this far. See https://github.com/pheonixo/XCB_session drag.c. For a test file to use try "make xxtxt && gdb xxtxt". For kicks, try ctrl f on a focused textview, and dnd in that window. ctrl scroll if need left/right scrolling. Steve PS Still in development, but felt like event signals into xdndserver were solid, I hope. This doesn't imply they shouldn't be changed. Need xcb expert's review. Maybe I'll learn a ~0 type trick :)