Cairo__CPrimitives.st
changeset 45 8ee53c41a084
parent 40 28dfc583beb5
child 51 5293f2b851ab
--- a/Cairo__CPrimitives.st	Tue Feb 23 16:40:59 2016 +0000
+++ b/Cairo__CPrimitives.st	Fri Feb 19 14:25:58 2016 +0000
@@ -15,7 +15,13 @@
 dllPath
 
     OperatingSystem isMSWINDOWSlike ifTrue:[
-        ^ #( 'C:\Windows' 'C:\Windows\System32' "Wild guess, should not harm" )
+        ^ {
+            OperatingSystem pathOfSTXExecutable asFilename directory pathName .
+            (Smalltalk getPackageDirectoryForPackage: self package) pathName .
+            ((Smalltalk getPackageDirectoryForPackage: self package) / 'support' / 'win32' / (OperatingSystem getSystemInfo at:#machine)) pathName .
+            'C:\Windows' .
+            'C:\Windows\SYSTEM32' .
+        }
     ].
 
     OperatingSystem isUNIXlike ifTrue:[
@@ -44,19 +50,22 @@
     self error:'Unsupported operating system'
 
     "
-        SqliteLibrary dllPath
+        CPrimitives dllPath
     "
 
     "Created: / 31-08-2011 / 18:02:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 19-02-2016 / 13:56:18 / jv"
 !
 
 libraryName
 
     OperatingSystem isUNIXlike ifTrue:[^'libcairo.so.2'].
 
-    OperatingSystem isMSWINDOWSlike ifTrue:[^'cairo.dll'].
+    OperatingSystem isMSWINDOWSlike ifTrue:[^'libcairo-2.dll'].
 
     self error:'Library name for host OS is not known'
+
+    "Modified: / 19-02-2016 / 13:47:51 / jv"
 ! !
 
 !CPrimitives class methodsFor:'primitives'!
@@ -2089,6 +2098,22 @@
     self primitiveFailed
 !
 
+cairo_win32_font_face_create_for_hfont: hfont
+
+    <cdecl: Cairo::FontFace "cairo_win32_font_face_create_for_hfont" ( handle ) >
+    self primitiveFailed
+
+    "Created: / 19-02-2016 / 16:35:36 / jv"
+!
+
+cairo_win32_surface_create: hfd
+    <cdecl: Cairo::SurfaceWin32 "cairo_win32_surface_create" ( handle ) >
+    self primitiveFailed
+
+    "Created: / 19-02-2016 / 12:06:16 / jv"
+    "Modified (format): / 19-02-2016 / 14:07:50 / jv"
+!
+
 cairo_xlib_device_debug_cap_xrender_version: device _: major_version _: minor_version
 
     <cdecl: void "cairo_xlib_device_debug_cap_xrender_version" ( Cairo::Device int32 int32 ) >