summaryrefslogtreecommitdiff
path: root/modules/graphics/src/c/getHandleProperty/SetPropertyStatus.h
blob: a13c97df2d521f57769a85f858cda07914707ac6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2006 - INRIA - Jean-Baptiste Silvy
 *
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at
 * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
 *
 */

/*------------------------------------------------------------------------*/
/* file: SetPropertySatus.h                                               */
/* desc : define the different type of return status for the sci_set      */
/*        routine                                                         */
/*------------------------------------------------------------------------*/

#ifndef _SET_PROPERTY_STATUS_
#define _SET_PROPERTY_STATUS_

/**
 * define the diffrent type of return for a set function :
 * - SET_PROPERTY_ERROR when an error occurred during the set
 * - SET_PROPERTY_UNCHANGED when the property was already set to the value,
 *   then nothing should be done
 * - SET_PROPERTY_SUCCEED when the property was successfully modified
 */
typedef enum
{
    SET_PROPERTY_ERROR     = -1,
    SET_PROPERTY_SUCCEED   =  0 ,
    SET_PROPERTY_UNCHANGED =  1
} SetPropertyStatus;

/**
 * when two properties are set at the same time
 * return only one which can be used after
 */
SetPropertyStatus sciSetFinalStatus(SetPropertyStatus status1, SetPropertyStatus status2);

/**
 * Some operation might not need a redraw. Use this function to transform
 * all success status into unchanged status.
 */
SetPropertyStatus sciSetNoRedrawStatus(SetPropertyStatus status);

#endif /* _SET_PROPERTY_STATUS_ */