bindings-wlc: Bindings against the wlc library

[ bsd3, ffi, library ] [ Propose Tags ]

Please see Readme.md


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.5, 0.1.0.7 (info)
Dependencies base (>=4.7 && <5), bindings-DSL (>=1.0.23 && <1.1), convertible (>=1.1.1.0 && <1.1.2.0) [details]
License BSD-3-Clause
Copyright 2016 Ashley Towns
Author Ashley Towns
Maintainer mail@ashleytowns.id.au
Category FFI
Home page http://github.com/aktowns/bindings-wlc#readme
Source repo head: git clone https://github.com/aktowns/bindings-wlc
Uploaded by ashleyis at 2016-04-03T11:02:34Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 3293 total (15 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for bindings-wlc-0.1.0.7

[back to package description]

bindings-wlc

WIP bindings against libwlc

Using Bindings.WLC

Low level bindings to WLC via bindings-dsl

do
  logger <- mk'log_handler_cb (\_ -> print)
  c'wlc_log_set_handler logger

  c'wlc_init2

  created_cb <- mk'output_created_cb (\output -> do
    putStrLn "Output created"
    return True)
  c'wlc_set_output_created_cb created_cb

  c'wlc_run

Using System.WLC

System.WLC builds on Binding.WLC

do
  initialize
  logHandler (\tag text -> putStrLn $ stringTag tag ++ " " ++ text) -- Log all the things
  dispatchEvent (PointerMotion (\_ _ ptr -> do pointerSetPosition ptr; return True)) -- Allow mouse movement
  dispatchEvent (ViewCreated (\view -> do viewBringToFront view; viewFocus view; return True)) -- Pop views to the front
  dispatchEvent (CompositorReady $ exec "weston-terminal" []) -- Launch weston-terminal when we're ready
  run