mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
2008-01-31 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-entry.h: * clutter/clutter-entry.c: (clutter_entry_set_cursor_position), (clutter_entry_get_cursor_position): Rename [gs]et_position() to [gs]set_cursor_position(), and avoid method name collisions with bindings for high-level languages. * clutter/clutter-deprecated.h: Add replacement warnings for the renamed methods.
This commit is contained in:
parent
d7e01ee396
commit
d0b0e1bcd4
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
2008-01-31 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/clutter-entry.h:
|
||||||
|
* clutter/clutter-entry.c:
|
||||||
|
(clutter_entry_set_cursor_position),
|
||||||
|
(clutter_entry_get_cursor_position): Rename [gs]et_position()
|
||||||
|
to [gs]set_cursor_position(), and avoid method name collisions
|
||||||
|
with bindings for high-level languages.
|
||||||
|
|
||||||
|
* clutter/clutter-deprecated.h: Add replacement warnings for the
|
||||||
|
renamed methods.
|
||||||
|
|
||||||
2008-01-31 Emmanuele Bassi <ebassi@openedhand.com>
|
2008-01-31 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-actor.c (clutter_actor_init): Explicitly
|
* clutter/clutter-actor.c (clutter_actor_init): Explicitly
|
||||||
|
@ -34,4 +34,7 @@
|
|||||||
#define clutter_actor_set_scale_with_gravity clutter_actor_set_scale_with_gravity_DEPRECATED_BY_clutter_actor_set_anchor_point_from_gravity
|
#define clutter_actor_set_scale_with_gravity clutter_actor_set_scale_with_gravity_DEPRECATED_BY_clutter_actor_set_anchor_point_from_gravity
|
||||||
#define clutter_actor_set_scale_with_gravityx clutter_actor_set_scale_with_gravity_DEPRECATED_BY_clutter_actor_set_anchor_point_from_gravity
|
#define clutter_actor_set_scale_with_gravityx clutter_actor_set_scale_with_gravity_DEPRECATED_BY_clutter_actor_set_anchor_point_from_gravity
|
||||||
|
|
||||||
|
#define clutter_entry_set_position clutter_entry_set_position_REPLACED_BY_clutter_entry_set_cursor_position
|
||||||
|
#define clutter_entry_get_position clutter_entry_get_position_REPLACED_BY_clutter_entry_get_cursor_position
|
||||||
|
|
||||||
#endif /* CLUTTER_DEPRECATED_H */
|
#endif /* CLUTTER_DEPRECATED_H */
|
||||||
|
@ -145,7 +145,7 @@ clutter_entry_set_entry_padding (ClutterEntry *entry,
|
|||||||
{
|
{
|
||||||
priv->entry_padding = padding;
|
priv->entry_padding = padding;
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR (entry)))
|
if (CLUTTER_ACTOR_IS_VISIBLE (entry))
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (entry), "entry-padding");
|
g_object_notify (G_OBJECT (entry), "entry-padding");
|
||||||
@ -179,7 +179,7 @@ clutter_entry_set_property (GObject *object,
|
|||||||
clutter_entry_set_alignment (entry, g_value_get_enum (value));
|
clutter_entry_set_alignment (entry, g_value_get_enum (value));
|
||||||
break;
|
break;
|
||||||
case PROP_POSITION:
|
case PROP_POSITION:
|
||||||
clutter_entry_set_position (entry, g_value_get_int (value));
|
clutter_entry_set_cursor_position (entry, g_value_get_int (value));
|
||||||
break;
|
break;
|
||||||
case PROP_CURSOR:
|
case PROP_CURSOR:
|
||||||
clutter_entry_set_visible_cursor (entry, g_value_get_boolean (value));
|
clutter_entry_set_visible_cursor (entry, g_value_get_boolean (value));
|
||||||
@ -957,8 +957,8 @@ clutter_entry_set_text (ClutterEntry *entry,
|
|||||||
clutter_entry_clear_layout (entry);
|
clutter_entry_clear_layout (entry);
|
||||||
clutter_entry_clear_cursor_position (entry);
|
clutter_entry_clear_cursor_position (entry);
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR(entry)))
|
if (CLUTTER_ACTOR_IS_VISIBLE (entry))
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR(entry));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
||||||
|
|
||||||
g_signal_emit (G_OBJECT (entry), entry_signals[TEXT_CHANGED], 0);
|
g_signal_emit (G_OBJECT (entry), entry_signals[TEXT_CHANGED], 0);
|
||||||
|
|
||||||
@ -1040,7 +1040,7 @@ clutter_entry_set_font_name (ClutterEntry *entry,
|
|||||||
{
|
{
|
||||||
clutter_entry_clear_layout (entry);
|
clutter_entry_clear_layout (entry);
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR (entry)))
|
if (CLUTTER_ACTOR_IS_VISIBLE (entry))
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1167,7 +1167,7 @@ clutter_entry_set_alignment (ClutterEntry *entry,
|
|||||||
|
|
||||||
clutter_entry_clear_layout (entry);
|
clutter_entry_clear_layout (entry);
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR (entry)))
|
if (CLUTTER_ACTOR_IS_VISIBLE (entry))
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (entry), "alignment");
|
g_object_notify (G_OBJECT (entry), "alignment");
|
||||||
@ -1194,7 +1194,7 @@ clutter_entry_get_alignment (ClutterEntry *entry)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_entry_set_position:
|
* clutter_entry_set_cursor_position:
|
||||||
* @entry: a #ClutterEntry
|
* @entry: a #ClutterEntry
|
||||||
* @position: the position of the cursor.
|
* @position: the position of the cursor.
|
||||||
*
|
*
|
||||||
@ -1203,10 +1203,11 @@ clutter_entry_get_alignment (ClutterEntry *entry)
|
|||||||
* that the position should be set after the last character in the entry.
|
* that the position should be set after the last character in the entry.
|
||||||
* Note that this position is in characters, not in bytes.
|
* Note that this position is in characters, not in bytes.
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.6
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
clutter_entry_set_position (ClutterEntry *entry, gint position)
|
clutter_entry_set_cursor_position (ClutterEntry *entry,
|
||||||
|
gint position)
|
||||||
{
|
{
|
||||||
ClutterEntryPrivate *priv;
|
ClutterEntryPrivate *priv;
|
||||||
gint len;
|
gint len;
|
||||||
@ -1227,22 +1228,22 @@ clutter_entry_set_position (ClutterEntry *entry, gint position)
|
|||||||
|
|
||||||
clutter_entry_clear_cursor_position (entry);
|
clutter_entry_clear_cursor_position (entry);
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR (entry)))
|
if (CLUTTER_ACTOR_IS_VISIBLE (entry))
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* clutter_entry_get_position:
|
* clutter_entry_get_cursor_position:
|
||||||
* @entry: a #ClutterEntry
|
* @entry: a #ClutterEntry
|
||||||
*
|
*
|
||||||
* Gets the position, in characters, of the cursor in @entry.
|
* Gets the position, in characters, of the cursor in @entry.
|
||||||
*
|
*
|
||||||
* Return value: the position of the cursor.
|
* Return value: the position of the cursor.
|
||||||
*
|
*
|
||||||
* Since: 0.4
|
* Since: 0.6
|
||||||
*/
|
*/
|
||||||
gint
|
gint
|
||||||
clutter_entry_get_position (ClutterEntry *entry)
|
clutter_entry_get_cursor_position (ClutterEntry *entry)
|
||||||
{
|
{
|
||||||
ClutterEntryPrivate *priv;
|
ClutterEntryPrivate *priv;
|
||||||
|
|
||||||
@ -1313,9 +1314,9 @@ clutter_entry_handle_key_event (ClutterEntry *entry,
|
|||||||
if (pos != 0 && len != 0)
|
if (pos != 0 && len != 0)
|
||||||
{
|
{
|
||||||
if (pos == -1)
|
if (pos == -1)
|
||||||
clutter_entry_set_position (entry, len - 1);
|
clutter_entry_set_cursor_position (entry, len - 1);
|
||||||
else
|
else
|
||||||
clutter_entry_set_position (entry, pos - 1);
|
clutter_entry_set_cursor_position (entry, pos - 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CLUTTER_Right:
|
case CLUTTER_Right:
|
||||||
@ -1323,17 +1324,17 @@ clutter_entry_handle_key_event (ClutterEntry *entry,
|
|||||||
if (pos != -1 && len != 0)
|
if (pos != -1 && len != 0)
|
||||||
{
|
{
|
||||||
if (pos != len)
|
if (pos != len)
|
||||||
clutter_entry_set_position (entry, pos + 1);
|
clutter_entry_set_cursor_position (entry, pos + 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CLUTTER_End:
|
case CLUTTER_End:
|
||||||
case CLUTTER_KP_End:
|
case CLUTTER_KP_End:
|
||||||
clutter_entry_set_position (entry, -1);
|
clutter_entry_set_cursor_position (entry, -1);
|
||||||
break;
|
break;
|
||||||
case CLUTTER_Begin:
|
case CLUTTER_Begin:
|
||||||
case CLUTTER_Home:
|
case CLUTTER_Home:
|
||||||
case CLUTTER_KP_Home:
|
case CLUTTER_KP_Home:
|
||||||
clutter_entry_set_position (entry, 0);
|
clutter_entry_set_cursor_position (entry, 0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
clutter_entry_insert_unichar (entry,
|
clutter_entry_insert_unichar (entry,
|
||||||
@ -1377,7 +1378,7 @@ clutter_entry_insert_unichar (ClutterEntry *entry,
|
|||||||
clutter_entry_set_text (entry, new->str);
|
clutter_entry_set_text (entry, new->str);
|
||||||
|
|
||||||
if (priv->position >= 0)
|
if (priv->position >= 0)
|
||||||
clutter_entry_set_position (entry, priv->position + 1);
|
clutter_entry_set_cursor_position (entry, priv->position + 1);
|
||||||
|
|
||||||
g_string_free (new, TRUE);
|
g_string_free (new, TRUE);
|
||||||
|
|
||||||
@ -1430,7 +1431,7 @@ clutter_entry_delete_chars (ClutterEntry *entry,
|
|||||||
clutter_entry_set_text (entry, new->str);
|
clutter_entry_set_text (entry, new->str);
|
||||||
|
|
||||||
if (priv->position > 0)
|
if (priv->position > 0)
|
||||||
clutter_entry_set_position (entry, priv->position - num);
|
clutter_entry_set_cursor_position (entry, priv->position - num);
|
||||||
|
|
||||||
g_string_free (new, TRUE);
|
g_string_free (new, TRUE);
|
||||||
|
|
||||||
@ -1538,7 +1539,7 @@ clutter_entry_set_visible_cursor (ClutterEntry *entry,
|
|||||||
|
|
||||||
g_object_notify (G_OBJECT (entry), "cursor-visible");
|
g_object_notify (G_OBJECT (entry), "cursor-visible");
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR (entry)))
|
if (CLUTTER_ACTOR_IS_VISIBLE (entry))
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1589,7 +1590,7 @@ clutter_entry_set_visibility (ClutterEntry *entry, gboolean visible)
|
|||||||
clutter_entry_clear_layout (entry);
|
clutter_entry_clear_layout (entry);
|
||||||
clutter_entry_clear_cursor_position (entry);
|
clutter_entry_clear_cursor_position (entry);
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR (entry)))
|
if (CLUTTER_ACTOR_IS_VISIBLE (entry))
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1642,8 +1643,8 @@ clutter_entry_set_invisible_char (ClutterEntry *entry, gunichar wc)
|
|||||||
clutter_entry_clear_layout (entry);
|
clutter_entry_clear_layout (entry);
|
||||||
clutter_entry_clear_cursor_position (entry);
|
clutter_entry_clear_cursor_position (entry);
|
||||||
|
|
||||||
if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR(entry)))
|
if (CLUTTER_ACTOR_IS_VISIBLE (entry))
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR(entry));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (entry));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -106,54 +106,54 @@ struct _ClutterEntryClass
|
|||||||
|
|
||||||
GType clutter_entry_get_type (void) G_GNUC_CONST;
|
GType clutter_entry_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
ClutterActor * clutter_entry_new (void);
|
ClutterActor * clutter_entry_new (void);
|
||||||
ClutterActor * clutter_entry_new_full (const gchar *font_name,
|
ClutterActor * clutter_entry_new_full (const gchar *font_name,
|
||||||
const gchar *text,
|
const gchar *text,
|
||||||
const ClutterColor *color);
|
const ClutterColor *color);
|
||||||
ClutterActor * clutter_entry_new_with_text (const gchar *font_name,
|
ClutterActor * clutter_entry_new_with_text (const gchar *font_name,
|
||||||
const gchar *text);
|
const gchar *text);
|
||||||
void clutter_entry_set_text (ClutterEntry *entry,
|
void clutter_entry_set_text (ClutterEntry *entry,
|
||||||
const gchar *text);
|
const gchar *text);
|
||||||
G_CONST_RETURN gchar *clutter_entry_get_text (ClutterEntry *entry);
|
G_CONST_RETURN gchar *clutter_entry_get_text (ClutterEntry *entry);
|
||||||
void clutter_entry_set_font_name (ClutterEntry *entry,
|
void clutter_entry_set_font_name (ClutterEntry *entry,
|
||||||
const gchar *font_name);
|
const gchar *font_name);
|
||||||
G_CONST_RETURN gchar *clutter_entry_get_font_name (ClutterEntry *entry);
|
G_CONST_RETURN gchar *clutter_entry_get_font_name (ClutterEntry *entry);
|
||||||
void clutter_entry_set_color (ClutterEntry *entry,
|
void clutter_entry_set_color (ClutterEntry *entry,
|
||||||
const ClutterColor *color);
|
const ClutterColor *color);
|
||||||
void clutter_entry_get_color (ClutterEntry *entry,
|
void clutter_entry_get_color (ClutterEntry *entry,
|
||||||
ClutterColor *color);
|
ClutterColor *color);
|
||||||
PangoLayout * clutter_entry_get_layout (ClutterEntry *entry);
|
PangoLayout * clutter_entry_get_layout (ClutterEntry *entry);
|
||||||
void clutter_entry_set_alignment (ClutterEntry *entry,
|
void clutter_entry_set_alignment (ClutterEntry *entry,
|
||||||
PangoAlignment alignment);
|
PangoAlignment alignment);
|
||||||
PangoAlignment clutter_entry_get_alignment (ClutterEntry *entry);
|
PangoAlignment clutter_entry_get_alignment (ClutterEntry *entry);
|
||||||
void clutter_entry_set_position (ClutterEntry *entry,
|
void clutter_entry_set_cursor_position (ClutterEntry *entry,
|
||||||
gint position);
|
gint position);
|
||||||
gint clutter_entry_get_position (ClutterEntry *entry);
|
gint clutter_entry_get_cursor_position (ClutterEntry *entry);
|
||||||
void clutter_entry_handle_key_event (ClutterEntry *entry,
|
void clutter_entry_handle_key_event (ClutterEntry *entry,
|
||||||
ClutterKeyEvent *kev);
|
ClutterKeyEvent *kev);
|
||||||
void clutter_entry_insert_unichar (ClutterEntry *entry,
|
void clutter_entry_insert_unichar (ClutterEntry *entry,
|
||||||
gunichar wc);
|
gunichar wc);
|
||||||
void clutter_entry_delete_chars (ClutterEntry *entry,
|
void clutter_entry_delete_chars (ClutterEntry *entry,
|
||||||
guint len);
|
guint len);
|
||||||
void clutter_entry_insert_text (ClutterEntry *entry,
|
void clutter_entry_insert_text (ClutterEntry *entry,
|
||||||
const gchar *text,
|
const gchar *text,
|
||||||
gssize position);
|
gssize position);
|
||||||
void clutter_entry_delete_text (ClutterEntry *entry,
|
void clutter_entry_delete_text (ClutterEntry *entry,
|
||||||
gssize start_pos,
|
gssize start_pos,
|
||||||
gssize end_pos);
|
gssize end_pos);
|
||||||
void clutter_entry_set_visible_cursor (ClutterEntry *entry,
|
void clutter_entry_set_visible_cursor (ClutterEntry *entry,
|
||||||
gboolean visible);
|
gboolean visible);
|
||||||
gboolean clutter_entry_get_visible_cursor (ClutterEntry *entry);
|
gboolean clutter_entry_get_visible_cursor (ClutterEntry *entry);
|
||||||
|
|
||||||
void clutter_entry_set_visibility (ClutterEntry *entry,
|
void clutter_entry_set_visibility (ClutterEntry *entry,
|
||||||
gboolean visible);
|
gboolean visible);
|
||||||
gboolean clutter_entry_get_visibility (ClutterEntry *entry);
|
gboolean clutter_entry_get_visibility (ClutterEntry *entry);
|
||||||
void clutter_entry_set_invisible_char (ClutterEntry *entry,
|
void clutter_entry_set_invisible_char (ClutterEntry *entry,
|
||||||
gunichar wc);
|
gunichar wc);
|
||||||
gunichar clutter_entry_get_invisible_char (ClutterEntry *entry);
|
gunichar clutter_entry_get_invisible_char (ClutterEntry *entry);
|
||||||
void clutter_entry_set_max_length (ClutterEntry *entry,
|
void clutter_entry_set_max_length (ClutterEntry *entry,
|
||||||
gint max);
|
gint max);
|
||||||
gint clutter_entry_get_max_length (ClutterEntry *entry);
|
gint clutter_entry_get_max_length (ClutterEntry *entry);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user