Manual Pages for UNIX Darwin command on man Tcl_MacSetEventProc
MyWebUniversity

Manual Pages for UNIX Darwin command on man Tcl_MacSetEventProc

TclMacSetEventProc(3) Tcl Library Procedures TclMacSetEventProc(3)

NAME

TclMacSetEventProc, TclMacConvertTextResource, TclMacEvalResource, TclMacFindResource, TclGetOSTypeFromObj, TclSetOSTypeObj,

TclNewOSTypeObj - procedures to handle Macintosh resources and other

Macintosh specifics

SYNOPSIS

##iinncclluuddee <>

int TTccllMMaaccEEvvaallRReessoouurrccee(interp, resourceName, resourceNumber, fileName) char* TTccllMMaaccCCoonnvveerrttTTeexxttRReessoouurrccee(resource) Handle TTccllMMaaccFFiinnddRReessoouurrccee(interp, resourceType, resourceName, resourceNumber, resFileRef, releaseIt) TclObj* TTccllNNeewwOOSSTTyyppeeOObbjj(newOSType) void TTccllSSeettOOSSTTyyppeeOObbjj(objPtr, newOSType) int TTccllGGeettOOSSTTyyppeeFFrroommOObbjj(interp, objPtr, osTypePtr) void TTccllMMaaccSSeettEEvveennttPPrroocc(procPtr) AARRGGUUMMEENNTTSS TclInterp *interp (in) Interpreter to use for error reporting, or NULL if no error reporting is desired. CONST char *resourceName (in) Name of TEXT resource to source, NULL if number should be used. int resourceNumber (in) Resource id of source. CONST char *fileName (in) Name of file to process. NULL if application resource. Handle resource (in) Handle to TEXT resource. long resourceType (in) Type of resource to load.

CONST char *resFileRef (in) Registered resource file ref-

erence, NULL if searching all open resource files. int *releaseIt (out) Should we release this resource when done. int newOSType (in) Int used to initialize the new object or set the object's value.

TclObj *objPtr (in) Object whose internal repre-

sentation is to be set or retrieved. osTypePtr out Place to store the resulting integer. TclMacConvertEventPtr procPtr(in) Reference to the new function to handle all incoming Mac events. IINNTTRROODDUUCCTTIIOONN The described routines are used to implement the Macintosh specific rreessoouurrccee command and the Mac specific notifier.. They manipulate or use Macintosh resources and provide administration for open resource file references.

DESCRIPTION

TTccllMMaaccEEvvaallRReessoouurrccee extends the ssoouurrccee command to Macintosh resources. It sources Tcl code from a Text resource. Currently only sources the resource by name, file IDs may be supported at a later date. TTccllMMaaccCCoonnvveerrttTTeexxttRReessoouurrccee converts a TEXT resource into a Tcl suitable string. It mallocs the returned memory, converts ``\r'' to ``\n'', and

appends a null. The caller has the responsibility for freeing the mem-

ory. TTccllMMaaccFFiinnddRReessoouurrccee provides a higher level interface for loading resources. It is used by rreessoouurrccee rreeaadd. TTccllNNeewwOOSSTTyyppeeOObbjj is used to create a new resource name type object. The object type is "ostype". TTccllSSeettOOSSTTyyppeeOObbjj modifies an object to be a resource type and to have the specified long value. TTccllGGeettOOSSTTyyppeeFFrroommOObbjj attempts to return an int from the Tcl object "objPtr". If the object is not already an int, an attempt will be made to convert it to one.

TTccllMMaaccSSeettEEvveennttPPrroocc sets the event handling procedure for the applica-

tion. This function will be passed all incoming Mac events. This func-

tion usually controls the console or some other entity like Tk. RREESSOOUURRCCEE TTYYPPEESS

Resource types are 4-byte values used by the macintosh resource facil-

ity to tag parts of the resource fork in a file so that the OS knows

how to handle them. As all 4 bytes are restricted to printable charac-

ters such a type can be interpreted as a 4 character string too. KKEEYYWWOORRDDSS macintosh, mac, resource, notifier Tcl 8.1 TclMacSetEventProc(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™