aboutsummaryrefslogtreecommitdiff
path: root/T.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2015-04-01 22:43:44 -0300
committerSamuel Fadel <samuelfadel@gmail.com>2015-04-01 22:43:44 -0300
commita605c88ba3a0180d5783722c2c877f2ab8b01659 (patch)
tree3ec8f1712b2549cf596ff4bf595a5b5bc767e29a /T.h
parent52913a6131fdc950065d33ec18f75a1bcd329896 (diff)
Rewritten as a client-server application, similar to urxvt{d,c}.
Diffstat (limited to 'T.h')
-rw-r--r--T.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/T.h b/T.h
new file mode 100644
index 0000000..a891982
--- /dev/null
+++ b/T.h
@@ -0,0 +1,43 @@
+/*
+ * T.h
+ * Common definitions and utilities.
+ *
+ * This file is part of T.
+ *
+ * T is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * T is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * T. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef T_H
+#define T_H
+
+#include "config.h"
+
+#define PROGRAM_NAME "T"
+
+#define SOCKPATH CONFIG_SOCKDIR "/" CONFIG_SOCKNAME
+#define SOCKPATH_MAXLEN sizeof((SOCKPATH))
+
+typedef enum {
+ MSG_NEWWIN,
+ MSG_EXIT,
+ MSG_OK,
+ MSG_ERROR
+} TMessage;
+
+int num_open_windows();
+void new_window();
+
+void wrn(const char *message);
+void err(const char *message, int ecode);
+
+#endif /* T_H */