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 Unified Diffs Ignore Whitespace Patch

Added chicken/iup-glcontrols.scm.



































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
;; -*- mode: Scheme; tab-width: 2; -*- ;;

;; {{{ Data types

(foreign-declare
	"#include <iup.h>\n"
	"#include <iupglcontrols.h>\n")
	
(include "iup-types.scm")

;; }}}

;; {{{ GLCanvasBox and embedded controls

(define glcanvas-box
  (make-constructor-procedure
  	(foreign-lambda* nonnull-ihandle ([ihandle-list handles]) "C_return(IupGLCanvasBoxv((Ihandle **)handles));")
  	#:apply-args list))

(define glsubcanvas
  (make-constructor-procedure
  	(foreign-lambda nonnull-ihandle "IupGLSubCanvas")))

(define glframe
  (make-constructor-procedure
	  (foreign-lambda nonnull-ihandle "IupGLFrame" ihandle)))

(define glexpander
  (make-constructor-procedure
	  (foreign-lambda nonnull-ihandle "IupGLExpander" ihandle)))

(define glscrollbox
  (make-constructor-procedure
	  (foreign-lambda nonnull-ihandle "IupGLScrollBox" ihandle)))

(define glsizebox
  (make-constructor-procedure
	  (foreign-lambda nonnull-ihandle "IupGLSizeBox" ihandle)))

(define glseparator
  (make-constructor-procedure
	  (foreign-lambda nonnull-ihandle "IupGLSeparator")))

(define gllabel
  (make-constructor-procedure
	  (foreign-lambda nonnull-ihandle "IupGLLabel" c-string)
		#:apply-args (optional-args [title #f])))

(define gllink
  (make-constructor-procedure
	  (foreign-lambda nonnull-ihandle "IupGLLink" c-string c-string)
  	#:apply-args (optional-args [url #f] [title #f])))

(define glbutton
  (make-constructor-procedure
	  (foreign-lambda nonnull-ihandle "IupGLButton" c-string)
  	#:apply-args (optional-args [title #f])))

(define gltoggle
  (make-constructor-procedure
	  (foreign-lambda nonnull-ihandle "IupGLToggle" c-string)
  	#:apply-args (optional-args [title #f])))

(define glvaluator
  (make-constructor-procedure
  	(foreign-lambda nonnull-ihandle "IupGLVal")))

(define glprogress-bar
  (make-constructor-procedure
	  (foreign-lambda nonnull-ihandle "IupGLProgressBar")))

;; }}}

;; {{{ Library setup

(let ([status (foreign-value "IupGLControlsOpen()" istatus)])
	(case status
		[(#t ignore) (void)]
		[else        (error 'iup "failed to initialize library (~s)" status)]))

;; }}}

Changes to chicken/iup.meta.

1
2
3
4
5
6
7
8
;; -*- mode: Scheme; -*-
((category ui)
 (license "BSD")
 (author "Thomas Chust")
 (synopsis "Bindings to the IUP GUI library")
 (doc-from-wiki)
 (needs srfi-42)
 (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"))







|
1
2
3
4
5
6
7
8
;; -*- mode: Scheme; -*-
((category ui)
 (license "BSD")
 (author "Thomas Chust")
 (synopsis "Bindings to the IUP GUI library")
 (doc-from-wiki)
 (needs srfi-42)
 (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
67
68
69
70
71
72















73
74
75
76
77
78
79
		 call-with-glcanvas glcanvas-is-current?
		 glcanvas-palette-set! glcanvas-font-set!)
		(import
		  scheme chicken foreign
			iup-base)
		(include "iup-glcanvas.scm"))])
















(cond-expand
 [disable-iup-plot]
 [else
	(module iup-plot
		(plot
		 call-with-plot plot-add!
		 plot-x/y->pixel-x/y







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
		 call-with-glcanvas glcanvas-is-current?
		 glcanvas-palette-set! glcanvas-font-set!)
		(import
		  scheme chicken foreign
			iup-base)
		(include "iup-glcanvas.scm"))])

(cond-expand
 [(or disable-iup-glcanvas disable-iup-glcontrols)]
 [else
	(module iup-glcontrols
		(glcanvas-box glsubcanvas
		 call-with-glcanvas glcanvas-is-current?
		 glcanvas-palette-set! glcanvas-font-set!
		 glframe glexpander glscrollbox glsizebox
		 glseparator gllabel gllink glbutton gltoggle
		 glvaluator glprogress-bar)
		(import
		  scheme chicken foreign
			iup-base iup-glcanvas)
		(include "iup-glcontrols.scm"))])

(cond-expand
 [disable-iup-plot]
 [else
	(module iup-plot
		(plot
		 call-with-plot plot-add!
		 plot-x/y->pixel-x/y

Changes to chicken/iup.setup.

5
6
7
8
9
10
11





12
13
14
15
16
17
18
..
38
39
40
41
42
43
44





45
46
47
48
49
50
51
..
78
79
80
81
82
83
84





85
86
87
88
89
90
91
...
115
116
117
118
119
120
121




122
123
124
125
126
127
128
...
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
		-j iup-base -j iup-controls -j iup-dialogs
		,@(cond-expand
			 [disable-iup-glcanvas
				'()]
			 [else
				'(-j iup-glcanvas)])
		,@(cond-expand





			 [disable-iup-plot
				'()]
			 [else
				'(-j iup-plot)])
		,@(cond-expand
			 [disable-iup-mglplot
				'()]
................................................................................
	`("iup.import.so"
		"iup-base.import.so" "iup-controls.import.so" "iup-dialogs.import.so"
		,@(cond-expand
			 [disable-iup-glcanvas
				'()]
			 [else
				'("iup-glcanvas.import.so")])





		,@(cond-expand
			 [disable-iup-plot
				'()]
			 [else
				'("iup-plot.import.so")])
		,@(cond-expand
			 [disable-iup-mglplot
................................................................................
				'("-liupmatrixex")])
		,@(cond-expand
			 [disable-iup-glcanvas
				'()]
			 [else
				'("-liupgl")])
		,@(cond-expand





			 [disable-iup-plot
				'()]
			 [else
				'("-liup_plot")])
		,@(cond-expand
			 [disable-iup-mglplot
				'()]
................................................................................
(compile -s -O2 -d0 "iup-dialogs.import.scm")

(cond-expand
 [disable-iup-glcanvas]
 [else
	(compile -s -O2 -d0 "iup-glcanvas.import.scm")])
(cond-expand




 [disable-iup-plot]
 [else
	(compile -s -O2 -d0 "iup-plot.import.scm")])
(cond-expand
 [disable-iup-mglplot]
 [else
	(compile -s -O2 -d0 "iup-mglplot.import.scm")])
................................................................................
 [disable-iup-web]
 [else
	(compile -s -O2 -d0 "iup-web.import.scm")])

(install-extension
 'iup
 `("iup.so" "iup.o" "iup-types.scm" ,@import-libraries)
 `((version 1.3.0)
	 (static "iup-base.o")
	 (static-options ,(string-intersperse native-libraries))))

(compile -s -O2 -d1 "iup-dynamic.scm" -j iup-dynamic)
(compile -c -O2 -d1 "iup-dynamic.scm" -j iup-dynamic -unit iup-dynamic)
(compile -s -O2 -d0 "iup-dynamic.import.scm")

(install-extension
 'iup-dynamic
 '("iup-dynamic.so" "iup-dynamic.o" "iup-dynamic.import.so")
 '((version 1.3.0)
   (static "iup-dynamic.o")))







>
>
>
>
>







 







>
>
>
>
>







 







>
>
>
>
>







 







>
>
>
>







 







|










|

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
..
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
..
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
...
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
...
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
		-j iup-base -j iup-controls -j iup-dialogs
		,@(cond-expand
			 [disable-iup-glcanvas
				'()]
			 [else
				'(-j iup-glcanvas)])
		,@(cond-expand
			 [(or disable-iup-glcanvas disable-iup-glcontrols)
				'()]
			 [else
				'(-j iup-glcontrols)])
		,@(cond-expand
			 [disable-iup-plot
				'()]
			 [else
				'(-j iup-plot)])
		,@(cond-expand
			 [disable-iup-mglplot
				'()]
................................................................................
	`("iup.import.so"
		"iup-base.import.so" "iup-controls.import.so" "iup-dialogs.import.so"
		,@(cond-expand
			 [disable-iup-glcanvas
				'()]
			 [else
				'("iup-glcanvas.import.so")])
		,@(cond-expand
			 [(or disable-iup-glcanvas disable-iup-glcontrols)
				'()]
			 [else
				'("iup-glcontrols.import.so")])
		,@(cond-expand
			 [disable-iup-plot
				'()]
			 [else
				'("iup-plot.import.so")])
		,@(cond-expand
			 [disable-iup-mglplot
................................................................................
				'("-liupmatrixex")])
		,@(cond-expand
			 [disable-iup-glcanvas
				'()]
			 [else
				'("-liupgl")])
		,@(cond-expand
			 [(or disable-iup-glcanvas disable-iup-glcontrols)
				'()]
			 [else
				'("-liupglcontrols")])
		,@(cond-expand
			 [disable-iup-plot
				'()]
			 [else
				'("-liup_plot")])
		,@(cond-expand
			 [disable-iup-mglplot
				'()]
................................................................................
(compile -s -O2 -d0 "iup-dialogs.import.scm")

(cond-expand
 [disable-iup-glcanvas]
 [else
	(compile -s -O2 -d0 "iup-glcanvas.import.scm")])
(cond-expand
 [(or disable-iup-glcanvas disable-iup-glcontrols)]
 [else
	(compile -s -O2 -d0 "iup-glcontrols.import.scm")])
(cond-expand
 [disable-iup-plot]
 [else
	(compile -s -O2 -d0 "iup-plot.import.scm")])
(cond-expand
 [disable-iup-mglplot]
 [else
	(compile -s -O2 -d0 "iup-mglplot.import.scm")])
................................................................................
 [disable-iup-web]
 [else
	(compile -s -O2 -d0 "iup-web.import.scm")])

(install-extension
 'iup
 `("iup.so" "iup.o" "iup-types.scm" ,@import-libraries)
 `((version 1.4.0)
	 (static "iup-base.o")
	 (static-options ,(string-intersperse native-libraries))))

(compile -s -O2 -d1 "iup-dynamic.scm" -j iup-dynamic)
(compile -c -O2 -d1 "iup-dynamic.scm" -j iup-dynamic -unit iup-dynamic)
(compile -s -O2 -d0 "iup-dynamic.import.scm")

(install-extension
 'iup-dynamic
 '("iup-dynamic.so" "iup-dynamic.o" "iup-dynamic.import.so")
 '((version 1.4.0)
   (static "iup-dynamic.o")))