45 ev_form_field_accessible_get_extents (AtkComponent *atk_component,
50 AtkCoordType coord_type)
63 *width = atk_rect.
x2 - atk_rect.
x1;
64 *height = atk_rect.
y2 - atk_rect.
y1;
83 iface->get_extents = ev_form_field_accessible_get_extents;
96 gint last_zero_sized_index = -1;
116 for (i = 0; i < n_areas; i++) {
120 c_x = rect->
x1 + (rect->
x2 - rect->
x1) / 2.;
121 c_y = rect->
y1 + (rect->
y2 - rect->
y1) / 2.;
123 if (c_x >= priv->
area.
x1 && c_x <= priv->area.x2 &&
124 c_y >= priv->
area.
y1 && c_y <= priv->area.y2) {
133 for (i = priv->
start_index + 1; i < n_areas; i++) {
142 if (rect->
y1 == rect->
y2) {
143 last_zero_sized_index = i;
147 c_x = rect->
x1 + (rect->
x2 - rect->
x1) / 2.;
148 c_y = rect->
y1 + (rect->
y2 - rect->
y1) / 2.;
150 if (c_x < priv->area.x1 || c_x > priv->
area.
x2 ||
151 c_y < priv->area.y1 || c_y > priv->
area.
y2) {
152 priv->
end_index = last_zero_sized_index + 1 == i ? i - 1 : i;
172 return atk_text_get_text (ATK_TEXT (atk_object_get_parent (atk_object)), start, end);
201 return ATK_OBJECT (priv->
page);
213 switch (field_button->
type) {
215 return ATK_ROLE_CHECK_BOX;
217 return ATK_ROLE_RADIO_BUTTON;
219 return ATK_ROLE_PUSH_BUTTON;
221 return ATK_ROLE_UNKNOWN;
228 switch (field_choice->
type) {
230 return ATK_ROLE_COMBO_BOX;
232 return ATK_ROLE_LIST_BOX;
234 return ATK_ROLE_UNKNOWN;
242 return ATK_ROLE_PASSWORD_TEXT;
244 return ATK_ROLE_TEXT;
246 return ATK_ROLE_ENTRY;
249 return ATK_ROLE_UNKNOWN;
255 AtkStateSet *state_set;
256 AtkStateSet *copy_set;
257 AtkStateSet *page_accessible_state_set;
264 state_set = ATK_OBJECT_CLASS (ev_form_field_accessible_parent_class)->ref_state_set (atk_object);
265 atk_state_set_clear_states (state_set);
267 page_accessible_state_set = atk_object_ref_state_set (ATK_OBJECT (self->priv->page));
268 copy_set = atk_state_set_or_sets (state_set, page_accessible_state_set);
273 atk_state_set_remove_state (copy_set, ATK_STATE_SHOWING);
279 if (field_button->
state) {
281 atk_state_set_add_state (copy_set, ATK_STATE_PRESSED);
283 atk_state_set_add_state (copy_set, ATK_STATE_CHECKED);
291 atk_state_set_add_state (copy_set, ATK_STATE_EDITABLE);
293 atk_state_set_add_state (copy_set, ATK_STATE_MULTISELECTABLE);
300 atk_state_set_add_state (copy_set, ATK_STATE_EDITABLE);
302 atk_state_set_add_state (copy_set, ATK_STATE_SINGLE_LINE);
304 atk_state_set_add_state (copy_set, ATK_STATE_MULTI_LINE);
307 g_object_unref (state_set);
308 g_object_unref (page_accessible_state_set);
316 AtkObject *atk_object;
318 AtkStateSet *changed_states;
321 atk_object = ATK_OBJECT (accessible);
323 changed_states = atk_state_set_xor_sets (accessible->
priv->
saved_states, states);
324 if (changed_states && !atk_state_set_is_empty (accessible->
priv->
saved_states)) {
325 for (i = 0; i < ATK_STATE_LAST_DEFINED; i++) {
326 if (atk_state_set_contains_state (changed_states, i))
327 atk_object_notify_state_change (atk_object, i, atk_state_set_contains_state (states, i));
333 atk_state_set_clear_states (changed_states);
334 accessible->
priv->
saved_states = atk_state_set_or_sets (changed_states, states);
336 g_object_unref (changed_states);
337 g_object_unref (states);
349 G_OBJECT_CLASS (ev_form_field_accessible_parent_class)->finalize (
object);
355 GObjectClass *object_class = G_OBJECT_CLASS (klass);
356 AtkObjectClass *atk_class = ATK_OBJECT_CLASS (klass);