2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; https://wiki.gnome.org/Accessibility)
5 * Copyright (c) 2015 Samsung Electronics Co., Ltd.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
25 #include <glib-object.h>
28 #include "my-atk-object.h"
29 #include "my-atk-editable-text.h"
31 typedef struct _MyAtkEditableTextInfo MyAtkEditableTextInfo;
33 static void atk_editable_text_interface_init (AtkEditableTextIface *iface);
35 G_DEFINE_TYPE_WITH_CODE (MyAtkEditableText,
38 G_IMPLEMENT_INTERFACE (ATK_TYPE_EDITABLE_TEXT,
39 atk_editable_text_interface_init));
42 my_atk_set_editable_text (AtkEditableText *editable_text, const gchar *text)
44 g_return_val_if_fail (MY_IS_ATK_EDITABLE_TEXT (editable_text), -1);
50 my_atk_editable_text_init (MyAtkEditableText *obj)
56 my_atk_set_editable_text_set_run_attributes (AtkEditableText *text,
57 AtkAttributeSet *attrib_set,
65 my_atk_set_editable_text_set_text_contents (AtkEditableText *text,
71 my_atk_set_editable_text_insert_text (AtkEditableText *text,
79 my_atk_set_editable_text_copy_text (AtkEditableText *text,
86 my_atk_set_editable_text_cut_text (AtkEditableText *text,
93 my_atk_set_editable_text_delete_text (AtkEditableText *text,
100 my_atk_set_editable_text_paste_text (AtkEditableText *text,
107 atk_editable_text_interface_init (AtkEditableTextIface *iface)
110 iface->set_run_attributes = my_atk_set_editable_text_set_run_attributes;
111 iface->set_text_contents = my_atk_set_editable_text_set_text_contents;
112 iface->insert_text = my_atk_set_editable_text_insert_text;
113 iface->copy_text = my_atk_set_editable_text_copy_text;
114 iface->cut_text = my_atk_set_editable_text_cut_text;
115 iface->delete_text = my_atk_set_editable_text_delete_text;
116 iface->paste_text = my_atk_set_editable_text_paste_text;
120 my_atk_editable_text_initialize (AtkObject *obj, gpointer data)
125 my_atk_editable_text_finalize (GObject *object)
130 my_atk_editable_text_class_init (MyAtkEditableTextClass *my_class)
132 AtkObjectClass *atk_class = ATK_OBJECT_CLASS (my_class);
133 GObjectClass *gobject_class = G_OBJECT_CLASS (my_class);
135 gobject_class->finalize = my_atk_editable_text_finalize;
137 atk_class->initialize = my_atk_editable_text_initialize;