aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui/macwindowborder.h
diff options
context:
space:
mode:
authorBorja Lorente2016-06-02 19:02:32 +0200
committerBorja Lorente2016-07-31 14:45:36 +0200
commit4ab02530ae8e6d32bf970973669b306a859b2805 (patch)
tree3f934efdc14fd7a8a9492d770873a5ba56c0211c /graphics/macgui/macwindowborder.h
parent26238ee6f987a1ffe5836145f3b937cfd38d28cf (diff)
downloadscummvm-rg350-4ab02530ae8e6d32bf970973669b306a859b2805.tar.gz
scummvm-rg350-4ab02530ae8e6d32bf970973669b306a859b2805.tar.bz2
scummvm-rg350-4ab02530ae8e6d32bf970973669b306a859b2805.zip
GRAPHICS: Add MacWindowBorder to abstract borders
Diffstat (limited to 'graphics/macgui/macwindowborder.h')
-rw-r--r--graphics/macgui/macwindowborder.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/graphics/macgui/macwindowborder.h b/graphics/macgui/macwindowborder.h
new file mode 100644
index 0000000000..c956add76d
--- /dev/null
+++ b/graphics/macgui/macwindowborder.h
@@ -0,0 +1,78 @@
+/* ScummVM - Graphic Adventure Engine
+*
+* ScummVM is the legal property of its developers, whose names
+* are too numerous to list here. Please refer to the COPYRIGHT
+* file distributed with this source distribution.
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+* MIT License:
+*
+* Copyright (c) 2016 Borja Lorente
+*
+* Permission is hereby granted, free of charge, to any person
+* obtaining a copy of this software and associated documentation
+* files (the "Software"), to deal in the Software without
+* restriction, including without limitation the rights to use,
+* copy, modify, merge, publish, distribute, sublicense, and/or sell
+* copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following
+* conditions:
+*
+* The above copyright notice and this permission notice shall be
+* included in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+*/
+
+#ifndef GRAPHICS_MACWINDOWBORDER_H
+#define GRAPHICS_MACWINDOWBORDER_H
+
+#include "common/str.h"
+#include "common/list.h"
+
+#include "graphics/nine_patch.h"
+#include "graphics/managed_surface.h"
+#include "graphics/transparent_surface.h"
+
+namespace Graphics {
+
+class MacWindowBorder {
+public:
+ MacWindowBorder();
+ ~MacWindowBorder();
+
+ void addActiveBorder(TransparentSurface *source);
+ void addInactiveBorder(TransparentSurface *source);
+ void blitBorderInto(ManagedSurface &destination, bool active);
+
+private:
+
+ NinePatchBitmap *_activeBorder;
+ NinePatchBitmap *_inactiveBorder;
+
+};
+
+} // End of namespace Graphics
+#endif
+