aboutsummaryrefslogtreecommitdiffstats
path: root/src/socket.h
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2016-05-10 17:25:12 -0400
committerJesse Luehrs <doy@tozt.net>2016-05-10 17:31:39 -0400
commitec77a7037586864ece6505c448ab5c15bf8a57d9 (patch)
treead23ca8d2ded6ffc0a9d9c6c5320e457c37ece32 /src/socket.h
parent9118ead5ae15548c8a5b96340f9a0a24b3104e32 (diff)
downloadrunes-ec77a7037586864ece6505c448ab5c15bf8a57d9.tar.gz
runes-ec77a7037586864ece6505c448ab5c15bf8a57d9.zip
refactor how submodules are handled
let them own their own memory, so that they can free themselves once they exit the loop. also split out the parts of the terminal that we only want to initialize once, even if we open multiple terminal windows
Diffstat (limited to 'src/socket.h')
-rw-r--r--src/socket.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/socket.h b/src/socket.h
index e0c5955..a2d453a 100644
--- a/src/socket.h
+++ b/src/socket.h
@@ -5,15 +5,16 @@
struct runes_socket {
RunesLoop *loop;
+ RunesWindowBackendGlobal *wg;
char *name;
int sock;
int client_sock;
};
-void runes_socket_init(RunesSocket *sock, RunesLoop *loop);
+RunesSocket *runes_socket_new(RunesLoop *loop, RunesWindowBackendGlobal *wg);
void runes_socket_init_loop(RunesSocket *sock, RunesLoop *loop);
void runes_socket_send_client_message(int argc, char **argv);
-void runes_socket_cleanup(RunesSocket *sock);
+void runes_socket_delete(RunesSocket *sock);
#define MAX_SOCKET_PATH_LEN \
(sizeof(struct sockaddr_un) - offsetof(struct sockaddr_un, sun_path))