Package Name: lists
with Interfaces.C.Extensions; use Interfaces.C.Extensions;
with Types; use Types;
with Quickdraw; use Quickdraw;
with Controls; use Controls;
package Lists is
--
-- File: Lists.h
--
-- Contains: List Manager Interfaces.
--
-- Version: Technology: System 7.5
-- Package: Universal Interfaces 2.1 in ÒMPW LatestÓ on ETO #18
--
-- Copyright: © 1984-1995 by Apple Computer, Inc.
-- All rights reserved.
lDoVAutoscroll : constant := 2;
lDoHAutoscroll : constant := 1;
lOnlyOne : constant := -128;
lExtendDrag : constant := 64;
lNoDisjoint : constant := 32;
lNoExtend : constant := 16;
lNoRect : constant := 8;
lUseSense : constant := 4;
lNoNilHilite : constant := 2;
lDoVAutoscrollBit : constant := 1;
lDoHAutoscrollBit : constant := 0;
lOnlyOneBit : constant := 7;
lExtendDragBit : constant := 6;
lNoDisjointBit : constant := 5;
lNoExtendBit : constant := 4;
lNoRectBit : constant := 3;
lUseSenseBit : constant := 2;
lNoNilHiliteBit : constant := 1;
lInitMsg : constant := 0;
lDrawMsg : constant := 1;
lHiliteMsg : constant := 2;
lCloseMsg : constant := 3;
uppListSearchProcInfo : constant := 16#00002BE0#; -- FUNCTION (4 byte param, 4 byte param, 2 byte param, 2 byte param): 2 byte result;
uppListClickLoopProcInfo : constant := 16#00000012#; -- Register FUNCTION : 1 byte in D0;
uppListDefProcInfo : constant := 16#000EBD80#; -- PROCEDURE (2 byte param, 1 byte param, 4 byte param, 4 byte param, 2 byte param, 2 byte param, 4 byte param);
uppListCellDrawProcInfo : constant := 16#000EFD80#; -- PROCEDURE (2 byte param, 1 byte param, 4 byte param, 4 byte param, 4 byte param, 2 byte param, 4 byte param);
subtype ListClickLoopUPP is UniversalProcPtr;
subtype ListBounds is Rect;
subtype Cell is Point;
type DataArray is array (0 .. 32000) of Character;
type DataPtr is Access all DataArray;
type DataHandle is Access all DataPtr;
type Short_Integer_Vec_1 is array (0 .. 0) of Short_Integer;
type ListRec is
record
rView : Rect;
port : GrafPtr;
indent : Point;
cellSize : Point;
visible : ListBounds;
vScroll : ControlRef;
hScroll : ControlRef;
selFlags : SInt8;
lActive : Boolean;
lReserved : SInt8;
listFlags : SInt8;
clikTime : Long_Integer;
clikLoc : Point;
mouseLoc : Point;
lClickLoop : ListClickLoopUPP;
lastClick : Cell;
refCon : Long_Integer;
listDefProc : Handle;
userHandle : Handle;
dataBounds : ListBounds;
cells : DataHandle;
maxIndex : Short_Integer;
cellArray : Short_Integer_Vec_1;
end record;
type ListPtr is Access ListRec;
type ListHandle is Access ListPtr;
subtype ListRef is ListHandle;
subtype ListSearchUPP is UniversalProcPtr;
subtype ListDefUPP is UniversalProcPtr;
subtype ListCellDrawUPP is UniversalProcPtr;
type ListSearchProcPtr is access function
(aPtr : in Ptr;
bPtr : in Ptr;
aLen : in Short_Integer;
bLen : in Short_Integer) return Short_Integer;
type ListDefProcPtr is Access procedure
(lMessage : in Short_Integer;
lSelect : in Boolean;
lRect : access Rect;
lCell : in Cell;
lDataOffset : in Short_Integer;
lDataLen : in Short_Integer;
lHandle : in ListRef);
type ListCellDrawProcPtr is Access procedure
(lMessage : in Short_Integer;
lSelect : in Boolean;
lRect : access Rect;
lCell : in Cell;
dataPtr : in Void_Ptr;
lDataLen : in Short_Integer;
lHandle : in ListRef);
function LNew
(rView : access Rect;
dataBounds : access ListBounds;
cSize : in Point;
theProc : in Short_Integer;
theWindow : in WindowRef;
drawIt : in Boolean;
hasGrow : in Boolean;
scrollHoriz : in Boolean;
scrollVert : in Boolean)
return ListRef;
pragma Import (C, LNew, "LNew", "LNew");
procedure LDispose
(lHandle : in ListRef);
pragma Import (C, LDispose, "LDispose", "LDispose");
function LAddColumn
(count : in Short_Integer;
colNum : in Short_Integer;
lHandle : in ListRef)
return Short_Integer;
pragma Import (C, LAddColumn, "LAddColumn", "LAddColumn");
function LAddRow
(count : in Short_Integer;
rowNum : in Short_Integer;
lHandle : in ListRef)
return Short_Integer;
pragma Import (C, LAddRow, "LAddRow", "LAddRow");
procedure LDelColumn
(count : in Short_Integer;
colNum : in Short_Integer;
lHandle : in ListRef);
pragma Import (C, LDelColumn, "LDelColumn", "LDelColumn");
procedure LDelRow
(count : in Short_Integer;
rowNum : in Short_Integer;
lHandle : in ListRef);
pragma Import (C, LDelRow, "LDelRow", "LDelRow");
function LGetSelect
(next : in Boolean;
theCell : access Cell;
lHandle : in ListRef)
return Boolean;
pragma Import (C, LGetSelect, "LGetSelect", "LGetSelect");
function LLastClick
(lHandle : in ListRef)
return Cell;
pragma Import (C, LLastClick, "LLastClick", "LLastClick");
function LNextCell
(hNext : in Boolean;
vNext : in Boolean;
theCell : access Cell;
lHandle : in ListRef)
return Boolean;
pragma Import (C, LNextCell, "LNextCell", "LNextCell");
function LSearch
(dataPtr : in Void_Ptr;
dataLen : in Short_Integer;
searchProc : in ListSearchUPP;
theCell : access Cell;
lHandle : in ListRef)
return Boolean;
pragma Import (C, LSearch, "LSearch", "LSearch");
procedure LSize
(listWidth : in Short_Integer;
listHeight : in Short_Integer;
lHandle : in ListRef);
pragma Import (C, LSize, "LSize", "LSize");
procedure LSetDrawingMode
(drawIt : in Boolean;
lHandle : in ListRef);
pragma Import (C, LSetDrawingMode, "LSetDrawingMode", "LSetDrawingMode");
procedure LScroll
(dCols : in Short_Integer;
dRows : in Short_Integer;
lHandle : in ListRef);
pragma Import (C, LScroll, "LScroll", "LScroll");
procedure LAutoScroll
(lHandle : in ListRef);
pragma Import (C, LAutoScroll, "LAutoScroll", "LAutoScroll");
procedure LUpdate
(theRgn : in RgnHandle;
lHandle : in ListRef);
pragma Import (C, LUpdate, "LUpdate", "LUpdate");
procedure LActivate
(act : in Boolean;
lHandle : in ListRef);
pragma Import (C, LActivate, "LActivate", "LActivate");
procedure LCellSize
(cSize : in Point;
lHandle : in ListRef);
pragma Import (C, LCellSize, "LCellSize", "LCellSize");
function LClick
(pt : in Point;
modifiers : in Short_Integer;
lHandle : in ListRef)
return Boolean;
pragma Import (C, LClick, "LClick", "LClick");
procedure LAddToCell
(dataPtr : in Void_Ptr;
dataLen : in Short_Integer;
theCell : in Cell;
lHandle : in ListRef);
pragma Import (C, LAddToCell, "LAddToCell", "LAddToCell");
procedure LClrCell
(theCell : in Cell;
lHandle : in ListRef);
pragma Import (C, LClrCell, "LClrCell", "LClrCell");
procedure LGetCell
(dataPtr : in Void_Ptr;
dataLen : access Short_Integer;
theCell : in Cell;
lHandle : in ListRef);
pragma Import (C, LGetCell, "LGetCell", "LGetCell");
procedure LRect
(cellRect : access Rect;
theCell : in Cell;
lHandle : in ListRef);
pragma Import (C, LRect, "LRect", "LRect");
procedure LSetCell
(dataPtr : in Void_Ptr;
dataLen : in Short_Integer;
theCell : in Cell;
lHandle : in ListRef);
pragma Import (C, LSetCell, "LSetCell", "LSetCell");
procedure LSetSelect
(setIt : in Boolean;
theCell : in Cell;
lHandle : in ListRef);
pragma Import (C, LSetSelect, "LSetSelect", "LSetSelect");
procedure LDraw
(theCell : in Cell;
lHandle : in ListRef);
pragma Import (C, LDraw, "LDraw", "LDraw");
procedure LGetCellDataLocation
(offset : access Short_Integer;
len : access Short_Integer;
theCell : in Cell;
lHandle : in ListRef);
pragma Import (C, LGetCellDataLocation, "LGetCellDataLocation", "LGetCellDataLocation");
end Lists;