* Put the decor stuff in the BPrivate namespace, as it should have been from
the beginning. * Added header for the get_decorator() functions and friends. * Minor coding style cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41638 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d96a7d591e
commit
c329950ca7
@ -4,17 +4,20 @@
|
||||
* Author:
|
||||
* Joseph "looncraz" Groover <looncraz@satx.rr.com>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DECOR_INFO_H
|
||||
#define DECOR_INFO_H
|
||||
|
||||
|
||||
#include <Entry.h>
|
||||
#include <Bitmap.h>
|
||||
#include <String.h>
|
||||
#include <Locker.h>
|
||||
#include <ObjectList.h>
|
||||
#include <String.h>
|
||||
|
||||
|
||||
class BWindow;
|
||||
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
|
||||
// NOTE: DecorInfo itself is not thread-safe
|
||||
@ -78,7 +81,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class DecorInfoUtility{
|
||||
class DecorInfoUtility {
|
||||
public:
|
||||
DecorInfoUtility(bool scanNow = true);
|
||||
// NOTE: When scanNow is passed false,
|
||||
@ -108,9 +111,9 @@ public:
|
||||
DecorInfo* CurrentDecorator();
|
||||
DecorInfo* DefaultDecorator();
|
||||
|
||||
bool IsCurrentDecorator(DecorInfo*);
|
||||
bool IsCurrentDecorator(DecorInfo* decor);
|
||||
|
||||
status_t SetDecorator(DecorInfo*);
|
||||
status_t SetDecorator(DecorInfo* decor);
|
||||
status_t SetDecorator(int32);
|
||||
|
||||
status_t Preview(DecorInfo* decor, BWindow* window);
|
||||
@ -119,11 +122,17 @@ private:
|
||||
DecorInfo* _FindDecor(const BString& path);
|
||||
|
||||
private:
|
||||
BObjectList<DecorInfo> fList;
|
||||
BLocker fLock;
|
||||
bool fHasScanned;
|
||||
|
||||
BObjectList<DecorInfo> fList;
|
||||
BLocker fLock;
|
||||
bool fHasScanned;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
} // namespace BPrivate
|
||||
|
||||
|
||||
using BPrivate::DecorInfo;
|
||||
using BPrivate::DecorInfoUtility;
|
||||
|
||||
|
||||
#endif // DECOR_INFO_H
|
||||
|
27
headers/private/interface/DecoratorPrivate.h
Normal file
27
headers/private/interface/DecoratorPrivate.h
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2011, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef DECORATOR_PRIVATE_H
|
||||
#define DECORATOR_PRIVATE_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
class BString;
|
||||
class BWindow;
|
||||
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
|
||||
bool get_decorator(BString& name);
|
||||
status_t set_decorator(const BString& name);
|
||||
status_t preview_decorator(const BString& name, BWindow* window);
|
||||
|
||||
|
||||
} // namespace BPrivate
|
||||
|
||||
|
||||
#endif // DECORATOR_PRIVATE_H
|
@ -17,6 +17,11 @@
|
||||
#include <Path.h>
|
||||
#include <Resources.h>
|
||||
|
||||
#include <DecoratorPrivate.h>
|
||||
|
||||
|
||||
namespace BPrivate {
|
||||
|
||||
|
||||
DecorInfo::DecorInfo()
|
||||
:
|
||||
@ -338,16 +343,6 @@ DecorInfo::_Init(bool isUpdate)
|
||||
// #pragma mark - DecorInfoUtility
|
||||
|
||||
|
||||
namespace BPrivate {
|
||||
// kits/interface/InterfaceDefs.cpp
|
||||
bool get_decorator(BString&);
|
||||
status_t set_decorator(const BString&);
|
||||
status_t preview_decorator(const BString&, BWindow*);
|
||||
};
|
||||
|
||||
using namespace BPrivate;
|
||||
|
||||
|
||||
DecorInfoUtility::DecorInfoUtility(bool scanNow)
|
||||
:
|
||||
fHasScanned(false)
|
||||
@ -589,3 +584,6 @@ DecorInfoUtility::_FindDecor(const BString& pathString)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
} // namespace BPrivate
|
||||
|
Loading…
Reference in New Issue
Block a user