From 4eb6a7ae0fa0fa11c7e538b948af1417764d4134 Mon Sep 17 00:00:00 2001
From: scuri
Date: Wed, 5 Aug 2009 18:44:49 +0000
Subject: *** empty log message ***
---
html/en/func/init.html | 2 +-
html/en/func/other.html | 5 +++--
html/en/func/region.html | 4 +++-
html/en/history.html | 15 +++++++++++++++
src/lua5/cdlua5.c | 11 ++++++-----
src/lua5/cdlua5_canvas.c | 4 ++--
6 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/html/en/func/init.html b/html/en/func/init.html
index c6e08b3..9cdee9e 100644
--- a/html/en/func/init.html
+++ b/html/en/func/init.html
@@ -105,7 +105,7 @@ canvas:Deactivate(canvas: cdCanvas) [in Lua]
Flush .
int cdUseContextPlus (int use); [in C]
-cd.UseContextPlus(use: number) -> (old_use: number) [in Lua]
+cd.UseContextPlus(use: boolean) -> (old_use: boolean) [in Lua]
Activates or deactivates the use of an external context for the next calls of the
cdCreateCanvas
function.
diff --git a/html/en/func/other.html b/html/en/func/other.html
index af611ef..b493ae5 100644
--- a/html/en/func/other.html
+++ b/html/en/func/other.html
@@ -96,8 +96,9 @@ cd.ContextRegisterCallback(ctx, cb: number, func: function) -> (status: numbe
Used to customize the behavior of the Play
function. If you register a known callback function, it will be called during
- the processing loop of cdPlay .
- The callback should return CD_CONTINUE , if it
+ the processing loop of cdCanvasPlay . Returns
+ CD_OK if the specified callback is supported or CD_ERROR otherwise.
+ The callback itself should return CD_CONTINUE , if it
returns CD_ABORT , the cdPlay
function is aborted. The callback identifiers of a given driver must be in the
header file relative to that driver, with prefix "CD_XXYYYCB ",
diff --git a/html/en/func/region.html b/html/en/func/region.html
index e503733..1581180 100644
--- a/html/en/func/region.html
+++ b/html/en/func/region.html
@@ -51,8 +51,10 @@ canvas:RegionCombineMode(mode: number) -> (old_mode: number) [in Lua]
int cdCanvasIsPointInRegion(cdCanvas* canvas, int x, int y); [in C]
+int wdCanvasIsPointInRegion(cdCanvas* canvas, double x, double y); (WC) [in C]
-canvas:IsPointInRegion(x, y: number) -> (status: number) [in Lua]
+canvas:IsPointInRegion(x, y: number) -> (status: boolean) [in Lua]
+canvas:wIsPointInRegion(x, y: number) -> (status: boolean) [in Lua]
Returns a non zero value if the point is contained inside the current
region.
diff --git a/html/en/history.html b/html/en/history.html
index 439ff66..1ece026 100644
--- a/html/en/history.html
+++ b/html/en/history.html
@@ -5,11 +5,26 @@
History
+
History of Changes
+CVS (05/Aug/2008)
+
+ Changed :
+ return value to boolean of CanvasIsPointInRegion and
+ cd.UseContextPlus in Lua.
+
Version 5.2 (26/Jun/2008)
New: functions
diff --git a/src/lua5/cdlua5.c b/src/lua5/cdlua5.c
index 7b7b617..bff00df 100644
--- a/src/lua5/cdlua5.c
+++ b/src/lua5/cdlua5.c
@@ -900,7 +900,7 @@ static int cdlua5_version(lua_State *L)
\***************************************************************************/
static int cdlua5_registercallback(lua_State *L)
{
- int cb_i, func_lock;
+ int cb_i, func_lock, ret = CD_ERROR;
cdluaCallback* cdCB;
cdluaContext* cdlua_ctx;
@@ -926,7 +926,7 @@ static int cdlua5_registercallback(lua_State *L)
cdCB->lock = func_lock;
if (func_lock == -1)
{
- cdContextRegisterCallback(cdlua_ctx->ctx(), cb_i, NULL);
+ ret = cdContextRegisterCallback(cdlua_ctx->ctx(), cb_i, NULL);
}
}
else
@@ -934,10 +934,11 @@ static int cdlua5_registercallback(lua_State *L)
if (func_lock != -1)
{
cdContextRegisterCallback(cdlua_ctx->ctx(), cb_i, (cdCallback)cdCB->func);
- cdCB->lock = func_lock;
+ ret = cdCB->lock = func_lock;
}
}
- return 0;
+ lua_pushnumber(L, ret);
+ return 1;
}
@@ -1257,7 +1258,7 @@ static int cdlua5_getscreensize(lua_State *L)
\***************************************************************************/
static int cdlua5_usecontextplus(lua_State *L)
{
- lua_pushnumber(L, cdUseContextPlus(luaL_checkint(L, 1)));
+ lua_pushboolean(L, cdUseContextPlus(lua_toboolean(L, 1)));
return 1;
}
diff --git a/src/lua5/cdlua5_canvas.c b/src/lua5/cdlua5_canvas.c
index d04f76f..eeecc6d 100644
--- a/src/lua5/cdlua5_canvas.c
+++ b/src/lua5/cdlua5_canvas.c
@@ -712,7 +712,7 @@ static int cdlua5_regioncombinemode(lua_State *L)
\***************************************************************************/
static int cdlua5_pointinregion(lua_State *L)
{
- lua_pushnumber(L, cdCanvasIsPointInRegion(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3)));
+ lua_pushboolean(L, cdCanvasIsPointInRegion(cdlua_checkcanvas(L, 1), luaL_checkint(L, 2), luaL_checkint(L, 3)));
return 1;
}
@@ -721,7 +721,7 @@ static int cdlua5_pointinregion(lua_State *L)
\***************************************************************************/
static int wdlua5_pointinregion(lua_State *L)
{
- lua_pushnumber(L, wdCanvasIsPointInRegion(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3)));
+ lua_pushboolean(L, wdCanvasIsPointInRegion(cdlua_checkcanvas(L, 1), luaL_checknumber(L, 2), luaL_checknumber(L, 3)));
return 1;
}
--
cgit v1.2.3