1-- 2-- Copyright (c) 2014-15 John Marino <draco@marino.st> 3-- 4-- Permission to use, copy, modify, and distribute this software for any 5-- purpose with or without fee is hereby granted, provided that the above 6-- copyright notice and this permission notice appear in all copies. 7-- 8-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 16-- 17 18with DragonFly.HAMMER.Ghosts; 19 20package Transactions.Ghosts is 21 22 package DHG renames DragonFly.HAMMER.Ghosts; 23 24 function scan_directory (path : in String) return String; 25 -- Scan a directory for deleted files and directories 26 27private 28 29 file_ghosts : DHG.Filename_Container.Vector; 30 dirs_ghosts : DHG.Filename_Container.Vector; 31 32 c_dcursor : TIC.Color_Pair; 33 c_fcursor : TIC.Color_Pair; 34 35 type entry_type is (directory, file); 36 37 type alacarte is record 38 dir_entry : entry_type; 39 index : Positive; 40 page : Positive; 41 row : Natural; 42 end record; 43 44 type menudata is array (Positive range <>) of alacarte; 45 46 procedure start_command_window (directory_path : in String); 47 48 procedure start_input_window; 49 50 procedure show_page_count (page : in Positive; total_pages : in Positive); 51 52 procedure clear_input_window; 53 54 procedure start_view_window; 55 56 procedure show_menu (is_directory : Boolean); 57 58 function get_listing return menudata; 59 60 procedure list_deleted_entries (listing : in menudata; 61 selection : in Positive); 62 63end Transactions.Ghosts; 64