mirror of https://github.com/xzeldon/htop.git
EnvScreen: mark local class functions static
This commit is contained in:
parent
a7612b0b7d
commit
64c05a1ed5
22
EnvScreen.c
22
EnvScreen.c
|
@ -14,15 +14,6 @@
|
||||||
#include "XUtils.h"
|
#include "XUtils.h"
|
||||||
|
|
||||||
|
|
||||||
const InfoScreenClass EnvScreen_class = {
|
|
||||||
.super = {
|
|
||||||
.extends = Class(Object),
|
|
||||||
.delete = EnvScreen_delete
|
|
||||||
},
|
|
||||||
.scan = EnvScreen_scan,
|
|
||||||
.draw = EnvScreen_draw
|
|
||||||
};
|
|
||||||
|
|
||||||
EnvScreen* EnvScreen_new(Process* process) {
|
EnvScreen* EnvScreen_new(Process* process) {
|
||||||
EnvScreen* this = xMalloc(sizeof(EnvScreen));
|
EnvScreen* this = xMalloc(sizeof(EnvScreen));
|
||||||
Object_setClass(this, Class(EnvScreen));
|
Object_setClass(this, Class(EnvScreen));
|
||||||
|
@ -33,11 +24,11 @@ void EnvScreen_delete(Object* this) {
|
||||||
free(InfoScreen_done((InfoScreen*)this));
|
free(InfoScreen_done((InfoScreen*)this));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnvScreen_draw(InfoScreen* this) {
|
static void EnvScreen_draw(InfoScreen* this) {
|
||||||
InfoScreen_drawTitled(this, "Environment of process %d - %s", this->process->pid, Process_getCommand(this->process));
|
InfoScreen_drawTitled(this, "Environment of process %d - %s", this->process->pid, Process_getCommand(this->process));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnvScreen_scan(InfoScreen* this) {
|
static void EnvScreen_scan(InfoScreen* this) {
|
||||||
Panel* panel = this->display;
|
Panel* panel = this->display;
|
||||||
int idx = MAXIMUM(Panel_getSelectedIndex(panel), 0);
|
int idx = MAXIMUM(Panel_getSelectedIndex(panel), 0);
|
||||||
|
|
||||||
|
@ -59,3 +50,12 @@ void EnvScreen_scan(InfoScreen* this) {
|
||||||
Vector_insertionSort(panel->items);
|
Vector_insertionSort(panel->items);
|
||||||
Panel_setSelected(panel, idx);
|
Panel_setSelected(panel, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const InfoScreenClass EnvScreen_class = {
|
||||||
|
.super = {
|
||||||
|
.extends = Class(Object),
|
||||||
|
.delete = EnvScreen_delete
|
||||||
|
},
|
||||||
|
.scan = EnvScreen_scan,
|
||||||
|
.draw = EnvScreen_draw
|
||||||
|
};
|
||||||
|
|
|
@ -15,8 +15,4 @@ EnvScreen* EnvScreen_new(Process* process);
|
||||||
|
|
||||||
void EnvScreen_delete(Object* this);
|
void EnvScreen_delete(Object* this);
|
||||||
|
|
||||||
void EnvScreen_draw(InfoScreen* this);
|
|
||||||
|
|
||||||
void EnvScreen_scan(InfoScreen* this);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue