From 5fa643150bc9cebf8d28a41b38eff2b1fb22e3a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 13 Nov 2005 13:40:55 +0000 Subject: [PATCH] * no longer needs to define roundf() as it's now part of libroot.so (like on BeOS). * for the libbe_test target, though, I need to declare it, although it's also declared in BeOS' math.h - Ingo?? * removed comment about B_ASYNCHRONOUS_CONTROLS - it's only used by our control classes to behave differently depending on that flag (mouse tracking). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14892 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/View.cpp | 13 +++++-------- src/kits/interface/Window.cpp | 15 ++++----------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index c5a846400b..fde89b3563 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -46,8 +46,13 @@ #include #endif +#include #include +// TODO: I have no idea why this is, but the libbe_test target needs this +#ifdef HAIKU_TARGET_PLATFORM_LIBBE_TEST +extern "C" float roundf(float x); +#endif //#define DEBUG_BVIEW #ifdef DEBUG_BVIEW @@ -65,14 +70,6 @@ #define MAX_ATTACHMENT_SIZE 49152 -static inline float -roundf(float v) -{ - if (v >= 0.0) - return floorf(v + 0.5); - else - return ceilf(v - 0.5); -} static property_info sViewPropInfo[] = { { "Frame", { B_GET_PROPERTY, 0 }, diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index 95567fb2df..c6b3c6d9b6 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -42,6 +42,10 @@ #include #include +// TODO: I have no idea why this is, but the libbe_test target needs this +#ifdef HAIKU_TARGET_PLATFORM_LIBBE_TEST +extern "C" float roundf(float x); +#endif //#define DEBUG_WIN #ifdef DEBUG_WIN @@ -52,16 +56,6 @@ #endif -// TODO: move to some place public (used in View.cpp as well) -static inline float -roundf(float v) -{ - if (v >= 0.0) - return floorf(v + 0.5); - else - return ceilf(v - 0.5); -} - class BWindow::Shortcut { public: Shortcut(uint32 key, uint32 modifiers, BMenuItem* item); @@ -2957,7 +2951,6 @@ BWindow::PrintToStream() const TODO list: *) take care of temporarely events mask!!! - *) what's with this flag B_ASYNCHRONOUS_CONTROLS ? *) test arguments for SetWindowAligment *) call hook functions: MenusBeginning, MenusEnded. Add menu activation code. */