X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Fgen%2Fterminal_interface-curses-mouse.ads.m4;h=a4fb661ef84a35681674806f7a4199f5575cfca5;hp=0db4ffbbc77f7940a4b1e930908bb10bf9f7ded1;hb=85b1a478852e6473f6f698af5f6fca055f43f21c;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/Ada95/gen/terminal_interface-curses-mouse.ads.m4 b/Ada95/gen/terminal_interface-curses-mouse.ads.m4 index 0db4ffbb..a4fb661e 100644 --- a/Ada95/gen/terminal_interface-curses-mouse.ads.m4 +++ b/Ada95/gen/terminal_interface-curses-mouse.ads.m4 @@ -10,7 +10,7 @@ include(M4MACRO)dnl -- S P E C -- -- -- ------------------------------------------------------------------------------ --- Copyright (c) 1998 Free Software Foundation, Inc. -- +-- Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- @@ -36,9 +36,10 @@ include(M4MACRO)dnl -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- Author: Juergen Pfeifer 1996 +-- Author: Juergen Pfeifer, 1996 -- Version Control: --- $Revision: 1.19 $ +-- $Revision: 1.29 $ +-- $Date: 2011/03/19 12:35:58 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ include(`Mouse_Base_Defs') @@ -48,10 +49,12 @@ package Terminal_Interface.Curses.Mouse is pragma Preelaborate (Terminal_Interface.Curses.Mouse); -- MANPAGE(`curs_mouse.3x') - -- Please note, that in ncurses-1.9.9e documentation mouse support - -- is still marked as experimental. So also this binding will change - -- if the ncurses methods change. + -- mouse_trafo, wmouse_trafo are implemented as Transform_Coordinates + -- in the parent package. -- + -- Not implemented: + -- REPORT_MOUSE_POSITION (i.e. as a parameter to Register_Reportable_Event + -- or Start_Mouse) type Event_Mask is private; No_Events : constant Event_Mask; All_Events : constant Event_Mask; @@ -88,31 +91,33 @@ package Terminal_Interface.Curses.Mouse is -- Return true if a mouse device is supported, false otherwise. procedure Register_Reportable_Event - (Button : in Mouse_Button; - State : in Button_State; + (Button : Mouse_Button; + State : Button_State; Mask : in out Event_Mask); -- Stores the event described by the button and the state in the mask. - -- Before you call this the first time, you should init the mask + -- Before you call this the first time, you should initialize the mask -- with the Empty_Mask constant pragma Inline (Register_Reportable_Event); procedure Register_Reportable_Events - (Button : in Mouse_Button; - State : in Button_States; + (Button : Mouse_Button; + State : Button_States; Mask : in out Event_Mask); -- Register all events described by the Button and the State bitmap. - -- Before you call this the first time, you should init the mask + -- Before you call this the first time, you should initialize the mask -- with the Empty_Mask constant -- ANCHOR(`mousemask()',`Start_Mouse') -- There is one difference to mousmask(): we return the value of the -- old mask, that means the event mask value before this call. + -- Not Implemented: The library version + -- returns a Mouse_Mask that tells which events are reported. function Start_Mouse (Mask : Event_Mask := All_Events) return Event_Mask; -- AKA pragma Inline (Start_Mouse); - procedure End_Mouse (Mask : in Event_Mask := No_Events); + procedure End_Mouse (Mask : Event_Mask := No_Events); -- Terminates the mouse, restores the specified event mask pragma Inline (End_Mouse); @@ -121,17 +126,19 @@ package Terminal_Interface.Curses.Mouse is -- AKA pragma Inline (Get_Mouse); - procedure Get_Event (Event : in Mouse_Event; + procedure Get_Event (Event : Mouse_Event; Y : out Line_Position; X : out Column_Position; Button : out Mouse_Button; State : out Button_State); -- !!! Warning: X and Y are screen coordinates. Due to ripped of lines they -- may not be identical to window coordinates. + -- Not Implemented: Get_Event only reports one event, the C library + -- version supports multiple events, e.g. {click-1, click-3} pragma Inline (Get_Event); -- ANCHOR(`ungetmouse()',`Unget_Mouse') - procedure Unget_Mouse (Event : in Mouse_Event); + procedure Unget_Mouse (Event : Mouse_Event); -- AKA pragma Inline (Unget_Mouse); @@ -159,14 +166,12 @@ private Bstate : Event_Mask; end record; pragma Convention (C, Mouse_Event); - pragma Pack (Mouse_Event); include(`Mouse_Event_Rep') Generation_Bit_Order : constant System.Bit_Order := System.M4_BIT_ORDER; -- This constant may be different on your system. include(`Mouse_Events') - No_Events : constant Event_Mask := 0; All_Events : constant Event_Mask := ALL_MOUSE_EVENTS;