2014-12-01 14:54:17 -08:00
|
|
|
#ifndef _EDI_CONFIG_H_
|
|
|
|
# define _EDI_CONFIG_H_ 1
|
|
|
|
|
|
|
|
#include <Eina.h>
|
|
|
|
|
2015-05-16 01:56:39 -07:00
|
|
|
#include "Edi.h"
|
|
|
|
|
2015-05-30 02:26:51 -07:00
|
|
|
#define EDI_FONT_MIN 6
|
|
|
|
#define EDI_FONT_MAX 48
|
|
|
|
|
2014-12-01 14:54:17 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-03-08 14:07:02 -07:00
|
|
|
extern int EDI_EVENT_CONFIG_CHANGED;
|
|
|
|
|
2014-12-01 14:54:17 -08:00
|
|
|
typedef struct _Edi_Config_Project Edi_Config_Project;
|
2015-02-07 08:37:36 -08:00
|
|
|
typedef struct _Edi_Config_Mime_Association Edi_Config_Mime_Association;
|
2014-12-01 14:54:17 -08:00
|
|
|
typedef struct _Edi_Config Edi_Config;
|
|
|
|
|
2015-05-16 01:56:39 -07:00
|
|
|
typedef struct _Edi_Project_Config Edi_Project_Config;
|
2017-07-24 15:28:48 -07:00
|
|
|
typedef struct _Edi_Project_Config_Panel Edi_Project_Config_Panel;
|
2015-05-18 08:32:46 -07:00
|
|
|
typedef struct _Edi_Project_Config_Tab Edi_Project_Config_Tab;
|
2015-05-31 04:13:31 -07:00
|
|
|
typedef struct _Edi_Project_Config_Launch Edi_Project_Config_Launch;
|
2015-05-16 01:56:39 -07:00
|
|
|
|
2014-12-01 14:54:17 -08:00
|
|
|
struct _Edi_Config_Project
|
|
|
|
{
|
|
|
|
const char *name;
|
|
|
|
const char *path;
|
|
|
|
};
|
|
|
|
|
2015-02-07 08:37:36 -08:00
|
|
|
struct _Edi_Config_Mime_Association
|
2015-02-07 00:13:40 -08:00
|
|
|
{
|
|
|
|
const char *id;
|
|
|
|
const char *mime;
|
|
|
|
};
|
|
|
|
|
2015-05-16 01:56:39 -07:00
|
|
|
struct _Edi_Config
|
|
|
|
{
|
|
|
|
int version;
|
|
|
|
|
|
|
|
Eina_Bool autosave;
|
2015-08-29 06:46:18 -07:00
|
|
|
Eina_Bool trim_whitespace;
|
2018-08-24 02:18:32 -07:00
|
|
|
Eina_Bool show_hidden;
|
2015-05-16 01:56:39 -07:00
|
|
|
|
|
|
|
Eina_List *projects;
|
|
|
|
Eina_List *mime_assocs;
|
|
|
|
};
|
|
|
|
|
2017-07-24 15:28:48 -07:00
|
|
|
struct _Edi_Project_Config_Panel
|
|
|
|
{
|
|
|
|
Eina_List *tabs;
|
|
|
|
unsigned int current_tab;
|
|
|
|
};
|
|
|
|
|
2015-05-18 08:32:46 -07:00
|
|
|
struct _Edi_Project_Config_Tab
|
|
|
|
{
|
|
|
|
const char *path;
|
2017-12-01 05:07:00 -08:00
|
|
|
const char *fullpath;
|
2017-06-08 18:31:45 -07:00
|
|
|
const char *type;
|
2017-12-01 05:07:00 -08:00
|
|
|
int split_views;
|
2015-05-18 08:32:46 -07:00
|
|
|
};
|
|
|
|
|
2015-05-31 04:13:31 -07:00
|
|
|
struct _Edi_Project_Config_Launch
|
|
|
|
{
|
2015-05-31 13:18:18 -07:00
|
|
|
const char *path;
|
|
|
|
const char *args;
|
2015-05-31 04:13:31 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Edi_Project_Config
|
2014-12-01 14:54:17 -08:00
|
|
|
{
|
|
|
|
int version;
|
|
|
|
|
2015-05-24 10:39:57 -07:00
|
|
|
struct
|
2014-12-01 14:54:17 -08:00
|
|
|
{
|
2015-05-31 13:18:18 -07:00
|
|
|
const char *name;
|
2014-12-01 14:54:17 -08:00
|
|
|
int size;
|
|
|
|
} font;
|
|
|
|
|
2016-02-11 06:14:30 -08:00
|
|
|
struct
|
2014-12-01 14:54:17 -08:00
|
|
|
{
|
|
|
|
Eina_Bool translucent;
|
2017-12-05 14:03:46 -08:00
|
|
|
int alpha;
|
2017-11-27 15:09:51 -08:00
|
|
|
const char *theme;
|
2014-12-03 15:52:12 -08:00
|
|
|
int width, height, bottomtab;
|
|
|
|
double leftsize, bottomsize;
|
|
|
|
Eina_Bool leftopen, bottomopen;
|
2015-03-14 06:10:38 -07:00
|
|
|
Eina_Bool show_whitespace;
|
2015-03-29 12:40:24 -07:00
|
|
|
unsigned int width_marker, tabstop;
|
2015-05-18 15:17:24 -07:00
|
|
|
|
|
|
|
Eina_Bool toolbar_hidden;
|
2016-02-08 16:32:16 -08:00
|
|
|
Eina_Bool tab_inserts_spaces;
|
2014-12-01 14:54:17 -08:00
|
|
|
} gui;
|
2015-05-18 08:32:46 -07:00
|
|
|
|
2015-05-31 04:13:31 -07:00
|
|
|
Edi_Project_Config_Launch launch;
|
2017-11-08 13:26:42 -08:00
|
|
|
Eina_Stringshare *debug_command;
|
2017-06-06 17:45:44 -07:00
|
|
|
Eina_Stringshare *user_fullname;
|
|
|
|
Eina_Stringshare *user_email;
|
2017-07-24 15:28:48 -07:00
|
|
|
|
|
|
|
Eina_List *panels;
|
|
|
|
Eina_List *windows;
|
2014-12-01 14:54:17 -08:00
|
|
|
};
|
|
|
|
|
2015-05-16 01:56:39 -07:00
|
|
|
extern Edi_Config *_edi_config;
|
|
|
|
extern Edi_Project_Config *_edi_project_config;
|
2014-12-01 14:54:17 -08:00
|
|
|
|
2015-05-18 08:32:46 -07:00
|
|
|
// General configuration management
|
|
|
|
|
2014-12-01 14:54:17 -08:00
|
|
|
Eina_Bool _edi_config_init(void);
|
|
|
|
Eina_Bool _edi_config_shutdown(void);
|
2017-05-28 13:24:24 -07:00
|
|
|
const char *_edi_config_dir_get(void);
|
2017-11-08 13:26:42 -08:00
|
|
|
const char *_edi_project_config_debug_command_get(void);
|
2015-05-18 08:32:46 -07:00
|
|
|
|
|
|
|
// Global configuration handling
|
|
|
|
|
2014-12-01 14:54:17 -08:00
|
|
|
void _edi_config_load(void);
|
|
|
|
void _edi_config_save(void);
|
|
|
|
|
|
|
|
void _edi_config_project_add(const char *path);
|
2015-01-15 15:13:14 -08:00
|
|
|
void _edi_config_project_remove(const char *path);
|
2014-12-01 14:54:17 -08:00
|
|
|
|
2015-02-07 00:13:40 -08:00
|
|
|
void _edi_config_mime_add(const char *mime, const char* id);
|
|
|
|
const char* _edi_config_mime_search(const char *mime);
|
|
|
|
|
2015-05-18 08:32:46 -07:00
|
|
|
// Project based configuration handling
|
|
|
|
|
|
|
|
void _edi_project_config_load(void);
|
|
|
|
void _edi_project_config_save(void);
|
|
|
|
|
2017-06-08 18:31:45 -07:00
|
|
|
void _edi_project_config_tab_add(const char *path, const char *type,
|
2017-07-23 13:54:47 -07:00
|
|
|
Eina_Bool windowed, int panel_id);
|
2017-07-24 15:28:48 -07:00
|
|
|
void _edi_project_config_tab_remove(const char *path, Eina_Bool windowed, int panel_id);
|
|
|
|
void _edi_project_config_tab_current_set(int panel_id, int tab_id);
|
2017-07-25 13:43:28 -07:00
|
|
|
void _edi_project_config_panel_remove(int panel_id);
|
2017-12-01 05:07:00 -08:00
|
|
|
void _edi_project_config_tab_split_view_count_set(const char *path, int panel_id, int count);
|
|
|
|
|
2015-05-18 08:32:46 -07:00
|
|
|
|
2014-12-01 14:54:17 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _EDI_CONFIG_H_ */
|