[cl-gtk2-devel] GBoxed, signals, and dnd
Kalyanov Dmitry
kalyanov.dmitry at gmail.com
Wed Aug 24 17:50:39 UTC 2011
On Mon, 2011-08-22 at 18:18 -0500, Ryan Pavlik wrote:
> I'm currently working on implementing the calls necessary for DND on
> the gtk side. For the most part, this has been relatively
> straightforward; I can receive drop data and initiate drags.
>
> However, the critical part for initiated drags is setting
> selection-data in the drag-data-get signal handler. This requires you
> to alter the passed selection-data in response; however, the changes
> don't appear to be copied out. How can I accomplish this?
>
> It appears that glib-defcallback is defined for a related purpose, but
> this doesn't seem useful in conjunction with signal handlers.
>
> thanks,
>
I admit that mapping of GBoxed types is not well thought out - it does
not fully capture semantics of C structures.
The easiest way to accomplish this would be to add ability to override
parsing of signal arguments (in gobject.signals.lisp, relevant functions
are LISP-SIGNAL-HANDLER-CLOSURE-MARSHAL, PARSE-CLOSURE-ARGUMENTS) and
use it to parse relevant arguments of signals as just pointers.
More information about the cl-gtk2-devel
mailing list