summaryrefslogtreecommitdiff
path: root/Applications/Piano
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-02 12:34:39 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-02 15:15:30 +0100
commit2d39da5405a4527e91e853ddb1e56a539c96c6c1 (patch)
tree342f5d553c844f05b550510de27d5b7c937daf90 /Applications/Piano
parentb7e3810b5c3d7e52217e70eed61132d9f670648d (diff)
downloadserenity-2d39da5405a4527e91e853ddb1e56a539c96c6c1.zip
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.
Diffstat (limited to 'Applications/Piano')
-rw-r--r--Applications/Piano/MainWidget.cpp2
-rw-r--r--Applications/Piano/MainWidget.h4
-rw-r--r--Applications/Piano/main.cpp8
3 files changed, 7 insertions, 7 deletions
diff --git a/Applications/Piano/MainWidget.cpp b/Applications/Piano/MainWidget.cpp
index 044992a43e..cf597f6584 100644
--- a/Applications/Piano/MainWidget.cpp
+++ b/Applications/Piano/MainWidget.cpp
@@ -70,7 +70,7 @@ MainWidget::~MainWidget()
// FIXME: There are some unnecessary calls to update() throughout this program,
// which are an easy target for optimization.
-void MainWidget::custom_event(CCustomEvent&)
+void MainWidget::custom_event(Core::CustomEvent&)
{
m_wave_widget->update();
diff --git a/Applications/Piano/MainWidget.h b/Applications/Piano/MainWidget.h
index 5f1fce8afd..2a85ff4ab7 100644
--- a/Applications/Piano/MainWidget.h
+++ b/Applications/Piano/MainWidget.h
@@ -27,8 +27,8 @@
#pragma once
+#include "Music.h"
#include <LibGUI/GWidget.h>
-#include <Music.h>
class AudioEngine;
class WaveWidget;
@@ -48,7 +48,7 @@ private:
virtual void keydown_event(GKeyEvent&) override;
virtual void keyup_event(GKeyEvent&) override;
- virtual void custom_event(CCustomEvent&) override;
+ virtual void custom_event(Core::CustomEvent&) override;
void note_key_action(int key_code, Switch);
void special_key_action(int key_code);
diff --git a/Applications/Piano/main.cpp b/Applications/Piano/main.cpp
index 3d8f0a36b4..d33c0f70b8 100644
--- a/Applications/Piano/main.cpp
+++ b/Applications/Piano/main.cpp
@@ -55,8 +55,8 @@ int main(int argc, char** argv)
window->show();
LibThread::Thread audio_thread([&] {
- auto audio = CFile::construct("/dev/audio");
- if (!audio->open(CIODevice::WriteOnly)) {
+ auto audio = Core::File::construct("/dev/audio");
+ if (!audio->open(Core::IODevice::WriteOnly)) {
dbgprintf("Can't open audio device: %s", audio->error_string());
return 1;
}
@@ -65,8 +65,8 @@ int main(int argc, char** argv)
for (;;) {
audio_engine.fill_buffer(buffer);
audio->write(reinterpret_cast<u8*>(buffer.data()), buffer_size);
- CEventLoop::current().post_event(*main_widget, make<CCustomEvent>(0));
- CEventLoop::wake();
+ Core::EventLoop::current().post_event(*main_widget, make<Core::CustomEvent>(0));
+ Core::EventLoop::wake();
}
});
audio_thread.start();