53 lines
1.1 KiB
Plaintext
53 lines
1.1 KiB
Plaintext
P7_GETSCREEN(3)
|
|
===============
|
|
Thomas "Cakeisalie5" Touhey
|
|
:Email: thomas@touhey.fr
|
|
:man source: libp7
|
|
:man manual: libp7 manual
|
|
|
|
NAME
|
|
----
|
|
p7_getscreen - screen receiving function
|
|
|
|
SYNOPSIS
|
|
--------
|
|
[source,c]
|
|
----
|
|
#include <libp7.h>
|
|
|
|
int p7_getscreen(p7_handle_t *handle, int (*callback)());
|
|
|
|
p7_getscreen(handle, &my_callback);
|
|
----
|
|
|
|
DESCRIPTION
|
|
-----------
|
|
p7_getscreen is the main function for receiving streamed screen from calculator.
|
|
It occupies main thread and calls *callback* for each caught frame. In addition
|
|
of this, if the callback returns 0, *p7_getscreen* will return.
|
|
|
|
*callback* musn't be NULL, and must have this prototype:
|
|
|
|
[source,c]
|
|
----
|
|
int my_callback(int w, int h, uint32_t **pixels);
|
|
----
|
|
|
|
*pixels* is a pixel matrix where each pixel is of format 0x00RRGGBB. All of
|
|
these parameters are sent to the callback so that you don't have to matter
|
|
about the source pixels format (monochromic, gray, RGB, ...).
|
|
|
|
RETURN VALUE
|
|
------------
|
|
This function returns zero if everything went well, and the error code
|
|
otherwise.
|
|
|
|
ERRORS
|
|
------
|
|
See *p7_error*(3).
|
|
|
|
SEE ALSO
|
|
--------
|
|
*libp7*(3),
|
|
*p7_error*(3)
|