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

Safe HaskellNone
LanguageHaskell2010

Graphics.Wayland.Server

Synopsis

Documentation

newtype ClientState Source

enum { WL_EVENT_READABLE = 0x01, WL_EVENT_WRITABLE = 0x02, WL_EVENT_HANGUP = 0x04, WL_EVENT_ERROR = 0x08 };

The "uint32_t mask" argument passed to a variety of functions in this file is a bitmask detailing the state of the client.

Constructors

ClientState CUInt 

data EventLoop Source

struct wl_event_loop;

data EventSource Source

struct wl_event_source;

type EventLoopFdFunc = Int -> ClientState -> IO Bool Source

typedef int (*wl_event_loop_fd_func_t)(int fd, uint32_t mask, void *data);

type EventLoopTimerFunc = IO Bool Source

typedef int (*wl_event_loop_timer_func_t)(void *data);

type EventLoopSignalFunc = Int -> IO Bool Source

typedef int (*wl_event_loop_signal_func_t)(int signal_number, void *data);

eventLoopCreate :: IO EventLoop Source

struct wl_event_loop *wl_event_loop_create(void);

eventLoopDestroy :: EventLoop -> IO () Source

void wl_event_loop_destroy(struct wl_event_loop *loop);

eventLoopAddFd :: EventLoop -> Fd -> ClientState -> EventLoopFdFunc -> IO EventSource Source

struct wl_event_source *wl_event_loop_add_fd(struct wl_event_loop *loop, int fd, uint32_t mask, wl_event_loop_fd_func_t func, void *data);

eventSourceFdUpdate :: EventSource -> ClientState -> IO Result Source

int wl_event_source_fd_update(struct wl_event_source *source, uint32_t mask);

eventLoopAddTimer :: EventLoop -> EventLoopTimerFunc -> IO EventSource Source

struct wl_event_source *wl_event_loop_add_timer(struct wl_event_loop *loop, wl_event_loop_timer_func_t func, void *data);

eventLoopAddSignal :: EventLoop -> Int -> EventLoopSignalFunc -> IO EventSource Source

struct wl_event_source * wl_event_loop_add_signal(struct wl_event_loop *loop, int signal_number, wl_event_loop_signal_func_t func, void *data);

eventSourceTimerUpdate :: EventSource -> Int -> IO Result Source

int wl_event_source_timer_update(struct wl_event_source *source, int ms_delay);

eventSourceRemove :: EventSource -> IO () Source

int wl_event_source_remove(struct wl_event_source *source);

eventSourceCheck :: EventSource -> IO () Source

void wl_event_source_check(struct wl_event_source *source);

eventLoopDispatch :: EventLoop -> Int -> IO Result Source

int wl_event_loop_dispatch(struct wl_event_loop *loop, int timeout);

SAFE!!

eventLoopDispatchIdle :: EventLoop -> IO () Source

void wl_event_loop_dispatch_idle(struct wl_event_loop *loop);

eventLoopAddIdle :: EventLoop -> EventLoopIdleFunc -> IO EventSource Source

struct wl_event_source *wl_event_loop_add_idle(struct wl_event_loop *loop, wl_event_loop_idle_func_t func, void *data);

eventLoopGetFd :: EventLoop -> IO Fd Source

int wl_event_loop_get_fd(struct wl_event_loop *loop);

data DisplayServer Source

struct wl_display;

this is called a Compositor in e.g weston, QtWayland

this is NOT an instance of a wl_resource or a wl_proxy! it is a global server status singleton listing e.g. connected clients.

displayCreate :: IO DisplayServer Source

struct wl_display *wl_display_create(void);

displayDestroy :: DisplayServer -> IO () Source

void wl_display_destroy(struct wl_display *display);

displayGetEventLoop :: DisplayServer -> IO EventLoop Source

struct wl_event_loop *wl_display_get_event_loop(struct wl_display *display);

displayTerminate :: DisplayServer -> IO () Source

void wl_display_terminate(struct wl_display *display);

displayRun :: DisplayServer -> IO () Source

void wl_display_run(struct wl_display *display);

STRICTLY SAFE!!!

displayFlushClients :: DisplayServer -> IO () Source

void wl_display_flush_clients(struct wl_display *display);

displayGetSerial :: DisplayServer -> IO Word Source

uint32_t wl_display_get_serial(struct wl_display *display);

displayNextSerial :: DisplayServer -> IO Word Source

uint32_t wl_display_next_serial(struct wl_display *display);

clientCreate :: DisplayServer -> Fd -> IO (Maybe Client) Source

struct wl_client *wl_client_create(struct wl_display *display, int fd);

clientDestroy :: Client -> IO () Source

void wl_client_destroy(struct wl_client *client);

clientFlush :: Client -> IO () Source

void wl_client_flush(struct wl_client *client);

clientGetCredentials :: Client -> IO (ProcessID, UserID, GroupID) Source

void wl_client_get_credentials(struct wl_client *client, pid_t *pid, uid_t *uid, gid_t *gid);

clientPostNoMemory :: Client -> IO () Source

wl_client_post_no_memory(struct wl_client *client);

shmBufferBeginAccess :: ShmBuffer -> IO () Source

void wl_shm_buffer_begin_access(struct wl_shm_buffer *buffer);

Lock the memory for reading. Needed to protect the server against SIGBUS signals caused by the client resizing the buffer.

shmBufferEndAccess :: ShmBuffer -> IO () Source

void wl_shm_buffer_end_access(struct wl_shm_buffer *buffer);

Unlock the memory.

shmBufferGet :: Buffer -> IO (Maybe ShmBuffer) Source

struct wl_shm_buffer * wl_shm_buffer_get(struct wl_resource *resource);

shmBufferGetData :: ShmBuffer -> IO (Ptr ()) Source

void * wl_shm_buffer_get_data(struct wl_shm_buffer *buffer);

shmBufferGetStride :: ShmBuffer -> IO Int Source

int32_t wl_shm_buffer_get_stride(struct wl_shm_buffer *buffer);

shmBufferGetFormat :: ShmBuffer -> IO Word Source

uint32_t wl_shm_buffer_get_format(struct wl_shm_buffer *buffer);

shmBufferGetWidth :: ShmBuffer -> IO Int Source

int32_t wl_shm_buffer_get_width(struct wl_shm_buffer *buffer);

shmBufferGetHeight :: ShmBuffer -> IO Int Source

int32_t wl_shm_buffer_get_height(struct wl_shm_buffer *buffer);

displayInitShm :: DisplayServer -> IO Result Source

int wl_display_init_shm(struct wl_display *display);

displayAddShmFormat :: DisplayServer -> Word -> IO () Source

uint32_t * wl_display_add_shm_format(struct wl_display *display, uint32_t format);

shmBufferCreate :: Client -> Word -> Word -> Int -> Int -> Word -> IO (Maybe ShmBuffer) Source

struct wl_shm_buffer * wl_shm_buffer_create(struct wl_client *client, uint32_t id, int32_t width, int32_t height, int32_t stride, uint32_t format);

outputMode :: Output -> Word -> Int -> Int -> Int -> IO () Source

outputGeometry :: Output -> Int -> Int -> Int -> Int -> Int -> String -> String -> Int -> IO () Source

touchUp :: Touch -> Word -> Time -> Int -> IO () Source

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

data RegionImplementation Source

Constructors

RegionImplementation 

Fields

regionDestroy :: Client -> Region -> IO ()
 
regionAdd :: Client -> Region -> Int -> Int -> Int -> Int -> IO ()
 
regionSubtract :: Client -> Region -> Int -> Int -> Int -> 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 

newtype Client Source

opaque server-side wl_client struct

Constructors

Client (Ptr Client) 

Instances