refactor main.c to win.c

devs/discomfitor/cc
Boris Faure 8 years ago
parent 74912ae1e9
commit e562bcb7e2
  1. 2612
      src/bin/main.c
  2. 17
      src/bin/main.h
  3. 1
      src/bin/termio.h
  4. 2602
      src/bin/win.c
  5. 42
      src/bin/win.h

File diff suppressed because it is too large Load Diff

@ -3,10 +3,7 @@
#include "config.h"
typedef struct _Win Win;
typedef struct _Term Term;
typedef struct _Split Split;
Config * main_config_get(void);
void main_new(Evas_Object *win, Evas_Object *term);
void main_new_with_dir(Evas_Object *win, Evas_Object *term, const char *wdir);
void main_split_h(Evas_Object *win, Evas_Object *term, char *cmd);
@ -20,16 +17,4 @@ void main_media_visualize_update(const Config *config);
void main_config_sync(const Config *config);
void change_theme(Evas_Object *win, Config *config);
Eina_Bool main_term_popup_exists(const Term *term);
void main_term_focus(Term *term);
Win *main_term_win_get(Term *term);
Evas_Object *main_win_evas_object_get(Win *wn);
Eina_List *main_win_terms_get(Win *wn);
Evas_Object *main_term_evas_object_get(Term *term);
Evas_Object *term_miniview_get(Term *term);
void term_miniview_toggle(Term *term);
void term_miniview_hide(Term *term);
#endif

@ -5,6 +5,7 @@
#include "main.h"
#include "col.h"
#include "termpty.h"
#include "win.h"
Evas_Object *termio_add(Evas_Object *parent, Config *config, const char *cmd, Eina_Bool login_shell, const char *cd, int w, int h, Term *term);
void termio_win_set(Evas_Object *obj, Evas_Object *win);

File diff suppressed because it is too large Load Diff

@ -1,6 +1,46 @@
#ifndef _WIN_H__
#define _WIN_H__ 1
Evas_Object *tg_win_add(const char *name, const char *role, const char *title, const char *icon_name);
#include "config.h"
typedef struct _Win Win;
typedef struct _Term Term;
Eina_Bool main_term_popup_exists(const Term *term);
void main_term_focus(Term *term);
Evas_Object *main_term_evas_object_get(Term *term);
Evas_Object *term_miniview_get(Term *term);
void term_miniview_toggle(Term *term);
void term_miniview_hide(Term *term);
Win *
win_new(const char *name, const char *role, const char *title,
const char *icon_name, Config *config,
Eina_Bool fullscreen, Eina_Bool iconic,
Eina_Bool borderless, Eina_Bool override,
Eina_Bool maximized);
void win_free(Win *wn);
void windows_free(void);
Term *term_new(Win *wn, Config *config, const char *cmd, Eina_Bool login_shell, const char *cd, int size_w, int size_h, Eina_Bool hold);
Eina_List *
terms_from_win_object(Evas_Object *win);
Evas_Object *win_base_get(Win *wn);
Evas_Object *win_evas_object_get(Win *win);
Eina_List * win_terms_get(Win *wn);
Config *win_config_get(Win *wn);
void win_term_swallow(Win *wn, Term *term);
void win_add_split(Win *wn, Term *term);
void win_sizing_handle(Win *wn);
void term_next(Term *term);
void term_prev(Term *term);
Win * term_win_get(Term *term);
#endif

Loading…
Cancel
Save