mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 18:24:45 -05:00
bced810880
This is the closest I could figure out how to get to what's actively running on the terminal view at the moment. Perhaps we can bundle up every process with the same tty and sum it all up somehow. I'm not sure.
28 lines
507 B
C++
28 lines
507 B
C++
#pragma once
|
|
|
|
#include <LibGUI/GWidget.h>
|
|
|
|
class CTimer;
|
|
class GLabel;
|
|
|
|
class ProcessStateWidget final : public GWidget {
|
|
C_OBJECT(ProcessStateWidget)
|
|
public:
|
|
virtual ~ProcessStateWidget() override;
|
|
|
|
void set_tty_fd(int);
|
|
|
|
private:
|
|
explicit ProcessStateWidget(GWidget* parent);
|
|
|
|
void refresh();
|
|
|
|
RefPtr<GLabel> m_pid_label;
|
|
RefPtr<GLabel> m_state_label;
|
|
RefPtr<GLabel> m_cpu_label;
|
|
RefPtr<GLabel> m_memory_label;
|
|
|
|
RefPtr<CTimer> m_timer;
|
|
|
|
int m_tty_fd { -1 };
|
|
};
|