1 /*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2004-2006 - INRIA - Fabrice Leray
4 * Copyright (C) 2006 - INRIA - Allan Cornet
5 * Copyright (C) 2006 - INRIA - Jean-Baptiste Silvy
6 * Copyright (C) 2011 - DIGITEO - Vincent Couvert
7 *
8 * Copyright (C) 2012 - 2016 - Scilab Enterprises
9 *
10 * This file is hereby licensed under the terms of the GNU GPL v2.0,
11 * pursuant to article 5.3.4 of the CeCILL v.2.1.
12 * This file was originally licensed under the terms of the CeCILL v2.1,
13 * and continues to be available under such terms.
14 * For more information, see the COPYING file which you should have received
15 * along with this program.
16 *
17 */
18
19 /*------------------------------------------------------------------------*/
20 /* file: get_default_figure_property.c */
21 /* desc : function to retrieve in Scilab the default_figure field of a */
22 /* handle */
23 /*------------------------------------------------------------------------*/
24
25 #include "getHandleProperty.h"
26 #include "returnProperty.h"
27 #include "Scierror.h"
28 #include "localization.h"
29 #include "InitObjects.h"
30 #include "sci_malloc.h"
31
32 #include "HandleManagement.h"
33 #include "FigureModel.h"
34 /*--------------------------------------------------------------------------*/
get_default_figure_property(void * _pvCtx,int iObjUID)35 void* get_default_figure_property(void* _pvCtx, int iObjUID)
36 {
37 if (iObjUID != 0)
38 {
39 /* This property should not be called on an handle */
40 Scierror(999, _("'%s' property does not exist for this handle.\n"), "default_figure");
41 return NULL;
42 }
43 return sciReturnHandle(getHandle(getFigureModel()));
44 }
45 /*--------------------------------------------------------------------------*/
46