|
Packit Service |
fa4841 |
/**
|
|
Packit Service |
fa4841 |
* FreeRDP: A Remote Desktop Protocol Implementation
|
|
Packit Service |
fa4841 |
* Graphics Pipeline Extension
|
|
Packit Service |
fa4841 |
*
|
|
Packit Service |
fa4841 |
* Copyright 2013 Marc-Andre Moreau <marcandre.moreau@gmail.com>
|
|
Packit Service |
fa4841 |
* Copyright 2015 Thincast Technologies GmbH
|
|
Packit Service |
fa4841 |
* Copyright 2015 DI (FH) Martin Haimberger <martin.haimberger@thincast.com>
|
|
Packit Service |
fa4841 |
*
|
|
Packit Service |
fa4841 |
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
Packit Service |
fa4841 |
* you may not use this file except in compliance with the License.
|
|
Packit Service |
fa4841 |
* You may obtain a copy of the License at
|
|
Packit Service |
fa4841 |
*
|
|
Packit Service |
fa4841 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit Service |
fa4841 |
*
|
|
Packit Service |
fa4841 |
* Unless required by applicable law or agreed to in writing, software
|
|
Packit Service |
fa4841 |
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
Packit Service |
fa4841 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
Packit Service |
fa4841 |
* See the License for the specific language governing permissions and
|
|
Packit Service |
fa4841 |
* limitations under the License.
|
|
Packit Service |
fa4841 |
*/
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
#ifndef FREERDP_CHANNEL_RDPGFX_CLIENT_RDPGFX_H
|
|
Packit Service |
fa4841 |
#define FREERDP_CHANNEL_RDPGFX_CLIENT_RDPGFX_H
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
#include <freerdp/channels/rdpgfx.h>
|
|
Packit Service |
fa4841 |
#include <freerdp/utils/profiler.h>
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
/**
|
|
Packit Service |
fa4841 |
* Client Interface
|
|
Packit Service |
fa4841 |
*/
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
typedef struct _rdpgfx_client_context RdpgfxClientContext;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxResetGraphics)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_RESET_GRAPHICS_PDU* resetGraphics);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxStartFrame)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_START_FRAME_PDU* startFrame);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxEndFrame)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_END_FRAME_PDU* endFrame);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxSurfaceCommand)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_SURFACE_COMMAND* cmd);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxDeleteEncodingContext)(
|
|
Packit Service |
fa4841 |
RdpgfxClientContext* context, const RDPGFX_DELETE_ENCODING_CONTEXT_PDU* deleteEncodingContext);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxCreateSurface)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_CREATE_SURFACE_PDU* createSurface);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxDeleteSurface)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_DELETE_SURFACE_PDU* deleteSurface);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxSolidFill)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_SOLID_FILL_PDU* solidFill);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxSurfaceToSurface)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_SURFACE_TO_SURFACE_PDU* surfaceToSurface);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxSurfaceToCache)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxCacheToSurface)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_CACHE_TO_SURFACE_PDU* cacheToSurface);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxCacheImportOffer)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_CACHE_IMPORT_OFFER_PDU* cacheImportOffer);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxCacheImportReply)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_CACHE_IMPORT_REPLY_PDU* cacheImportReply);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxEvictCacheEntry)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_EVICT_CACHE_ENTRY_PDU* evictCacheEntry);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxMapSurfaceToOutput)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_MAP_SURFACE_TO_OUTPUT_PDU* surfaceToOutput);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxMapSurfaceToScaledOutput)(
|
|
Packit Service |
fa4841 |
RdpgfxClientContext* context, const RDPGFX_MAP_SURFACE_TO_SCALED_OUTPUT_PDU* surfaceToOutput);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxMapSurfaceToWindow)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_MAP_SURFACE_TO_WINDOW_PDU* surfaceToWindow);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxMapSurfaceToScaledWindow)(
|
|
Packit Service |
fa4841 |
RdpgfxClientContext* context, const RDPGFX_MAP_SURFACE_TO_SCALED_WINDOW_PDU* surfaceToWindow);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxSetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId, void* pData);
|
|
Packit Service |
fa4841 |
typedef void* (*pcRdpgfxGetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxGetSurfaceIds)(RdpgfxClientContext* context, UINT16** ppSurfaceIds,
|
|
Packit Service |
fa4841 |
UINT16* count);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxSetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot,
|
|
Packit Service |
fa4841 |
void* pData);
|
|
Packit Service |
fa4841 |
typedef void* (*pcRdpgfxGetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot);
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxUpdateSurfaces)(RdpgfxClientContext* context);
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxUpdateSurfaceArea)(RdpgfxClientContext* context, UINT16 surfaceId,
|
|
Packit Service |
fa4841 |
UINT32 nrRects, const RECTANGLE_16* rects);
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxOnOpen)(RdpgfxClientContext* context, BOOL* do_caps_advertise,
|
|
Packit Service |
fa4841 |
BOOL* do_frame_acks);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxOnClose)(RdpgfxClientContext* context);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxCapsAdvertise)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_CAPS_ADVERTISE_PDU* capsAdvertise);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxCapsConfirm)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_CAPS_CONFIRM_PDU* capsConfirm);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxFrameAcknowledge)(RdpgfxClientContext* context,
|
|
Packit Service |
fa4841 |
const RDPGFX_FRAME_ACKNOWLEDGE_PDU* frameAcknowledge);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxQoeFrameAcknowledge)(
|
|
Packit Service |
fa4841 |
RdpgfxClientContext* context, const RDPGFX_QOE_FRAME_ACKNOWLEDGE_PDU* qoeFrameAcknowledge);
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxMapWindowForSurface)(RdpgfxClientContext* context, UINT16 surfaceID,
|
|
Packit Service |
fa4841 |
UINT64 windowID);
|
|
Packit Service |
fa4841 |
typedef UINT (*pcRdpgfxUnmapWindowForSurface)(RdpgfxClientContext* context, UINT64 windowID);
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
struct _rdpgfx_client_context
|
|
Packit Service |
fa4841 |
{
|
|
Packit Service |
fa4841 |
void* handle;
|
|
Packit Service |
fa4841 |
void* custom;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
/* Implementations require locking */
|
|
Packit Service |
fa4841 |
pcRdpgfxResetGraphics ResetGraphics;
|
|
Packit Service |
fa4841 |
pcRdpgfxStartFrame StartFrame;
|
|
Packit Service |
fa4841 |
pcRdpgfxEndFrame EndFrame;
|
|
Packit Service |
fa4841 |
pcRdpgfxSurfaceCommand SurfaceCommand;
|
|
Packit Service |
fa4841 |
pcRdpgfxDeleteEncodingContext DeleteEncodingContext;
|
|
Packit Service |
fa4841 |
pcRdpgfxCreateSurface CreateSurface;
|
|
Packit Service |
fa4841 |
pcRdpgfxDeleteSurface DeleteSurface;
|
|
Packit Service |
fa4841 |
pcRdpgfxSolidFill SolidFill;
|
|
Packit Service |
fa4841 |
pcRdpgfxSurfaceToSurface SurfaceToSurface;
|
|
Packit Service |
fa4841 |
pcRdpgfxSurfaceToCache SurfaceToCache;
|
|
Packit Service |
fa4841 |
pcRdpgfxCacheToSurface CacheToSurface;
|
|
Packit Service |
fa4841 |
pcRdpgfxCacheImportOffer CacheImportOffer;
|
|
Packit Service |
fa4841 |
pcRdpgfxCacheImportReply CacheImportReply;
|
|
Packit Service |
fa4841 |
pcRdpgfxEvictCacheEntry EvictCacheEntry;
|
|
Packit Service |
fa4841 |
pcRdpgfxMapSurfaceToOutput MapSurfaceToOutput;
|
|
Packit Service |
fa4841 |
pcRdpgfxMapSurfaceToScaledOutput MapSurfaceToScaledOutput;
|
|
Packit Service |
fa4841 |
pcRdpgfxMapSurfaceToWindow MapSurfaceToWindow;
|
|
Packit Service |
fa4841 |
pcRdpgfxMapSurfaceToScaledWindow MapSurfaceToScaledWindow;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
pcRdpgfxGetSurfaceIds GetSurfaceIds;
|
|
Packit Service |
fa4841 |
pcRdpgfxSetSurfaceData SetSurfaceData;
|
|
Packit Service |
fa4841 |
pcRdpgfxGetSurfaceData GetSurfaceData;
|
|
Packit Service |
fa4841 |
pcRdpgfxSetCacheSlotData SetCacheSlotData;
|
|
Packit Service |
fa4841 |
pcRdpgfxGetCacheSlotData GetCacheSlotData;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
/* Proxy callbacks */
|
|
Packit Service |
fa4841 |
pcRdpgfxOnOpen OnOpen;
|
|
Packit Service |
fa4841 |
pcRdpgfxOnClose OnClose;
|
|
Packit Service |
fa4841 |
pcRdpgfxCapsAdvertise CapsAdvertise;
|
|
Packit Service |
fa4841 |
pcRdpgfxCapsConfirm CapsConfirm;
|
|
Packit Service |
fa4841 |
pcRdpgfxFrameAcknowledge FrameAcknowledge;
|
|
Packit Service |
fa4841 |
pcRdpgfxQoeFrameAcknowledge QoeFrameAcknowledge;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
/* No locking required */
|
|
Packit Service |
fa4841 |
pcRdpgfxUpdateSurfaces UpdateSurfaces;
|
|
Packit Service |
fa4841 |
pcRdpgfxUpdateSurfaceArea UpdateSurfaceArea;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
/* These callbacks allow crating/destroying a window directly
|
|
Packit Service |
fa4841 |
* mapped to a surface.
|
|
Packit Service |
fa4841 |
* NOTE: The surface is already locked.
|
|
Packit Service |
fa4841 |
*/
|
|
Packit Service |
fa4841 |
pcRdpgfxMapWindowForSurface MapWindowForSurface;
|
|
Packit Service |
fa4841 |
pcRdpgfxUnmapWindowForSurface UnmapWindowForSurface;
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
CRITICAL_SECTION mux;
|
|
Packit Service |
fa4841 |
PROFILER_DEFINE(SurfaceProfiler)
|
|
Packit Service |
fa4841 |
};
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
FREERDP_API RdpgfxClientContext* rdpgfx_client_context_new(rdpSettings* settings);
|
|
Packit Service |
fa4841 |
FREERDP_API void rdpgfx_client_context_free(RdpgfxClientContext* context);
|
|
Packit Service |
fa4841 |
|
|
Packit Service |
fa4841 |
#endif /* FREERDP_CHANNEL_RDPGFX_CLIENT_RDPGFX_H */
|