diff --git a/caca/caca.h b/caca/caca.h index 1233a76..098264b 100644 --- a/caca/caca.h +++ b/caca/caca.h @@ -151,9 +151,9 @@ enum caca_key * @{ */ caca_display_t * caca_create_display(cucul_canvas_t *); void caca_free_display(caca_display_t *); -void caca_set_delay(caca_display_t *, unsigned int); void caca_refresh_display(caca_display_t *); -unsigned int caca_get_rendertime(caca_display_t *); +void caca_set_display_time(caca_display_t *, unsigned int); +unsigned int caca_get_display_time(caca_display_t *); unsigned int caca_get_display_width(caca_display_t *); unsigned int caca_get_display_height(caca_display_t *); int caca_set_display_title(caca_display_t *, char const *); diff --git a/caca/graphics.c b/caca/graphics.c index 52c1d83..98035f7 100644 --- a/caca/graphics.c +++ b/caca/graphics.c @@ -28,7 +28,7 @@ * If libcaca runs in a window, try to change its title. This works with * the X11 and Win32 drivers. * - * \param dp The libcaca graphical context. + * \param dp The libcaca display context. * \param title The desired display title. * \return 0 upon success, a non-zero value if an error occurs. */ @@ -44,7 +44,7 @@ int caca_set_display_title(caca_display_t *dp, char const *title) * or if there is no way to know the font size, most drivers will assume a * 6x10 font is being used. Note that the units are not necessarily pixels. * - * \param dp The libcaca graphical context. + * \param dp The libcaca display context. * \return The display width. */ unsigned int caca_get_display_width(caca_display_t *dp) @@ -59,7 +59,7 @@ unsigned int caca_get_display_width(caca_display_t *dp) * or if there is no way to know the font size, assume a 6x10 font is being * used. Note that the units are not necessarily pixels. * - * \param dp The libcaca graphical context. + * \param dp The libcaca display context. * \return The display height. */ unsigned int caca_get_display_height(caca_display_t *dp) @@ -76,26 +76,26 @@ unsigned int caca_get_display_height(caca_display_t *dp) * If the argument is zero, constant framerate is disabled. This is the * default behaviour. * - * \param dp The libcaca graphical context. + * \param dp The libcaca display context. * \param usec The refresh delay in microseconds. */ -void caca_set_delay(caca_display_t *dp, unsigned int usec) +void caca_set_display_time(caca_display_t *dp, unsigned int usec) { dp->delay = usec; } -/** \brief Get the average rendering time. +/** \brief Get the display's average rendering time. * * This function returns the average rendering time, which is the average * measured time between two caca_refresh_display() calls, in microseconds. If - * constant framerate was activated by calling caca_set_delay(), the average - * rendering time will not be considerably shorter than the requested delay - * even if the real rendering time was shorter. + * constant framerate was activated by calling caca_set_display_time(), the + * average rendering time will not be considerably shorter than the requested + * delay even if the real rendering time was shorter. * - * \param dp The libcaca graphical context. + * \param dp The libcaca display context. * \return The render time in microseconds. */ -unsigned int caca_get_rendertime(caca_display_t *dp) +unsigned int caca_get_display_time(caca_display_t *dp) { return dp->rendertime; } @@ -106,13 +106,13 @@ unsigned int caca_get_rendertime(caca_display_t *dp) * screen. Nothing will show on the screen until caca_refresh_display() is * called. * - * If caca_set_delay() was called with a non-zero value, + * If caca_set_display_time() was called with a non-zero value, * caca_refresh_display() will use that value to achieve constant - * framerate: if two consecutive calls to caca_refresh_display() are - * within a time range shorter than the value set with caca_set_delay(), + * framerate: if two consecutive calls to caca_refresh_display() are within + * a time range shorter than the value set with caca_set_display_time(), * the second call will be delayed before performing the screen refresh. * - * \param dp The libcaca graphical context. + * \param dp The libcaca display context. */ void caca_refresh_display(caca_display_t *dp) { @@ -154,7 +154,7 @@ void caca_refresh_display(caca_display_t *dp) * This function shows or hides the mouse pointer, for devices that * support it. * - * \param dp The libcaca graphical context. + * \param dp The libcaca display context. * \param flag 0 hides the pointer, 1 shows the system's default pointer * (usually an arrow). Other values are reserved for future use. */ diff --git a/python/pypycaca.c b/python/pypycaca.c index 1344655..3ef9747 100644 --- a/python/pypycaca.c +++ b/python/pypycaca.c @@ -15,8 +15,8 @@ static PyMethodDef CacaMethods[] = { {"init", pycaca_init, METH_VARARGS, "Init libcaca"}, - {"set_delay", pycaca_set_delay, METH_VARARGS, "Set delay"}, - {"get_rendertime", pycaca_get_rendertime, METH_NOARGS, "Get render time"}, + {"set_display_time", pycaca_set_display_time, METH_VARARGS, "Set display time"}, + {"get_display_time", pycaca_get_display_time, METH_NOARGS, "Get render time"}, {"get_width", pycaca_get_width, METH_NOARGS, "Get width"}, {"get_height", pycaca_get_height, METH_NOARGS, "Get Height"}, {"set_size", pycaca_set_size, METH_VARARGS, "Set size"}, @@ -196,18 +196,18 @@ pycaca_init(PyObject *self, PyObject *args) } static PyObject * -pycaca_set_delay(PyObject *self, PyObject *args) +pycaca_set_display_time(PyObject *self, PyObject *args) { int value=0; if (!PyArg_ParseTuple(args, "i", &value)) - caca_set_delay(value); + caca_set_display_time(value); return Py_BuildValue("i", 1); /*FIXME*/ } static PyObject * -pycaca_get_rendertime(PyObject *self, PyObject *args) +pycaca_get_display_time(PyObject *self, PyObject *args) { - int ret = caca_get_rendertime(); + int ret = caca_get_display_time(); return Py_BuildValue("i", ret); } diff --git a/python/pypycaca.h b/python/pypycaca.h index 28fbeaa..3d1820a 100644 --- a/python/pypycaca.h +++ b/python/pypycaca.h @@ -24,9 +24,9 @@ PyMODINIT_FUNC initcaca(void); static PyObject * pycaca_init(PyObject *self, PyObject *args); static PyObject * -pycaca_set_delay(PyObject *self, PyObject *args); +pycaca_set_display_time(PyObject *self, PyObject *args); static PyObject * -pycaca_get_rendertime(PyObject *self, PyObject *args); +pycaca_get_display_time(PyObject *self, PyObject *args); static PyObject * pycaca_get_width(PyObject *self, PyObject *args); static PyObject * diff --git a/src/aafire.c b/src/aafire.c index 4223269..69e6997 100644 --- a/src/aafire.c +++ b/src/aafire.c @@ -113,7 +113,7 @@ initialize (void) printf ("Failed to initialize libcaca\n"); exit (1); } - caca_set_delay(dp, 10000); + caca_set_display_time(dp, 10000); XSIZ = cucul_get_canvas_width(cv) * 2; YSIZ = cucul_get_canvas_height(cv) * 2 - 4; #else diff --git a/src/cacaball.c b/src/cacaball.c index 49023f3..42d7e18 100644 --- a/src/cacaball.c +++ b/src/cacaball.c @@ -61,7 +61,7 @@ int main(int argc, char **argv) if(!dp) return 1; - caca_set_delay(dp, 20000); + caca_set_display_time(dp, 20000); /* Make the palette eatable by libcaca */ for(p = 0; p < 256; p++) diff --git a/src/cacamoir.c b/src/cacamoir.c index e344fd1..7b6fb95 100644 --- a/src/cacamoir.c +++ b/src/cacamoir.c @@ -50,7 +50,7 @@ int main (int argc, char **argv) if(!dp) return 1; - caca_set_delay(dp, 20000); + caca_set_display_time(dp, 20000); /* Fill various tables */ for(i = 0 ; i < 256; i++) diff --git a/src/cacaplas.c b/src/cacaplas.c index fc34053..151d534 100644 --- a/src/cacaplas.c +++ b/src/cacaplas.c @@ -54,7 +54,7 @@ int main (int argc, char **argv) if(!dp) return 1; - caca_set_delay(dp, 20000); + caca_set_display_time(dp, 20000); c2 = cucul_create_canvas(cucul_get_canvas_width(cv), cucul_get_canvas_height(cv)); diff --git a/test/demo.c b/test/demo.c index b873915..0a55cc8 100644 --- a/test/demo.c +++ b/test/demo.c @@ -55,7 +55,7 @@ int main(int argc, char **argv) if(!dp) return 1; - caca_set_delay(dp, 40000); + caca_set_display_time(dp, 40000); /* Initialize data */ #if 0 @@ -187,8 +187,8 @@ int main(int argc, char **argv) cucul_draw_thin_box(cv, 1, 1, cucul_get_canvas_width(cv) - 2, cucul_get_canvas_height(cv) - 2); cucul_printf(cv, 4, 1, "[%i.%i fps]----", - 1000000 / caca_get_rendertime(dp), - (10000000 / caca_get_rendertime(dp)) % 10); + 1000000 / caca_get_display_time(dp), + (10000000 / caca_get_display_time(dp)) % 10); caca_refresh_display(dp); } } diff --git a/test/frames.c b/test/frames.c index 73fabd8..30d137f 100644 --- a/test/frames.c +++ b/test/frames.c @@ -42,7 +42,7 @@ int main(void) cucul_set_canvas_size(cv, 41, 16); dp = caca_create_display(cv); - caca_set_delay(dp, 50000); + caca_set_display_time(dp, 50000); /* Fill the first 16 frames with a different colour */ for(frame = 0; frame < 16; frame++) diff --git a/test/gamma.c b/test/gamma.c index e3743c0..fb7a774 100644 --- a/test/gamma.c +++ b/test/gamma.c @@ -55,7 +55,7 @@ int main(void) 0x00ff0000, 0x0000ff00, 0x000000ff, 0x0); right = cucul_create_dither(32, 256, 4, 4 * 256, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x0); - caca_set_delay(dp, 20000); + caca_set_display_time(dp, 20000); for(x = 0; ; x++) {