BlinkenArea - GitList
Repositories
Blog
Wiki
libflexipix
Code
Commits
Branches
Tags
Search
Tree:
b17c6a4
Branches
Tags
master
v1.0.0
v1.0.1
v1.0.2
v1.0.3
v1.0.4
v1.0.5
v1.0.6
v1.0.7
v1.0.8
libflexipix
include
flexipix
displayer.h
support BGR input in addition to RGB
Stefan Schuermans
commited
b17c6a4
at 2016-12-21 10:31:43
displayer.h
Blame
History
Raw
/* * FlexiPix library * * Copyright 2010-2011 Stefan Schuermans <stefan schuermans info> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 3 of the License. * * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef FLP_INC_DISPLAYER_H #define FLP_INC_DISPLAYER_H #include <flexipix/msg.h> #include <flexipix/types.h> /** * \brief create a new FlexiPix displayer * * A displayer manages a display and ensures that a the current * image data is sent often enough to the distributors so * that the pixels do detect a timeout and turn off automatically. * The displayer uses a thread to do this. * Initially, the new displayer is inactive and has to be activated * using flp_displayer_activate(). * * \param[in] sz_config_file name of config file to read * \param[in] p_msg_func message callback function or NULL * \param[in] p_msg_ctx user context for message callback * \return pointer to new FlexiPix displayer on success * or NULL on error */ flp_displayer_t *flp_displayer_create(const char *sz_config_file, flp_msg_func_p_t p_msg_func, void *p_msg_ctx); /** * \brief free a FlexiPix displayer * * \param[in] p_displayer pointer to FlexiPix displayer */ void flp_displayer_free(flp_displayer_t *p_displayer); /** * \brief get size of display managed by displayer * * \param[in] p_displayer pointer to FlexiPix displayer * \param[out] p_width width of display * \param[out] p_height height of display */ void flp_displayer_get_size(flp_displayer_t *p_displayer, unsigned int *p_width, unsigned int *p_height); /** * \brief activate the displayer * * set the displayer to active, i.e. make it send image data * to the distributors automatically, * this function might trigger sending of data if the last * sending time was too long ago * * \param[in] p_displayer pointer to FlexiPix displayer */ void flp_displayer_activate(flp_displayer_t *p_displayer); /** * \brief deactivate the displayer * * set the displayer to deactive, i.e. prevent it from sening image * data to the distributors automatically, * * \param[in] p_displayer pointer to FlexiPix displayer */ void flp_displayer_deactivate(flp_displayer_t *p_displayer); /** * \brief clear image data to output on FlexiPix displayer * * clears the stored image data * * \param[in] p_displayer pointer to FlexiPix displayer */ void flp_displayer_data_clear(flp_displayer_t *p_displayer); /** * \brief set image data to output on FlexiPix display * * updates (part of) the stored image data * * \param[in] p_displayer pointer to FlexiPix displayer * \param[in] p_data pointer to rectangular section of image data * \param[in] stride_x stride between two pixels in X direction * \param[in] stride_y stride between two pixels in Y direction * \param[in] x X coordinate of left side of rectangular area * \param[in] y Y coordinate of top side of rectangular area * \param[in] width with of rectangular area * \param[in] height height of rectangular area * \param[in] pixfmt format of pixel data */ void flp_displayer_data_fmt(flp_displayer_t *p_displayer, flp_u8_t *p_data, int stride_x, int stride_y, unsigned int x, unsigned int y, unsigned int width, unsigned int height, flp_pixfmt_t pixfmt); /** * \brief set image data to output on FlexiPix display * * see flp_displayer_data_fmt for documentation * pixfmt is fixed to flp_pixfmt_rgb24 */ void flp_displayer_data(flp_displayer_t *p_displayer, flp_u8_t *p_data, int stride_x, int stride_y, unsigned int x, unsigned int y, unsigned int width, unsigned int height); /** * \brief trigger immediate sending of new image data to distributors * * this only works if the displayer is active * * \param[in] p_displayer pointer to FlexiPix displayer */ void flp_displayer_send(flp_displayer_t *p_displayer); #endif /* #ifndef FLP_INC_DISPLAYER_H */