added clearSelection

Conflicts:

	unireader.lua
This commit is contained in:
Dobrica Pavlinusic
2012-10-10 00:18:11 +02:00
committed by Qingping Hou
parent bc4d2e7a49
commit f2933a32c0

View File

@@ -484,6 +484,13 @@ static int gotoLink(lua_State *L) {
return 0;
}
static int clearSelection(lua_State *L) {
CreDocument *doc = (CreDocument*) luaL_checkudata(L, 1, "credocument");
doc->text_view->clearSelection();
return 0;
}
static int drawCurrentPage(lua_State *L) {
CreDocument *doc = (CreDocument*) luaL_checkudata(L, 1, "credocument");
@@ -634,6 +641,7 @@ static const struct luaL_Reg credocument_meth[] = {
{"findText", findText},
{"getPageLinks", getPageLinks},
{"gotoLink", gotoLink},
{"clearSelection", clearSelection},
{"close", closeDocument},
{"__gc", closeDocument},
{NULL, NULL}