mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibCore: Put all classes in the Core namespace and remove the leading C
I've been wanting to do this for a long time. It's time we start being consistent about how this stuff works. The new convention is: - "LibFoo" is a userspace library that provides the "Foo" namespace. That's it :^) This was pretty tedious to convert and I didn't even start on LibGUI yet. But it's coming up next.
This commit is contained in:
parent
b7e3810b5c
commit
2d39da5405
265 changed files with 1380 additions and 1167 deletions
|
@ -29,10 +29,12 @@
|
|||
#include <AK/Function.h>
|
||||
#include <LibCore/CObject.h>
|
||||
|
||||
class CTimer final : public CObject {
|
||||
C_OBJECT(CTimer)
|
||||
namespace Core {
|
||||
|
||||
class Timer final : public Object {
|
||||
C_OBJECT(Timer)
|
||||
public:
|
||||
virtual ~CTimer() override;
|
||||
virtual ~Timer() override;
|
||||
|
||||
void start();
|
||||
void start(int interval);
|
||||
|
@ -55,13 +57,15 @@ public:
|
|||
Function<void()> on_timeout;
|
||||
|
||||
private:
|
||||
explicit CTimer(CObject* parent = nullptr);
|
||||
CTimer(int interval, Function<void()>&& timeout_handler, CObject* parent = nullptr);
|
||||
explicit Timer(Object* parent = nullptr);
|
||||
Timer(int interval, Function<void()>&& timeout_handler, Object* parent = nullptr);
|
||||
|
||||
virtual void timer_event(CTimerEvent&) override;
|
||||
virtual void timer_event(TimerEvent&) override;
|
||||
|
||||
bool m_active { false };
|
||||
bool m_single_shot { false };
|
||||
bool m_interval_dirty { false };
|
||||
int m_interval { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue