mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
LibCore: Move LibGUI/GTimer to LibCore/CTimer.
This commit is contained in:
parent
667e678aa6
commit
47a2982119
Notes:
sideshowbarker
2024-07-19 14:44:45 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/47a29821190
5 changed files with 14 additions and 14 deletions
|
@ -7,7 +7,7 @@
|
|||
#include <SharedGraphics/Rect.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <LibCore/CNotifier.h>
|
||||
#include <LibGUI/GTimer.h>
|
||||
#include <LibCore/CTimer.h>
|
||||
|
||||
class Font;
|
||||
|
||||
|
@ -160,5 +160,5 @@ private:
|
|||
|
||||
int m_glyph_width { 0 };
|
||||
|
||||
GTimer m_cursor_blink_timer;
|
||||
CTimer m_cursor_blink_timer;
|
||||
};
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
#include <LibGUI/GTimer.h>
|
||||
#include <LibCore/CTimer.h>
|
||||
|
||||
GTimer::GTimer(CObject* parent)
|
||||
CTimer::CTimer(CObject* parent)
|
||||
: CObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
GTimer::~GTimer()
|
||||
CTimer::~CTimer()
|
||||
{
|
||||
}
|
||||
|
||||
void GTimer::start()
|
||||
void CTimer::start()
|
||||
{
|
||||
start(m_interval);
|
||||
}
|
||||
|
||||
void GTimer::start(int interval)
|
||||
void CTimer::start(int interval)
|
||||
{
|
||||
if (m_active)
|
||||
return;
|
||||
|
@ -22,7 +22,7 @@ void GTimer::start(int interval)
|
|||
m_active = true;
|
||||
}
|
||||
|
||||
void GTimer::stop()
|
||||
void CTimer::stop()
|
||||
{
|
||||
if (!m_active)
|
||||
return;
|
||||
|
@ -30,7 +30,7 @@ void GTimer::stop()
|
|||
m_active = false;
|
||||
}
|
||||
|
||||
void GTimer::timer_event(CTimerEvent&)
|
||||
void CTimer::timer_event(CTimerEvent&)
|
||||
{
|
||||
if (m_single_shot)
|
||||
stop();
|
|
@ -3,10 +3,10 @@
|
|||
#include <LibCore/CObject.h>
|
||||
#include <AK/Function.h>
|
||||
|
||||
class GTimer final : public CObject {
|
||||
class CTimer final : public CObject {
|
||||
public:
|
||||
explicit GTimer(CObject* parent = nullptr);
|
||||
virtual ~GTimer() override;
|
||||
explicit CTimer(CObject* parent = nullptr);
|
||||
virtual ~CTimer() override;
|
||||
|
||||
void start();
|
||||
void start(int interval);
|
||||
|
@ -21,7 +21,7 @@ public:
|
|||
|
||||
Function<void()> on_timeout;
|
||||
|
||||
virtual const char* class_name() const override { return "GTimer"; }
|
||||
virtual const char* class_name() const override { return "CTimer"; }
|
||||
|
||||
private:
|
||||
virtual void timer_event(CTimerEvent&) override;
|
|
@ -11,6 +11,7 @@ OBJS = \
|
|||
CNetworkJob.o \
|
||||
CNetworkResponse.o \
|
||||
CObject.o \
|
||||
CTimer.o \
|
||||
CEventLoop.o \
|
||||
CEvent.o
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ LIBGUI_OBJS = \
|
|||
GTreeView.o \
|
||||
GFileSystemModel.o \
|
||||
GSplitter.o \
|
||||
GTimer.o \
|
||||
GSpinBox.o \
|
||||
GGroupBox.o \
|
||||
GWindow.o
|
||||
|
|
Loading…
Reference in a new issue