2016-05-25 22:43:58 +00:00
|
|
|
|
|
|
|
// Command exectuion
|
2016-06-13 18:54:26 +00:00
|
|
|
void Exec_Command(Application_Links *app, int command_id);
|
|
|
|
int Exec_System_Command(Application_Links *app, View_Summary *view, Buffer_Identifier buffer, char *path, int path_len, char *command, int command_len, unsigned int flags);
|
2016-05-25 22:43:58 +00:00
|
|
|
|
|
|
|
// File system navigation
|
2016-06-13 18:54:26 +00:00
|
|
|
int Directory_Get_Hot(Application_Links *app, char *out, int capacity);
|
|
|
|
int Get_4ed_Path(Application_Links *app, char *out, int capacity);
|
|
|
|
int File_Exists(Application_Links *app, char *filename, int len);
|
|
|
|
int Directory_CD(Application_Links *app, char *dir, int *len, int capacity, char *rel_path, int rel_len);
|
|
|
|
File_List Get_File_List(Application_Links *app, char *dir, int len);
|
|
|
|
void Free_File_List(Application_Links *app, File_List list);
|
2016-05-25 22:43:58 +00:00
|
|
|
|
2016-06-14 14:20:15 +00:00
|
|
|
// Clipboard
|
2016-06-23 23:11:09 +00:00
|
|
|
|
|
|
|
// TODO(allen): extend this API out a little bit to allow for future expansion.
|
|
|
|
void Clipboard_Post(Application_Links *app, char *str, int len);
|
|
|
|
int Clipboard_Count(Application_Links *app);
|
|
|
|
int Clipboard_Index(Application_Links *app, int index, char *out, int len);
|
2016-06-14 14:20:15 +00:00
|
|
|
|
2016-05-25 22:43:58 +00:00
|
|
|
// Direct buffer manipulation
|
2016-06-20 20:34:48 +00:00
|
|
|
Buffer_Summary Get_Buffer_First(Application_Links *app, unsigned int access);
|
|
|
|
void Get_Buffer_Next(Application_Links *app, Buffer_Summary *buffer, unsigned int access);
|
2016-05-25 22:43:58 +00:00
|
|
|
|
2016-06-23 23:11:09 +00:00
|
|
|
Buffer_Summary Get_Buffer(Application_Links *app, int buffer_id, unsigned int access);
|
|
|
|
Buffer_Summary Get_Buffer_By_Name(Application_Links *app, char *name, int len, unsigned int access);
|
2016-06-13 16:56:33 +00:00
|
|
|
|
2016-06-13 18:54:26 +00:00
|
|
|
int Buffer_Seek(Application_Links *app, Buffer_Summary *buffer, int start_pos, int seek_forward, unsigned int flags);
|
2016-06-23 23:11:09 +00:00
|
|
|
int Buffer_Read_Range(Application_Links *app, Buffer_Summary *buffer, int start, int end, char *out);
|
2016-06-20 20:34:48 +00:00
|
|
|
|
|
|
|
int Buffer_Replace_Range(Application_Links *app, Buffer_Summary *buffer, int start, int end, char *str, int len);
|
2016-06-13 18:54:26 +00:00
|
|
|
int Buffer_Set_Setting(Application_Links *app, Buffer_Summary *buffer, int setting, int value);
|
2016-06-24 02:53:33 +00:00
|
|
|
int Buffer_Auto_Indent(Application_Links *app, Buffer_Summary *buffer, int start, int end, int tab_width, unsigned int flags);
|
2016-06-13 18:54:26 +00:00
|
|
|
|
2016-06-24 02:21:11 +00:00
|
|
|
Buffer_Summary Create_Buffer(Application_Links *app, char *filename, int filename_len, unsigned int flags);
|
|
|
|
int Save_Buffer(Application_Links *app, Buffer_Summary *buffer, char *filename, int filename_len, unsigned int flags);
|
|
|
|
int Kill_Buffer(Application_Links *app, Buffer_Identifier buffer, int view_id, unsigned int flags);
|
2016-05-25 22:43:58 +00:00
|
|
|
|
2016-06-13 16:56:33 +00:00
|
|
|
// View manipulation
|
2016-06-20 20:34:48 +00:00
|
|
|
View_Summary Get_View_First(Application_Links *app, unsigned int access);
|
|
|
|
void Get_View_Next(Application_Links *app, View_Summary *view, unsigned int access);
|
2016-05-25 22:43:58 +00:00
|
|
|
|
2016-06-24 02:21:11 +00:00
|
|
|
View_Summary Get_View(Application_Links *app, int view_id, unsigned int access);
|
2016-06-20 20:34:48 +00:00
|
|
|
View_Summary Get_Active_View(Application_Links *app, unsigned int access);
|
2016-05-25 22:43:58 +00:00
|
|
|
|
2016-06-24 04:02:09 +00:00
|
|
|
int View_Compute_Cursor (Application_Links *app, View_Summary *view, Buffer_Seek seek, Full_Cursor *cursor_out);
|
|
|
|
int View_Set_Cursor (Application_Links *app, View_Summary *view, Buffer_Seek seek, int set_preferred_x);
|
|
|
|
int View_Set_Mark (Application_Links *app, View_Summary *view, Buffer_Seek seek);
|
|
|
|
int View_Set_Highlight (Application_Links *app, View_Summary *view, int start, int end, int turn_on);
|
|
|
|
int View_Set_Buffer (Application_Links *app, View_Summary *view, int buffer_id, unsigned int flags);
|
|
|
|
int View_Post_Fade (Application_Links *app, View_Summary *view, float seconds, int start, int end, unsigned int color);
|
2016-06-14 19:00:03 +00:00
|
|
|
|
|
|
|
// TODO(allen):
|
|
|
|
// Get rid of this temporary hack ass soon ass possible.
|
|
|
|
void View_Set_Paste_Rewrite_(Application_Links *app, View_Summary *view);
|
|
|
|
int View_Get_Paste_Rewrite_(Application_Links *app, View_Summary *view);
|
|
|
|
|
2016-05-25 22:43:58 +00:00
|
|
|
// Directly get user input
|
2016-06-13 18:54:26 +00:00
|
|
|
User_Input Get_User_Input(Application_Links *app, unsigned int get_type, unsigned int abort_type);
|
|
|
|
User_Input Get_Command_Input(Application_Links *app);
|
|
|
|
Event_Message Get_Event_Message(Application_Links *app);
|
|
|
|
Mouse_State Get_Mouse_State(Application_Links *app);
|
2016-05-25 22:43:58 +00:00
|
|
|
|
|
|
|
// Queries and information display
|
2016-06-13 18:54:26 +00:00
|
|
|
int Start_Query_Bar(Application_Links *app, Query_Bar *bar, unsigned int flags);
|
|
|
|
void End_Query_Bar(Application_Links *app, Query_Bar *bar, unsigned int flags);
|
|
|
|
void Print_Message(Application_Links *app, char *string, int len);
|
|
|
|
//GUI_Functions* Get_GUI_Functions(Application_Links *app);
|
|
|
|
//GUI* Get_GUI(Application_Links *app, int view_id);
|
2016-05-25 22:43:58 +00:00
|
|
|
|
|
|
|
// Color settings
|
2016-06-13 18:54:26 +00:00
|
|
|
void Change_Theme(Application_Links *app, char *name, int len);
|
|
|
|
void Change_Font(Application_Links *app, char *name, int len);
|
|
|
|
void Set_Theme_Colors(Application_Links *app, Theme_Color *colors, int count);
|
2016-06-14 19:00:03 +00:00
|
|
|
void Get_Theme_Colors(Application_Links *app, Theme_Color *colors, int count);
|
2016-06-10 23:46:30 +00:00
|
|
|
|