2006-03-04 18:16:49 +00:00
|
|
|
#ifndef HEADER_ScreenManager
|
|
|
|
#define HEADER_ScreenManager
|
|
|
|
/*
|
2011-12-26 21:35:57 +00:00
|
|
|
htop - ScreenManager.h
|
2011-05-26 16:35:07 +00:00
|
|
|
(C) 2004-2011 Hisham H. Muhammad
|
2020-10-05 07:51:32 +00:00
|
|
|
Released under the GNU GPLv2, see the COPYING file
|
2006-03-04 18:16:49 +00:00
|
|
|
in the source distribution for its full text.
|
|
|
|
*/
|
|
|
|
|
2020-09-19 11:55:23 +00:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2020-10-05 13:14:54 +00:00
|
|
|
#include "Action.h"
|
2011-03-22 20:37:08 +00:00
|
|
|
#include "Header.h"
|
2015-01-22 01:27:31 +00:00
|
|
|
#include "Panel.h"
|
2020-10-05 13:14:54 +00:00
|
|
|
#include "Settings.h"
|
2020-09-18 17:23:04 +00:00
|
|
|
#include "Vector.h"
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2020-09-19 11:55:23 +00:00
|
|
|
|
2006-03-04 18:16:49 +00:00
|
|
|
typedef struct ScreenManager_ {
|
|
|
|
int x1;
|
|
|
|
int y1;
|
|
|
|
int x2;
|
|
|
|
int y2;
|
2011-12-01 12:31:57 +00:00
|
|
|
Vector* panels;
|
|
|
|
int panelCount;
|
2020-09-23 12:15:51 +00:00
|
|
|
Header* header;
|
2015-01-22 01:27:31 +00:00
|
|
|
const Settings* settings;
|
2020-10-05 13:14:54 +00:00
|
|
|
const State* state;
|
2006-03-04 18:16:49 +00:00
|
|
|
bool owner;
|
2011-12-01 12:31:57 +00:00
|
|
|
bool allowFocusChange;
|
2006-03-04 18:16:49 +00:00
|
|
|
} ScreenManager;
|
|
|
|
|
2020-11-26 05:15:09 +00:00
|
|
|
ScreenManager* ScreenManager_new(Header* header, const Settings* settings, const State* state, bool owner);
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2020-09-02 07:38:44 +00:00
|
|
|
void ScreenManager_delete(ScreenManager* this);
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2021-01-05 22:42:55 +00:00
|
|
|
int ScreenManager_size(const ScreenManager* this);
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2020-09-02 07:38:44 +00:00
|
|
|
void ScreenManager_add(ScreenManager* this, Panel* item, int size);
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2020-09-02 07:38:44 +00:00
|
|
|
Panel* ScreenManager_remove(ScreenManager* this, int idx);
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2020-09-02 07:38:44 +00:00
|
|
|
void ScreenManager_resize(ScreenManager* this, int x1, int y1, int x2, int y2);
|
2006-03-04 18:16:49 +00:00
|
|
|
|
2020-09-02 07:38:44 +00:00
|
|
|
void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey);
|
2006-03-04 18:16:49 +00:00
|
|
|
|
|
|
|
#endif
|