1 /*
2  *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  *  Copyright (C) 2011-2011 - DIGITEO - Bruno JOFRET
4  *
5  * Copyright (C) 2012 - 2016 - Scilab Enterprises
6  *
7  * This file is hereby licensed under the terms of the GNU GPL v2.0,
8  * pursuant to article 5.3.4 of the CeCILL v.2.1.
9  * This file was originally licensed under the terms of the CeCILL v2.1,
10  * and continues to be available under such terms.
11  * For more information, see the COPYING file which you should have received
12  * along with this program.
13  *
14  */
15 
16 /**
17  * Windows: swig -java -package org.scilab.modules.graphic_objects -outdir ../java/org/scilab/modules/graphic_objects/ ScilabNativeView.i
18  * Other: Use the option --enable-build-swig to the configure
19 */
20 
21 %module ScilabNativeView
22 
23 %pragma(java) jniclasscode=%{
24   static {
25     try {
26         System.loadLibrary("scigraphic_objects");
catch(UnsatisfiedLinkError e)27     } catch (UnsatisfiedLinkError e) {
28       System.err.println("Native library failed to load. \n" + e);
29       System.exit(1);
30     }
31   }
32 %}
33 
34 %inline %{
35     extern void ScilabNativeView__createObject(int id);
36     extern void ScilabNativeView__deleteObject(int id);
37     extern void ScilabNativeView__updateObject(int id, int iProperty);
38     extern void ScilabNativeView__setCurrentFigure(int id);
39     extern void ScilabNativeView__setCurrentSubWin(int id);
40     extern void ScilabNativeView__setCurrentObject(int id);
41     extern int ScilabNativeView__getValidDefaultFigureId();
42     extern int ScilabNativeView__getFigureFromIndex(int figNum);
43     %}
44