guacamole-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmuehl...@apache.org
Subject [1/2] incubator-guacamole-manual git commit: GUACAMOLE-88: Re-apply fixes omitted from failed merge of pull request #17 (d5f3ea90a5f080db6ca73b3af241211980cb8d8a).
Date Thu, 20 Oct 2016 05:25:44 GMT
Repository: incubator-guacamole-manual
Updated Branches:
  refs/heads/master d5f3ea90a -> 7d53ce224


GUACAMOLE-88: Re-apply fixes omitted from failed merge of pull request #17 (d5f3ea90a5f080db6ca73b3af241211980cb8d8a).


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/commit/4e065c74
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/tree/4e065c74
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/diff/4e065c74

Branch: refs/heads/master
Commit: 4e065c7487181453601df3a414eb4cc4526cf13c
Parents: d5f3ea9
Author: Michael Jumper <mjumper@apache.org>
Authored: Wed Oct 19 12:25:27 2016 -0700
Committer: Michael Jumper <mjumper@apache.org>
Committed: Wed Oct 19 22:17:54 2016 -0700

----------------------------------------------------------------------
 src/chapters/adding-protocol.xml           | 37 ++++++++++++++-----------
 tutorials/libguac-client-ball/configure.ac |  1 +
 tutorials/libguac-client-ball/src/ball.c   | 15 ++++++----
 3 files changed, 31 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/blob/4e065c74/src/chapters/adding-protocol.xml
----------------------------------------------------------------------
diff --git a/src/chapters/adding-protocol.xml b/src/chapters/adding-protocol.xml
index cf19e90..cfe115d 100644
--- a/src/chapters/adding-protocol.xml
+++ b/src/chapters/adding-protocol.xml
@@ -202,6 +202,7 @@ AC_CONFIG_MACRO_DIRS([m4])
 
 # Check for required build tools
 AC_PROG_CC
+AC_PROG_CC_C99
 AC_PROG_LIBTOOL
 
 # Check for libguac (http://guac-dev.org/)
@@ -267,10 +268,11 @@ libguac_client_ball_la_LDFLAGS = -version-info 0:0:0</programlisting></para>
     /* Send the display size */
     guac_protocol_send_size(socket, GUAC_DEFAULT_LAYER, 1024, 768);
 
-    /* Fill with solid color */
+    /* Prepare a curve which covers the entire layer */
     guac_protocol_send_rect(socket, GUAC_DEFAULT_LAYER,
             0, 0, 1024, 768);
 
+    /* Fill curve with solid color */
     guac_protocol_send_cfill(socket,
             GUAC_COMP_OVER, GUAC_DEFAULT_LAYER,
             0x80, 0x80, 0x80, 0xFF);
@@ -343,10 +345,10 @@ int guac_client_init(guac_client* client) {
             bounce. While we could repeatedly draw and erase a ball on the remote display,
a more
             efficient technique would be to leverage Guacamole's layers.</para>
         <para>The remote display has a single root layer, <varname>GUAC_DEFAULT_LAYER</varname>,
but
-            there can be infinitely many other child layers, which can have themselves have
child
-            layers, and so on. Each layer can be dynamically repositioned within and relative
to
-            another layer. Because the compositing of these layers is handled by the remote
display,
-            and is likely hardware-accelerated, this is a much better way to repeatedly reposition
+            there can be infinitely many other child layers, which can themselves have child
layers,
+            and so on. Each layer can be dynamically repositioned within and relative to
another
+            layer. Because the compositing of these layers is handled by the remote display,
and is
+            likely hardware-accelerated, this is a much better way to repeatedly reposition
             something we expect to move a lot.</para>
         <para>Since we're finally adding the ball, and there needs to be some structure
which
             maintains the state of the ball, we must create a header file,
@@ -411,10 +413,11 @@ int ball_join_handler(guac_user* user, int argc, char** argv) {
     /* Set up ball layer */
     guac_protocol_send_size(socket, ball, 128, 128);
 
-    /* Fill with solid color */
+    /* Prepare a curve which covers the entire layer */
     guac_protocol_send_rect(socket, ball,
             0, 0, 128, 128);
 
+    /* Fill curve with solid color */
     guac_protocol_send_cfill(socket,
             GUAC_COMP_OVER, ball,
             0x00, 0x80, 0x80, 0xFF);
@@ -545,8 +548,8 @@ typedef struct ball_client_data {
             data->ball_x = -data->ball_x;
             data->ball_velocity_x = -data->ball_velocity_x;
         }
-        else if (data->ball_x >= 1024-128) {
-            data->ball_x = (2*(1024-128)) - data->ball_x;
+        else if (data->ball_x >= 1024 - 128) {
+            data->ball_x = (2 * (1024 - 128)) - data->ball_x;
             data->ball_velocity_x = -data->ball_velocity_x;
         }
 
@@ -554,8 +557,8 @@ typedef struct ball_client_data {
             data->ball_y = -data->ball_y;
             data->ball_velocity_y = -data->ball_velocity_y;
         }
-        else if (data->ball_y >= (768-128)) {
-            data->ball_y = (2*(768-128)) - data->ball_y;
+        else if (data->ball_y >= 768 - 128) {
+            data->ball_y = (2 * (768 - 128)) - data->ball_y;
             data->ball_velocity_y = -data->ball_velocity_y;
         }
 
@@ -573,8 +576,8 @@ typedef struct ball_client_data {
 }</emphasis>
 
 ...</programlisting></informalexample>
-        <para>Just as with the join handler, this thread sends a "sync" instruction
to denote the end
-            of each frame, though here this is accomplished with
+        <para>Just as with the join handler, this thread sends a "sync" instruction
to denote the
+            end of each frame, though here this is accomplished with
                 <function>guac_client_end_frame()</function>. This function sends
a "sync"
             containing the current timestamp, and updates the properties of the
                 <classname>guac_client</classname> with the last-sent timestamp
(the value that our
@@ -582,7 +585,7 @@ typedef struct ball_client_data {
             whole display with each frame - we simply update the position of the ball layer
using a
                 <link xmlns:xlink="http://www.w3.org/1999/xlink" linkend="move-instruction">"move"
                 instruction</link>, and rely on the remote display to handle compositing
on its
-            own.Th</para>
+            own.</para>
         <para>We now need to update <methodname>guac_client_init</methodname>
to actually create
             this thread, initialize the ball state within the structure, and store the thread
for
             future cleanup when the client terminates:</para>
@@ -666,11 +669,11 @@ int guac_client_init(guac_client* client) {
             0xDD, 0xDD, 0xDD, 0xFF);
 </emphasis>
 
-    /* Fill with <emphasis>texture</emphasis> */
+    /* Prepare a curve which covers the entire layer */
     guac_protocol_send_rect(socket, GUAC_DEFAULT_LAYER,
             0, 0, 1024, 768);
 
-
+     /* Fill curve with <emphasis>texture</emphasis> */
     <emphasis>guac_protocol_send_lfill</emphasis>(socket,
             GUAC_COMP_OVER, GUAC_DEFAULT_LAYER,
             <emphasis>texture</emphasis>);
@@ -678,17 +681,19 @@ int guac_client_init(guac_client* client) {
     /* Set up ball layer */
     guac_protocol_send_size(socket, ball, 128, 128);
 <emphasis>
-    /* Fill with solid color */
+    /* Prepare a circular curve */
     guac_protocol_send_arc(socket, data->ball,
             64, 64, 62, 0, 6.28, 0);
 
     guac_protocol_send_close(socket, data->ball);
 
+    /* Draw a 4-pixel black border */
     guac_protocol_send_cstroke(socket,
             GUAC_COMP_OVER, data->ball,
             GUAC_LINE_CAP_ROUND, GUAC_LINE_JOIN_ROUND, 4,
             0x00, 0x00, 0x00, 0xFF);
 
+    /* Fill the circle with color */
     guac_protocol_send_cfill(socket,
             GUAC_COMP_OVER, data->ball,
             0x00, 0x80, 0x80, 0x80);

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/blob/4e065c74/tutorials/libguac-client-ball/configure.ac
----------------------------------------------------------------------
diff --git a/tutorials/libguac-client-ball/configure.ac b/tutorials/libguac-client-ball/configure.ac
index df49a1a..4516041 100644
--- a/tutorials/libguac-client-ball/configure.ac
+++ b/tutorials/libguac-client-ball/configure.ac
@@ -8,6 +8,7 @@ AC_CONFIG_MACRO_DIRS([m4])
 
 # Check for required build tools
 AC_PROG_CC
+AC_PROG_CC_C99
 AC_PROG_LIBTOOL
 
 # Check for libguac (http://guac-dev.org/)

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-manual/blob/4e065c74/tutorials/libguac-client-ball/src/ball.c
----------------------------------------------------------------------
diff --git a/tutorials/libguac-client-ball/src/ball.c b/tutorials/libguac-client-ball/src/ball.c
index 2dcc966..a166aaa 100644
--- a/tutorials/libguac-client-ball/src/ball.c
+++ b/tutorials/libguac-client-ball/src/ball.c
@@ -49,8 +49,8 @@ void* ball_render_thread(void* arg) {
             data->ball_x = -data->ball_x;
             data->ball_velocity_x = -data->ball_velocity_x;
         }
-        else if (data->ball_x >= 1024-128) {
-            data->ball_x = (2*(1024-128)) - data->ball_x;
+        else if (data->ball_x >= 1024 - 128) {
+            data->ball_x = (2 * (1024 - 128)) - data->ball_x;
             data->ball_velocity_x = -data->ball_velocity_x;
         }
 
@@ -58,8 +58,8 @@ void* ball_render_thread(void* arg) {
             data->ball_y = -data->ball_y;
             data->ball_velocity_y = -data->ball_velocity_y;
         }
-        else if (data->ball_y >= (768-128)) {
-            data->ball_y = (2*(768-128)) - data->ball_y;
+        else if (data->ball_y >= 768 - 128) {
+            data->ball_y = (2 * (768 - 128)) - data->ball_y;
             data->ball_velocity_y = -data->ball_velocity_y;
         }
 
@@ -109,10 +109,11 @@ int ball_join_handler(guac_user* user, int argc, char** argv) {
     guac_protocol_send_cfill(socket, GUAC_COMP_OVER, texture,
             0xDD, 0xDD, 0xDD, 0xFF);
 
-    /* Fill with texture */
+    /* Prepare a curve which covers the entire layer */
     guac_protocol_send_rect(socket, GUAC_DEFAULT_LAYER,
             0, 0, 1024, 768);
 
+    /* Fill curve with texture */
     guac_protocol_send_lfill(socket,
             GUAC_COMP_OVER, GUAC_DEFAULT_LAYER,
             texture);
@@ -120,17 +121,19 @@ int ball_join_handler(guac_user* user, int argc, char** argv) {
     /* Set up ball layer */
     guac_protocol_send_size(socket, ball, 128, 128);
 
-    /* Fill with solid color */
+    /* Prepare a circular curve */
     guac_protocol_send_arc(socket, data->ball,
             64, 64, 62, 0, 6.28, 0);
 
     guac_protocol_send_close(socket, data->ball);
 
+    /* Draw a 4-pixel black border */
     guac_protocol_send_cstroke(socket,
             GUAC_COMP_OVER, data->ball,
             GUAC_LINE_CAP_ROUND, GUAC_LINE_JOIN_ROUND, 4,
             0x00, 0x00, 0x00, 0xFF);
 
+    /* Fill the circle with color */
     guac_protocol_send_cfill(socket,
             GUAC_COMP_OVER, data->ball,
             0x00, 0x80, 0x80, 0x80);


Mime
View raw message