-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwManager.h
More file actions
51 lines (45 loc) · 1.11 KB
/
wManager.h
File metadata and controls
51 lines (45 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include <curses.h>
#include <panel.h>
#include <semaphore.h>
#include <pthread.h>
#define TAB_NAMES {"ARP", "EVIL TWIN", "OTHER"}
#define TABS_SIZE 3
#define BOT_CMD_KEY {"F1", "F10"}
#define BOT_CMD {"Help", "Quit"}
#define CMD_SIZE 2
typedef struct area_info_
{
WINDOW* win;
PANEL* panel;
int shown;
int num_col;
int num_row;
int startx;
int starty;
pthread_mutex_t lock;
}area_info;
typedef struct windows
{
int max_row;
int max_col;
sem_t win_sem;
area_info* tab_bar;
area_info* cmd_bar;
area_info* bot_bar;
area_info* help_win;
area_info* arp_left;
area_info* arp_left_cont;
area_info* arp_right;
} winStruct;
void* runWindowThread(void* winsPtr);
void initScreen(winStruct* wins);
void printTabBar(winStruct* wins, int highlight);
void printBottomBar(winStruct* wins);
void printHelp(winStruct* wins);
void parseInput(winStruct* wins);
void showHelp(winStruct* wins);
area_info* setupArea(int num_row, int num_col, int starty, int startx);
void selectNextLine(area_info* active_win);
void selectPrevLine(area_info* active_win);
void parseCommand(winStruct* wins, char* buffer);