|
FreeRDP
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <fcntl.h>#include <unistd.h>#include <assert.h>#include <sys/mman.h>#include <errno.h>#include "uwac-priv.h"#include "uwac-utils.h"#include "uwac-os.h"#include <uwac/config.h>Macros | |
| #define | UWAC_INITIAL_BUFFERS 3 |
Functions | |
| static int | bppFromShmFormat (enum wl_shm_format format) |
| static void | buffer_release (void *data, struct wl_buffer *buffer) |
| static void | UwacWindowDestroyBuffers (UwacWindow *w) |
| static int | UwacWindowShmAllocBuffers (UwacWindow *w, int64_t nbuffers, int64_t allocSize, uint32_t width, uint32_t height, enum wl_shm_format format) |
| static void | xdg_handle_toplevel_configure (void *data, struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height, struct wl_array *states) |
| static void | xdg_handle_toplevel_close (void *data, struct xdg_toplevel *xdg_toplevel) |
| static void | xdg_handle_surface_configure (void *data, struct xdg_surface *xdg_surface, uint32_t serial) |
| static void | shell_ping (void *data, struct wl_shell_surface *surface, uint32_t serial) |
| static void | shell_configure (void *data, struct wl_shell_surface *surface, uint32_t edges, int32_t width, int32_t height) |
| static void | shell_popup_done (void *data, struct wl_shell_surface *surface) |
| static UwacBuffer * | UwacWindowFindFreeBuffer (UwacWindow *w, ssize_t *index) |
| static UwacReturnCode | UwacWindowSetDecorations (UwacWindow *w) |
| UwacWindow * | UwacCreateWindowShm (UwacDisplay *display, uint32_t width, uint32_t height, enum wl_shm_format format) |
| UwacReturnCode | UwacDestroyWindow (UwacWindow **pwindow) |
| UwacReturnCode | UwacWindowSetOpaqueRegion (UwacWindow *window, uint32_t x, uint32_t y, uint32_t width, uint32_t height) |
| UwacReturnCode | UwacWindowSetInputRegion (UwacWindow *window, uint32_t x, uint32_t y, uint32_t width, uint32_t height) |
| void * | UwacWindowGetDrawingBuffer (UwacWindow *window) |
| static void | frame_done_cb (void *data, struct wl_callback *callback, uint32_t time) |
| static void | damage_surface (UwacWindow *window, UwacBuffer *buffer, int scale) |
| static void | UwacSubmitBufferPtr (UwacWindow *window, UwacBuffer *buffer) |
| UwacReturnCode | UwacWindowAddDamage (UwacWindow *window, uint32_t x, uint32_t y, uint32_t width, uint32_t height) |
| UwacReturnCode | UwacWindowGetDrawingBufferGeometry (UwacWindow *window, UwacSize *geometry, size_t *stride) |
| UwacReturnCode | UwacWindowSubmitBuffer (UwacWindow *window, bool copyContentForNextFrame) |
| UwacReturnCode | UwacWindowGetGeometry (UwacWindow *window, UwacSize *geometry) |
| UwacReturnCode | UwacWindowSetFullscreenState (UwacWindow *window, UwacOutput *output, bool isFullscreen) |
| void | UwacWindowSetTitle (UwacWindow *window, const char *name) |
| void | UwacWindowSetAppId (UwacWindow *window, const char *app_id) |
Variables | |
| static const struct wl_buffer_listener | buffer_listener = { buffer_release } |
| static const struct xdg_toplevel_listener | xdg_toplevel_listener |
| static const struct xdg_surface_listener | xdg_surface_listener |
| static const struct wl_shell_surface_listener | shell_listener |
| static const struct wl_callback_listener | frame_listener = { frame_done_cb } |
| #define UWAC_INITIAL_BUFFERS 3 |
|
static |

|
static |
|
static |


|
static |

|
static |

|
static |
|
static |
| UwacWindow* UwacCreateWindowShm | ( | UwacDisplay * | display, |
| uint32_t | width, | ||
| uint32_t | height, | ||
| enum wl_shm_format | format | ||
| ) |
creates a window using a SHM surface
| display | the display to attach the window to |
| width | the width of the window |
| height | the heigh of the window |
| format | format to use for the SHM surface |


| UwacReturnCode UwacDestroyWindow | ( | UwacWindow ** | window | ) |
destroys the corresponding UwacWindow
| window | a pointer on the UwacWindow to destroy |


|
static |


| UwacReturnCode UwacWindowAddDamage | ( | UwacWindow * | window, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | width, | ||
| uint32_t | height | ||
| ) |
sets a rectangle as dirty for the next frame of a window
| window | the UwacWindow |
| x | left coordinate |
| y | top coordinate |
| width | the width of the dirty rectangle |
| height | the height of the dirty rectangle |


|
static |


|
static |


| void* UwacWindowGetDrawingBuffer | ( | UwacWindow * | window | ) |
retrieves a pointer on the current window content to draw a frame
| window | the UwacWindow |

| UwacReturnCode UwacWindowGetDrawingBufferGeometry | ( | UwacWindow * | window, |
| UwacSize * | geometry, | ||
| size_t * | stride | ||
| ) |
returns the geometry of the given UwacWindow buffer
| window | the UwacWindow |
| geometry | the geometry to fill |
| stride | the length of a buffer line in bytes |

| UwacReturnCode UwacWindowGetGeometry | ( | UwacWindow * | window, |
| UwacSize * | geometry | ||
| ) |
returns the geometry of the given UwacWindows
| window | the UwacWindow |
| geometry | the geometry to fill |
| void UwacWindowSetAppId | ( | UwacWindow * | window, |
| const char * | app_id | ||
| ) |
Sets the app id of the UwacWindow
| window | the UwacWindow |
| app_id | app id |

|
static |

| UwacReturnCode UwacWindowSetFullscreenState | ( | UwacWindow * | window, |
| UwacOutput * | output, | ||
| bool | isFullscreen | ||
| ) |
Sets or unset the fact that the window is set fullscreen. After this call the application should get prepared to receive a configure event. The output is used only when going fullscreen, it is optional and not used when exiting fullscreen.
| window | the UwacWindow |
| output | an optional UwacOutput to put the window fullscreen on |
| isFullscreen | set or unset fullscreen |

| UwacReturnCode UwacWindowSetInputRegion | ( | UwacWindow * | window, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | width, | ||
| uint32_t | height | ||
| ) |
Sets the region of the window that can trigger input events
| window | the UwacWindow |
| x | The horizontal coordinate in pixels |
| y | The vertical coordinate in pixels |
| width | The width of the region |
| height | The height of the region |
| UwacReturnCode UwacWindowSetOpaqueRegion | ( | UwacWindow * | window, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | width, | ||
| uint32_t | height | ||
| ) |
Sets the region that should be considered opaque to the compositor.
| window | the UwacWindow |
| x | The horizontal coordinate in pixels |
| y | The vertical coordinate in pixels |
| width | The width of the region |
| height | The height of the region |

| void UwacWindowSetTitle | ( | UwacWindow * | window, |
| const char * | name | ||
| ) |
When possible (depending on the shell) sets the title of the UwacWindow
| window | the UwacWindow |
| name | title |

|
static |


| UwacReturnCode UwacWindowSubmitBuffer | ( | UwacWindow * | window, |
| bool | copyContentForNextFrame | ||
| ) |
Sends a frame to the compositor with the content of the drawing buffer
| window | the UwacWindow to refresh |
| copyContentForNextFrame | if true the content to display is copied in the next drawing buffer |


|
static |
|
static |

|
static |

|
static |
|
static |
|
static |
|
static |
|
static |