[gtk-vnc-devel] [patch] - get() for all properties
- From: Jonh Wendell <jwendell gnome org>
- To: gtk-vnc-devel List <gtk-vnc-devel lists sourceforge net>
- Subject: [gtk-vnc-devel] [patch] - get() for all properties
- Date: Wed, 12 Mar 2008 12:38:46 -0300
Hi, folks.
In this patch I added vnd_display_get_XXX() for all properties we can
set via vnc_display_set_XXX().
Also, I initialized all of them to their default values, in the
constructor.
Ok to commit?
--
Jonh Wendell
www.bani.com.br
diff -r f7fc5cf7bef0 src/libgtk-vnc_sym.version
--- a/src/libgtk-vnc_sym.version Wed Mar 12 08:58:33 2008 -0500
+++ b/src/libgtk-vnc_sym.version Wed Mar 12 12:23:52 2008 -0300
@@ -17,9 +17,16 @@
vnc_display_set_credential;
vnc_display_set_pointer_local;
+ vnc_display_get_pointer_local;
+
vnc_display_set_pointer_grab;
+ vnc_display_get_pointer_grab;
+
vnc_display_set_keyboard_grab;
+ vnc_display_get_keyboard_grab;
+
vnc_display_set_read_only;
+ vnc_display_get_read_only;
vnc_display_get_pixbuf;
@@ -30,7 +37,11 @@
vnc_display_client_cut_text;
vnc_display_set_lossy_encoding;
+ vnc_display_get_lossy_encoding;
+
vnc_display_set_scaling;
+ vnc_display_get_scaling;
+
vnc_display_force_grab;
vnc_display_is_pointer_absolute;
diff -r f7fc5cf7bef0 src/vncdisplay.c
--- a/src/vncdisplay.c Wed Mar 12 08:58:33 2008 -0500
+++ b/src/vncdisplay.c Wed Mar 12 12:23:52 2008 -0300
@@ -1851,6 +1851,12 @@ static void vnc_display_init(VncDisplay
priv->last_y = -1;
priv->absolute = 1;
priv->fd = -1;
+ priv->read_only = FALSE;
+ priv->allow_lossy = FALSE;
+ priv->allow_scaling = FALSE;
+ priv->grab_pointer = FALSE;
+ priv->grab_keyboard = FALSE;
+ priv->local_pointer = FALSE;
#if WITH_GTKGLEXT
if (gtk_gl_init_check(NULL, NULL)) {
@@ -2096,6 +2102,42 @@ gboolean vnc_display_set_scaling(VncDisp
}
#endif
+gboolean vnc_display_get_scaling(VncDisplay *obj) {
+ g_return_val_if_fail (VNC_IS_DISPLAY (obj), FALSE);
+
+ return obj->priv->allow_scaling;
+}
+
+gboolean vnc_display_get_lossy_encoding(VncDisplay *obj) {
+ g_return_val_if_fail (VNC_IS_DISPLAY (obj), FALSE);
+
+ return obj->priv->allow_lossy;
+}
+
+gboolean vnc_display_get_pointer_local(VncDisplay *obj) {
+ g_return_val_if_fail (VNC_IS_DISPLAY (obj), FALSE);
+
+ return obj->priv->local_pointer;
+}
+
+gboolean vnc_display_get_pointer_grab(VncDisplay *obj) {
+ g_return_val_if_fail (VNC_IS_DISPLAY (obj), FALSE);
+
+ return obj->priv->grab_pointer;
+}
+
+gboolean vnc_display_get_keyboard_grab(VncDisplay *obj) {
+ g_return_val_if_fail (VNC_IS_DISPLAY (obj), FALSE);
+
+ return obj->priv->grab_keyboard;
+}
+
+gboolean vnc_display_get_read_only(VncDisplay *obj) {
+ g_return_val_if_fail (VNC_IS_DISPLAY (obj), FALSE);
+
+ return obj->priv->read_only;
+}
+
gboolean vnc_display_is_pointer_absolute(VncDisplay *obj)
{
return obj->priv->absolute;
diff -r f7fc5cf7bef0 src/vncdisplay.h
--- a/src/vncdisplay.h Wed Mar 12 08:58:33 2008 -0500
+++ b/src/vncdisplay.h Wed Mar 12 12:23:52 2008 -0300
@@ -91,9 +91,16 @@ gboolean vnc_display_set_credential(VncD
gboolean vnc_display_set_credential(VncDisplay *obj, int type, const gchar *data);
void vnc_display_set_pointer_local(VncDisplay *obj, gboolean enable);
+gboolean vnc_display_get_pointer_local(VncDisplay *obj);
+
void vnc_display_set_pointer_grab(VncDisplay *obj, gboolean enable);
+gboolean vnc_display_get_pointer_grab(VncDisplay *obj);
+
void vnc_display_set_keyboard_grab(VncDisplay *obj, gboolean enable);
+gboolean vnc_display_get_keyboard_grab(VncDisplay *obj);
+
void vnc_display_set_read_only(VncDisplay *obj, gboolean enable);
+gboolean vnc_display_get_read_only(VncDisplay *obj);
GdkPixbuf * vnc_display_get_pixbuf(VncDisplay *obj);
@@ -104,8 +111,10 @@ void vnc_display_client_cut_text(VncDis
void vnc_display_client_cut_text(VncDisplay *obj, const gchar *text);
void vnc_display_set_lossy_encoding(VncDisplay *obj, gboolean enable);
+gboolean vnc_display_get_lossy_encoding(VncDisplay *obj);
gboolean vnc_display_set_scaling(VncDisplay *obj, gboolean enable);
+gboolean vnc_display_get_scaling(VncDisplay *obj);
void vnc_display_force_grab(VncDisplay *obj, gboolean enable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]