class interface WIN_RUNTIME

feature(s) from WIN_CONST
   --  Win32 constants
   --  Button constants

   Bn_clicked: INTEGER

   Bm_getcheck: INTEGER
      --  0xF0


   Bm_setcheck: INTEGER
      --  0xF1
      --  Listbox constants


   Lbn_selchange: INTEGER

   Lbn_dblclk: INTEGER

   Lbn_selcancel: INTEGER

   Lbn_setfocus: INTEGER

   Lbn_killfocus: INTEGER

   Lbn_errspace: INTEGER

   Lb_err: INTEGER

   Lb_resetcontent: INTEGER
      --  0x184


   Lb_setsel: INTEGER
      --  Ox185


   Lb_setcursel: INTEGER
      --  0x186


   Lb_getcursel: INTEGER
      --  0x188


   Lb_getselcount: INTEGER
      --  0x190


   Lb_setanchorindex: INTEGER
      --  0x19c


   Lb_setcaretindex: INTEGER
      --  0x19e


   Lb_getcaretindex: INTEGER
      --  0x19f
      --  Combobox constants


   Cbn_selchange: INTEGER

   Cbn_dblclk: INTEGER

   Cbn_setfocus: INTEGER

   Cbn_killfocus: INTEGER

   Cbn_editchange: INTEGER

   Cbn_editupdate: INTEGER

   Cbn_dropdown: INTEGER

   Cbn_closeup: INTEGER

   Cbn_selendok: INTEGER

   Cbn_selendcancel: INTEGER

   Cbn_errspace: INTEGER

   Cb_getcursel: INTEGER
      --  0x147


   Cb_setcursel: INTEGER
      --  0X14e


   Cb_resetcontent: INTEGER
      --  0x14b


   Cb_geteditsel: INTEGER
      --  0x140
      --  Editbox constants


   En_change: INTEGER
      --  0x300


   En_update: INTEGER
      --  0x400


   En_errspace: INTEGER
      --  0x500


   Em_getsel: INTEGER
      --  0xB0


   Em_canundo: INTEGER
      --  0xc6


   Em_undo: INTEGER
      --  0xc7


   Em_getmodify: INTEGER
      --  0xB8


   Em_setmodify: INTEGER
      --  0xB9
      --  Scrollbar constants


   Sb_lineup: INTEGER

   Sb_linedown: INTEGER

   Sb_pageup: INTEGER

   Sb_pagedown: INTEGER

   Sb_thumbposition: INTEGER

   Sb_thumbtrack: INTEGER

   Sb_horz: INTEGER

   Sb_vert: INTEGER

   Sb_ctl: INTEGER
      --  ShowWindow constants


   Sw_showdefault: INTEGER

   Sw_shownormal: INTEGER

   Sw_show: INTEGER

   Sw_hide: INTEGER

   Sw_restore: INTEGER

   Sw_showminimized: INTEGER

   Sw_showmaximized: INTEGER
      --  Cursors constants


   Idc_appstarting: INTEGER

   Idc_arrow: INTEGER

   Idc_cross: INTEGER

   Idc_ibeam: INTEGER

   Idc_icon: INTEGER

   Idc_no: INTEGER

   Idc_uparrow: INTEGER

   Idc_wait: INTEGER

   Idc_sizenwse: INTEGER

   Idc_sizenesw: INTEGER

   Idc_sizewe: INTEGER

   Idc_sizens: INTEGER

   Idc_sizeall: INTEGER
      --  Static controls constants


   Ss_simple: INTEGER
      --  0xB


   Ss_center: INTEGER

   Ss_left: INTEGER

   Ss_grayframe: INTEGER

   Ss_grayrect: INTEGER

   Ss_blackrect: INTEGER

   Ss_blackframe: INTEGER

   Ss_icon: INTEGER
      --  GetStockObject constants


   Black_brush: INTEGER

   Null_brush: INTEGER

   White_brush: INTEGER

   Black_pen: INTEGER

   Null_pen: INTEGER

   White_pen: INTEGER

   Ansi_fixed_font: INTEGER

   Ansi_var_font: INTEGER

   Device_default_font: INTEGER

   Oem_fixed_font: INTEGER

   System_font: INTEGER

   Default_gui_font: INTEGER
      --  WINVER > 0x0400


   Default_palette: INTEGER
      --  Window Event constants


   Wm_null: INTEGER

   Wm_create: INTEGER

   Wm_destroy: INTEGER

   Wm_move: INTEGER

   Wm_size: INTEGER

   Wm_activate: INTEGER

   Wm_setfocus: INTEGER

   Wm_killfocus: INTEGER

   Wm_enable: INTEGER
      --  0x000A


   Wm_paint: INTEGER
      --  0x000F


   Wm_close: INTEGER
      --  0x0010


   Wm_queryendsession: INTEGER
      --  0x0011


   Wm_quit: INTEGER
      --  0x0012


   Wm_queryopen: INTEGER
      --  0x0013


   Wm_erasebkgnd: INTEGER
      --  0x0014


   Wm_syscolorchange: INTEGER
      --  0x0015


   Wm_endsession: INTEGER
      --  0x0016


   Wm_showwindow: INTEGER
      --  0x0018


   Wm_activateapp: INTEGER
      --  0x001C


   Wm_fontchange: INTEGER
      --  0x001D


   Wm_timechange: INTEGER
      --  0x001E


   Wm_cancelmode: INTEGER
      --  0x001F


   Wm_setcursor: INTEGER
      --  0x0020


   Wm_mouseactivate: INTEGER
      --  0x0021


   Wm_childactivate: INTEGER
      --  0x0022


   Wm_painticon: INTEGER
      --  0x0026


   Wm_iconerasebkgnd: INTEGER
      --  0x0027


   Wm_sethotkey: INTEGER
      --  0x0032


   Wm_gethotkey: INTEGER
      --  0x0033


   Wm_compacting: INTEGER
      --  0x0041


   Wm_windowposchanging: INTEGER
      --  0x0046


   Wm_windowposchanged: INTEGER
      --  0x0047


   Wm_copydata: INTEGER
      --  0x004A


   Wm_keydown: INTEGER
      --  0x0100


   Wm_keyup: INTEGER
      --  0x0101


   Wm_char: INTEGER
      --  0x0102


   Wm_deadchar: INTEGER
      --  0x0103


   Wm_syschar: INTEGER
      --  0x0106


   Wm_command: INTEGER
      --  0x0111


   Wm_syscommand: INTEGER
      --  0x0112


   Wm_timer: INTEGER
      --  0x0113


   Wm_hscroll: INTEGER
      --  0x0114


   Wm_vscroll: INTEGER
      --  0x0115


   Wm_initmenu: INTEGER
      --  0x0116


   Wm_initmenupopup: INTEGER
      --  0x0117


   Wm_menuselect: INTEGER
      --  0x011F


   Wm_menuchar: INTEGER
      --  0x0120


   Wm_enteridle: INTEGER
      --  0x0121


   Wm_mousemove: INTEGER
      --  0x0200


   Wm_lbuttondown: INTEGER
      --  0x0201


   Wm_lbuttonup: INTEGER
      --  0x0202


   Wm_lbuttondblclk: INTEGER
      --  0x0203


   Wm_rbuttondown: INTEGER
      --  0x0204


   Wm_rbuttonup: INTEGER
      --  0x0205


   Wm_rbuttondblclk: INTEGER
      --  0x0206


   Wm_mbuttondown: INTEGER
      --  0x0207


   Wm_mbuttonup: INTEGER
      --  0x0208


   Wm_mbuttondblclk: INTEGER
      --  0x0209


   Wm_parentnotify: INTEGER
      --  0x0210


   Wm_dropfiles: INTEGER
      --  0x0233


   Wm_cut: INTEGER
      --  0x0300


   Wm_copy: INTEGER
      --  0x0301


   Wm_paste: INTEGER
      --  0x0302


   Wm_clear: INTEGER
      --  0x0303


   Wm_undo: INTEGER
      --  0x0304


   Wm_querynewpalette: INTEGER
      --  0x030F


   Wm_paletteischanging: INTEGER
      --  0x0310


   Wm_palettechanged: INTEGER
      --  0x0311


   Wm_hotkey: INTEGER
      --  0x0312
      --  Paintstruct size for WM_PAINT


   Paintstruct_size: INTEGER
      --  Extra pseudo-events


   Filo_scroll: INTEGER

   Filo_command: INTEGER
      --  Help


   Help_context: INTEGER

   Help_quit: INTEGER

   Help_index: INTEGER
      --  equals Help_contents


   Help_helponhelp: INTEGER

   Help_setindex: INTEGER

   Help_key: INTEGER

   Help_command: INTEGER
      --  Accelerator


   Fvirtkey: INTEGER
      --  0x01 (TRUE?)


   Fnoinvert: INTEGER
      --  0x02


   Fshift: INTEGER
      --  0x04


   Fcontrol: INTEGER
      --  0x08


   Falt: INTEGER
      --  0x10
      --  Size constant


   Size_restored: INTEGER

   Size_minimized: INTEGER

   Size_maximized: INTEGER

   Size_maxshow: INTEGER

   Size_maxhide: INTEGER
      --  Message box


   Mb_iconinformation: INTEGER
      --  0x40


   Mb_iconexclamation: INTEGER
      --  0x30


   Mb_iconquestion: INTEGER
      --  0x20


   Mb_iconstop: INTEGER
      --  0x10


   Mb_yesno: INTEGER

   Mb_yesnocancel: INTEGER

   Mb_ok: INTEGER

   Mb_okcancel: INTEGER

   Mb_retrycancel: INTEGER

   Mb_abortretryignore: INTEGER

   Idok: INTEGER

   Idcancel: INTEGER

   Idabort: INTEGER

   Idretry: INTEGER

   Idignore: INTEGER

   Idyes: INTEGER

   Idno: INTEGER
      --  Clipboard


   Cf_text: INTEGER

   Cf_bitmap: INTEGER

   Cf_metafilepict: INTEGER

   Cf_sylk: INTEGER

   Cf_dif: INTEGER

   Cf_tiff: INTEGER

   Cf_oemtext: INTEGER

   Cf_dib: INTEGER

   Cf_palette: INTEGER

   Cf_riff: INTEGER

   Cf_wave: INTEGER

   Cf_unicodetext: INTEGER

   Cf_enhmetafile: INTEGER
      --  Brushes


   Bs_solid: INTEGER

   Bs_null: INTEGER

   Bs_hatched: INTEGER
      --  Brushes pattern


   Hs_horizontal: INTEGER
      --  -----


   Hs_vertical: INTEGER
      --  |||||


   Hs_fdiagonal: INTEGER
      --  \\\\\


   Hs_bdiagonal: INTEGER
      --  /////


   Hs_cross: INTEGER
      --  +++++


   Hs_diagcross: INTEGER
      --  xxxxx
      --  Pens


   Ps_cosmetic: INTEGER

   Ps_geometric: INTEGER
      --  0x10000
      --  


   Ps_solid: INTEGER

   Ps_dash: INTEGER
      --  -----


   Ps_dot: INTEGER
      --  .....


   Ps_dashdot: INTEGER
      --  -.-.-


   Ps_dashdotdot: INTEGER
      --  -..-.


   Ps_null: INTEGER

   Ps_insideframe: INTEGER

   Ps_userstyle: INTEGER
      --  (not supported)


   Ps_alternate: INTEGER
      --  (only cosmetic)
      -- 


   Ps_endcap_round: INTEGER

   Ps_endcap_square: INTEGER
      --  0x100


   Ps_endcap_flat: INTEGER
      --  0x200
      -- 


   Ps_join_round: INTEGER

   Ps_join_bevel: INTEGER
      --  0x1000


   Ps_join_miter: INTEGER
      --  0x2000
      --  Page mapping mode


   Mm_text: INTEGER

   Mm_lometric: INTEGER

   Mm_himetric: INTEGER

   Mm_loenglish: INTEGER

   Mm_hienglish: INTEGER

   Mm_twips: INTEGER

   Mm_isotropic: INTEGER

   Mm_anisotropic: INTEGER
      --  Floodfile mode


   Floodfillborder: INTEGER

   Floodfillsurface: INTEGER
      --  Graphic background mode 


   Opaque: INTEGER

   Transparent: INTEGER
      --  ROP2 mode


   R2_black: INTEGER

   R2_notmergepen: INTEGER

   R2_masknotpen: INTEGER

   R2_notcopypen: INTEGER

   R2_maskpennot: INTEGER

   R2_not: INTEGER

   R2_xorpen: INTEGER

   R2_notmaskpen: INTEGER

   R2_maskpen: INTEGER

   R2_notxorpen: INTEGER

   R2_nop: INTEGER

   R2_mergenotpen: INTEGER

   R2_copypen: INTEGER

   R2_mergepennot: INTEGER

   R2_mergepen: INTEGER

   R2_white: INTEGER
      --  Text alignment


   Ta_left: INTEGER

   Ta_center: INTEGER

   Ta_right: INTEGER

   Ta_top: INTEGER

   Ta_baseline: INTEGER

   Ta_bottom: INTEGER
      --  LOGFONT structure size for enumeration


   Logfont_size: INTEGER
      --  Font


   Fixed_pitch: INTEGER

   Variable_pitch: INTEGER

   Ff_roman: INTEGER
      --  0x10


   Ff_swiss: INTEGER
      --  0x20


   Ff_modern: INTEGER
      --  0x30


   Ff_script: INTEGER
      --  0x40


   Ff_decorative: INTEGER
      --  0x50


   Ansi_charset: INTEGER
      --  also unicode (?)


   Default_charset: INTEGER

   Oem_charset: INTEGER

   Symbol_charset: INTEGER
      --  Pseudo text metrics


   Ftm_overhang: INTEGER

   Ftm_breakchar: INTEGER

   Ftm_defaultchar: INTEGER

   Ftm_firstchar: INTEGER

   Ftm_lastchar: INTEGER

   Ftm_avecharw: INTEGER

   Ftm_maxcharw: INTEGER

   Ftm_intleading: INTEGER

   Ftm_extleading: INTEGER

   Ftm_height: INTEGER

   Ftm_weight: INTEGER

   Ftm_ascent: INTEGER

   Ftm_descent: INTEGER

   Ftm_digaspx: INTEGER

   Ftm_digaspy: INTEGER

   Ftm_italic: INTEGER

   Ftm_underline: INTEGER

   Ftm_strikeout: INTEGER

   Ftm_pitch: INTEGER

   Ftm_family: INTEGER

   Ftm_charset: INTEGER

   Ftm_fixedpitch: INTEGER

   Ftm_vector: INTEGER

   Ftm_truetype: INTEGER

   Ftm_device: INTEGER
      --  Pseudo bad color for common dialog (win_std_color)


   Fcd_bad_color: INTEGER
      --  0x7F000000
      --  Device capabilities


   Driverversion: INTEGER

   Technology: INTEGER

   Dt_plotter: INTEGER

   Dt_rasdisplay: INTEGER

   Dt_rasprinter: INTEGER

   Dt_rascamera: INTEGER

   Dt_charstream: INTEGER

   Dt_metafile: INTEGER

   Dt_dispfile: INTEGER

   Horzsize: INTEGER

   Vertsize: INTEGER

   Horzres: INTEGER

   Vertres: INTEGER

   Logpixelsx: INTEGER

   Logpixelsy: INTEGER

   Bitspixel: INTEGER

   Planes: INTEGER

   Numbrushes: INTEGER

   Numpens: INTEGER

   Numfonts: INTEGER

   Numcolors: INTEGER

   Aspectx: INTEGER

   Aspecty: INTEGER

   Aspectxy: INTEGER

   Clipcaps: INTEGER

   Sizepalette: INTEGER

   Numreserved: INTEGER

   Colorres: INTEGER

   Rastercaps: INTEGER

   Rc_palette: INTEGER
      --  0x100


   Rc_bitblt: INTEGER

   Rc_banding: INTEGER

   Rc_scaling: INTEGER

   Rc_bitmap64: INTEGER

   Rc_di_bitmap: INTEGER
      --  0x0080


   Rc_dibtodev: INTEGER
      --  0x0200


   Rc_stretchblt: INTEGER
      --  0x0800


   Rc_floodfill: INTEGER
      --  0x1000


   Rc_stretchdib: INTEGER
      --  0x2000
      --  unsupported: Rc_*


   Curvecaps: INTEGER

   Cc_circles: INTEGER

   Cc_pie: INTEGER

   Cc_chord: INTEGER

   Cc_ellipses: INTEGER
      --  unsupported: Cc_*


   Cc_roundrect: INTEGER

   Linecaps: INTEGER

   Lc_none: INTEGER

   Lc_polyline: INTEGER
      --  unsupported: Lc_*


   Polygonalcaps: INTEGER

   Pc_none: INTEGER

   Pc_polygon: INTEGER

   Pc_rectangle: INTEGER

   Pc_windpolygon: INTEGER
      --  unsupported: Pc_*


   Textcaps: INTEGER

   Tc_op_character: INTEGER

   Tc_op_stroke: INTEGER

   Tc_cp_stroke: INTEGER

   Tc_cr_90: INTEGER

   Tc_cr_any: INTEGER
      --  unsupported: Tc_*
      --  Registry


   Hkey_classes_root: INTEGER

   Hkey_current_user: INTEGER

   Hkey_local_machine: INTEGER

   Hkey_users: INTEGER

   Reg_none: INTEGER

   Reg_sz: INTEGER

   Reg_binary: INTEGER

   Reg_dword: INTEGER

   Reg_multi_sz: INTEGER
      --  File


   Invalid_handle_value: INTEGER
      --  0xFFFFFFFF


   Filetime_length: INTEGER
      --  sizeof (FILETIME)


   Max_path: INTEGER

   Create_new: INTEGER

   Create_always: INTEGER

   Open_existing: INTEGER

   Open_always: INTEGER

   Truncate_existing: INTEGER
      --  Synchronisation


   Infinite: INTEGER
      --  0xFFFFFFFF
      --  File attributes


   File_attribute_readonly: INTEGER
      --  0x1


   File_attribute_hidden: INTEGER
      --  0x2


   File_attribute_system: INTEGER
      --  0x4


   File_attribute_directory: INTEGER
      --  0x10


   File_attribute_archive: INTEGER
      --  0x20


   File_attribute_normal: INTEGER
      --  0x80
      --  Time


   Filo_gmt: INTEGER

   Filo_local: INTEGER

   Filo_year: INTEGER

   Filo_month: INTEGER

   Filo_day: INTEGER

   Filo_hour: INTEGER

   Filo_minute: INTEGER

   Filo_second: INTEGER
      --  Standard dialog


   Separator_filter: CHARACTER
      --  File open/save dialog separator


feature(s) from WIN_RUNTIME
   --  Exception

   Excep_listbox: STRING

   Excep_combo: STRING

   Excep_editbox: STRING

   Excep_file: STRING

   raise_exception (name: STRING)
      --  Portable raise function.


feature(s) from WIN_RUNTIME
   --  Convert types

   int_to_char (int: INTEGER): CHARACTER
      --  Character from character code (missing feature from kernel).


   int_to_bool (i: INTEGER): BOOLEAN
      --  Convert window integer representing a boolean value.


feature(s) from WIN_RUNTIME
   --  String (convert to low level value)

   ew_string (in: STRING): F_MEMORY
      --  Convert Eiffel string to memory block (then LPTSTR).

      require
         ok: in /= Void

feature(s) from WIN_RUNTIME
   --  String (return value)

   win_laststring: STRING
      --  Make from string.

      ensure
         done: Result /= Void

feature(s) from WIN_RUNTIME
   --  Misc return values

   win_lastbool1: BOOLEAN

   win_lastint1: INTEGER

   win_lastint2: INTEGER

   win_lastint3: INTEGER

   win_lastint4: INTEGER

feature(s) from WIN_RUNTIME
   --  Notifier

   win_init_notifier (notifier: NOTIFIER)

   win_init_notifier_ex (notifier: NOTIFIER; callback1, callback2, callback3: POINTER)

feature(s) from WIN_RUNTIME
   --  Memory for F_MEMORY

   win_mem_alloc (size: INTEGER): POINTER

   win_mem_free (ptr: POINTER)

feature(s) from WIN_RUNTIME
   --  Basic types pointer access

   win_getbyte (ptr: POINTER; offset: INTEGER): INTEGER

   win_setbyte (ptr: POINTER; offset: INTEGER; value: INTEGER)

   win_getword (byteptr: POINTER): INTEGER

   win_getlong (byteptr: POINTER): INTEGER

   win_setword (byteptr: POINTER; offset: INTEGER; value: INTEGER)

   win_setlong (byteptr: POINTER; offset: INTEGER; value: INTEGER)

   win_setlong_l (byteptr: POINTER; offset: INTEGER; value: INTEGER)

   win_setlong_b (byteptr: POINTER; offset: INTEGER; value: INTEGER)

   win_int2char (in: INTEGER): CHARACTER

   win_bitand (a, b: INTEGER): INTEGER

   win_bitor (a, b: INTEGER): INTEGER

   win_bitxor (a, b: INTEGER): INTEGER

   win_muldiv (m1, m2, d1: INTEGER): INTEGER

feature(s) from WIN_RUNTIME
   --  Windows

   win_show (winid: INTEGER; show_how: INTEGER)

   win_subclass_control (winid: INTEGER)

   win_event: BOOLEAN

   win_initwin

   win_create: INTEGER

   win_create_popup (winid: INTEGER): INTEGER

   win_create_dialog (winid: INTEGER; thick: BOOLEAN): INTEGER

   win_create_appdialog (thick: BOOLEAN): INTEGER

   win_create_child (winid: INTEGER; cursor: BOOLEAN; horscroll: BOOLEAN; verscroll: BOOLEAN): INTEGER

   win_create_clrchild (winid: INTEGER; back_color: INTEGER; cursor: BOOLEAN; verscroll, horscroll: BOOLEAN): INTEGER

   win_close (winid: INTEGER)

   win_destroy (winid: INTEGER)

   win_quit

   win_border (winid: INTEGER; newb: BOOLEAN)

   win_enable (winid: INTEGER)

   win_disable (winid: INTEGER)

   win_update (winid: INTEGER)

   win_update_rect (winid: INTEGER; x, y, xp, yp: INTEGER)

   win_scroll (winid: INTEGER; dx, dy: INTEGER)

   win_title (winid: INTEGER; str: POINTER)

   win_gettitle (winid: INTEGER)

   win_size (winid, parid: INTEGER)

   win_clientsize (winid: INTEGER)

   win_capture (windid: INTEGER)

   win_endcapture

   win_resize (winid: INTEGER; x, y, xp, yp: INTEGER)

   win_resizeclient (winid: INTEGER; x, y, xp, yp: INTEGER)

   win_keystate (vkey: INTEGER): BOOLEAN

   win_isicon (winid: INTEGER): BOOLEAN

   win_isenable (winid: INTEGER): BOOLEAN

   win_isvisible (winid: INTEGER): BOOLEAN

   win_activate (winid: INTEGER)

   win_focus (winid: INTEGER)

   win_hasfocus (winid: INTEGER): BOOLEAN

   win_isactive (winid: INTEGER): BOOLEAN

   win_setfont (winid, fontid: INTEGER)

   win_getfont (winid: INTEGER): INTEGER

   win_back_color (winid: INTEGER; clr: INTEGER)

feature(s) from WIN_RUNTIME
   --  Clipboard

   win_clip_open (winid: INTEGER): BOOLEAN

   win_clip_close

   win_clip_empty

   win_clip_has (type: INTEGER): BOOLEAN

   win_clip_hastext: BOOLEAN

   win_clip_copytext (text_str: POINTER)

   win_clip_pastetext

   win_clip_copy (type: INTEGER; hdle: INTEGER)

   win_clip_paste (type: INTEGER): INTEGER

feature(s) from WIN_RUNTIME
   --  Drag & Drop

   win_drag_accept (dropid: INTEGER; stat: BOOLEAN)

   win_drag_files (dropid: INTEGER): INTEGER

   win_drag_getfile (dropid: INTEGER; index: INTEGER)

   win_drag_getpoint (dropip: INTEGER): BOOLEAN

   win_drag_finish (dropid: INTEGER)

feature(s) from WIN_RUNTIME
   --  Common dialogs

   win_message (winid: INTEGER; title_str, text_str: POINTER; icon, buttons: INTEGER): INTEGER

   win_std_color (winid: INTEGER; oldcolor: INTEGER): INTEGER

   win_std_font (winid: INTEGER; oldcolor: INTEGER; getcolor, hasfont: BOOLEAN; logfontptr: POINTER): BOOLEAN

   win_std_print (winid: INTEGER; getdc, getdefault: BOOLEAN): INTEGER

   win_std_file (open: BOOLEAN; winid: INTEGER; title_str, initdir_str, initfile_str, filters_str: POINTER)

feature(s) from WIN_RUNTIME
   --  Menus

   win_drawmenu (winid: INTEGER)

   win_menu_addpopup (menuid: INTEGER; popupid: INTEGER; name_str: POINTER)

   win_menu_additem (menuid: INTEGER; id: INTEGER; name_str: POINTER)

   win_menu_addsep (menuid: INTEGER)

   win_menu_cbar: INTEGER

   win_menu_cpopup: INTEGER

   win_menu_destroy (menuid: INTEGER)

   win_menu_delete (menuid, itemid: INTEGER)

   win_menu_track (menuid, winid, x, y: INTEGER)

   win_menu_set (menuid, parentid: INTEGER)

   win_menu_chtext (menuid, itemid: INTEGER; newtext_str: POINTER)

   win_menu_enable (menuid, itemid: INTEGER; bool: BOOLEAN)

   win_menu_isenabled (menuid, itemid: INTEGER): BOOLEAN

   win_menu_checked (menuid, itemid: INTEGER; bool: BOOLEAN)

   win_menu_ischecked (menuid, itemid: INTEGER): BOOLEAN

feature(s) from WIN_RUNTIME
   --  Keyboard accelerators

   win_accel_create (acc_table: POINTER; size: INTEGER): INTEGER

   win_accel_enable (win_handle, acc_handle: INTEGER)

   win_accel_destroy (acc_handle: INTEGER)

feature(s) from WIN_RUNTIME
   --  Messages

   win_msg_void (winid: INTEGER; msgid: INTEGER)

   win_msg_bool (winid: INTEGER; msgid: INTEGER): BOOLEAN

   win_msg_setbool (winid: INTEGER; msgid: INTEGER; stat: BOOLEAN)

   win_msg_int (winid: INTEGER; msgid: INTEGER): INTEGER

   win_msg_setint (winid: INTEGER; msgid: INTEGER; value: INTEGER)

   win_postmsg_void (winid: INTEGER; msgid: INTEGER)

feature(s) from WIN_RUNTIME
   --  Controls

   win_but_isdown (winid: INTEGER): BOOLEAN

   win_but_default (winid: INTEGER; def: BOOLEAN)

   win_but_cpush (parent: INTEGER): INTEGER

   win_but_cdefpush (parent: INTEGER): INTEGER

   win_but_cradio (parent: INTEGER): INTEGER

   win_but_ccheck (parent: INTEGER): INTEGER

   win_but_ctristate (parent: INTEGER): INTEGER

   win_but_cgroupbox (parent: INTEGER): INTEGER

   win_scroll_create (winid: INTEGER; is_horiz: BOOLEAN): INTEGER

   win_scroll_set (winid: INTEGER; dir: INTEGER; pos: INTEGER)

   win_scroll_get (winid: INTEGER; dir: INTEGER): INTEGER

   win_scroll_range (winid: INTEGER; dir: INTEGER; range: INTEGER)

   win_listbox_create (winid: INTEGER; multi, sorted: BOOLEAN): INTEGER

   win_listbox_addtext (winid: INTEGER; text_str: POINTER)

   win_listbox_selstring (winid: INTEGER; sel_str: POINTER)

   win_listbox_mitems (winid: INTEGER; dwordptr: POINTER; dwordptr_size: INTEGER): INTEGER

   win_listbox_gettext (winid: INTEGER; idx: INTEGER)

   win_editbox_create (winid: INTEGER; multi, wrap: BOOLEAN): INTEGER

   win_combo_create (winid: INTEGER; editable, sorted: BOOLEAN): INTEGER

   win_combo_editctl (winid: INTEGER): INTEGER

   win_combo_laddtext (winid: INTEGER; text_str: POINTER)

   win_combo_selstring (winid: INTEGER; sel_str: POINTER)

   win_combo_lgettext (winid: INTEGER; idx: INTEGER)

   win_static_create (winid, style: INTEGER): INTEGER

   win_static_icon (winid, icon: INTEGER)

   win_dialog_unitx: INTEGER

   win_dialog_unity: INTEGER

   win_cursor_std (code: INTEGER): INTEGER

   win_cursor_rsc (name_str: POINTER): INTEGER

   win_cursor_set (cursid: INTEGER)

   win_cursor_show (value: BOOLEAN)

   win_caret_create (winid: INTEGER; w, h: INTEGER)

   win_caret_destroy

   win_caret_hide (winid: INTEGER)

   win_caret_show (winid: INTEGER)

   win_caret_position (x, y: INTEGER)

   win_icon_rsc (name_str: POINTER): INTEGER

   win_icon_create (w, h: INTEGER; mask_bmp, color_bmp: INTEGER): INTEGER

   win_icon_set (winid, iconid: INTEGER)

   win_help_int (winid: INTEGER; helpfile_str: POINTER; command, value: INTEGER): BOOLEAN

   win_help_str (winid: INTEGER; helpfile_str: POINTER; command: INTEGER; value_str: POINTER): BOOLEAN

feature(s) from WIN_RUNTIME
   --  Graphics device interface: Context

   win_beginpaint (winid: INTEGER; paintstruct: POINTER): INTEGER

   win_endpaint (winid: INTEGER; paintstruct: POINTER)

   win_gdi_get (winid: INTEGER): INTEGER

   win_gdi_delete (dcid: INTEGER)

   win_gdi_save (dcid: INTEGER)

   win_gdi_restore (dcid: INTEGER)

   win_gdi_release (dcid: INTEGER; winid: INTEGER)

   win_gdi_startdoc (dcid: INTEGER; name_str: POINTER)

   win_gdi_enddoc (dcid: INTEGER)

   win_gdi_startpage (dcid: INTEGER)

   win_gdi_endpage (dcid: INTEGER)

   win_gdi_emf (fname_str: POINTER; dcid: INTEGER; w, h: INTEGER): INTEGER

   win_gdi_closeemf (dcid: INTEGER): INTEGER

   win_gdi_delemf (emfid: INTEGER)

   win_gdi_getemf (fname_str: POINTER): INTEGER

   win_gdi_drawemf (dcid: INTEGER; emfid: INTEGER; x, y, xp, yp: INTEGER)

   win_gdi_bmpdc (dcid: INTEGER): INTEGER

   win_gdi_loadbmp (name_str: POINTER): INTEGER

   win_gdi_bmpsize (dcid: INTEGER; w, h: INTEGER): INTEGER

   win_gdi_bmpw (dcid, bmpid: INTEGER): INTEGER

   win_gdi_bmph (dcid, bmpid: INTEGER): INTEGER

   win_gdi_bmp_mono (w, h: INTEGER; bits: POINTER): INTEGER

   win_gdi_bitblt (tid: INTEGER; tx, ty, tw, th: INTEGER; sid: INTEGER; sx, sy: INTEGER)

   win_gdi_strblt (tid: INTEGER; tx, ty, tw, th: INTEGER; sid: INTEGER; sx, sy, sw, sh: INTEGER)

   win_gdi_bmpsave (dcid: INTEGER; bmpid: INTEGER; fname_str: POINTER): BOOLEAN

   win_gdi_bmpload (dcid: INTEGER; fname_str: POINTER): INTEGER

feature(s) from WIN_RUNTIME
   --  Graphics device interface: Objects

   win_gdi_select (dcid: INTEGER; gdiobj: INTEGER)

   win_gdi_remove (gdiobj: INTEGER)

   win_gdi_stock (code: INTEGER): INTEGER

   win_gdi_pen (style, width, color: INTEGER): INTEGER

   win_gdi_expen (type, width, style, endstyle, joinstyle, color, brushstyle, brushpat: INTEGER): INTEGER

   win_gdi_brush (brushstyle, brushpat, color: INTEGER): INTEGER

feature(s) from WIN_RUNTIME
   --  GDI: Colour

   win_gdi_palette (logpalette_ptr: POINTER): INTEGER

   win_gdi_selectpal (dcid: INTEGER; palid: INTEGER)

   win_gdi_rgbcolor (red, green, blue: INTEGER): INTEGER

   win_gdi_rgbpalette (red, green, blue: INTEGER): INTEGER

   win_gdi_palcolor (index: INTEGER): INTEGER

feature(s) from WIN_RUNTIME
   --  GDI: Mode

   win_gdi_mapmode (dcid: INTEGER; mode: INTEGER)

   win_gdi_origin (dcid: INTEGER; x, y: INTEGER)

   win_gdi_winext (dcid: INTEGER; x, y: INTEGER)

   win_gdi_vportext (dcid: INTEGER; x, y: INTEGER)

   win_gdi_dp2lp (dcid: INTEGER; x, y: INTEGER)

   win_gdi_lp2dp (dcid: INTEGER; x, y: INTEGER)

   win_gdi_rop2 (dcid: INTEGER; mode: INTEGER)

   win_gdi_bkmode (dcid: INTEGER; mode: INTEGER)

   win_gdi_bkcolor (dcid: INTEGER; color: INTEGER)

feature(s) from WIN_RUNTIME
   --  GDI: Text

   win_gdi_text (dcid: INTEGER; x, y: INTEGER; str: POINTER)

   win_gdi_extext (dcid: INTEGER; posx, posy: INTEGER; rx, ry, rxp, ryp: INTEGER; clipped, filled: BOOLEAN; str: POINTER)

   win_gdi_textis (dcid: INTEGER; ispace: INTEGER)

   win_gdi_textclr (dcid: INTEGER; color: INTEGER)

   win_gdi_textalign (dcid: INTEGER; horiz, vert: INTEGER)

   win_gdi_textsize (dcid: INTEGER; str: POINTER)

   win_gdi_textmetr (dcid: INTEGER; code: INTEGER): INTEGER

   win_gdi_textface (dcid: INTEGER)

   win_gdi_textjustif (dcid: INTEGER; justif, brk: INTEGER)

   win_gdi_charsize (dcid: INTEGER; ch: INTEGER): INTEGER

   win_gdi_font (logfont_ptr: POINTER): INTEGER

   win_gdi_enumfonts (dcid: INTEGER; facename_str: POINTER; logont_buffer_size: INTEGER; logfont_buffer: POINTER): INTEGER

feature(s) from WIN_RUNTIME
   --  GDI: Unicode text

   win_gdi_wtext (charmap_ptr: POINTER; dcid: INTEGER; x, y: INTEGER; text_ptr: POINTER)

   win_gdi_wextext (charmap_ptr: POINTER; dcid: INTEGER; posx, posy: INTEGER; rx, ry, rxp, ryp: INTEGER; clipped, filled: BOOLEAN; str: POINTER)

   win_gdi_wtextsize (charmap_ptr: POINTER; dcid: INTEGER; text_ptr: POINTER)

feature(s) from WIN_RUNTIME
   --  GDI: Drawing primitives

   win_gdi_line (dcid: INTEGER; x, y, xp, yp: INTEGER)

   win_gdi_polyline (dcid: INTEGER; dword_ptr: POINTER; dword_ptr_size: INTEGER)

   win_gdi_bezier (dcid: INTEGER; dword_ptr: POINTER; dword_ptr_size: INTEGER)

   win_gdi_polygon (dcid: INTEGER; dword_ptr: POINTER; dword_ptr_size: INTEGER)

   win_gdi_polymode (dcid: INTEGER; alternate: BOOLEAN)

   win_gdi_focusrect (dcid: INTEGER; rx1, ry1, rx2, ry2: INTEGER)

   win_gdi_invertrect (dcid: INTEGER; rx1, ry1, rx2, ry2: INTEGER)

   win_gdi_rectangle (dcid: INTEGER; rx1, ry1, rx2, ry2: INTEGER)

   win_gdi_roundrect (dcid: INTEGER; rx1, ry1, rx2, ry2, cw, ch: INTEGER)

   win_gdi_ellipse (dcid: INTEGER; rx1, ry1, rx2, ry2: INTEGER)

   win_gdi_arc (dcid: INTEGER; rx1, ry1, rx2, ry2, sx, sy, fx, fy: INTEGER)

   win_gdi_chord (dcid: INTEGER; rx1, ry1, rx2, ry2, sx, sy, fx, fy: INTEGER)

   win_gdi_pie (dcid: INTEGER; rx1, ry1, rx2, ry2, sx, sy, fx, fy: INTEGER)

   win_gdi_arcdir (dcid: INTEGER; clockw: BOOLEAN)

   win_gdi_icon (dcid, icon: INTEGER; x, y: INTEGER)

   win_gdi_floodfill (dcid: INTEGER; x, y, color, mode: INTEGER): BOOLEAN

   win_gdi_getpixel (dcid: INTEGER; x, y: INTEGER): INTEGER

   win_gdi_setpixel (dcid: INTEGER; x, y, color: INTEGER)

   win_gdi_ptvisu (dcid: INTEGER; px, py: INTEGER): BOOLEAN

   win_gdi_rectvisu (dcid: INTEGER; rx1, ry1, rx2, ry2: INTEGER): BOOLEAN

   win_gdi_capint (dcid: INTEGER; cap: INTEGER): INTEGER

   win_gdi_capbool (dcid: INTEGER; cap, field: INTEGER): BOOLEAN

feature(s) from WIN_RUNTIME
   --  System

   win_ver_above (major, minor: INTEGER): BOOLEAN

feature(s) from WIN_RUNTIME
   --  Timer

   win_timer_start (winid: INTEGER; id, delay: INTEGER)

   win_timer_stop (winid: INTEGER; id: INTEGER)

feature(s) from WIN_RUNTIME
   --  Registry

   win_reg_open (base: INTEGER; name_str: POINTER): INTEGER

   win_reg_create (base: INTEGER; name_str: POINTER): INTEGER

   win_reg_close (keyid: INTEGER)

   win_reg_type (keyid: INTEGER; label_str: POINTER): INTEGER

   win_reg_delete (keyid: INTEGER; subkey_str: POINTER): BOOLEAN

   win_reg_values (keyid: INTEGER; index: INTEGER): BOOLEAN

   win_reg_subkeys (keyid: INTEGER; index: INTEGER): BOOLEAN

   win_reg_getint (keyid: INTEGER; label_str: POINTER): INTEGER

   win_reg_getstring (keyid: INTEGER; label_str: POINTER)

   win_reg_putint (keyid: INTEGER; label_str: POINTER; value: INTEGER)

   win_reg_putstring (keyid: INTEGER; label_str: POINTER; value_str: POINTER)

feature(s) from WIN_RUNTIME
   --  mmap file

   win_mmap_file (file_handle: INTEGER): POINTER

   win_mmap_free (memory: POINTER)

feature(s) from WIN_RUNTIME
   --  Synchronisation

   win_synch_wait (obj_handle: INTEGER; delay_ms: INTEGER): BOOLEAN

   win_synch_mwait (obj_handles: POINTER; obj_count: INTEGER; delay: INTEGER): INTEGER

   win_event_create (name_str: POINTER; man_reset: BOOLEAN): INTEGER

   win_event_open (name_str: POINTER): INTEGER

   win_event_set (evt_handle: INTEGER)

   win_event_reset (evt_handle: INTEGER)

   win_mutex_create (name_str: POINTER): INTEGER

   win_mutex_open (name_str: POINTER): INTEGER

   win_mutex_release (mtx_handle: INTEGER)

   win_sema_create (name_str: POINTER; max_count: INTEGER): INTEGER

   win_sema_open (name_str: POINTER): INTEGER

   win_sema_release (handle: INTEGER)

feature(s) from WIN_RUNTIME
   --  File services

   win_file_asread (fileid: INTEGER; byteptr: POINTER; byteptr_size: INTEGER; overptr: POINTER): BOOLEAN

   win_file_aswrite (fileid: INTEGER; byteptr: POINTER; byteptr_size: INTEGER; overptr: POINTER): BOOLEAN

   win_file_asok (fileid: INTEGER; overptr: POINTER): INTEGER

   win_file_read (fileid: INTEGER; byteptr: POINTER; byteptr_size: INTEGER): INTEGER

   win_file_write (fileid: INTEGER; byteptr: POINTER; byteptr_size: INTEGER): INTEGER

   win_file_writebyte (fileid: INTEGER; byte: INTEGER): BOOLEAN

   win_file_close (fileid: INTEGER)

   win_file_open (filename_str: POINTER; createm: INTEGER; read, write, sharer, sharew, randomacc: BOOLEAN): INTEGER

   win_file_ptr (fileid: INTEGER): INTEGER

   win_file_setptr (fileid: INTEGER; index: INTEGER): BOOLEAN

   win_file_size (fileid: INTEGER): INTEGER

   win_file_dspace (drive_str: POINTER): INTEGER

   win_file_attrib (fname_str: POINTER; flag: INTEGER): BOOLEAN

   win_file_mkdir (pname_str: POINTER): BOOLEAN

   win_file_rmdir (pname_str: POINTER): BOOLEAN

   win_file_curdir

   win_file_tmpdir

   win_file_setcurdir (newdir_str: POINTER): BOOLEAN

   win_file_ffirst (pattern_str: POINTER)

   win_file_fnext (handle: INTEGER)

   win_file_fclose (handle: INTEGER)

   win_file_exists (fname_str: POINTER): BOOLEAN

   win_file_remove (fname_str: POINTER): BOOLEAN

   win_file_copy (orig_str, dest_str: POINTER): BOOLEAN

   win_file_move (orig_str, dest_str: POINTER): BOOLEAN

   win_file_prop (fname_str: POINTER; finddata_ptr: POINTER): BOOLEAN

   win_file_convtime (filetime_ptr, systime_ptr: POINTER)

   win_last_error: INTEGER

feature(s) from WIN_RUNTIME
   --  Sockets

   win_tcp_init

   win_tcp_finish

   win_tcp_connect (ip1, ip2, ip3, ip4: INTEGER; protocol: INTEGER): INTEGER

   win_tcp_byname (dns_name: POINTER): BOOLEAN

feature(s) from WIN_RUNTIME
   --  System services

   win_time (zone, id: INTEGER): INTEGER

   win_timezone: INTEGER

   win_tick: INTEGER

   win_execute (str: POINTER): BOOLEAN

   win_getpid: INTEGER

   win_sleep (ms: INTEGER)

   win_debugout (out_str: POINTER)

   win_beep (beeptype: INTEGER)

   win_rsrcstring (id: INTEGER)

   win_mci_send (cmd_str: POINTER): INTEGER

   win_mci_error (code: INTEGER)

invariant
   enough_bits:  --  PLATFORM.Integer_bits >= 32

end of WIN_RUNTIME