hayland-0.1.0.1: Haskell bindings for the C Wayland library.

Safe HaskellNone
LanguageHaskell2010

Graphics.Wayland.Client

Synopsis

Documentation

data Result Source

Constructors

Success 
Failure 

Instances

displayConnect :: IO (Maybe Display) Source

Connect to the default display by passing a null pointer

displayConnectName :: String -> IO (Maybe Display) Source

Connect to a display with a specified name

displayConnectFd :: Fd -> IO (Maybe Display) Source

Connect to a display by file descriptor

displayDispatch :: Display -> IO (Maybe Int) Source

wl_display_dispatch. Returns Nothing on failure or Just k if k events were processed.

Strictly safe!!! This *will* call back into Haskell code!

displayDispatchPending :: Display -> IO (Maybe Int) Source

wl_display_dispatch_pending. Returns Nothing on failure or Just k if k events were processed.

Strictly safe!!! This *will* call back into Haskell code!

displayGetError :: Display -> IO (Maybe Int) Source

Nothing if no error occurred or Just k if the latest error had code k

Note (from the wayland documentation): errors are fatal. If this function returns a Just value, the display can no longer be used.

displayFlush :: Display -> IO (Maybe Int) Source

Nothing on failure or Just k if k bytes were sent

It is not clear to me if this is can be unsafe (ie. can this call back into haskell code?).

displayRoundtrip :: Display -> IO (Maybe Int) Source

Nothing on failure or Just k if k events were dispatched.

It is not clear to me if this is can be unsafe (ie. can this call back into haskell code?).

displayReadEvents :: Display -> IO Result Source

This will read events from the file descriptor for the display. This function does not dispatch events, it only reads and queues events into their corresponding event queues.

Before calling this function, wl_display_prepare_read() must be called first.

regionSubtract :: Region -> Int -> Int -> Int -> Int -> IO () Source

regionAdd :: Region -> Int -> Int -> Int -> Int -> IO () Source

surfaceDamage :: Surface -> Int -> Int -> Int -> Int -> IO () Source

data ShmListener Source

Constructors

ShmListener 

Fields

shmFormat :: Shm -> Word -> IO ()
 

data SeatListener Source

Constructors

SeatListener 

Fields

seatCapabilities :: Seat -> Word -> IO ()
 
seatName :: Seat -> String -> IO ()
 

data KeyboardListener Source

Constructors

KeyboardListener 

Fields

keyboardKeymap :: Keyboard -> Word -> Fd -> Word -> IO ()
 
keyboardEnter :: Keyboard -> Word -> Surface -> (Int, Ptr ()) -> IO ()
 
keyboardLeave :: Keyboard -> Word -> Surface -> IO ()
 
keyboardKey :: Keyboard -> Word -> Time -> Word -> Word -> IO ()
 
keyboardModifiers :: Keyboard -> Word -> Word -> Word -> Word -> Word -> IO ()
 

data TouchListener Source

Constructors

TouchListener 

Fields

touchDown :: Touch -> Word -> Time -> Surface -> Int -> Fixed256 -> Fixed256 -> IO ()
 
touchUp :: Touch -> Word -> Time -> Int -> IO ()
 
touchMotion :: Touch -> Time -> Int -> Fixed256 -> Fixed256 -> IO ()
 
touchFrame :: Touch -> IO ()
 
touchCancel :: Touch -> IO ()
 

data OutputListener Source

Constructors

OutputListener 

Fields

outputGeometry :: Output -> Int -> Int -> Int -> Int -> Int -> String -> String -> Int -> IO ()
 
outputMode :: Output -> Word -> Int -> Int -> Int -> IO ()
 
outputDone :: Output -> IO ()
 
outputScale :: Output -> Int -> IO ()
 

newtype Display Source

Constructors

Display (Ptr Display) 

Instances

newtype Registry Source

Constructors

Registry (Ptr Registry) 

Instances

newtype Callback Source

Constructors

Callback (Ptr Callback) 

Instances

newtype ShmPool Source

Constructors

ShmPool (Ptr ShmPool) 

Instances

newtype Shm Source

Constructors

Shm (Ptr Shm) 

Instances

newtype Buffer Source

Constructors

Buffer (Ptr Buffer) 

Instances

newtype DataOffer Source

Constructors

DataOffer (Ptr DataOffer) 

newtype Shell Source

Constructors

Shell (Ptr Shell) 

Instances

newtype Surface Source

Constructors

Surface (Ptr Surface) 

Instances

newtype Seat Source

Constructors

Seat (Ptr Seat) 

Instances

newtype Pointer Source

Constructors

Pointer (Ptr Pointer) 

Instances

newtype Keyboard Source

Constructors

Keyboard (Ptr Keyboard) 

Instances

newtype Touch Source

Constructors

Touch (Ptr Touch) 

Instances

newtype Output Source

Constructors

Output (Ptr Output) 

Instances

newtype Region Source

Constructors

Region (Ptr Region) 

Instances

newtype ShmError Source

Constructors

ShmError Int 

Instances

newtype ShmFormat Source

Constructors

ShmFormat Int 

newtype OutputMode Source

Constructors

OutputMode Int 

data CursorTheme Source

struct wl_cursor_theme;

data CursorImage Source

struct wl_cursor_image { uint32_t width; * actual width * uint32_t height; * actual height * uint32_t hotspot_x; * hot spot x (must be inside image) * uint32_t hotspot_y; * hot spot y (must be inside image) * uint32_t delay; * animation delay to next frame (ms) * };

data Cursor Source

struct wl_cursor { unsigned int image_count; struct wl_cursor_image **images; char *name; };

cursorThemeLoad :: String -> Int -> Shm -> IO CursorTheme Source

struct wl_cursor_theme * wl_cursor_theme_load(const char *name, int size, struct wl_shm *shm);

cursorThemeDestroy :: CursorTheme -> IO () Source

void wl_cursor_theme_destroy(struct wl_cursor_theme *theme);

cursorThemeGetCursor :: CursorTheme -> String -> IO Cursor Source

struct wl_cursor * wl_cursor_theme_get_cursor(struct wl_cursor_theme *theme, const char *name);

cursorImageGetBuffer :: CursorImage -> IO Buffer Source

struct wl_buffer * wl_cursor_image_get_buffer(struct wl_cursor_image *image);

From the wayland docs: do not destroy the returned buffer.

cursorFrame :: Cursor -> Int -> IO Int Source

int wl_cursor_frame(struct wl_cursor *cursor, uint32_t time);