remmina_scrolled_viewport.h 2.86 KB
Newer Older
Antenore Gatta's avatar
Antenore Gatta committed
1 2
/*
 * Remmina - The GTK+ Remote Desktop Client
3
 * Copyright (C) 2009 - Vic Lee
4
 * Copyright (C) 2017-2018 Antenore Gatta, Giovanni Panozzo
Antenore Gatta's avatar
Antenore Gatta committed
5 6 7 8 9 10 11 12 13 14 15 16 17
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
Antenore Gatta's avatar
Antenore Gatta committed
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
 * Boston, MA  02110-1301, USA.
 *
 *  In addition, as a special exception, the copyright holders give
 *  permission to link the code of portions of this program with the
 *  OpenSSL library under certain conditions as described in each
 *  individual source file, and distribute linked combinations
 *  including the two.
 *  You must obey the GNU General Public License in all respects
 *  for all of the code used other than OpenSSL. *  If you modify
 *  file(s) with this exception, you may extend this exception to your
 *  version of the file(s), but you are not obligated to do so. *  If you
 *  do not wish to do so, delete this exception statement from your
 *  version. *  If you delete this exception statement from all source
 *  files in the program, then also delete it here.
 *
 */
35

36
#pragma once
37 38 39 40

G_BEGIN_DECLS

#define REMMINA_TYPE_SCROLLED_VIEWPORT \
Antenore Gatta's avatar
Antenore Gatta committed
41
	(remmina_scrolled_viewport_get_type())
42
#define REMMINA_SCROLLED_VIEWPORT(obj) \
Antenore Gatta's avatar
Antenore Gatta committed
43
	(G_TYPE_CHECK_INSTANCE_CAST((obj), REMMINA_TYPE_SCROLLED_VIEWPORT, RemminaScrolledViewport))
44
#define REMMINA_SCROLLED_VIEWPORT_CLASS(klass) \
Antenore Gatta's avatar
Antenore Gatta committed
45
	(G_TYPE_CHECK_CLASS_CAST((klass), REMMINA_TYPE_SCROLLED_VIEWPORT, RemminaScrolledViewportClass))
46
#define REMMINA_IS_SCROLLED_VIEWPORT(obj) \
Antenore Gatta's avatar
Antenore Gatta committed
47
	(G_TYPE_CHECK_INSTANCE_TYPE((obj), REMMINA_TYPE_SCROLLED_VIEWPORT))
48
#define REMMINA_IS_SCROLLED_VIEWPORT_CLASS(klass) \
Antenore Gatta's avatar
Antenore Gatta committed
49
	(G_TYPE_CHECK_CLASS_TYPE((klass), REMMINA_TYPE_SCROLLED_VIEWPORT))
50
#define REMMINA_SCROLLED_VIEWPORT_GET_CLASS(obj) \
Antenore Gatta's avatar
Antenore Gatta committed
51
	(G_TYPE_INSTANCE_GET_CLASS((obj), REMMINA_TYPE_SCROLLED_VIEWPORT, RemminaScrolledViewportClass))
52

Antenore Gatta's avatar
Antenore Gatta committed
53
typedef struct _RemminaScrolledViewport {
54
	GtkEventBox event_box;
55

56 57 58
	/* Motion activates in Viewport Fullscreen mode */
	gboolean viewport_motion;
	guint viewport_motion_handler;
59 60 61

} RemminaScrolledViewport;

Antenore Gatta's avatar
Antenore Gatta committed
62
typedef struct _RemminaScrolledViewportClass {
63
	GtkEventBoxClass parent_class;
64 65
} RemminaScrolledViewportClass;

66 67
GType remmina_scrolled_viewport_get_type(void)
G_GNUC_CONST;
68

69 70
GtkWidget* remmina_scrolled_viewport_new(void);
void remmina_scrolled_viewport_remove_motion(RemminaScrolledViewport *gsv);
71 72 73 74

G_END_DECLS