gui.h
来自「开放源码的编译器open watcom 1.6.0版的源代码」· C头文件 代码 · 共 976 行 · 第 1/3 页
H
976 行
extern gui_window *GUIGetNextWindow( gui_window *wnd );
extern gui_window *GUIGetFirstSibling( gui_window *wnd );
extern bool GUIIsValidWindow( gui_window *wnd );
extern bool GUISetFocus( gui_window *wnd, unsigned id );
extern bool GUIGetFocus( gui_window *wnd, unsigned *id );
extern bool GUIResizeWindow( gui_window *wnd, gui_rect *rect );
extern bool GUIIsMinimized( gui_window *wnd );
extern bool GUIIsMaximized( gui_window *wnd );
extern void GUIMaximizeWindow( gui_window *wnd );
extern void GUIMinimizeWindow( gui_window *wnd );
extern void GUIRestoreWindow( gui_window *wnd );
extern void GUIHideWindow( gui_window *wnd );
extern void GUIShowWindow( gui_window *wnd );
extern void GUIShowWindowNA( gui_window *wnd );
extern bool GUIIsWindowVisible( gui_window *wnd );
extern void GUISetRestoredSize( gui_window *wnd, gui_rect *rect );
extern bool GUIGetRestoredSize( gui_window *wnd, gui_rect *rect );
extern bool GUISetIcon( gui_window * wnd, gui_resource *res );
extern bool GUISetRedraw( gui_window *wnd, bool redraw );
extern bool GUICascadeWindows( void );
extern void GUIWantPartialRows( gui_window *wnd, bool want );
extern void GUISetCheckResizeAreaForChildren( gui_window *wnd, bool check );
/* Cursor Functions */
extern bool GUIGetCursorPos( gui_window *wnd, gui_point *point );
extern bool GUISetCursorPos( gui_window *wnd, gui_point *point );
extern bool GUIGetCursorType( gui_window *wnd, gui_char_cursor *cursor );
extern bool GUISetCursorType( gui_window *wnd, gui_char_cursor cursor );
extern void *GUISetMouseCursor( gui_mouse_cursor type );
extern void GUIResetMouseCursor( void* old_cursor );
/* Font Functions */
extern bool GUIFontsSupported( void );
extern bool GUIChangeFont( gui_window *wnd );
extern char *GUIGetFontInfo( gui_window *wnd );
extern bool GUISetFontInfo( gui_window *wnd, char *fontinfo );
extern bool GUISetSystemFont( gui_window *wnd, bool fixed );
extern char *GUIGetFontFromUser( char *fontinfo );
/* Painting functions */
extern bool GUIFillRect( gui_window *wnd, gui_rect *rect, gui_attr attr );
extern bool GUIFillBar( gui_window *wnd, gui_rect *rect, gui_attr attr );
extern bool GUIDrawRect( gui_window *wnd, gui_rect *rect, gui_attr attr );
extern bool GUIDrawLine( gui_window *wnd, gui_point *start, gui_point *end,
gui_line_styles style, gui_ord thickness, gui_attr attr );
extern bool GUIFillRectRGB( gui_window *wnd, gui_rect *rect, gui_rgb rgb );
extern bool GUIDrawRectRGB( gui_window *wnd, gui_rect *rect, gui_rgb rgb );
extern bool GUIDrawLineRGB( gui_window *wnd, gui_point *start, gui_point *end,
gui_line_styles style, gui_ord thickness, gui_rgb rgb );
extern void GUIDrawText( gui_window *wnd, char *text, int length,
gui_ord row, gui_ord indent, gui_attr attr );
extern void GUIDrawTextPos( gui_window *wnd, char *text, int length,
gui_coord *pos, gui_attr attr );
extern void GUIDrawTextExtent( gui_window *wnd, char *text, int length,
gui_ord row, gui_ord indent, gui_attr attr,
gui_ord extentx );
extern void GUIDrawTextExtentPos( gui_window *wnd, char *text, int length,
gui_coord *pos, gui_attr attr, gui_ord extentx );
extern void GUIDrawTextRGB( gui_window *wnd, char *text, int length,
gui_ord row, gui_ord indent,
gui_rgb fore, gui_rgb back );
extern void GUIDrawTextPosRGB( gui_window *wnd, char *text, int length,
gui_coord *pos, gui_rgb fore, gui_rgb back );
extern void GUIDrawTextExtentRGB( gui_window *wnd, char *text, int length,
gui_ord row, gui_ord indent,
gui_rgb fore, gui_rgb back,
gui_ord extentx );
extern void GUIDrawTextExtentPosRGB( gui_window *wnd, char *text, int length,
gui_coord *pos,
gui_rgb fore, gui_rgb back,
gui_ord extentx );
extern bool GUIDrawBar( gui_window *wnd, gui_ord row, gui_ord start,
gui_ord width, gui_bar_styles bstyle, gui_attr attr,
bool selected );
extern bool GUIDrawBarGroup( gui_window *wnd, gui_ord row, gui_ord start,
gui_ord width1, gui_ord width2, gui_bar_styles bstyle,
gui_attr attr1, gui_attr attr2, bool selected );
/* Text Functions */
extern bool GUISetWindowText( gui_window * wnd, char * data );
extern int GUIGetWindowTextLength( gui_window *wnd );
extern int GUIGetWindowText( gui_window *wnd, char *data, int max_length );
extern gui_ord GUIGetRow( gui_window * wnd, gui_point *pos );
extern gui_ord GUIGetCol( gui_window * wnd, char *text, gui_point *pos );
extern gui_ord GUIGetStringPos( gui_window *wnd, gui_ord indent,
char * string, int mouse_x );
extern gui_ord GUIGetExtentX( gui_window *wnd, char * text, int length );
extern gui_ord GUIGetExtentY( gui_window *wnd, char * text );
extern gui_ord GUIGetControlExtentX( gui_window * wnd, unsigned id, char * text, int length );
extern gui_ord GUIGetControlExtentY( gui_window * wnd, unsigned id, char * text );
extern void GUIGetTextMetrics( gui_window *wnd, gui_text_metrics *metrics );
extern void GUIGetDlgTextMetrics( gui_text_metrics *metrics );
extern void GUIGetPoint( gui_window* wnd, gui_ord extent, gui_ord row,
gui_point *point );
/* Menu Functions */
extern bool GUICreateFloatingPopup( gui_window *wnd, gui_point *location,
int num_menu_items, gui_menu_struct *menu,
gui_mouse_track track, int *curr_item );
extern bool GUITrackFloatingPopup( gui_window *wnd, gui_point *location,
gui_mouse_track track, int *curr_item );
extern bool GUIEnableMenuItem( gui_window *wnd, int id, bool enabled, bool floating );
extern bool GUICheckMenuItem( gui_window *wnd, int id, bool check, bool floating );
extern bool GUISetMenuText( gui_window *wnd, int id, char *text, bool floating );
extern bool GUISetHintText( gui_window *wnd, int id, char *hinttext );
extern bool GUIEnableMDIMenus( bool enable );
extern bool GUIEnableMenus( gui_window *wnd, bool enable ); // NYI
extern bool GUIDeleteMenuItem( gui_window *wnd, int id, bool floating );
extern bool GUIResetMenus( gui_window *wnd, int num_menus, gui_menu_struct *menu );
extern int GUIGetMenuPopupCount( gui_window *wnd, int id );
extern bool GUIInsertMenu( gui_window *wnd, int offset, gui_menu_struct *menu, bool floating );
extern bool GUIInsertMenuByID( gui_window *wnd, unsigned id, gui_menu_struct *menu );
extern bool GUIAppendMenu( gui_window *wnd, gui_menu_struct *menu, bool floating );
extern bool GUIAppendMenuByOffset( gui_window *wnd, int offset, gui_menu_struct *menu );
extern bool GUIAppendMenuToPopup( gui_window *wnd, unsigned id, gui_menu_struct *menu, bool floating );
extern bool GUIInsertMenuToPopup( gui_window *wnd, unsigned id, int offset, gui_menu_struct *menu, bool floating );
/* Toolbar Functions */
extern bool GUICreateFloatToolBar( gui_window *wnd, bool fixed,
gui_ord height, int num_items,
gui_toolbar_struct *toolbar, bool excl,
gui_colour_set *plain,
gui_colour_set *standout, gui_rect *rect );
extern bool GUICreateToolBar( gui_window *wnd, bool fixed, gui_ord height,
int num_items, gui_toolbar_struct *toolbar,
bool excl, gui_colour_set *plain,
gui_colour_set *standout );
extern bool GUICloseToolBar( gui_window *wnd );
extern bool GUIHasToolBar( gui_window *wnd );
extern bool GUIChangeToolBar( gui_window *wnd );
extern bool GUIToolBarFixed( gui_window *wnd );
/* Status Window Functions */
extern bool GUICreateStatusWindow( gui_window *wnd, gui_ord x, gui_ord height,
gui_colour_set *colour );
extern bool GUICloseStatusWindow( gui_window *wnd );
extern bool GUIHasStatus( gui_window *wnd );
extern bool GUIDrawStatusText( gui_window *wnd, char *text );
extern bool GUIClearStatusText( gui_window *wnd );
extern bool GUIResizeStatusWindow( gui_window *wnd, gui_ord x, gui_ord height );
/* Help Functions */
// The new breed of GUI help
// required for pm only
// |
// V
extern gui_help_instance GUIHelpInit( gui_window *wnd, char *file, char *title );
extern void GUIHelpFini( gui_help_instance inst, gui_window *wnd, char *file );
extern bool GUIShowHelp( gui_help_instance inst, gui_window *wnd, gui_help_actions act, char *file, char *topic );
// the obsolete, crotchety old guard
// please use the above functions instead
extern bool GUIDisplayHelp( gui_window *wnd, char *file, char *topic );
extern bool GUIDisplayHelpWin4( gui_window *wnd, char *file, char *topic );
extern bool GUIDisplayHelpId( gui_window *wnd, char *file, int id );
/* Scroll Functions */
/* Init - set value, don't draw anything */
/* Set - set value, do scrolling indicated */
/* Do - just do scrolling, don't touch value */
/* Get - just return current value */
/* Thumb - does an init */
/* deals with character units */
extern void GUIInitHScrollCol( gui_window *wnd, int hscroll_pos );
extern void GUIInitVScrollRow( gui_window *wnd, int vscroll_pos );
extern void GUISetHScrollCol( gui_window *wnd, int hscroll_pos );
extern void GUISetVScrollRow( gui_window *wnd, int vscroll_pos );
extern int GUIGetHScrollCol( gui_window *wnd );
extern int GUIGetVScrollRow( gui_window *wnd );
extern void GUISetHScrollRangeCols( gui_window *wnd, gui_ord range );
extern void GUISetVScrollRangeRows( gui_window *wnd, gui_ord range );
extern gui_ord GUIGetHScrollRangeCols( gui_window *wnd );
extern gui_ord GUIGetVScrollRangeRows( gui_window *wnd );
extern void GUIDoHScroll( gui_window *wnd, int cols );
extern void GUIDoVScroll( gui_window *wnd, int rows );
extern void GUIDoHScrollClip( gui_window *wnd, int cols, int start, int end );
extern void GUIDoVScrollClip( gui_window *wnd, int rows, int start, int end );
/* deals in percent of range */
extern void GUISetHScrollThumb( gui_window * wnd, int percent );
extern void GUISetVScrollThumb( gui_window * wnd, int percent );
/* deals with user defined scale */
extern void GUIInitHScroll( gui_window *wnd, gui_ord hscroll_pos );
extern void GUIInitVScroll( gui_window *wnd, gui_ord vscroll_pos );
extern void GUISetHScroll( gui_window *wnd, gui_ord hscroll_pos );
extern void GUISetVScroll( gui_window *wnd, gui_ord vscroll_pos );
extern gui_ord GUIGetHScroll( gui_window *wnd );
extern gui_ord GUIGetVScroll( gui_window *wnd );
extern void GUISetHScrollRange( gui_window *wnd, gui_ord range );
extern void GUISetVScrollRange( gui_window *wnd, gui_ord range );
extern gui_ord GUIGetHScrollRange( gui_window *wnd );
extern gui_ord GUIGetVScrollRange( gui_window *wnd );
extern gui_ord GUIGetNumRows( gui_window *wnd );
/* Built in user interactions */
extern gui_message_return GUIDisplayMessage( gui_window *wnd,
char *message, char *caption,
gui_message_type type );
extern gui_message_return GUIGetNewVal( char *title, char *old, char **new_val );
extern int GUIDlgPick( char *text, PICKCALLBACK *InitPick );
extern int GUIDlgPickWithRtn( char *text, PICKCALLBACK *InitPick, PICKDLGOPEN* );
/* Dialog Functions */
extern bool GUICreateDialog( gui_create_info *dialog, int num_controls,
gui_control_info *controls );
extern bool GUICreateSysModalDialog( gui_create_info *dialog,
int num_controls,
gui_control_info *controls );
extern bool GUICreateResDialog( gui_create_info *dialog, long dlg_id );
extern bool GUICreateDialogFromRes( int id, gui_window *parent,
GUICALLBACK cb, void *extra );
extern void GUICloseDialog( gui_window * wnd );
/* Control Functions */
extern bool GUIAddControl( gui_control_info *info, gui_colour_set *plain,
gui_colour_set *standout );
extern bool GUIDeleteControl( gui_window *wnd, unsigned id );
extern bool GUIResizeControl( gui_window *wnd, unsigned id, gui_rect *rect );
extern bool GUIEnableControl( gui_window *wnd, unsigned id, bool enable );
extern bool GUIIsControlEnabled( gui_window *wnd, unsigned id );
extern bool GUIGetControlRect( gui_window *wnd, unsigned id, gui_rect *rect );
extern bool GUIGetControlClass( gui_window *wnd, unsigned id, gui_control_class *control_class );
extern void GUIHideControl( gui_window *wnd, unsigned id );
extern void GUIShowControl( gui_window *wnd, unsigned id );
extern bool GUIIsControlVisible( gui_window *wnd, unsigned id );
/* combo/list box functions */
extern bool GUIControlSetRedraw( gui_window *wnd, unsigned control, bool redraw );
extern bool GUIAddText( gui_window *wnd, unsigned id, char *text );
extern bool GUISetListItemData( gui_window *wnd, unsigned id, unsigned choice, void *data );
extern void *GUIGetListItemData( gui_window *wnd, unsigned id, unsigned choice );
extern bool GUIAddTextList( gui_window *wnd, unsigned id, unsigned items,
void *handle, char *(*getstring)(void*,unsigned) );
extern bool GUIInsertText( gui_window *wnd, unsigned id, int choice, char *text );
extern bool GUISetTopIndex( gui_window *wnd, unsigned id, int choice );
extern int GUIGetTopIndex( gui_window *wnd, unsigned id );
extern bool GUISetHorizontalExtent( gui_window *wnd, unsigned id, int extent );
extern bool GUIClearList( gui_window *wnd, unsigned id );
extern bool GUIDeleteItem( gui_window *wnd, unsigned id, int choice );
extern int GUIGetListSize( gui_window *wnd, unsigned id );
extern int GUIGetCurrSelect( gui_window *wnd, unsigned id );
extern bool GUISetCurrSelect( gui_window *wnd, unsigned id, int choice );
extern char *GUIGetListItem( gui_window *wnd, unsigned id, int choice );
extern bool GUISetText( gui_window *wnd, unsigned id, char *text );
extern bool GUIClearText( gui_window *wnd, unsigned id );
extern char * GUIGetText( gui_window *wnd, unsigned id );
extern bool GUISelectAll( gui_window *wnd, unsigned id, bool select );
extern bool GUISetEditSelect( gui_window *wnd, unsigned id, int start, int end );
extern bool GUIGetEditSelect( gui_window *wnd, unsigned id, int *start, int *end );
extern bool GUILimitEditText( gui_window *wnd, unsigned id, int len );
extern bool GUIDropDown( gui_window *wnd, unsigned id, bool drop );
extern void GUIScrollCaret( gui_window *wnd, unsigned id );
extern unsigned GUIIsChecked( gui_window *wnd, unsigned id );
extern bool GUISetChecked( gui_window *wnd, unsigned id, unsigned check );
/* Information Functions */
extern void GUIGetKeyState( gui_keystate *state );
extern void GUIFlushKeys( void );
extern void GUIDrainEvents( void );
extern void GUISetExtra( gui_window *wnd, void *extra );
extern void *GUIGetExtra( gui_window *wnd );
extern void GUIGetClientRect( gui_window *wnd, gui_rect *client );
extern bool GUIGetPaintRect( gui_window *wnd, gui_rect *paint );
extern void GUIGetAbsRect( gui_window *wnd, gui_rect *rect );
extern void GUIGetRect( gui_window *wnd, gui_rect *rect );
extern gui_scroll_styles GUIGetScrollStyle( gui_window *wnd );
extern gui_create_styles GUIGetCreateStyle( gui_window *wnd );
extern void GUITruncToPixel( gui_coord *coord );
extern bool GUIGetMousePosn( gui_window *wnd, gui_point *point );
extern void GUIGetSystemMetrics( gui_system_metrics *metrics );
extern bool GUIGetMinSize( gui_coord *size );
extern void GUIEnumChildWindows( gui_window *wnd, ENUMCALLBACK *func, void *param );
extern void GUIEnumControls( gui_window *wnd, CONTRENUMCALLBACK *func, void *param );
extern bool GUIIsGUI( void );
extern bool GUIGetArgs( char ***argv, int *argc );
/* Spawn functions */
extern void GUISpawnStart( void );
extern void GUISpawnEnd( void );
/* Resource String Functions */
extern bool GUILoadStrInit( char * fname );
extern bool GUILoadStrFini( void );
extern bool GUILoadString( int string_id, char *buffer, int buffer_length );
extern bool GUIIsLoadStrInitialized( void );
/* Hooking the F1 key */
void GUIHookF1( void );
void GUIUnHookF1( void );
/* DBCS functions */
extern int GUICharLen( int );
bool GUIIsFirstInstance( void );
void GUIHookFileDlg( bool hook );
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?