[Previous] [Contents] [Index] [Next]

PfAttach()

Attach to font server

Synopsis:

#include <photon/Pf.h>

struct _Pf_ctrl *PfAttach( const char *device, 
                           long size );

Description:

This function attaches to the font server. The device parameter specifies the prefix name of the server; if it's NULL, the prefix is the value in the PHFONT environment variable, or /dev/phfont if this isn't set. The size parameter specifies the size of a shared-memory region to set up between the task and the server for returning text bitmaps (normally required only by graphics drivers). If this is -1, the value of the PHFONTMEM environment variable is used; if 0, no such memory region is created.

This routine is normally called by PhAttach() as part of the standard Photon initialization sequence. This routine is also automatically invoked by the Pf library when it detects that the font server has been restarted. The font control structure pointer is stored in the global Photon _Ph_ control structure as _Ph_->font.

Instead of calling this function directly, set the two environment variables (PHFONT and PHFONTMEM) to the new values before performing standard Photon initialization.

Returns:

A pointer to an internal control structure if successful, NULL otherwise.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

[Previous] [Contents] [Index] [Next]