packages feed

linux-framebuffer (empty) → 0

raw patch · 5 files changed

+89/−0 lines, 5 filesdep +basedep +bindings-DSLdep +unixsetup-changed

Dependencies added: base, bindings-DSL, unix

Files

+ Graphics/Framebuffer.hs view
@@ -0,0 +1,9 @@+{-|+This module reexports the functions you probably want to use. "Graphics.Framebuffer.Internal" does all the heavy lifting.+ -}++module Graphics.Framebuffer+	( getVarScreenInfo+	, C'fb_var_screeninfo(..)+	) where+import Graphics.Framebuffer.Internal
+ Graphics/Framebuffer/Internal.hsc view
@@ -0,0 +1,29 @@+module Graphics.Framebuffer.Internal where+#strict_import+#include <linux/fb.h>+#include <bindings.dsl.h>++import System.IO+import System.Posix.IO+import System.Posix.Types++#starttype struct fb_var_screeninfo+#field xres , Word32+#field yres , Word32+#field bits_per_pixel , Word32+#stoptype++#num FBIOGET_VSCREENINFO+#num FBIOPUT_VSCREENINFO+#num FBIOGET_FSCREENINFO+#num FBIOGETCMAP+#num FBIOPUTCMAP+#num FBIOPAN_DISPLAY++#ccall ioctl , Fd -> CInt -> Ptr <struct fb_var_screeninfo> -> IO CInt++-- | Asks the properties of the supplied framebuffer device+getVarScreenInfo :: Handle -> IO C'fb_var_screeninfo+getVarScreenInfo h = do+	fd <- handleToFd h+	alloca $ \ptr -> c'ioctl fd c'FBIOGET_VSCREENINFO ptr >> peek ptr
+ LICENSE view
@@ -0,0 +1,14 @@+            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE+                    Version 2, December 2004++ Copyright (C) 2004 Sam Hocevar+  22 rue de Plaisance, 75014 Paris, France+ Everyone is permitted to copy and distribute verbatim or modified+ copies of this license document, and changing it is allowed as long+ as the name is changed.++            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION++  0. You just DO WHAT THE FUCK YOU WANT TO.+
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ linux-framebuffer.cabal view
@@ -0,0 +1,35 @@+cabal-version:       2.0+name:                linux-framebuffer+version:             0+synopsis:            Linux fbdev (framebuffer device, /dev/fbX) utility functions+-- description:+license:             OtherLicense+license-file:        LICENSE+author:              Sergey Alirzaev+maintainer:          zl29ah@gmail.com+-- copyright:+category:            Graphics+build-type:          Simple++library+  ghc-options:        -fno-warn-tabs+  -- other-extensions:+  build-depends:       base >= 4 && < 5,+                       bindings-DSL >= 1.0.16 && < 1.1,+                       unix ^>= 2.7.2.2+  -- hs-source-dirs:+  default-language:    Haskell2010+  default-extensions:+    ForeignFunctionInterface+  exposed-modules:+    Graphics.Framebuffer+    Graphics.Framebuffer.Internal++Source-repository head+  type:              git+  location:          https://github.com/l29ah/linux-framebuffer++Source-repository this+  type:              git+  location:          https://github.com/l29ah/linux-framebuffer+  tag:               0