132452fd50
Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione P@rtners 2.0 patch 349 git-svn-id: svn://10.65.10.50/trunk@10573 c028cbd2-c16b-5b4b-a496-9718f37d4682
267 lines
12 KiB
C
Executable File
267 lines
12 KiB
C
Executable File
#ifndef XVT_INCL_XVT
|
|
#define XVT_INCL_XVT
|
|
|
|
#ifdef XVT_INCL_NATIVE
|
|
|
|
#ifdef WIN32
|
|
#define WIN32_LEAN_AND_MEAN
|
|
#define WIN32_EXTRA_LEAN
|
|
#define STRICT
|
|
#include <windows.h>
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#define XVAGA 1
|
|
|
|
#include <ctype.h>
|
|
#include <io.h>
|
|
#include <stdarg.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <time.h>
|
|
|
|
#include "xvt_env.h"
|
|
#include "xvt_defs.h"
|
|
#include "xvt_help.h"
|
|
#include "xvt_menu.h"
|
|
#include "xvt_type.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
int xvt_main(int argc, char** argv);
|
|
|
|
void xvt_app_allow_quit(void);
|
|
void xvt_app_create(int argc, char **argv, unsigned long flags, EVENT_HANDLER eh, XVT_CONFIG *config);
|
|
void xvt_app_destroy(void);
|
|
BOOLEAN xvt_app_escape(int esc_code, PRINT_RCD*, long* ph, long* pw, long* pvr, long* phr);
|
|
DRAW_CTOOLS* xvt_app_get_default_ctools(DRAW_CTOOLS* ct);
|
|
void xvt_app_process_pending_events(void);
|
|
|
|
char* xvt_cb_alloc_data(long size);
|
|
BOOLEAN xvt_cb_close(void);
|
|
void xvt_cb_free_data(void);
|
|
char* xvt_cb_get_data(CB_FORMAT cbfmt, char *name, long *sizep);
|
|
BOOLEAN xvt_cb_has_format(CB_FORMAT fmt, char *name);
|
|
BOOLEAN xvt_cb_open(BOOLEAN writing);
|
|
BOOLEAN xvt_cb_put_data(CB_FORMAT cbfmt, char *name, long size, PICTURE pic);
|
|
|
|
void xvt_ctl_check_radio_button(WINDOW Win, WINDOW* Wins, int NbrWindows);
|
|
WINDOW xvt_ctl_create_def(WIN_DEF *win_def_p, WINDOW parent_win, long app_data);
|
|
void xvt_ctl_set_checked(WINDOW Win, BOOLEAN Check);
|
|
|
|
void xvt_debug_printf(const char* fmt, ...);
|
|
|
|
ASK_RESPONSE xvt_dm_post_ask(const char* Btn1, const char*Btn2, const char* Btn3, const char* xin_buffer);
|
|
void xvt_dm_post_error(char *fmt);
|
|
void xvt_dm_post_fatal_exit(char *fmt);
|
|
FL_STATUS xvt_dm_post_file_open(FILE_SPEC *fsp, const char *msg);
|
|
FL_STATUS xvt_dm_post_file_save(FILE_SPEC *fsp, const char *msg);
|
|
BOOLEAN xvt_dm_post_font_sel(WINDOW win, XVT_FNTID font_id, PRINT_RCD *precp, unsigned long reserved);
|
|
void xvt_dm_post_note(char *fmt);
|
|
BOOLEAN xvt_dm_post_page_setup(PRINT_RCD *precp);
|
|
char* xvt_dm_post_string_prompt(const char* message, char* response, int response_len);
|
|
|
|
void xvt_dwin_clear(WINDOW win, COLOR col);
|
|
void xvt_dwin_draw_arc(WINDOW Win, RCT* r, int sx, int sy, int ex, int ey);
|
|
void xvt_dwin_draw_icon(WINDOW win, int x, int y, int rid);
|
|
void xvt_dwin_draw_image(WINDOW win, XVT_IMAGE image, RCT* dest, RCT* source);
|
|
void xvt_dwin_draw_oval(WINDOW Win, RCT* r);
|
|
void xvt_dwin_draw_pie(WINDOW win, RCT *rctp, int start_x, int start_y, int stop_x, int stop_y);
|
|
void xvt_dwin_draw_polygon(WINDOW win, PNT *lpnts, int npnts);
|
|
void xvt_dwin_draw_rect(WINDOW win, RCT *rctp);
|
|
void xvt_dwin_draw_set_pos(WINDOW win, PNT pnt);
|
|
void xvt_dwin_draw_text(WINDOW win, int x, int y, const char *s, int len);
|
|
RCT* xvt_dwin_get_clip(WINDOW win, RCT* rct);
|
|
DRAW_CTOOLS* xvt_dwin_get_draw_ctools(WINDOW win, DRAW_CTOOLS *ctoolsp);
|
|
XVT_FNTID xvt_dwin_get_font(WINDOW win);
|
|
void xvt_dwin_get_font_metrics(WINDOW win, int *leadingp, int *ascentp, int *descentp);
|
|
long xvt_dwin_get_font_size_mapped(WINDOW win);
|
|
int xvt_dwin_get_text_width(WINDOW win, const char *s, int len);
|
|
void xvt_dwin_invalidate_rect(WINDOW win, RCT *rctp);
|
|
BOOLEAN xvt_dwin_is_update_needed(WINDOW Win, RCT* rctp);
|
|
void xvt_dwin_scroll_rect(WINDOW win, RCT *rctp, int dh, int dv);
|
|
void xvt_dwin_set_back_color(WINDOW win, COLOR color);
|
|
void xvt_dwin_set_cbrush(WINDOW win, CBRUSH* cbrush);
|
|
void xvt_dwin_set_clip(WINDOW win, RCT* rct);
|
|
void xvt_dwin_set_cpen(WINDOW win, CPEN* cpen);
|
|
void xvt_dwin_set_draw_ctools(WINDOW win, DRAW_CTOOLS* xct);
|
|
void xvt_dwin_set_draw_mode(WINDOW win, DRAW_MODE mode);
|
|
void xvt_dwin_set_font(WINDOW win, XVT_FNTID font_id);
|
|
void xvt_dwin_set_fore_color(WINDOW win, COLOR color);
|
|
void xvt_dwin_set_std_cpen(WINDOW win, long flag);
|
|
void xvt_dwin_draw_line(WINDOW win, PNT pnt);
|
|
void xvt_dwin_update(WINDOW Win);
|
|
|
|
XVT_ERRSEV xvt_errmsg_get_sev_id(XVT_ERRMSG err);
|
|
|
|
long xvt_fmap_get_family_sizes(PRINT_RCD *precp, char *family, long *size_array, BOOLEAN *scalable, long max_sizes);
|
|
long xvt_fmap_get_families(PRINT_RCD *precp, char **family_array, long max_families);
|
|
|
|
void xvt_font_copy(XVT_FNTID dest_font_id, XVT_FNTID src_font_id, XVT_FONT_ATTR_MASK mask);
|
|
XVT_FNTID xvt_font_create(void);
|
|
void xvt_font_deserialize(XVT_FNTID font_id, char *buf);
|
|
void xvt_font_destroy(XVT_FNTID font_id);
|
|
BOOLEAN xvt_font_get_family(XVT_FNTID font_id, char* buf, long max_buf);
|
|
BOOLEAN xvt_font_get_family_mapped(XVT_FNTID font_id, char* buf, long max_buf);
|
|
void xvt_font_get_metrics(XVT_FNTID font_id, int *leadingp, int *ascentp, int *descentp);
|
|
BOOLEAN xvt_font_get_native_desc(XVT_FNTID font_id, char *buf, long max_buf);
|
|
long xvt_font_get_size(XVT_FNTID font_id);
|
|
XVT_FONT_STYLE_MASK xvt_font_get_style(XVT_FNTID font_id);
|
|
WINDOW xvt_font_get_win(XVT_FNTID font_id);
|
|
BOOLEAN xvt_font_is_mapped(XVT_FNTID font_id);
|
|
void xvt_font_map(XVT_FNTID font_id, WINDOW font_win );
|
|
void xvt_font_map_using_default(XVT_FNTID font_id);
|
|
void xvt_font_set_family(XVT_FNTID font_id, char* family);
|
|
void xvt_font_set_size(XVT_FNTID font_id, long size);
|
|
void xvt_font_set_style(XVT_FNTID font_id, XVT_FONT_STYLE_MASK mask);
|
|
long xvt_font_serialize(XVT_FNTID font_id, char *buf, long max_buf);
|
|
void xvt_font_unmap(XVT_FNTID font_id);
|
|
|
|
BOOLEAN xvt_fsys_convert_dir_to_str(DIRECTORY *dirp, char *path, int sz_path);
|
|
BOOLEAN xvt_fsys_convert_str_to_dir(const char *path, DIRECTORY *dirp);
|
|
BOOLEAN xvt_fsys_get_dir(DIRECTORY *dirp);
|
|
void xvt_fsys_get_default_dir(DIRECTORY *dirp);
|
|
SLIST xvt_fsys_list_files(char *type, char *pat, BOOLEAN dirs);
|
|
void xvt_fsys_restore_dir();
|
|
void xvt_fsys_save_dir();
|
|
BOOLEAN xvt_fsys_set_dir(DIRECTORY *dirp);
|
|
|
|
void xvt_help_close_helpfile(XVT_HELP_INFO hi);
|
|
XVT_HELP_INFO xvt_help_open_helpfile(FILE_SPEC *fs, unsigned long flags);
|
|
BOOLEAN xvt_help_process_event(XVT_HELP_INFO hi, WINDOW win, EVENT *ev);
|
|
|
|
XVT_IMAGE xvt_image_create(XVT_IMAGE_FORMAT format, short width, short height, long reserved);
|
|
void xvt_image_destroy(XVT_IMAGE image);
|
|
COLOR xvt_image_get_clut(XVT_IMAGE image, short index);
|
|
void xvt_image_get_dimensions(XVT_IMAGE image, short *width, short *height);
|
|
XVT_IMAGE_FORMAT xvt_image_get_format(XVT_IMAGE image);
|
|
short xvt_image_get_ncolors(XVT_IMAGE image);
|
|
COLOR xvt_image_get_pixel(XVT_IMAGE image, short x, short y);
|
|
XVT_IMAGE xvt_image_read(const char *filenamep);
|
|
XVT_IMAGE xvt_image_read_bmp(const char *filenamep);
|
|
void xvt_image_set_clut(XVT_IMAGE image, short index, COLOR color);
|
|
void xvt_image_set_ncolors(XVT_IMAGE image, short ncolors);
|
|
void xvt_image_set_pixel(XVT_IMAGE image, short x, short y, COLOR color);
|
|
void xvt_image_transfer(XVT_IMAGE dstimage, XVT_IMAGE srcimage, RCT *dstrctp, RCT *srcrctp);
|
|
|
|
DATA_PTR xvt_mem_alloc(size_t size);
|
|
void xvt_mem_free(DATA_PTR p);
|
|
DATA_PTR xvt_mem_realloc(DATA_PTR p, size_t size);
|
|
DATA_PTR xvt_mem_rep(DATA_PTR dst, DATA_PTR src, unsigned int srclen, long reps);
|
|
DATA_PTR xvt_mem_zalloc(size_t size);
|
|
|
|
MENU_ITEM* xvt_menu_get_tree(WINDOW win);
|
|
void xvt_menu_set_font_sel(WINDOW win, XVT_FNTID font_id);
|
|
void xvt_menu_set_item_checked(WINDOW win, MENU_TAG tag, BOOLEAN check);
|
|
void xvt_menu_set_item_enabled(WINDOW win, MENU_TAG tag, BOOLEAN enable);
|
|
void xvt_menu_set_item_title(WINDOW win, MENU_TAG tag, char* text);
|
|
void xvt_menu_set_tree(WINDOW win, MENU_ITEM* tree);
|
|
void xvt_menu_update(WINDOW win);
|
|
// Added by Guy
|
|
typedef const char* TRANSLATE_CALLBACK(const char* ita);
|
|
void xvt_menu_translate_tree(WINDOW win, TRANSLATE_CALLBACK tc);
|
|
|
|
short xvt_palet_add_colors(XVT_PALETTE palet, COLOR *colorsp, short numcolors);
|
|
short xvt_palet_add_colors_from_image(XVT_PALETTE palet, XVT_IMAGE image);
|
|
XVT_PALETTE xvt_palet_create(XVT_PALETTE_TYPE type, XVT_PALETTE_ATTR reserved);
|
|
void xvt_palet_destroy(XVT_PALETTE palet);
|
|
short xvt_palet_get_colors(XVT_PALETTE palet, COLOR *colorsp, short maxcolors);
|
|
short xvt_palet_get_ncolors(XVT_PALETTE palet);
|
|
int xvt_palet_get_tolerance(XVT_PALETTE p);
|
|
void xvt_palet_set_tolerance(XVT_PALETTE p, int t);
|
|
|
|
void xvt_print_close(void);
|
|
BOOLEAN xvt_print_close_page(PRINT_RCD *precp);
|
|
PRINT_RCD* xvt_print_create(int *sizep);
|
|
PRINT_RCD* xvt_print_create_by_name(int* sizep, const char* name);
|
|
WINDOW xvt_print_create_win(PRINT_RCD *precp, char *title);
|
|
void xvt_print_destroy(PRINT_RCD *precp);
|
|
RCT* xvt_print_get_next_band(void);
|
|
BOOLEAN xvt_print_is_valid(PRINT_RCD *precp);
|
|
BOOLEAN xvt_print_open(void);
|
|
BOOLEAN xvt_print_start_thread (BOOLEAN (* print_fcn)(long), long data);
|
|
BOOLEAN xvt_print_open_page(PRINT_RCD *precp);
|
|
|
|
int xvt_rect_get_height(RCT *rctp);
|
|
int xvt_rect_get_width(RCT *rctp);
|
|
BOOLEAN xvt_rect_has_point(RCT *rctp, PNT pnt);
|
|
BOOLEAN xvt_rect_intersect(RCT *drctp, RCT *rctp1, RCT *rctp2);
|
|
BOOLEAN xvt_rect_is_empty(const RCT *rctp);
|
|
void xvt_rect_offset(RCT *rctp, short dh, short dv);
|
|
void xvt_rect_set(RCT *rctp, short left, short top, short right, short bottom);
|
|
void xvt_rect_set_empty(RCT *rctp);
|
|
BOOLEAN xvt_rect_set_pos(RCT *rctp, PNT pos);
|
|
|
|
void xvt_res_free_menu_tree(MENU_ITEM* tree);
|
|
XVT_IMAGE xvt_res_get_image(int rid);
|
|
MENU_ITEM* xvt_res_get_menu(int rid);
|
|
char* xvt_res_get_str(int rid, char *s, int sz_s);
|
|
|
|
int xvt_sbar_get_pos(WINDOW win, SCROLL_TYPE t);
|
|
int xvt_sbar_get_proportion(WINDOW win, SCROLL_TYPE t);
|
|
void xvt_sbar_get_range(WINDOW win, SCROLL_TYPE t, int *minp, int *maxp);
|
|
void xvt_sbar_set_pos(WINDOW win, SCROLL_TYPE t, int pos);
|
|
void xvt_sbar_set_proportion(WINDOW win, SCROLL_TYPE t, int proportion);
|
|
void xvt_sbar_set_range(WINDOW win, SCROLL_TYPE t, int min, int max);
|
|
|
|
void xvt_scr_beep(void);
|
|
WINDOW xvt_scr_get_focus_topwin(void);
|
|
WINDOW xvt_scr_get_focus_vobj(void);
|
|
SLIST xvt_scr_list_wins();
|
|
void xvt_scr_set_busy_cursor();
|
|
void xvt_scr_set_focus_vobj(WINDOW win);
|
|
|
|
BOOLEAN xvt_slist_add_at_elt(SLIST x, SLIST_ELT e, const char *sx, long data);
|
|
int xvt_slist_count(SLIST x);
|
|
SLIST xvt_slist_create();
|
|
void xvt_slist_destroy(SLIST list);
|
|
char* xvt_slist_get(SLIST x, SLIST_ELT e, long *datap);
|
|
long* xvt_slist_get_data(SLIST_ELT elt);
|
|
SLIST_ELT xvt_slist_get_first(SLIST list);
|
|
SLIST_ELT xvt_slist_get_next(SLIST list, SLIST_ELT item);
|
|
|
|
char* xvt_str_duplicate(const char* str);
|
|
BOOLEAN xvt_str_match(const char* str, const char* pat, BOOLEAN case_sensitive);
|
|
|
|
long xvt_timer_create(WINDOW win, long interval);
|
|
void xvt_timer_destroy(long id);
|
|
|
|
void xvt_vobj_destroy(WINDOW win);
|
|
long xvt_vobj_get_attr(WINDOW win, long data);
|
|
RCT* xvt_vobj_get_client_rect(WINDOW win, RCT *rctp);
|
|
long xvt_vobj_get_data(WINDOW win);
|
|
RCT* xvt_vobj_get_outer_rect(WINDOW win, RCT *rctp);
|
|
XVT_PALETTE xvt_vobj_get_palet(WINDOW win);
|
|
WINDOW xvt_vobj_get_parent(WINDOW win);
|
|
char* xvt_vobj_get_title(WINDOW win, char *title, int sz_title);
|
|
WIN_TYPE xvt_vobj_get_type(WINDOW win);
|
|
void xvt_vobj_move(WINDOW win, RCT *rctp);
|
|
void xvt_vobj_raise(WINDOW win);
|
|
void xvt_vobj_set_attr(WINDOW win, long data, long value);
|
|
void xvt_vobj_set_data(WINDOW win, long AppData);
|
|
void xvt_vobj_set_enabled(WINDOW win, BOOLEAN enabled);
|
|
void xvt_vobj_set_palet(WINDOW win, XVT_PALETTE palet);
|
|
void xvt_vobj_set_title(WINDOW win, char *title);
|
|
void xvt_vobj_set_visible(WINDOW win, BOOLEAN show);
|
|
void xvt_vobj_translate_points(WINDOW from_win, WINDOW to_win, PNT *pntp, int npnts);
|
|
|
|
WINDOW xvt_win_create(WIN_TYPE wtype, RCT *rct_p, char *title, int menu_rid, WINDOW parent_win, long win_flags, EVENT_MASK mask, EVENT_HANDLER eh, long app_data);
|
|
long xvt_win_dispatch_event(WINDOW win, EVENT *event_p);
|
|
void xvt_win_release_pointer(void);
|
|
void xvt_win_set_caret_size(WINDOW win, int width, int height);
|
|
void xvt_win_set_caret_pos(WINDOW win, PNT p);
|
|
void xvt_win_set_caret_visible(WINDOW win, BOOLEAN on);
|
|
void xvt_win_set_cursor(WINDOW win, CURSOR Cursor);
|
|
void xvt_win_set_handler(WINDOW win, EVENT_HANDLER eh);
|
|
void xvt_win_trap_pointer(WINDOW win);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|