Chandra
view release on metacpan or search on metacpan
xs/contextmenu.xs view on Meta::CPAN
/* Bind __chandraContextMenuBridge dispatch if not already done */
{
SV **db_svp = hv_fetchs(hv, "_dispatch_bound", 0);
if (!db_svp || !SvTRUE(*db_svp)) {
SV **app_svp = hv_fetchs(hv, "app", 0);
if (app_svp && SvOK(*app_svp)) {
SV *cm_self_ref = newSVsv(self);
CV *wrapper_cv;
sv_rvweaken(cm_self_ref);
wrapper_cv = newXS(NULL, XS_Chandra__ContextMenu__dispatch_trampoline, __FILE__);
CvXSUBANY(wrapper_cv).any_ptr = (void *)cm_self_ref;
{
dSP;
ENTER; SAVETMPS;
PUSHMARK(SP);
XPUSHs(*app_svp);
XPUSHs(sv_2mortal(newSVpvs("__chandraContextMenuBridge")));
XPUSHs(sv_2mortal(newRV_noinc((SV *)wrapper_cv)));
PUTBACK;
xs/dragdrop.xs view on Meta::CPAN
/* Bind __chandra_dragdrop dispatch if not already done */
{
SV **db_svp = hv_fetchs(hv, "_dispatch_bound", 0);
if (!db_svp || !SvTRUE(*db_svp)) {
SV **app_svp = hv_fetchs(hv, "app", 0);
if (app_svp && SvOK(*app_svp)) {
SV *dd_self_ref = newSVsv(self);
CV *wrapper_cv;
sv_rvweaken(dd_self_ref);
wrapper_cv = newXS(NULL, XS_Chandra__DragDrop__dispatch_trampoline, __FILE__);
CvXSUBANY(wrapper_cv).any_ptr = (void *)dd_self_ref;
{
dSP;
ENTER; SAVETMPS;
PUSHMARK(SP);
XPUSHs(*app_svp);
XPUSHs(sv_2mortal(newSVpvs("__chandra_dragdrop")));
XPUSHs(sv_2mortal(newRV_noinc((SV *)wrapper_cv)));
PUTBACK;
xs/shortcut.xs view on Meta::CPAN
{
SV **db_svp = hv_fetchs(hv, "_dispatch_bound", 0);
if (!db_svp || !SvIV(*db_svp)) {
SV **app_svp = hv_fetchs(hv, "app", 0);
if (app_svp && SvOK(*app_svp)) {
/* Create dispatch callback that references self */
CV *wrapper_cv;
SV *self_ref;
self_ref = newSVsv(self);
sv_rvweaken(self_ref); /* weak ref to avoid circular */
wrapper_cv = newXS(NULL, xs_shortcut_dispatch_callback, __FILE__);
CvXSUBANY(wrapper_cv).any_ptr = (void *)self_ref;
{
dSP;
ENTER; SAVETMPS;
PUSHMARK(SP);
XPUSHs(*app_svp);
XPUSHs(sv_2mortal(newSVpvs("__chandra_shortcut")));
( run in 1.291 second using v1.01-cache-2.11-cpan-39bf76dae61 )