disp.h (2142B)
1/** 2 * FreeRDP: A Remote Desktop Protocol Implementation 3 * RDPEDISP Virtual Channel Extension 4 * 5 * Copyright 2019 Kobi Mizrachi <kmizrachi18@gmail.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_CHANNEL_DISP_SERVER_DISP_H 21#define FREERDP_CHANNEL_DISP_SERVER_DISP_H 22 23#include <freerdp/channels/disp.h> 24 25#include <freerdp/freerdp.h> 26#include <freerdp/api.h> 27#include <freerdp/types.h> 28 29typedef struct _disp_server_private DispServerPrivate; 30typedef struct _disp_server_context DispServerContext; 31 32typedef BOOL (*psDispChannelIdAssigned)(DispServerContext* context, UINT32 channelId); 33 34typedef UINT (*psDispMonitorLayout)(DispServerContext* context, 35 const DISPLAY_CONTROL_MONITOR_LAYOUT_PDU* pdu); 36typedef UINT (*psDispCaps)(DispServerContext* context); 37typedef UINT (*psDispOpen)(DispServerContext* context); 38typedef UINT (*psDispClose)(DispServerContext* context); 39 40struct _disp_server_context 41{ 42 void* custom; 43 HANDLE vcm; 44 45 /* Server capabilities */ 46 UINT32 MaxNumMonitors; 47 UINT32 MaxMonitorAreaFactorA; 48 UINT32 MaxMonitorAreaFactorB; 49 50 psDispOpen Open; 51 psDispClose Close; 52 53 psDispMonitorLayout DispMonitorLayout; 54 psDispCaps DisplayControlCaps; 55 56 DispServerPrivate* priv; 57 rdpContext* rdpcontext; 58 59 /** 60 * Callback, when the channel got its id assigned. 61 */ 62 psDispChannelIdAssigned ChannelIdAssigned; 63}; 64 65#ifdef __cplusplus 66extern "C" 67{ 68#endif 69 70 FREERDP_API DispServerContext* disp_server_context_new(HANDLE vcm); 71 FREERDP_API void disp_server_context_free(DispServerContext* context); 72 73#ifdef __cplusplus 74} 75#endif 76 77#endif /* FREERDP_CHANNEL_DISP_SERVER_DISP_H */