IUP

Check-in [43e92362a7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:CHICKEN bindings for IUP GL controls
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 43e92362a7add6d2371b5d15996e9c62acbda2d8
User & Date: murphy 2015-05-02 14:47:13
Context
2015-05-02
14:58
Renamed glcanvas-box to glcanvasbox for consistency check-in: 14510f7985 user: murphy tags: trunk
14:47
CHICKEN bindings for IUP GL controls check-in: 43e92362a7 user: murphy tags: trunk
14:20
Link control bindings check-in: 5c793b4936 user: murphy tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Added chicken/iup-glcontrols.scm.

            1  +;; -*- mode: Scheme; tab-width: 2; -*- ;;
            2  +
            3  +;; {{{ Data types
            4  +
            5  +(foreign-declare
            6  +	"#include <iup.h>\n"
            7  +	"#include <iupglcontrols.h>\n")
            8  +	
            9  +(include "iup-types.scm")
           10  +
           11  +;; }}}
           12  +
           13  +;; {{{ GLCanvasBox and embedded controls
           14  +
           15  +(define glcanvas-box
           16  +  (make-constructor-procedure
           17  +  	(foreign-lambda* nonnull-ihandle ([ihandle-list handles]) "C_return(IupGLCanvasBoxv((Ihandle **)handles));")
           18  +  	#:apply-args list))
           19  +
           20  +(define glsubcanvas
           21  +  (make-constructor-procedure
           22  +  	(foreign-lambda nonnull-ihandle "IupGLSubCanvas")))
           23  +
           24  +(define glframe
           25  +  (make-constructor-procedure
           26  +	  (foreign-lambda nonnull-ihandle "IupGLFrame" ihandle)))
           27  +
           28  +(define glexpander
           29  +  (make-constructor-procedure
           30  +	  (foreign-lambda nonnull-ihandle "IupGLExpander" ihandle)))
           31  +
           32  +(define glscrollbox
           33  +  (make-constructor-procedure
           34  +	  (foreign-lambda nonnull-ihandle "IupGLScrollBox" ihandle)))
           35  +
           36  +(define glsizebox
           37  +  (make-constructor-procedure
           38  +	  (foreign-lambda nonnull-ihandle "IupGLSizeBox" ihandle)))
           39  +
           40  +(define glseparator
           41  +  (make-constructor-procedure
           42  +	  (foreign-lambda nonnull-ihandle "IupGLSeparator")))
           43  +
           44  +(define gllabel
           45  +  (make-constructor-procedure
           46  +	  (foreign-lambda nonnull-ihandle "IupGLLabel" c-string)
           47  +		#:apply-args (optional-args [title #f])))
           48  +
           49  +(define gllink
           50  +  (make-constructor-procedure
           51  +	  (foreign-lambda nonnull-ihandle "IupGLLink" c-string c-string)
           52  +  	#:apply-args (optional-args [url #f] [title #f])))
           53  +
           54  +(define glbutton
           55  +  (make-constructor-procedure
           56  +	  (foreign-lambda nonnull-ihandle "IupGLButton" c-string)
           57  +  	#:apply-args (optional-args [title #f])))
           58  +
           59  +(define gltoggle
           60  +  (make-constructor-procedure
           61  +	  (foreign-lambda nonnull-ihandle "IupGLToggle" c-string)
           62  +  	#:apply-args (optional-args [title #f])))
           63  +
           64  +(define glvaluator
           65  +  (make-constructor-procedure
           66  +  	(foreign-lambda nonnull-ihandle "IupGLVal")))
           67  +
           68  +(define glprogress-bar
           69  +  (make-constructor-procedure
           70  +	  (foreign-lambda nonnull-ihandle "IupGLProgressBar")))
           71  +
           72  +;; }}}
           73  +
           74  +;; {{{ Library setup
           75  +
           76  +(let ([status (foreign-value "IupGLControlsOpen()" istatus)])
           77  +	(case status
           78  +		[(#t ignore) (void)]
           79  +		[else        (error 'iup "failed to initialize library (~s)" status)]))
           80  +
           81  +;; }}}

Changes to chicken/iup.meta.

     1      1   ;; -*- mode: Scheme; -*-
     2      2   ((category ui)
     3      3    (license "BSD")
     4      4    (author "Thomas Chust")
     5      5    (synopsis "Bindings to the IUP GUI library")
     6      6    (doc-from-wiki)
     7      7    (needs srfi-42)
     8         - (files "iup.scm" "iup-types.scm" "iup-base.scm" "iup-controls.scm" "iup-dialogs.scm" "iup-glcanvas.scm" "iup-plot.scm" "iup-mglplot.scm" "iup-pplot.scm" "iup-scintilla.scm" "iup-web.scm" "iup-dynamic.scm" "iup.setup" "iup.meta" "iup.release-info"))
            8  + (files "iup.scm" "iup-types.scm" "iup-base.scm" "iup-controls.scm" "iup-dialogs.scm" "iup-glcanvas.scm" "iup-glcontrols.scm" "iup-plot.scm" "iup-mglplot.scm" "iup-pplot.scm" "iup-scintilla.scm" "iup-web.scm" "iup-dynamic.scm" "iup.setup" "iup.meta" "iup.release-info"))

Changes to chicken/iup.scm.

    66     66   		 call-with-glcanvas glcanvas-is-current?
    67     67   		 glcanvas-palette-set! glcanvas-font-set!)
    68     68   		(import
    69     69   		  scheme chicken foreign
    70     70   			iup-base)
    71     71   		(include "iup-glcanvas.scm"))])
    72     72   
           73  +(cond-expand
           74  + [(or disable-iup-glcanvas disable-iup-glcontrols)]
           75  + [else
           76  +	(module iup-glcontrols
           77  +		(glcanvas-box glsubcanvas
           78  +		 call-with-glcanvas glcanvas-is-current?
           79  +		 glcanvas-palette-set! glcanvas-font-set!
           80  +		 glframe glexpander glscrollbox glsizebox
           81  +		 glseparator gllabel gllink glbutton gltoggle
           82  +		 glvaluator glprogress-bar)
           83  +		(import
           84  +		  scheme chicken foreign
           85  +			iup-base iup-glcanvas)
           86  +		(include "iup-glcontrols.scm"))])
           87  +
    73     88   (cond-expand
    74     89    [disable-iup-plot]
    75     90    [else
    76     91   	(module iup-plot
    77     92   		(plot
    78     93   		 call-with-plot plot-add!
    79     94   		 plot-x/y->pixel-x/y

Changes to chicken/iup.setup.

     5      5   		-j iup-base -j iup-controls -j iup-dialogs
     6      6   		,@(cond-expand
     7      7   			 [disable-iup-glcanvas
     8      8   				'()]
     9      9   			 [else
    10     10   				'(-j iup-glcanvas)])
    11     11   		,@(cond-expand
           12  +			 [(or disable-iup-glcanvas disable-iup-glcontrols)
           13  +				'()]
           14  +			 [else
           15  +				'(-j iup-glcontrols)])
           16  +		,@(cond-expand
    12     17   			 [disable-iup-plot
    13     18   				'()]
    14     19   			 [else
    15     20   				'(-j iup-plot)])
    16     21   		,@(cond-expand
    17     22   			 [disable-iup-mglplot
    18     23   				'()]
................................................................................
    38     43   	`("iup.import.so"
    39     44   		"iup-base.import.so" "iup-controls.import.so" "iup-dialogs.import.so"
    40     45   		,@(cond-expand
    41     46   			 [disable-iup-glcanvas
    42     47   				'()]
    43     48   			 [else
    44     49   				'("iup-glcanvas.import.so")])
           50  +		,@(cond-expand
           51  +			 [(or disable-iup-glcanvas disable-iup-glcontrols)
           52  +				'()]
           53  +			 [else
           54  +				'("iup-glcontrols.import.so")])
    45     55   		,@(cond-expand
    46     56   			 [disable-iup-plot
    47     57   				'()]
    48     58   			 [else
    49     59   				'("iup-plot.import.so")])
    50     60   		,@(cond-expand
    51     61   			 [disable-iup-mglplot
................................................................................
    78     88   				'("-liupmatrixex")])
    79     89   		,@(cond-expand
    80     90   			 [disable-iup-glcanvas
    81     91   				'()]
    82     92   			 [else
    83     93   				'("-liupgl")])
    84     94   		,@(cond-expand
           95  +			 [(or disable-iup-glcanvas disable-iup-glcontrols)
           96  +				'()]
           97  +			 [else
           98  +				'("-liupglcontrols")])
           99  +		,@(cond-expand
    85    100   			 [disable-iup-plot
    86    101   				'()]
    87    102   			 [else
    88    103   				'("-liup_plot")])
    89    104   		,@(cond-expand
    90    105   			 [disable-iup-mglplot
    91    106   				'()]
................................................................................
   115    130   (compile -s -O2 -d0 "iup-dialogs.import.scm")
   116    131   
   117    132   (cond-expand
   118    133    [disable-iup-glcanvas]
   119    134    [else
   120    135   	(compile -s -O2 -d0 "iup-glcanvas.import.scm")])
   121    136   (cond-expand
          137  + [(or disable-iup-glcanvas disable-iup-glcontrols)]
          138  + [else
          139  +	(compile -s -O2 -d0 "iup-glcontrols.import.scm")])
          140  +(cond-expand
   122    141    [disable-iup-plot]
   123    142    [else
   124    143   	(compile -s -O2 -d0 "iup-plot.import.scm")])
   125    144   (cond-expand
   126    145    [disable-iup-mglplot]
   127    146    [else
   128    147   	(compile -s -O2 -d0 "iup-mglplot.import.scm")])
................................................................................
   138    157    [disable-iup-web]
   139    158    [else
   140    159   	(compile -s -O2 -d0 "iup-web.import.scm")])
   141    160   
   142    161   (install-extension
   143    162    'iup
   144    163    `("iup.so" "iup.o" "iup-types.scm" ,@import-libraries)
   145         - `((version 1.3.0)
          164  + `((version 1.4.0)
   146    165   	 (static "iup-base.o")
   147    166   	 (static-options ,(string-intersperse native-libraries))))
   148    167   
   149    168   (compile -s -O2 -d1 "iup-dynamic.scm" -j iup-dynamic)
   150    169   (compile -c -O2 -d1 "iup-dynamic.scm" -j iup-dynamic -unit iup-dynamic)
   151    170   (compile -s -O2 -d0 "iup-dynamic.import.scm")
   152    171   
   153    172   (install-extension
   154    173    'iup-dynamic
   155    174    '("iup-dynamic.so" "iup-dynamic.o" "iup-dynamic.import.so")
   156         - '((version 1.3.0)
          175  + '((version 1.4.0)
   157    176      (static "iup-dynamic.o")))