From d3c9975943df58e293359b87905d19ff1fd52061 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:00:15 +0200 Subject: Imported Upstream version 0.5 --- ProcessList.h | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 ProcessList.h (limited to 'ProcessList.h') diff --git a/ProcessList.h b/ProcessList.h new file mode 100644 index 0000000..45639d3 --- /dev/null +++ b/ProcessList.h @@ -0,0 +1,123 @@ +/* Do not edit this file. It was automatically genarated. */ + +#ifndef HEADER_ProcessList +#define HEADER_ProcessList +/* +htop +(C) 2004 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ + +#include "Process.h" +#include "TypedVector.h" +#include "UsersTable.h" +#include "Hashtable.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "debug.h" +#include + +#ifndef PROCDIR +#define PROCDIR "/proc" +#endif + +#ifndef PROCSTATFILE +#define PROCSTATFILE "/proc/stat" +#endif + +#ifndef PROCMEMINFOFILE +#define PROCMEMINFOFILE "/proc/meminfo" +#endif + + +typedef struct ProcessList_ { + TypedVector* processes; + TypedVector* processes2; + Hashtable* processTable; + Process* prototype; + UsersTable* usersTable; + + int processorCount; + int totalTasks; + int runningTasks; + + long int* totalTime; + long int* userTime; + long int* systemTime; + long int* idleTime; + long int* niceTime; + long int* totalPeriod; + long int* userPeriod; + long int* systemPeriod; + long int* idlePeriod; + long int* nicePeriod; + + long int totalMem; + long int usedMem; + long int freeMem; + long int sharedMem; + long int buffersMem; + long int cachedMem; + long int totalSwap; + long int usedSwap; + long int freeSwap; + + int kernelMajor; + int kernelMiddle; + int kernelMinor; + int kernelTiny; + + ProcessField* fields; + ProcessField sortKey; + int direction; + bool hideThreads; + bool shadowOtherUsers; + bool hideKernelThreads; + bool treeView; + bool highlightBaseName; + bool highlightMegabytes; + +} ProcessList; + + + +ProcessList* ProcessList_new(UsersTable* usersTable); + +void ProcessList_delete(ProcessList* this); + +void ProcessList_invertSortOrder(ProcessList* this); + +void ProcessList_sortKey(ProcessList* this, int delta); + +RichString ProcessList_printHeader(ProcessList* this); + + +void ProcessList_prune(ProcessList* this); + +void ProcessList_add(ProcessList* this, Process* p); + +void ProcessList_remove(ProcessList* this, Process* p); + +Process* ProcessList_get(ProcessList* this, int index); + +int ProcessList_size(ProcessList* this); + + +void ProcessList_sort(ProcessList* this); + + +void ProcessList_scan(ProcessList* this); + +void ProcessList_dontCrash(int signal); + +#endif -- cgit v1.2.3