![]() |
![]() |
![]() |
libfep Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
FepClient; FepEvent; int (*FepEventFilter) (FepEvent *event
,void *data
); FepEventKey; FepEventResize; enum FepEventType; void fep_client_close (FepClient *client
); int fep_client_dispatch (FepClient *client
); int fep_client_get_poll_fd (FepClient *client
); FepClient * fep_client_open (const char *address
); void fep_client_send_data (FepClient *client
,const char *data
,size_t length
); void fep_client_send_text (FepClient *client
,const char *text
); void fep_client_set_cursor_text (FepClient *client
,const char *text
,FepAttribute *attr
); void fep_client_set_event_filter (FepClient *client
,FepEventFilter filter
,void *data
); void fep_client_set_status_text (FepClient *client
,const char *text
,FepAttribute *attr
);
typedef struct { FepEvent event; unsigned int keyval; FepModifierType modifiers; } FepEventKey;
FepEvent |
base event struct |
keysym value | |
FepModifierType |
modifier mask |
typedef struct { FepEvent event; unsigned int cols; unsigned int rows; } FepEventResize;
FepEvent |
base event struct |
number of columns | |
number of rows |
typedef enum { FEP_NOTHING = -1, FEP_KEY_PRESS = 0, FEP_RESIZED = 1 } FepEventType;
void fep_client_close (FepClient *client
);
Close the control socket and release the memory allocated for client
.
|
a FepClient |
int fep_client_dispatch (FepClient *client
);
Dispatch a request from server.
|
a FepClient |
Returns : |
0 on success, -1 on failure. |
int fep_client_get_poll_fd (FepClient *client
);
Get the file descriptor of the control socket which can be used by poll()
.
|
a FepClient |
Returns : |
a file descriptor |
FepClient * fep_client_open (const char *address
);
Connect to the FEP server running at address
. If address
is
NULL
, it gets the address from the environment variable
`LIBFEP_CONTROL_SOCK`.
|
socket address of the FEP server. [allow-none] |
Returns : |
a new FepClient. |
void fep_client_send_data (FepClient *client
,const char *data
,size_t length
);
Request to send data
to the child process of the FEP server.
|
a FepClient |
|
data to be sent |
|
length of data
|
void fep_client_send_text (FepClient *client
,const char *text
);
Request to send text
to the child process of the FEP server.
text
will be converted from UTF-8 to the local encoding in the
server.
|
a FepClient |
|
text to be sent |
void fep_client_set_cursor_text (FepClient *client
,const char *text
,FepAttribute *attr
);
Request to display text
at the cursor position on the terminal.
|
a FepClient |
|
a cursor text |
|
a FepAttribute |
void fep_client_set_event_filter (FepClient *client
,FepEventFilter filter
,void *data
);
Set a key event filter which will be called when client receives key events.
|
a FepClient |
|
a filter function |
|
user supplied data |
void fep_client_set_status_text (FepClient *client
,const char *text
,FepAttribute *attr
);
Request to display text
at the bottom of the terminal.
|
a FepClient |
|
a status text |
|
a FepAttribute |