forked from enlightenment/terminology
move some code to termiointernals to be able to test it
This commit is contained in:
parent
b05e20333d
commit
e6886bcaee
|
@ -23,6 +23,7 @@ terminology_sources = ['private.h', 'coverity.h',
|
|||
'termio.c', 'termio.h',
|
||||
'termcmd.c', 'termcmd.h',
|
||||
'term_container.h',
|
||||
'termiointernals.c', 'termiointernals.h',
|
||||
'termiolink.c', 'termiolink.h',
|
||||
'termpty.c', 'termpty.h',
|
||||
'termptydbl.c', 'termptydbl.h',
|
||||
|
@ -54,9 +55,13 @@ tyfuzz_sources = ['termptyesc.c', 'termptyesc.h',
|
|||
'termptyext.c', 'termptyext.h',
|
||||
'termptygfx.c', 'termptygfx.h',
|
||||
'termpty.c', 'termpty.h',
|
||||
'termiointernals.c', 'termiointernals.h',
|
||||
'termiolink.c', 'termiolink.h',
|
||||
'config.c', 'config.h',
|
||||
'col.c', 'col.h',
|
||||
'sb.c', 'sb.h',
|
||||
'utf8.c', 'utf8.h',
|
||||
'utils.c', 'utils.h',
|
||||
'tyfuzz.c']
|
||||
tytest_sources = ['termptyesc.c', 'termptyesc.h',
|
||||
'termptysave.c', 'termptysave.h',
|
||||
|
@ -65,9 +70,13 @@ tytest_sources = ['termptyesc.c', 'termptyesc.h',
|
|||
'termptyext.c', 'termptyext.h',
|
||||
'termptygfx.c', 'termptygfx.h',
|
||||
'termpty.c', 'termpty.h',
|
||||
'termiointernals.c', 'termiointernals.h',
|
||||
'termiolink.c', 'termiolink.h',
|
||||
'config.c', 'config.h',
|
||||
'col.c', 'col.h',
|
||||
'sb.c', 'sb.h',
|
||||
'utf8.c', 'utf8.h',
|
||||
'utils.c', 'utils.h',
|
||||
'md5/md5.c', 'md5/md5.h',
|
||||
'tytest.c', 'tytest.h']
|
||||
|
||||
|
|
2745
src/bin/termio.c
2745
src/bin/termio.c
File diff suppressed because it is too large
Load Diff
|
@ -6,6 +6,7 @@
|
|||
#include "col.h"
|
||||
#include "termpty.h"
|
||||
#include "win.h"
|
||||
#include "termiointernals.h"
|
||||
|
||||
Evas_Object *termio_add(Evas_Object *parent, Config *config, const char *cmd,
|
||||
Eina_Bool login_shell, const char *cd, int w, int h,
|
||||
|
@ -13,12 +14,15 @@ Evas_Object *termio_add(Evas_Object *parent, Config *config, const char *cmd,
|
|||
void termio_win_set(Evas_Object *obj, Evas_Object *win);
|
||||
void termio_theme_set(Evas_Object *obj, Evas_Object *theme);
|
||||
Eina_Bool termio_selection_exists(const Evas_Object *obj);
|
||||
void termio_take_selection_text(Termio *sd, Elm_Sel_Type type, const char *text);
|
||||
void termio_scroll_top_backlog(Evas_Object *obj);
|
||||
void termio_scroll_delta(Evas_Object *obj, int delta, int by_page);
|
||||
void termio_scroll_set(Evas_Object *obj, int scroll);
|
||||
void termio_scroll(Evas_Object *obj, int direction, int start_y, int end_y);
|
||||
void termio_content_change(Evas_Object *obj, Evas_Coord x, Evas_Coord y, int n);
|
||||
|
||||
void
|
||||
termio_handle_right_click(Evas_Event_Mouse_Down *ev, Termio *sd,
|
||||
int cx, int cy);
|
||||
void termio_config_update(Evas_Object *obj);
|
||||
void termio_font_update(Evas_Object *obj);
|
||||
Config *termio_config_get(const Evas_Object *obj);
|
||||
|
@ -60,5 +64,12 @@ void termio_key_down(Evas_Object *termio, const Evas_Event_Key_Down *ev,
|
|||
Eina_Bool action_handled);
|
||||
void termio_focus_in(Evas_Object *termio);
|
||||
void termio_focus_out(Evas_Object *termio);
|
||||
|
||||
void termio_smart_update_queue(Termio *sd);
|
||||
void termio_object_geometry_get(Termio *sd,
|
||||
Evas_Coord *x, Evas_Coord *y,
|
||||
Evas_Coord *w, Evas_Coord *h);
|
||||
void
|
||||
termio_sel_set(Termio *sd, Eina_Bool enable);
|
||||
void
|
||||
termio_smart_cb_mouse_move_job(void *data);
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,109 @@
|
|||
#ifndef _TERMIOINTERNALS_H__
|
||||
#define _TERMIOINTERNALS_H__ 1
|
||||
|
||||
typedef struct _Termio Termio;
|
||||
|
||||
struct _Termio
|
||||
{
|
||||
Evas_Object_Smart_Clipped_Data __clipped_data;
|
||||
struct {
|
||||
const char *name;
|
||||
int size;
|
||||
int chw, chh;
|
||||
} font;
|
||||
struct {
|
||||
int w, h;
|
||||
Evas_Object *obj;
|
||||
} grid;
|
||||
struct {
|
||||
Evas_Object *top, *bottom, *theme;
|
||||
} sel;
|
||||
struct {
|
||||
Evas_Object *obj;
|
||||
int x, y;
|
||||
Cursor_Shape shape;
|
||||
} cursor;
|
||||
struct {
|
||||
int cx, cy;
|
||||
int button;
|
||||
} mouse;
|
||||
struct {
|
||||
const char *string;
|
||||
int x1, y1, x2, y2;
|
||||
int suspend;
|
||||
uint16_t id;
|
||||
Eina_List *objs;
|
||||
struct {
|
||||
Evas_Object *dndobj;
|
||||
Evas_Coord x, y;
|
||||
unsigned char down : 1;
|
||||
unsigned char dnd : 1;
|
||||
unsigned char dndobjdel : 1;
|
||||
} down;
|
||||
} link;
|
||||
struct {
|
||||
const char *file;
|
||||
FILE *f;
|
||||
double progress;
|
||||
unsigned long long total, size;
|
||||
Eina_Bool active : 1;
|
||||
} sendfile;
|
||||
Evas_Object *ctxpopup;
|
||||
int zoom_fontsize_start;
|
||||
int scroll;
|
||||
Evas_Object *self;
|
||||
Evas_Object *event;
|
||||
Term *term;
|
||||
|
||||
Termpty *pty;
|
||||
Ecore_Animator *anim;
|
||||
Ecore_Timer *delayed_size_timer;
|
||||
Ecore_Timer *link_do_timer;
|
||||
Ecore_Timer *mouse_selection_scroll_timer;
|
||||
Ecore_Job *mouse_move_job;
|
||||
Ecore_Timer *mouseover_delay;
|
||||
Evas_Object *win, *theme, *glayer;
|
||||
Config *config;
|
||||
const char *sel_str;
|
||||
Eina_List *cur_chids;
|
||||
Ecore_Job *sel_reset_job;
|
||||
double set_sel_at;
|
||||
Elm_Sel_Type sel_type;
|
||||
unsigned char jump_on_change : 1;
|
||||
unsigned char jump_on_keypress : 1;
|
||||
unsigned char have_sel : 1;
|
||||
unsigned char noreqsize : 1;
|
||||
unsigned char didclick : 1;
|
||||
unsigned char moved : 1;
|
||||
unsigned char bottom_right : 1;
|
||||
unsigned char top_left : 1;
|
||||
unsigned char reset_sel : 1;
|
||||
unsigned char cb_added : 1;
|
||||
double gesture_zoom_start_size;
|
||||
};
|
||||
|
||||
#define INT_SWAP(_a, _b) do { \
|
||||
int _swap = _a; _a = _b; _b = _swap; \
|
||||
} while (0)
|
||||
|
||||
|
||||
void
|
||||
termio_internal_mouse_down(Termio *sd, Evas_Event_Mouse_Down *ev);
|
||||
void
|
||||
termio_internal_mouse_up(Termio *sd, Evas_Event_Mouse_Up *ev);
|
||||
void
|
||||
termio_internal_mouse_move(Termio *sd, Evas_Event_Mouse_Move *ev);
|
||||
|
||||
void
|
||||
termio_selection_dbl_fix(Termio *sd);
|
||||
void
|
||||
termio_selection_get(Termio *sd,
|
||||
int c1x, int c1y, int c2x, int c2y,
|
||||
struct ty_sb *sb,
|
||||
Eina_Bool rtrim);
|
||||
void
|
||||
termio_scroll(Evas_Object *obj, int direction, int start_y, int end_y);
|
||||
void
|
||||
termio_cursor_to_xy(Termio *sd, Evas_Coord x, Evas_Coord y,
|
||||
int *cx, int *cy);
|
||||
#endif
|
Loading…
Reference in New Issue