ssheven/ssheven.h

78 lines
1.2 KiB
C
Raw Normal View History

/*
* ssheven
*
* Copyright (c) 2020 by cy384 <cy384@cy384.com>
* See LICENSE file for details
*/
#pragma once
// open transport
#include <OpenTransport.h>
#include <OpenTptInternet.h>
// mac os stuff
#include <Threads.h>
#include <MacMemory.h>
#include <Quickdraw.h>
#include <Fonts.h>
#include <Windows.h>
#include <Sound.h>
#include <Gestalt.h>
2020-08-06 01:59:49 +01:00
#include <Devices.h>
#include <Scrap.h>
#include <Controls.h>
#include <ControlDefinitions.h>
2020-09-16 02:17:02 +01:00
#include <StandardFile.h>
// libssh2
#include <libssh2.h>
// ssheven constants
#include "ssheven-constants.r"
// libvterm
2020-08-29 03:14:43 +01:00
#include <vterm.h>
#include <vterm_keycodes.h>
// sinful globals
struct ssheven_console
{
WindowPtr win;
2020-09-01 03:53:06 +01:00
int size_x;
int size_y;
int cursor_x;
int cursor_y;
int cell_height;
int cell_width;
2020-08-22 02:29:34 +01:00
int cursor_state;
long int last_cursor_blink;
2020-09-15 00:54:31 +01:00
int cursor_visible;
2020-08-29 03:14:43 +01:00
VTerm* vterm;
VTermScreen* vts;
};
extern struct ssheven_console con;
struct ssheven_ssh_connection
{
LIBSSH2_CHANNEL* channel;
LIBSSH2_SESSION* session;
EndpointRef endpoint;
char* recv_buffer;
char* send_buffer;
};
extern struct ssheven_ssh_connection ssh_con;
2020-09-06 19:34:42 +01:00
extern char key_to_vterm[256];
void ssh_write(char* buf, size_t len);