![]() |
![]() |
![]() |
Anjuta Developers Reference Manual | ![]() |
---|---|---|---|---|
#include <libanjuta/interfaces/ianjuta-editor-cell.h> #define IANJUTA_EDITOR_CELL_ERROR IAnjutaEditorCell; IAnjutaEditorCellIface; GQuark ianjuta_editor_cell_error_quark (void); IAnjutaEditorAttribute ianjuta_editor_cell_get_attribute (IAnjutaEditorCell *obj, GError **err); gchar ianjuta_editor_cell_get_char (IAnjutaEditorCell *obj, gint char_index, GError **err); gchar* ianjuta_editor_cell_get_character (IAnjutaEditorCell *obj, GError **err); gint ianjuta_editor_cell_get_length (IAnjutaEditorCell *obj, GError **err);
Represents a cell in editor. A cell corresponds to a unicode character along with all associated styles (such as colors and font). A cell may or may not have style. If style is supported in the editor, it is assumed all cells will have styles and hence every IAnjutaEditorCell interface instance will have additionally IAnjutaEditorCellStyle implemented.
typedef struct { GTypeInterface g_iface; IAnjutaEditorAttribute (*get_attribute) (IAnjutaEditorCell *obj, GError **err); gchar (*get_char) (IAnjutaEditorCell *obj, gint char_index, GError **err); gchar * (*get_character) (IAnjutaEditorCell *obj, GError **err); gint (*get_length) (IAnjutaEditorCell *obj, GError **err); } IAnjutaEditorCellIface;
IAnjutaEditorAttribute ianjuta_editor_cell_get_attribute (IAnjutaEditorCell *obj, GError **err);
obj : |
|
err : |
|
Returns : |
gchar ianjuta_editor_cell_get_char (IAnjutaEditorCell *obj, gint char_index, GError **err);
obj : |
Self |
char_index : |
|
err : |
Error propagation and reporting |
Returns : | the byte of the unicode character in this cell at given
index char_index . char_index can vary from 0 to length of the
unicode string minus 1. Out of range index is not allowed
(asserted) and return is undefined.
Since there is dynamic allocation of unicode character string
involved in ianjuta_editor_cell_get_character() , this function
is mainly useful for fast iteration (such as copying data).
Retruns: a byte character.
|
gchar* ianjuta_editor_cell_get_character (IAnjutaEditorCell *obj, GError **err);
obj : |
Self |
err : |
Error propagation and reporting |
Returns : | the unicode character in this cell. A NULL terminated string is returned that is the multibyte unicode character. NULL is returned if the cell does not have any character. Retruns: a newly created string representing the cell's unicode character. |
gint ianjuta_editor_cell_get_length (IAnjutaEditorCell *obj, GError **err);
obj : |
|
err : |
|
Returns : |