[aseprite] 72/128: Remove src/pen directory
Tobias Hansen
thansen at moszumanska.debian.org
Mon May 9 21:24:25 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit 0c9fb6b22b2edda1ceb9d3fee20ecd037f5da4d2
Author: David Capello <davidcapello at gmail.com>
Date: Wed Apr 27 12:47:55 2016 -0300
Remove src/pen directory
It's not required anymore after 1c94dda072ffb23ffa0d22652c26300df663f081
---
src/README.md | 3 +--
src/pen/CMakeLists.txt | 8 ------
src/pen/pen.cpp | 31 -----------------------
src/pen/pen.h | 25 -------------------
src/pen/pen_none.h | 15 -----------
src/pen/pen_win.h | 68 --------------------------------------------------
6 files changed, 1 insertion(+), 149 deletions(-)
diff --git a/src/README.md b/src/README.md
index 8c503a7..6106cdc 100644
--- a/src/README.md
+++ b/src/README.md
@@ -29,13 +29,12 @@ because they don't depend on any other component.
* [gen](gen/) (base): Helper utility to generate C++ files from different XMLs.
* [gfx](gfx/) (fixmath): Abstract graphics structures like point, size, rectangle, region, color, etc.
* [net](net/) (base): Networking library to send HTTP requests.
- * [pen](pen/) (base, wacom): Library to handle graphics tablet input.
* [webserver](webserver/) (base): HTTP web server
## Level 2
* [doc](doc/) (base, fixmath, gfx): Document model library.
- * [she](she/) (allegro, base, gfx): A wrapper for the Allegro library.
+ * [she](she/) (allegro, base, gfx, wacom): A wrapper for the Allegro library.
## Level 3
diff --git a/src/pen/CMakeLists.txt b/src/pen/CMakeLists.txt
deleted file mode 100644
index 52e21c9..0000000
--- a/src/pen/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-# Aseprite Pen Library
-# Copyright (C) 2016 David Capello
-
-add_library(pen-lib
- pen.cpp)
-
-target_link_libraries(pen-lib
- base-lib)
diff --git a/src/pen/pen.cpp b/src/pen/pen.cpp
deleted file mode 100644
index 21148a0..0000000
--- a/src/pen/pen.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// Aseprite Pen Library
-// Copyright (c) 2016 David Capello
-//
-// This file is released under the terms of the MIT license.
-// Read LICENSE.txt for more information.
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pen/pen.h"
-
-#ifdef _WIN32
- #include "pen/pen_win.h"
-#else
- #include "pen/pen_none.h"
-#endif
-
-namespace pen {
-
-PenAPI::PenAPI(void* nativeDisplayHandle)
- : m_impl(new Impl(nativeDisplayHandle))
-{
-}
-
-PenAPI::~PenAPI()
-{
- delete m_impl;
-}
-
-} // namespace pen
diff --git a/src/pen/pen.h b/src/pen/pen.h
deleted file mode 100644
index 1308de5..0000000
--- a/src/pen/pen.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Aseprite Pen Library
-// Copyright (c) 2016 David Capello
-//
-// This file is released under the terms of the MIT license.
-// Read LICENSE.txt for more information.
-
-#ifndef PEN_PEN_H_INCLUDED
-#define PEN_PEN_H_INCLUDED
-#pragma once
-
-namespace pen {
-
-class PenAPI {
-public:
- PenAPI(void* nativeDisplayHandle);
- ~PenAPI();
-
-private:
- class Impl;
- Impl* m_impl;
-};
-
-} // namespace pen
-
-#endif
diff --git a/src/pen/pen_none.h b/src/pen/pen_none.h
deleted file mode 100644
index 5d23c66..0000000
--- a/src/pen/pen_none.h
+++ /dev/null
@@ -1,15 +0,0 @@
-// Aseprite Pen Library
-// Copyright (c) 2016 David Capello
-//
-// This file is released under the terms of the MIT license.
-// Read LICENSE.txt for more information.
-
-namespace pen {
-
-class PenAPI::Impl {
-public:
- Impl(void*) { }
- ~Impl() { }
-};
-
-} // namespace pen
diff --git a/src/pen/pen_win.h b/src/pen/pen_win.h
deleted file mode 100644
index 5314046..0000000
--- a/src/pen/pen_win.h
+++ /dev/null
@@ -1,68 +0,0 @@
-// Aseprite Pen Library
-// Copyright (c) 2016 David Capello
-//
-// This file is released under the terms of the MIT license.
-// Read LICENSE.txt for more information.
-
-#include "base/debug.h"
-#include "base/dll.h"
-#include "base/fs.h"
-#include "base/log.h"
-#include "base/path.h"
-#include "base/string.h"
-
-#include <windows.h>
-#include "wacom/wintab.h"
-
-typedef UINT (API* WTInfoW_Func)(UINT, UINT, LPVOID);
-typedef HCTX (API* WTOpenW_Func)(HWND, LPLOGCONTEXTW, BOOL);
-typedef BOOL (API* WTClose_Func)(HCTX);
-
-class pen::PenAPI::Impl {
-public:
- Impl(void* nativeDisplayHandle) : m_ctx(nullptr) {
- m_wintabLib = base::load_dll("wintab32.dll");
- if (!m_wintabLib)
- return;
-
- auto WTInfoW = base::get_dll_proc<WTInfoW_Func>(m_wintabLib, "WTInfoW");
- auto WTOpenW = base::get_dll_proc<WTOpenW_Func>(m_wintabLib, "WTOpenW");
- if (!WTInfoW || !WTOpenW)
- return;
-
- LOGCONTEXTW logctx;
- memset(&logctx, 0, sizeof(LOGCONTEXTW));
- logctx.lcOptions |= CXO_SYSTEM;
- UINT infoRes = WTInfoW(WTI_DEFSYSCTX, 0, &logctx);
- ASSERT(infoRes == sizeof(LOGCONTEXTW));
- ASSERT(logctx.lcOptions & CXO_SYSTEM);
-
- logctx.lcOptions |= CXO_SYSTEM;
- m_ctx = WTOpenW((HWND)nativeDisplayHandle, &logctx, TRUE);
- if (!m_ctx) {
- LOG("Pen library is not initialized...\n");
- return;
- }
-
- LOG("Pen initialized...\n");
- }
-
- ~Impl() {
- if (!m_wintabLib)
- return;
-
- if (m_ctx) {
- auto WTClose = base::get_dll_proc<WTClose_Func>(m_wintabLib, "WTClose");
- if (WTClose) {
- LOG("Pen shutdown...\n");
- WTClose(m_ctx);
- }
- }
-
- base::unload_dll(m_wintabLib);
- }
-
-private:
- base::dll m_wintabLib;
- HCTX m_ctx;
-};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list