~ubuntu-branches/ubuntu/trusty/scilab/trusty

« back to all changes in this revision

Viewing changes to modules/graphics/src/c/getHandleProperty/get_x_location_property.c

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-08-02 11:02:49 UTC
  • mfrom: (1.4.6)
  • Revision ID: package-import@ubuntu.com-20120802110249-0v5953emkp25geuz
Tags: 5.4.0-beta-2-1~exp1
* New upstream release
* Remove libscilab-java (remove upstream). Use libscilab2-java instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "graphicObjectProperties.h"
31
31
 
32
32
/*------------------------------------------------------------------------*/
33
 
int get_x_location_property(char *pobjUID)
 
33
int get_x_location_property(void* _pvCtx, char* pobjUID)
34
34
{
35
35
    int iLocation = 0;
36
36
    int* piLocation = &iLocation;
37
37
 
38
 
#if 0
39
 
    if (sciGetEntityType (pobj) != SCI_SUBWIN)
40
 
    {
41
 
        Scierror(999, _("'%s' property does not exist for this handle.\n"),"x_location");
42
 
        return -1 ;
43
 
    }
44
 
#endif
45
 
 
46
 
    getGraphicObjectProperty(pobjUID, __GO_X_AXIS_LOCATION__, jni_int, &piLocation);
 
38
    getGraphicObjectProperty(pobjUID, __GO_X_AXIS_LOCATION__, jni_int, (void**)&piLocation);
47
39
 
48
40
    if (piLocation == NULL)
49
41
    {
53
45
 
54
46
    if (iLocation == 0)
55
47
    {
56
 
        return sciReturnString( "bottom" );
 
48
        return sciReturnString(_pvCtx, "bottom" );
57
49
    }
58
50
    else if (iLocation == 1)
59
51
    {
60
 
        return sciReturnString( "top" );
 
52
        return sciReturnString(_pvCtx, "top" );
61
53
    }
62
54
    else if (iLocation == 2)
63
55
    {
64
 
        return sciReturnString( "middle" );
 
56
        return sciReturnString(_pvCtx, "middle" );
65
57
    }
66
58
    else if (iLocation == 3)
67
59
    {
68
 
        return sciReturnString( "origin" );
 
60
        return sciReturnString(_pvCtx, "origin" );
69
61
    }
70
62
    else
71
63
    {