|
Main Page Data Structures File List Globals
receive_input.c File ReferenceConverts mouse clicks into mouse drags.
More...
#include "white_interface.h"
#include "e:\AndrewWorkspace\Stratego\input.h"
Go to the source code of this file.
Detailed Description
Converts mouse clicks into mouse drags.
This block receives mouse_click messages, which specify the position of the mouse button (up or down) and the coordinates where the user pressed/released the button. Once a down and up mouse_click message has been received, a mouse_drag message is sent. This specifies the start and end coordinates of where the mouse was dragged.
Definition in file receive_input.c.
Function Documentation
|
VCC Init function.
This function runs when the VCC simulation is first started.
Definition at line 65 of file receive_input.c.
|
|
VCC Run function.
This runs whenever a message arrives at the receive_input block's in port.
Definition at line 73 of file receive_input.c.
References down_x, down_y, MOUSE_DOWN, up_x, and up_y.
00074 {
00075 mouse_click input;
00076 mouse_drag output;
00077
00078
00079
00080 if (in_Enabled())
00081 {
00082 input = *in_Value();
00083
00084 if (input.status == MOUSE_DOWN)
00085 {
00086
00087
00088 down_x = input.x;
00089 down_y = input.y;
00090 }
00091 else
00092 {
00093
00094
00095 up_x = input.x;
00096 up_y = input.y;
00097
00098
00099
00100 output.down_x = down_x;
00101 output.down_y = down_y;
00102 output.up_x = up_x;
00103 output.up_y = up_y;
00104 out_Post(&output);
00105 }
00106 }
00107 }
|
Variable Documentation
|
variables to store the x and y coordinates of where the mouse is clicked and released.
Definition at line 57 of file receive_input.c.
Referenced by poin_entry_Run. |
|
variables to store the x and y coordinates of where the mouse is clicked and released.
Definition at line 57 of file receive_input.c.
Referenced by poin_entry_Run. |
|
variables to store the x and y coordinates of where the mouse is clicked and released.
Definition at line 57 of file receive_input.c.
Referenced by poin_entry_Run. |
|
variables to store the x and y coordinates of where the mouse is clicked and released.
Definition at line 57 of file receive_input.c.
Referenced by poin_entry_Run. |
|
|