|
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.
Define Documentation
Function Documentation
|
VCC Init function.
This function runs when the VCC simulation is first started.
Definition at line 35 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 45 of file receive_input.c.
References down_x, down_y, MOUSE_DOWN, up_x, and up_y.
00046 {
00047 mouse_click input;
00048 mouse_drag output;
00049
00050
00051
00052 if (in_Enabled())
00053 {
00054 input = *in_Value();
00055
00056 if (input.status == MOUSE_DOWN)
00057 {
00058
00059
00060 down_x = input.x;
00061 down_y = input.y;
00062 }
00063 else
00064 {
00065
00066
00067 up_x = input.x;
00068 up_y = input.y;
00069
00070
00071
00072 output.down_x = down_x;
00073 output.down_y = down_y;
00074 output.up_x = up_x;
00075 output.up_y = up_y;
00076
00077 out_Post(&output);
00078 }
00079 }
00080 }
|
Variable Documentation
|
variables to store the x and y coordinates of where the mouse is clicked and released.
Definition at line 8 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 8 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 8 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 8 of file receive_input.c.
Referenced by poin_entry_Run. |
|
|