* cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28235 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
cde552bdcb
commit
a02979bb3f
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2001-2007, Haiku.
|
||||
* Copyright 2001-2008, Haiku.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@ -42,14 +42,14 @@ enum window_type {
|
||||
enum window_look {
|
||||
B_BORDERED_WINDOW_LOOK = 20,
|
||||
B_NO_BORDER_WINDOW_LOOK = 19,
|
||||
B_TITLED_WINDOW_LOOK = 1,
|
||||
B_TITLED_WINDOW_LOOK = 1,
|
||||
B_DOCUMENT_WINDOW_LOOK = 11,
|
||||
B_MODAL_WINDOW_LOOK = 3,
|
||||
B_FLOATING_WINDOW_LOOK = 7
|
||||
};
|
||||
|
||||
enum window_feel {
|
||||
B_NORMAL_WINDOW_FEEL = 0,
|
||||
B_NORMAL_WINDOW_FEEL = 0,
|
||||
B_MODAL_SUBSET_WINDOW_FEEL = 2,
|
||||
B_MODAL_APP_WINDOW_FEEL = 1,
|
||||
B_MODAL_ALL_WINDOW_FEEL = 3,
|
||||
@ -92,10 +92,10 @@ enum {
|
||||
|
||||
class BWindow : public BLooper {
|
||||
public:
|
||||
BWindow(BRect frame, const char* title,
|
||||
BWindow(BRect frame, const char* title,
|
||||
window_type type, uint32 flags,
|
||||
uint32 workspace = B_CURRENT_WORKSPACE);
|
||||
BWindow(BRect frame, const char* title,
|
||||
BWindow(BRect frame, const char* title,
|
||||
window_look look, window_feel feel, uint32 flags,
|
||||
uint32 workspace = B_CURRENT_WORKSPACE);
|
||||
virtual ~BWindow();
|
||||
@ -123,7 +123,7 @@ public:
|
||||
virtual void Minimize(bool minimize);
|
||||
virtual void Zoom(BPoint origin, float width, float height);
|
||||
void Zoom();
|
||||
void SetZoomLimits(float maxWidth, float maxHeight);
|
||||
void SetZoomLimits(float maxWidth, float maxHeight);
|
||||
virtual void ScreenChanged(BRect screenSize, color_space format);
|
||||
|
||||
void SetPulseRate(bigtime_t rate);
|
||||
@ -144,7 +144,7 @@ public:
|
||||
bool NeedsUpdate() const;
|
||||
void UpdateIfNeeded();
|
||||
|
||||
BView* FindView(const char* viewName) const;
|
||||
BView* FindView(const char* viewName) const;
|
||||
BView* FindView(BPoint) const;
|
||||
BView* CurrentFocus() const;
|
||||
|
||||
@ -196,7 +196,7 @@ public:
|
||||
|
||||
void SetSizeLimits(float minWidth, float maxWidth,
|
||||
float minHeight, float maxHeight);
|
||||
void GetSizeLimits(float* minWidth, float* maxWidth,
|
||||
void GetSizeLimits(float* minWidth, float* maxWidth,
|
||||
float* minHeight, float* maxHeight);
|
||||
|
||||
status_t SetDecoratorSettings(const BMessage& settings);
|
||||
@ -264,7 +264,7 @@ private:
|
||||
friend class BWindowScreen;
|
||||
friend class BDirectWindow;
|
||||
friend class BFilePanel;
|
||||
|
||||
|
||||
friend void _set_menu_sem_(BWindow* w, sem_id sem);
|
||||
friend status_t _safe_get_server_token_(const BLooper*, int32*);
|
||||
|
||||
@ -337,7 +337,7 @@ private:
|
||||
bool fActive;
|
||||
short fShowLevel;
|
||||
uint32 fFlags;
|
||||
|
||||
|
||||
BView* fTopView;
|
||||
BView* fFocus;
|
||||
BView* fLastMouseMovedView;
|
||||
@ -348,7 +348,7 @@ private:
|
||||
int32 fTopViewToken;
|
||||
bool fUpdateRequested;
|
||||
bool _unused3;
|
||||
bool fIsFilePanel;
|
||||
bool fIsFilePanel;
|
||||
bool _unused4;
|
||||
bigtime_t fPulseRate;
|
||||
bool _unused5;
|
||||
@ -369,8 +369,8 @@ private:
|
||||
BPrivate::PortLink* fLink;
|
||||
BMessageRunner* fPulseRunner;
|
||||
BRect fPreviousFrame;
|
||||
|
||||
|
||||
uint32 _reserved[9];
|
||||
};
|
||||
|
||||
#endif // _WINDOW_H
|
||||
#endif // _WINDOW_H
|
||||
|
@ -200,7 +200,7 @@ BApplication::BApplication(BMessage *data)
|
||||
// constructor here, test if it's needed
|
||||
: BLooper(looper_name_for(NULL))
|
||||
{
|
||||
const char *signature = NULL;
|
||||
const char *signature = NULL;
|
||||
data->FindString("mime_sig", &signature);
|
||||
|
||||
_InitData(signature, true, NULL);
|
||||
@ -456,7 +456,7 @@ BApplication::Instantiate(BMessage *data)
|
||||
if (validate_instantiation(data, "BApplication"))
|
||||
return new BApplication(data);
|
||||
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -495,7 +495,7 @@ BApplication::Run()
|
||||
|
||||
AssertLocked();
|
||||
|
||||
if (fRunCalled)
|
||||
if (fRunCalled)
|
||||
debugger("BApplication::Run was already called. Can only be called once.");
|
||||
|
||||
fThread = find_thread(NULL);
|
||||
@ -746,7 +746,7 @@ BApplication::ResolveSpecifier(BMessage *message, int32 index,
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -874,7 +874,7 @@ BResources *
|
||||
BApplication::AppResources()
|
||||
{
|
||||
AutoLocker<BLocker> lock(sAppResourcesLock);
|
||||
|
||||
|
||||
// BApplication caches its resources, so check
|
||||
// if it already happened.
|
||||
if (sAppResources != NULL)
|
||||
@ -884,7 +884,7 @@ BApplication::AppResources()
|
||||
bool found = false;
|
||||
|
||||
// App is already running. Get its entry ref with
|
||||
// GetAppInfo()
|
||||
// GetAppInfo()
|
||||
app_info appInfo;
|
||||
if (be_app && be_app->GetAppInfo(&appInfo) == B_OK) {
|
||||
ref = appInfo.ref;
|
||||
@ -896,7 +896,7 @@ BApplication::AppResources()
|
||||
|
||||
if (!found)
|
||||
return NULL;
|
||||
|
||||
|
||||
BFile file(&ref, B_READ_ONLY);
|
||||
if (file.InitCheck() == B_OK) {
|
||||
sAppResources = new (std::nothrow) BResources(&file, false);
|
||||
@ -969,7 +969,7 @@ BApplication::DispatchMessage(BMessage *message, BHandler *handler)
|
||||
case B_PULSE:
|
||||
Pulse();
|
||||
break;
|
||||
|
||||
|
||||
case B_APP_ACTIVATED:
|
||||
{
|
||||
bool active = false;
|
||||
@ -977,7 +977,7 @@ BApplication::DispatchMessage(BMessage *message, BHandler *handler)
|
||||
AppActivated(active);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
case _SHOW_DRAG_HANDLES_:
|
||||
{
|
||||
bool show;
|
||||
@ -989,12 +989,12 @@ BApplication::DispatchMessage(BMessage *message, BHandler *handler)
|
||||
}
|
||||
|
||||
// TODO: Handle these as well
|
||||
case _DISPOSE_DRAG_:
|
||||
case _PING_:
|
||||
case _DISPOSE_DRAG_:
|
||||
case _PING_:
|
||||
puts("not yet handled message:");
|
||||
DBG(message->PrintToStream());
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
BLooper::DispatchMessage(message, handler);
|
||||
break;
|
||||
@ -1082,7 +1082,7 @@ BApplication::ScriptReceived(BMessage *message, int32 index,
|
||||
for (int32 i=0; err == B_OK && i<count; i++) {
|
||||
BMessenger messenger(LooperAt(i));
|
||||
err = reply.AddMessenger("result", messenger);
|
||||
}
|
||||
}
|
||||
} else if (strcmp("Windows", property) == 0) {
|
||||
int32 count = CountWindows();
|
||||
err = B_OK;
|
||||
@ -1173,7 +1173,7 @@ BApplication::ScriptReceived(BMessage *message, int32 index,
|
||||
}
|
||||
}
|
||||
} else if (strcmp("Name", property) == 0) {
|
||||
err = reply.AddString("result", Name());
|
||||
err = reply.AddString("result", Name());
|
||||
}
|
||||
break;
|
||||
case B_COUNT_PROPERTIES:
|
||||
@ -1246,7 +1246,7 @@ BApplication::_InitGUIContext()
|
||||
// create global system cursors
|
||||
B_CURSOR_SYSTEM_DEFAULT = new BCursor(B_HAND_CURSOR);
|
||||
B_CURSOR_I_BEAM = new BCursor(B_I_BEAM_CURSOR);
|
||||
|
||||
|
||||
// TODO: would be nice to get the workspace at launch time from the registrar
|
||||
fInitialWorkspace = current_workspace();
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2001-2007, Haiku Inc.
|
||||
* Copyright 2001-2008, Haiku Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@ -323,7 +323,7 @@ BBitmap::Instantiate(BMessage *data)
|
||||
{
|
||||
if (validate_instantiation(data, "BBitmap"))
|
||||
return new BBitmap(data);
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -350,7 +350,7 @@ BBitmap::Archive(BMessage *data, bool deep) const
|
||||
|
||||
if (ret == B_OK)
|
||||
ret = data->AddInt32("_rowbytes", fBytesPerRow);
|
||||
|
||||
|
||||
if (ret == B_OK && deep) {
|
||||
if (fFlags & B_BITMAP_ACCEPTS_VIEWS) {
|
||||
BMessage views;
|
||||
@ -470,7 +470,7 @@ void *
|
||||
BBitmap::Bits() const
|
||||
{
|
||||
const_cast<BBitmap *>(this)->_AssertPointer();
|
||||
|
||||
|
||||
if (fFlags & B_BITMAP_WILL_OVERLAY) {
|
||||
overlay_client_data* data = (overlay_client_data*)fBasePointer;
|
||||
return data->buffer;
|
||||
@ -996,7 +996,7 @@ BBitmap::_InitObject(BRect bounds, color_space colorSpace, uint32 flags,
|
||||
// Ask the server (via our owning application) to create a bitmap.
|
||||
BPrivate::AppServerLink link;
|
||||
|
||||
// Attach Data:
|
||||
// Attach Data:
|
||||
// 1) BRect bounds
|
||||
// 2) color_space space
|
||||
// 3) int32 bitmap_flags
|
||||
@ -1077,7 +1077,7 @@ BBitmap::_InitObject(BRect bounds, color_space colorSpace, uint32 flags,
|
||||
// TODO: Creating an offscreen window with a non32 bit bitmap
|
||||
// copies the current content of the bitmap to a back buffer.
|
||||
// So at this point the bitmap has to be already cleared to white.
|
||||
// Better move the above code to the server so the problem looks more clear.
|
||||
// Better move the above code to the server so the problem looks more clear.
|
||||
if (flags & B_BITMAP_ACCEPTS_VIEWS) {
|
||||
fWindow = new(std::nothrow) BWindow(Bounds(), fServerToken);
|
||||
if (fWindow) {
|
||||
@ -1107,7 +1107,7 @@ BBitmap::_CleanUp()
|
||||
} else {
|
||||
BPrivate::AppServerLink link;
|
||||
// AS_DELETE_BITMAP:
|
||||
// Attached Data:
|
||||
// Attached Data:
|
||||
// 1) int32 server token
|
||||
link.StartMessage(AS_DELETE_BITMAP);
|
||||
link.Attach<int32>(fServerToken);
|
||||
|
Loading…
Reference in New Issue
Block a user