1
0
Fork 0
Commit graph

17 commits

Author SHA1 Message Date
Emmanuele Bassi
b8d6f3aaab Do not mask index in ClutterEntry 2007-08-07 14:07:39 +00:00
Emmanuele Bassi
4ccfc2daa2 2007-08-02 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-backend-egl.c:
	* clutter/eglx/clutter-backend-egl.c:
	* clutter/sdl/clutter-backend-sdl.c: Set the default resolution
	as 96.0 dpi for every backend (we already were under this
	assumption anyway, and this makes it easier to change this
	setting per-backend).

	* clutter/pango/pangoclutter-fontmap.c:
	* clutter/pango/pangoclutter.h: Allow setting the resolution
	for the PangoClutterFontMap object and provide the implementation
	for the PangoFcFontMap::get_resolution() virtual function. This
	allows to set the resolution of the PangoContext when retrieving
	it.

	* clutter/clutter-label.c (clutter_label_init): Set the
	resolution of the font map with the one the backend gives us.

	* clutter/clutter-entry.c (clutter_entry_init): Ditto.
2007-08-02 09:58:18 +00:00
Emmanuele Bassi
dd93a0a13c 2007-07-31 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-backend.[ch]: Add clutter_backend_set_resolution()
	and clutter_backend_get_resolution(); backends should use the former
	to set the resolution of the display when initialising, while actors
	should use the latter when sizing themselves depending on the
	resolution or the font size.

	* clutter/glx/clutter-backend-glx.c: Set the resolution as 96 dpi
	as a default and query the X server when opening the display.

	* clutter/clutter-entry.c: Drop the hardcoded dpi value and use
	clutter_backend_get_resolution() to compute the default size.
2007-07-31 10:38:23 +00:00
Emmanuele Bassi
cae72ec419 2007-07-31 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-entry.c (clutter_entry_init): Set the default
	size of the entry based on the size of the default font. (#414).
2007-07-31 08:28:17 +00:00
Neil J. Patel
c1e84a8f3a 2007-07-26 Neil J. Patel <njp@o-hand.com>
* 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).
2007-07-26 11:31:50 +00:00
Emmanuele Bassi
454e493197 Fix various compiler warnings
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.
2007-07-26 11:04:04 +00:00
Emmanuele Bassi
da8bad5e03 2007-07-04 Emmanuele Bassi <ebassi@openedhand.com>
* 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.
2007-07-04 09:33:04 +00:00
Emmanuele Bassi
1e36656622 Remove stray debug message
This patch removes a stray g_print() added for debugging purposes, which
also produces a compiler warning.
2007-07-01 16:46:07 +00:00
Neil J. Patel
52b5bad316 2007-06-29 Neil J. Patel <njp@o-hand.com>
* 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.
2007-06-29 17:18:13 +00:00
Neil J. Patel
3649b4734b Added a 'activate' signal, which is emitted when the 'Enter' key is pressed 2007-06-07 21:23:07 +00:00
Neil J. Patel
acb0772fe0 2007-06-01 Neil J. Patel <njp@o-hand.com>
* 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.
2007-06-01 17:18:21 +00:00
Neil J. Patel
d5c38ef466 Clipping within the entry class to stop it over-slipping its
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.
2007-06-01 16:50:35 +00:00
Neil J. Patel
f6b675fc7d Added text-visibility, which will allow you to show all entered text
as a nominated charaecter ('*' is default).
2007-06-01 15:58:17 +00:00
Neil J. Patel
214a2ead22 Added signal to track cursor movements\nMoved the curor painting function into the class functions so it can be sub-classed 2007-06-01 15:18:05 +00:00
Neil J. Patel
71f2e05b9b Add a text-changed signal to the entry 2007-06-01 11:50:18 +00:00
Neil J. Patel
ac530eed12 Added a function to deal with ClutterKeyEvents. Handles the majority
of entry-related keyboard keys. However modifiers still need to be
        implemented.
2007-06-01 11:34:40 +00:00
Neil J. Patel
e725b0c7fa Initial import of ClutterEntry, a text-entry actor 2007-05-31 18:33:42 +00:00