New files from Baldur and BiPolar
This commit is contained in:
@@ -188,6 +188,7 @@ BeMain libbepascal.so : src/be/bepas_kernel/beobj.cpp
|
||||
src/be/device/SerialPort.cpp
|
||||
src/be/interface/Alert.cpp
|
||||
src/be/interface/Box.cpp
|
||||
src/be/interface/Bitmap.cpp
|
||||
src/be/interface/Button.cpp
|
||||
src/be/interface/CheckBox.cpp
|
||||
src/be/interface/Control.cpp
|
||||
@@ -198,9 +199,13 @@ BeMain libbepascal.so : src/be/bepas_kernel/beobj.cpp
|
||||
src/be/interface/MenuBar.cpp
|
||||
src/be/interface/MenuItem.cpp
|
||||
src/be/interface/OutlineListView.cpp
|
||||
src/be/interface/Picture.cpp
|
||||
src/be/interface/Point.cpp
|
||||
src/be/interface/Polygon.cpp
|
||||
src/be/interface/Rect.cpp
|
||||
src/be/interface/Region.cpp
|
||||
src/be/interface/RadioButton.cpp
|
||||
src/be/interface/Screen.cpp
|
||||
src/be/interface/ScrollBar.cpp
|
||||
src/be/interface/ScrollView.cpp
|
||||
src/be/interface/StatusBar.cpp
|
||||
|
||||
809
bepascal/source/bepascal/cpp/src/be/interface/Bitmap.cpp
Normal file
809
bepascal/source/bepascal/cpp/src/be/interface/Bitmap.cpp
Normal file
@@ -0,0 +1,809 @@
|
||||
/* BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2003 Olivier Coursiere
|
||||
Eric Jourde
|
||||
Oscar Lesta
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _BITMAP_CPP
|
||||
#define _BITMAP_CPP
|
||||
|
||||
#include "Bitmap.h"
|
||||
|
||||
#include "view.h"
|
||||
#include <archivable.h>
|
||||
#include <beobj.h>
|
||||
|
||||
/*----------------------------------------------------------------*/
|
||||
/*----- BBitmap class --------------------------------------------*/
|
||||
class BPBitmap : public BBitmap, public BPArchivable
|
||||
{
|
||||
public:
|
||||
BPBitmap(TPasObject PasObject,
|
||||
BRect bounds,
|
||||
uint32 flags,
|
||||
color_space depth,
|
||||
int32 bytesPerRow=B_ANY_BYTES_PER_ROW,
|
||||
screen_id screenID=B_MAIN_SCREEN_ID);
|
||||
BPBitmap(TPasObject PasObject,
|
||||
BRect bounds,
|
||||
color_space depth,
|
||||
bool accepts_views = false,
|
||||
bool need_contiguous = false);
|
||||
BPBitmap(TPasObject PasObject,
|
||||
const BBitmap* source,
|
||||
bool accepts_views = false,
|
||||
bool need_contiguous = false);
|
||||
BPBitmap(TPasObject PasObject, BMessage *data);
|
||||
|
||||
//virtual ~BBitmap();
|
||||
|
||||
/* Archiving */
|
||||
static BArchivable *Instantiate(BMessage *data);
|
||||
//virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||
|
||||
status_t InitCheck() const;
|
||||
bool IsValid() const;
|
||||
|
||||
status_t LockBits(uint32 *state=NULL);
|
||||
void UnlockBits();
|
||||
|
||||
area_id Area() const;
|
||||
void * Bits() const;
|
||||
int32 BitsLength() const;
|
||||
int32 BytesPerRow() const;
|
||||
color_space ColorSpace() const;
|
||||
BRect Bounds() const;
|
||||
|
||||
void SetBits(const void *data,
|
||||
int32 length,
|
||||
int32 offset,
|
||||
color_space cs);
|
||||
|
||||
status_t GetOverlayRestrictions(overlay_restrictions *restrict) const;
|
||||
|
||||
/* to mimic a BWindow */
|
||||
virtual void AddChild(BView *view);
|
||||
virtual bool RemoveChild(BView *view);
|
||||
int32 CountChildren() const;
|
||||
BView *ChildAt(int32 index) const;
|
||||
BView *FindView(const char *view_name) const;
|
||||
BView *FindView(BPoint point) const;
|
||||
bool Lock();
|
||||
void Unlock();
|
||||
bool IsLocked() const;
|
||||
|
||||
virtual status_t Perform(perform_code d, void *arg);
|
||||
|
||||
/*----- Private or reserved -----------------------------------------*/
|
||||
private:
|
||||
/*
|
||||
friend class BView;
|
||||
friend class BApplication;
|
||||
friend void _IMPEXP_BE _get_screen_bitmap_(BBitmap *,BRect,bool);
|
||||
|
||||
virtual void _ReservedBitmap1();
|
||||
virtual void _ReservedBitmap2();
|
||||
virtual void _ReservedBitmap3();
|
||||
|
||||
BBitmap(const BBitmap &);
|
||||
BBitmap &operator=(const BBitmap &);
|
||||
|
||||
char *get_shared_pointer() const;
|
||||
void set_bits(long offset, char *data, long length);
|
||||
void set_bits_24(long offset, char *data, long length);
|
||||
void set_bits_24_local_gray(long offset, char *data, long len);
|
||||
void set_bits_24_local_256(long offset, uchar *data, long len);
|
||||
void set_bits_24_24(long offset, char *data, long length,
|
||||
bool big_endian_dst);
|
||||
void set_bits_8_24(long offset, char *data, long length,
|
||||
bool big_endian_dst);
|
||||
void set_bits_gray_24(long offset, char *data, long length,
|
||||
bool big_endian_dst);
|
||||
int32 get_server_token() const;
|
||||
void InitObject( BRect frame, color_space depth,
|
||||
uint32 flags, int32 bytesPerRow, screen_id screenID);
|
||||
void AssertPtr();
|
||||
|
||||
void *fBasePtr;
|
||||
int32 fSize;
|
||||
color_space fType;
|
||||
BRect fBound;
|
||||
int32 fRowBytes;
|
||||
BWindow *fWindow;
|
||||
int32 fServerToken;
|
||||
int32 fToken;
|
||||
uint8 unused;
|
||||
area_id fArea;
|
||||
area_id fOrigArea;
|
||||
uint32 fFlags;
|
||||
status_t fInitError;
|
||||
*/
|
||||
};
|
||||
/*-------------------------------------------------------------*/
|
||||
/*-------------------------------------------------------------*/
|
||||
|
||||
BPBitmap::BPBitmap(TPasObject PasObject,
|
||||
BRect bounds,
|
||||
uint32 flags,
|
||||
color_space depth,
|
||||
int32 bytesPerRow = B_ANY_BYTES_PER_ROW,
|
||||
screen_id screenID = B_MAIN_SCREEN_ID)
|
||||
: BBitmap(bounds, flags, depth, bytesPerRow, screenID),
|
||||
BPArchivable(PasObject)//,
|
||||
// BPasObject(PasObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BPBitmap::BPBitmap(TPasObject PasObject,
|
||||
BRect bounds,
|
||||
color_space depth,
|
||||
bool accepts_views = false,
|
||||
bool need_contiguous = false)
|
||||
: BBitmap(bounds, depth, accepts_views, need_contiguous),
|
||||
BPArchivable(PasObject)//,
|
||||
// BPasObject(PasObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BPBitmap::BPBitmap(TPasObject PasObject,
|
||||
const BBitmap* source,
|
||||
bool accepts_views = false,
|
||||
bool need_contiguous = false)
|
||||
: BBitmap(source, accepts_views, need_contiguous),
|
||||
BPArchivable(PasObject)//,
|
||||
// BPasObject(PasObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
BPBitmap::BPBitmap(TPasObject PasObject, BMessage *data)
|
||||
: BBitmap(data),
|
||||
BPArchivable(PasObject)//,
|
||||
// BPasObject(PasObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
status_t
|
||||
BPBitmap::InitCheck(void) const
|
||||
{
|
||||
return BBitmap::InitCheck();
|
||||
}
|
||||
|
||||
bool
|
||||
BPBitmap::IsValid(void) const
|
||||
{
|
||||
return BBitmap::IsValid();
|
||||
}
|
||||
|
||||
status_t
|
||||
BPBitmap::LockBits(uint32 *state=NULL)
|
||||
{
|
||||
return BBitmap::LockBits(state);
|
||||
}
|
||||
|
||||
void
|
||||
BPBitmap::UnlockBits(void)
|
||||
{
|
||||
BBitmap::UnlockBits();
|
||||
}
|
||||
|
||||
area_id
|
||||
BPBitmap::Area(void) const
|
||||
{
|
||||
return BBitmap::Area();
|
||||
}
|
||||
|
||||
void *
|
||||
BPBitmap::Bits(void) const
|
||||
{
|
||||
return BBitmap::Bits();
|
||||
}
|
||||
|
||||
int32
|
||||
BPBitmap::BitsLength(void) const
|
||||
{
|
||||
return BBitmap::BitsLength();
|
||||
}
|
||||
|
||||
int32
|
||||
BPBitmap::BytesPerRow(void) const
|
||||
{
|
||||
return BBitmap::BytesPerRow();
|
||||
}
|
||||
|
||||
color_space
|
||||
BPBitmap::ColorSpace(void) const
|
||||
{
|
||||
return BBitmap::ColorSpace();
|
||||
}
|
||||
|
||||
BRect
|
||||
BPBitmap::Bounds(void) const
|
||||
{
|
||||
return BBitmap::Bounds();
|
||||
}
|
||||
|
||||
void
|
||||
BPBitmap::SetBits(const void *data, int32 length, int32 offset, color_space cs)
|
||||
{
|
||||
BBitmap::SetBits(data, length, offset, cs);
|
||||
}
|
||||
|
||||
status_t
|
||||
BPBitmap::GetOverlayRestrictions(overlay_restrictions *restrict) const
|
||||
{
|
||||
return BBitmap::GetOverlayRestrictions(restrict);
|
||||
}
|
||||
|
||||
void
|
||||
BPBitmap::AddChild(BView *view)
|
||||
{
|
||||
BBitmap::AddChild(view);
|
||||
}
|
||||
|
||||
bool
|
||||
BPBitmap::RemoveChild(BView *view)
|
||||
{
|
||||
BBitmap::RemoveChild(view);
|
||||
}
|
||||
|
||||
int32
|
||||
BPBitmap::CountChildren(void) const
|
||||
{
|
||||
return BBitmap::CountChildren();
|
||||
}
|
||||
|
||||
bool
|
||||
BPBitmap::Lock(void)
|
||||
{
|
||||
return BBitmap::Lock();
|
||||
}
|
||||
|
||||
void
|
||||
BPBitmap::Unlock(void)
|
||||
{
|
||||
BBitmap::Unlock();
|
||||
}
|
||||
|
||||
bool
|
||||
BPBitmap::IsLocked(void) const
|
||||
{
|
||||
return BBitmap::IsLocked();
|
||||
}
|
||||
|
||||
status_t
|
||||
BPBitmap::Perform(perform_code d, void *arg)
|
||||
{
|
||||
return BBitmap::Perform(d, arg);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Method: BBitmap::BBitmap
|
||||
* Descr:
|
||||
*/
|
||||
TCPlusObject BBitmap_Create(TPasObject PasObject, BRect bounds, uint32 flags, color_space depth, int32 bytesPerRow, screen_id screenID)
|
||||
{
|
||||
return new BPBitmap(PasObject, bounds, flags, depth, bytesPerRow, screenID);
|
||||
}
|
||||
|
||||
/*
|
||||
* Method: BBitmap::BBitmap
|
||||
* Descr:
|
||||
*/
|
||||
TCPlusObject BBitmap_Create_1
|
||||
(TPasObject PasObject, BRect bounds, color_space depth, bool accepts_views, bool need_contiguous)
|
||||
{
|
||||
return new BPBitmap(PasObject, bounds, depth, accepts_views, need_contiguous);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::BBitmap
|
||||
* Descr:
|
||||
*/
|
||||
TCPlusObject BBitmap_Create_2
|
||||
(TPasObject PasObject, const BBitmap *source, bool accepts_views, bool need_contiguous)
|
||||
{
|
||||
return new BPBitmap(PasObject, source, accepts_views, need_contiguous);
|
||||
}
|
||||
|
||||
|
||||
/* BBitmap(BMessage *data);
|
||||
* Method: BBitmap::BBitmap
|
||||
* Descr:
|
||||
*/
|
||||
TCPlusObject BBitmap_Create_3(TPasObject PasObject, BMessage *data)
|
||||
{
|
||||
return new BPBitmap(PasObject, data);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::~BBitmap
|
||||
* Descr:
|
||||
*/
|
||||
void BBitmap_Free(BBitmap *Bitmap)
|
||||
{
|
||||
delete Bitmap;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::Instantiate
|
||||
* Descr:
|
||||
*/
|
||||
BArchivable *
|
||||
BBitmap_Instantiate(BBitmap *Bitmap, BMessage *data)
|
||||
{
|
||||
return Bitmap->Instantiate(data);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::Archive
|
||||
* Descr:
|
||||
*/
|
||||
status_t
|
||||
BBitmap_Archive(BBitmap *Bitmap, BMessage *data, bool deep)
|
||||
{
|
||||
return Bitmap->Archive(data, deep);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::InitCheck
|
||||
* Descr:
|
||||
*/
|
||||
status_t
|
||||
BBitmap_InitCheck(BBitmap *Bitmap)
|
||||
{
|
||||
return Bitmap->InitCheck();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::IsValid
|
||||
* Descr:
|
||||
*/
|
||||
bool
|
||||
BBitmap_IsValid(BBitmap *Bitmap)
|
||||
{
|
||||
return Bitmap->IsValid();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::LockBits
|
||||
* Descr:
|
||||
*/
|
||||
status_t
|
||||
BBitmap_LockBits(BBitmap *Bitmap, uint32 *state)
|
||||
{
|
||||
return Bitmap->LockBits(state);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::UnlockBits
|
||||
* Descr:
|
||||
*/
|
||||
void
|
||||
BBitmap_UnlockBits(BBitmap *Bitmap)
|
||||
{
|
||||
Bitmap->UnlockBits();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::Area
|
||||
* Descr:
|
||||
*/
|
||||
area_id
|
||||
BBitmap_Area(BBitmap *Bitmap)
|
||||
{
|
||||
return Bitmap->Area();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::Bits
|
||||
* Descr:
|
||||
*/
|
||||
void *
|
||||
BBitmap_Bits(BBitmap *Bitmap)
|
||||
{
|
||||
Bitmap->Bits();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::BitsLength
|
||||
* Descr:
|
||||
*/
|
||||
int32
|
||||
BBitmap_BitsLength_1
|
||||
(BBitmap *Bitmap)
|
||||
{
|
||||
return Bitmap->BitsLength();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::BytesPerRow
|
||||
* Descr:
|
||||
*/
|
||||
int32
|
||||
BBitmap_BytesPerRow(BBitmap *Bitmap)
|
||||
{
|
||||
return Bitmap->BytesPerRow();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::ColorSpace
|
||||
* Descr:
|
||||
*/
|
||||
color_space
|
||||
BBitmap_ColorSpace(BBitmap *Bitmap)
|
||||
{
|
||||
return Bitmap->ColorSpace();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::Bounds
|
||||
* Descr:
|
||||
*/
|
||||
BRect
|
||||
BBitmap_Bounds(BBitmap *Bitmap)
|
||||
{
|
||||
return Bitmap->Bounds();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::SetBits
|
||||
* Descr:
|
||||
*/
|
||||
void
|
||||
BBitmap_SetBits(BBitmap *Bitmap, const void *data, int32 length, int32 offset, color_space cs)
|
||||
{
|
||||
Bitmap->SetBits(data, length, offset, cs);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::GetOverlayRestrictions
|
||||
* Descr:
|
||||
*/
|
||||
status_t
|
||||
BBitmap_GetOverlayRestrictions(BBitmap *Bitmap, overlay_restrictions *restrict)
|
||||
{
|
||||
return Bitmap->GetOverlayRestrictions(restrict);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::AddChild
|
||||
* Descr:
|
||||
*/
|
||||
void
|
||||
BBitmap_AddChild(BBitmap *Bitmap, BView *view)
|
||||
{
|
||||
Bitmap->AddChild(view);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::RemoveChild
|
||||
* Descr:
|
||||
*/
|
||||
bool
|
||||
BBitmap_RemoveChild(BBitmap *Bitmap, BView *view)
|
||||
{
|
||||
return Bitmap->RemoveChild(view);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::CountChildren
|
||||
* Descr:
|
||||
*/
|
||||
int32
|
||||
BBitmap_CountChildren(BBitmap *Bitmap)
|
||||
{
|
||||
return Bitmap->CountChildren();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::ChildAt
|
||||
* Descr:
|
||||
*/
|
||||
BView *
|
||||
BBitmap_ChildAt(BBitmap *Bitmap, int32 index)
|
||||
{
|
||||
return Bitmap->ChildAt(index);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::FindView
|
||||
* Descr:
|
||||
*/
|
||||
BView *
|
||||
BBitmap_FindView(BBitmap *Bitmap, const char *view_name)
|
||||
{
|
||||
return Bitmap->FindView(view_name);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::FindView
|
||||
* Descr:
|
||||
*/
|
||||
BView *
|
||||
BBitmap_FindView_1
|
||||
(BBitmap *Bitmap, BPoint point)
|
||||
{
|
||||
return Bitmap->FindView(point);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::Lock
|
||||
* Descr:
|
||||
*/
|
||||
bool
|
||||
BBitmap_Lock(BBitmap *Bitmap)
|
||||
{
|
||||
return Bitmap->Lock();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::Unlock
|
||||
* Descr:
|
||||
*/
|
||||
|
||||
void
|
||||
BBitmap_Unlock(BBitmap *Bitmap)
|
||||
{
|
||||
Bitmap->Unlock();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::IsLocked
|
||||
* Descr:
|
||||
*/
|
||||
|
||||
bool
|
||||
BBitmap_IsLocked(BBitmap *Bitmap)
|
||||
{
|
||||
return Bitmap->IsLocked();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::Perform
|
||||
* Descr:
|
||||
*/
|
||||
|
||||
status_t
|
||||
BBitmap_Perform(BBitmap *Bitmap, perform_code d, void *arg)
|
||||
{
|
||||
return Bitmap->Perform(d, arg);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Method: BBitmap::_ReservedBitmap1
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
void
|
||||
BBitmap__ReservedBitmap1(BBitmap *Bitmap)
|
||||
{
|
||||
Bitmap->_ReservedBitmap1();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::_ReservedBitmap2
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
void
|
||||
BBitmap__ReservedBitmap2(BBitmap *Bitmap)
|
||||
{
|
||||
Bitmap->_ReservedBitmap2();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::_ReservedBitmap3
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
void
|
||||
BBitmap__ReservedBitmap3(BBitmap *Bitmap)
|
||||
{
|
||||
Bitmap->_ReservedBitmap3();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::operator=
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
BBitmap &
|
||||
BBitmap_operator=(BBitmap *Bitmap, const BBitmap &)
|
||||
{
|
||||
return Bitmap->operator=();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::get_shared_pointer
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
char *
|
||||
BBitmap_get_shared_pointer(BBitmap *Bitmap) const
|
||||
{
|
||||
return Bitmap->get_shared_pointer();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::set_bits
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
void
|
||||
BBitmap_set_bits(BBitmap *Bitmap, long offset, char *data, long length)
|
||||
{
|
||||
Bitmap->set_bits(offset, data, length);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::set_bits_24
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
void
|
||||
BBitmap_set_bits_24_1
|
||||
(BBitmap *Bitmap, long offset, char *data, long length)
|
||||
{
|
||||
Bitmap->set_bits_24(offset, data, length);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::set_bits_24_local_gray
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
void
|
||||
BBitmap_set_bits_24_local_gray_2
|
||||
(BBitmap *Bitmap, long offset, char *data, long len)
|
||||
{
|
||||
Bitmap->set_bits_24_local_gray(offset, data, len);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::set_bits_24_local_256
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
void
|
||||
BBitmap_set_bits_24_local_256(BBitmap *Bitmap, long offset, uchar *data, long len)
|
||||
{
|
||||
Bitmap->set_bits_24_local_256(offset, data, len);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::set_bits_24_24
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
void
|
||||
BBitmap_set_bits_24_24(BBitmap *Bitmap, long offset, char *data, long length, bool big_endian_dst)
|
||||
{
|
||||
Bitmap->set_bits_24_24(offset, data, length, big_endian_dst);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::set_bits_8_24
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
void
|
||||
BBitmap_set_bits_8_24(BBitmap *Bitmap, long offset, char *data, long length, bool big_endian_dst)
|
||||
{
|
||||
Bitmap->set_bits_8_24(offset, data, length, big_endian_dst);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::set_bits_gray_24
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
void
|
||||
BBitmap_set_bits_gray_24(BBitmap *Bitmap, long offset, char *data, long length, bool big_endian_dst)
|
||||
{
|
||||
Bitmap->set_bits_gray_24(offset, data, length, big_endian_dst);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::get_server_token
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
int32
|
||||
BBitmap_get_server_token(BBitmap *Bitmap) const
|
||||
{
|
||||
return Bitmap->get_server_token();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::InitObject
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
void
|
||||
BBitmap_InitObject(BBitmap *Bitmap, BRect frame, color_space depth, uint32 flags, int32 bytesPerRow, screen_id screenID)
|
||||
{
|
||||
Bitmap->InitObject(frame, depth, flags, bytesPerRow, screenID);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Method: BBitmap::AssertPtr
|
||||
* Descr:
|
||||
*/
|
||||
/*
|
||||
void
|
||||
BBitmap_AssertPtr(BBitmap *Bitmap)
|
||||
{
|
||||
Bitmap->AssertPtr();
|
||||
}
|
||||
*/
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _BITMAP_H */
|
||||
197
bepascal/source/bepascal/cpp/src/be/interface/Picture.cpp
Normal file
197
bepascal/source/bepascal/cpp/src/be/interface/Picture.cpp
Normal file
@@ -0,0 +1,197 @@
|
||||
/* BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2002 Olivier Coursiere
|
||||
Eric Jourde
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _PICTURE_CPP_
|
||||
#define _PICTURE_CPP_
|
||||
/***********************************************************************
|
||||
* AUTHOR: nobody <baron>
|
||||
* FILE: StringView.cpp
|
||||
* DATE: Mon Jan 13 21:52:29 2003
|
||||
* DESCR:
|
||||
***********************************************************************/
|
||||
#include <beobj.h>
|
||||
#include "Picture.h"
|
||||
|
||||
class BPPicture : public BPicture, virtual public BPasObject
|
||||
{
|
||||
public:
|
||||
BPPicture(TPasObject PasObject);
|
||||
//BPPicture(TPasObject PasObject,const BPPicture &original);
|
||||
BPPicture(TPasObject PasObject,BMessage *data);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
BPPicture::BPPicture(TPasObject PasObject)
|
||||
:BPicture(),
|
||||
BPasObject(PasObject)
|
||||
|
||||
{
|
||||
}
|
||||
/*BPPicture::BPPicture(TPasObject PasObject,const BPPicture &original)
|
||||
:BPicture(original),
|
||||
BPasObject(PasObject)
|
||||
|
||||
{
|
||||
}
|
||||
*/
|
||||
|
||||
BPPicture::BPPicture(TPasObject PasObject,BMessage *data)
|
||||
:BPicture(data),
|
||||
BPasObject(PasObject)
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPicture::BPicture
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BPicture_Create(TPasObject PasObject)
|
||||
{
|
||||
return new BPPicture(PasObject);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPicture::BPicture
|
||||
* Params: const BPicture &original
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
/*TCPlusObject BPicture_Create_1
|
||||
(TPasObject PasObject, const BPicture &original)
|
||||
{
|
||||
return new BPPicture(PasObject, original);
|
||||
}
|
||||
*/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPicture::BPicture
|
||||
* Params: BMessage *data
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BPicture_Create_2
|
||||
(TPasObject PasObject, BMessage *data)
|
||||
{
|
||||
return new BPPicture(PasObject, data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPicture::~BPicture
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void BPicture_Free(BPicture *Picture)
|
||||
{
|
||||
delete Picture;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPicture::Instantiate
|
||||
* Params: BMessage *data
|
||||
* Returns: BArchivable *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BArchivable *
|
||||
BPicture_Instantiate(BPicture *Picture, BMessage *data)
|
||||
{
|
||||
return Picture->Instantiate(data);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPicture::Archive
|
||||
* Params: BMessage *data, bool deep
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BPicture_Archive(BPicture *Picture, BMessage *data, bool deep)
|
||||
{
|
||||
return Picture->Archive(data, deep);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPicture::Perform
|
||||
* Params: perform_code d, void *arg
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BPicture_Perform(BPicture *Picture, perform_code d, void *arg)
|
||||
{
|
||||
return Picture->Perform(d, arg);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPicture::Play
|
||||
* Params: void **callBackTable, int32 tableEntries, void *userData
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BPicture_Play(BPicture *Picture, void **callBackTable, int32 tableEntries, void *userData)
|
||||
{
|
||||
return Picture->Play(callBackTable, tableEntries, userData);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPicture::Flatten
|
||||
* Params: BDataIO *stream
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BPicture_Flatten(BPicture *Picture, BDataIO *stream)
|
||||
{
|
||||
return Picture->Flatten(stream);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPicture::Unflatten
|
||||
* Params: BDataIO *stream
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BPicture_Unflatten(BPicture *Picture, BDataIO *stream)
|
||||
{
|
||||
return Picture->Unflatten(stream);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _PICTURE_CPP_ */
|
||||
|
||||
194
bepascal/source/bepascal/cpp/src/be/interface/Polygon.cpp
Normal file
194
bepascal/source/bepascal/cpp/src/be/interface/Polygon.cpp
Normal file
@@ -0,0 +1,194 @@
|
||||
/* BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2002 Olivier Coursiere
|
||||
Eric Jourde
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _POLYGON_CPP_
|
||||
#define _POLYGON_CPP_
|
||||
/***********************************************************************
|
||||
* AUTHOR: nobody <baron>
|
||||
* FILE: StringView.cpp
|
||||
* DATE: Mon Jan 13 21:52:29 2003
|
||||
* DESCR:
|
||||
***********************************************************************/
|
||||
#include <beobj.h>
|
||||
#include "Polygon.h"
|
||||
|
||||
class BPPolygon : public BPolygon, virtual public BPasObject
|
||||
{
|
||||
public:
|
||||
BPPolygon(TPasObject PasObject,const BPoint *ptArray, int32 numPoints);
|
||||
BPPolygon(TPasObject PasObject);
|
||||
BPPolygon(TPasObject PasObject, const BPolygon *poly);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
BPPolygon::BPPolygon(TPasObject PasObject,const BPoint *ptArray, int32 numPoints)
|
||||
:BPolygon(ptArray,numPoints),
|
||||
BPasObject(PasObject)
|
||||
|
||||
{
|
||||
}
|
||||
BPPolygon::BPPolygon(TPasObject PasObject)
|
||||
:BPolygon(),
|
||||
BPasObject(PasObject)
|
||||
|
||||
{
|
||||
}
|
||||
BPPolygon::BPPolygon(TPasObject PasObject, const BPolygon *poly)
|
||||
:BPolygon(poly),
|
||||
BPasObject(PasObject)
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/***********************************************************************
|
||||
* AUTHOR: nobody <baron>
|
||||
* FILE: Polygon.cpp
|
||||
* DATE: Sun Sep 28 12:57:19 2003
|
||||
* DESCR:
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPolygon::BPolygon
|
||||
* Params: const BPoint *ptArray, int32 numPoints
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BPolygon_Create(TPasObject PasObject, const BPoint *ptArray, int32 numPoints)
|
||||
{
|
||||
return new BPPolygon(PasObject, ptArray, numPoints);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPolygon::BPolygon
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BPolygon_Create_1
|
||||
(TPasObject PasObject)
|
||||
{
|
||||
return new BPPolygon(PasObject);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPolygon::BPolygon
|
||||
* Params: const BPolygon *poly
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BPolygon_Create_2
|
||||
(TPasObject PasObject, const BPolygon *poly)
|
||||
{
|
||||
return new BPPolygon(PasObject, poly);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPolygon::~BPolygon
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void BPolygon_Free(BPolygon *Polygon)
|
||||
{
|
||||
delete Polygon;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPolygon::Frame
|
||||
* Params:
|
||||
* Returns: BRect
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BRect
|
||||
BPolygon_Frame(BPolygon *Polygon)
|
||||
{
|
||||
return Polygon->Frame();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPolygon::AddPoints
|
||||
* Params: const BPoint *ptArray, int32 numPoints
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BPolygon_AddPoints(BPolygon *Polygon, const BPoint *ptArray, int32 numPoints)
|
||||
{
|
||||
Polygon->AddPoints(ptArray, numPoints);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPolygon::CountPoints
|
||||
* Params:
|
||||
* Returns: int32
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
int32
|
||||
BPolygon_CountPoints(BPolygon *Polygon)
|
||||
{
|
||||
return Polygon->CountPoints();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPolygon::MapTo
|
||||
* Params: BRect srcRect, BRect dstRect
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BPolygon_MapTo(BPolygon *Polygon, BRect srcRect, BRect dstRect)
|
||||
{
|
||||
Polygon->MapTo(srcRect, dstRect);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BPolygon::PrintToStream
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BPolygon_PrintToStream(BPolygon *Polygon)
|
||||
{
|
||||
Polygon->PrintToStream();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _POLYGON_CPP_ */
|
||||
|
||||
|
||||
411
bepascal/source/bepascal/cpp/src/be/interface/Region.cpp
Normal file
411
bepascal/source/bepascal/cpp/src/be/interface/Region.cpp
Normal file
@@ -0,0 +1,411 @@
|
||||
/* BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2002 Olivier Coursiere
|
||||
Eric Jourde
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _REGION_CPP_
|
||||
#define _REGION_CPP_
|
||||
|
||||
/***********************************************************************
|
||||
* AUTHOR: nobody <baron>
|
||||
* FILE: Screen.cpp
|
||||
* DATE: Wed Sep 24 20:58:44 2003
|
||||
* DESCR:
|
||||
***********************************************************************/
|
||||
#include "Region.h"
|
||||
#include <beobj.h>
|
||||
|
||||
|
||||
|
||||
class BPRegion : public BRegion, virtual public BPasObject
|
||||
{
|
||||
public:
|
||||
BPRegion(TPasObject PasObject);
|
||||
BPRegion(TPasObject PasObject,const BRegion ®ion);
|
||||
BPRegion(TPasObject PasObject,const BRect rect);
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
BPRegion::BPRegion(TPasObject PasObject)
|
||||
:BRegion(),
|
||||
BPasObject(PasObject)
|
||||
|
||||
{
|
||||
};
|
||||
BPRegion::BPRegion(TPasObject PasObject,const BRegion ®ion)
|
||||
:BRegion(region),
|
||||
BPasObject(PasObject)
|
||||
|
||||
{
|
||||
};
|
||||
BPRegion::BPRegion(TPasObject PasObject,const BRect rect)
|
||||
:BRegion(rect),
|
||||
BPasObject(PasObject)
|
||||
|
||||
{
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
/***********************************************************************
|
||||
* AUTHOR: nobody <baron>
|
||||
* FILE: Region.cpp
|
||||
* DATE: Thu Sep 25 21:30:01 2003
|
||||
* DESCR:
|
||||
***********************************************************************/
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::BRegion
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BRegion_Create(TPasObject PasObject)
|
||||
{
|
||||
return new BPRegion(PasObject);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::BRegion
|
||||
* Params: const BRegion ®ion
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BRegion_Create_1
|
||||
(TPasObject PasObject, const BRegion ®ion)
|
||||
{
|
||||
return new BPRegion(PasObject, region);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::BRegion
|
||||
* Params: const BRect rect
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BRegion_Create_2
|
||||
(TPasObject PasObject, const BRect rect)
|
||||
{
|
||||
return new BPRegion(PasObject, rect);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::~BRegion
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void BRegion_Free(BRegion *Region)
|
||||
{
|
||||
delete Region;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Frame
|
||||
* Params:
|
||||
* Returns: BRect
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BRect
|
||||
BRegion_Frame(BRegion *Region)
|
||||
{
|
||||
return Region->Frame();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::FrameInt
|
||||
* Params:
|
||||
* Returns: clipping_rect
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
clipping_rect
|
||||
BRegion_FrameInt_1
|
||||
(BRegion *Region)
|
||||
{
|
||||
return Region->FrameInt();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::RectAt
|
||||
* Params: int32 index
|
||||
* Returns: BRect
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BRect
|
||||
BRegion_RectAt(BRegion *Region, int32 index)
|
||||
{
|
||||
return Region->RectAt(index);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::RectAtInt
|
||||
* Params: int32 index
|
||||
* Returns: clipping_rect
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
clipping_rect
|
||||
BRegion_RectAtInt_1
|
||||
(BRegion *Region, int32 index)
|
||||
{
|
||||
return Region->RectAtInt(index);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::CountRects
|
||||
* Params:
|
||||
* Returns: int32
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
int32
|
||||
BRegion_CountRects(BRegion *Region)
|
||||
{
|
||||
return Region->CountRects();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Set
|
||||
* Params: BRect newBounds
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BRegion_Set(BRegion *Region, BRect newBounds)
|
||||
{
|
||||
Region->Set(newBounds);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Set
|
||||
* Params: clipping_rect newBounds
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BRegion_Set_1
|
||||
(BRegion *Region, clipping_rect newBounds)
|
||||
{
|
||||
Region->Set(newBounds);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Intersects
|
||||
* Params: BRect r
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BRegion_Intersects(BRegion *Region, BRect r)
|
||||
{
|
||||
return Region->Intersects(r);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Intersects
|
||||
* Params: clipping_rect r
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BRegion_Intersects_1
|
||||
(BRegion *Region, clipping_rect r)
|
||||
{
|
||||
return Region->Intersects(r);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Contains
|
||||
* Params: BPoint pt
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BRegion_Contains(BRegion *Region, BPoint pt)
|
||||
{
|
||||
return Region->Contains(pt);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Contains
|
||||
* Params: int32 x, int32 y
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BRegion_Contains_1
|
||||
(BRegion *Region, int32 x, int32 y)
|
||||
{
|
||||
return Region->Contains(x, y);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::PrintToStream
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BRegion_PrintToStream(BRegion *Region)
|
||||
{
|
||||
Region->PrintToStream();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::OffsetBy
|
||||
* Params: int32 dh, int32 dv
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BRegion_OffsetBy(BRegion *Region, int32 dh, int32 dv)
|
||||
{
|
||||
Region->OffsetBy(dh, dv);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::MakeEmpty
|
||||
* Params:
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BRegion_MakeEmpty(BRegion *Region)
|
||||
{
|
||||
Region->MakeEmpty();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Include
|
||||
* Params: BRect r
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BRegion_Include(BRegion *Region, BRect r)
|
||||
{
|
||||
Region->Include(r);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Include
|
||||
* Params: clipping_rect r
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BRegion_Include_1
|
||||
(BRegion *Region, clipping_rect r)
|
||||
{
|
||||
Region->Include(r);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Include
|
||||
* Params: const BRegion *
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BRegion_Include_2
|
||||
(BRegion *Region, const BRegion *r)
|
||||
{
|
||||
Region->Include(r);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Exclude
|
||||
* Params: BRect r
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BRegion_Exclude(BRegion *Region, BRect r)
|
||||
{
|
||||
Region->Exclude(r);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Exclude
|
||||
* Params: clipping_rect r
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BRegion_Exclude_1
|
||||
(BRegion *Region, clipping_rect r)
|
||||
{
|
||||
Region->Exclude(r);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::Exclude
|
||||
* Params: const BRegion *
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BRegion_Exclude_2
|
||||
(BRegion *Region, const BRegion *r)
|
||||
{
|
||||
Region->Exclude(r);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BRegion::IntersectWith
|
||||
* Params: const BRegion *
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BRegion_IntersectWith(BRegion *Region, const BRegion *r)
|
||||
{
|
||||
Region->IntersectWith(r);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _REGION_CPP_ */
|
||||
489
bepascal/source/bepascal/cpp/src/be/interface/Screen.cpp
Normal file
489
bepascal/source/bepascal/cpp/src/be/interface/Screen.cpp
Normal file
@@ -0,0 +1,489 @@
|
||||
/* BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2002 Olivier Coursiere
|
||||
Eric Jourde
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _SCREEN_CPP_
|
||||
#define _SCREEN_CPP_
|
||||
|
||||
/***********************************************************************
|
||||
* AUTHOR: nobody <baron>
|
||||
* FILE: Screen.cpp
|
||||
* DATE: Wed Sep 24 20:58:44 2003
|
||||
* DESCR:
|
||||
***********************************************************************/
|
||||
#include "Screen.h"
|
||||
#include <beobj.h>
|
||||
|
||||
|
||||
|
||||
class BPScreen : public BScreen, virtual public BPasObject
|
||||
{
|
||||
public:
|
||||
BPScreen(TPasObject PasObject, screen_id id=B_MAIN_SCREEN_ID );
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
BPScreen::BPScreen(TPasObject PasObject,screen_id id=B_MAIN_SCREEN_ID )
|
||||
:BScreen(id),
|
||||
BPasObject(PasObject)
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::BScreen
|
||||
* Params: screen_id id
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BScreen_Create(TPasObject PasObject, screen_id id)
|
||||
{
|
||||
return new BPScreen(PasObject, id);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::BScreen
|
||||
* Params: BWindow *win
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
TCPlusObject BScreen_Create_1
|
||||
(TPasObject PasObject, BWindow *win)
|
||||
{
|
||||
//return new BPScreen(PasObject, win);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::~BScreen
|
||||
* Params:
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void BScreen_Free(BScreen *Screen)
|
||||
{
|
||||
delete Screen;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::IsValid
|
||||
* Params:
|
||||
* Returns: bool
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
bool
|
||||
BScreen_IsValid(BScreen *Screen)
|
||||
{
|
||||
return Screen->IsValid();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::SetToNext
|
||||
* Params:
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_SetToNext(BScreen *Screen)
|
||||
{
|
||||
return Screen->SetToNext();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::ColorSpace
|
||||
* Params:
|
||||
* Returns: color_space
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
color_space
|
||||
BScreen_ColorSpace(BScreen *Screen)
|
||||
{
|
||||
return Screen->ColorSpace();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::Frame
|
||||
* Params:
|
||||
* Returns: BRect
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BRect
|
||||
BScreen_Frame(BScreen *Screen)
|
||||
{
|
||||
return Screen->Frame();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::ID
|
||||
* Params:
|
||||
* Returns: screen_id
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
screen_id
|
||||
BScreen_ID(BScreen *Screen)
|
||||
{
|
||||
return Screen->ID();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::WaitForRetrace
|
||||
* Params:
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_WaitForRetrace(BScreen *Screen)
|
||||
{
|
||||
return Screen->WaitForRetrace();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::WaitForRetrace
|
||||
* Params: bigtime_t timeout
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_WaitForRetrace_1
|
||||
(BScreen *Screen, bigtime_t timeout)
|
||||
{
|
||||
return Screen->WaitForRetrace(timeout);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::IndexForColor
|
||||
* Params: uint8 r, uint8 g, uint8 b, uint8 a
|
||||
* Returns: uint8
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
uint8
|
||||
BScreen_IndexForColor(BScreen *Screen, uint8 r, uint8 g, uint8 b, uint8 a)
|
||||
{
|
||||
return Screen->IndexForColor(r, g, b, a);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::ColorForIndex
|
||||
* Params: const uint8 index
|
||||
* Returns: rgb_color
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
rgb_color
|
||||
BScreen_ColorForIndex(BScreen *Screen, const uint8 index)
|
||||
{
|
||||
return Screen->ColorForIndex(index);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::InvertIndex
|
||||
* Params: uint8 index
|
||||
* Returns: uint8
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
uint8
|
||||
BScreen_InvertIndex(BScreen *Screen, uint8 index)
|
||||
{
|
||||
return Screen->InvertIndex(index);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::ColorMap
|
||||
* Params:
|
||||
* Returns: const color_map *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
const color_map *
|
||||
BScreen_ColorMap(BScreen *Screen)
|
||||
{
|
||||
return Screen->ColorMap();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::GetBitmap
|
||||
* Params: BBitmap **screen_shot, bool draw_cursor, BRect *bound
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_GetBitmap(BScreen *Screen, BBitmap **screen_shot, bool draw_cursor, BRect *bound)
|
||||
{
|
||||
return Screen->GetBitmap(screen_shot, draw_cursor, bound);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::ReadBitmap
|
||||
* Params: BBitmap *buffer, bool draw_cursor, BRect *bound
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_ReadBitmap(BScreen *Screen, BBitmap *buffer, bool draw_cursor, BRect *bound)
|
||||
{
|
||||
return Screen->ReadBitmap(buffer, draw_cursor, bound);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::DesktopColor
|
||||
* Params:
|
||||
* Returns: rgb_color
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
rgb_color
|
||||
BScreen_DesktopColor(BScreen *Screen)
|
||||
{
|
||||
return Screen->DesktopColor();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::DesktopColor
|
||||
* Params: uint32 index
|
||||
* Returns: rgb_color
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
rgb_color
|
||||
BScreen_DesktopColor_1
|
||||
(BScreen *Screen, uint32 index)
|
||||
{
|
||||
return Screen->DesktopColor(index);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::SetDesktopColor
|
||||
* Params: rgb_color rgb, bool stick
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BScreen_SetDesktopColor(BScreen *Screen, rgb_color rgb, bool stick)
|
||||
{
|
||||
Screen->SetDesktopColor(rgb, stick);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::SetDesktopColor
|
||||
* Params: rgb_color rgb, uint32 index, bool stick
|
||||
* Returns: void
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
void
|
||||
BScreen_SetDesktopColor_1
|
||||
(BScreen *Screen, rgb_color rgb, uint32 index, bool stick)
|
||||
{
|
||||
Screen->SetDesktopColor(rgb, index, stick);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::ProposeMode
|
||||
* Params: display_mode *target, const display_mode *low, const display_mode *high
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_ProposeMode(BScreen *Screen, display_mode *target, const display_mode *low, const display_mode *high)
|
||||
{
|
||||
return Screen->ProposeMode(target, low, high);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::GetModeList
|
||||
* Params: display_mode **mode_list, uint32 *count
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_GetModeList(BScreen *Screen, display_mode **mode_list, uint32 *count)
|
||||
{
|
||||
return Screen->GetModeList(mode_list, count);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::GetMode
|
||||
* Params: display_mode *mode
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_GetMode(BScreen *Screen, display_mode *mode)
|
||||
{
|
||||
return Screen->GetMode(mode);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::GetMode
|
||||
* Params: uint32 workspace, display_mode *mode
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_GetMode_1
|
||||
(BScreen *Screen, uint32 workspace, display_mode *mode)
|
||||
{
|
||||
return Screen->GetMode(workspace, mode);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::SetMode
|
||||
* Params: display_mode *mode, bool makeDefault
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_SetMode(BScreen *Screen, display_mode *mode, bool makeDefault)
|
||||
{
|
||||
return Screen->SetMode(mode, makeDefault);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::SetMode
|
||||
* Params: uint32 workspace, display_mode *mode, bool makeDefault
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_SetMode_1
|
||||
(BScreen *Screen, uint32 workspace, display_mode *mode, bool makeDefault)
|
||||
{
|
||||
return Screen->SetMode(workspace, mode, makeDefault);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::GetDeviceInfo
|
||||
* Params: accelerant_device_info *adi
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_GetDeviceInfo(BScreen *Screen, accelerant_device_info *adi)
|
||||
{
|
||||
return Screen->GetDeviceInfo(adi);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::GetPixelClockLimits
|
||||
* Params: display_mode *mode, uint32 *low, uint32 *high
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_GetPixelClockLimits(BScreen *Screen, display_mode *mode, uint32 *low, uint32 *high)
|
||||
{
|
||||
return Screen->GetPixelClockLimits(mode, low, high);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::GetTimingConstraints
|
||||
* Params: display_timing_constraints *dtc
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_GetTimingConstraints(BScreen *Screen, display_timing_constraints *dtc)
|
||||
{
|
||||
return Screen->GetTimingConstraints(dtc);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::SetDPMS
|
||||
* Params: uint32 dpms_state
|
||||
* Returns: status_t
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
status_t
|
||||
BScreen_SetDPMS(BScreen *Screen, uint32 dpms_state)
|
||||
{
|
||||
return Screen->SetDPMS(dpms_state);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::DPMSState
|
||||
* Params: void
|
||||
* Returns: uint32
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
uint32
|
||||
BScreen_DPMSState(BScreen *Screen, void)
|
||||
{
|
||||
return Screen->DPMSState();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::DPMSCapabilites
|
||||
* Params: void
|
||||
* Returns: uint32
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
uint32
|
||||
BScreen_DPMSCapabilites(BScreen *Screen, void)
|
||||
{
|
||||
return Screen->DPMSCapabilites();
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Method: BScreen::private_screen
|
||||
* Params:
|
||||
* Returns: BPrivateScreen *
|
||||
* Effects:
|
||||
***********************************************************************/
|
||||
BPrivateScreen *
|
||||
BScreen_private_screen(BScreen *Screen)
|
||||
{
|
||||
return Screen->private_screen();
|
||||
}
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SCREEN_CPP_ */
|
||||
76
bepascal/source/bepascal/pas/src/be/add-on/accelerant.pp
Normal file
76
bepascal/source/bepascal/pas/src/be/add-on/accelerant.pp
Normal file
@@ -0,0 +1,76 @@
|
||||
unit accelerant;
|
||||
{
|
||||
(Manual) Translation of Be's GraphicDefs.h
|
||||
|
||||
Ok, if TBitmap doesn't work, the error its most likely to be in this unit.
|
||||
|
||||
What this unit needs? that someone take a look at the points marked with:
|
||||
|
||||
// Check/Confirm This one, please.
|
||||
|
||||
I'm not too sure about how to translate the enums, and also not sure about
|
||||
the values of the index on a set. Excuse (and fix!) my ignorace :)
|
||||
|
||||
Maybe I also screwed up a little the integer types too, be warned :^P
|
||||
|
||||
-- BiPolar.
|
||||
}
|
||||
interface
|
||||
|
||||
uses
|
||||
SupportDefs;
|
||||
|
||||
{$PACKRECORDS C}
|
||||
|
||||
|
||||
// uint32 = integer uint16=word
|
||||
|
||||
|
||||
type accelerant_device_info=record
|
||||
version : integer;
|
||||
name : string[32];
|
||||
chipset: string[32];
|
||||
serial_no:string[32];
|
||||
memory : integer;
|
||||
dac_speed : integer;
|
||||
end;
|
||||
|
||||
type display_timing = record
|
||||
pixel_clock: integer;
|
||||
h_display,
|
||||
h_sync_start,
|
||||
h_sync_end,
|
||||
h_total,
|
||||
v_display,
|
||||
v_sync_start,
|
||||
v_sync_end,
|
||||
v_total : word;
|
||||
flags : integer;
|
||||
end;
|
||||
|
||||
type display_mode= record
|
||||
timing : display_timing ;
|
||||
space : integer;
|
||||
virtual_width,
|
||||
virtual_height,
|
||||
h_display_start,
|
||||
v_display_start : word;
|
||||
flags: integer;
|
||||
end;
|
||||
|
||||
type display_timing_constraints =record
|
||||
h_res:word;
|
||||
h_sync_min:word;
|
||||
h_sync_max:word;
|
||||
h_blank_min:word;
|
||||
h_blank_max:word;
|
||||
v_res:word;
|
||||
v_sync_min:word;
|
||||
v_sync_max:word;
|
||||
v_blank_min:word;
|
||||
v_blank_max:word;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
550
bepascal/source/bepascal/pas/src/be/interface/bitmap.pp
Normal file
550
bepascal/source/bepascal/pas/src/be/interface/bitmap.pp
Normal file
@@ -0,0 +1,550 @@
|
||||
{ BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2003 Olivier Coursiere
|
||||
Eric Jourde
|
||||
Oscar Lesta
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
}
|
||||
|
||||
unit bitmap;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
BeObj, Archivable, GraphicDefs, Message, OS, Rect, SupportDefs, View;
|
||||
|
||||
type
|
||||
// PCardinal = ^Cardinal;
|
||||
|
||||
BBitmap = class(BArchivable)
|
||||
private
|
||||
public
|
||||
// I will change "bounds" to "frame" in these constructors...
|
||||
// they clash with the Bounds function.
|
||||
// Also "bytesPerWow" --> "bytes_per_row"
|
||||
constructor Create(frame : BRect; flags : Cardinal; depth : Color_Space;
|
||||
bytes_per_row : Integer; screenID : Screen_ID);
|
||||
constructor Create(frame : BRect; depth : Color_Space;
|
||||
accepts_views : boolean; need_contiguous : boolean);
|
||||
constructor Create(source : BBitmap; accepts_views : boolean;
|
||||
need_contiguous : boolean);
|
||||
constructor Create(data : BMessage);
|
||||
|
||||
destructor Destroy; override;
|
||||
|
||||
function Instantiate(data : BMessage) : BArchivable;
|
||||
function Archive(data : BMessage; deep : boolean) : Status_t;
|
||||
function InitCheck : Status_t;
|
||||
function IsValid : boolean;
|
||||
function LockBits(state : PCardinal) : Status_t;
|
||||
procedure UnlockBits;
|
||||
function Area : Area_ID;
|
||||
function Bits : Pointer;
|
||||
function BitsLength : Integer;
|
||||
function BytesPerRow : Integer;
|
||||
function ColorSpace : Color_Space;
|
||||
function Bounds : BRect;
|
||||
procedure SetBits(data : Pointer; length : integer; offset : integer;
|
||||
cs : Color_Space);
|
||||
function GetOverlayRestrictions(restrict : OverlayRestrictions)
|
||||
: Status_t;
|
||||
procedure AddChild(view : BView);
|
||||
function RemoveChild(view : BView) : boolean;
|
||||
function CountChildren : integer;
|
||||
function ChildAt(index : integer) : BView;
|
||||
function FindView(view_name : PChar) : BView;
|
||||
function FindView(point : BPoint) : BView;
|
||||
function Lock : boolean;
|
||||
procedure Unlock;
|
||||
function IsLocked : boolean;
|
||||
|
||||
function Perform(d : Perform_code; arg : Pointer) : Status_t;
|
||||
{
|
||||
procedure _ReservedBitmap1;
|
||||
procedure _ReservedBitmap2;
|
||||
procedure _ReservedBitmap3;
|
||||
constructor Create( : TBitmap);
|
||||
function operator=( : TBitmap) : TBitmap;
|
||||
function get_shared_pointer : PChar;
|
||||
procedure set_bits(offset : integer; data : PChar; length : integer);
|
||||
procedure set_bits_24(offset : integer; data : PChar; length : integer);
|
||||
procedure set_bits_24_local_gray(offset : integer; data : PChar; len : integer);
|
||||
procedure set_bits_24_local_256(offset : integer; data : PByte; len : integer);
|
||||
procedure set_bits_24_24(offset : integer; data : PChar; length : integer; big_endian_dst : boolean);
|
||||
procedure set_bits_8_24(offset : integer; data : PChar; length : integer; big_endian_dst : boolean);
|
||||
procedure set_bits_gray_24(offset : integer; data : PChar; length : integer; big_endian_dst : boolean);
|
||||
function get_server_token : integer;
|
||||
procedure InitObject(frame : TRect; depth : TColor_Space; flags : Cardinal; bytesPerRow : integer; screenID : TScreenID);
|
||||
procedure AssertPtr;
|
||||
procedure void *fBasePtr;
|
||||
procedure int32 fSize;
|
||||
procedure color_space fType;
|
||||
procedure BRect fBound;
|
||||
procedure int32 fRowBytes;
|
||||
procedure BWindow *fWindow;
|
||||
procedure int32 fServerToken;
|
||||
procedure int32 fToken;
|
||||
procedure uint8 unused;
|
||||
procedure area_id fArea;
|
||||
procedure area_id fOrigArea;
|
||||
procedure uint32 fFlags;
|
||||
procedure status_t fInitError;
|
||||
}
|
||||
end;
|
||||
|
||||
function BBitmap_Create(AObject : TBeObject; bounds : TCPlusObject;
|
||||
flags : Cardinal; depth : Color_Space; bytesPerRow : Integer;
|
||||
screenID : Screen_ID) : TCPlusObject; cdecl;
|
||||
external BePascalLibName name 'BBitmap_Create';
|
||||
|
||||
function BBitmap_Create_1(AObject : TBeObject; bounds : TCPlusObject;
|
||||
depth : Color_Space; accepts_views : boolean; need_contiguous : boolean)
|
||||
: TCPlusObject; cdecl; external BePascalLibName name 'BBitmap_Create_1';
|
||||
|
||||
function BBitmap_Create_2(AObject : TBeObject; source : BBitmap;
|
||||
accepts_views : boolean; need_contiguous : boolean) : TCPlusObject; cdecl;
|
||||
external BePascalLibName name 'BBitmap_Create_2';
|
||||
|
||||
function BBitmap_Create_3(AObject : TBeObject; data : TCPlusObject)
|
||||
: TCPlusObject; cdecl; external BePascalLibName name 'BBitmap_Create_3';
|
||||
|
||||
|
||||
procedure BBitmap_Free(AObject : TCPlusObject); cdecl;
|
||||
external BePascalLibName name 'BBitmap_Free';
|
||||
|
||||
|
||||
function BBitmap_Instantiate(AObject : TCPlusObject; data : {TMessage}TCPlusObject)
|
||||
: BArchivable; cdecl; external BePascalLibName name 'BBitmap_Instantiate';
|
||||
|
||||
function BBitmap_Archive(AObject : TCPlusObject; data : {TMessage}TCPlusObject;
|
||||
deep : boolean) : Status_t; cdecl;
|
||||
external BePascalLibName name 'BBitmap_Archive';
|
||||
|
||||
function BBitmap_InitCheck(AObject : TCPlusObject) : Status_t; cdecl;
|
||||
external BePascalLibName name 'BBitmap_InitCheck';
|
||||
|
||||
function BBitmap_IsValid(AObject : TCPlusObject) : boolean; cdecl;
|
||||
external BePascalLibName name 'BBitmap_IsValid';
|
||||
|
||||
function BBitmap_LockBits(AObject : TCPlusObject; state : PCardinal)
|
||||
: Status_t; cdecl; external BePascalLibName name 'BBitmap_LockBits';
|
||||
|
||||
procedure BBitmap_UnlockBits(AObject : TCPlusObject); cdecl;
|
||||
external BePascalLibName name 'BBitmap_UnlockBits';
|
||||
|
||||
function BBitmap_Area(AObject : TCPlusObject) : Area_ID; cdecl;
|
||||
external BePascalLibName name 'BBitmap_Area';
|
||||
|
||||
function BBitmap_Bits(AObject : TCPlusObject) : Pointer; cdecl;
|
||||
external BePascalLibName name 'BBitmap_Bits';
|
||||
|
||||
function BBitmap_BitsLength(AObject : TCPlusObject) : integer; cdecl;
|
||||
external BePascalLibName name 'BBitmap_BitsLength';
|
||||
|
||||
function BBitmap_BytesPerRow(AObject : TCPlusObject) : integer; cdecl;
|
||||
external BePascalLibName name 'BBitmap_BytesPerRow';
|
||||
|
||||
function BBitmap_ColorSpace(AObject : TCPlusObject) : Color_Space; cdecl;
|
||||
external BePascalLibName name 'BBitmap_ColorSpace';
|
||||
|
||||
function BBitmap_Bounds(AObject : TCPlusObject) : BRect; cdecl;
|
||||
external BePascalLibName name 'BBitmap_Bounds';
|
||||
|
||||
procedure BBitmap_SetBits(AObject : TCPlusObject; data : Pointer;
|
||||
length : integer; offset : integer; cs : Color_Space); cdecl;
|
||||
external BePascalLibName name 'BBitmap_SetBits';
|
||||
|
||||
function BBitmap_GetOverlayRestrictions(AObject : TCPlusObject;
|
||||
restrict : OverlayRestrictions) : Status_t; cdecl;
|
||||
external BePascalLibName name 'BBitmap_GetOverlayRestrictions';
|
||||
|
||||
procedure BBitmap_AddChild(AObject : TCPlusObject; view : {TView}TCPlusObject); cdecl;
|
||||
external BePascalLibName name 'BBitmap_AddChild';
|
||||
|
||||
function BBitmap_RemoveChild(AObject : TCPlusObject; view : {TView}TCPlusObject)
|
||||
: boolean; cdecl; external BePascalLibName name 'BBitmap_RemoveChild';
|
||||
|
||||
function BBitmap_CountChildren(AObject : TCPlusObject) : integer; cdecl;
|
||||
external BePascalLibName name 'BBitmap_CountChildren';
|
||||
|
||||
function BBitmap_ChildAt(AObject : TCPlusObject; index : integer) : BView;
|
||||
cdecl; external BePascalLibName name 'BBitmap_ChildAt';
|
||||
|
||||
function BBitmap_FindView(AObject : TCPlusObject; view_name : PChar) : BView;
|
||||
cdecl; external BePascalLibName name 'BBitmap_FindView';
|
||||
|
||||
function BBitmap_FindView(AObject : TCPlusObject; point : BPoint{TCPlusObject})
|
||||
: BView; cdecl; external BePascalLibName name 'BBitmap_FindView';
|
||||
|
||||
function BBitmap_Lock(AObject : TCPlusObject) : boolean; cdecl;
|
||||
external BePascalLibName name 'BBitmap_Lock';
|
||||
|
||||
procedure BBitmap_Unlock(AObject : TCPlusObject); cdecl;
|
||||
external BePascalLibName name 'BBitmap_Unlock';
|
||||
|
||||
function BBitmap_IsLocked(AObject : TCPlusObject) : boolean; cdecl;
|
||||
external BePascalLibName name 'BBitmap_IsLocked';
|
||||
|
||||
function BBitmap_Perform(AObject : TCPlusObject; d : Perform_code; arg : Pointer) : Status_t; cdecl; external BePascalLibName name 'BBitmap_Perform';
|
||||
|
||||
{
|
||||
procedure BBitmap__ReservedBitmap1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap__ReservedBitmap1';
|
||||
procedure BBitmap__ReservedBitmap2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap__ReservedBitmap2';
|
||||
procedure BBitmap__ReservedBitmap3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap__ReservedBitmap3';
|
||||
function BBitmap_Create(AObject : TBeObject; : TBitmap); cdecl; external BePascalLibName name 'BBitmap_Create';
|
||||
function BBitmap_operator=(AObject : TCPlusObject; : TBitmap) : TBitmap; cdecl; external BePascalLibName name 'BBitmap_operator=';
|
||||
function BBitmap_get_shared_pointer(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BBitmap_get_shared_pointer';
|
||||
procedure BBitmap_set_bits(AObject : TCPlusObject; offset : integer; data : PChar; length : integer); cdecl; external BePascalLibName name 'BBitmap_set_bits';
|
||||
procedure BBitmap_set_bits_24(AObject : TCPlusObject; offset : integer; data : PChar; length : integer); cdecl; external BePascalLibName name 'BBitmap_set_bits_24';
|
||||
procedure BBitmap_set_bits_24_local_gray(AObject : TCPlusObject; offset : integer; data : PChar; len : integer); cdecl; external BePascalLibName name 'BBitmap_set_bits_24_local_gray';
|
||||
procedure BBitmap_set_bits_24_local_256(AObject : TCPlusObject; offset : integer; data : PByte; len : integer); cdecl; external BePascalLibName name 'BBitmap_set_bits_24_local_256';
|
||||
procedure BBitmap_set_bits_24_24(AObject : TCPlusObject; offset : integer; data : PChar; length : integer; big_endian_dst : boolean); cdecl; external BePascalLibName name 'BBitmap_set_bits_24_24';
|
||||
procedure BBitmap_set_bits_8_24(AObject : TCPlusObject; offset : integer; data : PChar; length : integer; big_endian_dst : boolean); cdecl; external BePascalLibName name 'BBitmap_set_bits_8_24';
|
||||
procedure BBitmap_set_bits_gray_24(AObject : TCPlusObject; offset : integer; data : PChar; length : integer; big_endian_dst : boolean); cdecl; external BePascalLibName name 'BBitmap_set_bits_gray_24';
|
||||
function BBitmap_get_server_token(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BBitmap_get_server_token';
|
||||
procedure BBitmap_InitObject(AObject : TCPlusObject; frame : TCPlusObject; depth : TColor_Space; flags : Cardinal; bytesPerRow : integer; screenID : TScreenID); cdecl; external BePascalLibName name 'BBitmap_InitObject';
|
||||
procedure BBitmap_AssertPtr(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_AssertPtr';
|
||||
procedure BBitmap_void *fBasePtr(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_void *fBasePtr';
|
||||
procedure BBitmap_int32 fSize(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_int32 fSize';
|
||||
procedure BBitmap_color_space fType(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_color_space fType';
|
||||
procedure BBitmap_BRect fBound(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_BRect fBound';
|
||||
procedure BBitmap_int32 fRowBytes(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_int32 fRowBytes';
|
||||
procedure BBitmap_BWindow *fWindow(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_BWindow *fWindow';
|
||||
procedure BBitmap_int32 fServerToken(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_int32 fServerToken';
|
||||
procedure BBitmap_int32 fToken(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_int32 fToken';
|
||||
procedure BBitmap_uint8 unused(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_uint8 unused';
|
||||
procedure BBitmap_area_id fArea(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_area_id fArea';
|
||||
procedure BBitmap_area_id fOrigArea(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_area_id fOrigArea';
|
||||
procedure BBitmap_uint32 fFlags(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_uint32 fFlags';
|
||||
procedure BBitmap_status_t fInitError(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BBitmap_status_t fInitError';
|
||||
}
|
||||
|
||||
implementation
|
||||
|
||||
{ -- NOTE!
|
||||
I will change "bounds" to "frame" in these constructors...
|
||||
they clash with the Bounds function.
|
||||
|
||||
Also "bytesPerWow" --> "bytes_per_row"
|
||||
}
|
||||
|
||||
// BBitmap(BRect bounds, uint32 flags, color_space depth,
|
||||
// int32 bytesPerRow=B_ANY_BYTES_PER_ROW, screen_id screenID=B_MAIN_SCREEN_ID);
|
||||
constructor BBitmap.Create(frame{bounds} : BRect; flags : Cardinal;
|
||||
depth : Color_Space; bytes_per_row : Integer; screenID : Screen_ID);
|
||||
begin
|
||||
CPlusObject := BBitmap_Create(Self, frame, flags, depth, bytes_per_row,
|
||||
screenID);
|
||||
end;
|
||||
|
||||
// BBitmap(BRect bounds, color_space depth, bool accepts_views = false,
|
||||
// bool need_contiguous = false);
|
||||
constructor BBitmap.Create(frame{bounds} : BRect; depth : Color_Space;
|
||||
accepts_views : boolean; need_contiguous : Boolean);
|
||||
begin
|
||||
CPlusObject := BBitmap_Create_1(Self, frame.CPlusObject, depth,
|
||||
accepts_views, need_contiguous);
|
||||
end;
|
||||
|
||||
// BBitmap(const BBitmap* source, bool accepts_views = false,
|
||||
// bool need_contiguous = false);
|
||||
constructor BBitmap.Create(source : BBitmap; accepts_views : Boolean;
|
||||
need_contiguous : Boolean);
|
||||
begin
|
||||
CPlusObject := BBitmap_Create_2(Self, source, accepts_views, need_contiguous);
|
||||
end;
|
||||
|
||||
// BBitmap(BMessage *data);
|
||||
constructor BBitmap.Create(data :BMessage);
|
||||
begin
|
||||
CPlusObject := BBitmap_Create_3(Self, data.CPlusObject);
|
||||
end;
|
||||
|
||||
destructor BBitmap.Destroy;
|
||||
begin
|
||||
BBitmap_Free(CPlusObject);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function BBitmap.Instantiate(data :BMessage) : BArchivable;
|
||||
begin
|
||||
Result := BBitmap_Instantiate(CPlusObject, data.CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.Archive(data : BMessage; deep : boolean) : Status_t;
|
||||
begin
|
||||
Result := BBitmap_Archive(CPlusObject, data.CPlusObject, deep);
|
||||
end;
|
||||
|
||||
function BBitmap.InitCheck : Status_t;
|
||||
begin
|
||||
Result := BBitmap_InitCheck(CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.IsValid : boolean;
|
||||
begin
|
||||
Result := BBitmap_IsValid(CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.LockBits(state : PCardinal) : Status_t;
|
||||
begin
|
||||
Result := BBitmap_LockBits(CPlusObject, state);
|
||||
end;
|
||||
|
||||
procedure BBitmap.UnlockBits;
|
||||
begin
|
||||
BBitmap_UnlockBits(CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.Area : Area_ID;
|
||||
begin
|
||||
Result := BBitmap_Area(CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.Bits : Pointer;
|
||||
begin
|
||||
Result := BBitmap_Bits(CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.BitsLength : integer;
|
||||
begin
|
||||
Result := BBitmap_BitsLength(CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.BytesPerRow : integer;
|
||||
begin
|
||||
Result := BBitmap_BytesPerRow(CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.ColorSpace : Color_Space;
|
||||
begin
|
||||
Result := BBitmap_ColorSpace(CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.Bounds : BRect;
|
||||
begin
|
||||
Result := BBitmap_Bounds(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure BBitmap.SetBits(data : Pointer; length : integer; offset : integer; cs : Color_Space);
|
||||
begin
|
||||
BBitmap_SetBits(CPlusObject, data, length, offset, cs);
|
||||
end;
|
||||
|
||||
function BBitmap.GetOverlayRestrictions(restrict : OverlayRestrictions) : Status_t;
|
||||
begin
|
||||
Result := BBitmap_GetOverlayRestrictions(CPlusObject, restrict);
|
||||
end;
|
||||
|
||||
procedure BBitmap.AddChild(view : BView);
|
||||
begin
|
||||
BBitmap_AddChild(CPlusObject, view.CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.RemoveChild(view : BView) : boolean;
|
||||
begin
|
||||
Result := BBitmap_RemoveChild(CPlusObject, view.CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.CountChildren : integer;
|
||||
begin
|
||||
Result := BBitmap_CountChildren(CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.ChildAt(index : integer) : BView;
|
||||
begin
|
||||
Result := BBitmap_ChildAt(CPlusObject, index);
|
||||
end;
|
||||
|
||||
function BBitmap.FindView(view_name : PChar) : BView;
|
||||
begin
|
||||
Result := BBitmap_FindView(CPlusObject, view_name);
|
||||
end;
|
||||
|
||||
function BBitmap.FindView(point : BPoint) : BView;
|
||||
begin
|
||||
Result := BBitmap_FindView(CPlusObject, point.CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.Lock : boolean;
|
||||
begin
|
||||
Result := BBitmap_Lock(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure BBitmap.Unlock;
|
||||
begin
|
||||
BBitmap_Unlock(CPlusObject);
|
||||
end;
|
||||
|
||||
function BBitmap.IsLocked : boolean;
|
||||
begin
|
||||
Result := BBitmap_IsLocked(CPlusObject);
|
||||
end;
|
||||
|
||||
|
||||
function BBitmap.Perform(d : Perform_code; arg : Pointer) : Status_t;
|
||||
begin
|
||||
Result := BBitmap_Perform(CPlusObject, d, arg);
|
||||
end;
|
||||
|
||||
|
||||
{
|
||||
procedure TBitmap._ReservedBitmap1;
|
||||
begin
|
||||
BBitmap__ReservedBitmap1(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap._ReservedBitmap2;
|
||||
begin
|
||||
BBitmap__ReservedBitmap2(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap._ReservedBitmap3;
|
||||
begin
|
||||
BBitmap__ReservedBitmap3(CPlusObject);
|
||||
end;
|
||||
|
||||
constructor TBitmap.Create( : TBitmap);
|
||||
begin
|
||||
CPlusObject := BBitmap_Create(Self, );
|
||||
end;
|
||||
|
||||
function TBitmap.operator=( : TBitmap) : TBitmap;
|
||||
begin
|
||||
Result := BBitmap_operator=(CPlusObject, );
|
||||
end;
|
||||
|
||||
function TBitmap.get_shared_pointer : PChar;
|
||||
begin
|
||||
Result := BBitmap_get_shared_pointer(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.set_bits(offset : integer; data : PChar; length : integer);
|
||||
begin
|
||||
BBitmap_set_bits(CPlusObject, offset, data, length);
|
||||
end;
|
||||
|
||||
procedure TBitmap.set_bits_24(offset : integer; data : PChar; length : integer);
|
||||
begin
|
||||
BBitmap_set_bits_24(CPlusObject, offset, data, length);
|
||||
end;
|
||||
|
||||
procedure TBitmap.set_bits_24_local_gray(offset : integer; data : PChar; len : integer);
|
||||
begin
|
||||
BBitmap_set_bits_24_local_gray(CPlusObject, offset, data, len);
|
||||
end;
|
||||
|
||||
procedure TBitmap.set_bits_24_local_256(offset : integer; data : PByte; len : integer);
|
||||
begin
|
||||
BBitmap_set_bits_24_local_256(CPlusObject, offset, data, len);
|
||||
end;
|
||||
|
||||
procedure TBitmap.set_bits_24_24(offset : integer; data : PChar; length : integer; big_endian_dst : boolean);
|
||||
begin
|
||||
BBitmap_set_bits_24_24(CPlusObject, offset, data, length, big_endian_dst);
|
||||
end;
|
||||
|
||||
procedure TBitmap.set_bits_8_24(offset : integer; data : PChar; length : integer; big_endian_dst : boolean);
|
||||
begin
|
||||
BBitmap_set_bits_8_24(CPlusObject, offset, data, length, big_endian_dst);
|
||||
end;
|
||||
|
||||
procedure TBitmap.set_bits_gray_24(offset : integer; data : PChar; length : integer; big_endian_dst : boolean);
|
||||
begin
|
||||
BBitmap_set_bits_gray_24(CPlusObject, offset, data, length, big_endian_dst);
|
||||
end;
|
||||
|
||||
function TBitmap.get_server_token : integer;
|
||||
begin
|
||||
Result := BBitmap_get_server_token(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.InitObject(frame : TRect; depth : TColor_Space; flags : Cardinal; bytesPerRow : integer; screenID : TScreenID);
|
||||
begin
|
||||
BBitmap_InitObject(CPlusObject, frame.CPlusObject, depth, flags, bytesPerRow, screenID);
|
||||
end;
|
||||
|
||||
procedure TBitmap.AssertPtr;
|
||||
begin
|
||||
BBitmap_AssertPtr(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.void *fBasePtr;
|
||||
begin
|
||||
BBitmap_void *fBasePtr(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.int32 fSize;
|
||||
begin
|
||||
BBitmap_int32 fSize(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.color_space fType;
|
||||
begin
|
||||
BBitmap_color_space fType(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.BRect fBound;
|
||||
begin
|
||||
BBitmap_BRect fBound(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.int32 fRowBytes;
|
||||
begin
|
||||
BBitmap_int32 fRowBytes(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.BWindow *fWindow;
|
||||
begin
|
||||
BBitmap_BWindow *fWindow(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.int32 fServerToken;
|
||||
begin
|
||||
BBitmap_int32 fServerToken(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.int32 fToken;
|
||||
begin
|
||||
BBitmap_int32 fToken(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.uint8 unused;
|
||||
begin
|
||||
BBitmap_uint8 unused(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.area_id fArea;
|
||||
begin
|
||||
BBitmap_area_id fArea(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.area_id fOrigArea;
|
||||
begin
|
||||
BBitmap_area_id fOrigArea(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.uint32 fFlags;
|
||||
begin
|
||||
BBitmap_uint32 fFlags(CPlusObject);
|
||||
end;
|
||||
|
||||
procedure TBitmap.status_t fInitError;
|
||||
begin
|
||||
BBitmap_status_t fInitError(CPlusObject);
|
||||
end;
|
||||
}
|
||||
|
||||
end.
|
||||
112
bepascal/source/bepascal/pas/src/be/interface/picture.pp
Normal file
112
bepascal/source/bepascal/pas/src/be/interface/picture.pp
Normal file
@@ -0,0 +1,112 @@
|
||||
{ BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2003 Olivier Coursiere
|
||||
Eric Jourde
|
||||
Oscar Lesta
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
}
|
||||
|
||||
unit picture;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
BeObj, Archivable, GraphicDefs, Message, OS, Rect, SupportDefs,dataio;
|
||||
|
||||
type
|
||||
BView = class(TBeObject);
|
||||
|
||||
BPicture = class(BArchivable)
|
||||
private
|
||||
public
|
||||
|
||||
constructor Create;override;
|
||||
constructor Create(data : BMessage);
|
||||
|
||||
destructor Destroy; override;
|
||||
|
||||
function Instantiate(data : BMessage) : BArchivable;
|
||||
function Archive(data : BMessage; deep : boolean) : Status_t;
|
||||
|
||||
function Perform(d : Perform_code; arg : Pointer) : Status_t;
|
||||
function Flatten(var stream : BDataIO) : Status_t;
|
||||
function Unflatten(var stream : BDataIO) : Status_t;
|
||||
end;
|
||||
|
||||
function BPicture_Create(AObject : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BPicture_Create';
|
||||
function BPicture_Create(AObject : TCPlusObject;data : BMessage) : TCPlusObject; cdecl; external BePascalLibName name 'BPicture_Create_2';
|
||||
|
||||
|
||||
procedure BPicture_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BPicture_Free';
|
||||
function BPicture_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : BArchivable; cdecl; external BePascalLibName name 'BPicture_Instantiate';
|
||||
function BPicture_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : Status_t; cdecl; external BePascalLibName name 'BPicture_Archive';
|
||||
function BPicture_Perform(AObject : TCPlusObject; d : Perform_code; arg : Pointer) : Status_t; cdecl; external BePascalLibName name 'BPicture_Perform';
|
||||
function BPicture_Flatten(AObject : TCPlusObject; stream : TCPlusObject) : Status_t; cdecl; external BePascalLibName name 'BPicture_Flatten';
|
||||
function BPicture_Unflatten(AObject : TCPlusObject; stream : TCPlusObject) : Status_t; cdecl; external BePascalLibName name 'BPicture_Unflatten';
|
||||
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
|
||||
|
||||
constructor BPicture.Create;
|
||||
begin
|
||||
CreatePas;
|
||||
CPlusObject := BPicture_Create(Self);
|
||||
end;
|
||||
constructor BPicture.Create(data : BMessage);
|
||||
begin
|
||||
CreatePas;
|
||||
CPlusObject := BPicture_Create(Self,data);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
destructor BPicture.Destroy;
|
||||
begin
|
||||
BPicture_Free(CPlusObject);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function BPicture.Instantiate(data :BMessage) : BArchivable;
|
||||
begin
|
||||
Result := BPicture_Instantiate(CPlusObject, data.CPlusObject);
|
||||
end;
|
||||
|
||||
function BPicture.Archive(data : BMessage; deep : boolean) : Status_t;
|
||||
begin
|
||||
Result := BPicture_Archive(CPlusObject, data.CPlusObject, deep);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
function BPicture.Perform(d : Perform_code; arg : Pointer) : Status_t;
|
||||
begin
|
||||
Result := BPicture_Perform(CPlusObject, d, arg);
|
||||
end;
|
||||
|
||||
function BPicture.Flatten(var stream : BDataIO) : Status_t;
|
||||
begin
|
||||
Result:=BPicture_Flatten(CPlusObject,stream.CPlusObject);
|
||||
end;
|
||||
|
||||
function BPicture.Unflatten(var stream : BDataIO) : Status_t;
|
||||
begin
|
||||
Result:=BPicture_Unflatten(CPlusObject,stream.CPlusObject);
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
277
bepascal/source/bepascal/pas/src/be/interface/screen.pp
Normal file
277
bepascal/source/bepascal/pas/src/be/interface/screen.pp
Normal file
@@ -0,0 +1,277 @@
|
||||
{ BePascal - A pascal wrapper around the BeOS API
|
||||
Copyright (C) 2002 Olivier Coursiere
|
||||
Eric Jourde
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
}
|
||||
unit screen;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
beobj,interfacedefs,window,bitmap,rect,graphicdefs,SupportDefs,accelerant;
|
||||
|
||||
type
|
||||
BScreen = class(TBeObject)
|
||||
private
|
||||
public
|
||||
constructor Create; override;
|
||||
//constructor Create(win : BWindow);
|
||||
destructor Destroy;override;
|
||||
function IsValid : boolean;
|
||||
function SetToNext : Status_t;
|
||||
function ColorSpace : Color_Space;
|
||||
function Frame : BRect;
|
||||
function ID : screen_id;
|
||||
function WaitForRetrace : Status_t;
|
||||
function WaitForRetrace(timeout : Bigtime_t) : Status_t;
|
||||
function IndexForColor(rgb : rgb_color) : integer;
|
||||
function IndexForColor(r : integer; g : integer; b : integer; a : integer) : integer;
|
||||
function ColorForIndex(index : integer) : rgb_color;
|
||||
function InvertIndex(index : integer) : integer;
|
||||
function ColorMap : color_map;
|
||||
function GetBitmap(screen_shot : BBitmap; draw_cursor : boolean; bound : BRect) : Status_t;
|
||||
function ReadBitmap(buffer : BBitmap; draw_cursor : boolean; bound : BRect) : Status_t;
|
||||
function DesktopColor : rgb_color;
|
||||
function DesktopColor(index : Cardinal) : rgb_color;
|
||||
procedure SetDesktopColor(rgb : rgb_color; stick : boolean);
|
||||
procedure SetDesktopColor(rgb : rgb_color; index : Cardinal; stick : boolean);
|
||||
function ProposeMode(target : display_mode; low : display_mode; high : display_mode) : Status_t;
|
||||
function GetModeList(mode_list : display_mode; count : integer) : Status_t;
|
||||
function GetMode(mode : display_mode) : Status_t;
|
||||
function GetMode(workspace : Cardinal; mode : display_mode) : Status_t;
|
||||
function SetMode(mode : display_mode; makeDefault : boolean) : Status_t;
|
||||
function SetMode(workspace : Cardinal; mode : display_mode; makeDefault : boolean) : Status_t;
|
||||
function GetDeviceInfo(adi : accelerant_device_info) : Status_t;
|
||||
function GetPixelClockLimits(mode : display_mode; low : integer; high : integer) : Status_t;
|
||||
function GetTimingConstraints(dtc : display_timing_constraints) : Status_t;
|
||||
function SetDPMS(dpms_state : Cardinal) : Status_t;
|
||||
function DPMSState : Cardinal;
|
||||
function DPMSCapabilites : Cardinal;
|
||||
// function private_screen : BPrivateScreen;
|
||||
end;
|
||||
|
||||
function BScreen_Create(AObject : TBeObject): TCPlusObject; cdecl; external BePascalLibName name 'BScreen_Create';
|
||||
//function BScreen_Create(AObject : TBeObject; win : TCPlusObject); cdecl; external BePascalLibName name 'BScreen_Create';
|
||||
procedure BScreen_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BScreen_Free';
|
||||
function BScreen_IsValid(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BScreen_IsValid';
|
||||
function BScreen_SetToNext(AObject : TCPlusObject) : Status_t; cdecl; external BePascalLibName name 'BScreen_SetToNext';
|
||||
function BScreen_ColorSpace(AObject : TCPlusObject) : Color_Space; cdecl; external BePascalLibName name 'BScreen_ColorSpace';
|
||||
function BScreen_Frame(AObject : TCPlusObject) : BRect; cdecl; external BePascalLibName name 'BScreen_Frame';
|
||||
function BScreen_ID(AObject : TCPlusObject) : screen_id; cdecl; external BePascalLibName name 'BScreen_ID';
|
||||
function BScreen_WaitForRetrace(AObject : TCPlusObject) : Status_t; cdecl; external BePascalLibName name 'BScreen_WaitForRetrace';
|
||||
function BScreen_WaitForRetrace(AObject : TCPlusObject; timeout : Bigtime_t) : Status_t; cdecl; external BePascalLibName name 'BScreen_WaitForRetrace';
|
||||
function BScreen_IndexForColor(AObject : TCPlusObject; rgb : rgb_color) : integer; cdecl; external BePascalLibName name 'BScreen_IndexForColor';
|
||||
function BScreen_IndexForColor(AObject : TCPlusObject; r : integer; g : integer; b : integer; a : integer) : integer; cdecl; external BePascalLibName name 'BScreen_IndexForColor';
|
||||
function BScreen_ColorForIndex(AObject : TCPlusObject; index : integer) : rgb_color; cdecl; external BePascalLibName name 'BScreen_ColorForIndex';
|
||||
function BScreen_InvertIndex(AObject : TCPlusObject; index : integer) : integer; cdecl; external BePascalLibName name 'BScreen_InvertIndex';
|
||||
function BScreen_ColorMap(AObject : TCPlusObject) : color_map; cdecl; external BePascalLibName name 'BScreen_ColorMap';
|
||||
function BScreen_GetBitmap(AObject : TCPlusObject; screen_shot : TCPlusObject; draw_cursor : boolean; bound : TCPlusObject) : Status_t; cdecl; external BePascalLibName name 'BScreen_GetBitmap';
|
||||
function BScreen_ReadBitmap(AObject : TCPlusObject; buffer : TCPlusObject; draw_cursor : boolean; bound : TCPlusObject) : Status_t; cdecl; external BePascalLibName name 'BScreen_ReadBitmap';
|
||||
function BScreen_DesktopColor(AObject : TCPlusObject) : rgb_color; cdecl; external BePascalLibName name 'BScreen_DesktopColor';
|
||||
function BScreen_DesktopColor(AObject : TCPlusObject; index : Cardinal) : rgb_color; cdecl; external BePascalLibName name 'BScreen_DesktopColor';
|
||||
procedure BScreen_SetDesktopColor(AObject : TCPlusObject; rgb : rgb_color; stick : boolean); cdecl; external BePascalLibName name 'BScreen_SetDesktopColor';
|
||||
procedure BScreen_SetDesktopColor(AObject : TCPlusObject; rgb : rgb_color; index : Cardinal; stick : boolean); cdecl; external BePascalLibName name 'BScreen_SetDesktopColor';
|
||||
function BScreen_ProposeMode(AObject : TCPlusObject; target : display_mode; low : display_mode; high : display_mode) : Status_t; cdecl; external BePascalLibName name 'BScreen_ProposeMode';
|
||||
function BScreen_GetModeList(AObject : TCPlusObject; mode_list : display_mode; count : integer) : Status_t; cdecl; external BePascalLibName name 'BScreen_GetModeList';
|
||||
function BScreen_GetMode(AObject : TCPlusObject; mode : display_mode) : Status_t; cdecl; external BePascalLibName name 'BScreen_GetMode';
|
||||
function BScreen_GetMode(AObject : TCPlusObject; workspace : Cardinal; mode : display_mode) : Status_t; cdecl; external BePascalLibName name 'BScreen_GetMode';
|
||||
function BScreen_SetMode(AObject : TCPlusObject; mode : display_mode; makeDefault : boolean) : Status_t; cdecl; external BePascalLibName name 'BScreen_SetMode';
|
||||
function BScreen_SetMode(AObject : TCPlusObject; workspace : Cardinal; mode : display_mode; makeDefault : boolean) : Status_t; cdecl; external BePascalLibName name 'BScreen_SetMode';
|
||||
function BScreen_GetDeviceInfo(AObject : TCPlusObject; adi : accelerant_device_info) : Status_t; cdecl; external BePascalLibName name 'BScreen_GetDeviceInfo';
|
||||
function BScreen_GetPixelClockLimits(AObject : TCPlusObject; mode : display_mode; low : integer; high : integer) : Status_t; cdecl; external BePascalLibName name 'BScreen_GetPixelClockLimits';
|
||||
function BScreen_GetTimingConstraints(AObject : TCPlusObject; dtc : display_timing_constraints) : Status_t; cdecl; external BePascalLibName name 'BScreen_GetTimingConstraints';
|
||||
function BScreen_SetDPMS(AObject : TCPlusObject; dpms_state : Cardinal) : Status_t; cdecl; external BePascalLibName name 'BScreen_SetDPMS';
|
||||
function BScreen_DPMSState(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BScreen_DPMSState';
|
||||
function BScreen_DPMSCapabilites(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BScreen_DPMSCapabilites';
|
||||
//function BScreen_private_screen(AObject : TCPlusObject) : BPrivateScreen; cdecl; external BePascalLibName name 'BScreen_private_screen';
|
||||
|
||||
implementation
|
||||
|
||||
constructor BScreen.Create;
|
||||
begin
|
||||
CreatePas;
|
||||
CPlusObject := BScreen_Create(Self);
|
||||
end;
|
||||
|
||||
{constructor BScreen.Create(win : BWindow);
|
||||
begin
|
||||
CPlusObject := BScreen_Create(Self, win.CPlusObject);
|
||||
end;
|
||||
}
|
||||
destructor BScreen.Destroy;
|
||||
begin
|
||||
BScreen_Free(CPlusObject);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
function BScreen.IsValid : boolean;
|
||||
begin
|
||||
Result := BScreen_IsValid(CPlusObject);
|
||||
end;
|
||||
|
||||
function BScreen.SetToNext : Status_t;
|
||||
begin
|
||||
Result := BScreen_SetToNext(CPlusObject);
|
||||
end;
|
||||
|
||||
function BScreen.ColorSpace : Color_Space;
|
||||
begin
|
||||
Result := BScreen_ColorSpace(CPlusObject);
|
||||
end;
|
||||
|
||||
function BScreen.Frame : BRect;
|
||||
begin
|
||||
Result := BScreen_Frame(CPlusObject);
|
||||
end;
|
||||
|
||||
function BScreen.ID : screen_id;
|
||||
begin
|
||||
Result := BScreen_ID(CPlusObject);
|
||||
end;
|
||||
|
||||
function BScreen.WaitForRetrace : Status_t;
|
||||
begin
|
||||
Result := BScreen_WaitForRetrace(CPlusObject);
|
||||
end;
|
||||
|
||||
function BScreen.WaitForRetrace(timeout : Bigtime_t) : Status_t;
|
||||
begin
|
||||
Result := BScreen_WaitForRetrace(CPlusObject, timeout);
|
||||
end;
|
||||
|
||||
function BScreen.IndexForColor(rgb : rgb_color) : integer;
|
||||
begin
|
||||
Result := BScreen_IndexForColor(CPlusObject, rgb);
|
||||
end;
|
||||
|
||||
function BScreen.IndexForColor(r : integer; g : integer; b : integer; a : integer) : integer;
|
||||
begin
|
||||
Result := BScreen_IndexForColor(CPlusObject, r, g, b, a);
|
||||
end;
|
||||
|
||||
function BScreen.ColorForIndex(index : integer) : rgb_color;
|
||||
begin
|
||||
Result := BScreen_ColorForIndex(CPlusObject, index);
|
||||
end;
|
||||
|
||||
function BScreen.InvertIndex(index : integer) : integer;
|
||||
begin
|
||||
Result := BScreen_InvertIndex(CPlusObject, index);
|
||||
end;
|
||||
|
||||
function BScreen.ColorMap : color_map;
|
||||
begin
|
||||
Result := BScreen_ColorMap(CPlusObject);
|
||||
end;
|
||||
|
||||
function BScreen.GetBitmap(screen_shot : BBitmap; draw_cursor : boolean; bound : BRect) : Status_t;
|
||||
begin
|
||||
Result := BScreen_GetBitmap(CPlusObject, screen_shot.CPlusObject, draw_cursor, bound.CPlusObject);
|
||||
end;
|
||||
|
||||
function BScreen.ReadBitmap(buffer : BBitmap; draw_cursor : boolean; bound : BRect) : Status_t;
|
||||
begin
|
||||
Result := BScreen_ReadBitmap(CPlusObject, buffer.CPlusObject, draw_cursor, bound.CPlusObject);
|
||||
end;
|
||||
|
||||
function BScreen.DesktopColor : rgb_color;
|
||||
begin
|
||||
Result := BScreen_DesktopColor(CPlusObject);
|
||||
end;
|
||||
|
||||
function BScreen.DesktopColor(index : Cardinal) : rgb_color;
|
||||
begin
|
||||
Result := BScreen_DesktopColor(CPlusObject, index);
|
||||
end;
|
||||
|
||||
procedure BScreen.SetDesktopColor(rgb : rgb_color; stick : boolean);
|
||||
begin
|
||||
BScreen_SetDesktopColor(CPlusObject, rgb, stick);
|
||||
end;
|
||||
|
||||
procedure BScreen.SetDesktopColor(rgb : rgb_color; index : Cardinal; stick : boolean);
|
||||
begin
|
||||
BScreen_SetDesktopColor(CPlusObject, rgb, index, stick);
|
||||
end;
|
||||
|
||||
function BScreen.ProposeMode(target : display_mode; low : display_mode; high : display_mode) : Status_t;
|
||||
begin
|
||||
Result := BScreen_ProposeMode(CPlusObject, target, low, high);
|
||||
end;
|
||||
|
||||
function BScreen.GetModeList(mode_list : display_mode; count : integer) : Status_t;
|
||||
begin
|
||||
Result := BScreen_GetModeList(CPlusObject, mode_list, count);
|
||||
end;
|
||||
|
||||
function BScreen.GetMode(mode : display_mode) : Status_t;
|
||||
begin
|
||||
Result := BScreen_GetMode(CPlusObject, mode);
|
||||
end;
|
||||
|
||||
function BScreen.GetMode(workspace : Cardinal; mode : display_mode) : Status_t;
|
||||
begin
|
||||
Result := BScreen_GetMode(CPlusObject, workspace, mode);
|
||||
end;
|
||||
|
||||
function BScreen.SetMode(mode : display_mode; makeDefault : boolean) : Status_t;
|
||||
begin
|
||||
Result := BScreen_SetMode(CPlusObject, mode, makeDefault);
|
||||
end;
|
||||
|
||||
function BScreen.SetMode(workspace : Cardinal; mode : display_mode; makeDefault : boolean) : Status_t;
|
||||
begin
|
||||
Result := BScreen_SetMode(CPlusObject, workspace, mode, makeDefault);
|
||||
end;
|
||||
|
||||
function BScreen.GetDeviceInfo(adi : accelerant_device_info) : Status_t;
|
||||
begin
|
||||
Result := BScreen_GetDeviceInfo(CPlusObject, adi);
|
||||
end;
|
||||
|
||||
function BScreen.GetPixelClockLimits(mode : display_mode; low : integer; high : integer) : Status_t;
|
||||
begin
|
||||
Result := BScreen_GetPixelClockLimits(CPlusObject, mode, low, high);
|
||||
end;
|
||||
|
||||
function BScreen.GetTimingConstraints(dtc : display_timing_constraints) : Status_t;
|
||||
begin
|
||||
Result := BScreen_GetTimingConstraints(CPlusObject, dtc);
|
||||
end;
|
||||
|
||||
function BScreen.SetDPMS(dpms_state : Cardinal) : Status_t;
|
||||
begin
|
||||
Result := BScreen_SetDPMS(CPlusObject, dpms_state);
|
||||
end;
|
||||
|
||||
function BScreen.DPMSState : Cardinal;
|
||||
begin
|
||||
Result := BScreen_DPMSState(CPlusObject);
|
||||
end;
|
||||
|
||||
function BScreen.DPMSCapabilites : Cardinal;
|
||||
begin
|
||||
Result := BScreen_DPMSCapabilites(CPlusObject);
|
||||
end;
|
||||
|
||||
{function BScreen.private_screen : BPrivateScreen;
|
||||
begin
|
||||
Result := BScreen_private_screen(CPlusObject);
|
||||
end;
|
||||
}
|
||||
|
||||
|
||||
end.
|
||||
Reference in New Issue
Block a user