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 | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
graphicsObject | REALgraphics | RB graphics context | |
x1 | int | starting horizontal coordinate | |
y1 | int | starting vertical coordinate | |
x2 | int | final horizontal coordinate | |
y2 | int | ending horizontal coordinate | |
Returns: | void |
REALAccessAppleEvent | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
event | REALappleEvent | RB AppleEvent object | |
Returns: | AppleEvent * | pointer to MacOS AppleEvent |
REALAccessAppleEventReply | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
event | REALappleEvent | RB AppleEvent object | |
Returns: | AppleEvent * | pointer to reply (MacOS) AppleEvent |
REALallocateMenuID | 68k PPC OSX RB 2.1 | ||
| |||
Returns: | int | previously unallocated menu ID |
REALBuildAEDescList | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
event | const AppleEvent * | MacOS AppleEvent | |
bPassOwnership | Boolean | if true, RB disposes of event; if false, you dispose of it | |
Returns: | REALappleEvent | RB AppleEventDescList object |
REALBuildAEObjSpecifier | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
event | const AppleEvent * | MacOS AppleEvent | |
bPassOwnership | Boolean | if true, then RB disposes of event; if false, you dispose of it | |
Returns: | REALappleEvent | RB AppleEventObjSpecifier |
REALBuildAppleEvent | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
event | const AppleEvent * | MacOS AppleEvent | |
bPassOwnership | Boolean | if true, RB disposes of event; if false, you dispose of it | |
Returns: | REALappleEvent | RB AppleEvent object |
REALbuildMovie | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
movie | QT::Movie | QuickTime Movie | |
resRefNum | int | reference number of its resource file (?) | |
bNew | int | 1 if it's a new movie (?) | |
Returns: | REALmovie | RB Movie object |
REALBuildPictureFromDIB | Win RB 2.1 | ||
| |||
Parameters: | |||
hDIB | HANDLE | handle to Win32 DIB data | |
bPassOwnership | Boolean | if false, you release hDIB; if true, RB will release it | |
Returns: | REALpicture | newly-created RB picture object |
REALBuildPictureFromGWorld | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
world | GWorldPtr | pointer to GWorld data | |
bPassOwnership | Boolean | if true, RB deletes world; if false, you delete it | |
Returns: | REALpicture | newly created RB picture |
REALBuildPictureFromPicHandle | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
pic | PicHandle | picture data | |
bPassOwnership | Boolean | if true, RB will delete pic; if false, you delete it | |
Returns: | REALpicture | newly-created RB picture |
REALBuildPictureFromPictureDescription | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
description | REALpictureDescription * | pointer to picture description | |
bPassOwnership | Boolean | if true, RB deletes the data; if false, you delete it | |
Returns: | REALpicture | newly created RB picture (or nil) |
REALBuildSoundFromHandle | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
sound | Handle | handle to MacOS sound data | |
bPassOwnership | Boolean | if true, RB disposes of the data; if false, you dispose of it | |
Returns: | REALsound | RB sound object |
REALBuildString | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
contents | const char * | pointer to a buffer of character data, or NULL | |
length | int | length of buffer (in bytes) | |
Returns: | REALstring | newly created RB string |
REALCString | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
str | REALstring | input RB string | |
Returns: | const char * | pointer to the raw character data |
REALdbCursorFromDBCursor | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
cursor | dbCursor * | ||
defn | REALdbCursorDefinition * | ||
Returns: | REALdbCursor |
REALdbDatabaseFromDBDatabase | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
database | dbDatabase * | ||
defn | REALdbEngineDefinition * | ||
Returns: | REALdbDatabase |
REALDefaultControlCaption | 68k PPC OSX Win RB 2.1 | ||
| |||
Returns: | REALstring | default control caption |
REALDefaultControlFont | 68k PPC OSX Win RB 2.1 | ||
| |||
Returns: | REALstring | name of default control font |
REALDefaultControlFontSize | 68k PPC OSX Win RB 2.1 | ||
| |||
Returns: | unsigned long | default font size for controls |
REALDesignAddDataSource | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
baseName | const char * | ||
szDataSourceName | const char * | ||
data | Ptr | ||
dataLen | int | ||
Returns: | void |
REALDrawPicturePrimitive | Win RB 2.1 | ||
| |||
Parameters: | |||
hDC | HDC | Windows drawing context to draw into | |
pic | REALpicture | picture to draw | |
rBounds | const Rect * | destination rectangle | |
bTransparent | int | 1 for transparent, 0 for opaque | |
Returns: | void |
REALDrawPicturePrimitive | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
pic | REALpicture | picture to draw | |
rBounds | const Rect * | destination rectangle | |
bTransparent | int | 1 for transparent, 0 for opaque | |
Returns: | void |
REALenterMovies | 68k PPC OSX Win RB 2.1 | ||
| |||
Returns: | int | 1 if QT loaded successfully; 0 otherwise |
REALFolderItemFromFSSpec | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
spec | const FSSpec * | pointer to FSSpec | |
Returns: | REALfolderItem | newly-created FolderItem |
REALFolderItemFromPath | Win RB 2.1 | ||
| |||
Parameters: | |||
path | const char * | C string containing the file path | |
Returns: | REALfolderItem | newly created folder item |
REALFSSpecFromFolderItem | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
spec | FSSpec * | pointer to existing FSSpec record to stuff | |
item | REALfolderItem | FolderItem to stuff into it | |
Returns: | Boolean | always returns true |
REALGetClassData | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALobject | RB object passed to your plugin | |
defn | REALclassDefinition * | pointer to its class definition | |
Returns: | void * | pointer to custom data for this object |
REALGetControlBounds | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control of interest | |
rBounds | Rect * | pointer to Rect structure (must be non-null) | |
Returns: | void |
REALGetControlData | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | RB control instance passed to your plugin | |
defn | REALcontrol * | pointer to control definition | |
Returns: | void * | pointer to your custom control data |
REALGetControlEnabled | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control of interest | |
Returns: | Boolean | value of control's "enabled" property |
REALGetControlGraphics | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control of interest | |
Returns: | REALgraphics | control's graphics context |
REALGetControlHandle | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
control | REALcontrolInstance | RB control instance | |
Returns: | ControlHandle | MacOS control handle |
REALGetControlHWND | Win RB 2.1 | ||
| |||
Parameters: | |||
control | REALcontrolInstance | control of interest | |
Returns: | HWND | control's HWND |
REALGetControlPosition | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control of interest | |
which | long | one of kREALLeft, kLEARTop, kREALWidth, or kREALHeight | |
Returns: | long | requested position property |
REALGetControlVisible | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control of interest | |
Returns: | long | value of control's "visible" property |
REALGetControlWindow | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control of interest | |
Returns: | REALwindow | window containing that control |
REALGetEventInstance | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control which has an event | |
event | REALevent * | which event | |
Returns: | void * | pointer to event-handling code |
REALgetMovieMovie | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALmovie | RB Movie object | |
Returns: | QT::Movie | QuickTime movie |
REALgetMoviePlayerController | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALmoviePlayer | RB MoviePlayer control | |
Returns: | QT::MovieController | QuickTime MovieController |
REALGetPictureGraphics | 68k PPC OSX Win RB 3.0a13 | ||
| |||
Parameters: | |||
picture | REALpicture | RB picture object | |
Returns: | REALgraphics | graphics context of the picture |
REALGetPopupMenuHandle | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
popup | REALpopupMenu | RB PopupMenu object | |
Returns: | MenuHandle | MacOS menu handle |
REALGetWin32Charset | Win RB 2.1 | ||
| |||
Returns: | int | current character set |
REALGetWindowHandle | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
window | REALwindow | RB window of interest | |
Returns: | WindowPtr | MacOS WindowPtr |
REALGraphicsDC | Win RB 2.1 | ||
| |||
Parameters: | |||
context | REALgraphics | RB graphics object of interest | |
Returns: | HDC | its Windows drawing context |
REALGraphicsDrawOffscreenMacControl | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
context | REALgraphics | graphics to draw into | |
mh | ControlHandle | MacOS control handle | |
Returns: | void |
REALinRuntime | 68k PPC OSX Win RB 2.1 | ||
| |||
Returns: | Boolean | true if RB program is running; false when in the view editor |
REALInterfaceRoutine | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
obj | REALobject | object which implements a binding method | |
interfaceName | const char * | binding interface to look for | |
methodName | const char * | specific method to look for | |
Returns: | REALproc | method implementation, or nil if not found |
REALInterpretConstantValue | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
value | REALstring | string or constant such as "#kAuthor" | |
Returns: | REALstring | same string, or its constant value |
REALInvalidateControl | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control to invalidate | |
Returns: | void |
REALInvalidateControlRect | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control to invalidate | |
left | int | left bound of invalidated area | |
top | int | top bound of invalidated area | |
right | int | right bound of invalidated area | |
bottom | int | bottom bound of invalidated area | |
Returns: | void |
REALLockObject | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
obj | REALobject | RB object to lock | |
Returns: | void |
REALLockPictureDescription | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
pic | REALpicture | RB picture to stuff into the description | |
description | REALpictureDescription * | address of description struct to stuff (must be non-null) | |
Returns: | void |
REALLockSoundDescription | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
sound | REALsound | ||
description | REALsoundDescription * | ||
Returns: | void |
REALLockString | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
str | REALstring | string to lock | |
Returns: | void |
REALmarkMovieDirty | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
movie | REALmovie | RB movie object | |
Returns: | void |
REALMarkSocketUsage | 68k PPC OSX Win RB 2.1 | ||
| |||
Returns: | void |
REALMemoryBlockGetPtr | 68k PPC OSX Win RB 3.0a13 | ||
| |||
Parameters: | |||
memBlock | REALmemoryBlock | RB memory block to get the data of | |
Returns: | void* | pointer to the memory block's data |
REALMemoryBlockGetSize | 68k PPC OSX Win RB 3.0a13 | ||
| |||
Parameters: | |||
memBlock | REALmemoryBlock | memory block to get the size of | |
Returns: | int | block size in bytes, or 0 if the memory block is just a pointer |
REALMessageBox | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
text | REALstring | string to display | |
Returns: | void |
REALnewInstance | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
className | const char * | class name as a C string | |
Returns: | REALobject | newly created RB object |
REALNewMemoryBlock | 68k PPC OSX Win RB 3.0a13 | ||
| |||
Parameters: | |||
bytes | int | block size, in bytes | |
Returns: | REALmemoryBlock | newly created memory block, or NULL |
REALNewPicture | 68k PPC OSX Win RB 3.0a13 | ||
| |||
Parameters: | |||
width | long | desired picture width (in pixels) | |
height | long | desired picture height (in pixels) | |
depth | long | bit depth, e.g., 8, 16, or 32 | |
Returns: | REALpicture | newly created picture object, or NULL |
REALpathFromFolderItem | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
item | REALfolderItem | FolderItem to get the path of | |
Returns: | REALstring | its absolute path as an RB string |
REALPictureClearCache | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
pic | REALpicture | clear the cache of this picture | |
Returns: | void |
REALPString | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
str | REALstring | RB 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 | ||
| |||
Parameters: | |||
data | void* | data to which the new MemoryBlock should point | |
Returns: | REALmemoryBlock | newly created memory block, pointing to data |
REALQDGlobals | 68k PPC RB 2.1 | ||
| |||
Returns: | QDGlobals * | pointer to host app's QDGlobals |
REALRefreshWindow | 68k PPC OSX RB 3.0a11 | ||
| |||
Parameters: | |||
macWindowPtr | unsigned long | pointer to the MacOS window | |
Returns: | void |
REALRegisterClass | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
defn | REALclassDefinition * | pointer to a class definition | |
Returns: | void |
REALRegisterClassExtension | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
defn | REALclassDefinition * | pointer to a class definition | |
Returns: | void |
REALRegisterControl | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
defn | REALcontrol * | pointer to a control definition | |
Returns: | void |
REALRegisterDataSource | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
szDatasourceName | const char * | ||
proc | REALDataSourceProc | ||
Returns: | void |
REALRegisterDataSourceInterface | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
szMenuName | const char * | ||
proc | REALDataSourceInterfaceProc | ||
Returns: | void |
REALRegisterDBCursor | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
defn | REALdbCursorDefinition * | pointer to a database cursor definition | |
Returns: | void |
REALRegisterDBEngine | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
defn | REALdbEngineDefinition * | pointer to a database engine definition | |
Returns: | void |
REALRegisterDBTable | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
defn | REALdbTableDefinition * | pointer to a DB table definition | |
Returns: | void |
REALRegisterEventFilter | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
callback | REALEventCallback | callback function to be invoked when an event happens | |
param | long | callback parameter value | |
Returns: | void |
REALRegisterMethod | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
defn | REALmethodDefinition * | pointer to a method definition | |
Returns: | void |
REALreleaseMenuID | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
id | int | menu ID from REALallocateMenuID | |
Returns: | void |
REALSelectGraphics | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
context | REALgraphics | graphics object to prepare for drawing | |
Returns: | void |
REALSetAccelerator | Win RB 3.0b1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control to set the accelerator for | |
key | REALstring | character to use as accelerator key | |
Returns: | void |
REALSetControlEnabled | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control to enable or disable | |
unused | long | not used; just pass 0 | |
enable | Boolean | true to enable, false to disable | |
Returns: | void |
REALSetControlPosition | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control of interest | |
which | long | one of kREALLeft, kREALTop, kREALWidth, kREALHeight | |
value | long | new value for the specified property | |
Returns: | void |
REALSetControlVisible | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control instance | |
visible | unsigned long | 1 to make visible, 0 to make invisible | |
Returns: | void |
REALSetSpecialBackground | Win RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control to find the background of | |
pcolor | COLORREF * | output paramater, stuffed with background color | |
Returns: | void |
REALSetSpecialBackground | 68k PPC OSX RB 2.1 | ||
| |||
Parameters: | |||
instance | REALcontrolInstance | control whose background is to be prepared | |
Returns: | void |
REALSocketClose | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
socket | REALsocket | RB socket to close | |
Returns: | void |
REALSocketConnect | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
socket | REALsocket | socket to connect | |
address | REALstring | IP address to connect it to | |
port | int | port to connect to | |
Returns: | void |
REALSocketGetEvents | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
socket | REALsocket | socket to get events from | |
unused | int | not used; just pass 0 | |
Returns: | int | event mask (meaning unclear) |
REALSocketLastErrorCode | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
socket | REALsocket | socket to get error code of | |
unused | int | not used; just pass 0 | |
Returns: | int | error code |
REALSocketLocalAddressGetter | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
socket | REALsocket | ||
unused | int | ||
Returns: | REALstring |
REALSocketLookahead | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
socket | REALsocket | socket to peek into | |
unused | int | not used; just pass 0 | |
Returns: | REALstring | data in socket's buffer |
REALSocketPoll | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
socket | REALsocket | socket to poll | |
Returns: | void |
REALSocketRead | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
socket | REALsocket | RB socket to read | |
count | int | maximum number of bytes to read | |
Returns: | REALstring | data read from the socket |
REALSocketReadAll | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
socket | REALsocket | RB socket to read | |
Returns: | REALstring | data read from the socket |
REALSocketWrite | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
socket | REALsocket | socket to write to | |
data | REALstring | data to write | |
Returns: | void |
REALUnlockObject | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
obj | REALobject | object to unlock | |
Returns: | void |
REALUnlockPictureDescription | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
pic | REALpicture | RB picture to be unlocked | |
Returns: | void |
REALUnlockSoundDescription | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
sound | REALsound | ||
Returns: | void |
REALUnlockString | 68k PPC OSX Win RB 2.1 | ||
| |||
Parameters: | |||
str | REALstring | RB string to unlock | |
Returns: | void |