From c8cddffd27a5aa8f7d6af7fca68e31d6aecd136d Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 30 Oct 2013 11:08:06 -0400 Subject: [PATCH] add newtEntryGet/SetCursorPosition --- entry.c | 12 ++++++++++++ newt.0.52.ver | 2 ++ newt.h | 2 ++ 3 files changed, 16 insertions(+) diff --git a/entry.c b/entry.c index a5ae688..8dad8c8 100644 --- a/entry.c +++ b/entry.c @@ -504,3 +504,15 @@ void newtEntrySetFilter(newtComponent co, newtEntryFilter filter, void * data) { en->filter = filter; en->filterData = data; } + +int newtEntryGetCursorPosition (newtComponent co) { + struct entry * en = co->data; + + return en->cursorPosition; +} + +void newtEntrySetCursorPosition (newtComponent co, int position) { + struct entry * en = co->data; + + en->cursorPosition = position; +} diff --git a/newt.0.52.ver b/newt.0.52.ver index 33190ef..5bbb22e 100644 --- a/newt.0.52.ver +++ b/newt.0.52.ver @@ -172,4 +172,6 @@ NEWT_0.52.17 { global: newtFormGetScrollPosition; newtFormSetScrollPosition; + newtEntryGetCursorPosition; + newtEntrySetCursorPosition; } NEWT_0.52.16; diff --git a/newt.h b/newt.h index 0070c71..aa9cafb 100644 --- a/newt.h +++ b/newt.h @@ -257,6 +257,8 @@ void newtEntrySetFilter(newtComponent co, newtEntryFilter filter, void * data); char * newtEntryGetValue(newtComponent co); void newtEntrySetFlags(newtComponent co, int flags, enum newtFlagsSense sense); void newtEntrySetColors(newtComponent co, int normal, int disabled); +int newtEntryGetCursorPosition(newtComponent co); +void newtEntrySetCursorPosition(newtComponent co, int position); newtComponent newtScale(int left, int top, int width, long long fullValue); void newtScaleSet(newtComponent co, unsigned long long amount); -- 2.47.2