Created
February 4, 2013 11:04
-
-
Save victoredwardocallaghan/4706154 to your computer and use it in GitHub Desktop.
XReadBitmapFile fix binding types?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Graphics/X11/Xlib/Misc.hsc b/Graphics/X11/Xlib/Misc.hsc | |
index a4b75a0..fde4e7a 100644 | |
--- a/Graphics/X11/Xlib/Misc.hsc | |
+++ b/Graphics/X11/Xlib/Misc.hsc | |
@@ -781,13 +781,13 @@ readBitmapFile display d filename = | |
m_y_hot | y_hot == -1 = Nothing | |
| otherwise = Just y_hot | |
case rv of | |
- 0 -> return $ Right (fromIntegral width, fromIntegral height, bitmap, m_x_hot, m_y_hot) | |
+ 0 -> return $ Right (width, height, bitmap, m_x_hot, m_y_hot) | |
1 -> return $ Left "readBitmapFile: BitmapOpenFailed" | |
2 -> return $ Left "readBitmapFile: BitmapFileInvalid" | |
3 -> return $ Left "readBitmapFile: BitmapNoMemory" | |
_ -> return $ Left "readBitmapFile: BitmapUnknownError" | |
foreign import ccall unsafe "X11/Xlib.h XReadBitmapFile" | |
- xReadBitmapFile :: Display -> Drawable -> CString -> Ptr CInt -> Ptr CInt | |
+ xReadBitmapFile :: Display -> Drawable -> CString -> Ptr Dimension -> Ptr Dimension | |
-> Ptr Pixmap -> Ptr CInt -> Ptr CInt -> IO CInt | |
-- XCreateBitmapFromData omitted (awkward looking type) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment