IUP

Check-in [5f72a951c9]
Login

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

Overview
Comment:Windows OLE embedding support
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | v1.5.0
Files: files | file ages | folders
SHA1: 5f72a951c9945ed6f083e349914f5cc3995b0b16
User & Date: murphy 2015-05-03 00:01:27
Context
2015-05-03
02:57
Updated CHICKEN release information file check-in: d164df82c1 user: murphy tags: trunk
00:01
Windows OLE embedding support check-in: 5f72a951c9 user: murphy tags: trunk, v1.5.0
2015-05-02
22:47
Switched CHICKEN release information to meta file distribution check-in: 1eae3b5da5 user: murphy tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to api/main.wiki.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
	</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>[./glcontrols.wiki|glcontrols]</tt>, <tt>[./plot.wiki|plot]</tt>, <tt>[./mglplot.wiki|mglplot]</tt>, <tt>[./pplot.wiki|pplot]</tt>, <tt>[./scintilla.wiki|scintilla]</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>

Under both Racket and CHICKEN, the foreign types and conversion procedures
defined in <tt>[./base.wiki|base]</tt> are not re-exported. Since Racket
provides its own version of <tt>send-url</tt> from <tt>net/url</tt>, the
compatible procedure from <tt>[./base.wiki|base]</tt> is also not re-exported
under Racket.







|












13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
	</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>[./glcontrols.wiki|glcontrols]</tt>, <tt>[./plot.wiki|plot]</tt>, <tt>[./mglplot.wiki|mglplot]</tt>, <tt>[./pplot.wiki|pplot]</tt>, <tt>[./scintilla.wiki|scintilla]</tt>, <tt>[./web.wiki|web]</tt> and <tt>[./ole.wiki|ole]</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>

Under both Racket and CHICKEN, the foreign types and conversion procedures
defined in <tt>[./base.wiki|base]</tt> are not re-exported. Since Racket
provides its own version of <tt>send-url</tt> from <tt>net/url</tt>, the
compatible procedure from <tt>[./base.wiki|base]</tt> is also not re-exported
under Racket.

Added api/ole.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>ole</tt> Module</h1>

<h2>Synopsis</h2>

<table>
	<tr>
		<th>Racket</th>
		<td><code>(require iup/ole)</code></td>
	</tr>
	<tr>
		<th>CHICKEN</th>
		<td><code>(require-extension iup-ole)</code></td>
	</tr>
</table>

Windows OLE embedding support. Initializes the IUP OLE library when loaded.

<h2>Windows OLE Control</h2>

<h3><a id="ole-control"><code><nowiki>(ole-control [program-id string?] #:<name> <value> ...) → ihandle?</nowiki></code></a></h3>

Creates an OLE control.

Added chicken/iup-ole.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
;; -*- mode: Scheme; tab-width: 2; -*- ;;

;; {{{ Data types

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

;; }}}

;; {{{ Windows OLE control

(define ole-control
  (make-constructor-procedure
  	(foreign-lambda nonnull-ihandle "IupOleControl" nonnull-c-string)))

;; }}}

;; {{{ Library setup

(let ([status (foreign-value "IupOleControlOpen()" 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-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"))







|
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-ole.scm" "iup-dynamic.scm" "iup.setup" "iup.meta" "iup.release-info"))

Changes to chicken/iup.scm.

139
140
141
142
143
144
145










146
147
148
149
150
151
152
153
154
155
156
157
 [else
	(module iup-web
		(web-browser)
		(import
		  scheme chicken foreign
			iup-base)
		(include "iup-web.scm"))])











(module iup
	()
	(import scheme chicken)
	(reexport
		(except iup-base
			ihandle->pointer pointer->ihandle ihandle-list->pointer-vector
			istatus->integer integer->istatus
			iname->string string->iname
			make-constructor-procedure optional-args)
		iup-controls
		iup-dialogs))







>
>
>
>
>
>
>
>
>
>












139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
 [else
	(module iup-web
		(web-browser)
		(import
		  scheme chicken foreign
			iup-base)
		(include "iup-web.scm"))])

(cond-expand
 [enable-iup-ole
	(module iup-ole
		(ole-control)
		(import
		  scheme chicken foreign
			iup-base)
		(include "iup-ole.scm"))]
 [else])

(module iup
	()
	(import scheme chicken)
	(reexport
		(except iup-base
			ihandle->pointer pointer->ihandle ihandle-list->pointer-vector
			istatus->integer integer->istatus
			iname->string string->iname
			make-constructor-procedure optional-args)
		iup-controls
		iup-dialogs))

Changes to chicken/iup.setup.

33
34
35
36
37
38
39
40





41
42
43
44
45
46
47
..
72
73
74
75
76
77
78
79





80
81
82
83
84
85
86
...
116
117
118
119
120
121
122
123





124
125
126
127
128
129
130
...
153
154
155
156
157
158
159




160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
				'()]
			 [else
				'(-j iup-scintilla)])
		,@(cond-expand
			 [disable-iup-web
				'()]
			 [else
				'(-j iup-web)])))






(define import-libraries
	`("iup.import.so"
		"iup-base.import.so" "iup-controls.import.so" "iup-dialogs.import.so"
		,@(cond-expand
			 [disable-iup-glcanvas
				'()]
................................................................................
				'()]
			 [else
				'("iup-scintilla.import.so")])
		,@(cond-expand
			 [disable-iup-web
				'()]
			 [else
				'("iup-web.import.so")])))






(define native-libraries
	`("-lcallback"
		"-liup" "-liupim" "-liupimglib" "-liupcontrols"
		,@(cond-expand
			 [disable-iup-matrixex
				'()]
................................................................................
				'()]
			 [else
				'("-liup_scintilla")])
		,@(cond-expand
			 [disable-iup-web
				'()]
			 [else
				'("-liupweb")])))






(compile -s -O2 -d1 "iup.scm" ,@modules ,@native-libraries)
(compile -c -O2 -d1 "iup.scm" -unit iup)
(compile -s -O2 -d0 "iup.import.scm")
(compile -s -O2 -d0 "iup-base.import.scm")
(compile -s -O2 -d0 "iup-controls.import.scm")
(compile -s -O2 -d0 "iup-dialogs.import.scm")
................................................................................
 [disable-iup-scintilla]
 [else
	(compile -s -O2 -d0 "iup-scintilla.import.scm")])
(cond-expand
 [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")))







|
>
>
>
>
>







 







|
>
>
>
>
>







 







|
>
>
>
>
>







 







>
>
>
>




|










|

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
...
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
...
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
				'()]
			 [else
				'(-j iup-scintilla)])
		,@(cond-expand
			 [disable-iup-web
				'()]
			 [else
				'(-j iup-web)])
		,@(cond-expand
			 [enable-iup-ole
				'(-j iup-ole)]
			 [else
				'()])))

(define import-libraries
	`("iup.import.so"
		"iup-base.import.so" "iup-controls.import.so" "iup-dialogs.import.so"
		,@(cond-expand
			 [disable-iup-glcanvas
				'()]
................................................................................
				'()]
			 [else
				'("iup-scintilla.import.so")])
		,@(cond-expand
			 [disable-iup-web
				'()]
			 [else
				'("iup-web.import.so")])
		,@(cond-expand
			 [enable-iup-ole
				'("iup-ole.import.so")]
			 [else
				'()])))

(define native-libraries
	`("-lcallback"
		"-liup" "-liupim" "-liupimglib" "-liupcontrols"
		,@(cond-expand
			 [disable-iup-matrixex
				'()]
................................................................................
				'()]
			 [else
				'("-liup_scintilla")])
		,@(cond-expand
			 [disable-iup-web
				'()]
			 [else
				'("-liupweb")])
		,@(cond-expand
			 [enable-iup-ole
				'("-liupole" "-loleaut32" "-luuid")]
			 [else
				'()])))

(compile -s -O2 -d1 "iup.scm" ,@modules ,@native-libraries)
(compile -c -O2 -d1 "iup.scm" -unit iup)
(compile -s -O2 -d0 "iup.import.scm")
(compile -s -O2 -d0 "iup-base.import.scm")
(compile -s -O2 -d0 "iup-controls.import.scm")
(compile -s -O2 -d0 "iup-dialogs.import.scm")
................................................................................
 [disable-iup-scintilla]
 [else
	(compile -s -O2 -d0 "iup-scintilla.import.scm")])
(cond-expand
 [disable-iup-web]
 [else
	(compile -s -O2 -d0 "iup-web.import.scm")])
(cond-expand
 [enable-iup-ole
	(compile -s -O2 -d0 "iup-ole.import.scm")]
 [else])

(install-extension
 'iup
 `("iup.so" "iup.o" "iup-types.scm" ,@import-libraries)
 `((version 1.5.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.5.0)
   (static "iup-dynamic.o")))

Changes to racket/controls.rkt.

163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
    (_fun ([type "HORIZONTAL"]) :: [type : _string/utf-8] -> [handle : _ihandle]))))

;; Library setup
  
(letrec ([open
          (get-ffi-obj
           "IupControlsOpen" libiup-controls
             (_fun -> [status : _istatus]
                   -> (case status
                        [(#t ignore) (void)]
                        [else        (error 'controls "failed to initialize library (~s)" status)])))]
         [matrixex
          (and
           libiup-matrixex
           (get-ffi-obj
            "IupMatrixExOpen" libiup-matrixex
            (_fun -> _void)))])
  (open)







|
|
|
|







163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
    (_fun ([type "HORIZONTAL"]) :: [type : _string/utf-8] -> [handle : _ihandle]))))

;; Library setup
  
(letrec ([open
          (get-ffi-obj
           "IupControlsOpen" libiup-controls
           (_fun -> [status : _istatus]
                 -> (case status
                      [(#t ignore) (void)]
                      [else        (error 'iup "failed to initialize library (~s)" status)])))]
         [matrixex
          (and
           libiup-matrixex
           (get-ffi-obj
            "IupMatrixExOpen" libiup-matrixex
            (_fun -> _void)))])
  (open)

Changes to racket/glcontrols.rkt.

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
  
(letrec ([open
          (get-ffi-obj
           "IupGLControlsOpen" libiup-glcontrols
           (_fun -> [status : _istatus]
                 -> (case status
                      [(#t ignore) (void)]
                      [else        (error 'glcontrols "failed to initialize library (~s)" status)])))])
  (open))

(provide
 (except-out
  (all-from-out "glcanvas.rkt")
  glcanvas)
 glcanvasbox glsubcanvas
 glframe glexpander glscrollbox glsizebox
 glseparator gllabel gllink glbutton gltoggle
 glvaluator glprogress-bar)







|










96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
  
(letrec ([open
          (get-ffi-obj
           "IupGLControlsOpen" libiup-glcontrols
           (_fun -> [status : _istatus]
                 -> (case status
                      [(#t ignore) (void)]
                      [else        (error 'iup "failed to initialize library (~s)" status)])))])
  (open))

(provide
 (except-out
  (all-from-out "glcanvas.rkt")
  glcanvas)
 glcanvasbox glsubcanvas
 glframe glexpander glscrollbox glsizebox
 glseparator gllabel gllink glbutton gltoggle
 glvaluator glprogress-bar)

Changes to racket/info.rkt.

4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
21
22
(define blurb
  '("Bindings to the IUP GUI library"))
(define categories
  '(ui))
(define repositories
  '("4.x"))
(define version
  "1.4.0")
(define release-notes
  '((dl

     (dt "1.4.0") (dd "Various dialogs, controls and extensions")
     (dt "1.3.0") (dd "Additional complex controls")
     (dt "1.2.0") (dd "Additional default dialogs")
     (dt "1.0.1") (dd "Windows linkage tweaks")
     (dt "1.0.0") (dd "Initial release"))))
(define primary-file
  "main.rkt")
(define homepage
  "http://www.chust.org/fossils/iup")







|


>









4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(define blurb
  '("Bindings to the IUP GUI library"))
(define categories
  '(ui))
(define repositories
  '("4.x"))
(define version
  "1.5.0")
(define release-notes
  '((dl
     (dt "1.5.0") (dd "Windows OLE control")
     (dt "1.4.0") (dd "Various dialogs, controls and extensions")
     (dt "1.3.0") (dd "Additional complex controls")
     (dt "1.2.0") (dd "Additional default dialogs")
     (dt "1.0.1") (dd "Windows linkage tweaks")
     (dt "1.0.0") (dd "Initial release"))))
(define primary-file
  "main.rkt")
(define homepage
  "http://www.chust.org/fossils/iup")

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

(define libiup-ole
  (case (system-type 'os)
    [(windows)
     (ffi-lib "iupole")]
    [else
     (ffi-lib "libiupole")]))

;; Windows OLE control

(define ole-control
  (make-constructor-procedure
   (get-ffi-obj
    "IupOleControl" libiup-ole
    (_fun [program-id : _string/utf-8] -> [handle : _ihandle]))))

;; Library setup

(letrec ([open
          (get-ffi-obj
           "IupOleControlOpen" libiup-ole
           (_fun -> [status : _istatus]
                 -> (case status
                      [(#t ignore) (void)]
                      [else        (error 'iup "failed to initialize library (~s)" status)])))])
  (open))

(provide
 ole-control)