my-atk-hypertext.h \
my-atk-object.c \
my-atk-object.h \
+ my-atk-selection.c \
+ my-atk-selection.h \
my-atk-streamable-content.c \
my-atk-streamable-content.h \
+ my-atk-table.c \
+ my-atk-table.h \
my-atk-text.c \
my-atk-text.h \
my-atk-value.c \
#include <string.h>
#include <atk/atk.h>
+#include "my-atk-object.h"
#include "my-atk-action.h"
static GObjectClass *parent_class = NULL;
NULL, /* interface_finalize */
NULL /* interface_data */
};
- type = g_type_register_static (G_TYPE_OBJECT,
+ type = g_type_register_static (MY_TYPE_ATK_OBJECT,
"MyAtkAction",
&info, 0);
g_type_add_interface_static (type,
#include <glib-object.h>
#include <atk/atk.h>
+#include "my-atk-object.h"
+
//declarations
#define MY_TYPE_ATK_ACTION (my_atk_action_get_type ())
#define MY_ATK_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_ACTION, MyAtkAction))
struct _MyAtkAction
{
- GObject parent;
+ MyAtkObject parent;
gboolean disposed;
struct OneAction
struct _MyAtkActionClass
{
- GObjectClass parent;
+ MyAtkObjectClass parent;
};
GType my_atk_action_get_type(void);
AtkObject parent;
//array of children
GPtrArray* children;
+ gint id;
};
struct _MyAtkObjectClass
--- /dev/null
+/* This file contains both declaration and definition of the MyAtkSelection,
+ * a GObject that implements the AtkSelectionIface interface.
+ */
+
+#include <glib-object.h>
+#include <atk/atk.h>
+
+#include "my-atk-object.h"
+#include "my-atk-selection.h"
+
+/******************************************************************/
+/* Implementation */
+/******************************************************************/
+static GObjectClass *parent_class_simple_selection = NULL;
+
+/* Implementation of the AtkSelectionIface interface. */
+static gboolean
+simple_selection_add_selection (AtkSelection *selection, gint i)
+{
+ MyAtkSelection* self = (MyAtkSelection*)selection;
+ if ((!self) || self->disposed)
+ {
+ return FALSE;
+ }
+
+ if ((i >= 0) && (i < TEST_SELECTION_NCHILDREN))
+ {
+ /* If the child is not selected, select it and send the signal */
+ if (!self->is_selected[i])
+ {
+ self->is_selected[i] = TRUE;
+ g_signal_emit_by_name ((gpointer)self, "selection-changed");
+ }
+
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
+
+}
+
+static gboolean
+simple_selection_clear_selection (AtkSelection *selection)
+{
+ MyAtkSelection* self = (MyAtkSelection*)selection;
+ if ((!self) || self->disposed)
+ {
+ return FALSE;
+ }
+
+ /* clear selection */
+ {
+ gboolean changed = FALSE;
+ int i;
+ for (i = 0; i < TEST_SELECTION_NCHILDREN; ++i)
+ {
+ changed |= self->is_selected[i];
+ self->is_selected[i] = FALSE;
+ }
+
+ if (changed)
+ {
+ g_signal_emit_by_name ((gpointer)self, "selection-changed");
+ }
+ }
+
+ return TRUE;
+}
+
+static AtkObject*
+simple_selection_ref_selection (AtkSelection *selection, gint i)
+{
+ int pos;
+ int nsel;
+ MyAtkSelection* self = (MyAtkSelection*)selection;
+ if ((!self) || self->disposed)
+ {
+ return NULL;
+ }
+
+ nsel = 0;
+ for (pos = 0; pos < TEST_SELECTION_NCHILDREN; ++pos)
+ {
+ if (self->is_selected[pos])
+ {
+ if (i == nsel)
+ {
+ g_object_ref (G_OBJECT (self->child[pos]));
+ return ATK_OBJECT(self->child[pos]);
+ }
+ ++nsel;
+ }
+ }
+
+ return NULL;
+}
+
+static gint
+simple_selection_get_selection_count (AtkSelection *selection)
+{
+ MyAtkSelection* self = (MyAtkSelection*)selection;
+
+ int cnt = 0;
+ int i;
+
+ if ((!self) || self->disposed)
+ {
+ return 0;
+ }
+
+ for (i = 0; i < TEST_SELECTION_NCHILDREN; ++i)
+ {
+ if (self->is_selected[i])
+ {
+ ++cnt;
+ }
+ }
+
+ return cnt;
+}
+
+static gboolean
+simple_selection_is_child_selected (AtkSelection *selection, gint i)
+{
+ MyAtkSelection* self = (MyAtkSelection*)selection;
+ if ((!self) || self->disposed)
+ {
+ return FALSE;
+ }
+
+ if ((i >= 0) && (i < TEST_SELECTION_NCHILDREN))
+ {
+ return (self->is_selected[i]);
+ }
+ else
+ {
+ return FALSE;
+ }
+}
+
+static gboolean
+simple_selection_remove_selection (AtkSelection *selection, gint i)
+{
+ int pos;
+ int nsel;
+
+ MyAtkSelection* self = (MyAtkSelection*)selection;
+ if ((!self) || self->disposed)
+ {
+ return FALSE;
+ }
+
+ nsel = 0;
+ for (pos = 0; pos < TEST_SELECTION_NCHILDREN; ++pos)
+ {
+ if (self->is_selected[pos])
+ {
+ if (i == nsel)
+ {
+ self->is_selected[pos] = FALSE;
+ g_signal_emit_by_name ((gpointer)self, "selection-changed");
+ return TRUE;
+ }
+ ++nsel;
+ }
+ }
+
+ return TRUE;
+}
+
+static gboolean
+simple_selection_select_all_selection (AtkSelection *selection)
+{
+ MyAtkSelection* self = (MyAtkSelection*)selection;
+ if ((!self) || self->disposed)
+ {
+ return FALSE;
+ }
+
+ if (!self->multisel_supported)
+ {
+ return FALSE;
+ }
+
+ /* select all */
+ {
+ gboolean changed = FALSE;
+ int i;
+ for (i = 0; i < TEST_SELECTION_NCHILDREN; ++i)
+ {
+ changed |= !self->is_selected[i];
+ self->is_selected[i] = TRUE;
+ }
+
+ if (changed)
+ {
+ g_signal_emit_by_name ((gpointer)self, "selection-changed");
+ }
+ }
+
+ return TRUE;
+}
+
+/******************************************************************/
+static void
+simple_selection_interface_init (gpointer g_iface, gpointer iface_data)
+{
+ AtkSelectionIface *klass = (AtkSelectionIface *)g_iface;
+
+ /* set up overrides here */
+ klass->add_selection =
+ (gboolean (*) (AtkSelection *selection, gint i)) simple_selection_add_selection;
+
+ klass->clear_selection =
+ (gboolean (*) (AtkSelection *selection)) simple_selection_clear_selection;
+
+ klass->ref_selection =
+ (AtkObject* (*) (AtkSelection *selection, gint i)) simple_selection_ref_selection;
+
+ klass->get_selection_count =
+ (gint (*) (AtkSelection *selection)) simple_selection_get_selection_count;
+
+ klass->is_child_selected =
+ (gboolean (*) (AtkSelection *selection, gint i)) simple_selection_is_child_selected;
+
+ klass->remove_selection =
+ (gboolean (*) (AtkSelection *selection, gint i)) simple_selection_remove_selection;
+
+ klass->select_all_selection =
+ (gboolean (*) (AtkSelection *selection)) simple_selection_select_all_selection;
+}
+
+static void
+simple_selection_instance_init (GTypeInstance *instance, gpointer g_class)
+{
+ MyAtkSelection *self = (MyAtkSelection *)instance;
+ int i;
+
+ self->disposed = FALSE;
+ self->multisel_supported = TRUE;
+ for (i = 0; i < TEST_SELECTION_NCHILDREN; ++i)
+ {
+ self->child[i] = MY_ATK_OBJECT (g_object_new (MY_TYPE_ATK_OBJECT, NULL));
+ self->child[i]->id = i;
+ self->is_selected[i] = FALSE; /* not selected by default */
+ }
+}
+
+static void
+my_atk_selection_dispose (GObject *obj)
+{
+ MyAtkSelection *self = (MyAtkSelection *)obj;
+ int i;
+
+ if (self->disposed)
+ {
+ return;
+ }
+
+ /* Make sure dispose does not run twice. */
+ self->disposed = TRUE;
+
+ for (i = 0; i < TEST_SELECTION_NCHILDREN; ++i)
+ {
+ g_object_unref (G_OBJECT (self->child[i]));
+ }
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (parent_class_simple_selection)->dispose (obj);
+}
+
+static void
+my_atk_selection_finalize (GObject *obj)
+{
+ /*MyAtkSelection *self = (MyAtkSelection *)obj;
+ if (self)
+ {
+ }*/
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (parent_class_simple_selection)->finalize (obj);
+}
+
+static void
+my_atk_selection_class_init (gpointer g_class, gpointer g_class_data)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (g_class);
+ MyAtkSelectionClass *klass = MY_ATK_SELECTION_CLASS (g_class);
+
+ gobject_class->dispose = my_atk_selection_dispose;
+ gobject_class->finalize = my_atk_selection_finalize;
+
+ parent_class_simple_selection = g_type_class_peek_parent (klass);
+}
+
+GType
+my_atk_selection_get_type (void)
+{
+ static GType type = 0;
+ if (type == 0)
+ {
+ static const GTypeInfo info =
+ {
+ sizeof (MyAtkSelectionClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ my_atk_selection_class_init, /* class_init */
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (MyAtkSelection),
+ 0, /* n_preallocs */
+ simple_selection_instance_init /* instance_init */
+ };
+
+ static const GInterfaceInfo iface_info =
+ {
+ (GInterfaceInitFunc) simple_selection_interface_init, /* interface_init */
+ NULL, /* interface_finalize */
+ NULL /* interface_data */
+ };
+ type = g_type_register_static (MY_TYPE_ATK_OBJECT,
+ "MyAtkSelectionType",
+ &info, 0);
+ g_type_add_interface_static (type,
+ ATK_TYPE_SELECTION,
+ &iface_info);
+ }
+ return type;
+}
+
--- /dev/null
+/* This file contains both declaration and definition of the MyAtkSelection,
+ * a GObject that implements the AtkSelectionIface interface.
+ */
+
+#ifndef MY_ATK_SELECTION_H
+#define MY_ATK_SELECTION_H
+
+#include <glib-object.h>
+#include <atk/atk.h>
+
+#include <my-atk-object.h>
+
+#define MY_TYPE_ATK_SELECTION (my_atk_selection_get_type ())
+#define MY_ATK_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_SELECTION, MyAtkSelection))
+#define MY_ATK_SELECTION_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), MY_TYPE_ATK_SELECTION, MyAtkSelectionClass))
+#define MY_IS_ATK_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MY_TYPE_ATK_SELECTION))
+#define MY_IS_ATK_SELECTION_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), MY_TYPE_ATK_SELECTION))
+#define MY_ATK_SELECTION_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), MY_TYPE_ATK_SELECTION, MyAtkSelectionClass))
+
+/* Number of child objects for the MyAtkSelection instance */
+#define TEST_SELECTION_NCHILDREN 10
+
+typedef struct _MyAtkSelection MyAtkSelection;
+typedef struct _MyAtkSelectionClass MyAtkSelectionClass;
+
+struct _MyAtkSelection
+{
+ MyAtkObject parent;
+
+ gboolean disposed;
+
+ /* TRUE if multiple selection is supported, FALSE otherwise.
+ * default - TRUE.
+ */
+ gboolean multisel_supported;
+
+ /* Children of this object */
+ MyAtkObject* child[TEST_SELECTION_NCHILDREN];
+
+ /* is_selected[i] == TRUE means the ith child is selected, == FALSE -
+ * it is not.
+ */
+ gboolean is_selected[TEST_SELECTION_NCHILDREN];
+};
+
+struct _MyAtkSelectionClass
+{
+ MyAtkObjectClass parent;
+};
+
+GType
+my_atk_selection_get_type (void);
+
+#endif /*MY_ATK_SELECTION_H*/
+
#include <atk/atk.h>
+#include "my-atk-object.h"
#include "my-atk-streamable-content.h"
//*************************implementation***********************
NULL, /* interface_finalize*/
NULL /* interface_data */
};
- type = g_type_register_static(G_TYPE_OBJECT, "MyAtkStreamableContent", &typeInfo, 0);
+ type = g_type_register_static(MY_TYPE_ATK_OBJECT, "MyAtkStreamableContent", &typeInfo, 0);
g_type_add_interface_static(type,
ATK_TYPE_STREAMABLE_CONTENT,
&iface_info);
#include <atk/atk.h>
+#include "my-atk-object.h"
+
#define MY_TYPE_ATK_STREAMABLE_CONTENT (my_atk_streamable_content_get_type ())
#define MY_ATK_STREAMABLE_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_STREAMABLE_CONTENT, MyAtkStreamableContent))
#define MY_ATK_STREAMABLE_CONTENT_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), MY_TYPE_ATK_STREAMABLE_CONTENT, MyAtkStreamableContentClass))
static const gchar* file_names[]={"file1", "file2"};
struct _MyAtkStreamableContent
{
- GObject parent;
+ MyAtkObject parent;
};
struct _MyAtkStreamableContentClass
{
- GObjectClass parent;
+ MyAtkObjectClass parent;
};
GType my_atk_streamable_content_get_type();
--- /dev/null
+/* This file contains both declaration and definition of the MyAtkTable,
+ * a GObject that pretends to implement the AtkTableIface interface (it
+ * registers appropriate interface), but provides no implementation for any of the
+ * methods of this interface (NULL-filled vftbl).
+ */
+
+#include <glib-object.h>
+#include <atk/atk.h>
+
+#include "my-atk-object.h"
+#include "my-atk-table.h"
+
+///////////////////////////////////////////////////////////////////////////
+// Helper functions and data
+///////////////////////////////////////////////////////////////////////////
+void
+my_atk_table_select_rows (MyAtkTable* table, gboolean sel_scheme[])
+{
+ // the function does nothing
+}
+
+void
+my_atk_table_select_columns (MyAtkTable* table, gboolean sel_scheme[])
+{
+ // the function does nothing
+}
+
+///////////////////////////////////////////////////////////////////////////
+// Implementation
+///////////////////////////////////////////////////////////////////////////
+static GObjectClass *parent_class_table = NULL;
+
+/******************************************************************/
+static void
+table_interface_init (gpointer g_iface, gpointer iface_data)
+{
+ AtkTableIface *klass = (AtkTableIface *)g_iface;
+
+ /* set up overrides here */
+ klass-> ref_at =
+ (AtkObject* (*) (AtkTable *table, gint row, gint column)) NULL;
+ klass-> get_index_at =
+ (gint (*) (AtkTable *table, gint row, gint column)) NULL;
+ klass-> get_column_at_index =
+ (gint (*) (AtkTable *table, gint index_)) NULL;
+ klass-> get_row_at_index =
+ (gint (*) (AtkTable *table, gint index_)) NULL;
+ klass-> get_n_columns =
+ (gint (*) (AtkTable *table)) NULL;
+ klass-> get_n_rows =
+ (gint (*) (AtkTable *table)) NULL;
+ klass-> get_column_extent_at =
+ (gint (*) (AtkTable *table, gint row, gint column)) NULL;
+ klass-> get_row_extent_at =
+ (gint (*) (AtkTable *table, gint row, gint column)) NULL;
+ klass-> get_caption =
+ (AtkObject* (*) (AtkTable *table)) NULL;
+ klass-> get_column_description =
+ (const gchar* (*) (AtkTable *table, gint column)) NULL;
+ klass-> get_column_header =
+ (AtkObject* (*) (AtkTable *table, gint column)) NULL;
+ klass-> get_row_description =
+ (const gchar* (*) (AtkTable *table, gint row)) NULL;
+ klass-> get_row_header =
+ (AtkObject* (*) (AtkTable *table, gint row)) NULL;
+ klass-> get_summary =
+ (AtkObject* (*) (AtkTable *table)) NULL;
+ klass-> set_caption =
+ (void (*) (AtkTable *table, AtkObject *caption)) NULL;
+ klass-> set_column_description =
+ (void (*) (AtkTable *table, gint column, const gchar *description)) NULL;
+ klass-> set_column_header =
+ (void (*) (AtkTable *table, gint column, AtkObject *header)) NULL;
+ klass-> set_row_description =
+ (void (*) (AtkTable *table, gint row, const gchar *description)) NULL;
+ klass-> set_row_header =
+ (void (*) (AtkTable *table, gint row, AtkObject *header)) NULL;
+ klass-> set_summary =
+ (void (*) (AtkTable *table, AtkObject *accessible)) NULL;
+ klass-> get_selected_columns =
+ (gint (*) (AtkTable *table, gint **selected)) NULL;
+ klass-> get_selected_rows =
+ (gint (*) (AtkTable *table, gint **selected)) NULL;
+ klass-> is_column_selected =
+ (gboolean (*) (AtkTable *table, gint column)) NULL;
+ klass-> is_row_selected =
+ (gboolean (*) (AtkTable *table, gint row)) NULL;
+ klass-> is_selected =
+ (gboolean (*) (AtkTable *table, gint row, gint column)) NULL;
+ klass-> add_row_selection =
+ (gboolean (*) (AtkTable *table, gint row)) NULL;
+ klass-> remove_row_selection =
+ (gboolean (*) (AtkTable *table, gint row)) NULL;
+ klass-> add_column_selection =
+ (gboolean (*) (AtkTable *table, gint column)) NULL;
+ klass-> remove_column_selection =
+ (gboolean (*) (AtkTable *table, gint column)) NULL;
+}
+
+static void
+table_instance_init (GTypeInstance *instance, gpointer g_class)
+{
+ MyAtkTable *self = (MyAtkTable *)instance;
+
+ self->disposed = FALSE;
+}
+
+static void
+my_atk_table_dispose (GObject *obj)
+{
+ MyAtkTable *self = (MyAtkTable *)obj;
+
+ if (self->disposed)
+ {
+ return;
+ }
+
+ /* Make sure dispose does not run twice. */
+ self->disposed = TRUE;
+
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (parent_class_table)->dispose (obj);
+}
+
+static void
+my_atk_table_finalize (GObject *obj)
+{
+ /* Chain up to the parent class */
+ G_OBJECT_CLASS (parent_class_table)->finalize (obj);
+}
+
+static void
+my_atk_table_class_init (gpointer g_class, gpointer g_class_data)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (g_class);
+ MyAtkTableClass *klass = MY_ATK_TABLE_CLASS (g_class);
+
+ gobject_class->dispose = my_atk_table_dispose;
+ gobject_class->finalize = my_atk_table_finalize;
+
+ parent_class_table = g_type_class_peek_parent (klass);
+}
+
+GType
+my_atk_table_get_type (void)
+{
+ static GType type = 0;
+ if (type == 0)
+ {
+ static const GTypeInfo info =
+ {
+ sizeof (MyAtkTableClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ my_atk_table_class_init, /* class_init */
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (MyAtkTable),
+ 0, /* n_preallocs */
+ table_instance_init /* instance_init */
+ };
+
+ static const GInterfaceInfo iface_info =
+ {
+ (GInterfaceInitFunc) table_interface_init, /* interface_init */
+ NULL, /* interface_finalize */
+ NULL /* interface_data */
+ };
+ type = g_type_register_static (MY_TYPE_ATK_OBJECT,
+ "MyAtkTableType",
+ &info, 0);
+ g_type_add_interface_static (type,
+ ATK_TYPE_TABLE,
+ &iface_info);
+ }
+ return type;
+}
--- /dev/null
+#ifndef MY_ATK_TABLE_H
+#define MY_ATK_TABLE_H
+
+#include <glib-object.h>
+#include <atk/atk.h>
+#include <my-atk-object.h>
+
+#define MY_TYPE_ATK_TABLE (my_atk_table_get_type ())
+#define MY_ATK_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_TABLE, MyAtkTable))
+#define MY_ATK_TABLE_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), MY_TYPE_ATK_TABLE, MyAtkTableClass))
+#define MY_IS_ATK_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MY_TYPE_ATK_TABLE))
+#define MY_IS_ATK_TABLE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), MY_TYPE_ATK_TABLE))
+#define MY_ATK_TABLE_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), MY_TYPE_ATK_TABLE, MyAtkTableClass))
+
+#define NROWS 4 /* row count */
+#define NCOLS 5 /* column count */
+
+static gint ids[NROWS][NCOLS] =
+ { {0, 1, 2, 2, 3},
+ {4, 5, 6, 7, 8},
+ {9, 9, 10, 11, 12},
+ {9, 9, 13, 14, -1} };
+
+static gint row_ext[NROWS][NCOLS] =
+ { {1, 1, 1, 1, 1},
+ {1, 1, 1, 1, 1},
+ {2, 2, 1, 1, 1},
+ {2, 2, 1, 1, 1} };
+
+static gint col_ext[NROWS][NCOLS] =
+ { {1, 1, 2, 2, 1},
+ {1, 1, 1, 1, 1},
+ {2, 2, 1, 1, 1},
+ {2, 2, 1, 1, 1} };
+
+#define NCHILDREN 16 /* child object count */
+
+// default string values
+#define DEF_CAPTION_TEXT "Default table caption"
+#define DEF_SUMMARY_TEXT "Default table summary"
+#define DEF_ROW_DESCR_TPL "Row No%d"
+#define DEF_COL_DESCR_TPL "Column No%d"
+
+/* row and column headers */
+typedef struct
+{
+ AtkObject* hdr;
+ gboolean selected; /* TRUE if the row/column is selected, FALSE otherwise */
+} TestSimpleHeaderStruct;
+
+/* This struct represents a table cell */
+typedef struct
+{
+ MyAtkObject* elem; /* the element */
+ guint ext_row; /* its row extent */
+ guint ext_col; /* its column extent */
+} TestSimpleCell;
+
+typedef struct _MyAtkTable MyAtkTable;
+typedef struct _MyAtkTableClass MyAtkTableClass;
+
+struct _MyAtkTable
+{
+ MyAtkObject parent;
+
+ gboolean disposed;
+
+ MyAtkObject* child[NCHILDREN];
+ MyAtkObject* not_a_child;
+ TestSimpleHeaderStruct row[NROWS];
+ TestSimpleHeaderStruct col[NCOLS];
+ guint nrows;
+ guint ncols;
+ AtkObject* caption;
+ AtkObject* summary;
+};
+
+struct _MyAtkTableClass
+{
+ MyAtkObjectClass parent;
+};
+
+GType
+my_atk_table_get_type (void);
+
+#endif /*MY_ATK_TABLE_H*/
NULL, /* interface_finalize*/
NULL /* interface_data */
};
- type = g_type_register_static(ATK_TYPE_OBJECT, "MyAtkText", &typeInfo, 0);
+ type = g_type_register_static(MY_TYPE_ATK_OBJECT, "MyAtkText", &typeInfo, 0);
g_type_add_interface_static(type,
ATK_TYPE_TEXT,
&AtkTextIface_info);
* MyAtkText: implements AtkText and AtkEditableText
*/
#include <atk/atk.h>
+
+#include "my-atk-object.h"
#define MY_TYPE_ATK_TEXT (my_atk_text_get_type ())
#define MY_ATK_TEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MY_TYPE_ATK_TEXT, MyAtkText))
struct _MyAtkText
{
- AtkObject parent;
+ MyAtkObject parent;
gchar* str;//string, containing text
GList* attributes;//running atributes
struct _MyAtkTextClass
{
- AtkObjectClass parent;
+ MyAtkObjectClass parent;
gchar* clipboard;
};
#include <atk/atk.h>
#include <limits.h>
+#include "my-atk-object.h"
#include "my-atk-value.h"
//*************************implementation***********************
NULL, /* interface_finalize*/
NULL /* interface_data */
};
- type = g_type_register_static(ATK_TYPE_OBJECT, "MyAtkValue", &typeInfo, 0);
+ type = g_type_register_static(MY_TYPE_ATK_OBJECT, "MyAtkValue", &typeInfo, 0);
g_type_add_interface_static(type,
ATK_TYPE_VALUE,
&iface_info);
struct _MyAtkValue
{
- AtkObject parent;
+ MyAtkObject parent;
gint minimum, maximum, current;
gboolean readonly;
struct _MyAtkValueClass
{
- AtkObjectClass parent;
+ MyAtkObjectClass parent;
};
MyAtkValue* my_atk_value_new(gint minimum, gint maximium, gint current);