Package RASCAL.WimpWindow

DescriptionWimp Window related types and methods.
Authorbbracke
Date2005/11/21 20:14:33
Revision1.1
 

Clauses

Quick access : ClausesGenericsDefinitionsSubprograms


 
Context clauses
Interfaces.C
RASCAL.OS
RASCAL.Memory
 
Use clauses
Interfaces.C
RASCAL.OS
RASCAL.Memory
 

Definitions

Quick access : ClausesGenericsDefinitionsSubprograms


Types
Name Declaration
Reason_RedrawWindow_Pointeraccess Reason_RedrawWindow
Message_Iconize_Pointeraccess Message_Iconize
Message_IconizeAt_Pointeraccess Message_IconizeAt
Message_WindowClosed_Pointeraccess Message_WindowClosed
Message_WindowInfo_Pointeraccess Message_WindowInfo
Double_Bytemod 2 ** 16
Wimp_Icon_Block_Typearray (integer) of Wimp_Icon_Data
Wimp_WindowInfo_Pointeraccess Wimp_WindowInfo_Type
Child_List_Typearray (integer) of Wimp_Handle_Type
   
Reason_RedrawWindow record
Some of the window is out of date and needs to be redrawn.
You should enter a redraw:
First call Wimp_RedrawWindow and then call Wimp_GetRectangle
until done.
Component Type Default
WindowWimp_Handle_Type
   
AWEL_Reason_RedrawWindow abstract tagged record
inheritance from Wimp_EventListener (Reason_Event_RedrawWindow, -1, -1)
Component Type Default
EventReason_RedrawWindow_Pointer
   
Message_Iconize record
This message is broadcast by the Wimp when a window's close icon is shift clicked.
If an iconiser is absent nothing will happen.
If one is present it will acknowledge the message, and send Message_WindowInfo to the window.
Component Type Default
TitleChar_Array (1..20)
Task_HandleInteger
WindowWimp_Handle_Type
HeaderMessage_Event_Header
   
AMEL_Message_Iconize abstract tagged record
inheritance from Message_EventListener (Message_Event_Iconize)
Component Type Default
EventMessage_Iconize_Pointer
   
Message_IconizeAt record
In the absence of this message, Pinboard will just position the window icon beneath the window's close button.
Component Type Default
FlagsInteger
Y_CoordinateInteger
X_CoordinateInteger
Task_HandleInteger
WindowWimp_Handle_Type
HeaderMessage_Event_Header
   
AMEL_Message_IconizeAt abstract tagged record
inheritance from Message_EventListener (Message_Event_IconizeAt)
Component Type Default
EventMessage_IconizeAt_Pointer
   
Message_WindowClosed record
This message is bradcasted when a window is closed, so that the iconiser can remove the icon.
Component Type Default
WindowWimp_Handle_Type
HeaderMessage_Event_Header
   
AMEL_Message_WindowClosed abstract tagged record
inheritance from Message_EventListener (Message_Event_WindowClosed)
Component Type Default
EventMessage_WindowClosed_Pointer
   
Message_WindowInfo record
This message is sent by the iconiser when one of your windows is iconised, to find out which sprite and name to give to the icon.
Component Type Default
TitleChar_Array (1..200)
Sprite_NameChar_Array (1..8)
ReservedInteger
WindowWimp_Handle_Type
HeaderMessage_Event_Header
   
AMEL_Message_WindowInfo abstract tagged record
inheritance from Message_EventListener (Message_Event_WindowInfo)
Component Type Default
EventMessage_WindowInfo_Pointer
   
Wimp_Icon_Data record
Component Type Default
Icon_DataChar_Array (1..12)
Icon_FlagsInteger
Max_YInteger
Max_XInteger
Min_YInteger
Min_XInteger
   
Wimp_Title_Data record
Component Type Default
Title_DataChar_Array (1..12)
   
Wimp_Window_Block_Type record
Component Type Default
Nr_Of_Icons_InitiallyInteger
Title_DataWimp_Title_Data
Minimum_HeightDouble_Byte
Minimum_WidthDouble_Byte
Sprite_Area_PointerInteger
Work_Area_Button_FlagsInteger
Title_Bar_Icon_FlagsInteger
Work_Area_Max_YInteger
Work_Area_Max_XInteger
Work_Area_Min_YInteger
Work_Area_Min_XInteger
Extra_FlagsByte
Title_Input_Focus_ColourByte12
Scrollbar_Inner_ColourByte1
Scrollbar_Outer_ColourByte3
Work_Area_BackgroundByte
Work_Area_ForegroundByte
Title_BackgroundByte2
Title_ForegroundByte7
Window_FlagsInteger
Open_BehindWimp_Handle_TypeWimp_Handle_Type (-1)
Scroll_Y_OffsetInteger
Scroll_X_OffsetInteger
Visible_Area_Max_YInteger
Visible_Area_Max_XInteger
Visible_Area_Min_YInteger
Visible_Area_Min_XInteger
   
Wimp_WindowInfo_Type record
Discriminant Type Default
Icon_NrInteger
Component Type Default
Icon_BlockWimp_Icon_Block_Type (0..Icon_Nr)
Nr_Of_Icons_InitiallyInteger
Title_DataWimp_Title_Data
Minimum_HeightDouble_Byte
Minimum_WidthDouble_Byte
Sprite_Area_PointerInteger
Work_Area_Button_FlagsInteger
Title_Bar_Icon_FlagsInteger
Work_Area_Max_YInteger
Work_Area_Max_XInteger
Work_Area_Min_YInteger
Work_Area_Min_XInteger
Extra_FlagsByte
Title_Input_Focus_ColourByte12
Scrollbar_Inner_ColourByte1
Scrollbar_Outer_ColourByte3
Work_Area_BackgroundByte
Work_Area_ForegroundByte
Title_BackgroundByte2
Title_ForegroundByte7
Window_FlagsInteger
Open_BehindWimp_Handle_TypeWimp_Handle_Type (-1)
Scroll_Y_OffsetInteger
Scroll_X_OffsetInteger
Visible_Area_Max_YInteger
Visible_Area_Max_XInteger
Visible_Area_Min_YInteger
Visible_Area_Min_XInteger
WindowWimp_Handle_Type
   
Wimp_WindowState_Type record
Component Type Default
Window_FlagsInteger
Open_BehindWimp_Handle_TypeWimp_Handle_Type (-1)
Scroll_Y_OffsetInteger
Scroll_X_OffsetInteger
Visible_Area_Max_YInteger
Visible_Area_Max_XInteger
Visible_Area_Min_YInteger
Visible_Area_Min_XInteger
WindowWimp_Handle_Type
   
Wimp_WindowOutline_Type record
Component Type Default
Max_YInteger
Max_XInteger
Min_YInteger
Min_XInteger
WindowWimp_Handle_Type
   
Wimp_RedrawInfo_Type record
Component Type Default
Redraw_Max_YInteger
Redraw_Max_XInteger
Redraw_Min_YInteger
Redraw_Min_XInteger
Scroll_Y_OffsetInteger
Scroll_X_OffsetInteger
Visible_Area_Max_YInteger
Visible_Area_Max_XInteger
Visible_Area_Min_YInteger
Visible_Area_Min_XInteger
WindowWimp_Handle_Type
   
Wimp_WindowExtent_Type record
type Wimp_OpenWindow_Type is
record
Window : Wimp_Handle_Type;
Visible_Area_Min_X : Integer;
Visible_Area_Min_Y : Integer;
Visible_Area_Max_X : Integer;
Visible_Area_Max_Y : Integer;
Scroll_X_Offset : Integer;
Scroll_Y_Offset : Integer;
Open_Behind : Wimp_Handle_Type := Wimp_Handle_Type(-1);
end record;
pragma Convention (C, Wimp_OpenWindow_Type);
Component Type Default
Work_Area_Max_YInteger
Work_Area_Max_XInteger
Work_Area_Min_YInteger
Work_Area_Min_XInteger
   
Wimp_External_WindowInfo_Type record
Component Type Default
HLeft_GapInteger
LeftArrow_WidthInteger
HWell_WidthInteger
RightArrow_WidthInteger
HRight_GapInteger
Adjust_WidthInteger
Adjust_HeightInteger
VLower_GapInteger
DownArrow_HeightInteger
VWell_HeightInteger
UpArrow_HeightInteger
VUpper_GapInteger
Toggle_HeightInteger
Toggle_WidthInteger
Iconise_WidthInteger
Reserved_2Integer
Title_WidthInteger
Reserved_1Integer
Close_WidthInteger
Back_WidthInteger
Top_BorderInteger
Right_BorderInteger
Bottom_BorderInteger
Left_BorderInteger
WindowWimp_Handle_Type
  
Pragmas
Convention(C, Reason_RedrawWindow)
Convention(C, Message_Iconize)
Convention(C, Message_IconizeAt)
Convention(C, Message_WindowClosed)
Convention(C, Message_WindowInfo)
Convention(C, Wimp_Icon_Data)
Convention(C, Wimp_Title_Data)
Convention(C, Wimp_Window_Block_Type)
Convention(C, Wimp_Icon_Block_Type)
Convention(C, Wimp_WindowInfo_Type)
Convention(C, Wimp_WindowState_Type)
Convention(C, Wimp_WindowOutline_Type)
Convention(C, Wimp_RedrawInfo_Type)
Convention(C, Wimp_External_WindowInfo_Type)
 

Subprograms

Quick access : ClausesGenericsDefinitionsSubprograms


  
Close_Window procedure
Closes the window.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Open_WindowMax procedure
Open window at maksimum size.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Open_WindowCentered procedure
Open the window at the center of the screen.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Open_WindowAt procedure
Open window at a specific position.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
XIntegerin
YIntegerin
  
Open_Window procedure
This opens a window.
Parameter name Type Mode Default
BlockWimp_WindowState_Typein
  
Redraw_Window procedure
This is called in response to a RedrawWindow request.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
BlockWimp_RedrawInfo_Typein out
MoreBooleanout
  
Get_Rectangle function
ReturnBoolean
Updates block with info for the next rectangle to be redrawn.
Returns true until there is no more to be redrawn.
Parameter name Type Mode Default
BlockWimp_RedrawInfo_Typein
  
Get_WindowOutline function
ReturnWimp_WindowOutline_Type
Returns the coordinates of a rectangle which completely covers the window, borders and all.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_WindowInfo function
ReturnWimp_WindowInfo_Type
Returns the complete details of the given window's state.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
IconsBooleanintrue
  
Get_External_WindowInfo function
ReturnWimp_External_WindowInfo_Type
Returns extensive external (toolicons etc.) information about the window.
Requires RISC OS 4.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_Generic_WindowInfo function
ReturnWimp_External_WindowInfo_Type
Returns extensive external (toolicons etc.) information about windows with line borders enabled.
Requires RISC OS 4.
  
Get_WindowState function
ReturnWimp_WindowState_Type
Reads a window's visible state.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_ParentWindow function
ReturnWimp_Handle_Type
Returns the parent of a child in a nested window. Returns '-1' if the window has no parent. Requires the nested windowmanager.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_AncestorWindow function
ReturnWimp_Handle_Type
Returns the Wimp handle of the top level window in a nested window. Requires the nested windowmanager.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_WindowPosition procedure
Return Top_left coordinates of window in OS units.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
X_PosIntegerout
Y_PosIntegerout
  
Is_Open function
ReturnBoolean
Is the window open ?
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Work_To_Screen procedure
Converts a set of work coordinates of the given window into
screen coordinates.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
Work_XIntegerin
Work_YIntegerin
Screen_XIntegerout
Screen_YIntegerout
  
Screen_To_Work procedure
Converts a set of screen coordinates into work coordinates of the
given window.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
Screen_XIntegerin
Screen_YIntegerin
Work_XIntegerout
Work_YIntegerout
  
Force_Redraw procedure
Forces the WIMP to redraw a special set of coordinates.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
Min_XIntegerin
Min_YIntegerin
Max_XIntegerin
Max_YIntegerin
  
Force_RedrawAll procedure
Force a redraw of the entire screen.
  
Force_WindowRedraw procedure
Forces the WIMP to do a redraw of the whole visible area of a
given window.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_WindowTitle function
ReturnString
Reads window title.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_Extent function
ReturnWimp_WindowExtent_Type
Returns window extent - window workspace size.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Set_Extent procedure
Set window extent, visible workarea must be wholly within new workarea extent.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
Min_XIntegerin
Min_YIntegerin
Max_XIntegerin
Max_YIntegerin
  
Delete_Window procedure
Closes the window and deletes window definition from memory.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_Parent function
ReturnWimp_Handle_Type
Return parent window handle. Returns '-1' for none.
Requires the nested WIMP (3.8).
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_Top_ChildWindow function
ReturnWimp_Handle_Type
Returns window handle of top child window. Returns '-1' for none.
Requires the nested WIMP (3.8).
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_Bottom_ChildWindow function
ReturnWimp_Handle_Type
Returns window handle of bottom child window. Returns '-1' for none.
Requires the nested WIMP (3.8).
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_Sibling_Below function
ReturnWimp_Handle_Type
Returns window handle of sibling window below. Returns '-1' if none.
Requires the nested WIMP (3.8).
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_Sibling_Above function
ReturnWimp_Handle_Type
Returns window handle of sibling window above. Returns '-1' if none.
Requires the nested WIMP (3.8).
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Count_Children function
ReturnNatural
Returns the nr of child windows the window has.
Parameter name Type Mode Default
WindowWimp_Handle_Typein
  
Get_Children function
ReturnChild_List_Type
Returns an array of the windows child windows.
Parameter name Type Mode Default
WindowWimp_Handle_Typein