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) 2010 - DIGITEO - Manuel Juliachs
7 * Copyright (C) 2011 - DIGITEO - Vincent Couvert
8 *
9 * Copyright (C) 2012 - 2016 - Scilab Enterprises
10 *
11 * This file is hereby licensed under the terms of the GNU GPL v2.0,
12 * pursuant to article 5.3.4 of the CeCILL v.2.1.
13 * This file was originally licensed under the terms of the CeCILL v2.1,
14 * and continues to be available under such terms.
15 * For more information, see the COPYING file which you should have received
16 * along with this program.
17 *
18 */
19
20 /*------------------------------------------------------------------------*/
21 /* file: get_tics_color_property.c */
22 /* desc : function to retrieve in Scilab the tics_color field of */
23 /* a handle */
24 /*------------------------------------------------------------------------*/
25
26 #include "getHandleProperty.h"
27 #include "GetProperty.h"
28 #include "returnProperty.h"
29 #include "Scierror.h"
30 #include "localization.h"
31
32 #include "getGraphicObjectProperty.h"
33 #include "graphicObjectProperties.h"
34
35 /*------------------------------------------------------------------------*/
get_tics_color_property(void * _pvCtx,int iObjUID)36 void* get_tics_color_property(void* _pvCtx, int iObjUID)
37 {
38 int iTicksColor = 0;
39 int* piTicksColor = &iTicksColor;
40
41 getGraphicObjectProperty(iObjUID, __GO_TICKS_COLOR__, jni_int, (void**)&piTicksColor);
42
43 if (piTicksColor == NULL)
44 {
45 Scierror(999, _("'%s' property does not exist for this handle.\n"), "tics_color");
46 return NULL;
47 }
48
49 return sciReturnDouble(iTicksColor);
50 }
51 /*------------------------------------------------------------------------*/
52