REALbasic Plugin API Reference

Each of the public functions in the REALbasic plugin API is document below. The function name is shown in red. The platforms to which it applies are shown on the right, according to the following code:

Under the platforms, the earliest version of REALbasic known to work with each function is shown. This information will allow you to determine the minimum requirements for your plugin (though of course you should test on each version and platform you plan to support).

The parameters (if any) and return value follow the function description; each is given a name, a type, and a brief description.

GraphicsDrawLine
REALAccessAppleEvent
REALAccessAppleEventReply
REALallocateMenuID
REALBuildAEDescList
REALBuildAEObjSpecifier
REALBuildAppleEvent
REALbuildMovie
REALBuildPictureFromDIB
REALBuildPictureFromGWorld
REALBuildPictureFromPicHandle
REALBuildPictureFromPictureDescription
REALBuildSoundFromHandle
REALBuildString
REALCString
REALdbCursorFromDBCursor
REALdbDatabaseFromDBDatabase
REALDefaultControlCaption
REALDefaultControlFont
REALDefaultControlFontSize
REALDesignAddDataSource
REALDrawPicturePrimitive
REALDrawPicturePrimitive
REALenterMovies
REALFolderItemFromFSSpec
REALFolderItemFromPath
REALFSSpecFromFolderItem
REALGetClassData
REALGetControlBounds
REALGetControlData
REALGetControlEnabled
REALGetControlGraphics
REALGetControlHandle
REALGetControlHWND
REALGetControlPosition
REALGetControlVisible
REALGetControlWindow
REALGetEventInstance
REALgetMovieMovie
REALgetMoviePlayerController
REALGetPictureGraphics
REALGetPopupMenuHandle
REALGetWin32Charset
REALGetWindowHandle
REALGraphicsDC
REALGraphicsDrawOffscreenMacControl
REALinRuntime
REALInterfaceRoutine
REALInterpretConstantValue
REALInvalidateControl
REALInvalidateControlRect
REALLockObject
REALLockPictureDescription
REALLockSoundDescription
REALLockString
REALmarkMovieDirty
REALMarkSocketUsage
REALMemoryBlockGetPtr
REALMemoryBlockGetSize
REALMessageBox
REALnewInstance
REALNewMemoryBlock
REALNewPicture
REALpathFromFolderItem
REALPictureClearCache
REALPString
REALPtrToMemoryBlock
REALQDGlobals
REALRefreshWindow
REALRegisterClass
REALRegisterClassExtension
REALRegisterControl
REALRegisterDataSource
REALRegisterDataSourceInterface
REALRegisterDBCursor
REALRegisterDBEngine
REALRegisterDBTable
REALRegisterEventFilter
REALRegisterMethod
REALreleaseMenuID
REALSelectGraphics
REALSetAccelerator
REALSetControlEnabled
REALSetControlPosition
REALSetControlVisible
REALSetSpecialBackground
REALSetSpecialBackground
REALSocketClose
REALSocketConnect
REALSocketGetEvents
REALSocketLastErrorCode
REALSocketLocalAddressGetter
REALSocketLookahead
REALSocketPoll
REALSocketRead
REALSocketReadAll
REALSocketWrite
REALUnlockObject
REALUnlockPictureDescription
REALUnlockSoundDescription
REALUnlockString


GraphicsDrawLine

68k PPC OSX Win
RB 2.1
    Draws a line from (x1,y1) to (x2,y2) in the given graphics context.
Parameters:
graphicsObjectREALgraphicsRB graphics context
x1intstarting horizontal coordinate
y1intstarting vertical coordinate
x2intfinal horizontal coordinate
y2intending horizontal coordinate
Returns:void


REALAccessAppleEvent

68k PPC OSX
RB 2.1
    This function returns a pointer to the MacOS AppleEvent associated with an RB AppleEvent object. RB retains ownership of this data, so you must not dispose of it.
Parameters:
eventREALappleEventRB AppleEvent object
Returns:AppleEvent *pointer to MacOS AppleEvent


REALAccessAppleEventReply

68k PPC OSX
RB 2.1
    This function returns the MacOS AppleEvent stored as the reply of an RB AppleEvent object. RB retains ownership of this data, so you must not dispose of it.
Parameters:
eventREALappleEventRB AppleEvent object
Returns:AppleEvent *pointer to reply (MacOS) AppleEvent


REALallocateMenuID

68k PPC OSX
RB 2.1
    This function returns a number from 1 to 121 (inclusive) which has not already been allocated (or was allocated and then released). You should call REALreleaseMenuID when you're done with this number.
Returns:intpreviously unallocated menu ID


REALBuildAEDescList

68k PPC OSX
RB 2.1
    This function builds an RB AppleEventDescList object from a MacOS AppleEvent. If the second parameter is true, then RB takes ownership of the given data and you should not dispose of it. If it's false, then RB merely copies the data, and you remain responsible for disposing of the original.
Parameters:
eventconst AppleEvent *MacOS AppleEvent
bPassOwnershipBooleanif true, RB disposes of event; if false, you dispose of it
Returns:REALappleEventRB AppleEventDescList object


REALBuildAEObjSpecifier

68k PPC OSX
RB 2.1
    This function builds an RB AppleEventObjSpecifier object from a MacOS AppleEvent. If the second parameter is true, then RB takes ownership of the given data and you should not dispose of it. If it's false, then RB merely copies the data, and you remain responsible for disposing of the original.
Parameters:
eventconst AppleEvent *MacOS AppleEvent
bPassOwnershipBooleanif true, then RB disposes of event; if false, you dispose of it
Returns:REALappleEventRB AppleEventObjSpecifier


REALBuildAppleEvent

68k PPC OSX
RB 2.1
    This function builds an RB AppleEvent object from a MacOS AppleEvent. If the second parameter is true, then RB takes ownership of the given data and you should not dispose of it. If it's false, then RB merely copies the data, and you remain responsible for disposing of the original.
Parameters:
eventconst AppleEvent *MacOS AppleEvent
bPassOwnershipBooleanif true, RB disposes of event; if false, you dispose of it
Returns:REALappleEventRB AppleEvent object


REALbuildMovie

68k PPC OSX
RB 2.1
    This function creates an RB Movie object from a QuickTime Movie. Exact usage is still unclear.
Parameters:
movieQT::MovieQuickTime Movie
resRefNumintreference number of its resource file (?)
bNewint1 if it's a new movie (?)
Returns:REALmovieRB Movie object


REALBuildPictureFromDIB

Win
RB 2.1
    This function converts a Windows DIB image into an RB Picture object. If the second parameter is true, RB takes ownership of the data and you should not delete it. If it's false, RB copies the data, and you remain responsible for deleting the original.
Parameters:
hDIBHANDLEhandle to Win32 DIB data
bPassOwnershipBooleanif false, you release hDIB; if true, RB will release it
Returns:REALpicturenewly-created RB picture object


REALBuildPictureFromGWorld

68k PPC OSX
RB 2.1
    This function constructs an RB picture from the given MacOS GWorld. If the second parameter is true, RB takes ownership of the data and you should not delete it. If it's false, RB copies the data, and you remain responsible for deleting the original. Note that due to an odd feature of MacOS, you will not get the expected result if your GWorld was constructed with a bit depth of 0 and a top/left other than {0,0}. All other combinations work fine.
Parameters:
worldGWorldPtrpointer to GWorld data
bPassOwnershipBooleanif true, RB deletes world; if false, you delete it
Returns:REALpicturenewly created RB picture


REALBuildPictureFromPicHandle

68k PPC OSX
RB 2.1
    This function constructs an RB picture from a MacOS PicHandle. If the second parameter is true, then RB simply takes ownership of the given handle and you should not deallocate it. If it is false, then RB copies the given data, and you remain responsible for deallocating the original.
Parameters:
picPicHandlepicture data
bPassOwnershipBooleanif true, RB will delete pic; if false, you delete it
Returns:REALpicturenewly-created RB picture


REALBuildPictureFromPictureDescription

68k PPC OSX Win
RB 2.1
    Builds an RB picture from a picture description. The REALpictureDescription defines the type of the input data, and contains a reference to it. Currently supported types in Mac OS are: drawableMacintoshPICT, drawableMacintoshCICN, drawableMacintoshIconSuite, drawableMacintoshGWorld. Currently supported types in Win32 are: none. If a type is not supported, this function returns nil.
Parameters:
descriptionREALpictureDescription *pointer to picture description
bPassOwnershipBooleanif true, RB deletes the data; if false, you delete it
Returns:REALpicturenewly created RB picture (or nil)


REALBuildSoundFromHandle

68k PPC OSX
RB 2.1
    This builds an RB sound object from a handle to a MacOS sound. If the second parameter is true, then RB takes ownership of the given handle and you should not dispose of it. If it's false, then RB merely copies the data, and you remain responsible for disposing of the original.
Parameters:
soundHandlehandle to MacOS sound data
bPassOwnershipBooleanif true, RB disposes of the data; if false, you dispose of it
Returns:REALsoundRB sound object


REALBuildString

68k PPC OSX Win
RB 2.1
    This function converts a raw character buffer into a REALbasic string. The data is copied, so you may dispose of your buffer after building the string. Or, you may pass NULL as the first parameter, in which case REALbasic will allocate a string of the requested size, but not copy any data into it (it will be filled with random junk). You can then use REALCString to get this buffer and fill it however you like.
Parameters:
contentsconst char *pointer to a buffer of character data, or NULL
lengthintlength of buffer (in bytes)
Returns:REALstringnewly created RB string


REALCString

68k PPC OSX Win
RB 2.1
    Returns an RB string as an ordinary C string. Warning: the result may contain double-byte characters.
Parameters:
strREALstringinput RB string
Returns:const char *pointer to the raw character data


REALdbCursorFromDBCursor

68k PPC OSX Win
RB 2.1
    Not currently supported.
Parameters:
cursordbCursor *
defnREALdbCursorDefinition *
Returns:REALdbCursor


REALdbDatabaseFromDBDatabase

68k PPC OSX Win
RB 2.1
    pDbCursorFromDBCursor
Parameters:
databasedbDatabase *
defnREALdbEngineDefinition *
Returns:REALdbDatabase


REALDefaultControlCaption

68k PPC OSX Win
RB 2.1
    This function returns the default caption for a control. Use this instead of hard-coding a value such as "Untitled".
Returns:REALstringdefault control caption


REALDefaultControlFont

68k PPC OSX Win
RB 2.1
    This function returns the name of the default font to be used for controls.
Returns:REALstringname of default control font


REALDefaultControlFontSize

68k PPC OSX Win
RB 2.1
    This function returns the default font size to be used with a new control.
Returns:unsigned longdefault font size for controls


REALDesignAddDataSource

68k PPC OSX Win
RB 2.1
    Not currently supported.
Parameters:
baseNameconst char *
szDataSourceNameconst char *
dataPtr
dataLenint
Returns:void


REALDrawPicturePrimitive

Win
RB 2.1
    This is a low-level picture-drawing function which draws the given picture into a Windows drawing context. It is scaled to fit the given rectangle, and will be drawn transparently if bTransparent=1. This could be used, for example, to convert an RB picture into a Windows pixel map.
Parameters:
hDCHDCWindows drawing context to draw into
picREALpicturepicture to draw
rBoundsconst Rect *destination rectangle
bTransparentint1 for transparent, 0 for opaque
Returns:void


REALDrawPicturePrimitive

68k PPC OSX
RB 2.1
    This is a low-level picture-drawing function that draws a picture into the current graphics port. The picture is scaled to fit the given rectangle, and may be transparent. This could be used, for example, to draw an RB picture into an offscreen GWorld for pixel manipulations.
Parameters:
picREALpicturepicture to draw
rBoundsconst Rect *destination rectangle
bTransparentint1 for transparent, 0 for opaque
Returns:void


REALenterMovies

68k PPC OSX Win
RB 2.1
    This function attempts to initialize QuickTime and prepare for playing QuickTime movies.
Returns:int1 if QT loaded successfully; 0 otherwise


REALFolderItemFromFSSpec

68k PPC OSX
RB 2.1
    This function creates an RB FolderItem from the given MacOS FSSpec.
Parameters:
specconst FSSpec *pointer to FSSpec
Returns:REALfolderItemnewly-created FolderItem


REALFolderItemFromPath

Win
RB 2.1
    This function builds an RB FolderItem from a given Windows file path.
Parameters:
pathconst char *C string containing the file path
Returns:REALfolderItemnewly created folder item


REALFSSpecFromFolderItem

68k PPC OSX
RB 2.1
    This function stuffs an RB FolderItem into a MacOS FSSpec.
Parameters:
specFSSpec *pointer to existing FSSpec record to stuff
itemREALfolderItemFolderItem to stuff into it
Returns:Booleanalways returns true


REALGetClassData

68k PPC OSX Win
RB 2.1
    Given an RB object and its class definition, this function returns a pointer to the custom instance data of that object.
Parameters:
instanceREALobjectRB object passed to your plugin
defnREALclassDefinition *pointer to its class definition
Returns:void *pointer to custom data for this object


REALGetControlBounds

68k PPC OSX Win
RB 2.1
    This function returns the bounds rectangle of the given control within its window.
Parameters:
instanceREALcontrolInstancecontrol of interest
rBoundsRect *pointer to Rect structure (must be non-null)
Returns:void


REALGetControlData

68k PPC OSX Win
RB 2.1
    Given a control instance and its definition, this function returns a pointer to the custom control data defined for that control type.
Parameters:
instanceREALcontrolInstanceRB control instance passed to your plugin
defnREALcontrol *pointer to control definition
Returns:void *pointer to your custom control data


REALGetControlEnabled

68k PPC OSX Win
RB 2.1
    This function returns the value of the given control's "enabled" property.
Parameters:
instanceREALcontrolInstancecontrol of interest
Returns:Booleanvalue of control's "enabled" property


REALGetControlGraphics

68k PPC OSX Win
RB 2.1
    This function returns the RB graphics context for the control. Note that this creates a new REALgraphics object and returns it to you. When you're done with it, you must call REALUnlockObject( (REALobject)theGraphics ) to release this object.
Parameters:
instanceREALcontrolInstancecontrol of interest
Returns:REALgraphicscontrol's graphics context


REALGetControlHandle

68k PPC OSX
RB 2.1
    This function returns the MacOS ControlHandle associated with a given RB control.
Parameters:
controlREALcontrolInstanceRB control instance
Returns:ControlHandleMacOS control handle


REALGetControlHWND

Win
RB 2.1
    Returns the Windows HWND associated with the given control.
Parameters:
controlREALcontrolInstancecontrol of interest
Returns:HWNDcontrol's HWND


REALGetControlPosition

68k PPC OSX Win
RB 2.1
    This function returns one of the position properties of the given control. Specify which you want with the second parameter (kREALLeft, kREALTop, kREALWidth, or kREALHeight).
Parameters:
instanceREALcontrolInstancecontrol of interest
whichlongone of kREALLeft, kLEARTop, kREALWidth, or kREALHeight
Returns:longrequested position property


REALGetControlVisible

68k PPC OSX Win
RB 2.1
    This function returns 1 if the given control is visible, 0 if it is invisible. Note that this refers only to the control's "visible" property; it may be 1 even if the control is occluded by other controls, off the bounds of the window, etc.
Parameters:
instanceREALcontrolInstancecontrol of interest
Returns:longvalue of control's "visible" property


REALGetControlWindow

68k PPC OSX Win
RB 2.1
    This function returns the RB window containing a given control.
Parameters:
instanceREALcontrolInstancecontrol of interest
Returns:REALwindowwindow containing that control


REALGetEventInstance

68k PPC OSX Win
RB 2.1
    This function returns the code which implements the event handler, given a control instance and a REALevent. Exact usage is still unclear.
Parameters:
instanceREALcontrolInstancecontrol which has an event
eventREALevent *which event
Returns:void *pointer to event-handling code


REALgetMovieMovie

68k PPC OSX Win
RB 2.1
    This function returns the QuickTime Movie associated with an RB Movie object.
Parameters:
instanceREALmovieRB Movie object
Returns:QT::MovieQuickTime movie


REALgetMoviePlayerController

68k PPC OSX Win
RB 2.1
    This function returns the QuickTime MovieController associated with an RB MoviePlayer control.
Parameters:
instanceREALmoviePlayerRB MoviePlayer control
Returns:QT::MovieControllerQuickTime MovieController


REALGetPictureGraphics

68k PPC OSX Win
RB 3.0a13
    This function returns the RB Graphics context associated with the given picture. The result can be passed to REALGraphicsDC to get a Win32 drawing context, or REALSelectGraphics for MacOS drawing operations.
Parameters:
pictureREALpictureRB picture object
Returns:REALgraphicsgraphics context of the picture


REALGetPopupMenuHandle

68k PPC OSX
RB 2.1
    This function returns the MacOS popup menu handle associated with an RB PopupMenu.
Parameters:
popupREALpopupMenuRB PopupMenu object
Returns:MenuHandleMacOS menu handle


REALGetWin32Charset

Win
RB 2.1
    This function returns a constant indicating the current Windows character set.
Returns:intcurrent character set


REALGetWindowHandle

68k PPC OSX
RB 2.1
    Despite the name, this function returns the MacOS WindowPtr associated with a given RB window.
Parameters:
windowREALwindowRB window of interest
Returns:WindowPtrMacOS WindowPtr


REALGraphicsDC

Win
RB 2.1
    This function returns the Windows drawing context associated with an RB graphics object.
Parameters:
contextREALgraphicsRB graphics object of interest
Returns:HDCits Windows drawing context


REALGraphicsDrawOffscreenMacControl

68k PPC OSX
RB 2.1
    This function draws a MacOS control into the given RB graphics object.
Parameters:
contextREALgraphicsgraphics to draw into
mhControlHandleMacOS control handle
Returns:void


REALinRuntime

68k PPC OSX Win
RB 2.1
    This function returns true if the plugin code is being called as part of a running application (whether compiled or in the IDE). It's false when the plugin is being called from the design environment, e.g., when the user drags your plugin control onto a form. If you have complex or time-consuming procedures (e.g., loading a big library or some such), you should avoid doing these when REALinRuntime returns false, and just draw a simplified representation instead.
Returns:Booleantrue if RB program is running; false when in the view editor


REALInterfaceRoutine

68k PPC OSX Win
RB 2.1
    This function is for supporting binds. It returns the method on the given object which implements the given method name, of the class interface defined by interfaceName.
Parameters:
objREALobjectobject which implements a binding method
interfaceNameconst char *binding interface to look for
methodNameconst char *specific method to look for
Returns:REALprocmethod implementation, or nil if not found


REALInterpretConstantValue

68k PPC OSX Win
RB 2.1
    This function converts a named constant to its value. At runtime, this isn't needed because constants are already converted during compilation. But you can use this in the IDE design environment to interpret parameter values (e.g., control title) which may be specified as constants.
Parameters:
valueREALstringstring or constant such as "#kAuthor"
Returns:REALstringsame string, or its constant value


REALInvalidateControl

68k PPC OSX Win
RB 2.1
    Call this method to mark a control as invalidated -- that is, in need of being redrawn. The control will then be redrawn automatically on the next pass through the event loop.
Parameters:
instanceREALcontrolInstancecontrol to invalidate
Returns:void


REALInvalidateControlRect

68k PPC OSX Win
RB 2.1
    Call this function to invalidate part of a control -- that is, to mark a rectangular area is needing to be redrawn. The control will then be redrawn on the next pass through the event loop.
Parameters:
instanceREALcontrolInstancecontrol to invalidate
leftintleft bound of invalidated area
topinttop bound of invalidated area
rightintright bound of invalidated area
bottomintbottom bound of invalidated area
Returns:void


REALLockObject

68k PPC OSX Win
RB 2.1
    Increments the reference count of an RB object. Do this whenever you're holding on to the object (e.g., by storing it in some other data structure), and call REALUnlockObject when done. The object will not be destroyed until the reference count goes to zero.
Parameters:
objREALobjectRB object to lock
Returns:void


REALLockPictureDescription

68k PPC OSX Win
RB 2.1
    This function stuffs a pictureDescription with a reference to an RB picture and its type. It also increments the reference count on the RB picture. Be sure to call REALUnlockPictureDescription when you're done with it.
Parameters:
picREALpictureRB picture to stuff into the description
descriptionREALpictureDescription *address of description struct to stuff (must be non-null)
Returns:void


REALLockSoundDescription

68k PPC OSX Win
RB 2.1
    This function does not appear to be implemented in RB 2.1.
Parameters:
soundREALsound
descriptionREALsoundDescription *
Returns:void


REALLockString

68k PPC OSX Win
RB 2.1
    Increment the reference count of a string. Call this when you'll be holding a reference to the string, and then call REALUnlockString when done. The string will not be destroyed until the reference count goes to zero.
Parameters:
strREALstringstring to lock
Returns:void


REALmarkMovieDirty

68k PPC OSX
RB 2.1
    This function marks an RB Movie object as "dirty", i.e., changed since it was loaded from disk. The movie resource will then be updated when the movie is destroyed.
Parameters:
movieREALmovieRB movie object
Returns:void


REALMarkSocketUsage

68k PPC OSX Win
RB 2.1
    Call this function if your plugin uses (or will use) any of the socket classes. It ensures that the socket code is copied into the built application whenever your plugin is used.
Returns:void


REALMemoryBlockGetPtr

68k PPC OSX Win
RB 3.0a13
    This function returns a pointer to the block of data to which an RB memory block points.
Parameters:
memBlockREALmemoryBlockRB memory block to get the data of
Returns:void*pointer to the memory block's data


REALMemoryBlockGetSize

68k PPC OSX Win
RB 3.0a13
    This function returns the number of bytes allocated by the MemoryBlock upon its creation. Note that if the memory block was created (in RB) with the .Ptr accessor, or (in C++) with REALPtrToMemoryBlock, the size will be zero since the data was not allocated by the MemoryBlock and is not owned by it. In that case, there is no way of knowing the "size" of the data to which the MemoryBlock points.
Parameters:
memBlockREALmemoryBlockmemory block to get the size of
Returns:intblock size in bytes, or 0 if the memory block is just a pointer


REALMessageBox

68k PPC OSX Win
RB 2.1
    This function posts a modal dialog with a message and an "OK" button, exactly like using the MsgBox function in REALbasic code.
Parameters:
textREALstringstring to display
Returns:void


REALnewInstance

68k PPC OSX Win
RB 2.1
    Call this function to create a new instance of a given class (by name). The class name can be any intrinsic or plug-in class or control.
Parameters:
classNameconst char *class name as a C string
Returns:REALobjectnewly created RB object


REALNewMemoryBlock

68k PPC OSX Win
RB 3.0a13
    This function creates a new memory block of the given size. The block of memory is initialized to zeros. Use REALMemoryBlockGetPtr to get a pointer to the newly-allocated block of memory.
Parameters:
bytesintblock size, in bytes
Returns:REALmemoryBlocknewly created memory block, or NULL


REALNewPicture

68k PPC OSX Win
RB 3.0a13
    Call this function to create a new RB picture object. The picture will be a pixel map of the given dimensions and depth. This function will return 0 (NULL) if there is not enough memory to create the specified picture.
Parameters:
widthlongdesired picture width (in pixels)
heightlongdesired picture height (in pixels)
depthlongbit depth, e.g., 8, 16, or 32
Returns:REALpicturenewly created picture object, or NULL


REALpathFromFolderItem

68k PPC OSX Win
RB 2.1
    This function returns the absolute path of the given FolderItem.
Parameters:
itemREALfolderItemFolderItem to get the path of
Returns:REALstringits absolute path as an RB string


REALPictureClearCache

68k PPC OSX Win
RB 2.1
    This function clears the drawing cache of the given picture. Why you would want or need to do this is still unclear. This function runs but has no effect under Windows.
Parameters:
picREALpictureclear the cache of this picture
Returns:void


REALPString

68k PPC OSX Win
RB 2.1
    Returns the given RB string as a Pascal string (i.e., a length byte followed by up to 255 character bytes). Warning: the result may contain double-byte characters.
Parameters:
strREALstringRB string to convert
Returns:const unsigned char *first 255 bytes of the string in Pascal string form


REALPtrToMemoryBlock

68k PPC OSX Win
RB 3.0a13
    This function creates a memory block which is points to already-existing data in memory. Such a memory block does not allocate any memory (beyond that needed for internal MemoryBlock housekeeping), and does not attempt to deallocate the given pointer when it dies. This is the same sort of MemoryBlock created by the ".Ptr" accessor in RB. To destroy the new memory block, call REALUnlockObject (typecasting the memory block as a REALobject).
Parameters:
datavoid*data to which the new MemoryBlock should point
Returns:REALmemoryBlocknewly created memory block, pointing to data


REALQDGlobals

68k PPC
RB 2.1
    Returns a pointer to the host application's QuickDraw globals. Plugins should use this instead of the usual 'qd' global variable.
Returns:QDGlobals *pointer to host app's QDGlobals


REALRefreshWindow

68k PPC OSX
RB 3.0a11
    This function refreshes a window. It can be used, for example, to refresh windows while moving a movable modal dialog, in response to an updateEvt from the system.
Parameters:
macWindowPtrunsigned longpointer to the MacOS window
Returns:void


REALRegisterClass

68k PPC OSX Win
RB 2.1
    Call this method to register a new plugin class.
Parameters:
defnREALclassDefinition *pointer to a class definition
Returns:void


REALRegisterClassExtension

68k PPC OSX Win
RB 2.1
    Call this method to register an extension to an existing REALbasic class.
Parameters:
defnREALclassDefinition *pointer to a class definition
Returns:void


REALRegisterControl

68k PPC OSX Win
RB 2.1
    Call this method to register a plugin control.
Parameters:
defnREALcontrol *pointer to a control definition
Returns:void


REALRegisterDataSource

68k PPC OSX Win
RB 2.1
    Not currently supported.
Parameters:
szDatasourceNameconst char *
procREALDataSourceProc
Returns:void


REALRegisterDataSourceInterface

68k PPC OSX Win
RB 2.1
    Not currently supported.
Parameters:
szMenuNameconst char *
procREALDataSourceInterfaceProc
Returns:void


REALRegisterDBCursor

68k PPC OSX Win
RB 2.1
    Call this method to register a database cursor.
Parameters:
defnREALdbCursorDefinition *pointer to a database cursor definition
Returns:void


REALRegisterDBEngine

68k PPC OSX Win
RB 2.1
    Call this method to register a database engine.
Parameters:
defnREALdbEngineDefinition *pointer to a database engine definition
Returns:void


REALRegisterDBTable

68k PPC OSX Win
RB 2.1
    Call this method to register a database table.
Parameters:
defnREALdbTableDefinition *pointer to a DB table definition
Returns:void


REALRegisterEventFilter

68k PPC OSX
RB 2.1
    Use this function to register a plug-in event filter. Specify the function to invoke when an event happens, and an arbitrary parameter which is passed back to your callback whenever it's invoked.
Parameters:
callbackREALEventCallbackcallback function to be invoked when an event happens
paramlongcallback parameter value
Returns:void


REALRegisterMethod

68k PPC OSX Win
RB 2.1
    Call this function to register a plugin method.
Parameters:
defnREALmethodDefinition *pointer to a method definition
Returns:void


REALreleaseMenuID

68k PPC OSX
RB 2.1
    This function releases a number previously given to you by REALallocateMenuID, making that number available for other purposes.
Parameters:
idintmenu ID from REALallocateMenuID
Returns:void


REALSelectGraphics

68k PPC OSX
RB 2.1
    Call this function to make the given graphics object current and ready for drawing.
Parameters:
contextREALgraphicsgraphics object to prepare for drawing
Returns:void


REALSetAccelerator

Win
RB 3.0b1
    This function sets the accelerator key for a Win32 control. When the end-user presses "Alt" and the specified key, your control's click function will be invoked.
Parameters:
instanceREALcontrolInstancecontrol to set the accelerator for
keyREALstringcharacter to use as accelerator key
Returns:void


REALSetControlEnabled

68k PPC OSX Win
RB 2.1
    Use this function to enable or disable a control.
Parameters:
instanceREALcontrolInstancecontrol to enable or disable
unusedlongnot used; just pass 0
enableBooleantrue to enable, false to disable
Returns:void


REALSetControlPosition

68k PPC OSX Win
RB 2.1
    Use this function to change one of the position properties of a given control. Note that though the third parameter is a long int, there may be platform-specific constraints on the actual value used (e.g., under Mac OS, control bounds are all stored internally as short ints).
Parameters:
instanceREALcontrolInstancecontrol of interest
whichlongone of kREALLeft, kREALTop, kREALWidth, kREALHeight
valuelongnew value for the specified property
Returns:void


REALSetControlVisible

68k PPC OSX Win
RB 2.1
    This function sets the value of the control's "visible" property. Setting the visible to 0 hides the control.
Parameters:
instanceREALcontrolInstancecontrol instance
visibleunsigned long1 to make visible, 0 to make invisible
Returns:void


REALSetSpecialBackground

Win
RB 2.1
    This function finds the background color for a control, taking into account any special background colors which may apply.
Parameters:
instanceREALcontrolInstancecontrol to find the background of
pcolorCOLORREF *output paramater, stuffed with background color
Returns:void


REALSetSpecialBackground

68k PPC OSX
RB 2.1
    Call this function under Mac OS to set the current background color and pattern to that appropriate for the given control.
Parameters:
instanceREALcontrolInstancecontrol whose background is to be prepared
Returns:void


REALSocketClose

68k PPC OSX Win
RB 2.1
    Call this function to close an RB socket's connection.
Parameters:
socketREALsocketRB socket to close
Returns:void


REALSocketConnect

68k PPC OSX Win
RB 2.1
    This function connects a socket to the given IP address and port. If there is an error connecting, you'll get a socketEventError in the result of REALSocketGetEvents.
Parameters:
socketREALsocketsocket to connect
addressREALstringIP address to connect it to
portintport to connect to
Returns:void


REALSocketGetEvents

68k PPC OSX Win
RB 2.1
    This function returns the current event mask on the socket, then sets that mask to zero. Exact meaning of this data is still unclear. (The second parameter is reserved for future use; just pass zero.)
Parameters:
socketREALsocketsocket to get events from
unusedintnot used; just pass 0
Returns:intevent mask (meaning unclear)


REALSocketLastErrorCode

68k PPC OSX Win
RB 2.1
    This function returns the last error code on the given RB socket. (The second parameter is reserved for future use; just pass zero.)
Parameters:
socketREALsocketsocket to get error code of
unusedintnot used; just pass 0
Returns:interror code


REALSocketLocalAddressGetter

68k PPC OSX Win
RB 2.1
    This function does exactly the same thing as REALSocketLookAhead, for no good reason. This is a bug and should be fixed at some point. Meanwhile, just use REALSocketLookAhead.
Parameters:
socketREALsocket
unusedint
Returns:REALstring


REALSocketLookahead

68k PPC OSX Win
RB 2.1
    This function "peeks" into the socket's incoming data buffer and returns what data is there, without removing it from the buffer. (The second parameter is reserved for future use; just pass zero.)
Parameters:
socketREALsocketsocket to peek into
unusedintnot used; just pass 0
Returns:REALstringdata in socket's buffer


REALSocketPoll

68k PPC OSX Win
RB 2.1
    This function "idles" the socket, giving it a chance to check for incoming data or to send outgoing data.
Parameters:
socketREALsocketsocket to poll
Returns:void


REALSocketRead

68k PPC OSX Win
RB 2.1
    This function reads a limited amount of data from an RB socket and returns it as a string.
Parameters:
socketREALsocketRB socket to read
countintmaximum number of bytes to read
Returns:REALstringdata read from the socket


REALSocketReadAll

68k PPC OSX Win
RB 2.1
    This function reads all available data from an RB socket and returns it as a REALstring.
Parameters:
socketREALsocketRB socket to read
Returns:REALstringdata read from the socket


REALSocketWrite

68k PPC OSX Win
RB 2.1
    This function writes data to an RB socket.
Parameters:
socketREALsocketsocket to write to
dataREALstringdata to write
Returns:void


REALUnlockObject

68k PPC OSX Win
RB 2.1
    Decrement the reference count for the given object. Call this when you will no longer be holding a reference to the object. You should call this only for objects you had previously locked with REALLockObject. If the reference count goes to zero, the object will be destroyed.
Parameters:
objREALobjectobject to unlock
Returns:void


REALUnlockPictureDescription

68k PPC OSX Win
RB 2.1
    Decrements the reference count on an RB picture. Call this when you're done with a description obtained by REALLockPictureDescription.
Parameters:
picREALpictureRB picture to be unlocked
Returns:void


REALUnlockSoundDescription

68k PPC OSX Win
RB 2.1
    This function does not appear to be implemented in RB 2.1.
Parameters:
soundREALsound
Returns:void


REALUnlockString

68k PPC OSX Win
RB 2.1
    Decrement the reference count for a string. Call this when you'll no longer be holding a reference to it. You should only call it for strings you previously locked with REALLockString. When the reference count goes to zero, the string is destroyed.
Parameters:
strREALstringRB string to unlock
Returns:void