|
FreeRDP
|
#include "uwac-priv.h"#include "uwac-utils.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <stdarg.h>#include <assert.h>#include <errno.h>#include <time.h>#include <unistd.h>#include <sys/epoll.h>#include "uwac-os.h"#include "wayland-cursor.h"Macros | |
| #define | TARGET_COMPOSITOR_INTERFACE 3U |
| #define | TARGET_SHM_INTERFACE 1U |
| #define | TARGET_SHELL_INTERFACE 1U |
| #define | TARGET_DDM_INTERFACE 1U |
| #define | TARGET_SEAT_INTERFACE 5U |
| #define | TARGET_XDG_VERSION 5U /* The version of xdg-shell that we implement */ |
Functions | |
| static bool | uwac_default_error_handler (UwacDisplay *display, UwacReturnCode code, const char *msg,...) |
| void | UwacInstallErrorHandler (UwacErrorHandler handler) |
| static void | cb_shm_format (void *data, struct wl_shm *wl_shm, uint32_t format) |
| static void | xdg_shell_ping (void *data, struct xdg_wm_base *xdg_wm_base, uint32_t serial) |
| static void | display_destroy_seat (UwacDisplay *d, uint32_t name) |
| static void | UwacSeatRegisterDDM (UwacSeat *seat) |
| static void | UwacRegisterCursor (UwacSeat *seat) |
| static void | registry_handle_global (void *data, struct wl_registry *registry, uint32_t id, const char *interface, uint32_t version) |
| static void | registry_handle_global_remove (void *data, struct wl_registry *registry, uint32_t name) |
| static void | UwacDestroyGlobal (UwacGlobal *global) |
| static void * | display_bind (UwacDisplay *display, uint32_t name, const struct wl_interface *interface, uint32_t version) |
| int | UwacDisplayWatchFd (UwacDisplay *display, int fd, uint32_t events, UwacTask *task) |
| static void | UwacDisplayUnwatchFd (UwacDisplay *display, int fd) |
| static void | display_exit (UwacDisplay *display) |
| static void | display_dispatch_events (UwacTask *task, uint32_t events) |
| UwacDisplay * | UwacOpenDisplay (const char *name, UwacReturnCode *err) |
| int | UwacDisplayDispatch (UwacDisplay *display, int timeout) |
| UwacReturnCode | UwacDisplayGetLastError (const UwacDisplay *display) |
| UwacReturnCode | UwacCloseDisplay (UwacDisplay **pdisplay) |
| int | UwacDisplayGetFd (UwacDisplay *display) |
| const char * | UwacErrorString (UwacReturnCode error) |
| UwacReturnCode | UwacDisplayQueryInterfaceVersion (const UwacDisplay *display, const char *name, uint32_t *version) |
| uint32_t | UwacDisplayQueryGetNbShmFormats (UwacDisplay *display) |
| UwacReturnCode | UwacDisplayQueryShmFormats (const UwacDisplay *display, enum wl_shm_format *formats, int formats_size, int *filled) |
| uint32_t | UwacDisplayGetNbOutputs (const UwacDisplay *display) |
| const UwacOutput * | UwacDisplayGetOutput (UwacDisplay *display, int index) |
| UwacReturnCode | UwacOutputGetResolution (const UwacOutput *output, UwacSize *resolution) |
| UwacReturnCode | UwacOutputGetPosition (const UwacOutput *output, UwacPosition *pos) |
| UwacEvent * | UwacDisplayNewEvent (UwacDisplay *display, int type) |
| bool | UwacHasEvent (UwacDisplay *display) |
| UwacReturnCode | UwacNextEvent (UwacDisplay *display, UwacEvent *event) |
Variables | |
| static const char * | event_names [] |
| UwacErrorHandler | uwacErrorHandler = uwac_default_error_handler |
| static struct wl_shm_listener | shm_listener = { cb_shm_format } |
| static const struct xdg_wm_base_listener | xdg_wm_base_listener |
| static const struct wl_registry_listener | registry_listener |
| static const char * | errorStrings [] |
| #define TARGET_COMPOSITOR_INTERFACE 3U |
| #define TARGET_DDM_INTERFACE 1U |
| #define TARGET_SEAT_INTERFACE 5U |
| #define TARGET_SHELL_INTERFACE 1U |
| #define TARGET_SHM_INTERFACE 1U |
| #define TARGET_XDG_VERSION 5U /* The version of xdg-shell that we implement */ |
|
static |

|
static |
|
static |


|
static |


|
static |

|
static |

|
static |

|
static |

| UwacReturnCode UwacCloseDisplay | ( | UwacDisplay ** | pdisplay | ) |
closes the corresponding UwacDisplay
| pdisplay | a pointer on the display to close |


|
static |

| int UwacDisplayDispatch | ( | UwacDisplay * | display, |
| int | timeout | ||
| ) |
Dispatch the display
| display | The display to dispatch |
| timeout | The maximum time to wait in milliseconds (-1 == infinite). |

| int UwacDisplayGetFd | ( | UwacDisplay * | display | ) |
Returns the file descriptor associated with the UwacDisplay, this is useful when you want to poll that file descriptor for activity.
| display | an opened UwacDisplay |

| UwacReturnCode UwacDisplayGetLastError | ( | const UwacDisplay * | display | ) |
returns the last error that occurred on a display
| display | the display |
| uint32_t UwacDisplayGetNbOutputs | ( | const UwacDisplay * | display | ) |
returns the number of registered outputs
| display | the display to query |

| const UwacOutput* UwacDisplayGetOutput | ( | UwacDisplay * | display, |
| int | index | ||
| ) |
retrieve a particular UwacOutput object
| display | the display to query |
| index | index of the output |

| UwacEvent* UwacDisplayNewEvent | ( | UwacDisplay * | display, |
| int | type | ||
| ) |


| uint32_t UwacDisplayQueryGetNbShmFormats | ( | UwacDisplay * | display | ) |
returns the number SHM formats that have been reported by the compositor
| display | a connected UwacDisplay |
| UwacReturnCode UwacDisplayQueryInterfaceVersion | ( | const UwacDisplay * | display, |
| const char * | name, | ||
| uint32_t * | version | ||
| ) |
retrieves the version of a given interface
| display | the display connection |
| name | the name of the interface |
| version | the output variable for the version |
| UwacReturnCode UwacDisplayQueryShmFormats | ( | const UwacDisplay * | display, |
| enum wl_shm_format * | formats, | ||
| int | formats_size, | ||
| int * | filled | ||
| ) |
returns the supported ShmFormats
| display | a connected UwacDisplay |
| formats | a pointer on an array of wl_shm_format with enough place for formats_size items |
| formats_size | the size of the formats array |
| filled | the number of filled entries in the formats array |

|
static |
| int UwacDisplayWatchFd | ( | UwacDisplay * | display, |
| int | fd, | ||
| uint32_t | events, | ||
| UwacTask * | task | ||
| ) |

| const char* UwacErrorString | ( | UwacReturnCode | error | ) |
Returns a human readable form of a Uwac error code
| error | the error number |
| bool UwacHasEvent | ( | UwacDisplay * | display | ) |
Returns if you have some pending events, and you can UwacNextEvent() without blocking
| display | the UwacDisplay |

| void UwacInstallErrorHandler | ( | UwacErrorHandler | handler | ) |
install a handler that will be called when UWAC encounter internal errors. The handler is supposed to answer if the execution can continue. I can also be used to log things.
| handler | the error handling function to install |

| UwacReturnCode UwacNextEvent | ( | UwacDisplay * | display, |
| UwacEvent * | event | ||
| ) |
Waits until an event occurs, and when it's there copy the event from the queue to event.
| display | the Uwac display |
| event | the event to fill |


| UwacDisplay* UwacOpenDisplay | ( | const char * | name, |
| UwacReturnCode * | err | ||
| ) |
Opens the corresponding wayland display, using NULL you will open the default display.
| name | the name of the display to open |


| UwacReturnCode UwacOutputGetPosition | ( | const UwacOutput * | output, |
| UwacPosition * | pos | ||
| ) |
retrieve the position of a given UwacOutput
| output | the UwacOutput |
| pos | a pointer on the target position |

| UwacReturnCode UwacOutputGetResolution | ( | const UwacOutput * | output, |
| UwacSize * | resolution | ||
| ) |
retrieve the resolution of a given UwacOutput
| output | the UwacOutput |
| resolution | a pointer on the |

|
static |

|
static |

|
static |
|
static |
|
static |
|
static |
|
static |
| UwacErrorHandler uwacErrorHandler = uwac_default_error_handler |
|
static |