+++ /dev/null
-/** @file */
-typedef struct {
- int x, y;
- int h, w;
-} drawcsr;
-
-void draw_rect(XConf* x, int color, int posx, int posy, int width, int height);
-void draw_statbox(XConf* x, int status);
-int draw_hrule(XConf* x, drawcsr* csr);
-void draw_view(XConf* x, View* view, XftFont* font, size_t nrows, drawcsr* csr, int bg, int fg, int sel, bool csrsync);
-bool draw_csr(XConf* x, View* view, int fg, size_t fheight, int posx, int posy, bool csrdrawn);
-void draw_scroll(XConf* x, drawcsr* csr, View* view, int divider);
+++ /dev/null
-/** @file */
-typedef struct XFont XFont;
-
-typedef struct {
- uint32_t attr; /* attributes applied to this cell */
- uint32_t rune; /* rune value for the cell */
-} XGlyph;
-
-typedef struct {
- void* font;
- uint32_t glyph;
- short x;
- short y;
-} XGlyphSpec;
-
-enum {
- MouseLeft = 1,
- MouseMiddle = 2,
- MouseRight = 3,
- MouseWheelUp = 4,
- MouseWheelDn = 5
-};
-
-typedef enum {
- TAGS = 0,
- EDIT = 1,
- NREGIONS = 2,
- FOCUSED = 2
-} WinRegion;
-
-void win_init(void);
-void win_title(char* path);
-void win_font(char* font);
-void win_prop_set(char* xname, char* ename, char* value);
-void win_loop(void);
-void win_quit(void);
-void win_togglefocus(void);
-View* win_view(WinRegion id);
-Buf* win_buf(WinRegion id);
-bool win_keymodsset(int mask);
-void win_setln(int line_num);
-/** @file */
-/* Buffer management functions
- *****************************************************************************/
+#include <x11.h>
+
/* undo/redo list item */
typedef struct Log {
struct Log* next; /* pointer to next operation in the stack */
/* Command Executions
*****************************************************************************/
+/* src/tide/job.c */
+
typedef struct Job Job;
typedef void (*jobfn_t)(Job* job);
/* Common Shortcuts
*****************************************************************************/
+/* src/tide/shortcuts.c */
+
void select_line(char* arg);
void join_lines(char* arg);
void delete(char* arg);
};
int process_mouse(int btn, bool pressed);
+
+/* Command and Tag Exectuion
+ *****************************************************************************/
+/* src/tide/exec.c */
+
+typedef struct {
+ char* tag;
+ void (*action)(char*);
+} Tag;
+
+void exec_init(Tag* p_tags);
+void exec_cmd(char* cmd);
+void exec_cmdwarg(char* cmd, char* arg);
+void exec_rawwarg(char* cmd, char* arg);
+
+/* UI Window Control
+ *****************************************************************************/
+/* src/tide/main.c */
+
+typedef struct XFont XFont;
+
+typedef struct {
+ uint32_t attr; /* attributes applied to this cell */
+ uint32_t rune; /* rune value for the cell */
+} XGlyph;
+
+typedef struct {
+ void* font;
+ uint32_t glyph;
+ short x;
+ short y;
+} XGlyphSpec;
+
+enum {
+ MouseLeft = 1,
+ MouseMiddle = 2,
+ MouseRight = 3,
+ MouseWheelUp = 4,
+ MouseWheelDn = 5
+};
+
+typedef enum {
+ TAGS = 0,
+ EDIT = 1,
+ NREGIONS = 2,
+ FOCUSED = 2
+} WinRegion;
+
+void win_init(void);
+void win_title(char* path);
+void win_font(char* font);
+void win_prop_set(char* xname, char* ename, char* value);
+void win_loop(void);
+void win_quit(void);
+void win_togglefocus(void);
+View* win_view(WinRegion id);
+Buf* win_buf(WinRegion id);
+bool win_keymodsset(int mask);
+void win_setln(int line_num);
+
+typedef struct {
+ int x, y;
+ int h, w;
+} drawcsr;
+
+/* UI Drawing Routines
+ *****************************************************************************/
+void draw_rect(XConf* x, int color, int posx, int posy, int width, int height);
+void draw_statbox(XConf* x, int status);
+int draw_hrule(XConf* x, drawcsr* csr);
+void draw_view(XConf* x, View* view, XftFont* font, size_t nrows, drawcsr* csr, int bg, int fg, int sel, bool csrsync);
+bool draw_csr(XConf* x, View* view, int fg, size_t fheight, int posx, int posy, bool csrdrawn);
+void draw_scroll(XConf* x, drawcsr* csr, View* view, int divider);
+
+/* Pseudo Terminal Routines
+ *****************************************************************************/
+bool xpty_active(void);
+void xpty_togglescroll(void);
+int xpty_run(View* view, char** cmd);
+void xpty_send(char* cmd);
+void xpty_rawsend(char* cmd);