IUP

Check-in [7f3a73e037]
Login

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

Overview
Comment:Racket bindings for IUP GL controls
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7f3a73e0379e8668b1172d9414244daa0734c1c4
User & Date: murphy 2015-05-02 15:15:54.334
Context
2015-05-02
15:27
Corrected argument names of IupFrame constructor check-in: f6c7d65538 user: murphy tags: trunk
15:15
Racket bindings for IUP GL controls check-in: 7f3a73e037 user: murphy tags: trunk
14:58
Renamed glcanvas-box to glcanvasbox for consistency check-in: 14510f7985 user: murphy tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Added racket/glcontrols.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
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
#lang racket
(require
 ffi/unsafe
 "base.rkt"
 "glcanvas.rkt")

(define libiup-glcontrols
  (case (system-type 'os)
    [(windows)
     (ffi-lib "iupglcontrols")]
    [else
     (ffi-lib "libiupglcontrols")]))

;; GLCanvasBox and embedded controls

(define glcanvasbox
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLCanvasBoxv" libiup-glcontrols
    (_fun children :: [children : (_list i _ihandle/null) = (append children '(#f))]
          -> [handle : _ihandle]))))

(define glsubcanvas
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLSubCanvas" libiup-glcontrols
    (_fun -> [handle : _ihandle]))))

(define glframe
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLFrame" libiup-glcontrols
    (_fun ([child #f]) :: [child : _ihandle/null] -> [handle : _ihandle]))))

(define glexpander
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLExpander" libiup-glcontrols
    (_fun ([child #f]) :: [child : _ihandle/null] -> [handle : _ihandle]))))

(define glscrollbox
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLScrollBox" libiup-glcontrols
    (_fun ([child #f]) :: [child : _ihandle/null] -> [handle : _ihandle]))))

(define glsizebox
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLSizeBox" libiup-glcontrols
    (_fun ([child #f]) :: [child : _ihandle/null] -> [handle : _ihandle]))))

(define glseparator
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLSeparator" libiup-glcontrols
    (_fun -> [handle : _ihandle]))))

(define gllabel
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLLabel" libiup-glcontrols
    (_fun ([title #f]) :: [title : _string/utf-8] -> [handle : _ihandle]))))

(define gllink
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLLink" libiup-glcontrols
    (_fun ([url #f] [title #f]) :: [url : _string/utf-8] [title : _string/utf-8] -> [handle : _ihandle]))))

(define glbutton
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLButton" libiup-glcontrols
    (_fun ([title #f]) :: [title : _string/utf-8] -> [handle : _ihandle]))))

(define gltoggle
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLToggle" libiup-glcontrols
    (_fun ([title #f]) :: [title : _string/utf-8] -> [handle : _ihandle]))))

(define glvaluator
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLVal" libiup-glcontrols
    (_fun -> [handle : _ihandle]))))

(define glprogress-bar
  (make-constructor-procedure
   (get-ffi-obj
    "IupGLProgressBar" libiup-glcontrols
    (_fun -> [handle : _ihandle]))))

;; Library setup
  
(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)
Changes to racket/info.rkt.
1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
#lang setup/infotab
(define name
  "IUP")
(define blurb
  '("Bindings to the IUP GUI library"))
(define categories
  '(ui))
(define repositories
  '("4.x"))
(define version
  "1.3.0")
(define release-notes
  '((dl

     (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










|


>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#lang setup/infotab
(define name
  "IUP")
(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