Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_cursor.c ewl_cursor.h ewl_entry.c
Log Message:
Break the cursor API, shouldn't affect most people as it's probably only used
internally.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_cursor.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_cursor.c 24 Feb 2004 04:25:38 -0000 1.16
+++ ewl_cursor.c 20 Aug 2004 16:33:26 -0000 1.17
@@ -54,7 +54,7 @@
* Sets the initial position that will be used when determining layout when
* start or end positions change.
*/
-void ewl_cursor_set_base(Ewl_Cursor *c, unsigned int pos)
+void ewl_cursor_base_set(Ewl_Cursor *c, unsigned int pos)
{
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("c", c);
@@ -78,7 +78,7 @@
* appropriately.
*/
void
-ewl_cursor_set_position(Ewl_Cursor * c, unsigned int start, unsigned int end)
+ewl_cursor_position_set(Ewl_Cursor * c, unsigned int start, unsigned int end)
{
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("c", c);
@@ -135,7 +135,7 @@
* @return Returns the current base position.
* @brief Retrieve the current base position.
*/
-unsigned int ewl_cursor_get_base_position(Ewl_Cursor *c)
+unsigned int ewl_cursor_base_position_get(Ewl_Cursor *c)
{
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR_RET("c", c, 0);
@@ -148,7 +148,7 @@
* @return Returns the current start position of the cursor @a c.
* @brief Retrieve the start position of the cursor
*/
-unsigned int ewl_cursor_get_start_position(Ewl_Cursor * c)
+unsigned int ewl_cursor_start_position_get(Ewl_Cursor * c)
{
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR_RET("c", c, 0);
@@ -161,7 +161,7 @@
* @return Returns the current end position of the cursor widget @a c.
* @brief Retrieve the end position of the cursor
*/
-unsigned int ewl_cursor_get_end_position(Ewl_Cursor * c)
+unsigned int ewl_cursor_end_position_get(Ewl_Cursor * c)
{
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR_RET("c", c, 0);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_cursor.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_cursor.h 16 Oct 2003 20:54:25 -0000 1.12
+++ ewl_cursor.h 20 Aug 2004 16:33:26 -0000 1.13
@@ -43,13 +43,13 @@
Ewl_Widget *ewl_cursor_new(void);
void ewl_cursor_init(Ewl_Cursor * c);
-void ewl_cursor_set_position(Ewl_Cursor * w, unsigned int start,
+void ewl_cursor_position_set(Ewl_Cursor * w, unsigned int start,
unsigned int end);
-void ewl_cursor_set_base(Ewl_Cursor *c, unsigned int pos);
+void ewl_cursor_base_set(Ewl_Cursor *c, unsigned int pos);
void ewl_cursor_select_to(Ewl_Cursor *c, unsigned int pos);
-unsigned int ewl_cursor_get_base_position(Ewl_Cursor * w);
-unsigned int ewl_cursor_get_start_position(Ewl_Cursor * w);
-unsigned int ewl_cursor_get_end_position(Ewl_Cursor * w);
+unsigned int ewl_cursor_base_position_get(Ewl_Cursor * w);
+unsigned int ewl_cursor_start_position_get(Ewl_Cursor * w);
+unsigned int ewl_cursor_end_position_get(Ewl_Cursor * w);
/**
* @}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -3 -r1.98 -r1.99
--- ewl_entry.c 18 Aug 2004 03:15:20 -0000 1.98
+++ ewl_entry.c 20 Aug 2004 16:33:26 -0000 1.99
@@ -63,7 +63,7 @@
e->cursor = ewl_cursor_new();
ewl_container_child_append(EWL_CONTAINER(e), e->cursor);
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), 1);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), 1);
/*
* Attach necessary callback mechanisms
@@ -94,7 +94,7 @@
DCHECK_PARAM_PTR("e", e);
ewl_text_text_set(EWL_TEXT(e->text), t);
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), 1);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), 1);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -216,9 +216,9 @@
ww = CURRENT_W(e);
hh = CURRENT_H(e);
- c_spos = ewl_cursor_get_start_position(EWL_CURSOR(e->cursor));
- c_epos = ewl_cursor_get_end_position(EWL_CURSOR(e->cursor));
- base = ewl_cursor_get_base_position(EWL_CURSOR(e->cursor));
+ c_spos = ewl_cursor_start_position_get(EWL_CURSOR(e->cursor));
+ c_epos = ewl_cursor_end_position_get(EWL_CURSOR(e->cursor));
+ base = ewl_cursor_base_position_get(EWL_CURSOR(e->cursor));
if (c_spos > l) {
ex = sx = ewl_object_current_x_get(EWL_OBJECT(w)) +
@@ -349,7 +349,7 @@
if (index > len + 1)
index = len + 1;
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), index);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), index);
e->in_select_mode = TRUE;
@@ -423,14 +423,14 @@
index++;
- if (ewl_cursor_get_start_position(EWL_CURSOR(e->cursor)) != index) {
+ if (ewl_cursor_start_position_get(EWL_CURSOR(e->cursor)) != index) {
int len, base;
index--;
len = ewl_text_length_get(EWL_TEXT(e->text));
- base = ewl_cursor_get_base_position(EWL_CURSOR(e->cursor));
+ base = ewl_cursor_base_position_get(EWL_CURSOR(e->cursor));
if (base > len)
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), --base);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), --base);
}
ewl_cursor_select_to(EWL_CURSOR(e->cursor), index);
@@ -458,7 +458,7 @@
len = ewl_text_length_get(EWL_TEXT(e->text));
if (ev->clicks == 2) {
- bp = ewl_cursor_get_base_position(EWL_CURSOR(e->cursor));
+ bp = ewl_cursor_base_position_get(EWL_CURSOR(e->cursor));
s = ewl_entry_get_text(e);
@@ -467,7 +467,7 @@
if (bp < len) {
index = bp-1;
while ((index-->0) && (s[index] != ' ')){}
- ewl_cursor_set_base(EWL_CURSOR(e->cursor),
index+2);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor),
index+2);
index = bp-1;
while ((index++<len) && (s[index] != ' ')){}
if (index > len) index--;
@@ -476,7 +476,7 @@
else {
index = bp-1;
while ((index-->0) && (s[index] != ' ')){}
- ewl_cursor_set_base(EWL_CURSOR(e->cursor),
index+2);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor),
index+2);
ewl_cursor_select_to(EWL_CURSOR(e->cursor),
len);
}
}
@@ -484,7 +484,7 @@
{
index = bp-1;
while ((index-->0) && (s[index] != ' ')){}
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), index+2);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), index+2);
ewl_cursor_select_to(EWL_CURSOR(e->cursor), bp);
}
}
@@ -492,12 +492,12 @@
index = bp;
while ((index<len) && (s[index] != ' '))
index ++;
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), bp+1);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), bp+1);
ewl_cursor_select_to(EWL_CURSOR(e->cursor), index);
}
}
else {
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), 1);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), 1);
ewl_cursor_select_to(EWL_CURSOR(e->cursor), len);
}
@@ -542,7 +542,7 @@
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("e", e);
- pos = ewl_cursor_get_start_position(EWL_CURSOR(e->cursor));
+ pos = ewl_cursor_start_position_get(EWL_CURSOR(e->cursor));
if (pos > 1)
--pos;
@@ -550,7 +550,7 @@
if (e->in_select_mode)
ewl_cursor_select_to(EWL_CURSOR(e->cursor), pos);
else
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), pos);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), pos);
ewl_widget_configure(EWL_WIDGET(e));
@@ -566,7 +566,7 @@
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("e", e);
- pos = ewl_cursor_get_end_position(EWL_CURSOR(e->cursor));
+ pos = ewl_cursor_end_position_get(EWL_CURSOR(e->cursor));
str = ewl_entry_get_text(e);
len = strlen(str);
@@ -579,7 +579,7 @@
if (e->in_select_mode)
ewl_cursor_select_to(EWL_CURSOR(e->cursor), pos);
else
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), pos);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), pos);
ewl_widget_configure(EWL_WIDGET(e));
@@ -597,7 +597,7 @@
if (e->in_select_mode)
ewl_cursor_select_to(EWL_CURSOR(e->cursor), 1);
else
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), 1);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), 1);
ewl_widget_configure(EWL_WIDGET(e));
@@ -625,7 +625,7 @@
if (e->in_select_mode)
ewl_cursor_select_to(EWL_CURSOR(e->cursor), l);
else
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), l + 1);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), l + 1);
ewl_widget_configure(EWL_WIDGET(e));
@@ -649,7 +649,7 @@
else
l2 = 0;
- sp = ewl_cursor_get_start_position(EWL_CURSOR(e->cursor));
+ sp = ewl_cursor_start_position_get(EWL_CURSOR(e->cursor));
s3 = NEW(char, l + 1 + l2);
if (!s3) {
@@ -662,19 +662,19 @@
strncat(s3, s2, sp - 1);
strcat(s3, s);
- ep = ewl_cursor_get_end_position(EWL_CURSOR(e->cursor));
+ ep = ewl_cursor_end_position_get(EWL_CURSOR(e->cursor));
if (!ep || (sp != ep))
ep++;
if (s2) strcat(s3, &(s2[ep - 1]));
ewl_entry_set_text(e, s3);
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), ep);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), ep);
IF_FREE(s2);
FREE(s3);
sp++;
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), sp);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), sp);
ewl_widget_configure(EWL_WIDGET(e));
DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -688,8 +688,8 @@
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("e", e);
- sp = ewl_cursor_get_start_position(EWL_CURSOR(e->cursor));
- ep = ewl_cursor_get_end_position(EWL_CURSOR(e->cursor));
+ sp = ewl_cursor_start_position_get(EWL_CURSOR(e->cursor));
+ ep = ewl_cursor_end_position_get(EWL_CURSOR(e->cursor));
s = ewl_entry_get_text(e);
if (!s)
@@ -711,7 +711,7 @@
FREE(s);
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), sp);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), sp);
ewl_widget_configure(EWL_WIDGET(e));
DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -725,8 +725,8 @@
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("e", e);
- sp = ewl_cursor_get_start_position(EWL_CURSOR(e->cursor));
- ep = ewl_cursor_get_end_position(EWL_CURSOR(e->cursor));
+ sp = ewl_cursor_start_position_get(EWL_CURSOR(e->cursor));
+ ep = ewl_cursor_end_position_get(EWL_CURSOR(e->cursor));
s = ewl_entry_get_text(e);
if (!s)
@@ -740,7 +740,7 @@
FREE(s);
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), sp);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), sp);
ewl_widget_configure(EWL_WIDGET(e));
DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -759,7 +759,7 @@
if (!s)
DRETURN(DLEVEL_STABLE);
- bp = ewl_cursor_get_base_position(EWL_CURSOR(e->cursor));
+ bp = ewl_cursor_base_position_get(EWL_CURSOR(e->cursor));
index = bp-2;
while ((index-->0) && (s[index] == ' ')){}
@@ -774,7 +774,7 @@
if (index <= 0)
index = 1;
- ewl_cursor_set_base(EWL_CURSOR(e->cursor), index);
+ ewl_cursor_base_set(EWL_CURSOR(e->cursor), index);
ewl_widget_configure(EWL_WIDGET(e));
DLEAVE_FUNCTION(DLEVEL_STABLE);
@@ -831,12 +831,12 @@
e = EWL_ENTRY(data);
dt = ecore_time_get() - e->start_time;
- direction = ewl_cursor_get_base_position(EWL_CURSOR(e->cursor)) -
- ewl_cursor_get_end_position(EWL_CURSOR(e->cursor));
+ direction = ewl_cursor_base_position_get(EWL_CURSOR(e->cursor)) -
+ ewl_cursor_end_position_get(EWL_CURSOR(e->cursor));
if (!direction)
- direction = ewl_cursor_get_start_position(EWL_CURSOR(e->cursor))
- - ewl_cursor_get_base_position(EWL_CURSOR(e->cursor));
+ direction = ewl_cursor_start_position_get(EWL_CURSOR(e->cursor))
+ - ewl_cursor_base_position_get(EWL_CURSOR(e->cursor));
if (!direction) {
int tmp;
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs