Remmina - The GTK+ Remote Desktop Client  v1.4.2
Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travellers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. Remmina supports multiple network protocols in an integrated and consistent user interface. Currently RDP, VNC, NX, XDMCP and SSH are supported.
vnc_plugin.h
Go to the documentation of this file.
1 /*
2  * Remmina - The GTK+ Remote Desktop Client
3  * Copyright (C) 2016-2020 Antenore Gatta, Giovanni Panozzo
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  *
20  * In addition, as a special exception, the copyright holders give
21  * permission to link the code of portions of this program with the
22  * OpenSSL library under certain conditions as described in each
23  * individual source file, and distribute linked combinations
24  * including the two.
25  * You must obey the GNU General Public License in all respects
26  * for all of the code used other than OpenSSL. * If you modify
27  * file(s) with this exception, you may extend this exception to your
28  * version of the file(s), but you are not obligated to do so. * If you
29  * do not wish to do so, delete this exception statement from your
30  * version. * If you delete this exception statement from all source
31  * files in the program, then also delete it here.
32  *
33  */
34 
35 #pragma once
36 
37 #ifndef __PLUGIN_CONFIG_H
38 #define __PLUGIN_CONFIG_H
39 
40 #define VNC_PLUGIN_NAME "VNC"
41 #define VNC_PLUGIN_DESCRIPTION N_("Remmina VNC Plugin")
42 #define VNC_PLUGIN_VERSION VERSION
43 #define VNC_PLUGIN_APPICON "remmina-vnc-symbolic"
44 #define VNC_PLUGIN_SSH_APPICON "remmina-vnc-ssh-symbolic"
45 #define VNCI_PLUGIN_NAME "VNCI"
46 #define VNCI_PLUGIN_DESCRIPTION N_("Remmina VNC listener Plugin")
47 #define VNCI_PLUGIN_VERSION VERSION
48 #define VNCI_PLUGIN_APPICON "remmina-vnc-symbolic"
49 #define VNCI_PLUGIN_SSH_APPICON "remmina-vnc-ssh-symbolic"
50 #endif
51 
52 typedef struct _RemminaPluginVncData {
53  /* Whether the user requests to connect/disconnect */
54  gboolean connected;
55  /* Whether the vnc process is running */
56  gboolean running;
57  /* Whether the initialization calls the authentication process */
58  gboolean auth_called;
59  /* Whether it is the first attempt for authentication. Only first attempt will try to use cached credentials */
60  gboolean auth_first;
61 
62  GtkWidget * drawing_area;
63  guchar * vnc_buffer;
64  cairo_surface_t * rgb_buffer;
65 
68 
70  GTimeVal clipboard_timer;
71 
72  cairo_surface_t * queuecursor_surface;
75 
76  gpointer client;
78 
80 
81  GPtrArray * pressed_keys;
82 
83  pthread_mutex_t vnc_event_queue_mutex;
84  GQueue * vnc_event_queue;
85  gint vnc_event_pipe[2];
86 
87  pthread_t thread;
88  pthread_mutex_t buffer_mutex;
90 
91 enum {
98 };
99 
100 typedef struct _RemminaPluginVncEvent {
102  union {
103  struct {
104  guint keyval;
105  gboolean pressed;
106  } key;
107  struct {
108  gint x;
109  gint y;
111  } pointer;
112  struct {
113  gchar *text;
114  } text;
115  } event_data;
117 
119  gint x, y;
121 
122 G_BEGIN_DECLS
123 
124 /* --------- Support for execution on main thread of GUI functions -------------- */
125 static void remmina_plugin_vnc_update_scale(RemminaProtocolWidget *gp, gboolean scale);
126 
127 G_END_DECLS
struct _RemminaPluginVncEvent RemminaPluginVncEvent
GtkWidget * drawing_area
Definition: vnc_plugin.h:62
GQueue * vnc_event_queue
Definition: vnc_plugin.h:84
cairo_surface_t * queuecursor_surface
Definition: vnc_plugin.h:72
struct _RemminaPluginVncData RemminaPluginVncData
GPtrArray * pressed_keys
Definition: vnc_plugin.h:81
cairo_surface_t * rgb_buffer
Definition: vnc_plugin.h:64
struct _RemminaPluginVncCoordinates RemminaPluginVncCoordinates
static G_BEGIN_DECLS void remmina_plugin_vnc_update_scale(RemminaProtocolWidget *gp, gboolean scale)
pthread_mutex_t buffer_mutex
Definition: vnc_plugin.h:88
GTimeVal clipboard_timer
Definition: vnc_plugin.h:70
pthread_mutex_t vnc_event_queue_mutex
Definition: vnc_plugin.h:83