summaryrefslogtreecommitdiff
path: root/apt-pkg/install-progress.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-04-01 12:21:46 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-04-01 12:21:46 +0200
commit035a31392a094a92eeff4371c56fae893d49991b (patch)
treeac2fc35bc682876806401347f69af727d74d3774 /apt-pkg/install-progress.h
parenta78578a9bfabf9c1b5a84e8f26fa5f193a56cb76 (diff)
parent8bc31a93c391eaa31864534553348870901d2dd9 (diff)
Merge remote-tracking branch 'mvo/feature/more-fancy-progress' into debian/sid
Diffstat (limited to 'apt-pkg/install-progress.h')
-rw-r--r--apt-pkg/install-progress.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/apt-pkg/install-progress.h b/apt-pkg/install-progress.h
index baf245376..112b034fb 100644
--- a/apt-pkg/install-progress.h
+++ b/apt-pkg/install-progress.h
@@ -125,7 +125,12 @@ namespace Progress {
void SetupTerminalScrollArea(int nr_rows);
void HandleSIGWINCH(int);
- int GetNumberTerminalRows();
+ typedef struct {
+ int rows;
+ int columns;
+ } TermSize;
+ TermSize GetTerminalSize();
+
sighandler_t old_SIGWINCH;
int child_pty;
@@ -138,6 +143,10 @@ namespace Progress {
unsigned int StepsDone,
unsigned int TotalSteps,
std::string HumanReadableAction);
+
+ // return a progress bar of the given size for the given progress
+ // percent between 0.0 and 1.0 in the form "[####...]"
+ static std::string GetTextProgressStr(float percent, int OutputSize);
};
class PackageManagerText : public PackageManager