mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 23:07:34 +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
|
@ -109,7 +109,7 @@ void StyleProperties::load_font() const
|
|||
|
||||
auto look_for_file = [](const StringView& expected_name) -> String {
|
||||
// TODO: handle font sizes properly?
|
||||
CDirIterator it { "/res/fonts/", CDirIterator::Flags::SkipDots };
|
||||
Core::DirIterator it { "/res/fonts/", Core::DirIterator::Flags::SkipDots };
|
||||
while (it.has_next()) {
|
||||
String name = it.next_path();
|
||||
ASSERT(name.ends_with(".font"));
|
||||
|
|
|
@ -51,8 +51,8 @@ int main(int argc, char** argv)
|
|||
fprintf(stderr, "usage: %s <path/to/CSS/Properties.json>\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
auto file = CFile::construct(argv[1]);
|
||||
if (!file->open(CIODevice::ReadOnly))
|
||||
auto file = Core::File::construct(argv[1]);
|
||||
if (!file->open(Core::IODevice::ReadOnly))
|
||||
return 1;
|
||||
|
||||
auto json = JsonValue::from_string(file->read_all());
|
||||
|
|
|
@ -51,8 +51,8 @@ int main(int argc, char** argv)
|
|||
fprintf(stderr, "usage: %s <path/to/CSS/Properties.json>\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
auto file = CFile::construct(argv[1]);
|
||||
if (!file->open(CIODevice::ReadOnly))
|
||||
auto file = Core::File::construct(argv[1]);
|
||||
if (!file->open(Core::IODevice::ReadOnly))
|
||||
return 1;
|
||||
|
||||
auto json = JsonValue::from_string(file->read_all());
|
||||
|
|
|
@ -47,7 +47,7 @@ Document::Document()
|
|||
: ParentNode(*this, NodeType::DOCUMENT_NODE)
|
||||
, m_style_resolver(make<StyleResolver>(*this))
|
||||
{
|
||||
m_style_update_timer = CTimer::construct();
|
||||
m_style_update_timer = Core::Timer::construct();
|
||||
m_style_update_timer->set_single_shot(true);
|
||||
m_style_update_timer->set_interval(0);
|
||||
m_style_update_timer->on_timeout = [this] {
|
||||
|
|
|
@ -36,8 +36,11 @@
|
|||
#include <LibHTML/CSS/StyleSheet.h>
|
||||
#include <LibHTML/DOM/ParentNode.h>
|
||||
|
||||
namespace Core {
|
||||
class Timer;
|
||||
}
|
||||
|
||||
class Palette;
|
||||
class CTimer;
|
||||
class Frame;
|
||||
class HTMLBodyElement;
|
||||
class HTMLHtmlElement;
|
||||
|
@ -135,7 +138,7 @@ private:
|
|||
Optional<Color> m_active_link_color;
|
||||
Optional<Color> m_visited_link_color;
|
||||
|
||||
RefPtr<CTimer> m_style_update_timer;
|
||||
RefPtr<Core::Timer> m_style_update_timer;
|
||||
|
||||
String m_source;
|
||||
};
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
HTMLBlinkElement::HTMLBlinkElement(Document& document, const String& tag_name)
|
||||
: HTMLElement(document, tag_name)
|
||||
, m_timer(CTimer::construct())
|
||||
, m_timer(Core::Timer::construct())
|
||||
{
|
||||
m_timer->set_interval(500);
|
||||
m_timer->on_timeout = [this] { blink(); };
|
||||
|
|
|
@ -28,7 +28,9 @@
|
|||
|
||||
#include <LibHTML/DOM/HTMLElement.h>
|
||||
|
||||
class CTimer;
|
||||
namespace Core {
|
||||
class Timer;
|
||||
}
|
||||
|
||||
class HTMLBlinkElement : public HTMLElement {
|
||||
public:
|
||||
|
@ -38,5 +40,5 @@ public:
|
|||
private:
|
||||
void blink();
|
||||
|
||||
NonnullRefPtr<CTimer> m_timer;
|
||||
NonnullRefPtr<Core::Timer> m_timer;
|
||||
};
|
||||
|
|
|
@ -46,9 +46,9 @@ ResourceLoader::ResourceLoader()
|
|||
void ResourceLoader::load(const URL& url, Function<void(const ByteBuffer&)> callback)
|
||||
{
|
||||
if (url.protocol() == "file") {
|
||||
auto f = CFile::construct();
|
||||
auto f = Core::File::construct();
|
||||
f->set_filename(url.path());
|
||||
if (!f->open(CIODevice::OpenMode::ReadOnly)) {
|
||||
if (!f->open(Core::IODevice::OpenMode::ReadOnly)) {
|
||||
dbg() << "ResourceLoader::load: Error: " << f->error_string();
|
||||
callback({});
|
||||
return;
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace LibProtocol {
|
|||
class Client;
|
||||
}
|
||||
|
||||
class ResourceLoader : public CObject {
|
||||
class ResourceLoader : public Core::Object {
|
||||
C_OBJECT(ResourceLoader)
|
||||
public:
|
||||
static ResourceLoader& the();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue