guy f8c1ec663e Trasformata a catena funzione
da xi_set_text(XI_OBJ* obj, char* text)
a  xi_set_text(XI_OBJ* obj, const char* text)


git-svn-id: svn://10.65.10.50/branches/R_10_00@23125 c028cbd2-c16b-5b4b-a496-9718f37d4682
2015-07-10 14:56:20 +00:00

1527 lines
45 KiB
C
Executable File

/*******************************************************************************
* Copyright 1991-1996 by ORCA Software, Inc. *
* *
* All rights reserved. May not be reproduced or distributed, in printed or *
* electronic form, without permission of ORCA Software, Inc. May not be *
* distributed as object code, separately or linked with other object modules, *
* without permission. *
*******************************************************************************/
#ifndef INCL_XI
#define INCL_XI
#ifndef XI_R4_API
#define OLDXVT_H
#ifndef XVT_INCL_XVT
#include "xvt.h"
#endif
#endif
#ifdef WIN32
#if XIAGADLL == 1
#define XIDLL __declspec(dllexport)
#else
#define XIDLL __declspec(dllimport)
#endif
#else
#define XIDLL
#endif
#include "xiport.h"
#define XI_VERSION "4.0"
#define XI_VERSION_NBR 4.0
#define MEMCLEAR( x ) memset(( char* )&( x ), '\0', ( size_t )sizeof( x ))
/* FORM UNITS */
#define XI_FU_MULTIPLE 8
/* character modifier constants */
#define XI_MOD_SHIFT 0x10000000L
#define XI_MOD_CONTROL 0x20000000L
#define XI_MOD_ALT 0x40000000L /* not yet supported */
#define HSCROLL_CID_CONST 6000
#ifndef XI_R4_API
typedef XinRect XI_RCT;
typedef XinPoint XI_PNT;
#if XVT_CC != XVT_CC_MACCW
#define XinWindow WINDOW
#endif
#endif
typedef enum _e_search_type
{
XI_SEARCH_FOR_FOCUSABLE,
XI_SEARCH_FOR_FIELD,
XI_SEARCH_FOR_TAB_CID,
XI_SEARCH_FOR_INITIAL
}
XI_SEARCH_TYPE;
typedef enum _e_next_type
{
XI_NEXT_FORM_TAB,
XI_NEXT_FORM_BACKTAB,
XI_NEXT_ITF_TAB,
XI_NEXT_ITF_BACKTAB
}
XI_NEXT_TYPE;
typedef enum _e_dequeue_flag
{
XI_DEQUEUE_INIT,
XI_DEQUEUE_COMPLETE,
XI_DEQUEUE_CALL
}
XI_DEQUEUE_FLAG;
typedef long LM;
typedef long STX;
#define XI_ATR_ENABLED 0x1L
#define XI_ATR_EDITMENU 0x2L
#define XI_ATR_AUTOSELECT 0x4L
#define XI_ATR_AUTOSCROLL 0x8L
#define XI_ATR_RJUST 0x10L
#define XI_ATR_BORDER 0x20L
#define XI_ATR_VISIBLE 0x40L
#define XI_ATR_FOCUSBORDER 0x80L
#define XI_ATR_READONLY 0x100L
#define XI_ATR_NAVIGATE 0x200L
#define XI_ATR_TABWRAP 0x400L
#define XI_ATR_PASSWORD 0x800L
#define XI_ATR_SELECTED 0x1000L
#define XI_ATR_VCENTER 0x2000L
#define XI_ATR_SELECTABLE 0x4000L
#define XI_ATR_COL_SELECTABLE 0x8000L
#define XI_ATR_HCENTER 0x10000L
#define XI_AGA_ATR_AUTOEND 0x20000L
#define XI_MAX_EVENT 100
#define XI_NULL_OBJ (( XI_OBJ* ) NULL )
#define XI_SCROLL_PGUP 1001
#define XI_SCROLL_PGDOWN 1002
#define XI_SCROLL_FIRST 1003
#define XI_SCROLL_LAST 1004
#ifdef __cplusplus
extern "C"
{
#endif
extern BOOLEAN xi_false;
#ifdef __cplusplus
}
#endif
typedef struct
{
short row;
short column;
} XI_CELL_SPEC;
typedef enum
{
XIC_ENABLED,
XIC_BACK,
XIC_HILIGHT,
XIC_SHADOW,
XIC_ACTIVE,
XIC_DISABLED,
XIC_DISABLED_BACK,
XIC_WHITE_SPACE,
XIC_ACTIVE_BACK,
XIC_FORE
}
XI_COLOR_PART;
struct _xi_obj;
struct _xi_event;
#ifdef __cplusplus
extern "C"
{
#endif
typedef void ( *XI_EVENT_HANDLER ) ( struct _xi_obj * itf, struct _xi_event * xiev );
#ifdef __cplusplus
}
#endif
/**********************************
* XI Preferences enumeration
**********************************/
typedef enum
{
XI_PREF_OVERLAP,
XI_PREF_FORM_TAB_CHAR,
XI_PREF_FORM_BACKTAB_CHAR,
XI_PREF_SCROLL_INC,
XI_PREF_3D_LOOK,
XI_PREF_USE_APP_DATA,
XI_PREF_AUTOSEL_ON_MOUSE,
XI_PREF_CELL_BTN_ICON_X,
XI_PREF_CELL_BTN_ICON_Y,
XI_PREF_R4_API,
XI_PREF_PASSWORD_CHAR,
XI_PREF_USE_TX_SUPPORT,
XI_PREF_SINGLE_CLICK_COL_SELECT, /* Only when columns are also movable */
XI_PREF_COLUMN_OFFSET,
XI_PREF_SB_OFFSET,
XI_PREF_SB_WIDTH,
XI_PREF_SB_HEIGHT,
XI_PREF_SIZE_CURSOR_RID,
XI_PREF_HAND_CURSOR_RID,
XI_PREF_VSIZE_CURSOR_RID,
XI_PREF_COMBO_ICON,
XI_PREF_COLOR_LIGHT,
XI_PREF_COLOR_CTRL,
XI_PREF_COLOR_DARK,
XI_PREF_OPTIMIZE_CELL_REQUESTS,
XI_PREF_CARET_WIDTH,
XI_PREF_TRIPLE_CLICK_TIME,
XI_PREF_BUTTON_KEY,
XI_PREF_LIMIT_MIN_WIN_SIZE,
XI_PREF_DEFAULT_MAX_LINES_IN_CELL,
XI_PREF_KEEP_FOCUS_FIXED,
XI_PREF_NATIVE_CTRLS,
XI_PREF_ITF_TAB_CHAR,
XI_PREF_ITF_BACKTAB_CHAR,
XI_PREF_ITF_WS_RIGHT, /* in form units */
XI_PREF_ITF_WS_BOTTOM, /* in form units */
XI_PREF_VIR_SP_H,
XI_PREF_VIR_SP_V,
XI_PREF_DBL_PRESSES_BUTTON,
XI_PREF_CONTAINER_GRID_WIDTH, /* in pixels */
XI_PREF_MULTILINE_QUICK_PASTE,
XI_PREF_COLOR_DISABLED,
XI_PREF_BUTTON_HEIGHT,
XI_PREF_BUTTON_PAD,
XI_PREF_HORZ_SPACING,
XI_PREF_VERT_SPACING,
XI_PREF_HORZ_PIXEL_SPACING,
XI_PREF_VERT_PIXEL_SPACING,
XI_PREF_ITF_MIN_TOP, /* in pixels */
XI_PREF_ITF_MIN_LEFT, /* in pixels */
XI_PREF_XIL,
XI_PREF_ASSERT_ON_NULL_CID, /* with xi_get_obj */
XI_PREF_NO_BUTTON_SPACE,
XI_PREF_LASTPREF /* should always be last */
}
XI_PREF_TYPE;
typedef enum
{
AGA_PREF_BTN_COLOR_LIGHT,
AGA_PREF_BTN_COLOR_CTRL,
AGA_PREF_BTN_COLOR_DARK,
AGA_PREF_BTN_COLOR_TEXT,
AGA_PREF_LASTPREF /* should always be last */
}
AGA_PREF_TYPE;
#define XI_NBR_PREFERENCES XI_PREF_LASTPREF
#define AGA_NBR_PREFERENCES AGA_PREF_LASTPREF
/**********************************
* XI Bitmap structure
**********************************/
typedef enum _xi_bitmap_mode
{
XI_BITMAP_NORMAL,
XI_BITMAP_RESIZE,
XI_BITMAP_TILE
} XI_BITMAP_MODE;
typedef struct _xi_bitmap
{
XinBitmap* xin_bitmap;
XI_BITMAP_MODE mode;
long ref_count;
/* The following properties are only used for XI_BITMAP_NORMAL */
XinColor background;
short x_offset;
short y_offset;
BOOLEAN hcenter;
BOOLEAN vcenter;
} XI_BITMAP;
/**********************************
* XI Object definition structures
**********************************/
typedef enum _xi_btn_draw
{
XIBT_DEFAULT,
XIBT_EMULATED,
XIBT_NATIVE
} XI_BTN_DRAW;
typedef enum _xi_btn_type
{
XIBT_BUTTON,
XIBT_CHECKBOX,
XIBT_RADIOBTN,
XIBT_TABBTN,
XIBT_BUTTON_CHECKBOX,
XIBT_BUTTON_RADIOBTN
} XI_BTN_TYPE;
typedef enum _xi_obj_type
{
XIT_BTN,
XIT_CONTAINER,
XIT_FORM,
XIT_FIELD,
XIT_GROUP,
XIT_LINE,
XIT_RECT,
XIT_TEXT,
XIT_CELL,
XIT_COLUMN,
XIT_ITF,
XIT_LIST,
XIT_ROW
}
XI_OBJ_TYPE;
typedef struct _xi_btn_def
{
XI_BTN_TYPE type;
XinRect xi_rct;
XinRect pixel_rect;
unsigned long attrib;
char *text;
int tab_cid;
BOOLEAN dflt;
BOOLEAN cancel;
int down_icon_rid;
int up_icon_rid;
int disabled_icon_rid;
short icon_x;
short icon_y;
XI_BITMAP* down_bitmap;
XI_BITMAP* up_bitmap;
XI_BITMAP* disabled_bitmap;
BOOLEAN checked;
XinColor fore_color;
BOOLEAN drawable;
XI_BTN_DRAW draw_as;
char mnemonic;
short mnemonic_instance;
XinFont *font;
#ifndef XI_R4_API
XVT_FNTID font_id;
#endif
#ifdef XI_R3_COMPAT
void *font_id;
#endif
} XI_BTN_DEF;
typedef enum
{
XI_STACK_HORIZONTAL,
XI_STACK_VERTICAL,
XI_GRID_HORIZONTAL,
XI_GRID_VERTICAL
}
XI_CONTAINER_ORIENTATION;
typedef struct _xi_container_def
{
XinRect xi_rct;
XinRect pixel_rect;
XI_CONTAINER_ORIENTATION orientation;
int tab_cid;
short btn_height; /* in form units */
short btn_width; /* in form units */
BOOLEAN packed; /* no space btwn btns, overlap 1 pixel in grid */
} XI_CONTAINER_DEF;
typedef struct _xi_field_def
{
XinPoint pnt; /* form units */
short field_width; /* form units */
XinPoint pixel_origin;
short pixel_width;
short pixel_button_distance;
XinRect xi_rct; /* if set, use text edit module */
unsigned long attrib;
int tab_cid;
short text_size;
XinColor back_color;
XinColor enabled_color; /* but inactive */
XinColor disabled_color;
XinColor disabled_back_color;
XinColor active_color;
XinColor active_back_color;
XinColor hilight_color; /* for well and platform fields */
XinColor shadow_color; /* for well and platform fields */
BOOLEAN button;
BOOLEAN button_on_left;
XinFlag no_button_space; /* Is the button contained in the field's area? Defaults to preference. */
int icon_rid;
XI_BITMAP* button_bitmap;
BOOLEAN well;
BOOLEAN platform;
BOOLEAN auto_tab;
BOOLEAN scroll_bar;
BOOLEAN cr_ok;
BOOLEAN var_len_text;
char mnemonic;
int button_width; /* Desired width of the button in pixels. */
XinFont *font;
#ifndef XI_R4_API
XVT_FNTID font_id;
#endif
#ifdef XI_R3_COMPAT
void *font_id;
#endif
} XI_FIELD_DEF;
typedef struct _xi_form_def
{
int tab_cid;
} XI_FORM_DEF;
typedef struct _xi_group_def
{
short nbr_cids;
int *cids;
} XI_GROUP_DEF;
typedef struct _xi_line_def
{
XinPoint pnt1;
XinPoint pnt2;
XinPoint pixel_pnt1;
XinPoint pixel_pnt2;
XinColor fore_color;
XinColor back_color;
BOOLEAN well;
unsigned long attrib;
} XI_LINE_DEF;
typedef struct _xi_rect_def
{
XinRect xi_rct;
XinRect pixel_rect;
XinColor fore_color;
XinColor back_color;
XinColor hilight_color;
XinColor shadow_color;
BOOLEAN well; /* else platform */
BOOLEAN ridge;
XI_BITMAP* bitmap;
unsigned long attrib;
} XI_RECT_DEF;
typedef struct _xi_text_def
{
XinRect xi_rct;
XinRect pixel_rect;
unsigned long attrib;
char *text;
XinColor fore_color;
XinColor back_color;
XinFont *font;
char mnemonic;
short mnemonic_instance;
#ifndef XI_R4_API
XVT_FNTID font_id;
#endif
#ifdef XI_R3_COMPAT
void *font_id;
#endif
} XI_TEXT_DEF;
typedef enum _xi_icon_mode_type
{
XIM_ICON_HAS_PRIORITY,
XIM_TEXT_WITH_ICON_ON_LEFT,
XIM_TEXT_WITH_ICON_ON_RIGHT,
XIM_TEXT_AND_BITMAP_OVERLAP
}
XI_ICON_MODE_TYPE;
typedef struct _xi_column_def
{
unsigned long attrib;
short sort_number;
short width; /* form units */
short pixel_width; /* alternate, pixel width */
short text_size;
char *heading_text;
BOOLEAN center_heading;
BOOLEAN heading_well;
BOOLEAN heading_platform;
BOOLEAN column_well;
BOOLEAN column_platform;
short position;
XinFont *font;
int icon_rid;
short icon_x;
short icon_y;
XI_BITMAP* bitmap;
BOOLEAN size_rows;
BOOLEAN suppress_update_heading;
BOOLEAN suppress_update_cells;
BOOLEAN vertical_align_center;
BOOLEAN vertical_align_bottom;
BOOLEAN wrap_text;
BOOLEAN wrap_text_scrollbar;
BOOLEAN auto_tab;
BOOLEAN cr_ok;
BOOLEAN var_len_text;
char mnemonic;
XI_ICON_MODE_TYPE icon_mode;
#ifndef XI_R4_API
XVT_FNTID font_id;
#endif
#ifdef XI_R3_COMPAT
void *font_id;
#endif
} XI_COLUMN_DEF;
typedef struct _xi_itf_def
{
XI_EVENT_HANDLER xi_eh;
XinRect *rctp;
char *title;
BOOLEAN ctl_size;
BOOLEAN ctl_vscroll;
BOOLEAN ctl_hscroll;
BOOLEAN ctl_close;
BOOLEAN ctl_iconized;
BOOLEAN ctl_iconizable;
int menu_bar_rid;
XinWindow win;
XinWindow menu_win;
BOOLEAN size_win; /* automatically size window win */
BOOLEAN edit_menu;
XinColor back_color;
BOOLEAN automatic_back_color;
unsigned long attrib;
BOOLEAN virtual_itf;
BOOLEAN modal;
BOOLEAN size_font_to_win;
BOOLEAN tab_on_enter;
BOOLEAN use_whitespace;
int whitespace_right;
int whitespace_bottom;
XinFont *font;
BOOLEAN use_xil_win;
BOOLEAN autoclose;
XI_BITMAP* bitmap;
BOOLEAN modal_wait;
BOOLEAN border_style_set;
XinBorderStyle border_style;
BOOLEAN visible;
BOOLEAN enabled;
BOOLEAN maximized;
XinWindow parent;
XinMenu *menu;
int icon_rid;
int initial_focus_cid;
#ifndef XI_R4_API
XVT_FNTID font_id;
#endif
#ifdef XI_R3_COMPAT
void *font_id;
#endif
} XI_ITF_DEF;
typedef struct _xi_list_def
{
XinPoint xi_pnt;
short height;
short width;
XinPoint pixel_origin;
short pixel_height;
short pixel_width;
unsigned long attrib;
XinColor back_color;
XinColor enabled_color; /* but inactive */
XinColor disabled_color;
XinColor disabled_back_color;
XinColor active_color;
XinColor active_back_color;
XinColor white_space_color;
XinColor rule_color;
BOOLEAN no_heading;
BOOLEAN one_row_list;
BOOLEAN scroll_bar;
BOOLEAN sizable_columns;
BOOLEAN movable_columns;
BOOLEAN scroll_bar_button;
short fixed_columns;
int tab_cid;
short min_cell_height;
short min_heading_height;
BOOLEAN no_horz_lines;
BOOLEAN no_vert_lines;
int start_percent;
int first_vis_column;
BOOLEAN drop_and_delete;
BOOLEAN select_cells;
BOOLEAN get_all_records;
BOOLEAN resize_with_window;
XinFont *font;
int horz_sync_list;
int vert_sync_list;
BOOLEAN row_focus_border;
XinColor row_focus_border_color;
int max_lines_in_cell;
BOOLEAN single_select;
BOOLEAN retain_back_color_on_select;
BOOLEAN drag_and_drop_rows;
BOOLEAN drag_rows_autoscroll;
BOOLEAN button_on_cell_focus;
int position_by_typing_cid;
BOOLEAN scroll_on_thumb_track;
#ifndef XI_R4_API
XVT_FNTID font_id;
#endif
#ifdef XI_R3_COMPAT
void *font_id;
#endif
} XI_LIST_DEF;
typedef struct _xi_obj_def
{
XI_OBJ_TYPE type;
int cid;
struct _xi_obj_def *parent;
short nbr_children;
struct _xi_obj_def **children;
long app_data;
long app_data2;
char *help_key;
union
{
XI_BTN_DEF *btn;
XI_CONTAINER_DEF *container;
XI_FORM_DEF *form;
XI_FIELD_DEF *field;
XI_GROUP_DEF *group;
XI_LINE_DEF *line;
XI_RECT_DEF *rect;
XI_TEXT_DEF *text;
XI_COLUMN_DEF *column;
XI_ITF_DEF *itf;
XI_LIST_DEF *list;
} v;
} XI_OBJ_DEF;
/**********************************
* XI Events
**********************************/
typedef enum _xi_event_type
{
XIE_CHAR_FIELD,
XIE_DBL_FIELD,
XIE_CHG_FIELD,
XIE_OFF_FIELD,
XIE_ON_FIELD,
XIE_OFF_GROUP,
XIE_ON_GROUP,
XIE_OFF_FORM,
XIE_ON_FORM,
XIE_VIR_PAN,
XIE_XIN_EVENT,
XIE_XIN_POST_EVENT,
XIE_INIT,
XIE_BUTTON,
XIE_CHAR_CELL,
XIE_CLEANUP,
XIE_CLOSE,
XIE_COMMAND,
XIE_DBL_CELL,
XIE_GET_FIRST,
XIE_GET_LAST,
XIE_GET_NEXT,
XIE_GET_PERCENT,
XIE_GET_PREV,
XIE_CELL_REQUEST,
XIE_CHG_CELL,
XIE_OFF_CELL,
XIE_ON_CELL,
XIE_OFF_ROW,
XIE_ON_ROW,
XIE_OFF_COLUMN,
XIE_ON_COLUMN,
XIE_OFF_LIST,
XIE_ON_LIST,
XIE_REC_ALLOCATE,
XIE_REC_FREE,
XIE_ROW_SIZE,
XIE_SELECT,
XIE_UPDATE,
XIE_COL_DELETE,
XIE_COL_MOVE,
XIE_COL_SIZE,
XIE_DROP_ROW,
XIE_POST_NAVIGATION,
#if defined(XI_R3_COMPAT) || !defined(XI_R4_API)
XIE_XVT_EVENT,
XIE_XVT_POST_EVENT,
#endif
XIE_LAST_EVENT
}
XI_EVENT_TYPE;
struct _xi_obj;
typedef struct _xi_event
{
XI_EVENT_TYPE type;
BOOLEAN refused;
union
{
#ifndef XI_R4_API
EVENT xvte;
#endif
#ifdef XI_R3_COMPAT
struct
{
int dummy;
} xvte;
#endif
XinEvent xin_event;
struct _xi_obj *xi_obj;
struct xit_rec_request
{
struct _xi_obj *list;
long spec_rec;
long data_rec;
short percent;
unsigned long attrib;
XinColor color;
int row_height;
BOOLEAN has_focus;
} rec_request;
struct xit_rec_allocate
{
struct _xi_obj *list;
long record;
} rec_allocate;
struct xit_rec_free
{
struct _xi_obj *list;
long record;
} rec_free;
struct xit_get_percent
{
struct _xi_obj *list;
long record;
short percent;
} get_percent;
struct xit_select
{
struct _xi_obj *xi_obj;
BOOLEAN selected;
BOOLEAN dbl_click;
BOOLEAN shift;
BOOLEAN control;
int column;
long *records;
} select;
struct xit_cell_request
{
struct _xi_obj *list;
char *s;
short len;
long rec;
short col_nbr;
int icon_rid;
XI_BITMAP* bitmap;
unsigned long attrib;
XinColor color;
XinColor back_color;
XinFont *font;
BOOLEAN button;
BOOLEAN button_on_left;
BOOLEAN button_on_focus;
BOOLEAN button_full_cell;
int button_icon_rid;
XI_BITMAP* button_bitmap;
long *records;
#ifndef XI_R4_API
XVT_FNTID font_id;
#endif
#ifdef XI_R3_COMPAT
void *font_id;
#endif
} cell_request;
struct xit_row_size
{
struct _xi_obj *xi_obj;
int new_row_height;
} row_size;
struct xit_cmd
{
int tag;
BOOLEAN shift;
BOOLEAN control;
} cmd;
struct xit_chr
{
struct _xi_obj *xi_obj;
int ch;
BOOLEAN shift;
BOOLEAN control;
BOOLEAN alt;
BOOLEAN is_paste;
} chr;
struct xit_vir_pan
{
BOOLEAN before_pan; /* else after */
int delta_x;
int delta_y;
} vir_pan;
struct xit_column
{
struct _xi_obj *list;
int col_nbr; /* column to move, size, delete */
int new_col_nbr;
BOOLEAN in_fixed;
int new_col_width; /* form units */
int new_col_pixel_width; /* pixel units */
} column;
struct xit_drop_row
{
struct _xi_obj* src_list;
struct _xi_obj* dest_list;
long src_rec;
long dest_rec;
BOOLEAN after_all_rows;
BOOLEAN delete_row;
BOOLEAN shift;
BOOLEAN control;
} drop_row;
long user_data;
} v;
} XI_EVENT;
/***************************************************
* XI Object Macros
* Use these macros to fill in the appropriate
* fields of an XI_OBJ struct for synthesizing
* cells, rows, and columns.
***************************************************/
#define XI_MAKE_CELL( objp, listobj, row_nbr, column_nbr ) \
memset(( char* )objp, '\0', ( size_t )sizeof( XI_OBJ )), \
(( objp )->itf = ( listobj )->parent, \
( objp )->parent = listobj, \
( objp )->type = XIT_CELL, \
( objp )->v.cell.row = row_nbr, \
( objp )->v.cell.column = column_nbr, \
( objp )->nbr_children = 0 )
#define XI_MAKE_ROW( objp, listobj, row_nbr ) \
memset(( char* )objp, '\0', ( size_t )sizeof( XI_OBJ )), \
(( objp )->itf = ( listobj )->parent, \
( objp )->parent = listobj, \
( objp )->type = XIT_ROW, \
( objp )->v.row = row_nbr, \
( objp )->nbr_children = 0 )
#ifndef max
#define max(A, B) ((A) > (B) ? (A) : (B))
#endif
#ifndef min
#define min(A, B) ((A) < (B) ? (A) : (B))
#endif
/***************************************************
* XI Object data
*
* NOTE: Applications cannot use or rely upon data
* found in the XI_INTERNAL section of these structures
* Applications should use the non-XI_INTERNAL fields
* when referring to these objects.
*
* The cid field is unused for objects of type
* XIT_CELL, XIT_ROW and XIT_COLUMN
***************************************************/
#ifdef __cplusplus
struct _xi_column_data;
struct _xi_itf_data;
struct _xi_list_data;
struct _xi_container_data;
struct _xi_btn_data;
struct _xi_field_data;
struct _xi_form_data;
struct _xi_group_data;
struct _xi_line_data;
struct _xi_rect_data;
struct _xi_text_data;
#define STRUCT
#else
#define STRUCT struct
#endif
typedef struct _xi_cell_data
{
unsigned char row;
unsigned char column;
unsigned char is_vert_scrolled;
} XI_CELL_DATA;
typedef struct _xi_row_data
{
short row;
unsigned char is_vert_scrolled;
} XI_ROW_DATA;
typedef struct _xi_obj
{
int cid;
struct _xi_obj *itf;
struct _xi_obj *parent;
XI_OBJ_TYPE type;
short nbr_children;
struct _xi_obj **children;
long app_data;
long app_data2;
char *help_key;
union
{
XI_CELL_DATA cell;
XI_ROW_DATA row_data;
short row;
#ifdef XI_INTERNAL
STRUCT _xi_column_data *column;
STRUCT _xi_itf_data *itf;
STRUCT _xi_list_data *list;
STRUCT _xi_container_data *container;
STRUCT _xi_btn_data *btn;
STRUCT _xi_field_data *field;
STRUCT _xi_form_data *form;
STRUCT _xi_group_data *group;
STRUCT _xi_line_data *line;
STRUCT _xi_rect_data *rect;
STRUCT _xi_text_data *text;
#else
/* so that union has room for a ptr */
char *dummy;
#endif
} v;
} XI_OBJ;
typedef void ( *XI_EH_TYPE ) ( XI_OBJ * itf, struct _xi_event * xiev );
#ifdef XI_INTERNAL
/* XI INTERNAL USE ONLY */
typedef struct _xi_btn_data
{
XI_BTN_TYPE type;
int tab_cid;
unsigned long attrib;
int down_icon_rid;
int up_icon_rid;
int disabled_icon_rid;
short icon_x;
short icon_y;
XI_BITMAP* down_bitmap;
XI_BITMAP* up_bitmap;
XI_BITMAP* disabled_bitmap;
XinWindow btnctl;
XinRect rct; /* bounding rectangle in pixels */
XinRect xi_rct; /* original bounding rect in form units */
char *text;
XinColor fore_color;
XI_BTN_DRAW draw_as;
BOOLEAN drawable;
BOOLEAN checked;
BOOLEAN down;
BOOLEAN down_in_btn;
BOOLEAN dflt;
BOOLEAN cancel;
BOOLEAN packed; /* no focus or default rect space */
char mnemonic;
short mnemonic_instance;
XinFont *font;
} XI_BTN_DATA;
/* XI INTERNAL USE ONLY */
typedef struct _xi_container_data
{
XinRect xi_rct; /* original container rect in form units */
XI_CONTAINER_ORIENTATION orientation;
int tab_cid;
short btn_height; /* original button height in form units */
short btn_width; /* original button width in form units */
short nbr_buttons; /* number of buttons used in calculations */
BOOLEAN packed; /* no padding or focus rect space */
/* calculated */
XinRect rct;
short nbr_down; /* number of buttons down in the container */
short nbr_across; /* number of buttons across the container */
short pix_height; /* button height in pixels */
short pix_width; /* button width in pixels */
short step_down; /* pixels from top edge to next top edge */
short step_across; /* pixels from left edge to next left edge */
} XI_CONTAINER_DATA;
/* XI INTERNAL USE ONLY */
typedef struct _xi_field_data
{
STX stx;
int tab_cid;
XinRect xi_rct;
XinPoint xi_pnt;
int field_width;
XinRect rct;
BOOLEAN button;
BOOLEAN button_on_left;
XinFlag no_button_space;
int icon_rid;
XI_BITMAP* button_bitmap;
int button_width; /* disired pixel width of button */
BOOLEAN down;
BOOLEAN down_in_btn;
XinRect btn_rct;
BOOLEAN well;
BOOLEAN platform;
BOOLEAN font_set;
BOOLEAN scroll_bar;
BOOLEAN cr_ok;
BOOLEAN var_len_text;
char mnemonic;
} XI_FIELD_DATA;
/* XI INTERNAL USE ONLY */
typedef struct _xi_form_data
{
XI_OBJ *focus_field;
unsigned long attrib;
int tab_cid;
} XI_FORM_DATA;
/* XI INTERNAL USE ONLY */
typedef struct _xi_group_data
{
short nbr_cids;
int *cidlist;
XI_OBJ **objlist;
} XI_GROUP_DATA;
/* XI INTERNAL USE ONLY */
typedef struct _xi_line_data
{
XinPoint pnt1;
XinPoint pnt2;
XinPoint xi_pnt1;
XinPoint xi_pnt2;
XinColor fore_color;
XinColor back_color;
BOOLEAN well;
unsigned long attrib;
} XI_LINE_DATA;
/* XI INTERNAL USE ONLY */
typedef struct _xi_rect_data
{
XinRect rct;
XinRect xi_rct;
XinColor fore_color;
XinColor back_color;
XinColor hilight_color;
XinColor shadow_color;
BOOLEAN well;
BOOLEAN ridge;
unsigned long attrib;
XI_BITMAP* bitmap;
} XI_RECT_DATA;
/* XI INTERNAL USE ONLY */
typedef struct _xi_text_data
{
XinRect rct;
XinRect xi_rct;
short text_size;
char *text;
unsigned long attrib;
XinFont *font;
XinColor fore_color;
XinColor back_color;
char mnemonic;
short mnemonic_instance;
} XI_TEXT_DATA;
/* XI INTERNAL USE ONLY */
typedef struct _xi_column_data
{
short sort_number;
} XI_COLUMN_DATA;
/* XI INTERNAL USE ONLY */
typedef struct _xi_itf_data
{
unsigned short magic;
XinWindow xin_win;
XinWindow menu_win;
XI_EVENT_HANDLER xi_eh;
XI_OBJ *focus_obj;
XI_OBJ *trap_obj;
BOOLEAN trap_explicit;
BOOLEAN cursor_override;
XinCursor cursor;
BOOLEAN half_baked;
BOOLEAN edit_menu;
BOOLEAN paste_enable;
BOOLEAN cut_or_copy_enable;
XinColor back_color;
BOOLEAN automatic_back_color;
BOOLEAN virtual_itf;
BOOLEAN modal;
BOOLEAN size_font_to_win;
BOOLEAN tab_on_enter;
XI_BITMAP* bitmap;
BOOLEAN modal_wait;
XinRect original_win_rct;
int original_font_size;
XinWindow prev_modal;
XinPoint max_xi_pnt;
XinPoint phys_xi_pnt;
XinPoint win_xi_pnt;
int delta_x;
int delta_y;
int caret_x;
int caret_y;
int caret_height;
XinRect caret_clip;
BOOLEAN caret_is_on;
BOOLEAN mouse_is_down;
BOOLEAN closing;
int in_callback;
XI_OBJ *update_obj;
XinFont *font;
int fu_width;
int fu_height;
BOOLEAN moving_focus;
BOOLEAN chg_flag;
BOOLEAN use_xil_win;
BOOLEAN pasting;
XI_DEQUEUE_FLAG dequeue;
BOOLEAN in_event_destroy;
int initial_focus_cid;
BOOLEAN needs_update;
} XI_ITF_DATA;
/* XI INTERNAL USE ONLY */
#define FOCUS_CELL_ARRAY_LEN 6
typedef struct _xi_list_data
{
XinPoint xi_pnt;
int height;
int tab_cid;
BOOLEAN scroll_bar;
BOOLEAN one_row_list;
short sb_offset;
short sb_width;
BOOLEAN movable_columns;
BOOLEAN scroll_bar_button;
short width;
XI_OBJ *focus_cell;
XI_OBJ focus_cell_array[FOCUS_CELL_ARRAY_LEN];
LM lm;
XinWindow sb_win;
XinWindow hsb_win;
XinRect sbb_rct;
BOOLEAN down_in_btn;
BOOLEAN down;
int start_percent;
XI_CELL_SPEC *cell_spec;
BOOLEAN have_sb_rct;
XinRect sb_rct;
BOOLEAN have_hsb_rct;
XinRect hsb_rct;
XinFont *font;
int horz_sync_list;
int vert_sync_list;
BOOLEAN row_focus_border;
XinColor row_focus_border_color;
int max_lines_in_cell;
BOOLEAN scrolling_in_progress;
BOOLEAN done_initial_xi_scroll;
BOOLEAN single_select;
BOOLEAN in_select_process;
int position_by_typing_cid;
BOOLEAN scroll_on_thumb_track;
} XI_LIST_DATA;
#endif /* XI_INTERNAL */
/**********************************
* XI Metrics and preferences
**********************************/
typedef enum
{
XI_SV_FU_HEIGHT,
XI_SV_FU_WIDTH,
XI_SV_ITF_BORDER,
XI_SV_SYSFONT_HEIGHT,
XI_SV_SYSFONT_ASCENT,
XI_SV_SYSFONT_DESCENT,
XI_SV_SYSFONT_LEADING,
XI_SV_LASTSV /* should always be last */
}
XI_SV_TYPE;
#define XI_NBR_SYSVALS XI_SV_LASTSV
typedef struct _xi_eq
{
XI_EVENT xiev;
XI_OBJ *itf;
struct _xi_eq *next;
} XI_EQ;
typedef struct _xi_window_list
{
struct _xi_window_list *next;
XinWindow win;
XI_OBJ *itf;
} XI_WINDOW_LIST;
typedef struct _xi_scroll_record_arg
{
XI_OBJ *xi_obj;
long record;
XinColor row_color;
unsigned long attrib;
int row_height;
BOOLEAN rec_at_top;
} XI_SCROLL_RECORD_ARG;
#ifdef __cplusplus
extern "C"
{
#endif
#ifdef XI_R4_API
#define xi_init() xi_init_internal( TRUE )
#define xi_create( a, b ) xi_create_internal( (a), (b), FALSE, TRUE )
#define xi_get_def_rect( a, b ) xi_get_def_rect_internal( (a), (b), TRUE )
#else
#define xi_init() xi_init_internal( FALSE )
#define xi_create( a, b ) xi_create_internal( (a), (b), FALSE, FALSE )
#define xi_get_def_rect( a, b ) xi_get_def_rect_internal( (a), (b), FALSE )
#endif
XIDLL XI_OBJ_DEF * xi_add_button_def XVT_CC_ARGS( ( XI_OBJ_DEF * parent,
int cid, XinRect * rct,
unsigned long attrib, char *text,
int tab_cid ) );
XIDLL XI_OBJ_DEF * xi_add_container_def XVT_CC_ARGS( ( XI_OBJ_DEF * itf,
int cid, XinRect * xi_rct,
XI_CONTAINER_ORIENTATION orientation,
int tab_cid ) );
XIDLL XI_OBJ_DEF * xi_add_field_def XVT_CC_ARGS( ( XI_OBJ_DEF * form,
int cid, int v, int h,
int field_width,
unsigned long attrib, int tab_cid,
int text_size, XinColor enabled_color,
XinColor back_color,
XinColor disabled_color,
XinColor disabled_back_color,
XinColor active_color ) );
XIDLL XI_OBJ_DEF * xi_add_form_def XVT_CC_ARGS( ( XI_OBJ_DEF * itf, int cid,
int tab_cid ) );
XIDLL XI_OBJ_DEF * xi_add_group_def XVT_CC_ARGS( ( XI_OBJ_DEF * object,
int cid, int nbr_cids,
int *cid_list ) );
XIDLL XI_OBJ_DEF * xi_add_line_def XVT_CC_ARGS( ( XI_OBJ_DEF * itf, int cid,
XinPoint * pnt1, XinPoint * pnt2,
unsigned long attrib,
XinColor fore_color, XinColor back_color,
BOOLEAN well ) );
XIDLL XI_OBJ_DEF * xi_add_rect_def XVT_CC_ARGS( ( XI_OBJ_DEF * itf, int cid,
XinRect * rct, unsigned long attrib,
XinColor fore_color, XinColor back_color ) );
XIDLL XI_OBJ_DEF * xi_add_text_def XVT_CC_ARGS( ( XI_OBJ_DEF * itf, int cid,
XinRect * rct, unsigned long attrib,
char *text ) );
XIDLL int xi_button_calc_pixel_height XVT_CC_ARGS( ( int height ) );
XIDLL int xi_button_calc_pixel_width XVT_CC_ARGS( ( int width ) );
XIDLL int xi_button_def_get_width XVT_CC_ARGS( ( XI_OBJ_DEF * obj_def ) );
XIDLL void xi_check XVT_CC_ARGS( ( XI_OBJ * xi_obj, BOOLEAN check ) );
XIDLL void xi_clean_up XVT_CC_ARGS( ( void ) );
XIDLL int xi_container_def_get_btn_width XVT_CC_ARGS( ( XI_OBJ_DEF * obj_def ) );
XIDLL int xi_container_def_get_height XVT_CC_ARGS( ( XI_OBJ_DEF * obj_def ) );
XIDLL int xi_container_def_get_width XVT_CC_ARGS( ( XI_OBJ_DEF * obj_def ) );
XIDLL void xi_container_reorient XVT_CC_ARGS( ( XI_OBJ * cnt_obj,
XI_CONTAINER_DEF * cnt_def ) );
XIDLL void xi_def_free XVT_CC_ARGS( ( XI_OBJ_DEF* obj_def ) );
XIDLL int xi_get_fixed_columns XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XIDLL void xi_get_font_metrics_font( XinFont * font, int *leading, int *ascent,
int *descent, int *char_width );
XIDLL long xi_get_handle XVT_CC_ARGS( ( XI_OBJ * list, XI_OBJ * child_obj ) );
XIDLL BOOLEAN xi_is_checked XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XIDLL void xi_set_fixed_columns XVT_CC_ARGS( ( XI_OBJ * xi_obj,
int fixed_columns ) );
XIDLL void xi_set_fore_color XVT_CC_ARGS( ( XI_OBJ * xi_obj,
XinColor color ) );
XIDLL void xi_vir_pan XVT_CC_ARGS( ( XI_OBJ * xi_obj, int delta_x,
int delta_y ) );
XIDLL int xi_button_calc_height_font XVT_CC_ARGS( ( XinFont * font ) );
XIDLL int xi_field_calc_height_font XVT_CC_ARGS( ( XinFont * font ) );
XIDLL int xi_field_calc_width_font XVT_CC_ARGS( ( XinFont * font,
char *string ) );
#ifndef XI_R4_API
XIDLL int xi_button_calc_height_font_id XVT_CC_ARGS( ( XVT_FNTID font ) );
XIDLL int xi_field_calc_height_font_id XVT_CC_ARGS( ( XVT_FNTID font ) );
XIDLL int xi_field_calc_width_font_id XVT_CC_ARGS( ( XVT_FNTID font,
char *string ) );
#endif
XIDLL XI_OBJ_DEF * xi_add_column_def XVT_CC_ARGS( ( XI_OBJ_DEF * list,
int cid, unsigned long attrib,
int sort_number, int width,
int text_size, char *heading_text ) );
XIDLL XI_OBJ_DEF * xi_add_list_def XVT_CC_ARGS( ( XI_OBJ_DEF * itf, int cid,
int v, int h, int height,
unsigned long attrib,
XinColor enabled_color, XinColor back_color,
XinColor disabled_color,
XinColor disabled_back_color,
XinColor active_color, int tab_cid ) );
XIDLL BOOLEAN xi_button_set_default XVT_CC_ARGS( ( XI_OBJ * xi_obj,
BOOLEAN set ) );
XIDLL void xi_cell_request XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XIDLL XI_OBJ * xi_create_internal XVT_CC_ARGS( ( XI_OBJ * parent,
XI_OBJ_DEF * xi_obj_def,
BOOLEAN special,
BOOLEAN r4_api ) );
XIDLL XI_OBJ_DEF * xi_create_itf_def XVT_CC_ARGS( ( int cid,
XI_EVENT_HANDLER xi_eh, XinRect * rctp,
char *title, long app_data ) );
XIDLL void xi_delete XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XIDLL BOOLEAN xi_delete_row XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XIDLL void xi_dequeue XVT_CC_ARGS( ( void ) );
#ifdef XI_R4_API
XIDLL void xi_event XVT_CC_ARGS( ( XinWindow win, XinEvent * ep ) );
#else
#define xi_event XinXvtEventHandler
XIDLL long XinXvtEventHandler XVT_CC_ARGS( ( WINDOW win, EVENT * ep ) );
#endif
XIDLL void xi_force_focus_cell_visible XVT_CC_ARGS( ( XI_OBJ * list ) );
XIDLL BOOLEAN xi_cell_data_valid( XI_OBJ * cell );
XIDLL void xi_fu_to_pu XVT_CC_ARGS( ( XI_OBJ * itf, XinPoint * pnts,
int nbr_pnts ) );
XIDLL long xi_get_app_data XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XIDLL long xi_get_app_data2 XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XIDLL unsigned long xi_get_attrib XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XI_CELL_SPEC * xi_get_cell_selection XVT_CC_ARGS( ( XI_OBJ * list,
int *nbr_cells ) );
XIDLL XI_OBJ_DEF * xi_get_def XVT_CC_ARGS( ( XI_OBJ * obj ) );
XIDLL XinRect * xi_get_def_rect_internal XVT_CC_ARGS( ( XI_OBJ_DEF * xi_obj_def,
XinRect * rctp,
BOOLEAN r4_api ) );
XIDLL XI_OBJ * xi_get_focus XVT_CC_ARGS( ( XI_OBJ * itf ) );
XIDLL XI_OBJ * xi_get_itf XVT_CC_ARGS( ( XinWindow win ) );
XIDLL XI_OBJ_DEF * xi_get_list_def XVT_CC_ARGS( ( XI_OBJ * list ) );
XIDLL long * xi_get_list_info XVT_CC_ARGS( ( XI_OBJ * list,
int *nbr_recs ) );
XIDLL XI_OBJ ** xi_get_member_list XVT_CC_ARGS( ( XI_OBJ * xi_obj,
int *nbr_members ) );
XIDLL long xi_get_pref XVT_CC_ARGS( ( XI_PREF_TYPE preftype ) );
XIDLL XI_OBJ * xi_get_obj XVT_CC_ARGS( ( XI_OBJ * itf, int cid ) );
XIDLL XinRect * xi_get_rect XVT_CC_ARGS( ( XI_OBJ * xi_obj, XinRect * rctp ) );
XIDLL void xi_set_rect XVT_CC_ARGS( ( XI_OBJ * xi_obj, XinRect * rctp,
BOOLEAN do_invalidates ) );
XIDLL void xi_get_sel XVT_CC_ARGS( ( XI_OBJ * xi_obj, int *selstart,
int *selstop ) );
XIDLL XinFont * xi_get_system_font XVT_CC_ARGS( ( void ) );
XIDLL int xi_get_sysval XVT_CC_ARGS( ( XI_SV_TYPE valtype ) );
XIDLL char * xi_get_text XVT_CC_ARGS( ( XI_OBJ * xi_obj, char *s,
int len ) );
XIDLL XinWindow xi_get_window XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XIDLL int xi_get_visible_rows XVT_CC_ARGS( ( XI_OBJ * xi_obj,
int *first_vis, int *last_vis ) );
XIDLL void xi_get_visible_columns XVT_CC_ARGS( ( XI_OBJ * xi_obj,
int *first_vis,
int *last_vis ) );
XIDLL void xi_set_fixed_columns XVT_CC_ARGS( ( XI_OBJ * xi_obj,
int new_fixed_count ) );
XIDLL XinRect * xi_get_xi_rct XVT_CC_ARGS( ( XI_OBJ * itf,
XinRect * xi_rct ) );
XIDLL XI_OBJ* xi_get_itf_containing XVT_CC_ARGS( ( XinPoint* pt ) );
XIDLL BOOLEAN xi_def_get_xil_pref( XI_OBJ_DEF* obj_def );
XIDLL void xi_init_internal XVT_CC_ARGS( ( BOOLEAN r4_api ) );
XIDLL BOOLEAN xi_insert_row XVT_CC_ARGS( ( XI_OBJ * list, int row ) );
XIDLL BOOLEAN xi_is_changed XVT_CC_ARGS( ( XI_OBJ * obj ) );
XIDLL BOOLEAN xi_is_itf XVT_CC_ARGS( ( XI_OBJ * itf ) );
XIDLL BOOLEAN xi_is_window XVT_CC_ARGS( ( XinWindow win ) );
XIDLL BOOLEAN xi_is_focus_moving XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XIDLL BOOLEAN xi_is_auto_tab XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XIDLL BOOLEAN xi_itf_closing_is XVT_CC_ARGS( ( XI_OBJ * itf ) );
XIDLL BOOLEAN xi_itf_in_event_destroy( XI_OBJ * itf );
XIDLL int xi_list_def_get_client_height XVT_CC_ARGS( (
XI_OBJ_DEF * list_def,
int rows ) );
XIDLL int xi_list_def_get_client_width XVT_CC_ARGS( (
XI_OBJ_DEF * obj_def,
int columns ) );
XIDLL int xi_list_def_get_outer_height XVT_CC_ARGS( (
XI_OBJ_DEF * list_def,
int rows ) );
XIDLL int xi_list_def_get_outer_width XVT_CC_ARGS( (
XI_OBJ_DEF * obj_def,
int columns ) );
XIDLL int xi_list_def_get_rows XVT_CC_ARGS( ( XI_OBJ_DEF * list_def ) );
XIDLL void xi_move_column XVT_CC_ARGS( ( XI_OBJ * column,
int position ) );
XIDLL BOOLEAN xi_move_focus XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XIDLL void xi_pu_to_fu XVT_CC_ARGS( ( XI_OBJ * itf, XinPoint * pnts, int nbr_pnts ) );
XIDLL int xi_scroll XVT_CC_ARGS( ( XI_OBJ * xi_obj, int nbr_lines ) );
XIDLL int xi_scroll_rec XVT_CC_ARGS( ( XI_OBJ * xi_obj, long record, XinColor row_color, unsigned
long attrib, int row_height ) );
XIDLL int xi_scroll_record XVT_CC_ARGS( ( XI_SCROLL_RECORD_ARG * arg ) );
XIDLL int xi_scroll_percent XVT_CC_ARGS( ( XI_OBJ * xi_obj, int percent ) );
XIDLL void xi_set_app_data XVT_CC_ARGS( ( XI_OBJ * xi_obj, long app_data ) );
XIDLL void xi_set_app_data2 XVT_CC_ARGS( ( XI_OBJ * xi_obj, long app_data2 ) );
XIDLL void xi_set_attrib XVT_CC_ARGS( ( XI_OBJ * xi_obj, unsigned long attrib ) );
XIDLL void xi_set_bufsize XVT_CC_ARGS( ( XI_OBJ * xi_obj, int size ) );
XIDLL void xi_set_color XVT_CC_ARGS( ( XI_OBJ * xi_obj, XI_COLOR_PART part, XinColor color ) );
XIDLL void xi_set_column_width XVT_CC_ARGS( ( XI_OBJ * xi_obj,
int width ) );
XIDLL void xi_column_set_pixel_width XVT_CC_ARGS( ( XI_OBJ * xi_obj,
int width ) );
XIDLL void xi_set_focus XVT_CC_ARGS( ( XI_OBJ * xi_obj ) );
XIDLL void xi_set_font XVT_CC_ARGS( ( XinFont * font ) );
#ifndef XI_R4_API
XIDLL void xi_set_font_id XVT_CC_ARGS( ( XVT_FNTID font_id ) );
#else
XIDLL void xi_set_font_id XVT_CC_ARGS( ( void* font_id ) );
#endif
XIDLL void xi_set_list_size XVT_CC_ARGS( ( XI_OBJ * xi_obj, int height, int width ) );
XIDLL void xi_set_obj_font XVT_CC_ARGS( ( XI_OBJ * xi_obj, XinFont * font ) );
#ifndef XI_R4_API
XIDLL void xi_set_obj_font_id XVT_CC_ARGS( ( XI_OBJ * xi_obj, XVT_FNTID font_id ) );
#else
XIDLL void xi_set_obj_font_id XVT_CC_ARGS( ( XI_OBJ * xi_obj, void* font_id ) );
#endif
XIDLL void xi_set_bitmap XVT_CC_ARGS( ( XI_OBJ* xi_obj, XI_BITMAP* bitmap ) );
XIDLL void xi_set_down_bitmap XVT_CC_ARGS( ( XI_OBJ* xi_obj, XI_BITMAP* bitmap ) );
XIDLL void xi_set_icon XVT_CC_ARGS( ( XI_OBJ * xi_obj, int icon_rid, int down_icon_rid ) );
XIDLL void xi_set_pref XVT_CC_ARGS( ( XI_PREF_TYPE preftype, long value ) );
XIDLL void xi_set_sel XVT_CC_ARGS( ( XI_OBJ * xi_obj, int selstart, int selstop ) );
XIDLL void xi_set_row_height XVT_CC_ARGS( ( XI_OBJ * xi_obj, int height ) );
XIDLL void xi_set_text XVT_CC_ARGS( ( XI_OBJ * xi_obj, const char *s ) );
XIDLL void xi_set_override_cursor XVT_CC_ARGS( ( XI_OBJ* itf, XinCursor cursor, BOOLEAN flag ) );
XIDLL void xi_event_debug XVT_CC_ARGS( ( char *tag, XI_EVENT * xiev, char *s, int len ) );
XIDLL char * gstrncpy XVT_CC_ARGS( ( char *dst, char *src, int n ) );
/* XI consistant drawing functions - these functions perform identically on
* all platforms. These functions also do virtual interface coordinate
* conversion. */
XIDLL void xi_draw_3d_diamond XVT_CC_ARGS( ( XinWindow win, XinRect * rctp, BOOLEAN well, BOOLEAN black,
int height, XinColor color ) );
XIDLL void xi_draw_3d_line XVT_CC_ARGS( ( XinWindow win, XinPoint pnt1, XinPoint pnt2, BOOLEAN well ) );
XIDLL void xi_draw_3d_rect XVT_CC_ARGS( ( XinWindow win, XinRect * rctp, BOOLEAN well, int height, XinColor
color_light, XinColor color_ctrl, XinColor color_dark ) );
XIDLL void xi_draw_shaded_rect XVT_CC_ARGS( ( XinWindow win, XinRect * rctp, BOOLEAN well, int height, XinColor
color_light, XinColor color_ctrl, XinColor color_dark ) );
XIDLL void xi_draw_diamond XVT_CC_ARGS( ( XinWindow win, XinRect * rctp, BOOLEAN well, BOOLEAN black, BOOLEAN fill, XinColor color ) );
XIDLL void xi_draw_checkmark XVT_CC_ARGS( ( XinWindow win, XinRect * rctp ) );
XIDLL void xi_draw_text_attrib XVT_CC_ARGS( ( XinWindow win, XinFont * font, int x, int y, char *s, int len, unsigned
long attrib ) );
XIDLL void xi_draw_thick_rect XVT_CC_ARGS( ( XinWindow win, XinRect * rctp, int width ) );
XIDLL BOOLEAN xi_rect_intersect XVT_CC_ARGS( ( XinRect * rctp, XinRect * rctp1, XinRect * rctp2 ) );
XIDLL void xi_offset_rect( XinRect * rct, int delta_h, int delta_v );
XIDLL void xi_invalidate_rect( XinWindow win, XinRect * rctp );
XIDLL void xi_draw_rect( XinWindow win, XinRect * rctp );
XIDLL void xi_draw_roundrect( XinWindow win, XinRect * rctp, int rh, int rv );
XIDLL void xi_draw_line( XinWindow win, XinPoint p );
XIDLL void xi_move_to( XinWindow win, XinPoint p );
/******************************************************************
Tree module
******************************************************************/
#ifdef TREEDEBUG
#define xi_tree_malloc( size, parent ) \
xi_tree_malloc_d( size, parent, __LINE__, __FILE__ )
#define xi_tree_realloc( p, size ) \
xi_tree_realloc_d( p, size, __LINE__, __FILE__ )
#endif
#ifdef TREEDEBUG
XIDLL void * xi_tree_malloc_d XVT_CC_ARGS( ( size_t size, void *parent, int line,
char *file ) );
XIDLL void * xi_tree_realloc_d XVT_CC_ARGS( ( void *p, size_t size, int line, char *file ) );
#else
XIDLL void * xi_tree_malloc XVT_CC_ARGS( ( size_t size, void *parent ) );
XIDLL void * xi_tree_realloc XVT_CC_ARGS( ( void *p, size_t size ) );
#endif
XIDLL void xi_tree_reparent XVT_CC_ARGS( ( void *p, void *parent ) );
XIDLL void xi_tree_free XVT_CC_ARGS( ( void *p ) );
XIDLL void * xi_tree_get_parent XVT_CC_ARGS( ( void *p ) );
XIDLL void xi_tree_dbg XVT_CC_ARGS( ( char *title ) );
XIDLL void xi_tree_check_sanity XVT_CC_ARGS( ( char *title ) );
XIDLL void xi_tree_reg_error_fcn XVT_CC_ARGS( ( void ( *fcn ) ( void ) ) );
XIDLL void aga_set_pref XVT_CC_ARGS((AGA_PREF_TYPE preftype, long value));
XIDLL long aga_get_pref XVT_CC_ARGS((AGA_PREF_TYPE preftype));
/* Bitmap functions and macros */
XIDLL XI_BITMAP* xi_bitmap_create XVT_CC_ARGS( ( char* filename, XI_BITMAP_MODE mode ) );
XIDLL XI_BITMAP* xi_bitmap_create_res XVT_CC_ARGS( ( short id, XI_BITMAP_MODE mode ) );
XIDLL XI_BITMAP* xi_bitmap_copy XVT_CC_ARGS( ( XI_BITMAP* bitmap ) );
XIDLL void xi_bitmap_destroy XVT_CC_ARGS( ( XI_BITMAP* bitmap ) );
XIDLL void xi_bitmap_draw XVT_CC_ARGS( ( XI_BITMAP* bitmap, XinWindow win,
XinRect* rct, XinRect* clip_rct,
BOOLEAN in_paint_event ) );
XIDLL void xi_bitmap_size_get XVT_CC_ARGS( ( XI_BITMAP* bitmap, short* width,
short* height ) );
XIDLL BOOLEAN xi_bitmap_draw_all_on_resize XVT_CC_ARGS( ( XI_BITMAP* bitmap ) );
XIDLL void xi_aga_field_set_caret_pos( XI_OBJ * xi_obj, int pos );
XIDLL void xi_lowlevel_focus( XI_OBJ * xi_obj, BOOLEAN set);
#define xi_bitmap_background_set( bitmap, color ) ((bitmap)->background = (color) )
#define xi_bitmap_hcenter_set( bitmap, flag ) ((bitmap)->hcenter = (flag) )
#define xi_bitmap_mode_set( bitmap, m ) ((bitmap)->mode = (m) )
#define xi_bitmap_offset_x_set( bitmap, x ) ((bitmap)->x_offset = (x) )
#define xi_bitmap_offset_y_set( bitmap, y ) ((bitmap)->y_offset = (y) )
#define xi_bitmap_vcenter_set( bitmap, flag ) ((bitmap)->vcenter = (flag) )
#define xi_bitmap_background_get( bitmap ) ((bitmap)->background)
#define xi_bitmap_hcenter_get( bitmap ) ((bitmap)->hcenter)
#define xi_bitmap_mode_get( bitmap ) ((bitmap)->mode)
#define xi_bitmap_offset_x_get( bitmap ) ((bitmap)->x_offset)
#define xi_bitmap_offset_y_get( bitmap ) ((bitmap)->y_offset)
#define xi_bitmap_vcenter_get( bitmap ) ((bitmap)->vcenter)
#ifdef __cplusplus
}
/* End of extern "C" */
#endif
#endif /* INCL_XI */