author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 17 Jun 2012 14:49:30 +0000 | |
changeset 16 | a810555a635c |
parent 12 | e5f0c18af8a9 |
child 20 | 18a3e6b5f310 |
permissions | -rw-r--r-- |
1 | 1 |
"{ Package: 'stx:goodies/libcairo' }" |
2 |
||
3 |
"{ NameSpace: Cairo }" |
|
4 |
||
5 |
ExternalStructure subclass:#FontOptions |
|
6 |
instanceVariableNames:'' |
|
7 |
classVariableNames:'' |
|
8 |
poolDictionaries:'' |
|
12 | 9 |
category:'Cairo-Objects' |
1 | 10 |
! |
11 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
12 |
|
1 | 13 |
!FontOptions class methodsFor:'accessing'! |
14 |
||
12 | 15 |
dllPath |
16 |
||
17 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
18 |
^ #( 'C:\Windows' 'C:\Windows\System32' "Wild guess, should not harm" ) |
|
19 |
]. |
|
20 |
||
21 |
OperatingSystem isUNIXlike ifTrue:[ |
|
22 |
OperatingSystem getSystemType == #linux ifTrue:[ |
|
23 |
| path | |
|
24 |
||
25 |
path := #( '/lib' '/usr/lib' '/usr/local/lib' ). |
|
26 |
(OperatingSystem getSystemInfo at:#machine) = 'x86_64' ifTrue:[ |
|
27 |
"If the machine is 64bit, prepend standard path for 32bit libs. |
|
28 |
Leave standard paths at the end, as the system might be completely |
|
29 |
32bit but running on 64bit-capable CPU. |
|
30 |
||
31 |
CAVEAT: This is bit dangerous, as on 64bit OS, if ia32 libs are |
|
32 |
not installed byt 64bit sqlite libs are, then 64bit libs are found |
|
33 |
and when a function is called, segfault will occur!! |
|
34 |
||
35 |
Q: Is there a way how to figure out if the OS itself is 32bit, |
|
36 |
regardles on CPU?" |
|
37 |
path := #( '/lib32' '/usr/lib32' '/usr/local/lib32' ) , path. |
|
38 |
]. |
|
39 |
^path |
|
40 |
||
41 |
]. |
|
42 |
]. |
|
43 |
||
44 |
self error:'Unsupported operating system' |
|
45 |
||
46 |
" |
|
47 |
SqliteLibrary dllPath |
|
48 |
" |
|
49 |
||
50 |
"Created: / 31-08-2011 / 18:02:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
51 |
! |
|
52 |
||
1 | 53 |
libraryName |
54 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
55 |
OperatingSystem isUNIXlike ifTrue:[^'libcairo.so.2']. |
1 | 56 |
|
57 |
OperatingSystem isMSWINDOWSlike ifTrue:[^'cairo.dll']. |
|
58 |
||
59 |
self error:'Library name for host OS is not known' |
|
12 | 60 |
|
61 |
"Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
62 |
! |
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
63 |
|
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
64 |
structSize |
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
65 |
|
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
66 |
^0 |
12 | 67 |
|
68 |
"Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1 | 69 |
! ! |
70 |
||
71 |
!FontOptions class methodsFor:'primitives'! |
|
72 |
||
73 |
primCopy: original |
|
74 |
||
75 |
<cdecl: Cairo::FontOptions "cairo_font_options_copy" ( Cairo::FontOptions ) > |
|
76 |
self primitiveFailed |
|
77 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
78 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 79 |
! |
80 |
||
81 |
primDestroy: options |
|
82 |
||
83 |
<cdecl: void "cairo_font_options_destroy" ( Cairo::FontOptions ) > |
|
84 |
self primitiveFailed |
|
85 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
86 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 87 |
! |
88 |
||
89 |
primEqual: options other: other |
|
90 |
||
91 |
<cdecl: int32 "cairo_font_options_equal" ( Cairo::FontOptions Cairo::FontOptions ) > |
|
92 |
self primitiveFailed |
|
93 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
94 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 95 |
! |
96 |
||
97 |
primFontOptionsCreate |
|
98 |
||
99 |
<cdecl: Cairo::FontOptions "cairo_font_options_create" ( ) > |
|
100 |
self primitiveFailed |
|
101 |
||
12 | 102 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
3 | 103 |
! |
104 |
||
105 |
primFtFontOptionsSubstitute: options pattern: pattern |
|
106 |
||
107 |
<cdecl: void "cairo_ft_font_options_substitute" ( Cairo::FontOptions pointer ) > |
|
108 |
self primitiveFailed |
|
109 |
||
110 |
"Created: / 10-07-2008 / 23:05:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1 | 111 |
! |
112 |
||
113 |
primGetAntialias: options |
|
114 |
||
115 |
<cdecl: int32 "cairo_font_options_get_antialias" ( Cairo::FontOptions ) > |
|
116 |
self primitiveFailed |
|
117 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
118 |
"Modified: / 10-09-2008 / 18:19:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 119 |
! |
120 |
||
121 |
primGetHintMetrics: options |
|
122 |
||
123 |
<cdecl: int32 "cairo_font_options_get_hint_metrics" ( Cairo::FontOptions ) > |
|
124 |
self primitiveFailed |
|
125 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
126 |
"Modified: / 10-09-2008 / 18:19:54 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 127 |
! |
128 |
||
129 |
primGetHintStyle: options |
|
130 |
||
131 |
<cdecl: int32 "cairo_font_options_get_hint_style" ( Cairo::FontOptions ) > |
|
132 |
self primitiveFailed |
|
133 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
134 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 135 |
! |
136 |
||
137 |
primGetSubpixelOrder: options |
|
138 |
||
139 |
<cdecl: int32 "cairo_font_options_get_subpixel_order" ( Cairo::FontOptions ) > |
|
140 |
self primitiveFailed |
|
141 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
142 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 143 |
! |
144 |
||
145 |
primHash: options |
|
146 |
||
147 |
<cdecl: int32 "cairo_font_options_hash" ( Cairo::FontOptions ) > |
|
148 |
self primitiveFailed |
|
149 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
150 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 151 |
! |
152 |
||
153 |
primMerge: options other: other |
|
154 |
||
155 |
<cdecl: void "cairo_font_options_merge" ( Cairo::FontOptions Cairo::FontOptions ) > |
|
156 |
self primitiveFailed |
|
157 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
158 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 159 |
! |
160 |
||
161 |
primSetAntialias: options antialias: antialias |
|
162 |
||
163 |
<cdecl: void "cairo_font_options_set_antialias" ( Cairo::FontOptions int32 ) > |
|
164 |
self primitiveFailed |
|
165 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
166 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 167 |
! |
168 |
||
169 |
primSetHintMetrics: options hintMetrics: hint_metrics |
|
170 |
||
171 |
<cdecl: void "cairo_font_options_set_hint_metrics" ( Cairo::FontOptions int32 ) > |
|
172 |
self primitiveFailed |
|
173 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
174 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 175 |
! |
176 |
||
177 |
primSetHintStyle: options hintStyle: hint_style |
|
178 |
||
179 |
<cdecl: void "cairo_font_options_set_hint_style" ( Cairo::FontOptions int32 ) > |
|
180 |
self primitiveFailed |
|
181 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
182 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 183 |
! |
184 |
||
185 |
primSetSubpixelOrder: options subpixelOrder: subpixel_order |
|
186 |
||
187 |
<cdecl: void "cairo_font_options_set_subpixel_order" ( Cairo::FontOptions int32 ) > |
|
188 |
self primitiveFailed |
|
189 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
190 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 191 |
! |
192 |
||
193 |
primStatus: options |
|
194 |
||
195 |
<cdecl: int32 "cairo_font_options_status" ( Cairo::FontOptions ) > |
|
196 |
self primitiveFailed |
|
197 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
198 |
"Modified: / 10-09-2008 / 18:19:55 / Jan Vrany <vranyj1@fel.cvut.cz>" |
1 | 199 |
! ! |
200 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
201 |
!FontOptions class methodsFor:'documentation'! |
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
202 |
|
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
203 |
version |
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
204 |
^'$Id$' |
11 | 205 |
! |
206 |
||
207 |
version_SVN |
|
208 |
^ '$Id:: $' |
|
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
209 |
! ! |