* clutter/clutter-entry.c: (offset_to_bytes),
(clutter_entry_ensure_cursor_position),
(clutter_entry_new_with_text), (clutter_entry_new),
(clutter_entry_insert_unichar), (clutter_entry_delete_chars):
Fixed utf8 support so it actually works now, for both inserting and deleting
chars.
Fixed positioning of cursor for utf8 chars. Both GString and Pnago need
bytes (not documented!) for string manipulation, so making sure all values
were bytes and not char positions fixed the issue.
Set a default size of 50x50 for the entry, otherwise no chars can be seen
if the size is not set after creation (which confuses the developer).
Most of these fixes are simple symbol shadowing issues, like index and the
braindead y0 and y1 extern symbols exported by math.h on GNU libc systems.
There is a masking issue in ClutterTexture which should be checked; I ran
the tests and everything looked fine.
The rest are just unused variables.
* clutter/clutter-entry.[ch]: Various fixes to ClutterEntry:
fix code style issues; add documentation for the various
properties; add ClutterEntry:entry-padding property, for controlling
the text padding (until we have style properties separated from
the object properties); notify property changes; free resources
in the ::finalize method; rename clutter_entry_add() to
clutter_entry_insert_unichar(), and clutter_entry_remove() to
clutter_entry_delete_chars() - for bindings and for matching the
insert_text() and delete_text() existing methods; add a getter
method for the max-length property.
* clutter/clutter-entry.c: (clutter_entry_handle_key_event),
(clutter_entry_add), (clutter_entry_remove):
Check if unichar == 0, and if so, return, as it will cause a delete in
the GString.
* clutter/clutter-entry.c: (clutter_entry_set_property),
(clutter_entry_get_property), (clutter_entry_class_init),
(clutter_entry_init), (clutter_entry_set_text),
(clutter_entry_set_max_length):
* clutter/clutter-entry.h:
* examples/test-entry.c: (main):
Added a max-length property whihc limits the length of the text in the
entry.
boundries.
Text will move within the clip region to keep the cursor always
visible.
Added some padding to the left and right to make sure cursor is
always show.