Who said I couldn't break the build?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16827 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2001-2005, Haiku.
|
* Copyright 2001-2006, Haiku.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -21,15 +21,13 @@
|
|||||||
class BCursor;
|
class BCursor;
|
||||||
class BList;
|
class BList;
|
||||||
class BWindow;
|
class BWindow;
|
||||||
class _BSession_;
|
|
||||||
class BResources;
|
class BResources;
|
||||||
class BMessageRunner;
|
class BMessageRunner;
|
||||||
class BServer;
|
class BServer;
|
||||||
struct _server_heap_;
|
|
||||||
struct _drag_data_;
|
|
||||||
|
|
||||||
namespace BPrivate {
|
namespace BPrivate {
|
||||||
class PortLink;
|
class PortLink;
|
||||||
|
class ServerMemoryAllocator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -89,7 +87,7 @@ public:
|
|||||||
virtual status_t GetSupportedSuites(BMessage* data);
|
virtual status_t GetSupportedSuites(BMessage* data);
|
||||||
|
|
||||||
|
|
||||||
// Private or reserved ---------------------------------------------------------
|
// Private or reserved
|
||||||
virtual status_t Perform(perform_code d, void* arg);
|
virtual status_t Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
class Private;
|
class Private;
|
||||||
@@ -98,7 +96,6 @@ private:
|
|||||||
typedef BLooper _inherited;
|
typedef BLooper _inherited;
|
||||||
|
|
||||||
friend class Private;
|
friend class Private;
|
||||||
|
|
||||||
friend class BServer;
|
friend class BServer;
|
||||||
|
|
||||||
BApplication(const char* signature, bool initGUI,
|
BApplication(const char* signature, bool initGUI,
|
||||||
@@ -119,17 +116,14 @@ private:
|
|||||||
virtual bool ScriptReceived(BMessage* msg, int32 index,
|
virtual bool ScriptReceived(BMessage* msg, int32 index,
|
||||||
BMessage* specifier, int32 form,
|
BMessage* specifier, int32 form,
|
||||||
const char* property);
|
const char* property);
|
||||||
void InitData(const char* signature, bool initGUI,
|
void _InitData(const char* signature, bool initGUI,
|
||||||
status_t* error);
|
status_t* error);
|
||||||
void BeginRectTracking(BRect r, bool trackWhole);
|
void BeginRectTracking(BRect r, bool trackWhole);
|
||||||
void EndRectTracking();
|
void EndRectTracking();
|
||||||
status_t setup_server_heaps();
|
status_t _SetupServerAllocator();
|
||||||
void* rw_offs_to_ptr(uint32 offset);
|
|
||||||
void* ro_offs_to_ptr(uint32 offset);
|
|
||||||
void* global_ro_offs_to_ptr(uint32 offset);
|
|
||||||
status_t _InitGUIContext();
|
status_t _InitGUIContext();
|
||||||
status_t connect_to_app_server();
|
status_t _ConnectToServer();
|
||||||
void send_drag( BMessage* msg,
|
/* void send_drag( BMessage* msg,
|
||||||
int32 vs_token,
|
int32 vs_token,
|
||||||
BPoint offset,
|
BPoint offset,
|
||||||
BRect drag_rect,
|
BRect drag_rect,
|
||||||
@@ -141,31 +135,30 @@ private:
|
|||||||
drawing_mode dragMode,
|
drawing_mode dragMode,
|
||||||
BHandler* reply_to);
|
BHandler* reply_to);
|
||||||
void write_drag(_BSession_* session, BMessage* a_message);
|
void write_drag(_BSession_* session, BMessage* a_message);
|
||||||
bool quit_all_windows(bool force);
|
*/ bool _QuitAllWindows(bool force);
|
||||||
bool window_quit_loop(bool, bool);
|
bool _WindowQuitLoop(bool quitFilePanels, bool force);
|
||||||
void do_argv(BMessage* msg);
|
void _ArgvReceived(BMessage* message);
|
||||||
void SetAppCursor();
|
void SetAppCursor();
|
||||||
|
|
||||||
uint32 InitialWorkspace();
|
uint32 InitialWorkspace();
|
||||||
int32 count_windows(bool incl_menus) const;
|
int32 _CountWindows(bool includeMenus) const;
|
||||||
BWindow* window_at(uint32 index, bool incl_menus) const;
|
BWindow* _WindowAt(uint32 index, bool includeMenus) const;
|
||||||
status_t get_window_list(BList* list, bool incl_menus) const;
|
status_t _GetWindowList(BList* list, bool includeMenus) const;
|
||||||
static int32 async_quit_entry(void*);
|
|
||||||
static BResources* sAppResources;
|
static BResources* sAppResources;
|
||||||
static BLocker sAppResourcesLock;
|
static BLocker sAppResourcesLock;
|
||||||
|
|
||||||
const char* fAppName;
|
const char* fAppName;
|
||||||
BPrivate::PortLink* fServerLink;
|
BPrivate::PortLink* fServerLink;
|
||||||
uint32 _unused0;
|
BPrivate::ServerMemoryAllocator* fServerAllocator;
|
||||||
|
|
||||||
void* fCursorData;
|
void* fCursorData;
|
||||||
_server_heap_* fServerHeap;
|
|
||||||
bigtime_t fPulseRate;
|
bigtime_t fPulseRate;
|
||||||
uint32 fInitialWorkspace;
|
uint32 fInitialWorkspace;
|
||||||
_drag_data_* fDraggedMessage;
|
//_drag_data_* fDraggedMessage;
|
||||||
BMessageRunner* fPulseRunner;
|
BMessageRunner* fPulseRunner;
|
||||||
status_t fInitError;
|
status_t fInitError;
|
||||||
uint32 _reserved[11];
|
uint32 _reserved[13];
|
||||||
|
|
||||||
bool fReadyToRunCalled;
|
bool fReadyToRunCalled;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
//------------------------------------------------------------------------------
|
/*
|
||||||
// Copyright (c) 2001-2005, Haiku, Inc.
|
* Copyright 2001-2006, Haiku.
|
||||||
//
|
* Distributed under the terms of the MIT License.
|
||||||
// Distributed under the terms of the MIT license.
|
*
|
||||||
//
|
* Authors:
|
||||||
// File Name: Bitmap.h
|
* Ingo Weinhold ([email protected])
|
||||||
// Author: Ingo Weinhold ([email protected])
|
*/
|
||||||
// Description: BBitmap objects represent off-screen windows that
|
|
||||||
// contain bitmap data.
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#ifndef _BITMAP_H
|
#ifndef _BITMAP_H
|
||||||
#define _BITMAP_H
|
#define _BITMAP_H
|
||||||
|
|
||||||
|
|
||||||
#include <Archivable.h>
|
#include <Archivable.h>
|
||||||
#include <InterfaceDefs.h>
|
#include <InterfaceDefs.h>
|
||||||
#include <Rect.h>
|
#include <Rect.h>
|
||||||
@@ -33,105 +30,97 @@ enum {
|
|||||||
|
|
||||||
#define B_ANY_BYTES_PER_ROW -1
|
#define B_ANY_BYTES_PER_ROW -1
|
||||||
|
|
||||||
//----------------------------------------------------------------//
|
|
||||||
//----- BBitmap class --------------------------------------------//
|
|
||||||
|
|
||||||
class BBitmap : public BArchivable {
|
class BBitmap : public BArchivable {
|
||||||
public:
|
public:
|
||||||
BBitmap(BRect bounds, uint32 flags, color_space colorSpace,
|
BBitmap(BRect bounds, uint32 flags, color_space colorSpace,
|
||||||
int32 bytesPerRow = B_ANY_BYTES_PER_ROW,
|
int32 bytesPerRow = B_ANY_BYTES_PER_ROW,
|
||||||
screen_id screenID = B_MAIN_SCREEN_ID);
|
screen_id screenID = B_MAIN_SCREEN_ID);
|
||||||
BBitmap(BRect bounds, color_space colorSpace, bool acceptsViews = false,
|
BBitmap(BRect bounds, color_space colorSpace, bool acceptsViews = false,
|
||||||
bool needsContiguous = false);
|
bool needsContiguous = false);
|
||||||
BBitmap(const BBitmap *source, bool acceptsViews = false,
|
BBitmap(const BBitmap *source, bool acceptsViews = false,
|
||||||
bool needsContiguous = false);
|
bool needsContiguous = false);
|
||||||
virtual ~BBitmap();
|
virtual ~BBitmap();
|
||||||
|
|
||||||
// Archiving
|
// Archiving
|
||||||
BBitmap(BMessage *data);
|
BBitmap(BMessage *data);
|
||||||
static BArchivable *Instantiate(BMessage *data);
|
static BArchivable *Instantiate(BMessage *data);
|
||||||
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||||
|
|
||||||
status_t InitCheck() const;
|
status_t InitCheck() const;
|
||||||
bool IsValid() const;
|
bool IsValid() const;
|
||||||
|
|
||||||
status_t LockBits(uint32 *state = NULL);
|
status_t LockBits(uint32 *state = NULL);
|
||||||
void UnlockBits();
|
void UnlockBits();
|
||||||
|
|
||||||
area_id Area() const;
|
area_id Area() const;
|
||||||
void *Bits() const;
|
void *Bits() const;
|
||||||
int32 BitsLength() const;
|
int32 BitsLength() const;
|
||||||
int32 BytesPerRow() const;
|
int32 BytesPerRow() const;
|
||||||
color_space ColorSpace() const;
|
color_space ColorSpace() const;
|
||||||
BRect Bounds() const;
|
BRect Bounds() const;
|
||||||
|
|
||||||
void SetBits(const void *data, int32 length, int32 offset,
|
void SetBits(const void *data, int32 length, int32 offset,
|
||||||
color_space colorSpace);
|
color_space colorSpace);
|
||||||
|
|
||||||
// not part of the R5 API
|
// not part of the R5 API
|
||||||
status_t ImportBits(const void *data, int32 length, int32 bpr,
|
status_t ImportBits(const void *data, int32 length, int32 bpr,
|
||||||
int32 offset, color_space colorSpace);
|
int32 offset, color_space colorSpace);
|
||||||
status_t ImportBits(const void *data, int32 length, int32 bpr,
|
status_t ImportBits(const void *data, int32 length, int32 bpr,
|
||||||
color_space colorSpace, BPoint from, BPoint to,
|
color_space colorSpace, BPoint from, BPoint to,
|
||||||
int32 width, int32 height);
|
int32 width, int32 height);
|
||||||
status_t ImportBits(const BBitmap *bitmap);
|
status_t ImportBits(const BBitmap *bitmap);
|
||||||
status_t ImportBits(const BBitmap *bitmap, BPoint from, BPoint to,
|
status_t ImportBits(const BBitmap *bitmap, BPoint from, BPoint to,
|
||||||
int32 width, int32 height);
|
int32 width, int32 height);
|
||||||
|
|
||||||
status_t GetOverlayRestrictions(overlay_restrictions *restrictions) const;
|
status_t GetOverlayRestrictions(overlay_restrictions *restrictions) const;
|
||||||
|
|
||||||
// to mimic a BWindow
|
// to mimic a BWindow
|
||||||
virtual void AddChild(BView *view);
|
virtual void AddChild(BView *view);
|
||||||
virtual bool RemoveChild(BView *view);
|
virtual bool RemoveChild(BView *view);
|
||||||
int32 CountChildren() const;
|
int32 CountChildren() const;
|
||||||
BView *ChildAt(int32 index) const;
|
BView *ChildAt(int32 index) const;
|
||||||
BView *FindView(const char *viewName) const;
|
BView *FindView(const char *viewName) const;
|
||||||
BView *FindView(BPoint point) const;
|
BView *FindView(BPoint point) const;
|
||||||
bool Lock();
|
bool Lock();
|
||||||
void Unlock();
|
void Unlock();
|
||||||
bool IsLocked() const;
|
bool IsLocked() const;
|
||||||
|
|
||||||
//----- Private or reserved -----------------------------------------//
|
//----- Private or reserved -----------------------------------------//
|
||||||
|
|
||||||
virtual status_t Perform(perform_code d, void *arg);
|
virtual status_t Perform(perform_code d, void *arg);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class BView;
|
friend class BView;
|
||||||
friend class BApplication;
|
friend class BApplication;
|
||||||
friend class BPrivateScreen;
|
friend class BPrivateScreen;
|
||||||
//friend void _get_screen_bitmap_(BBitmap *, BRect, bool);
|
|
||||||
|
|
||||||
virtual void _ReservedBitmap1();
|
virtual void _ReservedBitmap1();
|
||||||
virtual void _ReservedBitmap2();
|
virtual void _ReservedBitmap2();
|
||||||
virtual void _ReservedBitmap3();
|
virtual void _ReservedBitmap3();
|
||||||
|
|
||||||
BBitmap(const BBitmap &);
|
BBitmap(const BBitmap &);
|
||||||
BBitmap &operator=(const BBitmap &);
|
BBitmap &operator=(const BBitmap &);
|
||||||
|
|
||||||
char *get_shared_pointer() const;
|
int32 _ServerToken() const;
|
||||||
int32 get_server_token() const;
|
void _InitObject(BRect bounds, color_space colorSpace, uint32 flags,
|
||||||
void InitObject(BRect bounds, color_space colorSpace, uint32 flags,
|
int32 bytesPerRow, screen_id screenID);
|
||||||
int32 bytesPerRow, screen_id screenID);
|
void _CleanUp();
|
||||||
void CleanUp();
|
void _AssertPointer();
|
||||||
|
|
||||||
void AssertPtr();
|
uint8 *fBasePointer;
|
||||||
|
int32 fSize;
|
||||||
void *fBasePtr;
|
color_space fColorSpace;
|
||||||
int32 fSize;
|
BRect fBounds;
|
||||||
color_space fColorSpace;
|
int32 fBytesPerRow;
|
||||||
BRect fBounds;
|
BWindow *fWindow;
|
||||||
int32 fBytesPerRow;
|
int32 fServerToken;
|
||||||
BWindow *fWindow;
|
int32 fAreaOffset;
|
||||||
int32 fServerToken;
|
uint8 unused;
|
||||||
int32 fAreaOffset;
|
area_id fArea;
|
||||||
uint8 unused;
|
area_id fServerArea;
|
||||||
area_id fArea;
|
uint32 fFlags;
|
||||||
area_id fOrigArea;
|
status_t fInitError;
|
||||||
uint32 fFlags;
|
|
||||||
status_t fInitError;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*-------------------------------------------------------------*/
|
|
||||||
/*-------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#endif // _BITMAP_H
|
#endif // _BITMAP_H
|
||||||
|
|||||||
Reference in New Issue
Block a user