IUP

Check-in [c247cf621b]
Login

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

Overview
Comment:Added bindings for the IUP Web library
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c247cf621b6560ddaeaf49ad2ba77b35e1af6a5b
User & Date: murphy 2011-03-23 19:51:28.661
Context
2011-03-23
20:11
Some more CHICKEN bindings should be foreign-safe-lambdas for good measure check-in: 9315426b4f user: murphy tags: trunk
19:51
Added bindings for the IUP Web library check-in: c247cf621b user: murphy tags: trunk
2011-03-22
22:35
Fixed callback list management issue in CHICKEN code check-in: adb17c5637 user: murphy tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to api/main.wiki.
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
	</tr>
</table>

This module re-exports most bindings from the <tt>[./base.wiki|base]</tt>,
<tt>[./controls.wiki|controls]</tt> and <tt>[./dialogs.wiki|dialogs]</tt>
modules.

Additional features can be imported from the <tt>[./glcanvas.wiki|glcanvas]</tt>
and <tt>[./pplot.wiki|pplot]</tt> modules.

Instead of using this module directly you may instead require the
<tt>[./dynamic.wiki|dynamic]</tt> module to access the GUI library bindings at
runtime iff the library is available.

<h2>Host Specifics</h2>








|
<







13
14
15
16
17
18
19
20

21
22
23
24
25
26
27
	</tr>
</table>

This module re-exports most bindings from the <tt>[./base.wiki|base]</tt>,
<tt>[./controls.wiki|controls]</tt> and <tt>[./dialogs.wiki|dialogs]</tt>
modules.

Additional features can be imported from the <tt>[./glcanvas.wiki|glcanvas]</tt>, <tt>[./pplot.wiki|pplot]</tt> and <tt>[./web.wiki|web]</tt> modules.


Instead of using this module directly you may instead require the
<tt>[./dynamic.wiki|dynamic]</tt> module to access the GUI library bindings at
runtime iff the library is available.

<h2>Host Specifics</h2>

Added api/web.wiki.












































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<h1><tt>web</tt> Module</h1>

<h2>Synopsis</h2>

<table>
	<tr>
		<th>Racket</th>
		<td><code>(require (planet murphy/iup:1:0/web))</code></td>
	</tr>
	<tr>
		<th>CHICKEN</th>
		<td><code>(require-extension iup-web)</code></td>
	</tr>
</table>

Web browsing support. Initializes the IUP Web library when loaded.

<h2>Web Browser Control</h2>

<h3><a id="web-browser"><code><nowiki>(web-browser #:<name> <value> ...) → ihandle?</nowiki></code></a></h3>

Creates a web browser widget.
Added chicken/iup-web.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
(require-library iup-base)

(module iup-web
	(web-browser)
	(import
		scheme chicken foreign
		iup-base)

;; {{{ Data types

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

;; }}}

;; {{{ Web browser control

(define web-browser
  (make-constructor-procedure
  	(foreign-lambda nonnull-ihandle "IupWebBrowser")))

;; }}}

;; {{{ Library setup

(foreign-code "IupWebBrowserOpen();")

;; }}}

)
Changes to chicken/iup.meta.
1
2
3
4
5
6
((category ui)
 (license "BSD")
 (author "Thomas Chust")
 (synopsis "Bindings to the IUP GUI library")
 (documentation "http://www.chust.org/fossils/iup")
 (needs srfi-42))




|

1
2
3
4
5
6
((category ui)
 (license "BSD")
 (author "Thomas Chust")
 (synopsis "Bindings to the IUP GUI library")
 (doc-from-wiki)
 (needs srfi-42))
Changes to chicken/iup.setup.
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
		(compile -s -O2 -d1 "iup-base.scm" -j iup-base "-lcallback -liup -liupim -liupimglib")
		(compile -c -O2 -d1 "iup-base.scm" -j iup-base -unit iup-base)
		(compile -s -O2 -d0 "iup-base.import.scm")
		
		(install-extension
		 'iup-base
		 '("iup-base.so" "iup-base.o" "iup-base.import.so" "iup-types.scm")
		 '((version 1.0.2)
			 (static "iup-base.o")
			 (static-options "-lcallback -liup -liupim -liupimglib")))
		
		(compile -s -O2 -d1 "iup-controls.scm" -j iup-controls "-liup -liupcontrols")
		(compile -c -O2 -d1 "iup-controls.scm" -j iup-controls -unit iup-controls)
		(compile -s -O2 -d0 "iup-controls.import.scm")
		
		(install-extension
		 'iup-controls
		 '("iup-controls.so" "iup-controls.o" "iup-controls.import.so")
		 '((version 1.0.2)
			 (static "iup-controls.o")
			 (static-options "-liup -liupcontrols")))
		
		(compile -s -O2 -d1 "iup-dialogs.scm" -j iup-dialogs "-liup")
		(compile -c -O2 -d1 "iup-dialogs.scm" -j iup-dialogs -unit iup-dialogs)
		(compile -s -O2 -d0 "iup-dialogs.import.scm")
		
		(install-extension
		 'iup-dialogs
		 '("iup-dialogs.so" "iup-dialogs.o" "iup-dialogs.import.so")
		 '((version 1.0.2)
			 (static "iup-dialogs.o")
			 (static-options "-liup")))
		
		(if (check-libraries ["iupgl" "IupGLCanvasOpen"])
			(begin
				(compile -s -O2 -d1 "iup-glcanvas.scm" -j iup-glcanvas "-liup -liupgl")
				(compile -c -O2 -d1 "iup-glcanvas.scm" -j iup-glcanvas -unit iup-glcanvas)
				(compile -s -O2 -d0 "iup-glcanvas.import.scm")
				
				(install-extension
				 'iup-glcanvas
				 '("iup-glcanvas.so" "iup-glcanvas.o" "iup-glcanvas.import.so")
				 '((version 1.0.2)
					 (static "iup-glcanvas.o")
					 (static-options "-liup -liupgl"))))
			(warning "IUP GLCanvas not found, some bindings cannot be compiled"))
		
		(if (check-libraries ["iup_pplot" "IupPPlotOpen"])
			(begin
				(compile -s -O2 -d1 "iup-pplot.scm" -j iup-pplot "-liup -liup_pplot")
				(compile -c -O2 -d1 "iup-pplot.scm" -j iup-pplot -unit iup-pplot)
				(compile -s -O2 -d0 "iup-pplot.import.scm")
				
				(install-extension
				 'iup-pplot
				 '("iup-pplot.so" "iup-pplot.o" "iup-pplot.import.so")
				 '((version 1.0.2)
					 (static "iup-pplot.o")
					 (static-options "-liup -liup_pplot"))))
			(warning "IUP PPlot not found, some bindings cannot be compiled"))














		
		(compile -s -O2 -d1 "iup.scm" -j iup)
		(compile -c -O2 -d1 "iup.scm" -j iup -unit iup)
		(compile -s -O2 -d0 "iup.import.scm")
		
		(install-extension
		 'iup
		 '("iup.so" "iup.o" "iup.import.so")
		 '((version 1.0.2)
			 (static "iup.o"))))
	(warning "IUP or ffcall not found, none of the bindings can be compiled"))

(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.0.2)
   (static "iup-dynamic.o")))







|










|










|












|













|



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








|










|

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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
		(compile -s -O2 -d1 "iup-base.scm" -j iup-base "-lcallback -liup -liupim -liupimglib")
		(compile -c -O2 -d1 "iup-base.scm" -j iup-base -unit iup-base)
		(compile -s -O2 -d0 "iup-base.import.scm")
		
		(install-extension
		 'iup-base
		 '("iup-base.so" "iup-base.o" "iup-base.import.so" "iup-types.scm")
		 '((version 1.0.3)
			 (static "iup-base.o")
			 (static-options "-lcallback -liup -liupim -liupimglib")))
		
		(compile -s -O2 -d1 "iup-controls.scm" -j iup-controls "-liup -liupcontrols")
		(compile -c -O2 -d1 "iup-controls.scm" -j iup-controls -unit iup-controls)
		(compile -s -O2 -d0 "iup-controls.import.scm")
		
		(install-extension
		 'iup-controls
		 '("iup-controls.so" "iup-controls.o" "iup-controls.import.so")
		 '((version 1.0.3)
			 (static "iup-controls.o")
			 (static-options "-liup -liupcontrols")))
		
		(compile -s -O2 -d1 "iup-dialogs.scm" -j iup-dialogs "-liup")
		(compile -c -O2 -d1 "iup-dialogs.scm" -j iup-dialogs -unit iup-dialogs)
		(compile -s -O2 -d0 "iup-dialogs.import.scm")
		
		(install-extension
		 'iup-dialogs
		 '("iup-dialogs.so" "iup-dialogs.o" "iup-dialogs.import.so")
		 '((version 1.0.3)
			 (static "iup-dialogs.o")
			 (static-options "-liup")))
		
		(if (check-libraries ["iupgl" "IupGLCanvasOpen"])
			(begin
				(compile -s -O2 -d1 "iup-glcanvas.scm" -j iup-glcanvas "-liup -liupgl")
				(compile -c -O2 -d1 "iup-glcanvas.scm" -j iup-glcanvas -unit iup-glcanvas)
				(compile -s -O2 -d0 "iup-glcanvas.import.scm")
				
				(install-extension
				 'iup-glcanvas
				 '("iup-glcanvas.so" "iup-glcanvas.o" "iup-glcanvas.import.so")
				 '((version 1.0.3)
					 (static "iup-glcanvas.o")
					 (static-options "-liup -liupgl"))))
			(warning "IUP GLCanvas not found, some bindings cannot be compiled"))
		
		(if (check-libraries ["iup_pplot" "IupPPlotOpen"])
			(begin
				(compile -s -O2 -d1 "iup-pplot.scm" -j iup-pplot "-liup -liup_pplot")
				(compile -c -O2 -d1 "iup-pplot.scm" -j iup-pplot -unit iup-pplot)
				(compile -s -O2 -d0 "iup-pplot.import.scm")
				
				(install-extension
				 'iup-pplot
				 '("iup-pplot.so" "iup-pplot.o" "iup-pplot.import.so")
				 '((version 1.0.3)
					 (static "iup-pplot.o")
					 (static-options "-liup -liup_pplot"))))
			(warning "IUP PPlot not found, some bindings cannot be compiled"))

		(if (check-libraries ["iupweb" "IupWebBrowserOpen"])
			(begin
				(compile -s -O2 -d1 "iup-web.scm" -j iup-web "-liup -liupweb")
				(compile -c -O2 -d1 "iup-web.scm" -j iup-web -unit iup-web)
				(compile -s -O2 -d0 "iup-web.import.scm")
				
				(install-extension
				 'iup-web
				 '("iup-web.so" "iup-web.o" "iup-web.import.so")
				 '((version 1.0.3)
					 (static "iup-web.o")
					 (static-options "-liup -liupweb"))))
			(warning "IUP Web not found, some bindings cannot be compiled"))
		
		(compile -s -O2 -d1 "iup.scm" -j iup)
		(compile -c -O2 -d1 "iup.scm" -j iup -unit iup)
		(compile -s -O2 -d0 "iup.import.scm")
		
		(install-extension
		 'iup
		 '("iup.so" "iup.o" "iup.import.so")
		 '((version 1.0.3)
			 (static "iup.o"))))
	(warning "IUP or ffcall not found, none of the bindings can be compiled"))

(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.0.3)
   (static "iup-dynamic.o")))
Added racket/web.rkt.




























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#lang racket
(require
 ffi/unsafe
 "base.rkt")

(define libiup-web
  (case (system-type 'os)
    [(windows)
     (ffi-lib "iupweb")]
    [else
     (ffi-lib "libiupweb")]))

;; Web browser control

(define web-browser
  (make-constructor-procedure
   (get-ffi-obj
    "IupWebBrowser" libiup-web
    (_fun -> [handle : _ihandle]))))

;; Library setup

(letrec ([open
          (get-ffi-obj
           "IupWebBrowserOpen" libiup-web
           (_fun -> _void))])
  (open))

(provide
 web-browser)