diff options
author | Camil Staps | 2015-08-24 01:28:28 +0200 |
---|---|---|
committer | Camil Staps | 2015-08-24 01:28:28 +0200 |
commit | 447c0f0d09cd8a5555ee8f4b199f0de7013ed304 (patch) | |
tree | 9e35a9347e139c55c325954bf252916f9576a4af /osbitmap.icl | |
parent | Implemented GETCLIPBOARDCOUNT; fix C warning (diff) |
Ugly hack to get winCreateBitmap to work
Typically, we would do this with gdk_pixbuf_from_file(). However,
the openBitmap function from StdBitmap only gives us a *File, not
the file name. So, we cannot read from the file itself directly.
Therefore, we now create a temporary file with the same content
and read from there. Ideally, StdBitmap would be edited to pass
both a *File and a !{#Char} with the file name (or just the latter,
and let osbitmap decide what to do with it).
Diffstat (limited to 'osbitmap.icl')
-rw-r--r-- | osbitmap.icl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/osbitmap.icl b/osbitmap.icl index 3074b8f..3a71bae 100644 --- a/osbitmap.icl +++ b/osbitmap.icl @@ -43,7 +43,7 @@ osReadBitmap file = (False,noBitmap,file)
| otherwise
# (hdc, tb) = winCreateScreenHDC OSNewToolbox
- # (hbmp,tb) = winCreateBitmap w data hdc tb
+ # (hbmp,tb) = winCreateBitmap data hdc tb
# tb = winDestroyScreenHDC (hdc,tb)
= (if (tb==OSDummyToolbox) True True,{originalSize=(w,h),reSize=(w,h),bitmapContents=data,bitmapHandle=hbmp},file)
where
|