Seth Woolley's Man Viewer

Macintosh(3) - Tcl_GetOSTypeFromObj, Tcl_MacConvertTextResource, Tcl_MacEvalResource, Tcl_MacFindResource, Tcl_MacSetEventProc, Tcl_NewOSTypeObj, Tcl_SetOSTypeObj, Tcl_GetOSTypeFromObj, Tcl_MacConvertTextResource, Tcl_MacEvalResource, Tcl_MacFindResource, Tcl_MacSetEventProc, Tcl_NewOSTypeObj, Tcl_SetOSTypeObj - procedures to handle Macintosh resources and other Macintosh specifics - man 3 Macintosh

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

Tcl_MacSetEventProc(3)      Tcl Library Procedures      Tcl_MacSetEventProc(3)



NAME
       Tcl_MacSetEventProc,  Tcl_MacConvertTextResource,  Tcl_MacEvalResource,
       Tcl_MacFindResource,      Tcl_GetOSTypeFromObj,       Tcl_SetOSTypeObj,
       Tcl_NewOSTypeObj  -  procedures to handle Macintosh resources and other
       Macintosh specifics

SYNOPSIS
       #include <tcl.h>

       int
       Tcl_MacEvalResource(interp, resourceName, resourceNumber, fileName)

       char*
       Tcl_MacConvertTextResource(resource)

       Handle
       Tcl_MacFindResource(interp, resourceType, resourceName, resourceNumber, resFileRef, releaseIt)

       Tcl_Obj*
       Tcl_NewOSTypeObj(newOSType)

       void
       Tcl_SetOSTypeObj(objPtr, newOSType)

       int
       Tcl_GetOSTypeFromObj(interp, objPtr, osTypePtr)

       void
       Tcl_MacSetEventProc(procPtr)

ARGUMENTS
       Interpreter to use for error(8,n) reporting, or NULL if(3,n) no  error(8,n)  reporting
       is  desired.  Name of TEXT resource to source, NULL if(3,n) number should be
       used.  Resource id of source.  Name of file(1,n) to process. NULL if(3,n)  appli-
       cation  resource.   Handle to TEXT resource.  Type of resource to load.
       Registered resource file(1,n) reference, NULL if(3,n) searching all open(2,3,n) resource
       files.   Should  we  release this resource when done.  Int used to ini-
       tialize the new object or set(7,n,1 builtins) the object's value.  Object whose  inter-
       nal  representation  is  to  be  set(7,n,1 builtins)  or retrieved.  Place to store the
       resulting integer.  Reference to the new function to handle all  incom-
       ing Mac events.


INTRODUCTION
       The  described  routines  are  used to implement the Macintosh specific
       resource command and the Mac specific notifier.. They manipulate or use
       Macintosh  resources  and provide administration for open(2,3,n) resource file(1,n)
       references.


DESCRIPTION
       Tcl_MacEvalResource extends the source command to Macintosh  resources.
       It  sources  Tcl code from a Text resource.  Currently only sources the
       resource by name, file(1,n) IDs may be supported at a later date.

       Tcl_MacConvertTextResource 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.

       Tcl_MacFindResource  provides  a  higher  level  interface  for loading
       resources. It is used by resource read(2,n,1 builtins).

       Tcl_NewOSTypeObj is used to create a new resource name type object. The
       object type is "ostype".

       Tcl_SetOSTypeObj  modifies  an object to be a resource type and to have
       the specified long value.

       Tcl_GetOSTypeFromObj 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.

       Tcl_MacSetEventProc 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(4,n) or some other entity like Tk.


RESOURCE TYPES
       Resource types are 4-byte values used by the macintosh resource  facil-
       ity  to  tag  parts of the resource fork in(1,8) a file(1,n) 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(3,n) too.


KEYWORDS
       macintosh, mac, resource, notifier



Tcl                                   8.1               Tcl_MacSetEventProc(3)

References for this manual (incoming links)