Source: /app/hbasic/hbasic/src/structs.h
|
|
|
|
/* **************************************************************************
File: structs.h
Desc: Structure definitions used in other HBasic source files.
----------------------------------------------------------------------------
copyright : (C) 2001 HBasic project (Marcus Engels)
***************************************************************************/
/* **************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/* ----------------------------------------------------------------------- */
/* Classlist: List of classes that will be defined in this source file. */
/* ----------------------------------------------------------------------- */
/* ----------------------------------------------------------------------- */
/* Changelog: Description of important changes within this file. */
/* Please report with date, maintainer and change description. */
/* ----------------------------------------------------------------------- */
#ifndef STRUCTS_H
#define STRUCTS_H
#include "defines.h"
#include
#include
class CBasicDocument;
class CSourceEditData;
class CSheetWindow;
class CSheetEditor;
class QToolButton;
class QListViewItem;
class QFile;
class QString;
class QWidget;
class QPopupMenu;
class QFont;
class QPixmap;
class QVariant;
class QSqlDatabase;
class QVariant;
class MemoryRBlock;
class FormWidget;
class CSelectButton;
class HBIcon;
class HBDbTable;
class HBDbColumn;
typedef struct _SKIP_STRUCTURE SKIP_STRUCTURE;
typedef struct _VAR_DESC VAR_DESC;
typedef struct _PARSER_TYPE_DESC PARSER_TYPE_DESC;
typedef struct _ARRAY_VAR_DESC ARRAY_VAR_DESC;
typedef struct _VAR_STRUCT_DESC VAR_STRUCT_DESC;
typedef struct _COMP_ACCESS_DESC COMP_ACCESS_DESC;
typedef struct _HBOBJECT_ACCESS_DESC HBOBJECT_ACCESS_DESC;
typedef struct _QTCCLASS_ACCESS_DESC QTCCLASS_ACCESS_DESC;
typedef struct _SUB_DESC SUB_DESC;
typedef struct _MACRO_DESC MACRO_DESC;
typedef struct _CLASS_DESC CLASS_DESC;
typedef struct _CLASS_ACCESS_DESC CLASS_ACCESS_DESC;
typedef struct _PROP_DESC PROP_DESC;
typedef struct _TYPE_DESC TYPE_DESC;
typedef struct _CALL_EVENT_DESC CALL_EVENT_DESC;
typedef struct _UTYPE_DESC UTYPE_DESC;
typedef struct _CONST_DESC CONST_DESC;
typedef struct _FORM_DESC FORM_DESC;
typedef struct _FACT_DESC FACT_DESC;
typedef struct _EXPR_DESC EXPR_DESC;
typedef struct _MEM_BLOCK MEM_BLOCK;
typedef struct _GUI_HEADER GUI_HEADER;
typedef struct _RTGUI_HEADER RTGUI_HEADER;
typedef struct _RT_FORM_DESC RT_FORM_DESC;
typedef struct _INIT_GUITAB INIT_GUITAB;
typedef struct _GUI_WIDGET GUI_WIDGET;
typedef struct _FORM_COMP FORM_COMP;
typedef struct _FONT_DESC FONT_DESC;
typedef struct _WINDOW_DESC WINDOW_DESC;
typedef struct _EXPR_PROP_DESC EXPR_PROP_DESC;
typedef struct _CLASS_TYPE_ENTRY CLASS_TYPE_ENTRY;
typedef struct _CLASS_EVENT CLASS_EVENT;
typedef struct _SOCOMP_HEADER SOCOMP_HEADER;
typedef struct _CLASS_PROPERTY CLASS_PROPERTY;
typedef struct _COMP_PROPERTY COMP_PROPERTY;
typedef struct _PCKG_CONST_DESC PCKG_CONST_DESC;
typedef struct _PACKAGE_HEADER PACKAGE_HEADER;
typedef struct _NET_PACKAGE_HEADER NET_PACKAGE_HEADER;
typedef struct _SO_LIBRARY_HEADER SO_LIBRARY_HEADER;
typedef struct _HBASIC_OPTIONS HBASIC_OPTIONS;
typedef struct _FILE_WIN_INFO FILE_WIN_INFO;
typedef struct _FILE_SOURCE_INFO FILE_SOURCE_INFO;
typedef struct _EVT_SIGNAL_DESC EVT_SIGNAL_DESC;
/* ################################################################# */
/* Structures used for database access. */
typedef struct _DB_DESIGN_CONNECT DB_DESIGN_CONNECT;
typedef struct _DB_DESIGN_TABLE DB_DESIGN_TABLE;
class QString;
class DbController;
class DbDesignTable;
// struct _QUERY_COLUMN_DESC
// {
/* Pointer to normal column description from table. */
// TABLE_COLUMN_DESC *table_column;
// short column_width;
// short column_pos;
// short visible;
// short sort_type; // 0=none 1=asc 2=desc 3=group
// QString *value_string;
// };
// struct _DB_TABLE_DESC
// {
// QString *table_name; /* Name of table. */
// short flags; /* flags: see TABLE_* in defines.h */
// QPtrList *columns;
// short num_rows; /* number of rows for table/select */
// };
//struct _TABLE_COLUMN_DESC
//{
// QString *name; // column name
// QString *old_name; // old column name if changed
// short type; // type of the column
// short length; // length of char values
// short primary_key; // true if is primary key
// short allow_null; // True if NULL values allowed
// QVariant *val_default; // Default value or NULL pointer
// short flags; // see defines.h DBCFLAG*
//};
// struct _DB_DESIGN_CONNECT
// {
// short type;
// short flags; /* used when creating queries from connections. */
// HBDbTable *from_table;
// HBDbColumn *from_column;
// HBDbTable *dest_table;
// HBDbColumn *dest_column;
// };
//struct _DB_DESIGN_TABLE
//{
/* ------------------------------------------------- */
/* Position of table picture in query editor window. */
// short xpos;
// short ypos;
// short width;
// short height;
/* ----------------------------------------- */
/* Pointer to normal table description. */
// HBDbTable *table_desc_ptr;
/* ------------------------------------------------------- */
/* Pointer to designer widget (used for editing purposes). */
// DbDesignTable *design_table;
//};
/* -------------------------------------------- */
/* Structure that describes one report element. */
/* All further properties of this element will be stored as a property. */
/* For example: name, xpos, ypos, width, height, font, text, bgcolor ... */
// struct _REPORT_ELEMENT
// {
// short element_type;
// QWidget *report_wgt;
// /* Offset of field source code in source memory block of report */
// long source_offs;
// /* Offset of runtime code for field */
// long rt_code_offs;
// /* Properties for field widget: this also includes geometry */
// QPtrList *property_list;
// };
/* ################################################################# */
typedef struct _VAL_COMP_DESC VAL_COMP_DESC;
struct _VAL_COMP_DESC
{
long icounter; /* Instance counter */
void *memory_ptr; /* Pointer to memory. */
void *desc_ptr; /* Runtime description. */
void *exit_function; /* Destructor method address */
};
/* Runtime value on comp_stack (also used for variants) */
typedef struct _RT_VALUE RT_VALUE;
struct _RT_VALUE
{
union
{
HB_INT_TYPE i;
HB_LONG_TYPE l;
HB_DOUBLE_TYPE d;
HB_LDBL_TYPE ld;
HB_STRING_TYPE st;
HB_ADDRESS adr;
VAL_COMP_DESC c; /* Pointer to compound types = */
/* Component struct class .. */
};
short type; /* See TYPE_* in defines.h */
};
/* ################################################################# */
/* Structures used for hbasic parser etc. */
struct _ARRAY_VAR_DESC
{
short dim_count; /* Number of dimensions in array. */
long entry_size; /* Size of 1 entry in byte. */
long *array_type_desc; /* Array type description used in parser */
};
/* Type description for parser */
struct _PARSER_TYPE_DESC
{
short type;
void *subdesc_ptr;
};
/* ---------------------------------- */
/* Variables description at parsetime */
struct _VAR_DESC
{
char *name;
long offset; /* Offset of variable in runtime memory */
char *type_desc; /* Pointer to type description for variable. */
short typeflag; /* see defines.h for legal values or TFLAG_* */
short var_range; /* 0=global 1=local in module 2=local in function */
/* 3= parameter */
short modifier; /* Variable modifier PUBLIC PRIVATE ... */
/* (see TMOD_* in defines.h) */
void *sub_desc_ptr; /* Pointer to further description structure. */
long *first_class_init_adr; /* Adress table used to init new. */
short *arr_desc_ptr; /* Array description if available. */
CALL_EVENT_DESC *call_event_list; /* List of events for class_var */
VAR_DESC *next_var; /* pointer to following description of same type */
VAR_DESC *subdesc; /* variable description for subentries */
};
struct _PROP_DESC
{
QString *name; /* Name of property */
QVariant *value; /* value of property */
short property_type; /* 0 = QT property / 1 if property of component. */
};
struct _FILE_WIN_INFO
{
short xpos;
short ypos;
short width;
short height;
short is_open;
short is_topped;
};
struct _EVT_SIGNAL_DESC
{
short signal_number; // number of signal in component description
short slot_number; // Position in global signal list
SUB_DESC *method_desc; // Address of event handler method code
char *event_par_desc; // description of event parameters
// Description for component and signal..
// whetever is needed
EVT_SIGNAL_DESC *next_comp_signal;
EVT_SIGNAL_DESC *next_global_signal;
};
/* Structure to describe a block which has been cut or */
/* copied from the source code. */
/* If you change here see also in dependant compiler files!! */
typedef struct _COMP_MEM_HEADER COMP_MEM_HEADER;
struct _COMP_MEM_HEADER
{
long block_length; /* length of block in byte (+ header) */
long byte_used; /* Number of byte used in block */
long pointer_offset; /* Offset of pointer to this memblock in component */
};
/* --------------------------------------------------- */
/* Structure to describe a block which has been cut or */
/* copied from the source code. */
/* This block description may also be used for block */
/* undo operations. */
typedef struct _SOURCE_BLOCK_HEADER SOURCE_BLOCK_HEADER;
struct _SOURCE_BLOCK_HEADER
{
CSourceEditData *source_ptr; /* Source document for undo. */
long source_start_offset; /* Start offset in source block. */
short curspos_startline; /* Cursor position in first block line */
long block_length;
short curspos_endline; /* Cursor position in last block line. */
};
struct _HBASIC_OPTIONS
{
/* Global options for the source code editor */
long bg_color; /* Editor background color */
long bg_marked; /* Editor background in marked blocks */
long text_color; /* Editor text color */
long stdidf_color; /* Editor standard identifier color */
long idf_color; /* Editor other identifier color */
long comm_color; /* Editor comment color */
long string_color; /* Editor string color */
/* Options for GUI Editor (Form designer) */
short snap_to_grid; /* TRUE if moving should snap to grid */
short show_grid; /* TRUE if grid should be visible */
short grid_x; /* distance between grid points */
short grid_y;
/* Current state of toolbars. 1 Bit for each. */
short toolbars;
/* Options for main font. */
QFont edit_font;
QFont dialog_font;
QString translate_file; /* File to read translation from. */
/* window position and size. */
short sel_visible;
short sel_xstart; /* Component selection. */
short sel_ystart;
short sel_width;
short sel_height;
short ptree_visible; /* Project tree. */
short ptree_xstart;
short ptree_ystart;
short ptree_width;
short ptree_height;
short prop_visible;
short prop_xstart; /* property editor. */
short prop_ystart;
short prop_width;
short prop_height;
short colwidth1;
short colwidth2;
/* Flags to show which options changed */
long opt_changed;
/* Size of main window. */
short mainwin_width;
short mainwin_height;
};
/* Description of component property used within expression. */
struct _EXPR_PROP_DESC
{
char *prop_name; /* Name of property for GUI properties. */
char *type_desc_str; /* string that defines type of property. */
void *sub_desc_ptr; /* sub description from expression. */
short prop_type; /* type of property access: see COMPTYPE within defines.h */
void *prop_desc_ptr; /* pointer to further description. */
};
struct _CLASS_TYPE_ENTRY
{
QString *name;
void *desc_ptr;
short type;
};
struct _CLASS_EVENT
{
QString *name;
short event_id;
short par_count;
short flags; /* additional flags to describe event type. */
/* see EFL_* in defines.h (EVENT FLAGS) */
VAR_DESC *par_list; /* List of event parameters. */
long evt_offset; /* Offset for event address within class memory */
QList *parameter;
CLASS_EVENT *next_event; /* Pointer to next event header in list. */
};
struct _CLASS_PROPERTY
{
char *name;
VAR_DESC prop_var; /* Variable description for property. */
/* This is usefull because property will be */
/* treated like sublocal variable on stack. */
char *start_get; /* Start address of get method. */
char *start_set; /* Start address of let method. */
CLASS_PROPERTY *next_property;
};
struct _PCKG_CONST_DESC
{
QString *name;
QVariant *value;
};
struct _NET_PACKAGE_HEADER
{
char *namespace_desc; /* Namespace and class description. */
long namedesc_length; /* Length of allocated memory for */
/* namespace description. */
char *namespace_end; /* Current end of used namespace desc. */
char *load_image; /* ILImage for NET packages. */
};
struct _SOCOMP_HEADER
{
short comp_pos; /* Position in component list of package. */
short comp_instance_count; /* Count number of created instances */
short flags;
short doc_id; /* Reference further HTML docu */
short hbobject_component; /* True if comp is part of HBObject model */
char *class_name; /* Pointer to name of component */
char *class_desc; /* Pointer comp description string. */
char *class_init; /* Start of comp init description. */
char *class_exit; /* Name of comp exit method. */
char *class_qttype; /* name of qt type if exists */
char *default_event; /* Name of default method */
long *icon_start;
long test_comp; /* Test component if needed by parser */
long runtime_desc; /* Pointer or label to runtime description of comp */
CSelectButton *button_wgt; /* Button widget to select component */
PACKAGE_HEADER *parent_pckg; /* Pointer to parent package */
};
struct _SO_LIBRARY_HEADER
{
void *handle;
void *library_desc; /* Pointer start of Library description */
void *global_desc; /* Start of global method and constant descriptions */
short is_relative_path; /* If true search for package in $HBDIR/packages */
QList *class_list; /* List of class definitions in package */
};
struct _PACKAGE_HEADER
{
/* See PCKG_LOAD flags in defines.h */
short load_flags;
short type; /* Package type */
QString *path; /* File-access-path to package */
QString *name; /* Name of package. */
short is_hbobject; /* True for hbasic_hbobject package */
short pckg_pos; /* Position in package list. */
short save_pos; /* Position in save operations. Required because */
/* only loaded packages should be saved. */
long *ptr_function_table; /* Pointer to function table */
long runtime_desc; /* Start of runtime description for package. */
QList *const_list; /* List of constant definitions in package */
union
{
NET_PACKAGE_HEADER net_pckg_desc;
SO_LIBRARY_HEADER so_desc;
};
QString *desc; /* desription of package */
QListViewItem *lv_entry; /* Matching entry in list view */
};
/* ------------------------------------------- */
/* Description of subwindow in Window manager. */
struct _WINDOW_DESC
{
short wintype; /* Type of window (Source / Gui etc. */
short xpos;
short ypos;
short width;
short height;
void *source_ptr; /* Sourcefile (document) for window */
QWidget *win_wgt; /* Pointer to widget for window contents */
short is_topwindow; /* TRUE if window is top window */
short is_open; /* TRUE if window is currently open */
};
/* Description of qt Font serialized */
struct _FONT_DESC
{
char family[50];
short point_size;
short weight;
short italic;
short charset;
short use_default;
};
struct _FORM_COMP
{
void *startfunct;
long evt_load; /* memory for event address (form_load event) */
long evt_click; /* memory for event address (form_click event) */
QWidget *form_wgt;
};
/* ------------------------------------------------------ */
/* Header for runtime form description. Used to create QT */
/* widgets for form when opening the form. */
struct _RT_FORM_DESC
{
char *local_form_var; /* pointer to memory for local variables */
/* !!! must be first in structure */
short win_xstart; /* window position and size. */
short win_ystart;
short win_width;
short win_height;
short *action_adr; /* List of action address and dep. id. */
GUI_HEADER *gui_source; /* start address of gui source description */
RTGUI_HEADER *rt_gui;
long gui_length; /* length of gui structure */
/* NULL if not allocated */
long sz_form_var; /* size of memory block for local variables */
char *menu_desc; /* Description of menubar structure. */
char *tb_desc; /* description of toolbar structure. */
char *load_code; /* form_load method. */
char *close_code; /* form_close method. */
char *init_code; /* Address of initialization code for this form */
char *exit_code; /* Address of finalization code for this form */
short form_type; /* type of runtime form. */
FormWidget *rt_desc_ptr;
};
struct _GUI_HEADER
{
short comp_type; /* 1=HBasic old 2=so new */
SOCOMP_HEADER *soclass_ptr; /* Component description for so comps. */
char *comp_desc;
char *comp_memory; /* Pointer to component memory at edittime. */
short pckg_number; /* Number of parent package */
short comp_pos; /* Position of component in package */
short selected; /* TRUE if component is selected in editor. */
short num_event; /* Number of event definitions in component */
short resize_mode; /* Type of runtime resizing for widget. */
short flags; /* description flags for component type */
long comp_length; /* sizeof main component contents in byte */
char *prop_desc; /* Pointer to further property description. */
QString *name; /* name of this component */
GUI_HEADER *parent; /* Pointer to parent GUI_HEADER description */
RTGUI_HEADER *rt_gui; /* Pointer to runtime GUI description */
long comp_event_label; /* Label number for event start in compiler */
EVT_SIGNAL_DESC *evt_signal_list; // Start of signal events.
QPtrList *sub_comp; /* List of created sub components */
QPtrList *prop_list; /* List of changed properties */
QWidget *wgt; /* the widget for this gui component */
QWidget *no_widget_button; /* Button widget if comp is no widget. */
};
struct _RTGUI_HEADER
{
short comp_type; /* 1=HBasic old 2=so new */
short resize_mode; /* Type of runtime resizing for widget. */
SOCOMP_HEADER *soclass_ptr; /* Component description for so comps. */
/* If you want to insert new variables to this structure */
/* you must insert them behind sub_comp!!! */
char *event_address; /* Starting address of event description. */
char *property_desc_ptr; /* Address of property description */
RTGUI_HEADER *next_comp; /* pointer to next component description */
RTGUI_HEADER *sub_comp; /* pointer to subcomp descriptions. */
short pckg_number; /* Package number of component */
short comp_pos; /* Position of component in package */
short flags; /* description flags for component type */
GUI_HEADER *edit_gui; /* Pointer to edit GUI structure. */
short prop_count; /* Number of properties to set from descr. */
QWidget *wgt; /* the widget for this gui component */
};
struct _COMP_ACCESS_DESC
{
/* TYPE_DIMCOMP for components that have been declared in a Dim statement. */
/* TYPE_GUICOMP for components that have been set up with the gui editor. */
/* TYPE_SCOMPONENT for static access to component method (no comp mem.) */
short comp_type;
short access_type; /* VAR_ACCESS_METHOD VAR_ACCESS_PROPREAD VAR_ACCESS_PROPWRITE */
SOCOMP_HEADER *class_desc_ptr; /* Pointer to class header */
GUI_HEADER *gui_desc_ptr; /* Pointer to GUI_HEADER struct for gui components. */
VAR_DESC *var_desc_ptr; /* Pointer to variable description for DIM comp. */
char *prop_name; /* Name of property for QT property access. */
char *type_desc_str; /* Type description string for property. */
void *sub_desc_ptr; /* Pointer to variable description or GUI_HEADER */
short function_number; /* used when calling component function from function table. */
};
/* Access description to QObject property in parser */
struct _HBOBJECT_ACCESS_DESC
{
short type;
char *prop_name; /* Name of property for QT property access. */
};
struct _QTCCLASS_ACCESS_DESC
{
short access_type;
void *class_desc_ptr;
VAR_DESC *var_desc_ptr; // Pointer to variable desc if var.class
void *sub_desc_ptr;
};
/* Description of variables at parsetime */
struct _VAR_STRUCT_DESC
{
VAR_DESC *var_ptr; /* Pointer to variable description */
long var_offset; /* total variable offset. */
};
/* Description of constants at parsetime */
struct _CONST_DESC
{
char *name;
short type; /* TYPE_INTEGER, TYPE_DOUBLE ... */
CONST_DESC *next; /* pointer to following description of same type */
};
/* ------------------------------------------------------------- */
/* Description of subroutines at parsetime. */
struct _SUB_DESC
{
char *name;
short sub_type; /* see STYPE_* in defines.h */
short modifier; /* see TMOD_* in defines.h */
short property_type; /* 0=sub 1=classmethod */
long code_offset; /* Code address for interpreter or Label number for compiler */
long localvar_offset; /* Offset for variables local in sub */
char *end_var_init_code; /* End of init localvar in interp. */
char *event_comp_name; /* If method handles event name of comp. */
char *event_name;
long *first_unref_call; /* Start of unreferenced calls to this sub */
long *last_unref_call; /* Current end of unref calls list */
char *sub_code_start_adr; /* Start address of subcode in inter. */
VAR_DESC *par_list; /* pointer to start of parameter list */
VAR_DESC *var_list; /* pointer to start of variable list */
CLASS_DESC *sub_class; /* Pointer to class desc if method. */
char *end_header_code_ptr; /* pointer to end of sub desc code */
short end_header_line_pos;
short preread_token; /* TRUE if current token pos was preread */
VAR_DESC return_value; /* Description of function return value. */
SUB_DESC *next_sub_header; /* pointer to next sub header in list */
/* list all for current form or class. */
SUB_DESC *same_name_method;
SUB_DESC *inherited_method;
SUB_DESC *next_sub_parse_order; /* Next sub inparsing order. */
long compiler_sub_desc; /* Parameter description (Label) for compiler */
};
/* Macro definitions found by preparse in global sourcecode */
struct _MACRO_DESC
{
QString *macro_name;
/* Runtime code == NULL if not compiled */
void *runtime_code;
MACRO_DESC *next_macro;
};
/* -------------------------------------------------------------- */
/* Description of class at parser time. */
struct _CLASS_DESC
{
char *class_name;
long localvar_offset; /* max. offset for local variables. */
short modifier; /* see TMOD_* in defines.h */
CLASS_PROPERTY *first_property; /* property description. */
VAR_DESC *first_vardef; /* pointer to start of variable list */
SUB_DESC *constructor; /* Definitions of constructor methods */
SUB_DESC *first_method; /* Methods in the class. */
CLASS_EVENT *first_event; /* Event list */
CLASS_DESC *inherited_from; /* child class if inherited. */
CLASS_DESC *inherited_by; /* parent class desc if inherited. */
CLASS_DESC *next_class;
char *runtime_desc_code; /* Start of runtime class description */
char *runtime_free_code; /* Start of code to free memory */
long comp_desc_label; /* Startlabel for compiler description of class. */
short parser_state; /* Used for parsing state. */
};
/* Description for class access through object variable (o.x). */
struct _CLASS_ACCESS_DESC
{
char *member_name;
short member_type; /* TYPE_CLASSVAR TYPE_CLASSMETH */
VAR_DESC *var_desc_ptr; /* Object variable. */
CLASS_DESC *class_desc_ptr;
};
/* ---------------------------------- */
/* Description of forms at parsetime. */
struct _FORM_DESC
{
char *name; /* pointer to name in form description */
short form_number; /* Unique serial number for this form. */
FORM_DESC *inherited_form; /* != NULL -> pointer to inherited form desc */
FORM_DESC *next_form_header;
CBasicDocument *source_ptr;
};
/* ---------------------------------------------- */
/* Description of type definitions at parsetime. */
struct _TYPE_DESC
{
// short type_id; /* unique identifier within typelist */
short type; /* see list in defines.h (TYPE_*) */
char *type_name;
long entry_length;
char *description;
TYPE_DESC *next;
};
/* ---------------------------------------------- */
/* Description of New statements for a variable. */
struct _CALL_EVENT_DESC
{
long event_address; /* Address of event function to be called. */
long event_offset; /* Offset for event address within comp memory. */
CALL_EVENT_DESC *next_event_ptr; /* Pointer to next event description in list. */
};
/* Description of user-type definitions at parsetime */
/* TYPE ... within basic */
struct _UTYPE_DESC
{
char *name;
char *type_desc; /* pointer to type description for subentry */
long offset;
UTYPE_DESC *next;
};
struct _FACT_DESC
{
short access_type; /* Type of access for components, properties... */
short return_type; /* TYPE_INTEGER, TYPE_DOUBLE ... */
/* TYPE_VARDESC for variables. */
/* sub_desc_ptr points to variable description. */
short request_flag; /* Additional flags for code description. */
/* FR_FLAG_NOCODE, READ, WRITE, PARLIST */
short typeflag; /* special types for variable (see TFLAG_* in defines.h) */
void *sub_desc_ptr; /* pointer to sub description entry */
};
/* -------------------------------------------------------------- */
/* Description parts of an expression (parse_factor return value) */
struct _EXPR_DESC
{
FACT_DESC left_side; /* Left side of operator in expression. */
FACT_DESC right_side; /* Right side of operator in expression. */
short request_type; /* Requested resulttype for expression */
/* used for type matching. */
short op_code; /* used in expression evaluation */
short op_precedence; /* used in expression evaluation */
short op_written; /* used in expression evaluation */
};
/* SKIP_STRUCTURE stores relevant information for jumps */
/* around if then else, while wend ... */
struct _SKIP_STRUCTURE
{
short type; /* see SKIP_x in defines.h */
long offset; /* Offset in block for jump or change */
long offset2; /* some skip structures need 2 long values. */
long offset3; /* some skip structures need 3 long values. */
short var_localtype; /* description for loop variable in for-loop */
short var_returntype;
long var_offset;
short skip_ready; /* TRUE if END has been found but structure cannot be */
/* finalized because others are between. */
};
struct _MEM_BLOCK
{
int type; /* Type of Block (see Blocktypes in defines.h) */
long blength; /* total length of this block in Byte */
long length; /* number of used byte in block */
MEM_BLOCK *next_block; /* Pointer to next Block : NULL if none */
};
/* Structures used for storing Basic files */
/* Each Basic source file starts with a structure FILE_HEADER. */
/* Each kind of block in a basic source file start with a */
/* structure of type FILE_TAG_HEADER. */
typedef struct _FILE_HEADER FILE_HEADER;
typedef struct _FILE_TAG_HEADER FILE_TAG_HEADER;
struct _FILE_HEADER
{
char filetype[4]; /* filetype to recognize correct files */
short version; /* version of saved code structure */
};
struct _FILE_TAG_HEADER
{
short type; /* Mark kind of file block. */
/* see defines.h FTAG_* for possible kinds */
long length; /* length of the next block. This should be */
/* used to skip unknown blocks in the file. */
};
struct _INIT_GUITAB
{
int icon_pos;
char *eventname;
};
/*
---------------------------------------------------------------------
Description of structures for FILE handling.
---------------------------------------------------------------------
*/
typedef struct _PA_FILE_DESC PA_FILE_DESC;
typedef struct _FILE_DESC FILE_DESC;
/* Description of files at parsertime */
/* If the file will be referenced by a name instead of a number the */
/* name of the file immediatly follows the PA_FILE_DESC structure. */
struct _PA_FILE_DESC
{
short total_length; /* length of this entry including file desc name */
short file_number; /* -1 if file is referenced by name */
short access_mode; /* type of file access (read write binary ...) */
long entry_length; /* length of one entry in byte */
long offset; /* offset for runtime description */
PA_FILE_DESC *next;
};
/* ------------------------------------------------- */
/* Define structures to store menubars end toolbars. */
typedef struct _MENU_TITLE MENU_TITLE;
typedef struct _MENU_ENTRY MENU_ENTRY;
typedef struct _TOOLBAR TOOLBAR;
typedef struct _MENU_ACTION MENU_ACTION;
struct _MENU_ENTRY
{
QString *text;
MENU_TITLE *my_menu_header; /* pointer to depending menu header. */
MENU_ACTION *connect_to; /* Connected action entry. */
int item_id;
};
struct _MENU_TITLE
{
QString *text;
QPtrList *entry_list;
QPopupMenu *menu_wgt;
};
struct _TOOLBAR
{
QString *name;
/* ----------------------------------------------- */
/* Get picture for TOOLBAR_ENTRY from MENU_ACTION. */
QPtrList *entry_list;
};
struct _MENU_ACTION
{
/* -------------------------------------------------- */
/* Name of action: used to trigger event action_name. */
QString *name;
HBIcon *menu_icon;
};
/* Subdescription of netclass access in parser. */
typedef struct _NETCLASS_ACCESS_DESC NETCLASS_ACCESS_DESC;
struct _NETCLASS_ACCESS_DESC
{
void *class_desc_ptr;
VAR_DESC *var_desc_ptr; // Pointer to variable desc if var.class
short member_type; // type of member
void *member_desc_ptr;
short return_type;
};
/* Menu/Toolbar and action description structure. */
typedef struct _MENUTOOLBAR_DESC MENUTOOLBAR_DESC;
struct _MENUTOOLBAR_DESC
{
QPtrList menu_list;
QPtrList toolbar_list;
QPtrList action_list;
long comp_menu_label;
long comp_toolbar_label;
long comp_action_label;
};
#endif
Generated by: root on linux on Sun Jul 13 18:06:35 2003, using kdoc 2.0a54. |