htop/ScreenManager.h

47 lines
1.0 KiB
C
Raw Permalink Normal View History

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
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.
*/
#include <stdbool.h>
2020-10-05 13:14:54 +00:00
#include "Action.h"
#include "Header.h"
#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
2006-03-04 18:16:49 +00:00
typedef struct ScreenManager_ {
int x1;
int y1;
int x2;
int y2;
Vector* panels;
int panelCount;
Do not drop qualifier in cast ListItem.c:73:33: warning: cast from 'const void *' to 'struct ListItem_ *' drops const qualifier [-Wcast-qual] ListItem* obj1 = (ListItem*) cast1; ^ ListItem.c:74:33: warning: cast from 'const void *' to 'struct ListItem_ *' drops const qualifier [-Wcast-qual] ListItem* obj2 = (ListItem*) cast2; ^ Process.c:434:28: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] Process* p1 = (Process*)v1; ^ Process.c:435:28: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] Process* p2 = (Process*)v2; ^ Process.c:441:36: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] Settings *settings = ((Process*)v1)->settings; ^ Process.c:443:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] p1 = (Process*)v1; ^ Process.c:444:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] p2 = (Process*)v2; ^ Process.c:446:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] p2 = (Process*)v1; ^ Process.c:447:22: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] p1 = (Process*)v2; ^ AffinityPanel.c:37:16: warning: cast from 'const char *' to 'void *' drops const qualifier [-Wcast-qual] free((void*)this->text); ^ AffinityPanel.c:39:19: warning: cast from 'const char *' to 'void *' drops const qualifier [-Wcast-qual] free((void*)this->indent); ^ linux/LinuxProcess.c:294:36: warning: cast from 'const void *' to 'struct Process_ *' drops const qualifier [-Wcast-qual] Settings *settings = ((Process*)v1)->settings; ^ linux/LinuxProcess.c:296:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual] p1 = (LinuxProcess*)v1; ^ linux/LinuxProcess.c:297:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual] p2 = (LinuxProcess*)v2; ^ linux/LinuxProcess.c:299:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual] p2 = (LinuxProcess*)v1; ^ linux/LinuxProcess.c:300:27: warning: cast from 'const void *' to 'struct LinuxProcess_ *' drops const qualifier [-Wcast-qual] p1 = (LinuxProcess*)v2; ^ linux/LinuxProcessList.c:62:32: warning: cast from 'const void *' to 'struct TtyDriver_ *' drops const qualifier [-Wcast-qual] TtyDriver* a = (TtyDriver*) va; ^ linux/LinuxProcessList.c:63:32: warning: cast from 'const void *' to 'struct TtyDriver_ *' drops const qualifier [-Wcast-qual] TtyDriver* b = (TtyDriver*) vb; ^ linux/Battery.c:130:21: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] free((char *) isOnline); ^ linux/Battery.c:197:26: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/type", entryName); ^ linux/Battery.c:209:29: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/uevent", entryName); ^ linux/Battery.c:262:29: warning: cast from 'const char *' to 'char *' drops const qualifier [-Wcast-qual] xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/online", entryName); ^
2020-09-23 12:15:51 +00:00
Header* header;
const Settings* settings;
2020-10-05 13:14:54 +00:00
const State* state;
bool allowFocusChange;
2006-03-04 18:16:49 +00:00
} ScreenManager;
ScreenManager* ScreenManager_new(Header* header, const Settings* settings, const State* state, bool owner);
2006-03-04 18:16:49 +00:00
void ScreenManager_delete(ScreenManager* this);
2006-03-04 18:16:49 +00:00
int ScreenManager_size(const ScreenManager* this);
2006-03-04 18:16:49 +00:00
void ScreenManager_add(ScreenManager* this, Panel* item, int size);
2006-03-04 18:16:49 +00:00
Panel* ScreenManager_remove(ScreenManager* this, int idx);
2006-03-04 18:16:49 +00:00
void ScreenManager_resize(ScreenManager* this);
2006-03-04 18:16:49 +00:00
void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey);
2006-03-04 18:16:49 +00:00
#endif