2013-12-29 04:53:12 +00:00
|
|
|
/*
|
2016-03-25 19:59:40 +00:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
* or more contributor license agreements. See the NOTICE file
|
|
|
|
* distributed with this work for additional information
|
|
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
|
|
* to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance
|
|
|
|
* with the License. You may obtain a copy of the License at
|
2012-01-03 21:39:59 +00:00
|
|
|
*
|
2016-03-25 19:59:40 +00:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2012-01-03 21:39:59 +00:00
|
|
|
*
|
2016-03-25 19:59:40 +00:00
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
* software distributed under the License is distributed on an
|
|
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
* KIND, either express or implied. See the License for the
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2013-12-29 04:53:12 +00:00
|
|
|
*/
|
|
|
|
|
2019-12-23 21:29:13 +00:00
|
|
|
#ifndef GUAC_RDP_POINTER_H
|
|
|
|
#define GUAC_RDP_POINTER_H
|
2012-01-03 21:39:59 +00:00
|
|
|
|
2014-01-01 22:44:28 +00:00
|
|
|
#include "config.h"
|
2016-09-12 00:28:50 +00:00
|
|
|
#include "common/display.h"
|
2014-01-01 22:44:28 +00:00
|
|
|
|
2012-01-03 21:39:59 +00:00
|
|
|
#include <freerdp/freerdp.h>
|
|
|
|
|
2016-03-01 05:50:00 +00:00
|
|
|
/**
|
|
|
|
* Guacamole-specific rdpPointer data.
|
|
|
|
*/
|
2012-01-03 21:39:59 +00:00
|
|
|
typedef struct guac_rdp_pointer {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* FreeRDP pointer data - MUST GO FIRST.
|
|
|
|
*/
|
|
|
|
rdpPointer pointer;
|
|
|
|
|
2012-02-16 22:32:23 +00:00
|
|
|
/**
|
2016-03-01 05:50:00 +00:00
|
|
|
* The display layer containing cached image data.
|
2012-02-16 22:32:23 +00:00
|
|
|
*/
|
2016-03-01 05:50:00 +00:00
|
|
|
guac_common_display_layer* layer;
|
2012-01-03 21:39:59 +00:00
|
|
|
|
|
|
|
} guac_rdp_pointer;
|
|
|
|
|
2016-03-01 05:50:00 +00:00
|
|
|
/**
|
|
|
|
* Caches a new pointer, which can later be set via guac_rdp_pointer_set() as
|
|
|
|
* the current mouse pointer.
|
|
|
|
*
|
2016-03-07 23:05:31 +00:00
|
|
|
* @param context
|
|
|
|
* The rdpContext associated with the current RDP session.
|
|
|
|
*
|
|
|
|
* @param pointer
|
|
|
|
* The pointer to cache.
|
2019-12-28 20:29:09 +00:00
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* TRUE if successful, FALSE otherwise.
|
2016-03-01 05:50:00 +00:00
|
|
|
*/
|
2019-09-22 18:10:01 +00:00
|
|
|
BOOL guac_rdp_pointer_new(rdpContext* context, rdpPointer* pointer);
|
2016-03-01 05:50:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the given cached pointer as the current pointer. The given pointer must
|
|
|
|
* have already been initialized through a call to guac_rdp_pointer_new().
|
|
|
|
*
|
2016-03-07 23:05:31 +00:00
|
|
|
* @param context
|
|
|
|
* The rdpContext associated with the current RDP session.
|
|
|
|
*
|
|
|
|
* @param pointer
|
|
|
|
* The pointer to set as the current mouse pointer.
|
2019-12-28 20:29:09 +00:00
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* TRUE if successful, FALSE otherwise.
|
2016-03-01 05:50:00 +00:00
|
|
|
*/
|
2019-09-22 18:10:01 +00:00
|
|
|
BOOL guac_rdp_pointer_set(rdpContext* context, const rdpPointer* pointer);
|
2016-03-01 05:50:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Frees all Guacamole-related data associated with the given pointer, allowing
|
|
|
|
* FreeRDP to free the rest safely.
|
|
|
|
*
|
2016-03-07 23:05:31 +00:00
|
|
|
* @param context
|
|
|
|
* The rdpContext associated with the current RDP session.
|
|
|
|
*
|
|
|
|
* @param pointer
|
|
|
|
* The pointer to free.
|
2016-03-01 05:50:00 +00:00
|
|
|
*/
|
2012-01-03 21:39:59 +00:00
|
|
|
void guac_rdp_pointer_free(rdpContext* context, rdpPointer* pointer);
|
2016-03-01 05:50:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Hides the current mouse pointer.
|
|
|
|
*
|
2016-03-07 23:05:31 +00:00
|
|
|
* @param context
|
|
|
|
* The rdpContext associated with the current RDP session.
|
2019-12-28 20:29:09 +00:00
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* TRUE if successful, FALSE otherwise.
|
2016-03-01 05:50:00 +00:00
|
|
|
*/
|
2017-03-26 02:59:04 +00:00
|
|
|
BOOL guac_rdp_pointer_set_null(rdpContext* context);
|
2016-03-01 05:50:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the system-dependent (as in dependent on the client system) default
|
|
|
|
* pointer as the current pointer, rather than a cached pointer.
|
|
|
|
*
|
2016-03-07 23:05:31 +00:00
|
|
|
* @param context
|
|
|
|
* The rdpContext associated with the current RDP session.
|
2019-12-28 20:29:09 +00:00
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* TRUE if successful, FALSE otherwise.
|
2016-03-01 05:50:00 +00:00
|
|
|
*/
|
2017-03-26 02:59:04 +00:00
|
|
|
BOOL guac_rdp_pointer_set_default(rdpContext* context);
|
2012-01-03 21:39:59 +00:00
|
|
|
|
|
|
|
#endif
|