ScreenManager.h 1.19 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
7
8
9
10
11

#ifndef HEADER_ScreenManager
#define HEADER_ScreenManager
/*
htop
(C) 2004-2006 Hisham H. Muhammad
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"
Hisham Muhammad's avatar
Hisham Muhammad committed
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "FunctionBar.h"

#include "debug.h"
#include <assert.h>

#include <stdbool.h>


typedef enum Orientation_ {
   VERTICAL,
   HORIZONTAL
} Orientation;

typedef struct ScreenManager_ {
   int x1;
   int y1;
   int x2;
   int y2;
   Orientation orientation;
34
   Vector* items;
Hisham Muhammad's avatar
Hisham Muhammad committed
35
   Vector* fuBars;
Hisham Muhammad's avatar
Hisham Muhammad committed
36
37
38
39
40
41
42
43
44
45
   int itemCount;
   FunctionBar* fuBar;
   bool owner;
} ScreenManager;


ScreenManager* ScreenManager_new(int x1, int y1, int x2, int y2, Orientation orientation, bool owner);

void ScreenManager_delete(ScreenManager* this);

46
extern int ScreenManager_size(ScreenManager* this);
Hisham Muhammad's avatar
Hisham Muhammad committed
47

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

50
Panel* ScreenManager_remove(ScreenManager* this, int index);
Hisham Muhammad's avatar
Hisham Muhammad committed
51
52
53

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

54
void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey);
Hisham Muhammad's avatar
Hisham Muhammad committed
55
56

#endif