libfreerdp-core: expanded input API

This commit is contained in:
Marc-André Moreau 2012-02-13 17:51:42 -05:00
parent 5617af901a
commit 708ba9bd03
2 changed files with 34 additions and 0 deletions

View File

@ -22,6 +22,7 @@
typedef struct rdp_input rdpInput;
#include <freerdp/api.h>
#include <freerdp/freerdp.h>
/* keyboard Flags */
@ -72,4 +73,10 @@ struct rdp_input
uint32 paddingB[32 - 21]; /* 21 */
};
FREERDP_API void freerdp_input_send_synchronize_event(rdpInput* input, uint32 flags);
FREERDP_API void freerdp_input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
FREERDP_API void freerdp_input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code);
FREERDP_API void freerdp_input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
FREERDP_API void freerdp_input_send_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y);
#endif /* __INPUT_API_H */

View File

@ -17,6 +17,8 @@
* limitations under the License.
*/
#include <freerdp/input.h>
#include "input.h"
void rdp_write_client_input_pdu_header(STREAM* s, uint16 number)
@ -380,6 +382,31 @@ void input_register_client_callbacks(rdpInput* input)
}
}
void freerdp_input_send_synchronize_event(rdpInput* input, uint32 flags)
{
IFCALL(input->SynchronizeEvent, input, flags);
}
void freerdp_input_send_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
{
IFCALL(input->KeyboardEvent, input, flags, code);
}
void freerdp_input_send_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code)
{
IFCALL(input->UnicodeKeyboardEvent, input, flags, code);
}
void freerdp_input_send_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
{
IFCALL(input->MouseEvent, input, flags, x, y);
}
void freerdp_input_send_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y)
{
IFCALL(input->ExtendedMouseEvent, input, flags, x, y);
}
rdpInput* input_new(rdpRdp* rdp)
{
rdpInput* input;