Seth Woolley's Man Viewer

Tcl_GetOSTypeFromObj(3) - 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 Tcl_GetOSTypeFromObj

([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
       Tcl_Interp   *interp            (in(1,8))      Interpreter to use for  error(8,n)
                                                 reporting,   or  NULL  if(3,n)  no
                                                 error(8,n) reporting is desired.

       CONST char   *resourceName      (in(1,8))      Name  of  TEXT  resource   to
                                                 source, NULL if(3,n) number should
                                                 be used.

       int          resourceNumber     (in(1,8))      Resource id of source.

       CONST char   *fileName          (in(1,8))      Name of file(1,n) to process. NULL
                                                 if(3,n) application resource.

       Handle       resource           (in(1,8))      Handle to TEXT resource.

       long         resourceType       (in(1,8))      Type of resource to load.

       CONST char   *resFileRef        (in(1,8))      Registered resource file(1,n) ref-
                                                 erence, NULL if(3,n) searching all
                                                 open(2,3,n) resource files.

       int          *releaseIt         (out)     Should    we   release   this
                                                 resource when done.

       int          newOSType          (in(1,8))      Int used  to  initialize  the
                                                 new   object   or   set(7,n,1 builtins)   the
                                                 object's value.

       Tcl_Obj      *objPtr            (in(1,8))      Object whose internal  repre-
                                                 sentation  is  to  be  set(7,n,1 builtins) or
                                                 retrieved.

       osTypePtr    out                          Place to store the  resulting
                                                 integer.

       Tcl_MacConvertEventPtr          procPtr(in(1,8))
                                                 Reference to the new function
                                                 to handle  all  incoming  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)