📄 terminal_interface-curses.ads.m4
字号:
Str : in Attributed_String; Len : in Integer := -1); -- AKA -- ALIAS(`waddchstr()') -- ALIAS(`addchnstr()') -- ALIAS(`addchstr()') -- ANCHOR(`mvwaddchnstr()',`Add') procedure Add (Win : in Window := Standard_Window; Line : in Line_Position; Column : in Column_Position; Str : in Attributed_String; Len : in Integer := -1); -- AKA -- ALIAS(`mvwaddchstr()') -- ALIAS(`mvaddchnstr()') -- ALIAS(`mvaddchstr()') pragma Inline (Add); -- MANPAGE(`curs_border.3x') -- | Not implemented: mvhline, mvwhline, mvvline, mvwvline -- | use Move_Cursor then Horizontal_Line or Vertical_Line -- ANCHOR(`wborder()',`Border') procedure Border (Win : in Window := Standard_Window; Left_Side_Symbol : in Attributed_Character := Default_Character; Right_Side_Symbol : in Attributed_Character := Default_Character; Top_Side_Symbol : in Attributed_Character := Default_Character; Bottom_Side_Symbol : in Attributed_Character := Default_Character; Upper_Left_Corner_Symbol : in Attributed_Character := Default_Character; Upper_Right_Corner_Symbol : in Attributed_Character := Default_Character; Lower_Left_Corner_Symbol : in Attributed_Character := Default_Character; Lower_Right_Corner_Symbol : in Attributed_Character := Default_Character ); -- AKA -- ALIAS(`border()') pragma Inline (Border); -- ANCHOR(`box()',`Box') procedure Box (Win : in Window := Standard_Window; Vertical_Symbol : in Attributed_Character := Default_Character; Horizontal_Symbol : in Attributed_Character := Default_Character); -- AKA pragma Inline (Box); -- ANCHOR(`whline()',`Horizontal_Line') procedure Horizontal_Line (Win : in Window := Standard_Window; Line_Size : in Natural; Line_Symbol : in Attributed_Character := Default_Character); -- AKA -- ALIAS(`hline()') pragma Inline (Horizontal_Line); -- ANCHOR(`wvline()',`Vertical_Line') procedure Vertical_Line (Win : in Window := Standard_Window; Line_Size : in Natural; Line_Symbol : in Attributed_Character := Default_Character); -- AKA -- ALIAS(`vline()') pragma Inline (Vertical_Line); -- MANPAGE(`curs_getch.3x') -- Not implemented: mvgetch, mvwgetch -- ANCHOR(`wgetch()',`Get_Keystroke') function Get_Keystroke (Win : Window := Standard_Window) return Real_Key_Code; -- AKA -- ALIAS(`getch()') -- Get a character from the keyboard and echo it - if enabled - to the -- window. -- If for any reason (i.e. a timeout) we couldn't get a character the -- returned keycode is Key_None. pragma Inline (Get_Keystroke); -- ANCHOR(`ungetch()',`Undo_Keystroke') procedure Undo_Keystroke (Key : in Real_Key_Code); -- AKA pragma Inline (Undo_Keystroke); -- ANCHOR(`has_key()',`Has_Key') function Has_Key (Key : Special_Key_Code) return Boolean; -- AKA pragma Inline (Has_Key); -- | -- | Some helper functions -- | function Is_Function_Key (Key : Special_Key_Code) return Boolean; -- Return True if the Key is a function key (i.e. one of F0 .. F63) pragma Inline (Is_Function_Key); subtype Function_Key_Number is Integer range 0 .. 63; -- (n)curses allows for 64 function keys. function Function_Key (Key : Real_Key_Code) return Function_Key_Number; -- Return the number of the function key. If the code is not a -- function key, a CONSTRAINT_ERROR will be raised. pragma Inline (Function_Key); function Function_Key_Code (Key : Function_Key_Number) return Real_Key_Code; -- Return the key code for a given function-key number. pragma Inline (Function_Key_Code); -- MANPAGE(`curs_attr.3x') -- | Not implemented attr_off, wattr_off, -- | attr_on, wattr_on, attr_set, wattr_set -- PAIR_NUMBER -- PAIR_NUMBER(c) is the same as c.Color -- ANCHOR(`standout()',`Standout') procedure Standout (Win : Window := Standard_Window; On : Boolean := True); -- ALIAS(`wstandout()') -- ALIAS(`wstandend()') -- ANCHOR(`wattron()',`Switch_Character_Attribute') procedure Switch_Character_Attribute (Win : in Window := Standard_Window; Attr : in Character_Attribute_Set := Normal_Video; On : in Boolean := True); -- if False we switch Off. -- Switches those Attributes set to true in the list. -- AKA -- ALIAS(`wattroff()') -- ALIAS(`attron()') -- ALIAS(`attroff()') -- ANCHOR(`wattrset()',`Set_Character_Attributes') procedure Set_Character_Attributes (Win : in Window := Standard_Window; Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA -- ALIAS(`attrset()') pragma Inline (Set_Character_Attributes); -- ANCHOR(`wattr_get()',`Get_Character_Attributes') function Get_Character_Attribute (Win : in Window := Standard_Window) return Character_Attribute_Set; -- AKA -- ALIAS(`attr_get()') -- ANCHOR(`wattr_get()',`Get_Character_Attribute') function Get_Character_Attribute (Win : in Window := Standard_Window) return Color_Pair; -- AKA pragma Inline (Get_Character_Attribute); -- ANCHOR(`wcolor_set()',`Set_Color') procedure Set_Color (Win : in Window := Standard_Window; Pair : in Color_Pair); -- AKA -- ALIAS(`color_set()') pragma Inline (Set_Color); -- ANCHOR(`wchgat()',`Change_Attributes') procedure Change_Attributes (Win : in Window := Standard_Window; Count : in Integer := -1; Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA -- ALIAS(`chgat()') -- ANCHOR(`mvwchgat()',`Change_Attributes') procedure Change_Attributes (Win : in Window := Standard_Window; Line : in Line_Position := Line_Position'First; Column : in Column_Position := Column_Position'First; Count : in Integer := -1; Attr : in Character_Attribute_Set := Normal_Video; Color : in Color_Pair := Color_Pair'First); -- AKA -- ALIAS(`mvchgat()') pragma Inline (Change_Attributes); -- MANPAGE(`curs_beep.3x') -- ANCHOR(`beep()',`Beep') procedure Beep; -- AKA pragma Inline (Beep); -- ANCHOR(`flash()',`Flash_Screen') procedure Flash_Screen; -- AKA pragma Inline (Flash_Screen); -- MANPAGE(`curs_inopts.3x') -- | Not implemented : typeahead -- -- ANCHOR(`cbreak()',`Set_Cbreak_Mode') procedure Set_Cbreak_Mode (SwitchOn : in Boolean := True); -- AKA -- ALIAS(`nocbreak()') pragma Inline (Set_Cbreak_Mode); -- ANCHOR(`raw()',`Set_Raw_Mode') procedure Set_Raw_Mode (SwitchOn : in Boolean := True); -- AKA -- ALIAS(`noraw()') pragma Inline (Set_Raw_Mode); -- ANCHOR(`echo()',`Set_Echo_Mode') procedure Set_Echo_Mode (SwitchOn : in Boolean := True); -- AKA -- ALIAS(`noecho()') pragma Inline (Set_Echo_Mode); -- ANCHOR(`meta()',`Set_Meta_Mode') procedure Set_Meta_Mode (Win : in Window := Standard_Window; SwitchOn : in Boolean := True); -- AKA pragma Inline (Set_Meta_Mode); -- ANCHOR(`keypad()',`Set_KeyPad_Mode') procedure Set_KeyPad_Mode (Win : in Window := Standard_Window; SwitchOn : in Boolean := True); -- AKA pragma Inline (Set_KeyPad_Mode); function Get_KeyPad_Mode (Win : in Window := Standard_Window) return Boolean; -- This has no pendant in C. There you've to look into the WINDOWS -- structure to get the value. Bad practice, not repeated in Ada. type Half_Delay_Amount is range 1 .. 255; -- ANCHOR(`halfdelay()',`Half_Delay') procedure Half_Delay (Amount : in Half_Delay_Amount); -- AKA pragma Inline (Half_Delay); -- ANCHOR(`intrflush()',`Set_Flush_On_Interrupt_Mode') procedure Set_Flush_On_Interrupt_Mode (Win : in Window := Standard_Window; Mode : in Boolean := True); -- AKA pragma Inline (Set_Flush_On_Interrupt_Mode); -- ANCHOR(`qiflush()',`Set_Queue_Interrupt_Mode') procedure Set_Queue_Interrupt_Mode (Win : in Window := Standard_Window; Flush : in Boolean := True); -- AKA -- ALIAS(`noqiflush()') pragma Inline (Set_Queue_Interrupt_Mode); -- ANCHOR(`nodelay()',`Set_NoDelay_Mode') procedure Set_NoDelay_Mode (Win : in Window := Standard_Window; Mode : in Boolean := False); -- AKA pragma Inline (Set_NoDelay_Mode); type Timeout_Mode is (Blocking, Non_Blocking, Delayed); -- ANCHOR(`wtimeout()',`Set_Timeout_Mode') procedure Set_Timeout_Mode (Win : in Window := Standard_Window; Mode : in Timeout_Mode; Amount : in Natural); -- in Milliseconds -- AKA -- ALIAS(`timeout()') -- Instead of overloading the semantic of the sign of amount, we -- introduce the Timeout_Mode parameter. This should improve -- readability. For Blocking and Non_Blocking, the Amount is not -- evaluated. -- We don't inline this procedure. -- ANCHOR(`notimeout()',`Set_Escape_Time_Mode') procedure Set_Escape_Timer_Mode (Win : in Window := Standard_Window; Timer_Off : in Boolean := False); -- AKA pragma Inline (Set_Escape_Timer_Mode); -- MANPAGE(`curs_outopts.3x') -- ANCHOR(`nl()',`Set_NL_Mode') procedure Set_NL_Mode (SwitchOn : in Boolean := True); -- AKA -- ALIAS(`nonl()') pragma Inline (Set_NL_Mode); -- ANCHOR(`clearok()',`Clear_On_Next_Update') procedure Clear_On_Next_Update (Win : in Window := Standard_Window; Do_Clear : in Boolean := True); -- AKA pragma Inline (Clear_On_Next_Update); -- ANCHOR(`idlok()',`Use_Insert_Delete_Line') procedure Use_Insert_Delete_Line (Win : in Window := Standard_Window; Do_Idl : in Boolean := True); -- AKA pragma Inline (Use_Insert_Delete_Line); -- ANCHOR(`idcok()',`Use_Insert_Delete_Character') procedure Use_Insert_Delete_Character (Win : in Window := Standard_Window; Do_Idc : in Boolean := True); -- AKA pragma Inline (Use_Insert_Delete_Character); -- ANCHOR(`leaveok()',`Leave_Cursor_After_Update') procedure Leave_Cursor_After_Update (Win : in Window := Standard_Window; Do_Leave : in Boolean := True); -- AKA pragma Inline (Leave_Cursor_After_Update); -- ANCHOR(`immedok()',`Immediate_Update_Mode') procedure Immediate_Update_Mode (Win : in Window := Standard_Window; Mode : in Boolean := False); -- AKA pragma Inline (Immediate_Update_Mode); -- ANCHOR(`scrollok()',`Allow_Scrolling') procedure Allow_Scrolling (Win : in Window := Standard_Window; Mode : in Boolean := False); -- AKA pragma Inline (Allow_Scrolling); function Scrolling_Allowed (Win : Window := Standard_Window) return Boolean; -- There is no such function in the C interface. pragma Inline (Scrolling_Allowed); -- ANCHOR(`wsetscrreg()',`Set_Scroll_Region') procedure Set_Scroll_Region (Win : in Window := Standard_Window; Top_Line : in Line_Position; Bottom_Line : in Line_Position); -- AKA -- ALIAS(`setscrreg()') pragma Inline (Set_Scroll_Region); -- MANPAGE(`curs_refresh.3x') -- ANCHOR(`doupdate()',`Update_Screen') procedure Update_Screen; -- AKA pragma Inline (Update_Screen); -- ANCHOR(`wrefresh()',`Refresh') procedure Refresh (Win : in Window := Standard_Window); -- AKA -- There is an overloaded Refresh for Pads. -- The Inline pragma appears there -- ALIAS(`refresh()') -- ANCHOR(`wnoutrefresh()',`Refresh_Without_Update') procedure Refresh_Without_Update (Win : in Window := Standard_Window); -- AKA -- There is an overloaded Refresh_Without_Update for Pads. -- The Inline pragma appears there -- ANCHOR(`redrawwin()',`Redraw') procedure Redraw (Win : in Window := Standard_Window); -- AKA -- ANCHOR(`wredrawln()',`Redraw') procedure Redraw (Win : in Window := Standard_Window; Begin_Line : in Line_Position; Line_Count : in Positive); -- AKA pragma Inline (Redraw); -- MANPAGE(`curs_clear.3x') -- ANCHOR(`werase()',`Erase') procedure Erase (Win : in Window := Standard_Window); -- AKA -- ALIAS(`erase()') pragma Inline (Erase); -- ANCHOR(`wclear()',`Clear') procedure Clear (Win : in Window := Standard_Window); -- AKA -- ALIAS(`clear()')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -