// Get return values
mouseButtonNumber = getJxclickMouseButtonNumber();
- pixelCoords[0] = (int) getJxclickXCoordinate();
- pixelCoords[1] = (int) getJxclickYCoordinate();
+ pixelCoords[0] = (int)getJxclickXCoordinate();
+ pixelCoords[1] = (int)getJxclickYCoordinate();
iWindowUID = getJxclickWindowID();
menuCallback = getJxclickMenuCallback();
return 1;
}
- rep[0] = (double) mouseButtonNumber;
+ rep[0] = (double)mouseButtonNumber;
rep[1] = userCoords2D[0];
rep[2] = userCoords2D[1];
}
return 1;
}
- rep[0] = (double) mouseButtonNumber;
+ rep[0] = (double)mouseButtonNumber;
}
if (nbOutputArgument(pvApiCtx) >= 2)
}
getGraphicObjectProperty(iWindowUID, __GO_ID__, jni_int, (void**)&piFigureId);
- rep[0] = (double) iFigureId;
+ rep[0] = (double)iFigureId;
}
if (nbOutputArgument(pvApiCtx) >= 5)
{
- char *strRep = NULL;
- AssignOutputVariable(pvApiCtx, 5) = nbInputArgument(pvApiCtx) + 5;
- istr = (int)strlen(menuCallback);
-
- if (allocSingleString(pvApiCtx, nbInputArgument(pvApiCtx) + 5, istr * one, &strRep))
+ if (createSingleString(pvApiCtx, nbInputArgument(pvApiCtx) + 5, menuCallback))
{
Scierror(999, _("%s: Memory allocation error.\n"), fname);
deleteJxclickString(menuCallback);
return 1;
}
- strncpy(strRep, menuCallback, istr);
- freeAllocatedSingleString(strRep);
+
+ AssignOutputVariable(pvApiCtx, 5) = nbInputArgument(pvApiCtx) + 5;
}
deleteJxclickString(menuCallback);