This commit is contained in:
Vincent Wei
2023-08-30 15:40:13 +08:00
parent 3d963b3d25
commit 890ab1db44
2 changed files with 15 additions and 3 deletions
+12 -3
View File
@@ -1772,7 +1772,7 @@ MG_EXPORT BOOL GUIAPI DestroySharedSurface (HSURF surf);
/**
* \fn int GUIAPI GetSharedSurfaceFDByClientWindow (int client,
* HWND hwnd)
* HWND hwnd, size_t *map_size, DWORD *flags)
* \brief Gets the file descriptor of the shared surface of a window created
* by another client.
*
@@ -1783,13 +1783,17 @@ MG_EXPORT BOOL GUIAPI DestroySharedSurface (HSURF surf);
*
* \param client The client identifier.
* \param hwnd The handle to the window created by the client.
* \param map_size The pointer to a buffer of size_t to receive the whole size
* of the shared surface in bytes; nullable.
* \param flags The pointer to a buffer of DWORD to receive the flags of
* the shared surface; nullable.
*
* \return The file descriptor which represents the shared surface on success;
* a value less than 0 for failure.
*
* \note This function only available when _MGSCHEMA_COMPOSITING is defined.
*
* \sa CreateSharedSurface
* \sa AttachToSharedSurface, GetWindowSharedSurfaceFD
*
* Since 5.2.0
*/
@@ -1797,7 +1801,8 @@ MG_EXPORT int GUIAPI GetSharedSurfaceFDByClientWindow (int client,
HWND hwnd, size_t *map_size, DWORD *flags);
/**
* \fn int GUIAPI GetSharedSurfaceFDByName (const char *name)
* \fn int GUIAPI GetSharedSurfaceFDByName (const char *name,
* size_t *map_size, DWORD *flags)
* \brief Gets the file descriptor of a shared surface by name.
*
* This function gets the file descriptor of the shared surface created
@@ -1806,6 +1811,10 @@ MG_EXPORT int GUIAPI GetSharedSurfaceFDByClientWindow (int client,
* the shared surface.
*
* \param name The gobal unique name for the shared surface.
* \param map_size The pointer to a buffer of size_t to receive the whole size
* of the shared surface in bytes; nullable.
* \param flags The pointer to a buffer of DWORD to receive the flags of
* the shared surface; nullable.
*
* \return The file descriptor which represents the shared surface on success;
* a value less than 0 for failure.
+3
View File
@@ -55,6 +55,7 @@
#include <signal.h>
#define _DEBUG
#include "common.h"
#include "minigui.h"
#include "gdi.h"
@@ -831,6 +832,7 @@ int __mg_nssurf_map_operate_srv(const OPERATENSSURFINFO* req_info,
switch (req_info->id_op) {
case ID_NAMEDSSURFOP_REGISTER:
_DBG_PRINTF("Registering name: %s from client: %d\n", req_info->name, cli);
entry = __mg_map_find(__nssurf_map, req_info->name);
if (entry)
goto done;
@@ -849,6 +851,7 @@ int __mg_nssurf_map_operate_srv(const OPERATENSSURFINFO* req_info,
}
add_global_res(cli, __nssurf_map, entry->key, release_nssurf_info);
result = 0;
break;
case ID_NAMEDSSURFOP_SET: