From: Dan Winship Date: Wed, 30 Oct 2013 15:08:06 +0000 (-0400) Subject: add newtEntryGet/SetCursorPosition X-Git-Tag: r0-52-17~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c8cddffd27a5aa8f7d6af7fca68e31d6aecd136d;p=thirdparty%2Fnewt.git add newtEntryGet/SetCursorPosition --- 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);