caca.h | caca.h | |||
---|---|---|---|---|
skipping to change at line 23 | skipping to change at line 23 | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
* Lesser General Public License for more details. | * Lesser General Public License for more details. | |||
* | * | |||
* You should have received a copy of the GNU Lesser General Public | * You should have received a copy of the GNU Lesser General Public | |||
* License along with this library; if not, write to the Free Software | * License along with this library; if not, write to the Free Software | |||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |||
* 02111-1307 USA | * 02111-1307 USA | |||
*/ | */ | |||
/** \file caca.h | /** \file caca.h | |||
* \version \$Id: caca.h 219 2004-01-07 12:45:02Z sam $ | * \version \$Id: caca.h 249 2004-01-17 22:32:39Z sam $ | |||
* \author Sam Hocevar <sam@zoy.org> | * \author Sam Hocevar <sam@zoy.org> | |||
* \brief The \e libcaca public header. | * \brief The \e libcaca public header. | |||
* | * | |||
* This header contains the public types and functions that applications | * This header contains the public types and functions that applications | |||
* using \e libcaca may use. | * using \e libcaca may use. | |||
*/ | */ | |||
/** \mainpage libcaca developer documentation | /** \mainpage libcaca developer documentation | |||
* | * | |||
* \section intro Introduction | * \section intro Introduction | |||
skipping to change at line 184 | skipping to change at line 184 | |||
* Event types returned by caca_get_event(). | * Event types returned by caca_get_event(). | |||
*/ | */ | |||
enum caca_event | enum caca_event | |||
{ | { | |||
CACA_EVENT_NONE = 0x00000000, /**< No event. */ | CACA_EVENT_NONE = 0x00000000, /**< No event. */ | |||
CACA_EVENT_KEY_PRESS = 0x01000000, /**< A key was pressed. */ | CACA_EVENT_KEY_PRESS = 0x01000000, /**< A key was pressed. */ | |||
CACA_EVENT_KEY_RELEASE = 0x02000000, /**< A key was released. */ | CACA_EVENT_KEY_RELEASE = 0x02000000, /**< A key was released. */ | |||
CACA_EVENT_MOUSE_PRESS = 0x04000000, /**< A mouse button was pressed. */ | CACA_EVENT_MOUSE_PRESS = 0x04000000, /**< A mouse button was pressed. */ | |||
CACA_EVENT_MOUSE_RELEASE = 0x08000000, /**< A mouse button was released . */ | CACA_EVENT_MOUSE_RELEASE = 0x08000000, /**< A mouse button was released . */ | |||
CACA_EVENT_MOUSE_MOTION = 0x10000000, /**< The mouse was moved. */ | CACA_EVENT_MOUSE_MOTION = 0x10000000, /**< The mouse was moved. */ | |||
CACA_EVENT_RESIZE = 0x20000000, /**< The window was resized. */ | ||||
CACA_EVENT_ANY = 0xff000000 /**< Bitmask for any event. */ | CACA_EVENT_ANY = 0xff000000 /**< Bitmask for any event. */ | |||
}; | }; | |||
/** \brief Special key values. | /** \brief Special key values. | |||
* | * | |||
* Special key values returned by caca_get_event() for which there is no | * Special key values returned by caca_get_event() for which there is no | |||
* ASCII equivalent. | * ASCII equivalent. | |||
*/ | */ | |||
enum caca_key | enum caca_key | |||
{ | { | |||
CACA_KEY_UNKNOWN = 0, /**< Unknown key. */ | ||||
/* The following keys have ASCII equivalents */ | ||||
CACA_KEY_BACKSPACE = 8, /**< The backspace key. */ | ||||
CACA_KEY_TAB = 9, /**< The tabulation key. */ | ||||
CACA_KEY_RETURN = 13, /**< The return key. */ | ||||
CACA_KEY_PAUSE = 19, /**< The pause key. */ | ||||
CACA_KEY_ESCAPE = 27, /**< The escape key. */ | ||||
CACA_KEY_DELETE = 127, /**< The delete key. */ | ||||
/* The following keys do not have ASCII equivalents but have been | ||||
* chosen to match the SDL equivalents */ | ||||
CACA_KEY_UP = 273, /**< The up arrow key. */ | CACA_KEY_UP = 273, /**< The up arrow key. */ | |||
CACA_KEY_DOWN = 274, /**< The down arrow key. */ | CACA_KEY_DOWN = 274, /**< The down arrow key. */ | |||
CACA_KEY_LEFT = 275, /**< The left arrow key. */ | CACA_KEY_LEFT = 275, /**< The left arrow key. */ | |||
CACA_KEY_RIGHT = 276, /**< The right arrow key. */ | CACA_KEY_RIGHT = 276, /**< The right arrow key. */ | |||
CACA_KEY_INSERT = 277, /**< The insert key. */ | ||||
CACA_KEY_HOME = 278, /**< The home key. */ | ||||
CACA_KEY_END = 279, /**< The end key. */ | ||||
CACA_KEY_PAGEUP = 280, /**< The page up key. */ | ||||
CACA_KEY_PAGEDOWN = 281, /**< The page down key. */ | ||||
CACA_KEY_F1 = 282, /**< The F1 key. */ | CACA_KEY_F1 = 282, /**< The F1 key. */ | |||
CACA_KEY_F2 = 283, /**< The F2 key. */ | CACA_KEY_F2 = 283, /**< The F2 key. */ | |||
CACA_KEY_F3 = 284, /**< The F3 key. */ | CACA_KEY_F3 = 284, /**< The F3 key. */ | |||
CACA_KEY_F4 = 285, /**< The F4 key. */ | CACA_KEY_F4 = 285, /**< The F4 key. */ | |||
CACA_KEY_F5 = 286, /**< The F5 key. */ | CACA_KEY_F5 = 286, /**< The F5 key. */ | |||
CACA_KEY_F6 = 287, /**< The F6 key. */ | CACA_KEY_F6 = 287, /**< The F6 key. */ | |||
CACA_KEY_F7 = 288, /**< The F7 key. */ | CACA_KEY_F7 = 288, /**< The F7 key. */ | |||
CACA_KEY_F8 = 289, /**< The F8 key. */ | CACA_KEY_F8 = 289, /**< The F8 key. */ | |||
CACA_KEY_F9 = 290, /**< The F9 key. */ | CACA_KEY_F9 = 290, /**< The F9 key. */ | |||
CACA_KEY_F10 = 291, /**< The F10 key. */ | CACA_KEY_F10 = 291, /**< The F10 key. */ | |||
skipping to change at line 230 | skipping to change at line 249 | |||
* | * | |||
* @{ */ | * @{ */ | |||
int caca_init(void); | int caca_init(void); | |||
void caca_set_delay(unsigned int); | void caca_set_delay(unsigned int); | |||
enum caca_feature caca_get_feature(enum caca_feature); | enum caca_feature caca_get_feature(enum caca_feature); | |||
void caca_set_feature(enum caca_feature); | void caca_set_feature(enum caca_feature); | |||
char const *caca_get_feature_name(enum caca_feature); | char const *caca_get_feature_name(enum caca_feature); | |||
unsigned int caca_get_rendertime(void); | unsigned int caca_get_rendertime(void); | |||
unsigned int caca_get_width(void); | unsigned int caca_get_width(void); | |||
unsigned int caca_get_height(void); | unsigned int caca_get_height(void); | |||
int caca_set_window_title(char const *); | ||||
unsigned int caca_get_window_width(void); | ||||
unsigned int caca_get_window_height(void); | ||||
void caca_refresh(void); | void caca_refresh(void); | |||
void caca_end(void); | void caca_end(void); | |||
/* @} */ | /* @} */ | |||
/** \defgroup event Event handling | /** \defgroup event Event handling | |||
* | * | |||
* These functions handle user events such as keyboard input and mouse | * These functions handle user events such as keyboard input and mouse | |||
* clicks. | * clicks. | |||
* | * | |||
* @{ */ | * @{ */ | |||
unsigned int caca_get_event(unsigned int); | unsigned int caca_get_event(unsigned int); | |||
unsigned int caca_wait_event(unsigned int); | unsigned int caca_wait_event(unsigned int); | |||
unsigned int caca_get_mouse_x(void); | ||||
unsigned int caca_get_mouse_y(void); | ||||
/* @} */ | /* @} */ | |||
/** \defgroup char Character printing | /** \defgroup char Character printing | |||
* | * | |||
* These functions provide low-level character printing routines. | * These functions provide low-level character printing routines. | |||
* | * | |||
* @{ */ | * @{ */ | |||
void caca_set_color(enum caca_color, enum caca_color); | void caca_set_color(enum caca_color, enum caca_color); | |||
enum caca_color caca_get_fg_color(void); | enum caca_color caca_get_fg_color(void); | |||
enum caca_color caca_get_bg_color(void); | enum caca_color caca_get_bg_color(void); | |||
End of changes. 6 change blocks. | ||||
1 lines changed or deleted | 25 lines changed or added | |||