📄 pnwintyp.pas
字号:
unit PnWinTyp;
interface
//***************************************************************************
//
// $Id: pnwintyp.h,v 1.29 2000/03/18 02:13:20 grobbins Exp $
//
// Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
//
// http://www.real.com/devzone
//
// This program contains proprietary
// information of Progressive Networks, Inc, and is licensed
// subject to restrictions on use and distribution.
//
//
// Defines the public classes for cross platform windows used in various
// Progressive Networks modules.
//
//
uses
PnTypes;
{$IFDEF _WIN16}
const
BI_BITFIELDS = 3;
{$EXTERNALSYM BI_BITFIELDS}
{$ENDIF _WIN16}
//***************************************************************************
//
// Structure:
//
// PNxSize
//
// Purpose:
//
// Cross Platform definition of a size.
//
//
type
_PNxSize = record
cx: INT32;
cy: INT32;
end;
{$EXTERNALSYM _PNxSize}
PNxSize = _PNxSize;
{$EXTERNALSYM PNxSize}
//***************************************************************************
//
// Structure:
//
// PNxPoint
//
// Purpose:
//
// Cross Platform definition of a point.
//
//
type
_PNxPoint = record
x: INT32;
y: INT32;
end;
{$EXTERNALSYM _PNxPoint}
PNxPoint = _PNxPoint;
{$EXTERNALSYM PNxPoint}
//***************************************************************************
//
// Structure:
//
// PNxRect
//
// Purpose:
//
// Cross Platform definition of a rectangle.
//
//
_PNxRect = record
left: INT32;
top: INT32;
right: INT32;
bottom: INT32;
end;
{$EXTERNALSYM _PNxRect}
PNxRect = _PNxRect;
{$EXTERNALSYM PNxRect}
function PNxRECT_WIDTH(r: PNxRect): INT32;
{$EXTERNALSYM PNxRECT_WIDTH}
function PNxRECT_HEIGHT(r: PNxRect): INT32;
{$EXTERNALSYM PNxRECT_HEIGHT}
//***************************************************************************
//
// Structure:
//
// PNxWindow
//
// Purpose:
//
// Cross Platform definition of a window. This struct is sufficiently
// wide to describe parent or child windows in Windows, MacOS, and
// various flavours of X-Windows.
//
// Data Members:
//
// void* window
// platform specific window handle
//
// ULONG32 x, y
// position of top left corner relative to a client page
//
// ULONG32 width, height
// maximum window size
//
// PNxRect clipRect;
// clipping rectangle in port coordinates
//
//
type
_PNxWindow = record
// NOTE: The window parameter is NOT guaranteed to be unique for every
// corresponding CPNWindow. Use PNxWindowID if this is desired.
window: Pointer;
x: ULONG32;
y: ULONG32;
width: ULONG32;
height: ULONG32;
clipRect: PNxRect;
{$IFDEF _UNIX}
display: Pointer;
{$ENDIF _UNIX}
end;
{$EXTERNALSYM _PNxWindow}
PNxWindow = _PNxWindow;
{$EXTERNALSYM PNxWindow}
PPNxWindow = ^PPNxWindow;
{$NODEFINE PPNxWindow}
PNxWindowID = Pointer;
{$EXTERNALSYM PNxWindowID}
//***************************************************************************
//
// Structure:
//
// PNxEvent
//
// Purpose:
//
// Cross Platform definition of a event. This struct is sufficiently
// wide to describe an event in Windows, MacOS, and various flavours of
// X-Windows.
//
// Data Members:
//
// void* event
// platform specific event ID, can also be one of the several PNxMSG_*
// event IDs which map onto existing platform specific event IDs
// UNIX: X Event Type
//
// void* window
// platform specific window handle
// UNIX: X Window ID
//
// void* param1
// message specific parameter
// UNIX: Display*
//
// void* param2
// Mac: for UpdateEvt, either NULL or RgnHandle to be filled with updated area
// UNIX: Native XEvent*
// RMA_SURFACE_UPDATE PNxWindow*
//
//
type
_PNxEvent = record
event: ULONG32; // IN
window: Pointer; // IN
param1: Pointer; // IN
param2: Pointer; // IN
result: UINT32; // OUT
handled: BOOL; // OUT
end;
{$EXTERNALSYM _PNxEvent}
PNxEvent = _PNxEvent;
{$EXTERNALSYM PNxEvent}
//***************************************************************************
//
// typedef:
//
// PNxRegion
//
// Purpose:
//
// Cross Platform definition of a region. This typedef is redefined as
// appropriate to describe a region in Windows, MacOS, and various
// flavours of X-Windows.
//
//
type
PNxRegion = Pointer;
{$EXTERNALSYM PNxRegion}
//***************************************************************************
//
// typedef:
//
// PNxDC
//
// Purpose:
//
// Cross Platform definition of a device context. This typedef is redefined as
// appropriate to describe a device context in Windows, MacOS, and various
// flavours of X-Windows.
//
//
type
PNxDC = Pointer;
{$EXTERNALSYM PNxDC}
//***************************************************************************
//
// typedef:
//
// PNxFont
//
// Purpose:
//
// Cross Platform definition of a font. This typedef is redefined as
// appropriate to describe a font in Windows, MacOS, and various
// flavours of X-Windows.
//
//
type
PNxFont = Pointer;
{$EXTERNALSYM PNxFont}
//***************************************************************************
//
// typedef:
//
// PNxColor
//
// Purpose:
//
// Cross Platform definition of a color. This typedef is redefined as
// appropriate to describe a font in Windows, MacOS, and various
// flavours of X-Windows.
//
//
type
PNxColor = ULONG32;
{$EXTERNALSYM PNxColor}
//****************************************************************************
//
// typedef:
//
// PNxIcon
//
// Purpose:
//
// Cross Platform definition of a icon. This typedef is redefined as
// appropriate to describe a font in Windows, MacOS, and various
// flavours of X-Windows.
//
//
type
PNxIcon = Pointer;
{$EXTERNALSYM PNxIcon}
//***************************************************************************
//
// typedef:
//
// PNxMenu
//
// Purpose:
//
// Cross Platform definition of a menu. This typedef is redefined as
// appropriate to describe a font in Windows, MacOS, and various
// flavours of X-Windows.
//
//
type
PNxMenu = Pointer;
{$EXTERNALSYM PNxMenu}
//***************************************************************************
//
// typedef:
//
// PNxCursor
//
// Purpose:
//
// Cross Platform definition of a cursor. This typedef is redefined as
// appropriate to describe a cursor in Windows, MacOS, and various
// flavours of X-Windows.
//
//
type
PNxCursor = Pointer;
{$EXTERNALSYM PNxCursor}
implementation
function PNxRECT_WIDTH(r: PNxRect): INT32;
begin
Result := r.right - r.left;
end;
function PNxRECT_HEIGHT(r: PNxRect): INT32;
begin
Result := r.bottom - r.top;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -