diff examples/image/main.cpp @ 82:ee850a6ab89e

Client: namespace and hierarchy
author David Demelier <markand@malikania.fr>
date Sun, 22 Jan 2017 11:07:36 +0100
parents 301599387b40
children f4d23ad4aa27
line wrap: on
line diff
--- a/examples/image/main.cpp	Sun Jan 22 10:11:17 2017 +0100
+++ b/examples/image/main.cpp	Sun Jan 22 11:07:36 2017 +0100
@@ -19,14 +19,14 @@
 #include <chrono>
 #include <thread>
 
-#include <malikania/client_resources_loader.hpp>
-#include <malikania/image.hpp>
+#include <malikania/client/loader.hpp>
+#include <malikania/client/image.hpp>
+#include <malikania/client/window.hpp>
 #include <malikania/locator.hpp>
-#include <malikania/window.hpp>
 
 using namespace std::chrono_literals;
 
-void draw(mlk::window& window, mlk::client_resources_loader& loader)
+void draw(mlk::client::window& window, mlk::client::loader& loader)
 {
     try {
         auto image = loader.load_image("images/smiley.png");
@@ -34,7 +34,7 @@
         auto y = (400 / 2) - (image.size().height() / 2);
 
         window.clear();
-        image.draw(window, mlk::point(x, y));
+        image.draw(window, mlk::client::point(x, y));
         window.present();
 
         std::this_thread::sleep_for(3s);
@@ -47,9 +47,9 @@
 int main()
 {
     try {
-        mlk::window window(400, 400);
+        mlk::client::window window(400, 400);
         mlk::directory_locator locator(SOURCE_DIRECTORY);
-        mlk::client_resources_loader loader(locator);
+        mlk::client::loader loader(locator);
 
         draw(window, loader);
     } catch (const std::exception& ex) {