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:#Path |
|
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 |
!Path 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 |
^96 |
12 | 67 |
|
68 |
"Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1 | 69 |
! ! |
70 |
||
71 |
!Path class methodsFor:'primitives'! |
|
72 |
||
73 |
primDestroy: path |
|
74 |
||
75 |
<cdecl: void "cairo_path_destroy" ( Cairo::Path ) > |
|
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 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
81 |
!Path methodsFor:'accessing'! |
1 | 82 |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
83 |
data |
1 | 84 |
|
12 | 85 |
^self doubleWordAt:1 + 4 |
86 |
||
87 |
"Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1 | 88 |
! |
89 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
90 |
data: value |
1 | 91 |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
92 |
self pointerAt:1 + 4 put:value |
12 | 93 |
|
94 |
"Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1 | 95 |
! |
96 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
97 |
numData |
1 | 98 |
|
12 | 99 |
^self doubleWordAt:1 + 8 |
100 |
||
101 |
"Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1 | 102 |
! |
103 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
104 |
numData: value |
1 | 105 |
|
12 | 106 |
self doubleWordAt:1 + 8 put:value |
107 |
||
108 |
"Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1 | 109 |
! |
110 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
111 |
status |
1 | 112 |
|
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
113 |
^self doubleWordAt:1 + 0 |
12 | 114 |
|
115 |
"Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1 | 116 |
! |
117 |
||
6
c1f387b40e3a
regenerated using newer version of CFace
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
5
diff
changeset
|
118 |
status: value |
1 | 119 |
|
120 |
self doubleWordAt:1 + 0 put:value |
|
12 | 121 |
|
122 |
"Modified: / 10-09-2008 / 18:19:53 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
1 | 123 |
! ! |
124 |
||
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
125 |
!Path class methodsFor:'documentation'! |
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
126 |
|
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
127 |
version |
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
128 |
^'$Id$' |
11 | 129 |
! |
130 |
||
131 |
version_SVN |
|
132 |
^ '$Id:: $' |
|
7
392289f92fab
- DLL path is set automatically.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
6
diff
changeset
|
133 |
! ! |