#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <rfb/rfb.h>
#include "xmlint.h"
Defines | |
#define | XML_INT_PORT 50000 |
#define | XML_INT_KEYPRESS "<KeyPress key=\"%i\" mod=\"%i\" state=\"%i\" />" |
Functions | |
static int | xmlint_open_socket () |
int | xmlint_send_key_press (int keycode, int modifier, int down) |
void | xmlint_cleanup () |
Variables | |
static int | fd_xml_sock = -1 |
#define XML_INT_PORT 50000 |
Local port of the XML interface.
#define XML_INT_KEYPRESS "<KeyPress key=\"%i\" mod=\"%i\" state=\"%i\" />" |
XML command that simulates a key press.
static int xmlint_open_socket | ( | ) | [static] |
Opens a connection to the XML interface (Port 50000, localhost).
int xmlint_send_key_press | ( | int | keycode, | |
int | modifier, | |||
int | down | |||
) |
Prepares and sends a <KeyPress> event with the given arguments.
keycode | keyboard scancode | |
modifier | keyboard modifier | |
down | key state flag; 1 : pressed, 0 : released |
void xmlint_cleanup | ( | ) |
XML interface cleanup.
Module functions.
Closes an open socket to the XML interface.
int fd_xml_sock = -1 [static] |
File descriptor of the socket connection to the XML interface.