Check-in [31b4446932]
Not logged in

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

Overview
Comment:Initial SDL_ttf support
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:31b4446932af419efceb21105df502d91660bdd4
User & Date: ovenpasta@users.noreply.github.com 2018-01-08 17:10:49
Original User & Date: ovenpasta@users.noreply.github.com 2018-01-08 17:10:50
Context
2018-01-08
17:10
SDL_Image added check-in: 0e3c53a30e user: ovenpasta@users.noreply.github.com tags: trunk
17:10
cleanup check-in: 9ec8f1434c user: ovenpasta@users.noreply.github.com tags: trunk
17:10
Initial SDL_ttf support check-in: 31b4446932 user: ovenpasta@users.noreply.github.com tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added sdl2/#base-types.ss#.





















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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


 (define-ftype sdl-bool-t boolean)
 (define-ftype uint8 unsigned-8)
 (define-ftype uint16 unsigned-16)
 (define-ftype sint16 integer-16)
 (define-ftype uint32 unsigned-32)
 (define-ftype sint32 integer-32)
 (define-ftype sint64 integer-64)
 (define-ftype uint64 integer-64)
 (define-ftype size-t uint32)
 (define-ftype va-list void*)
 (define-ftype int% int)
 (define-ftype file (struct))
 
 (define-ftype sdl-iconv-t void*)

 ;; Conditions
 (define-record-type (&sdl2 make-sdl2-condition $sdl2-condition?)
   (parent &condition)
   (fields (immutable status $sdl2-condition-status)))

 (define rtd (record-type-descriptor &sdl2))
 (define sdl2-condition? (condition-predicate rtd))
 (define sdl2-status (condition-accessor rtd $sdl2-condition-status))

Added sdl2/#net-types.ss#.



































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
;;
;; Copyright 2016 Aldo Nicolas Bruno
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;;     http://www.apache.org/licenses/LICENSE-2.0
;;
;; Unless required by applicable law or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.

(define-ftype ip-address
  (struct 
   (host uint32)
   (port uint16)))

(define-ftype udp-packet
  (struct 
   (channel int)
   (data uint8)
   (len int)
   (maxlen int)
   (status int)
   (address ip-address)))

(define-ftype udp-socket void*)
(define-ftype tcp-socket void*)

(define-syntax INADDR_ANY (identifier-syntax 0))
(define-syntax INADDR_NONE (identifier-syntax #xffffffff))
(define-syntax INADDR_BROADCAST (identifier-syntax #xffffffff))
(define-syntax INADDR_LOOPBACK (identifier-syntax #x7f000001))

(define-ftype sdl-net-version-t
  (struct 
   (major uint8)
   (minor uint8)
   (patch uint8)))

(define-ftype sdl-net-socket-set-t void*)

(define-ftype sdl-net-generic-socket 
  (struct
   (ready int)))
(define-ftype sdl-net-generic-socket-t void*)

Added sdl2/#ttf-function.ss#.



































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
(define-sdl-func (* sdl-surface-t) sttf-render-text-solid ((font (* ttf-font)) (text string) (fg (* sdl-color-t))) "STTF_RenderText_Solid")
(define-sdl-func (* sdl-surface-t) sttf-render-ut-f8-solid ((font (* ttf-font)) (text string) (fg (* sdl-color-t))) "STTF_RenderUTF8_Solid")
(define-sdl-func (* sdl-surface-t) sttf-render-unicode-solid ((font (* ttf-font)) (text (* uint16)) (fg (* sdl-color-t))) "STTF_RenderUNICODE_Solid")
(define-sdl-func (* sdl-surface-t) sttf-render-glyph-solid ((font (* ttf-font)) (ch uint16) (fg (* sdl-color-t))) "STTF_RenderGlyph_Solid")
(define-sdl-func (* sdl-surface-t) sttf-render-text-shaded ((font (* ttf-font)) (text string) (fg (* sdl-color-t)) (bg (* sdl-color-t))) "STTF_RenderText_Shaded")
(define-sdl-func (* sdl-surface-t) sttf-render-ut-f8-shaded ((font (* ttf-font)) (text string) (fg (* sdl-color-t)) (bg (* sdl-color-t))) "STTF_RenderUTF8_Shaded")
(define-sdl-func (* sdl-surface-t) sttf-render-unicode-shaded ((font (* ttf-font)) (text (* uint16)) (fg (* sdl-color-t)) (bg (* sdl-color-t))) "STTF_RenderUNICODE_Shaded")
(define-sdl-func (* sdl-surface-t) sttf-render-glyph-shaded ((font (* ttf-font)) (ch uint16) (fg (* sdl-color-t)) (bg (* sdl-color-t))) "STTF_RenderGlyph_Shaded")
(define-sdl-func (* sdl-surface-t) sttf-render-text-blended ((font (* ttf-font)) (text string) (fg (* sdl-color-t))) "STTF_RenderText_Blended")
(define-sdl-func (* sdl-surface-t) sttf-render-ut-f8-blended ((font (* ttf-font)) (text string) (fg (* sdl-color-t))) "STTF_RenderUTF8_Blended")
(define-sdl-func (* sdl-surface-t) sttf-render-unicode-blended ((font (* ttf-font)) (text (* uint16)) (fg (* sdl-color-t))) "STTF_RenderUNICODE_Blended")
(define-sdl-func (* sdl-surface-t) sttf-render-text-blended-wrapped ((font (* ttf-font)) (text string) (fg (* sdl-color-t)) (wrapLength uint32)) "STTF_RenderText_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) sttf-render-ut-f8-blended-wrapped ((font (* ttf-font)) (text string) (fg (* sdl-color-t)) (wrapLength uint32)) "STTF_RenderUTF8_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) sttf-render-unicode-blended-wrapped ((font (* ttf-font)) (text (* uint16)) (fg (* sdl-color-t)) (wrapLength uint32)) "STTF_RenderUNICODE_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) sttf-render-glyph-blended ((font (* ttf-font)) (ch uint16) (fg (* sdl-color-t))) "STTF_RenderGlyph_Blended")
(define-sdl-func (* sdl-version-t) ttf-linked-version () "TTF_Linked_Version")
(define-sdl-func void ttf-byte-swapped-unicode ((swapped int)) "TTF_ByteSwappedUNICODE")
(define-sdl-func int ttf-init () "TTF_Init")
(define-sdl-func (* ttf-font) ttf-open-font ((file string) (ptsize int)) "TTF_OpenFont")
(define-sdl-func (* ttf-font) ttf-open-font-index ((file string) (ptsize int) (index long)) "TTF_OpenFontIndex")
(define-sdl-func (* ttf-font) ttf-open-font-rw ((src (* sdl-rw-ops-t)) (freesrc int) (ptsize int)) "TTF_OpenFontRW")
(define-sdl-func (* ttf-font) ttf-open-font-index-rw ((src (* sdl-rw-ops-t)) (freesrc int) (ptsize int) (index long)) "TTF_OpenFontIndexRW")
(define-sdl-func int ttf-get-font-style ((font (* ttf-font))) "TTF_GetFontStyle")
(define-sdl-func void ttf-set-font-style ((font (* ttf-font)) (style int)) "TTF_SetFontStyle")
(define-sdl-func int ttf-get-font-outline ((font (* ttf-font))) "TTF_GetFontOutline")
(define-sdl-func void ttf-set-font-outline ((font (* ttf-font)) (outline int)) "TTF_SetFontOutline")
(define-sdl-func int ttf-get-font-hinting ((font (* ttf-font))) "TTF_GetFontHinting")
(define-sdl-func void ttf-set-font-hinting ((font (* ttf-font)) (hinting int)) "TTF_SetFontHinting")
(define-sdl-func int ttf-font-height ((font (* ttf-font))) "TTF_FontHeight")
(define-sdl-func int ttf-font-ascent ((font (* ttf-font))) "TTF_FontAscent")
(define-sdl-func int ttf-font-descent ((font (* ttf-font))) "TTF_FontDescent")
(define-sdl-func int ttf-font-line-skip ((font (* ttf-font))) "TTF_FontLineSkip")
(define-sdl-func int ttf-get-font-kerning ((font (* ttf-font))) "TTF_GetFontKerning")
(define-sdl-func void ttf-set-font-kerning ((font (* ttf-font)) (allowed int)) "TTF_SetFontKerning")
(define-sdl-func long ttf-font-faces ((font (* ttf-font))) "TTF_FontFaces")
(define-sdl-func int ttf-font-face-is-fixed-width ((font (* ttf-font))) "TTF_FontFaceIsFixedWidth")
(define-sdl-func string ttf-font-face-family-name ((font (* ttf-font))) "TTF_FontFaceFamilyName")
(define-sdl-func string ttf-font-face-style-name ((font (* ttf-font))) "TTF_FontFaceStyleName")
(define-sdl-func int ttf-glyph-is-provided ((font (* ttf-font)) (ch uint16)) "TTF_GlyphIsProvided")
(define-sdl-func int ttf-glyph-metrics ((font (* ttf-font)) (ch uint16) (minx (* int)) (maxx (* int)) (miny (* int)) (maxy (* int)) (advance (* int))) "TTF_GlyphMetrics")
(define-sdl-func int ttf-size-text ((font (* ttf-font)) (text string) (w (* int)) (h (* int))) "TTF_SizeText")
(define-sdl-func int ttf-size-ut-f8 ((font (* ttf-font)) (text string) (w (* int)) (h (* int))) "TTF_SizeUTF8")
(define-sdl-func int ttf-size-unicode ((font (* ttf-font)) (text (* uint16)) (w (* int)) (h (* int))) "TTF_SizeUNICODE")
(define-sdl-func void ttf-close-font ((font (* ttf-font))) "TTF_CloseFont")
(define-sdl-func void ttf-quit () "TTF_Quit")
(define-sdl-func int ttf-was-init () "TTF_WasInit")
(define-sdl-func int ttf-get-font-kerning-size ((font (* ttf-font)) (prev_index int) (index int)) "TTF_GetFontKerningSize")
(define-sdl-func int ttf-get-font-kerning-size-glyphs ((font (* ttf-font)) (previous_ch uint16) (ch uint16)) "TTF_GetFontKerningSizeGlyphs")

Added sdl2/#ttf-shim.h#.











>
>
>
>
>
1
2
3
4
5
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL.h>

extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderText_Blended_Wrapped_S(TTF_Font *font, const char *text, SDL_Color *fg, Uint32 wraplength);

Added sdl2/image-types.ss~.













>
>
>
>
>
>
1
2
3
4
5
6

(define-ftype sdl-version-t
  (struct
      (major uint8)
    (minor uint8)
    (patch uint8)))

Added sdl2/image.sls~.













































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!r6rs

(library
    (sdl2 image)
  (export
   img-init
   sdl-image-library-init)

  (import (chezscheme) 
	  (ffi-utils)
	  (sdl2)
	  (only (srfi s1 lists) fold)
	  (only (thunder-utils) string-replace string-split) 
	  (only (srfi s13 strings) string-delete string-suffix? string-prefix?)
	  (srfi s14 char-sets))
  (include "image-functions.ss")
  (include "image-types.ss")
  (define (sdl-image-library-init . l)
    (load-shared-object (if (null? l) "libSDL2_image.so" l))))



Changes to sdl2/parse-sdl-json.ss.

110
111
112
113
114
115
116
117


118
119
120
121
122
123
124
...
177
178
179
180
181
182
183































(define (parse-json-function x m)
  (let-json-object x (tag name location return-type parameters) 
		   (if (and (or (string-contains location m) 
				(and (equal? "sdl" m) (string-contains location "SDL.h")))
			    (equal? tag "function")
			    (or (string-prefix? "SDL_" name)
				(string-prefix? "SDLNet_" name)
				(string-prefix? "IMG_" name)))


		       (cond
			[(memq (string->symbol (anti-camel name)) blacklist)
			 (printf ";;blacklisted probably because it uses a struct as value.\n(define ~d #f)\n" (anti-camel name))]
			[else
			   (printf "(define-sdl-func ~d ~d ~d \"~d\")\n"
				   (decode-type return-type) 
				   (case name
................................................................................
	    (with-output-to-file (string-append m "-functions.ss")
	      (lambda ()
		  (vector-for-each
		   (lambda (x)
		     (parse-json-function x m))
		   sdlimage-json))
	      'truncate)) '("image"))






































|
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
...
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
(define (parse-json-function x m)
  (let-json-object x (tag name location return-type parameters) 
		   (if (and (or (string-contains location m) 
				(and (equal? "sdl" m) (string-contains location "SDL.h")))
			    (equal? tag "function")
			    (or (string-prefix? "SDL_" name)
				(string-prefix? "SDLNet_" name)
				(string-prefix? "IMG_" name)
				(string-prefix? "STTF_" name)
				(string-prefix? "TTF_" name)))
		       (cond
			[(memq (string->symbol (anti-camel name)) blacklist)
			 (printf ";;blacklisted probably because it uses a struct as value.\n(define ~d #f)\n" (anti-camel name))]
			[else
			   (printf "(define-sdl-func ~d ~d ~d \"~d\")\n"
				   (decode-type return-type) 
				   (case name
................................................................................
	    (with-output-to-file (string-append m "-functions.ss")
	      (lambda ()
		  (vector-for-each
		   (lambda (x)
		     (parse-json-function x m))
		   sdlimage-json))
	      'truncate)) '("image"))


(define sdlttfs-json-text (read-file "ttf-shim.json"))
(define sdlttfs-json (string->json sdlttfs-json-text))

(with-output-to-file "ttf-shim.sexp" (lambda () (pretty-print sdlttfs-json))
		     'truncate)

(for-each (lambda (m)
	    (with-output-to-file (string-append m "-functions.ss")
	      (lambda ()
		  (vector-for-each
		   (lambda (x)
		     (parse-json-function x m))
		   sdlttfs-json))
	      'truncate)) '("sttf"))

(define sdlttf-json-text (read-file "sdl2-ttf.json"))
(define sdlttf-json (string->json sdlttf-json-text))

(with-output-to-file "sdl2-ttf-real.sexp" (lambda () (pretty-print sdlttf-json))
		     'truncate)

(for-each (lambda (m)
	    (with-output-to-file (string-append m "-functions.ss")
	      (lambda ()
		  (vector-for-each
		   (lambda (x)
		     (parse-json-function x m))
		   sdlttf-json))
	      'truncate)) '("ttf"))

Added sdl2/sdl2-ttf-real.sexp.

more than 10,000 changes

Added sdl2/sdl2-ttf.json.

cannot compute difference between binary files

Added sdl2/ttf-function.ss~.































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(define-sdl-func (* sdl-surface-t) sttf-render-text-solid ((font (* ttf-font)) (text string) (fg (* sdl-color-t))) "STTF_RenderText_Solid")
(define-sdl-func (* sdl-surface-t) sttf-render-ut-f8-solid ((font (* ttf-font)) (text string) (fg (* sdl-color-t))) "STTF_RenderUTF8_Solid")
(define-sdl-func (* sdl-surface-t) sttf-render-unicode-solid ((font (* ttf-font)) (text (* uint16)) (fg (* sdl-color-t))) "STTF_RenderUNICODE_Solid")
(define-sdl-func (* sdl-surface-t) sttf-render-glyph-solid ((font (* ttf-font)) (ch uint16) (fg (* sdl-color-t))) "STTF_RenderGlyph_Solid")
(define-sdl-func (* sdl-surface-t) sttf-render-text-shaded ((font (* ttf-font)) (text string) (fg (* sdl-color-t)) (bg (* sdl-color-t))) "STTF_RenderText_Shaded")
(define-sdl-func (* sdl-surface-t) sttf-render-ut-f8-shaded ((font (* ttf-font)) (text string) (fg (* sdl-color-t)) (bg (* sdl-color-t))) "STTF_RenderUTF8_Shaded")
(define-sdl-func (* sdl-surface-t) sttf-render-unicode-shaded ((font (* ttf-font)) (text (* uint16)) (fg (* sdl-color-t)) (bg (* sdl-color-t))) "STTF_RenderUNICODE_Shaded")
(define-sdl-func (* sdl-surface-t) sttf-render-glyph-shaded ((font (* ttf-font)) (ch uint16) (fg (* sdl-color-t)) (bg (* sdl-color-t))) "STTF_RenderGlyph_Shaded")
(define-sdl-func (* sdl-surface-t) sttf-render-text-blended ((font (* ttf-font)) (text string) (fg (* sdl-color-t))) "STTF_RenderText_Blended")
(define-sdl-func (* sdl-surface-t) sttf-render-ut-f8-blended ((font (* ttf-font)) (text string) (fg (* sdl-color-t))) "STTF_RenderUTF8_Blended")
(define-sdl-func (* sdl-surface-t) sttf-render-unicode-blended ((font (* ttf-font)) (text (* uint16)) (fg (* sdl-color-t))) "STTF_RenderUNICODE_Blended")
(define-sdl-func (* sdl-surface-t) sttf-render-text-blended-wrapped ((font (* ttf-font)) (text string) (fg (* sdl-color-t)) (wrapLength uint32)) "STTF_RenderText_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) sttf-render-ut-f8-blended-wrapped ((font (* ttf-font)) (text string) (fg (* sdl-color-t)) (wrapLength uint32)) "STTF_RenderUTF8_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) sttf-render-unicode-blended-wrapped ((font (* ttf-font)) (text (* uint16)) (fg (* sdl-color-t)) (wrapLength uint32)) "STTF_RenderUNICODE_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) sttf-render-glyph-blended ((font (* ttf-font)) (ch uint16) (fg (* sdl-color-t))) "STTF_RenderGlyph_Blended")

Added sdl2/ttf-functions.ss.

































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
(define-sdl-func (* sdl-version-t) ttf-linked-version () "TTF_Linked_Version")
(define-sdl-func void ttf-byte-swapped-unicode ((swapped int)) "TTF_ByteSwappedUNICODE")
(define-sdl-func int ttf-init () "TTF_Init")
(define-sdl-func (* ttf-font) ttf-open-font ((file string) (ptsize int)) "TTF_OpenFont")
(define-sdl-func (* ttf-font) ttf-open-font-index ((file string) (ptsize int) (index long)) "TTF_OpenFontIndex")
(define-sdl-func (* ttf-font) ttf-open-font-rw ((src (* sdl-rw-ops-t)) (freesrc int) (ptsize int)) "TTF_OpenFontRW")
(define-sdl-func (* ttf-font) ttf-open-font-index-rw ((src (* sdl-rw-ops-t)) (freesrc int) (ptsize int) (index long)) "TTF_OpenFontIndexRW")
(define-sdl-func int ttf-get-font-style ((font (* ttf-font))) "TTF_GetFontStyle")
(define-sdl-func void ttf-set-font-style ((font (* ttf-font)) (style int)) "TTF_SetFontStyle")
(define-sdl-func int ttf-get-font-outline ((font (* ttf-font))) "TTF_GetFontOutline")
(define-sdl-func void ttf-set-font-outline ((font (* ttf-font)) (outline int)) "TTF_SetFontOutline")
(define-sdl-func int ttf-get-font-hinting ((font (* ttf-font))) "TTF_GetFontHinting")
(define-sdl-func void ttf-set-font-hinting ((font (* ttf-font)) (hinting int)) "TTF_SetFontHinting")
(define-sdl-func int ttf-font-height ((font (* ttf-font))) "TTF_FontHeight")
(define-sdl-func int ttf-font-ascent ((font (* ttf-font))) "TTF_FontAscent")
(define-sdl-func int ttf-font-descent ((font (* ttf-font))) "TTF_FontDescent")
(define-sdl-func int ttf-font-line-skip ((font (* ttf-font))) "TTF_FontLineSkip")
(define-sdl-func int ttf-get-font-kerning ((font (* ttf-font))) "TTF_GetFontKerning")
(define-sdl-func void ttf-set-font-kerning ((font (* ttf-font)) (allowed int)) "TTF_SetFontKerning")
(define-sdl-func long ttf-font-faces ((font (* ttf-font))) "TTF_FontFaces")
(define-sdl-func int ttf-font-face-is-fixed-width ((font (* ttf-font))) "TTF_FontFaceIsFixedWidth")
(define-sdl-func string ttf-font-face-family-name ((font (* ttf-font))) "TTF_FontFaceFamilyName")
(define-sdl-func string ttf-font-face-style-name ((font (* ttf-font))) "TTF_FontFaceStyleName")
(define-sdl-func int ttf-glyph-is-provided ((font (* ttf-font)) (ch uint16)) "TTF_GlyphIsProvided")
(define-sdl-func int ttf-glyph-metrics ((font (* ttf-font)) (ch uint16) (minx (* int)) (maxx (* int)) (miny (* int)) (maxy (* int)) (advance (* int))) "TTF_GlyphMetrics")
(define-sdl-func int ttf-size-text ((font (* ttf-font)) (text string) (w (* int)) (h (* int))) "TTF_SizeText")
(define-sdl-func int ttf-size-ut-f8 ((font (* ttf-font)) (text string) (w (* int)) (h (* int))) "TTF_SizeUTF8")
(define-sdl-func int ttf-size-unicode ((font (* ttf-font)) (text (* uint16)) (w (* int)) (h (* int))) "TTF_SizeUNICODE")
(define-sdl-func (* sdl-surface-t) ttf-render-text-solid ((font (* ttf-font)) (text string) (fg int)) "TTF_RenderText_Solid")
(define-sdl-func (* sdl-surface-t) ttf-render-ut-f8-solid ((font (* ttf-font)) (text string) (fg int)) "TTF_RenderUTF8_Solid")
(define-sdl-func (* sdl-surface-t) ttf-render-unicode-solid ((font (* ttf-font)) (text (* uint16)) (fg int)) "TTF_RenderUNICODE_Solid")
(define-sdl-func (* sdl-surface-t) ttf-render-glyph-solid ((font (* ttf-font)) (ch uint16) (fg int)) "TTF_RenderGlyph_Solid")
(define-sdl-func (* sdl-surface-t) ttf-render-text-shaded ((font (* ttf-font)) (text string) (fg int) (bg int)) "TTF_RenderText_Shaded")
(define-sdl-func (* sdl-surface-t) ttf-render-ut-f8-shaded ((font (* ttf-font)) (text string) (fg int) (bg int)) "TTF_RenderUTF8_Shaded")
(define-sdl-func (* sdl-surface-t) ttf-render-unicode-shaded ((font (* ttf-font)) (text (* uint16)) (fg int) (bg int)) "TTF_RenderUNICODE_Shaded")
(define-sdl-func (* sdl-surface-t) ttf-render-glyph-shaded ((font (* ttf-font)) (ch uint16) (fg int) (bg int)) "TTF_RenderGlyph_Shaded")
(define-sdl-func (* sdl-surface-t) ttf-render-text-blended ((font (* ttf-font)) (text string) (fg int)) "TTF_RenderText_Blended")
(define-sdl-func (* sdl-surface-t) ttf-render-ut-f8-blended ((font (* ttf-font)) (text string) (fg int)) "TTF_RenderUTF8_Blended")
(define-sdl-func (* sdl-surface-t) ttf-render-unicode-blended ((font (* ttf-font)) (text (* uint16)) (fg int)) "TTF_RenderUNICODE_Blended")
(define-sdl-func (* sdl-surface-t) ttf-render-text-blended-wrapped ((font (* ttf-font)) (text string) (fg int) (wrapLength uint32)) "TTF_RenderText_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) ttf-render-ut-f8-blended-wrapped ((font (* ttf-font)) (text string) (fg int) (wrapLength uint32)) "TTF_RenderUTF8_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) ttf-render-unicode-blended-wrapped ((font (* ttf-font)) (text (* uint16)) (fg int) (wrapLength uint32)) "TTF_RenderUNICODE_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) ttf-render-glyph-blended ((font (* ttf-font)) (ch uint16) (fg int)) "TTF_RenderGlyph_Blended")
(define-sdl-func void ttf-close-font ((font (* ttf-font))) "TTF_CloseFont")
(define-sdl-func void ttf-quit () "TTF_Quit")
(define-sdl-func int ttf-was-init () "TTF_WasInit")
(define-sdl-func int ttf-get-font-kerning-size ((font (* ttf-font)) (prev_index int) (index int)) "TTF_GetFontKerningSize")
(define-sdl-func int ttf-get-font-kerning-size-glyphs ((font (* ttf-font)) (previous_ch uint16) (ch uint16)) "TTF_GetFontKerningSizeGlyphs")

Added sdl2/ttf-functions.ss~.

































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
(define-sdl-func (* sdl-version-t) ttf-linked-version () "TTF_Linked_Version")
(define-sdl-func void ttf-byte-swapped-unicode ((swapped int)) "TTF_ByteSwappedUNICODE")
(define-sdl-func int ttf-init () "TTF_Init")
(define-sdl-func (* ttf-font) ttf-open-font ((file string) (ptsize int)) "TTF_OpenFont")
(define-sdl-func (* ttf-font) ttf-open-font-index ((file string) (ptsize int) (index long)) "TTF_OpenFontIndex")
(define-sdl-func (* ttf-font) ttf-open-font-rw ((src (* sdl-rw-ops-t)) (freesrc int) (ptsize int)) "TTF_OpenFontRW")
(define-sdl-func (* ttf-font) ttf-open-font-index-rw ((src (* sdl-rw-ops-t)) (freesrc int) (ptsize int) (index long)) "TTF_OpenFontIndexRW")
(define-sdl-func int ttf-get-font-style ((font (* ttf-font))) "TTF_GetFontStyle")
(define-sdl-func void ttf-set-font-style ((font (* ttf-font)) (style int)) "TTF_SetFontStyle")
(define-sdl-func int ttf-get-font-outline ((font (* ttf-font))) "TTF_GetFontOutline")
(define-sdl-func void ttf-set-font-outline ((font (* ttf-font)) (outline int)) "TTF_SetFontOutline")
(define-sdl-func int ttf-get-font-hinting ((font (* ttf-font))) "TTF_GetFontHinting")
(define-sdl-func void ttf-set-font-hinting ((font (* ttf-font)) (hinting int)) "TTF_SetFontHinting")
(define-sdl-func int ttf-font-height ((font (* ttf-font))) "TTF_FontHeight")
(define-sdl-func int ttf-font-ascent ((font (* ttf-font))) "TTF_FontAscent")
(define-sdl-func int ttf-font-descent ((font (* ttf-font))) "TTF_FontDescent")
(define-sdl-func int ttf-font-line-skip ((font (* ttf-font))) "TTF_FontLineSkip")
(define-sdl-func int ttf-get-font-kerning ((font (* ttf-font))) "TTF_GetFontKerning")
(define-sdl-func void ttf-set-font-kerning ((font (* ttf-font)) (allowed int)) "TTF_SetFontKerning")
(define-sdl-func long ttf-font-faces ((font (* ttf-font))) "TTF_FontFaces")
(define-sdl-func int ttf-font-face-is-fixed-width ((font (* ttf-font))) "TTF_FontFaceIsFixedWidth")
(define-sdl-func string ttf-font-face-family-name ((font (* ttf-font))) "TTF_FontFaceFamilyName")
(define-sdl-func string ttf-font-face-style-name ((font (* ttf-font))) "TTF_FontFaceStyleName")
(define-sdl-func int ttf-glyph-is-provided ((font (* ttf-font)) (ch uint16)) "TTF_GlyphIsProvided")
(define-sdl-func int ttf-glyph-metrics ((font (* ttf-font)) (ch uint16) (minx (* int)) (maxx (* int)) (miny (* int)) (maxy (* int)) (advance (* int))) "TTF_GlyphMetrics")
(define-sdl-func int ttf-size-text ((font (* ttf-font)) (text string) (w (* int)) (h (* int))) "TTF_SizeText")
(define-sdl-func int ttf-size-ut-f8 ((font (* ttf-font)) (text string) (w (* int)) (h (* int))) "TTF_SizeUTF8")
(define-sdl-func int ttf-size-unicode ((font (* ttf-font)) (text (* uint16)) (w (* int)) (h (* int))) "TTF_SizeUNICODE")
(define-sdl-func (* sdl-surface-t) ttf-render-text-solid ((font (* ttf-font)) (text string) (fg sdl-color-t)) "TTF_RenderText_Solid")
(define-sdl-func (* sdl-surface-t) ttf-render-ut-f8-solid ((font (* ttf-font)) (text string) (fg sdl-color-t)) "TTF_RenderUTF8_Solid")
(define-sdl-func (* sdl-surface-t) ttf-render-unicode-solid ((font (* ttf-font)) (text (* uint16)) (fg sdl-color-t)) "TTF_RenderUNICODE_Solid")
(define-sdl-func (* sdl-surface-t) ttf-render-glyph-solid ((font (* ttf-font)) (ch uint16) (fg sdl-color-t)) "TTF_RenderGlyph_Solid")
(define-sdl-func (* sdl-surface-t) ttf-render-text-shaded ((font (* ttf-font)) (text string) (fg sdl-color-t) (bg sdl-color-t)) "TTF_RenderText_Shaded")
(define-sdl-func (* sdl-surface-t) ttf-render-ut-f8-shaded ((font (* ttf-font)) (text string) (fg sdl-color-t) (bg sdl-color-t)) "TTF_RenderUTF8_Shaded")
(define-sdl-func (* sdl-surface-t) ttf-render-unicode-shaded ((font (* ttf-font)) (text (* uint16)) (fg sdl-color-t) (bg sdl-color-t)) "TTF_RenderUNICODE_Shaded")
(define-sdl-func (* sdl-surface-t) ttf-render-glyph-shaded ((font (* ttf-font)) (ch uint16) (fg sdl-color-t) (bg sdl-color-t)) "TTF_RenderGlyph_Shaded")
(define-sdl-func (* sdl-surface-t) ttf-render-text-blended ((font (* ttf-font)) (text string) (fg sdl-color-t)) "TTF_RenderText_Blended")
(define-sdl-func (* sdl-surface-t) ttf-render-ut-f8-blended ((font (* ttf-font)) (text string) (fg sdl-color-t)) "TTF_RenderUTF8_Blended")
(define-sdl-func (* sdl-surface-t) ttf-render-unicode-blended ((font (* ttf-font)) (text (* uint16)) (fg sdl-color-t)) "TTF_RenderUNICODE_Blended")
(define-sdl-func (* sdl-surface-t) ttf-render-text-blended-wrapped ((font (* ttf-font)) (text string) (fg sdl-color-t) (wrapLength uint32)) "TTF_RenderText_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) ttf-render-ut-f8-blended-wrapped ((font (* ttf-font)) (text string) (fg sdl-color-t) (wrapLength uint32)) "TTF_RenderUTF8_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) ttf-render-unicode-blended-wrapped ((font (* ttf-font)) (text (* uint16)) (fg sdl-color-t) (wrapLength uint32)) "TTF_RenderUNICODE_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) ttf-render-glyph-blended ((font (* ttf-font)) (ch uint16) (fg sdl-color-t)) "TTF_RenderGlyph_Blended")
(define-sdl-func void ttf-close-font ((font (* ttf-font))) "TTF_CloseFont")
(define-sdl-func void ttf-quit () "TTF_Quit")
(define-sdl-func int ttf-was-init () "TTF_WasInit")
(define-sdl-func int ttf-get-font-kerning-size ((font (* ttf-font)) (prev_index int) (index int)) "TTF_GetFontKerningSize")
(define-sdl-func int ttf-get-font-kerning-size-glyphs ((font (* ttf-font)) (previous_ch uint16) (ch uint16)) "TTF_GetFontKerningSizeGlyphs")

Added sdl2/ttf-shim-functions.ss.

































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(define-sdl-func (* sdl-surface-t) sttf-render-text-solid ((font (* ttf-font)) (text string) (fg (* sdl-color-t))) "STTF_RenderText_Solid")
(define-sdl-func (* sdl-surface-t) sttf-render-ut-f8-solid ((font (* ttf-font)) (text string) (fg (* sdl-color-t))) "STTF_RenderUTF8_Solid")
(define-sdl-func (* sdl-surface-t) sttf-render-unicode-solid ((font (* ttf-font)) (text (* uint16)) (fg (* sdl-color-t))) "STTF_RenderUNICODE_Solid")
(define-sdl-func (* sdl-surface-t) sttf-render-glyph-solid ((font (* ttf-font)) (ch uint16) (fg (* sdl-color-t))) "STTF_RenderGlyph_Solid")
(define-sdl-func (* sdl-surface-t) sttf-render-text-shaded ((font (* ttf-font)) (text string) (fg (* sdl-color-t)) (bg (* sdl-color-t))) "STTF_RenderText_Shaded")
(define-sdl-func (* sdl-surface-t) sttf-render-ut-f8-shaded ((font (* ttf-font)) (text string) (fg (* sdl-color-t)) (bg (* sdl-color-t))) "STTF_RenderUTF8_Shaded")
(define-sdl-func (* sdl-surface-t) sttf-render-unicode-shaded ((font (* ttf-font)) (text (* uint16)) (fg (* sdl-color-t)) (bg (* sdl-color-t))) "STTF_RenderUNICODE_Shaded")
(define-sdl-func (* sdl-surface-t) sttf-render-glyph-shaded ((font (* ttf-font)) (ch uint16) (fg (* sdl-color-t)) (bg (* sdl-color-t))) "STTF_RenderGlyph_Shaded")
(define-sdl-func (* sdl-surface-t) sttf-render-text-blended ((font (* ttf-font)) (text string) (fg (* sdl-color-t))) "STTF_RenderText_Blended")
(define-sdl-func (* sdl-surface-t) sttf-render-ut-f8-blended ((font (* ttf-font)) (text string) (fg (* sdl-color-t))) "STTF_RenderUTF8_Blended")
(define-sdl-func (* sdl-surface-t) sttf-render-unicode-blended ((font (* ttf-font)) (text (* uint16)) (fg (* sdl-color-t))) "STTF_RenderUNICODE_Blended")
(define-sdl-func (* sdl-surface-t) sttf-render-text-blended-wrapped ((font (* ttf-font)) (text string) (fg (* sdl-color-t)) (wrapLength uint32)) "STTF_RenderText_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) sttf-render-ut-f8-blended-wrapped ((font (* ttf-font)) (text string) (fg (* sdl-color-t)) (wrapLength uint32)) "STTF_RenderUTF8_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) sttf-render-unicode-blended-wrapped ((font (* ttf-font)) (text (* uint16)) (fg (* sdl-color-t)) (wrapLength uint32)) "STTF_RenderUNICODE_Blended_Wrapped")
(define-sdl-func (* sdl-surface-t) sttf-render-glyph-blended ((font (* ttf-font)) (ch uint16) (fg (* sdl-color-t))) "STTF_RenderGlyph_Blended")

Added sdl2/ttf-shim.c~.









>
>
>
>
1
2
3
4
SDL_Surface *TTF_RenderText_Blended_Wrapped-S(TTF_Font *font, const char *text, SDL_Color fg, Uint32 wrapLength) {
  SDL_Surface *rtnSurface = RenderText_Blended_Wrapped(font, text, *fg, wrapLength);
  return *rtnSurface;
}

Added sdl2/ttf-shim.h~.









>
>
>
>
1
2
3
4
#include <SDL_ttf.h>

extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderText_Blended_Wrapped-S(TTF_Font *font, const char *text, SDL_Color *fg, Uint32 wraplength);

Added sdl2/ttf-shim.json.

cannot compute difference between binary files

Added sdl2/ttf-shim.sexp.

more than 10,000 changes

Added sdl2/ttf-shim/ttf-shim.c.























































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#include "ttf-shim.h"
#include <SDL2/SDL_ttf.h>

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderText_Solid(TTF_Font *font,
							    const char *text, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderText_Solid(font, text, *fg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUTF8_Solid(TTF_Font *font,
							    const char *text, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderUTF8_Solid(font, text, *fg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUNICODE_Solid(TTF_Font *font,
							       const Uint16 *text, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderUNICODE_Solid(font, text, *fg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderGlyph_Solid(TTF_Font *font,
							     Uint16 ch, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderGlyph_Solid(font, ch, *fg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderText_Shaded(TTF_Font *font,
							     const char *text, SDL_Color *fg, SDL_Color *bg){
  SDL_Surface * rtnSurf = TTF_RenderText_Shaded(font, text, *fg, *bg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUTF8_Shaded(TTF_Font *font,
							     const char *text, SDL_Color *fg, SDL_Color *bg){
  SDL_Surface * rtnSurf = TTF_RenderUTF8_Shaded(font, text, *fg, *bg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUNICODE_Shaded(TTF_Font *font,
								const Uint16 *text, SDL_Color *fg, SDL_Color *bg){
  SDL_Surface * rtnSurf = TTF_RenderUNICODE_Shaded(font, text, *fg, *bg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderGlyph_Shaded(TTF_Font *font,
							      Uint16 ch, SDL_Color *fg, SDL_Color *bg){
  SDL_Surface * rtnSurf = TTF_RenderGlyph_Shaded(font, ch, *fg, *bg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderText_Blended(TTF_Font *font,
							      const char *text, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderText_Blended(font, text, *fg);
  return rtnSurf;
}  
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUTF8_Blended(TTF_Font *font,
							      const char *text, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderUTF8_Blended(font, text, *fg);
  return rtnSurf;
}
 
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUNICODE_Blended(TTF_Font *font,
								 const Uint16 *text, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderUNICODE_Blended(font, text, *fg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderText_Blended_Wrapped(TTF_Font *font,
								      const char *text, SDL_Color *fg, Uint32 wrapLength){
  SDL_Surface * rtnSurf = TTF_RenderText_Blended_Wrapped(font, text, *fg, wrapLength);
  return rtnSurf;
}
 
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUTF8_Blended_Wrapped(TTF_Font *font,
								      const char *text, SDL_Color *fg, Uint32 wrapLength){
  SDL_Surface * rtnSurf = TTF_RenderUTF8_Blended_Wrapped(font, text, *fg, wrapLength);
  return rtnSurf;
}
 
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUNICODE_Blended_Wrapped(TTF_Font *font,
									 const Uint16 *text, SDL_Color *fg, Uint32 wrapLength){
  SDL_Surface * rtnSurf = TTF_RenderUNICODE_Blended_Wrapped(font, text, *fg, wrapLength);
  return rtnSurf;
}
 
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderGlyph_Blended(TTF_Font *font,
							       Uint16 ch, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderGlyph_Blended(font, ch, *fg);
  return rtnSurf;
}

Added sdl2/ttf-shim/ttf-shim.c~.





















































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#include "ttf-shim.h"

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderText_Solid(TTF_Font *font,
							    const char *text, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderText_Solid(font, text, *fg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUTF8_Solid(TTF_Font *font,
							    const char *text, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderUTF8_Solid(font, text, *fg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUNICODE_Solid(TTF_Font *font,
							       const Uint16 *text, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderUNICODE_Solid(font, text, *fg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderGlyph_Solid(TTF_Font *font,
							     Uint16 ch, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderGlyph_Solid(font, ch, *fg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderText_Shaded(TTF_Font *font,
							     const char *text, SDL_Color *fg, SDL_Color *bg){
  SDL_Surface * rtnSurf = TTF_RenderText_Shaded(font, text, *fg, *bg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUTF8_Shaded(TTF_Font *font,
							     const char *text, SDL_Color *fg, SDL_Color *bg){
  SDL_Surface * rtnSurf = TTF_RenderUTF8_Shaded(font, text, *fg, *bg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUNICODE_Shaded(TTF_Font *font,
								const Uint16 *text, SDL_Color *fg, SDL_Color *bg){
  SDL_Surface * rtnSurf = TTF_RenderUNICODE_Shaded(font, text, *fg, *bg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderGlyph_Shaded(TTF_Font *font,
							      Uint16 ch, SDL_Color *fg, SDL_Color *bg){
  SDL_Surface * rtnSurf = TTF_RenderGlyph_Shaded(font, ch, *fg, *bg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderText_Blended(TTF_Font *font,
							      const char *text, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderText_Blended(font, text, *fg);
  return rtnSurf;
} 
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUTF8_Blended(TTF_Font *font,
							      const char *text, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderUTF8_Blended(font, text, *fg);
  return rtnSurf;
}
 
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUNICODE_Blended(TTF_Font *font,
								 const Uint16 *text, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderUNICODE_Blended(font, text, *fg);
  return rtnSurf;
}

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderText_Blended_Wrapped(TTF_Font *font,
								      const char *text, SDL_Color *fg, Uint32 wrapLength){
  SDL_Surface * rtnSurf = TTF_RenderText_Blended_Wrapped(font, text, *fg, wrapLength);
  return rtnSurf;
}
 
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUTF8_Blended_Wrapped(TTF_Font *font,
								      const char *text, SDL_Color *fg, Uint32 wrapLength){
  SDL_Surface * rtnSurf = TTF_RenderUTF8_Blended_Wrapped(font, text, *fg, wrapLength);
  return rtnSurf;
}
 
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUNICODE_Blended_Wrapped(TTF_Font *font,
									 const Uint16 *text, SDL_Color *fg, Uint32 wrapLength){
  SDL_Surface * rtnSurf = TTF_RenderUNICODE_Blended_Wrapped(font, text, *fg, wrapLength);
  return rtnSurf;
}
 
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderGlyph_Blended(TTF_Font *font,
							       Uint16 ch, SDL_Color *fg){
  SDL_Surface * rtnSurf = TTF_RenderGlyph_Blended(font, ch, *fg);
  return rtnSurf;
}

Added sdl2/ttf-shim/ttf-shim.h.









































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL.h>

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderText_Solid(TTF_Font *font,
                const char *text, SDL_Color *fg);
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUTF8_Solid(TTF_Font *font,
                const char *text, SDL_Color *fg);
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUNICODE_Solid(TTF_Font *font,
                const Uint16 *text, SDL_Color *fg);
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderGlyph_Solid(TTF_Font *font,
                    Uint16 ch, SDL_Color *fg);

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderText_Shaded(TTF_Font *font,
                const char *text, SDL_Color *fg, SDL_Color *bg);
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUTF8_Shaded(TTF_Font *font,
                const char *text, SDL_Color *fg, SDL_Color *bg);
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUNICODE_Shaded(TTF_Font *font,
                const Uint16 *text, SDL_Color *fg, SDL_Color *bg);
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderGlyph_Shaded(TTF_Font *font,
                Uint16 ch, SDL_Color *fg, SDL_Color *bg);

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderText_Blended(TTF_Font *font,
                const char *text, SDL_Color *fg);
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUTF8_Blended(TTF_Font *font,
                const char *text, SDL_Color *fg);
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUNICODE_Blended(TTF_Font *font,
                const Uint16 *text, SDL_Color *fg);

extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderText_Blended_Wrapped(TTF_Font *font,
                const char *text, SDL_Color *fg, Uint32 wrapLength);
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUTF8_Blended_Wrapped(TTF_Font *font,
                const char *text, SDL_Color *fg, Uint32 wrapLength);
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderUNICODE_Blended_Wrapped(TTF_Font *font,
                const Uint16 *text, SDL_Color *fg, Uint32 wrapLength);
extern DECLSPEC SDL_Surface * SDLCALL STTF_RenderGlyph_Blended(TTF_Font *font,
                        Uint16 ch, SDL_Color *fg);

Added sdl2/ttf-shim/ttf-shim.h~.









>
>
>
>
1
2
3
4
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL.h>
extern DECLSPEC SDL_Surface * SDLCALL TTF_RenderText_Blended_Wrapped_S(TTF_Font *font, const char *text, SDL_Color *fg, Uint32 wraplength);

Added sdl2/ttf-shim/ttf-shim.o.

cannot compute difference between binary files

Added sdl2/ttf-shim/ttfshim.so.

cannot compute difference between binary files

Added sdl2/ttf-types.ss.





>
>
1
2
(define-ftype ttf-font
  (struct))

Added sdl2/ttf.sls.

































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#!r6rs

(library
    (sdl2 ttf)
  (export
   ;;;init
   ttf-init
   ttf-was-init
   ttf-quit

   ;;;info
   ttf-linked-version

   ;;;loading
   ttf-open-font
   ttf-open-font-rw
   ttf-open-font-index
   ttf-open-font-index-rw

   ;;;freeing
   ttf-close-font

   ;;;global attributes
   ttf-byte-swapped-unicode

   ;;;font style
   ttf-get-font-style
   ttf-set-font-style
   ttf-get-font-outline
   ttf-set-font-outline

   ;;;font settings
   ttf-get-font-hinting
   ttf-set-font-hinting
   ttf-get-font-kerning
   ttf-set-font-kerning

   ;;;font metrics
   ttf-font-height
   ttf-font-ascent
   ttf-font-descent
   ttf-font-line-skip

   ;;;font attributes
   ttf-font-faces
   ttf-font-face-is-fixed-width
   ttf-font-face-family-name
   ttf-font-face-style-name

   ;;;glyphs
   ttf-glyph-is-provided
   ttf-glyph-metrics

   ;;;text metrics
   ttf-size-text
   ttf-size-ut-f8
   ttf-size-unicode

   ;;;render solid
   sttf-render-text-solid
   sttf-render-ut-f8-solid
   sttf-render-unicode-solid
   sttf-render-glyph-solid

   ;;;render shaded
   sttf-render-text-shaded
   sttf-render-ut-f8-shaded
   sttf-render-unicode-shaded
   sttf-render-glyph-shaded

   ;;;render blended
   sttf-render-text-blended
   sttf-render-ut-f8-blended
   sttf-render-unicode-blended
   sttf-render-glyph-blended

   ;;;library init
   sdl-ttf-library-init
   sdl-shim-ttf-init )
  
  (import (chezscheme) 
	  (ffi-utils)
	  (sdl2)
	  (only (srfi s1 lists) fold)
	  (only (thunder-utils) string-replace string-split) 
	  (only (srfi s13 strings) string-delete string-suffix? string-prefix?)
	  (srfi s14 char-sets))
  
  (include "ttf-types.ss")
  (include "ttf-shim-functions.ss")
  (include "ttf-functions.ss")

  (define (sdl-ttf-library-init . l)
    (load-shared-object (if (null? l) "libSDL2_ttf.so" l)))
  (define (sdl-shim-ttf-init . l)
    (load-shared-object (if (null? l) "ttf-shim/ttfshim.so" l))))

Added sdl2/ttf.sls~.

































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#!r6rs

(library
    (sdl2 ttf)
  (export
   ;;;init
   ttf-init
   ttf-was-init
   ttf-quit

   ;;;info
   ttf-linked-version

   ;;;errors
   ttf-set-error
   ttf-get-error

   ;;;loading
   ttf-open-font
   ttf-open-font-rw
   ttf-open-font-index
   ttf-open-fonx-index-rw

   ;;;freeing
   ttf-close-font

   ;;;global attributes
   ttf-byte-swapped-unicode

   ;;;font style
   ttf-get-font-style
   ttf-set-font-style
   ttf-get-font-outline
   ttf-set-font-outline

   ;;;font settings
   ttf-get-font-hinting
   ttf-set-font-hinting
   ttf-get-font-kerning
   ttf-set-font-kerning

   ;;;font metrics
   ttf-font-height
   ttf-font-ascent
   ttf-font-descent
   ttf-font-line-skip

   ;;;font attributes
   ttf-font-faces
   ttf-font-face-is-fixed-width
   ttf-font-face-family-name
   ttf-font-face-style-name

   ;;;glyphs
   ttf-glyph-is-provided
   ttf-glyph-metrics

   ;;;text metrics
   ttf-size-text
   ttf-size-utf8
   ttf-size-unicode

   ;;;render solid
   ttf-render-text-solid
   ttf-render-utf8-solid
   ttf-render-unicode-solid
   ttf-render-glyph-solid

   ;;;render shaded
   ttf-render-text-shaded
   ttf-render-utf8-shaded
   ttf-render-unicode-shaded
   ttf-render-glyph-shaded

   ;;;render blended
   ttf-render-text-blended
   ttf-render-utf8-blended
   ttf-render-unicode-blended
   ttf-render-glphy-blended

   ;;;library init
   sdl-ttf-library-init )
  
  (import (chezscheme) 
	  (ffi-utils)
	  (sdl2)
	  (only (srfi s1 lists) fold)
	  (only (thunder-utils) string-replace string-split) 
	  (only (srfi s13 strings) string-delete string-suffix? string-prefix?)
	  (srfi s14 char-sets))
  
  (include "ttf-types.ss")
  (include "ttf-functions.ss")

  (define (sdl-ttf-library-init . l)
    (load-shared-object (if (null? l) "libSDL2_ttf.so" l))))