summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_code_widget_private.h
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-06-02 17:19:08 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-06-02 17:19:08 -0700
commitd384012307881898a2df49f68fa6b46a4cd9972d (patch)
tree31706c65b8c56083a151470721cf36e8bb46939d /src/lib/elementary/elm_code_widget_private.h
parent9f129a8711f9bb71ee7cf6c13f7965926255c975 (diff)
elementary: merging in elm_code widget.
Theme is not there as it should be manually merged into the elementary default theme.
Diffstat (limited to 'src/lib/elementary/elm_code_widget_private.h')
-rw-r--r--src/lib/elementary/elm_code_widget_private.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_code_widget_private.h b/src/lib/elementary/elm_code_widget_private.h
new file mode 100644
index 0000000000..09c5003994
--- /dev/null
+++ b/src/lib/elementary/elm_code_widget_private.h
@@ -0,0 +1,66 @@
1#ifndef ELM_CODE_WIDGET_PRIVATE_H
2# define ELM_CODE_WIDGET_PRIVATE_H
3
4/**
5 * Structure holding the info about a selected region.
6 */
7typedef struct
8{
9 unsigned int start_line, end_line;
10 unsigned int start_col, end_col;
11} Elm_Code_Widget_Selection_Data;
12
13typedef struct
14{
15 Elm_Code *code;
16 Eina_List *grids;
17 unsigned int col_count;
18 Evas_Object *scroller, *gridbox;
19
20 const char *font_name;
21 Evas_Font_Size font_size;
22 double gravity_x, gravity_y;
23
24 unsigned int cursor_line, cursor_col;
25 Eina_Bool editable, focussed;
26 Eina_Bool show_line_numbers;
27 unsigned int line_width_marker, tabstop;
28 Eina_Bool show_whitespace, tab_inserts_spaces;
29
30 Elm_Code_Widget_Selection_Data *selection;
31
32 /* Undo stack */
33 Eina_List *undo_stack;
34 Eina_List *undo_stack_ptr;
35} Elm_Code_Widget_Data;
36
37typedef struct
38{
39 char *content;
40 unsigned int length;
41 unsigned int start_line, start_col, end_line, end_col;
42
43 Eina_Bool insert : 1; /**< True if the change is an insertion */
44} Elm_Code_Widget_Change_Info;
45
46/* Private widget methods */
47
48void _elm_code_widget_cell_size_get(Elm_Code_Widget *widget, Evas_Coord *width, Evas_Coord *height);
49
50void _elm_code_widget_text_at_cursor_insert(Elm_Code_Widget *widget, const char *text, int length);
51
52void _elm_code_widget_newline(Elm_Code_Widget *widget);
53
54void _elm_code_widget_backspace(Elm_Code_Widget *widget);
55
56void _elm_code_widget_delete(Elm_Code_Widget *widget);
57
58void _elm_code_widget_tooltip_text_set(Evas_Object *widget, const char *text);
59
60void _elm_code_widget_tooltip_add(Evas_Object *widget);
61
62EAPI Elm_Code_Widget_Selection_Data *elm_code_widget_selection_normalized_get(Evas_Object *widget);
63
64void _elm_code_widget_undo_change_add(Evas_Object *widget, Elm_Code_Widget_Change_Info *info);
65
66#endif