From b0ef83fd713f875d251e97352fe0a845f25ecf49 Mon Sep 17 00:00:00 2001 From: Cass Everitt Date: Wed, 22 Jan 2014 08:39:08 -0600 Subject: [PATCH] some additional clean-up --- src/regal/RegalX11.cpp | 150 ------------------ src/regal/{RegalBin.h => layer/bin/Bin.h} | 0 .../http/Favicon.cpp} | 0 .../{RegalFavicon.h => layer/http/Favicon.h} | 0 .../http/Favicon.svg} | 0 5 files changed, 150 deletions(-) delete mode 100644 src/regal/RegalX11.cpp rename src/regal/{RegalBin.h => layer/bin/Bin.h} (100%) rename src/regal/{RegalFavicon.cpp => layer/http/Favicon.cpp} (100%) rename src/regal/{RegalFavicon.h => layer/http/Favicon.h} (100%) rename src/regal/{RegalFavicon.svg => layer/http/Favicon.svg} (100%) diff --git a/src/regal/RegalX11.cpp b/src/regal/RegalX11.cpp deleted file mode 100644 index 547643e..0000000 --- a/src/regal/RegalX11.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/* - Copyright (c) 2011-2013 NVIDIA Corporation - Copyright (c) 2011-2013 Cass Everitt - Copyright (c) 2012-2013 Scott Nations - Copyright (c) 2012-2013 Mathias Schott - Copyright (c) 2012-2013 Nigel Stewart - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - - X11 emulation for Android, Windows and Mac - Nigel Stewart - -*/ - -#include "pch.h" /* For MS precompiled header support */ - -#include "RegalUtil.h" - -/* Only relevant if X11 isn't available: REGAL_X11==0 */ - -#if REGAL_SYS_GLX && !REGAL_SYS_X11 - -REGAL_GLOBAL_BEGIN - -#include - -#include - -#include "RegalLog.h" -#include "RegalInit.h" - -#define True 1 -#define False 0 - -extern "C" { - - ////////// libX11 - - REGAL_DECL int - DefaultScreen(Display *display) - { - ::REGAL_NAMESPACE_INTERNAL::Init::init(); - Internal("Regal::DefaultScreen","display=",display); - return 1; - } - - REGAL_DECL Window - RootWindow(Display *display, int screen_number) - { - ::REGAL_NAMESPACE_INTERNAL::Init::init(); - Internal("Regal::RootWindow","display=",display," screen number=",screen_number); - return 1; - } - - ////////// - - REGAL_DECL int - XMapWindow(Display *display, Window w) - { - ::REGAL_NAMESPACE_INTERNAL::Init::init(); - Internal("Regal::XMapWindow","display=",display," w=",w); - return 1; - } - - static Window dummyWindow = 0; - - REGAL_DECL Window - XCreateWindow(Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, int depth, unsigned int clss, Visual *visual, unsigned long valuemask, XSetWindowAttributes *attributes) - { - ::REGAL_NAMESPACE_INTERNAL::Init::init(); - Internal("Regal::XCreateWindow","display=",display," width=",width," height=",height); - return ++dummyWindow; - } - - static Colormap dummyColormap = 0; - - REGAL_DECL Colormap - XCreateColormap(Display *display, Window w, Visual *visual, int alloc) - { - ::REGAL_NAMESPACE_INTERNAL::Init::init(); - Internal("Regal::XCreateColormap","display=",display); - return ++dummyColormap; - } - - REGAL_DECL Display * - XOpenDisplay(char *display_name) - { - ::REGAL_NAMESPACE_INTERNAL::Init::init(); - Internal("Regal::XOpenDisplay","display_name=",print_optional(display_name,display_name)); - return reinterpret_cast(1); - } - - REGAL_DECL int - XCloseDisplay(Display *display) - { - ::REGAL_NAMESPACE_INTERNAL::Init::init(); - Internal("Regal::XCloseDisplay","display=",display); - return True; - } - - static Pixmap dummyPixmap = 0; - - REGAL_DECL Pixmap - XCreatePixmap(Display *display, Drawable d, unsigned int width, unsigned int height, unsigned int depth) - { - ::REGAL_NAMESPACE_INTERNAL::Init::init(); - Internal("Regal::XCreatePixmap","display=",display," width=",width," height=",height); - return ++dummyPixmap; - } - - REGAL_DECL int - XFreePixmap(Display *display, Pixmap pixmap) - { - ::REGAL_NAMESPACE_INTERNAL::Init::init(); - Internal("Regal::XFreePixmap","display=",display," pixmap=",pixmap); - return True; - } - -} // extern "C" - -REGAL_GLOBAL_END - -REGAL_NAMESPACE_BEGIN - -REGAL_NAMESPACE_END - -#endif // REGAL_SYS_GLX && !REGAL_SYS_X11 diff --git a/src/regal/RegalBin.h b/src/regal/layer/bin/Bin.h similarity index 100% rename from src/regal/RegalBin.h rename to src/regal/layer/bin/Bin.h diff --git a/src/regal/RegalFavicon.cpp b/src/regal/layer/http/Favicon.cpp similarity index 100% rename from src/regal/RegalFavicon.cpp rename to src/regal/layer/http/Favicon.cpp diff --git a/src/regal/RegalFavicon.h b/src/regal/layer/http/Favicon.h similarity index 100% rename from src/regal/RegalFavicon.h rename to src/regal/layer/http/Favicon.h diff --git a/src/regal/RegalFavicon.svg b/src/regal/layer/http/Favicon.svg similarity index 100% rename from src/regal/RegalFavicon.svg rename to src/regal/layer/http/Favicon.svg