cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

geometry.h (2107B)


      1/**
      2 * FreeRDP: A Remote Desktop Protocol Implementation
      3 * Geometry tracking Virtual Channel Extension
      4 *
      5 * Copyright 2017 David Fort <contact@hardening-consulting.com>
      6 *
      7 * Licensed under the Apache License, Version 2.0 (the "License");
      8 * you may not use this file except in compliance with the License.
      9 * You may obtain a copy of the License at
     10 *
     11 *     http://www.apache.org/licenses/LICENSE-2.0
     12 *
     13 * Unless required by applicable law or agreed to in writing, software
     14 * distributed under the License is distributed on an "AS IS" BASIS,
     15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 * See the License for the specific language governing permissions and
     17 * limitations under the License.
     18 */
     19
     20#ifndef FREERDP_CHANNELS_CLIENT_GEOMETRY_H
     21#define FREERDP_CHANNELS_CLIENT_GEOMETRY_H
     22
     23#include <winpr/collections.h>
     24#include <freerdp/api.h>
     25#include <freerdp/channels/geometry.h>
     26
     27/**
     28 * Client Interface
     29 */
     30typedef struct _geometry_client_context GeometryClientContext;
     31
     32typedef struct _MAPPED_GEOMETRY MAPPED_GEOMETRY;
     33typedef BOOL (*pcMappedGeometryAdded)(GeometryClientContext* context, MAPPED_GEOMETRY* geometry);
     34typedef BOOL (*pcMappedGeometryUpdate)(MAPPED_GEOMETRY* geometry);
     35typedef BOOL (*pcMappedGeometryClear)(MAPPED_GEOMETRY* geometry);
     36
     37/** @brief a geometry record tracked by the geometry channel */
     38struct _MAPPED_GEOMETRY
     39{
     40	volatile LONG refCounter;
     41	UINT64 mappingId;
     42	UINT64 topLevelId;
     43	INT32 left, top, right, bottom;
     44	INT32 topLevelLeft, topLevelTop, topLevelRight, topLevelBottom;
     45	FREERDP_RGNDATA geometry;
     46
     47	void* custom;
     48	pcMappedGeometryUpdate MappedGeometryUpdate;
     49	pcMappedGeometryClear MappedGeometryClear;
     50};
     51
     52/** @brief the geometry context for client channel */
     53struct _geometry_client_context
     54{
     55	wHashTable* geometries;
     56	void* handle;
     57	void* custom;
     58
     59	pcMappedGeometryAdded MappedGeometryAdded;
     60};
     61
     62#ifdef __cplusplus
     63extern "C"
     64{
     65#endif
     66
     67	FREERDP_API void mappedGeometryRef(MAPPED_GEOMETRY* g);
     68	FREERDP_API void mappedGeometryUnref(MAPPED_GEOMETRY* g);
     69
     70#ifdef __cplusplus
     71}
     72#endif
     73
     74#endif /* FREERDP_CHANNELS_CLIENT_GEOMETRY_H */