bindings-wlc-0.1.0.1: Bindings against the wlc library

Copyright(c) Ashley Towns 2016
LicenseBSD3
Maintainermail@ashleytowns.id.au
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Bindings.WLC.Core

Contents

Description

Provides bindings to the core WLC API.

Synopsis

Documentation

data C'xkb_state Source

Constructors

C'xkb_state 

data C'xkb_keymap Source

Constructors

C'xkb_keymap 

type C'wlc_log_type = CUInt Source

wlc_log(), wlc_vlog();

type C'wlc_backend_type = CUInt Source

wlc_get_backend_type();

type C'wlc_event_bit = CUInt Source

mask in wlc_event_loop_add_fd();

type C'wlc_view_state_bit = CUInt Source

wlc_view_get_state();

type C'wlc_view_type_bit = CUInt Source

wlc_view_get_type();

c'WLC_BIT_OVERRIDE_REDIRECT :: Num a => a Source

Tooltips, DnD's, menus (x11)

Override redirect (x11)

c'WLC_BIT_UNMANAGED :: Num a => a Source

Splash screens (x11)

c'WLC_BIT_SPLASH :: Num a => a Source

Modal windows (x11)

c'WLC_BIT_MODAL :: Num a => a Source

xdg-shell, wl-shell popups

type C'wlc_resize_edge = CUInt Source

wlc_view_set_geometry(); Edges in interface interface.view.request.resize function.

type C'wlc_modifier_bit = CUInt Source

Mods in interface.keyboard.key function.

type C'wlc_led_bit = CUInt Source

Leds in interface.keyboard.key function.

type C'wlc_key_state = CUInt Source

State in interface.keyboard.key function.

type C'wlc_button_state = CUInt Source

State in interface.pointer.button function.

type C'wlc_scroll_axis_bit = CUInt Source

Axis in interface.pointer.scroll function.

type C'wlc_touch_type = CUInt Source

Type in interface.touch.touch function

Callback API

Types

Output

View

Input

Other

Functions

Output

c'wlc_set_output_created_cb :: C'output_created_cb -> IO () Source

Output was created. Return false if you want to destroy the output. (e.g. failed to allocate data related to view)

c'wlc_set_output_focus_cb :: C'output_focus_cb -> IO () Source

Output got or lost focus.

View

p'wlc_set_output_render_post_cb :: FunPtr (C'output_render_post_cb -> IO ()) Source

View was created. Return false if you want to destroy the view. (e.g. failed to allocate data related to view)

c'wlc_set_view_focus_cb :: C'view_focus_cb -> IO () Source

View got or lost focus.

c'wlc_set_view_request_geometry_cb :: C'view_request_geometry_cb -> IO () Source

Request to set given geometry for view. Apply using wlc_view_set_geometry to agree.

c'wlc_set_view_request_state_cb :: C'view_request_state_cb -> IO () Source

Request to disable or enable the given state for view. Apply using wlc_view_set_state to agree.

c'wlc_set_view_request_move_cb :: C'view_request_move_cb -> IO () Source

Request to move itself. Start a interactive move to agree.

c'wlc_set_view_request_resize_cb :: C'view_request_resize_cb -> IO () Source

Request to resize itself with the given edges. Start a interactive resize to agree.

Input

p'wlc_set_view_render_post_cb :: FunPtr (C'view_render_post_cb -> IO ()) Source

Key event was triggered, view handle will be zero if there was no focus. Return true to prevent sending the event to clients.

p'wlc_set_keyboard_key_cb :: FunPtr (C'keyboard_key_cb -> IO ()) Source

Button event was triggered, view handle will be zero if there was no focus. Return true to prevent sending the event to clients.

p'wlc_set_pointer_button_cb :: FunPtr (C'pointer_button_cb -> IO ()) Source

Scroll event was triggered, view handle will be zero if there was no focus. Return true to prevent sending the event to clients.

p'wlc_set_pointer_scroll_cb :: FunPtr (C'pointer_scroll_cb -> IO ()) Source

Motion event was triggered, view handle will be zero if there was no focus. Apply with wlc_pointer_set_position to agree. Return true to prevent sending the event to clients.

p'wlc_set_pointer_motion_cb :: FunPtr (C'pointer_motion_cb -> IO ()) Source

Touch event was triggered, view handle will be zero if there was no focus. Return true to prevent sending the event to clients.

Other

p'wlc_set_touch_cb :: FunPtr (C'touch_cb -> IO ()) Source

Compositor is ready to accept clients.

c'wlc_set_compositor_terminate_cb :: C'compositor_terminate_cb -> IO () Source

Compositor is about to terminate

Core API

type C'log_handler_cb = FunPtr (C'wlc_log_type -> CString -> IO ()) Source

Creates a log handler callback

c'wlc_log_set_handler :: C'log_handler_cb -> IO () Source

Set log handler. Can be set before wlc_init.

c'wlc_init2 :: IO Bool Source

Initialize wlc. Returns false on failure.

Avoid running unverified code before wlc_init as wlc compositor may be run with higher privileges on non logind systems where compositor binary needs to be suid.

wlc_init's purpose is to initialize and drop privileges as soon as possible.

Callbacks should be set using wlc_set_*_cb functions before calling wlc_init2, failing to do so will cause any callback the init may trigger to not be called.

c'wlc_terminate :: IO () Source

Terminate wlc.

p'wlc_terminate :: FunPtr (IO ()) Source

Query backend wlc is using.

c'wlc_run :: IO () Source

Run event loop.

p'wlc_run :: FunPtr (IO ()) Source

Link custom data to handle.

c'wlc_handle_get_user_data :: C'wlc_handle -> IO (Ptr ()) Source

Get linked custom data from handle.

Output API

c'wlc_get_outputs :: Ptr CSize -> IO C'wlc_handle Source

Get outputs. Returned array is a direct reference, careful when moving and destroying handles.

c'wlc_output_set_sleep :: C'wlc_handle -> Bool -> IO () Source

Wake up / sleep.

c'wlc_output_get_mask :: C'wlc_handle -> IO CUInt Source

Get current visibility bitmask.

c'wlc_output_set_mask :: C'wlc_handle -> CUInt -> IO () Source

Set visibility bitmask.

p'wlc_output_set_mask :: FunPtr (C'wlc_handle -> CUInt -> IO ()) Source

Get views in stack order. Returned array is a direct reference, careful when moving and destroying handles.

c'wlc_output_focus :: C'wlc_handle -> IO () Source

Focus output. Pass zero for no focus.

View API

c'wlc_view_focus :: C'wlc_handle -> IO () Source

Focus view. Pass zero for no focus.

p'wlc_view_close :: FunPtr (C'wlc_handle -> IO ()) Source

Get current output.

c'wlc_view_set_output :: C'wlc_handle -> C'wlc_handle -> IO () Source

Set output. Alternatively you can wlc_output_set_views.

c'wlc_view_send_to_back :: C'wlc_handle -> IO () Source

Send behind everything.

p'wlc_view_send_to_back :: FunPtr (C'wlc_handle -> IO ()) Source

Send below another view.

c'wlc_view_bring_above :: C'wlc_handle -> C'wlc_handle -> IO () Source

Send above another view.

c'wlc_view_bring_to_front :: C'wlc_handle -> IO () Source

Bring to front of everything.

c'wlc_view_get_mask :: C'wlc_handle -> IO CUInt Source

Get current visibility bitmask.

c'wlc_view_set_mask :: C'wlc_handle -> CUInt -> IO () Source

Set visibility bitmask.

c'wlc_view_get_geometry :: C'wlc_handle -> IO (Ptr C'wlc_geometry) Source

Get current geometry. (what client sees)

c'wlc_view_get_visible_geometry :: C'wlc_handle -> Ptr C'wlc_geometry -> IO () Source

Get visible geometry. (what wlc displays)

c'wlc_view_set_geometry :: C'wlc_handle -> CUInt -> Ptr C'wlc_geometry -> IO () Source

Set geometry. Set edges if the geometry change is caused by interactive resize.

p'wlc_view_get_type :: FunPtr (C'wlc_handle -> IO CUInt) Source

Set type bit. Toggle indicates whether it is set or not.

c'wlc_view_get_state :: C'wlc_handle -> IO CUInt Source

Get current state bitfield.

p'wlc_view_get_state :: FunPtr (C'wlc_handle -> IO CUInt) Source

Set state bit. Toggle indicates whether it is set or not.

c'wlc_view_get_class :: C'wlc_handle -> IO CString Source

Get class. (shell-surface only)

c'wlc_view_get_app_id :: C'wlc_handle -> IO CString Source

Get app id. (xdg-surface only)

Input API

c'wlc_keyboard_get_current_keys :: Ptr CSize -> IO (Ptr CUInt) Source

Get currently held keys.

p'wlc_keyboard_get_current_keys :: FunPtr (Ptr CSize -> IO (Ptr CUInt)) Source

Utility function to convert raw keycode to keysym. Passed modifiers may transform the key.

c'wlc_keyboard_get_utf32_for_key :: CUInt -> Ptr C'wlc_modifiers -> IO CUInt Source

Utility function to convert raw keycode to Unicode/UTF-32 codepoint. Passed modifiers may transform the key.

c'wlc_pointer_get_position :: Ptr C'wlc_point -> IO () Source

Get current pointer position.

c'wlc_pointer_set_position :: Ptr C'wlc_point -> IO () Source

Set current pointer position.