; Copyright 1996 Acorn Computers Ltd ; ; Licensed under the Apache License, Version 2.0 (the "License"); ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; http://www.apache.org/licenses/LICENSE-2.0 ; ; Unless required by applicable law or agreed to in writing, software ; distributed under the License is distributed on an "AS IS" BASIS, ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; See the License for the specific language governing permissions and ; limitations under the License. ; ; > &.Hdr.WimpSpace ;;----------------------------------------------------------------------------- ;; Wimp Header file ;; ;; Change list ;; ;; 13-Apr-88 File created ;; 2-Aug-89 NRaine PollWord_NonZero reason code added ;; 29-Sep-89 NRaine Added wimp_caretstr bits ;; 31-Oct-89 NRaine Added extra menu bits and ii_etc indirected stuff ;; 04 Apr 92 LRust Added mi_it_indirecttitle ;; ;;----------------------------------------------------------------------------- iconbar_whandle * -2 ; changed on 11-Apr-88 ; event codes returned from XWimp_Poll Null_Reason * 0 Redraw_Window_Request * 1 Open_Window_Request * 2 ; can't be masked out Close_Window_Request * 3 ; can't be masked out Pointer_Leaving_Window * 4 Pointer_Entering_Window * 5 Mouse_Button_Change * 6 User_Drag_Box * 7 ; can't be masked out Key_Pressed * 8 Menu_Select * 9 ; can't be masked out Scroll_Request * 10 ; can't be masked out Lose_Caret * 11 Gain_Caret * 12 PollWord_NonZero * 13 User_Message * 17 User_Message_Recorded * 18 User_Message_Acknowledge * 19 ; masks to prevent us getting certain events back from PollWimp null_bit * 1 :SHL: Null_Reason redraw_bit * 1 :SHL: Redraw_Window_Request pointerchange_bits * (1 :SHL: Pointer_Leaving_Window) +(1 :SHL: Pointer_Entering_Window) buttonchange_bit * 1 :SHL: Mouse_Button_Change keypressed_bit * 1 :SHL: Key_Pressed pollword_bit * 1 :SHL: PollWord_NonZero pollword_enable * 1 :SHL: 22 ; poll word at low priority pollwordfast_enable * 3 :SHL: 22 ; poll word at high priority ; button state button_left * 4 button_middle * 2 button_right * 1 button_left_drag * button_left :SHL: 4 button_right_drag * button_right :SHL: 4 button_left_10 * button_left :SHL: 8 button_right_10 * button_right :SHL: 8 ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; wimp_createstr ^ 0 w_wax0 # 4 ; x, y coordinates of work area w_way0 # 4 w_wax1 # 4 w_way1 # 4 w_scx # 4 ; x, y scroll positions w_scy # 4 ; (between wex0/y0 and wex1/y1) w_bhandle # 4 ; handle of window above this one w_flags # 4 ; status of window (open/closed etc.) w_tfcol # 1 ; title foreground colour w_tbcol # 1 ; title background colour w_wfcol # 1 ; work area foreground colour w_wbcol # 1 ; work area background colour w_scouter # 1 ; scroll bar outer portion w_scinner # 1 ; scroll bar inner portion w_tbcol2 # 1 ; colour if window has input focus # 1 ; reserved w_wex0 # 4 ; work area extent w_wey0 # 4 ; (x0, y0, x1, y1) w_wex1 # 4 w_wey1 # 4 w_titleflags # 4 w_workflags # 4 ; icon flags for 'work area' w_areaCBptr # 4 ; sprite area CB ptr (<=0 ==> system) w_minx # 2 ; minimum x size (0 ==> use title) w_miny # 2 ; minimum y size w_title # 12 ; title (max 11 chars, then <CR) w_nicons # 4 ; no. of icons following w_icons # 0 ; bit masks for flags/status wf_title * 1 :SHL: 0 wf_moveable * 1 :SHL: 1 wf_vscroll * 1 :SHL: 2 wf_hscroll * 1 :SHL: 3 wf_autoredraw * 1 :SHL: 4 wf_isapane * 1 :SHL: 5 wf_nochecks * 1 :SHL: 6 wf_nobackquit * 1 :SHL: 7 wf_userscroll1 * 1 :SHL: 8 ; auto-repeat wf_userscroll2 * 1 :SHL: 9 ; debounced wf_userscroll * wf_userscroll1 :OR: wf_userscroll2 wf_realcolours * 1 :SHL: 10 wf_backwindow * 1 :SHL: 11 wf_grabkeys * 1 :SHL: 12 ws_open * 1 :SHL: 16 ws_top * 1 :SHL: 17 ws_toggled * 1 :SHL: 18 ws_toggling * 1 :SHL: 19 ws_hasfocus * 1 :SHL: 20 ws_system * 2_11111:SHL: 16 ws_status * ws_open :OR: ws_top ; for calc_w_status wf_icon1 * 1 :SHL: 24 wf_icon2 * 1 :SHL: 25 wf_icon3 * 1 :SHL: 26 wf_icon4 * 1 :SHL: 27 wf_icon5 * 1 :SHL: 28 wf_icon6 * 1 :SHL: 29 wf_icon7 * 1 :SHL: 30 wf_iconbits * 2_1111111 :SHL: 24 wf_newformat * 1 :SHL: 31 ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; for Wimp_GetWindowInfo ^ 0 wi_handle # 4 wi_windowdefn # 0 ; copy of w_ stuff ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; icon definition ^ 0 i_bbx0 # 4 ; bounding box (x0, y0, x1, y1) i_bby0 # 4 i_bbx1 # 4 ; if sprite, get size instead i_bby1 # 4 i_flags # 4 i_data # 12 ; up to 12 bytes of text/sprite name etc i_size # 0 ; size of icon data i_shift * 5 ASSERT (i_size = 1:SHL:i_shift) ^ 0 ii_buffer # 4 ; indirected icon buffer pointer ii_validation # 4 ; validation string pointer ii_length # 4 ; size of indirected buffer ; bit masks/positions for icon flags/status if_text * 1 :SHL: 0 if_sprite * 1 :SHL: 1 if_border * 1 :SHL: 2 if_hcentred * 1 :SHL: 3 if_vcentred * 1 :SHL: 4 if_filled * 1 :SHL: 5 if_fancyfont * 1 :SHL: 6 if_funnyicon * 1 :SHL: 7 if_indirected * 1 :SHL: 8 if_rjustify * 1 :SHL: 9 if_canadjust * 1 :SHL: 10 if_halfsize * 1 :SHL: 11 ifb_buttontype * 12 if_buttontype * 2_1111 :SHL: ifb_buttontype ifb_esg * 16 if_esg * 2_11111 :SHL: ifb_esg if_esg2 * 2_01111 :SHL: ifb_esg ; all but top bit is_inverted * 1 :SHL: 21 is_shaded * 1 :SHL: 22 is_deleted * 1 :SHL: 23 ifb_fcol * 24 if_fcol * 2_1111 :SHL: ifb_fcol ifb_bcol * 28 if_bcol * 2_1111 :SHL: ifb_bcol ifb_fontno * ifb_fcol ; overlaid with fcol/bcol ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Wimp_CreateIcon ^ 0 ci_handle # 4 ; window handle ci_iconblock # i_size ; icon definition ci_size # 0 ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Wimp_SetIconState ^ 0 si_handle # 4 ; window handle si_iconhandle # 4 ; icon handle si_eorword # 4 ; word to EOR state with si_clearword # 4 ; word to BIC state with si_size # 0 ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Wimp_GetIconState ^ 0 gi_handle # 4 ; window handle gi_iconhandle # 4 gi_iconblock # i_size ; icon definition gi_size # 0 ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; wimp_openstr ^ 0 u_handle # 4 u_wax0 # 4 u_way0 # 4 u_wax1 # 4 u_way1 # 4 u_scx # 4 u_scy # 4 u_bhandle # 4 u_wflags # 4 ; window flags (for GetWindowState) u_windowstate # 0 ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Wimp_SetExtent ^ 0 box_x0 # 4 box_y0 # 4 box_x1 # 4 box_y1 # 4 ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; wimp_redrawstr ^ 0 r_handle # 4 r_wax0 # 4 r_way0 # 4 r_wax1 # 4 r_way1 # 4 r_updatesize # 0 ; size of Wimp_UpdateWindow structure r_scx # 4 r_scy # 4 r_gwx0 # 4 r_gwy0 # 4 r_gwx1 # 4 r_gwy1 # 4 r_size # 0 ; size of Wimp_RedrawWindow structure ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; wimp_mouseblk ^ 0 b_x # 4 b_y # 4 b_buttons # 4 b_window # 4 b_icon # 4 b_size # 0 ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; wimp_caretstr ^ 0 wc_handle # 4 wc_icon # 4 wc_x # 4 wc_y # 4 wc_height # 4 wc_index # 4 wc_size # 0 wc_char # 4 ; for key_pressed event ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; menu definition ^ 0 m_title # 12 m_ti_fg_colour # 1 ; title fg colour m_ti_bg_colour # 1 ; bg colour m_wa_fg_colour # 1 ; work area fg colour m_wa_bg_colour # 1 ; bg colour m_itemwidth # 4 m_itemheight # 4 m_verticalgap # 4 m_headersize * @ ; offsets in a menu item ^ 0 mi_itemflags # 4 mi_submenu # 4 ; pointer/window handle mi_iconflags # 4 ; values as per normal icon mi_icondata # 12 ; data as per normal icon mi_size * @ ; values that mi_itemflags can take mi_it_tick * 1 :SHL: 0 ; a tick goes on the left of the item mi_it_dotted * 1 :SHL: 1 ; a dotted line should follow the item mi_it_writeable * 1 :SHL: 2 ; writeable icon rather than menu icon mi_it_warning * 1 :SHL: 3 ; send Message_MenuWarning mi_it_traverse * 1 :SHL: 4 ; allow menu traversal even for shaded items mi_it_lastitem * 1 :SHL: 7 ; this item is the last in the menu mi_it_indirecttitle * 1 :SHL: 8 ; The menu title is indirected ; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Wimp_DragBox ^ 0 dr_handle # 4 ; window handle dr_type # 4 ; drag type dr_x0 # 4 dr_y0 # 4 dr_x1 # 4 dr_y1 # 4 dr_parentx0 # 4 dr_parenty0 # 4 dr_parentx1 # 4 dr_parenty1 # 4 dr_size1to7 # 0 ; block size for types 1..7 dr_userR12 # 4 dr_userDraw # 4 dr_userRemove # 4 dr_userMove # 4 dr_size # 0 ; drag types ^ 1 dragtype_windowposn # 1 ; 1 ) dragtype_windowsize # 1 ; 2 ) require dr_handle dragtype_windowhscroll # 1 ; 3 ) dragtype_windowvscroll # 1 ; 4 ) dragtype_fixedbox # 1 ; 5 dragtype_rubberbox # 1 ; 6 dragtype_point # 1 ; 7 dragtype_userfixedbox # 1 ; 8 ) dragtype_userrubberbox # 1 ; 9 ) require dr_user... dragtype_userfixedboxC # 1 ; 10 ) dragtype_userrubberboxC # 1 ; 11 ) ; drag flags dragflag_anchored * 1 :SHL: 0 ; rubber drags fixed to work area dragflag_clipped * 1 :SHL: 1 ; dragbox drawn within visible rectangles END