minor compilation fixes.

This commit is contained in:
oscarl-2
2003-12-23 03:10:28 +00:00
parent e00969c6e6
commit 598dbaaa79
9 changed files with 184 additions and 185 deletions

View File

@@ -17,7 +17,6 @@
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
@@ -38,47 +37,49 @@ const
B_ANY_BYTES_PER_ROW = -1;
type
BView = TBeObject; // OCO To avoid circulare reference beetween bitmap.pp and view.pp
// We have to look at a better solution in the futur
// (This one may not work when using functions that use this
// definition)
// OCO To avoid circular reference beetween bitmap.pp and view.pp
// We have to look at a better solution in the future
// (This one may not work when using functions that use this definition)
BView = TBeObject;
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(_bounds : BRect; flags : Longword; depth : color_space;
bytesPerRow_ : Longint {$ifndef VER1_0}= B_ANY_BYTES_PER_ROW{$endif};
screenID : screen_id {$ifndef VER1_0}= B_MAIN_SCREEN_ID{$endif});
constructor Create(_bounds : BRect; depth : color_space;
accepts_views : Boolean {$ifndef VER1_0}= false{$endif};
need_contiguous : Boolean {$ifndef VER1_0}= false{$endif});
constructor Create(const source : BBitmap; accepts_views : Boolean {$ifndef VER1_0}= false{$endif};
need_contiguous : Boolean {$ifndef VER1_0}= false{$endif});
constructor Create(data : BMessage);
destructor Destroy; override;
function Instantiate(data : BMessage) : BArchivable;
function Archive(data : BMessage; deep : Boolean) : status_t;
function Archive(data : BMessage; deep : Boolean{$ifndef VER1_0}= true{$endif}) : status_t;
function InitCheck : status_t;
function IsValid : Boolean;
function LockBits(state : PCardinal) : status_t;
function LockBits(state : PLongword {$ifndef VER1_0}= nil{$endif}) : status_t;
procedure UnlockBits;
function Area : area_id;
function Bits : Pointer;
function BitsLength : Integer;
function BytesPerRow : Integer;
function BitsLength : Longint;
function BytesPerRow : Longint;
function ColorSpace : color_space;
function Bounds : BRect;
procedure SetBits(data : Pointer; length : Integer; offset : Integer;
procedure SetBits(const data : Pointer; length : Longint; offset : Longint;
cs : color_space);
function GetOverlayRestrictions(restrict : overlay_restrictions)
function GetOverlayRestrictions(var restrict : overlay_restrictions)
: 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;
// to mimic a BWindow
procedure AddChild(view : BView); virtual;
function RemoveChild(view : BView) : Boolean; virtual;
function CountChildren : Longint;
function ChildAt(index : Longint) : BView;
function FindView(const view_name : PChar) : BView;
function FindView(point : BPoint) : BView;
function Lock : Boolean;
procedure Unlock;
@@ -88,141 +89,128 @@ type
end;
function BBitmap_Create(AObject : TBeObject; frame : TCPlusObject;
flags : Cardinal; depth : color_space; bytes_per_row : Integer;
screenID : screen_id) : TCPlusObject; cdecl;
external BePascalLibName name 'BBitmap_Create';
flags : Longword; depth : color_space;
bytesPerRow_ : Longint; screenID : screen_id)
: TCPlusObject; cdecl; external BePascalLibName name 'BBitmap_Create';
function BBitmap_Create_1(AObject : TBeObject; frame : TCPlusObject;
depth : color_space; accepts_views : Boolean; need_contiguous : Boolean)
: TCPlusObject; cdecl; external BePascalLibName name 'BBitmap_Create_1';
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';
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';
: TCPlusObject; cdecl; external BePascalLibName name 'BBitmap_Create_3';
procedure BBitmap_Free(AObject : TCPlusObject); cdecl;
external BePascalLibName name 'BBitmap_Free';
procedure BBitmap_Free(AObject : TCPlusObject);
cdecl; external BePascalLibName name 'BBitmap_Free';
function BBitmap_Instantiate(AObject : TCPlusObject; data : TCPlusObject)
: BArchivable; cdecl; external BePascalLibName name 'BBitmap_Instantiate';
: BArchivable;
cdecl; external BePascalLibName name 'BBitmap_Instantiate';
function BBitmap_Archive(AObject : TCPlusObject; data : TCPlusObject;
deep : Boolean) : status_t; cdecl;
external BePascalLibName name 'BBitmap_Archive';
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_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_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';
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';
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_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_Bits(AObject : TCPlusObject) : Pointer;
cdecl; external BePascalLibName name 'BBitmap_Bits';
function BBitmap_BitsLength(AObject : TCPlusObject) : integer; cdecl;
external BePascalLibName name 'BBitmap_BitsLength';
function BBitmap_BitsLength(AObject : TCPlusObject) : Longint;
cdecl; external BePascalLibName name 'BBitmap_BitsLength';
function BBitmap_BytesPerRow(AObject : TCPlusObject) : integer; cdecl;
external BePascalLibName name 'BBitmap_BytesPerRow';
function BBitmap_BytesPerRow(AObject : TCPlusObject) : Longint;
cdecl; external BePascalLibName name 'BBitmap_BytesPerRow';
function BBitmap_ColorSpace(AObject : TCPlusObject) : Color_Space; cdecl;
external BePascalLibName name 'BBitmap_ColorSpace';
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';
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';
procedure BBitmap_SetBits(AObject : TCPlusObject; data : Pointer; length : Longint;
offset : Longint; cs : Color_Space);
cdecl; external BePascalLibName name 'BBitmap_SetBits';
function BBitmap_GetOverlayRestrictions(AObject : TCPlusObject;
restrict : overlay_restrictions) : status_t; cdecl;
external BePascalLibName name 'BBitmap_GetOverlayRestrictions';
function BBitmap_GetOverlayRestrictions(AObject : TCPlusObject; restrict : overlay_restrictions)
: status_t; cdecl; external BePascalLibName name 'BBitmap_GetOverlayRestrictions';
procedure BBitmap_AddChild(AObject : TCPlusObject; view : TCPlusObject); cdecl;
external BePascalLibName name 'BBitmap_AddChild';
procedure BBitmap_AddChild(AObject : TCPlusObject; view : TCPlusObject);
cdecl; external BePascalLibName name 'BBitmap_AddChild';
function BBitmap_RemoveChild(AObject : TCPlusObject; view : TCPlusObject)
: Boolean; cdecl; external BePascalLibName name 'BBitmap_RemoveChild';
: Boolean; cdecl; external BePascalLibName name 'BBitmap_RemoveChild';
function BBitmap_CountChildren(AObject : TCPlusObject) : Integer; cdecl;
external BePascalLibName name 'BBitmap_CountChildren';
function BBitmap_CountChildren(AObject : TCPlusObject) : Longint;
cdecl; external BePascalLibName name 'BBitmap_CountChildren';
function BBitmap_ChildAt(AObject : TCPlusObject; index : Integer) : BView;
cdecl; external BePascalLibName name 'BBitmap_ChildAt';
function BBitmap_ChildAt(AObject : TCPlusObject; index : Longint) : BView;
cdecl; external BePascalLibName name 'BBitmap_ChildAt';
function BBitmap_FindView(AObject : TCPlusObject; view_name : PChar) : BView;
cdecl; external BePascalLibName name 'BBitmap_FindView';
cdecl; external BePascalLibName name 'BBitmap_FindView';
function BBitmap_FindView(AObject : TCPlusObject; point : {BPoint}TCPlusObject)
: BView; cdecl; external BePascalLibName name 'BBitmap_FindView';
: BView; cdecl; external BePascalLibName name 'BBitmap_FindView';
function BBitmap_Lock(AObject : TCPlusObject) : Boolean; cdecl;
external BePascalLibName name 'BBitmap_Lock';
function BBitmap_Lock(AObject : TCPlusObject) : Boolean;
cdecl; external BePascalLibName name 'BBitmap_Lock';
procedure BBitmap_Unlock(AObject : TCPlusObject); cdecl;
external BePascalLibName name 'BBitmap_Unlock';
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_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';
function BBitmap_Perform(AObject : TCPlusObject; d : perform_code; arg : Pointer)
: status_t; cdecl; external BePascalLibName name 'BBitmap_Perform';
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);
constructor BBitmap.Create(_bounds : BRect; flags : Longword; depth : color_space;
bytesPerRow_ : Longint; screenID : screen_id);
begin
CreatePas;
CPlusObject := BBitmap_Create(Self, frame, flags, depth, bytes_per_row,
screenID);
inherited Create;
CPlusObject := BBitmap_Create(Self, _bounds, flags, depth, bytesPerRow_, 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);
constructor BBitmap.Create(_bounds : BRect; depth : color_space;
accepts_views : Boolean; need_contiguous : Boolean);
begin
CreatePas;
CPlusObject := BBitmap_Create_1(Self, frame.CPlusObject, depth,
accepts_views, need_contiguous);
inherited Create;
CPlusObject := BBitmap_Create_1(Self, _bounds.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);
constructor BBitmap.Create(const source : BBitmap; accepts_views : Boolean;
need_contiguous : Boolean);
begin
CreatePas;
inherited Create;
CPlusObject := BBitmap_Create_2(Self, source, accepts_views, need_contiguous);
end;
constructor BBitmap.Create(data : BMessage);
begin
CreatePas;
inherited Create;
CPlusObject := BBitmap_Create_3(Self, data.CPlusObject);
end;
@@ -252,7 +240,7 @@ begin
Result := BBitmap_IsValid(CPlusObject);
end;
function BBitmap.LockBits(state : PCardinal) : status_t;
function BBitmap.LockBits(state : PLongword) : status_t;
begin
Result := BBitmap_LockBits(CPlusObject, state);
end;
@@ -272,12 +260,12 @@ begin
Result := BBitmap_Bits(CPlusObject);
end;
function BBitmap.BitsLength : Integer;
function BBitmap.BitsLength : Longint;
begin
Result := BBitmap_BitsLength(CPlusObject);
end;
function BBitmap.BytesPerRow : Integer;
function BBitmap.BytesPerRow : Longint;
begin
Result := BBitmap_BytesPerRow(CPlusObject);
end;
@@ -292,12 +280,13 @@ begin
Result := BBitmap_Bounds(CPlusObject);
end;
procedure BBitmap.SetBits(data : Pointer; length : Integer; offset : Integer; cs : color_space);
procedure BBitmap.SetBits(const data : Pointer; length : Longint; offset : Longint;
cs : color_space);
begin
BBitmap_SetBits(CPlusObject, data, length, offset, cs);
end;
function BBitmap.GetOverlayRestrictions(restrict : overlay_restrictions) : status_t;
function BBitmap.GetOverlayRestrictions(var restrict : overlay_restrictions) : status_t;
begin
Result := BBitmap_GetOverlayRestrictions(CPlusObject, restrict);
end;
@@ -312,17 +301,17 @@ begin
Result := BBitmap_RemoveChild(CPlusObject, view.CPlusObject);
end;
function BBitmap.CountChildren : Integer;
function BBitmap.CountChildren : Longint;
begin
Result := BBitmap_CountChildren(CPlusObject);
end;
function BBitmap.ChildAt(index : Integer) : BView;
function BBitmap.ChildAt(index : Longint) : BView;
begin
Result := BBitmap_ChildAt(CPlusObject, index);
end;
function BBitmap.FindView(view_name : PChar) : BView;
function BBitmap.FindView(const view_name : PChar) : BView;
begin
Result := BBitmap_FindView(CPlusObject, view_name);
end;
@@ -352,4 +341,4 @@ begin
Result := BBitmap_Perform(CPlusObject, d, arg);
end;
end.
end.

View File

@@ -206,7 +206,7 @@ const
B_VIEWS_SUPPORT_DRAW_BITMAP = $1;
B_BITMAPS_SUPPORT_ATTACHED_VIEWS = $2;
function bitmaps_support_space(space : color_space; support_flags : PLongoword)
function bitmaps_support_space(space : color_space; support_flags : PLongword)
: Boolean; cdecl; external 'be' name 'bitmaps_support_space';
// "pixel_chunk" is the native increment from one pixel starting on an integral

View File

@@ -28,7 +28,7 @@ type
BRadioButton = class(BControl)
public
constructor Create(aframe : BRect; name, aLabel : PChar; message : BMessage;
resizingMode : Longword {$ifndef VER1_0}= B_FOLLOW_LEFT or B_FOLLOW_TOP{$endif};
resizingMode_ : Longword {$ifndef VER1_0}= B_FOLLOW_LEFT or B_FOLLOW_TOP{$endif};
flags : Longword {$ifndef VER1_0}= B_WILL_DRAW or B_NAVIGABLE{$endif}); virtual;
constructor Create(data : BMessage); override;
destructor Destroy; override;
@@ -48,7 +48,7 @@ type
procedure MouseMoved(pt : BPoint; code : Longword; msg : BMessage); override;
procedure DetachedFromWindow; override;
procedure FrameMoved(new_position : BPoint); override;
procedure FrameResized(new_width, new_height : Single); override;
procedure FrameResized(new_width, new_height : Single);// override;
function ResolveSpecifier(msg : BMessage; index : Longint;
specifier : BMessage; form : Longint;
properti : PChar) : BHandler;
@@ -72,7 +72,7 @@ procedure BRadioButton_Free(AObject : TCPlusObject);
function BRadioButton_Instantiate(AObject : TCPlusObject; data : TCPlusObject)
: BArchivable; cdecl; external BePascalLibName name 'BRadioButton_Instantiate';
function BRadioButton_Archive(AObject : TCPlusObject; data : TCPlusObject;
deep : boolean) : status_t;
deep : Boolean) : status_t;
cdecl; external BePascalLibName name 'BRadioButton_Archive';
procedure BRadioButton_Draw(AObject : TCPlusObject; updateRect : BRect);
cdecl; external BePascalLibName name 'BRadioButton_Draw';
@@ -81,9 +81,9 @@ procedure BRadioButton_MouseDown(AObject : TCPlusObject; where : BPoint);
procedure BRadioButton_AttachedToWindow(AObject : TCPlusObject);
cdecl; external BePascalLibName name 'BRadioButton_AttachedToWindow';
procedure BRadioButton_KeyDown(AObject : TCPlusObject; bytes : PChar;
numBytes : integer);
numBytes : Longint);
cdecl; external BePascalLibName name 'BRadioButton_KeyDown';
procedure BRadioButton_SetValue(AObject : TCPlusObject; value : integer);
procedure BRadioButton_SetValue(AObject : TCPlusObject; value : Longint);
cdecl; external BePascalLibName name 'BRadioButton_SetValue';
procedure BRadioButton_GetPreferredSize(AObject : TCPlusObject; width, height : Single);
cdecl; external BePascalLibName name 'BRadioButton_GetPreferredSize';
@@ -98,7 +98,7 @@ procedure BRadioButton_WindowActivated(AObject : TCPlusObject; state : Boolean);
procedure BRadioButton_MouseUp(AObject : TCPlusObject; pt : BPoint);
cdecl; external BePascalLibName name 'BRadioButton_MouseUp';
procedure BRadioButton_MouseMoved(AObject : TCPlusObject; pt : BPoint;
code : Cardinal; msg : TCPlusObject);
code : Longword; msg : TCPlusObject);
cdecl; external BePascalLibName name 'BRadioButton_MouseMoved';
procedure BRadioButton_DetachedFromWindow(AObject : TCPlusObject);
cdecl; external BePascalLibName name 'BRadioButton_DetachedFromWindow';
@@ -107,8 +107,8 @@ procedure BRadioButton_FrameMoved(AObject : TCPlusObject; new_position : TCPlusO
procedure BRadioButton_FrameResized(AObject : TCPlusObject; new_width, new_height : Single);
cdecl; external BePascalLibName name 'BRadioButton_FrameResized';
function BRadioButton_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject;
index : integer; specifier : TCPlusObject;
form : integer; properti : PChar)
index : Longint; specifier : TCPlusObject;
form : Longint; properti : PChar)
: BHandler; cdecl; external BePascalLibName name 'BRadioButton_ResolveSpecifier';
procedure BRadioButton_MakeFocus(AObject : TCPlusObject; state : Boolean);
cdecl; external BePascalLibName name 'BRadioButton_MakeFocus';
@@ -124,12 +124,11 @@ function BRadioButton_Perform(AObject : TCPlusObject; d : perform_code; arg : Po
implementation
constructor BRadioButton.Create(aframe : BRect; name, aLabel : PChar;
message : BMessage; sresizingMode,
sflags : Longword);
message : BMessage; resizingMode_, flags : Longword);
begin
CreatePas;
CPlusObject := BRadioButton_Create(Self, aframe.CPlusObject, name, aLabel,
message.CPlusObject, sresizingMode, sflags);
message.CPlusObject, resizingMode_, flags);
end;
constructor BRadioButton.Create(data : BMessage);
@@ -156,12 +155,12 @@ end;
procedure BRadioButton.Draw(updateRect : BRect);
begin
BRadioButton_Draw(CPlusObject, updateRect.CPlusObject);
BRadioButton_Draw(CPlusObject, updateRect{.CPlusObject});
end;
procedure BRadioButton.MouseDown(where : BPoint);
begin
BRadioButton_MouseDown(CPlusObject, where.CPlusObject);
BRadioButton_MouseDown(CPlusObject, where{.CPlusObject});
end;
procedure BRadioButton.AttachedToWindow;
@@ -169,12 +168,12 @@ begin
BRadioButton_AttachedToWindow(CPlusObject);
end;
procedure BRadioButton.KeyDown(bytes : PChar; numBytes : integer);
procedure BRadioButton.KeyDown(bytes : PChar; numBytes : Longint);
begin
BRadioButton_KeyDown(CPlusObject, bytes, numBytes);
end;
procedure BRadioButton.SetValue(aValue : integer);
procedure BRadioButton.SetValue(aValue : Longint);
begin
BRadioButton_SetValue(CPlusObject, aValue);
end;
@@ -206,12 +205,12 @@ end;
procedure BRadioButton.MouseUp(pt : BPoint);
begin
BRadioButton_MouseUp(CPlusObject, pt.CPlusObject);
BRadioButton_MouseUp(CPlusObject, pt{.CPlusObject});
end;
procedure BRadioButton.MouseMoved(pt : BPoint; code : Longword; msg : BMessage);
begin
BRadioButton_MouseMoved(CPlusObject, pt.CPlusObject, code, msg);
BRadioButton_MouseMoved(CPlusObject, pt{.CPlusObject}, code, msg);
end;
procedure BRadioButton.DetachedFromWindow;
@@ -229,9 +228,12 @@ begin
BRadioButton_FrameResized(CPlusObject, new_width, new_height);
end;
function BRadioButton.ResolveSpecifier(msg : BMessage; index : integer; specifier : BMessage; form : integer; properti : PChar) : BHandler;
function BRadioButton.ResolveSpecifier(msg : BMessage; index : Longint;
specifier : BMessage; form : Longint;
properti : PChar) : BHandler;
begin
Result := BRadioButton_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, properti);
Result := BRadioButton_ResolveSpecifier(CPlusObject, msg.CPlusObject, index,
specifier.CPlusObject, form, properti);
end;
procedure BRadioButton.MakeFocus(state : Boolean);

View File

@@ -24,7 +24,7 @@ type
uid_t = Cardinal; // unsigned int
gid_t = Cardinal; // unsigned int
umode_t = Cardinal // unsigned int
umode_t = Cardinal; // unsigned int
daddr_t = Integer; // int
// bsd

View File

@@ -4,10 +4,11 @@ unit debugger;
interface
uses
{$ifdef CPUI386}
signal,
{$endif CPUI386}
BeBuild, OS, image, SupportDefs;
{.$ifdef CPUI386}
// signal,
{.$endif CPUI386}
// BeBuild,
OS, image, SupportDefs;
// kernel calls
@@ -162,7 +163,8 @@ type
general registers. }
type
cpu_state = packed record
xregs : extended_regs; // fpu/mmx/xmm registers
// this one is in posix/signal.h
// xregs : extended_regs; // fpu/mmx/xmm registers
gs,
reserved0,
fs,
@@ -173,7 +175,7 @@ type
reserved3 : Word;
edi,
esi,
ebp;
ebp,
esp_res,
ebx,
edx,

View File

@@ -4,7 +4,9 @@ unit fs_index;
interface
uses
BeBuild, SupportDefs, dirent;
SupportDefs;
{$I beostypes.inc}
type
index_info = packed record
@@ -17,9 +19,9 @@ type
end;
function *fs_open_index_dir(device : dev_t) : DIR; cdecl; external 'root' name 'fs_open_index_dir';
function fs_open_index_dir(device : dev_t) : DIR; cdecl; external 'root' name 'fs_open_index_dir';
function fs_close_index_dir(var d : DIR) : Integer; cdecl; external 'root' name 'fs_close_index_dir';
function *fs_read_index_dir(var d : DIR) : dirent; cdecl; external 'root' name 'fs_read_index_dir';
function fs_read_index_dir(var d : DIR) : dirent; cdecl; external 'root' name 'fs_read_index_dir';
procedure fs_rewind_index_dir(var d : DIR); cdecl; external 'root' name 'fs_rewind_index_dir';
@@ -35,4 +37,4 @@ function fs_stat_index(device : dev_t; const name : PChar; var buf : index_info)
implementation
end.
end.

View File

@@ -44,7 +44,7 @@ type
BFilePanel = class(TBeObject)
public
constructor Create(mode : file_panel_mode; target : BMessenger;
const start_directory : entryref; node_flavors : integer;
const start_directory : entry_ref; node_flavors : integer;
allow_multiple_selection : Boolean; message : BMessage;
filter : BRefFilter; modal, hide_when_done : Boolean);
destructor Destroy; override;
@@ -80,7 +80,7 @@ type
procedure BRefFilter_Filter(AObject : TCPlusObject);
cdecl; external BePascalLibName name 'BRefFilter_Filter';
function BFilePanel_Create(AObject : TBeObject; mode : file_panel_mode; target : BMessenger;
const start_directory : entryref; node_flavors : integer;
const start_directory : entry_ref; node_flavors : integer;
allow_multiple_selection : Boolean; message : BMessage;
filter : BRefFilter; modal, hide_when_done : Boolean)
: TCPlusObject; cdecl; external BePascalLibName name 'BFilePanel_Create';

View File

@@ -17,7 +17,7 @@
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
}
unit SysLog;
unit _syslog;
interface
@@ -136,34 +136,34 @@ function setlogmask_thread(mask : Integer) : Integer; cdecl; external kBeLibName
implementation
{$INLINE ON}
{.$INLINE ON}
function LOG_PRI(p : Integer) : Integer; inline;
function LOG_PRI(p : Integer) : Integer;// inline;
begin
Result := p and LOG_PRIMASK;
end;
function LOG_MAKEPRI(fac, pri : Integer) : Integer; inline;
function LOG_MAKEPRI(fac, pri : Integer) : Integer;// inline;
begin
Result := (fac shl 3) or (pri);
end;
function LOG_FAC(p : Integer) : Integer; inline;
function LOG_FAC(p : Integer) : Integer;// inline;
begin
Result := (p and LOG_FACMASK) shr 3;
end;
function LOG_MASK(pri : Integer) : Integer; inline;
function LOG_MASK(pri : Integer) : Integer;// inline;
begin
Result := (1 shl pri);
end;
function LOG_UPTO(pri : Integer) : Integer; inline;
function LOG_UPTO(pri : Integer) : Integer;// inline;
begin
Result := (1 shl (pri + 1)) - 1;
end;
function LOG_OPTIONS(p : Integer) : Integer; inline;
function LOG_OPTIONS(p : Integer) : Integer;// inline;
begin
Result := p and LOG_OPTIONSMASK;
end;

View File

@@ -1,47 +1,51 @@
// Description: UTF-8 conversion functions.
unit UTF8;
// Description: UTF-8 conversion functions.
interface
uses
InterfaceDefs, SupportDefs;
//------- Conversion Flavors ---------------------------------
const
B_ISO1_CONVERSION = 0; //* ISO 8859-1
B_ISO2_CONVERSION = 1; //* ISO 8859-2
B_ISO3_CONVERSION = 2; //* ISO 8859-3
B_ISO4_CONVERSION = 3; //* ISO 8859-4
B_ISO5_CONVERSION = 4; //* ISO 8859-5
B_ISO6_CONVERSION = 5; //* ISO 8859-6
B_ISO7_CONVERSION = 6; //* ISO 8859-7
B_ISO8_CONVERSION = 7; //* ISO 8859-8
B_ISO9_CONVERSION = 8; //* ISO 8859-9
B_ISO10_CONVERSION = 9; //* ISO 8859-10
B_MAC_ROMAN_CONVERSION = 10; //* Macintosh Roman
B_SJIS_CONVERSION = 11; //* Shift-JIS
B_EUC_CONVERSION = 12; //* EUC Packed Japanese
B_JIS_CONVERSION = 13; //* JIS X 0208-1990
B_MS_WINDOWS_CONVERSION = 14; //* MS-Windows Codepage 1252
B_UNICODE_CONVERSION = 15; //* Unicode 2.0
B_KOI8R_CONVERSION = 16; //* KOI8-R
B_MS_WINDOWS_1251_CONVERSION = 17; //* MS-Windows Codepage 1251
B_MS_DOS_866_CONVERSION = 18; //* MS-DOS Codepage 866
B_MS_DOS_CONVERSION = 19; //* MS-DOS Codepage 437
B_EUC_KR_CONVERSION = 20; //* EUC Korean
B_ISO13_CONVERSION = 21; //* ISO 8859-13
B_ISO14_CONVERSION = 22; //* ISO 8859-14
B_ISO15_CONVERSION = 23; //* ISO 8859-15
B_ISO1_CONVERSION = 0; // ISO 8859-1
B_ISO2_CONVERSION = 1; // ISO 8859-2
B_ISO3_CONVERSION = 2; // ISO 8859-3
B_ISO4_CONVERSION = 3; // ISO 8859-4
B_ISO5_CONVERSION = 4; // ISO 8859-5
B_ISO6_CONVERSION = 5; // ISO 8859-6
B_ISO7_CONVERSION = 6; // ISO 8859-7
B_ISO8_CONVERSION = 7; // ISO 8859-8
B_ISO9_CONVERSION = 8; // ISO 8859-9
B_ISO10_CONVERSION = 9; // ISO 8859-10
B_MAC_ROMAN_CONVERSION = 10; // Macintosh Roman
B_SJIS_CONVERSION = 11; // Shift-JIS
B_EUC_CONVERSION = 12; // EUC Packed Japanese
B_JIS_CONVERSION = 13; // JIS X 0208-1990
B_MS_WINDOWS_CONVERSION = 14; // MS-Windows Codepage 1252
B_UNICODE_CONVERSION = 15; // Unicode 2.0
B_KOI8R_CONVERSION = 16; // KOI8-R
B_MS_WINDOWS_1251_CONVERSION = 17; // MS-Windows Codepage 1251
B_MS_DOS_866_CONVERSION = 18; // MS-DOS Codepage 866
B_MS_DOS_CONVERSION = 19; // MS-DOS Codepage 437
B_EUC_KR_CONVERSION = 20; // EUC Korean
B_ISO13_CONVERSION = 21; // ISO 8859-13
B_ISO14_CONVERSION = 22; // ISO 8859-14
B_ISO15_CONVERSION = 23; // ISO 8859-15
//------- Conversion Functions --------------------------------
function convert_to_utf8(srcEncoding : Longword; const src : PChar;
srcLen : Longint; dst : PChar; dstLen : Longint;
state : Longint; substitute : Char = B_SUBSTITUTE)
state : Longint; substitute : Char {$ifndef VER1_0}= B_SUBSTITUTE{$endif})
: status_t; cdecl; external 'be' name 'convert_to_utf8__FUlPCcPlPcT2';
// : status_t; cdecl; external 'textencoding' name 'convert_to_utf8__FUlPCcPlPcT2T2c';
function convert_from_utf8(dstEncoding : Longword; const src : PChar;
srcLen : Longint; dst : PChar; dstLen : Longint;
state : Longint; substitute : Char = B_SUBSTITUTE);
state : Longint; substitute : Char {$ifndef VER1_0}= B_SUBSTITUTE{$endif})
: status_t; cdecl; external 'be' name 'convert_from_utf8__FUlPCcPlPcT2';
// : status_t; cdecl; external 'textencoding' name 'convert_from_utf8__FUlPCcPlPcT2T2c';
implementation
end.