1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2007 - INRIA - Vincent COUVERT
4  * Copyright (C) 2011 - DIGITEO - Vincent COUVERT
5  * Get the background color of an uicontrol
6  *
7  * Copyright (C) 2012 - 2016 - Scilab Enterprises
8  *
9  * This file is hereby licensed under the terms of the GNU GPL v2.0,
10  * pursuant to article 5.3.4 of the CeCILL v.2.1.
11  * This file was originally licensed under the terms of the CeCILL v2.1,
12  * and continues to be available under such terms.
13  * For more information, see the COPYING file which you should have received
14  * along with this program.
15  *
16  */
17 
18 extern "C"
19 {
20 #include "GetUicontrol.h"
21 }
22 
GetUicontrolBackgroundColor(void * _pvCtx,int iObjUID)23 void* GetUicontrolBackgroundColor(void* _pvCtx, int iObjUID)
24 {
25     double *tmp = NULL;
26     void* status = NULL;
27 
28     getGraphicObjectProperty(iObjUID, __GO_UI_BACKGROUNDCOLOR__, jni_double_vector, (void **) &tmp);
29 
30     if (tmp == NULL)
31     {
32         Scierror(999, const_cast<char*>(_("'%s' property does not exist for this handle.\n")), "BackgroundColor");
33         return NULL;
34     }
35     else
36     {
37         status = sciReturnRowVector(tmp, 3);
38         delete[] tmp;
39         return status;
40     }
41 }
42 
43