lft_dds_t Structure

The lft_dds_t structure is defined in the lft_dds.h file and is defined as lft_dds_t by the typedef storage class specifier. The lft_dds_t structure is a common structure that is shared by the Low Function Terminal (LFT) Configure method and the LFT subsystem.

Most of the lft_dds_t structure is initialized by the configure method's build_dds routine. This routine queries the Object Data Manager (ODM) for all LFT-relevant data. After the build_dds routine has completed its initialization of the lft_dds_t structure, the configure method calls the lft_init routine and passes it the pointer to the lft_dds_t structure. The lft_init routine then copies the lft_dds_t structure from user space into LFT's own local device-dependent structure (DDS) in kernel space. A pointer to this local lft_dds_t structure is then stored in the anchored LFT DDS.

The lft_dds_t structure contains values initialized by LFT, as well as values from the ODM. The values initialized by LFT are the keyboard file pointer (kbd.fp), the display file pointers (displays[i].fp), and the vtmstruct structure pointers (displays[i].vtm_ptr).

The lft_dds_t structure is defined as follows:

typedef struct {
        lft_dev_t       lft;
        lft_kbd_t       kbd;
        int             number_of_displays;
        int             default_disp_index;
        char            *swkbd_file;
        char            *font_file_names;
        int             number_of_fonts;
        uint            start_fkproc;
        lft_disp_t      displays[1];
} lft_dds_t;

The lft_dds_t structure members are defined as follows:

Structure Member Description
lft Specifies a structure that contains the device number and logical name of LFT. The lft structure is initialized by the LFT Configure method. The lft structure is defined as follows:
typedef struct {
        dev_t   devno;
        char    devname[NAMESIZE];
} lft_dev_t;
kbd Specifies a structure that contains keyboard-specific information. The kbd structure is defined as follows:
typedef struct {
dev_t                    devno;
char                     devname[NAMESIZE];
struct file              *fp;
struct diacritic         *diac;
uint                     kbd_type;
number_of_displays Specifies the total number of displays found to be available by LFT's configure method. This reflects the number of entries in the lft_disp_info array.
default_disp_index Specifies an index into the displays array and specifies the display currently in use by LFT. The default_disp_index member is initialized by the LFT Configure method. The value of the default_disp_index member is set to -1 if the default_disp attribute is not found in the ODM. LFT provides an ioctl call that allows the value of the default_disp_index member to be changed after LFT has been initialized.
*swkbd_file Specifies a pointer to the software-keyboard file name. The LFT Configure method allocates space for the software-keyboard file name. LFT copies the software-keyboard file name into kernel space, opens the file, and reads the software-keyboard information into kernel space.
*font_file_names Specifies a pointer to the names of the font files. The LFT Configure method allocates space for the font file names. LFT copies the font file names into kernel space, opens each of the font files, and reads the font information into kernel space. The space allocated in the kernel for holding the font file names is then released.
number_of_fonts Specifies the number of fonts. The number_of_fonts member is initialized by the LFT Configure method.
start_fkproc Specifies a Boolean flag. This flag is set to True if the LFT Configure method finds an fkproc attribute in the ODM for any of the displays associated with LFT. LFT then calls the font server if the flag was set to True.
displays[1] Specifies an array, the size of which is determined by the number of available displays found during the configuration process. The displays[1] structure is defined as follows:
typedef struct {
dev_t                    devno;
char                     devname[NAMESIZE];
int                      font_index;
struct file              *fp;
ushort                   fp_valid:
ushort                   flags;
struct vtmstruct         *vtm_ptr;
} lft_disp_t;

This is an array of lft_disp_t structures, one for each available display. Each structure is tied to a display that has been attached to LFT by the LFT Configure method. The LFT Configure method initializes the device number, device name, and default font index members for each structure associated with an available display. LFT then initializes each vtmstruct structure and *vtm_ptr file pointer associated with a display. The number_of_displays member of the lft_dds_t structure defines how many of the lft_disp_t structures are valid. The lft_disp_t structure members are defined as follows:

devno
Specifies the device number of the display adapter. The LFT Configure method initializes this member.
devname{NAMESIZE]
Specifies the logical name of the adapter. The LFT Configure method initializes this member.
font_index
Specifies an integer which contains the index of the default font to be used by the associated adapter. The LFT Configure method initializes this member.
*fp
Specifies a pointer to an integer which specifies the file pointer of the opened display adapter. The *fp pointer is used when the display needs to be closed. LFT initializes this member.
fp_valid
Specifies a boolean flag that is set to True if LFT can write to this display. LFT initializes this member.
flags
Specifies state flags. Only the APP_IS_DIAG flag is currently used.
*vtm_ptr
Specifies a pointer to a structure of type vtmstruct. The *vtm_ptr structure pointer is used in all virtual device driver (VDD) calls to the display device driver. LFT allocates and initializes the vtmstruct structure.