/*------------------------------------------------------------------------*/ int get_figures_id_property(void* _pvCtx, char* pobjUID) { int nbFig = 0 ; int * ids = NULL ; int status = -1 ; if (pobjUID != NULL) { /* This property should not be called on an handle */ Scierror(999, _("'%s' property does not exist for this handle.\n"), "figures_id"); return -1; } nbFig = sciGetNbFigure() ; /* get the number of opened windows */ ids = MALLOC( nbFig * sizeof(int) ) ; if ( ids == NULL ) { Scierror(999, _("%s: No more memory.\n"),"get_figures_id_property"); return -1 ; } sciGetFiguresId( ids ) ; status = sciReturnRowIntVector(_pvCtx, ids, nbFig); FREE( ids ) ; return status ; }
/*------------------------------------------------------------------------*/ int get_viewport_property(void* _pvCtx, char* pobjUID) { int* viewport = NULL; getGraphicObjectProperty(pobjUID, __GO_VIEWPORT__, jni_int_vector, (void **)&viewport); if (viewport == NULL) { Scierror(999, _("'%s' property does not exist for this handle.\n"), "viewport"); return -1; } return sciReturnRowIntVector(_pvCtx, viewport , 2); }