ScreenManager.h 1.32 KB
Newer Older
Hisham Muhammad's avatar
Hisham Muhammad committed
1
/* Do not edit this file. It was automatically generated. */
Hisham Muhammad's avatar
Hisham Muhammad committed
2
3
4
5
6

#ifndef HEADER_ScreenManager
#define HEADER_ScreenManager
/*
htop
Hisham Muhammad's avatar
Hisham Muhammad committed
7
(C) 2004-2011 Hisham H. Muhammad
Hisham Muhammad's avatar
Hisham Muhammad committed
8
9
10
11
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/

12
#include "Panel.h"
Hisham Muhammad's avatar
Hisham Muhammad committed
13
#include "Object.h"
14
#include "Vector.h"
15
#include "Header.h"
Hisham Muhammad's avatar
Hisham Muhammad committed
16
17
18
19
#include "FunctionBar.h"

#include "debug.h"
#include <assert.h>
20
#include <time.h>
Hisham Muhammad's avatar
Hisham Muhammad committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

#include <stdbool.h>


typedef enum Orientation_ {
   VERTICAL,
   HORIZONTAL
} Orientation;

typedef struct ScreenManager_ {
   int x1;
   int y1;
   int x2;
   int y2;
   Orientation orientation;
36
   Vector* panels;
Hisham Muhammad's avatar
Hisham Muhammad committed
37
   Vector* fuBars;
38
   int panelCount;
39
40
41
   const FunctionBar* fuBar;
   const Header* header;
   time_t lastScan;
Hisham Muhammad's avatar
Hisham Muhammad committed
42
   bool owner;
43
   bool allowFocusChange;
Hisham Muhammad's avatar
Hisham Muhammad committed
44
45
46
} ScreenManager;


47
ScreenManager* ScreenManager_new(int x1, int y1, int x2, int y2, Orientation orientation, const Header* header, bool owner);
Hisham Muhammad's avatar
Hisham Muhammad committed
48
49
50

void ScreenManager_delete(ScreenManager* this);

51
extern int ScreenManager_size(ScreenManager* this);
Hisham Muhammad's avatar
Hisham Muhammad committed
52

53
void ScreenManager_add(ScreenManager* this, Panel* item, FunctionBar* fuBar, int size);
Hisham Muhammad's avatar
Hisham Muhammad committed
54

Hisham Muhammad's avatar
Hisham Muhammad committed
55
Panel* ScreenManager_remove(ScreenManager* this, int idx);
Hisham Muhammad's avatar
Hisham Muhammad committed
56
57
58

void ScreenManager_resize(ScreenManager* this, int x1, int y1, int x2, int y2);

59
void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey);
Hisham Muhammad's avatar
Hisham Muhammad committed
60
61

#endif