From ef4465efdb07c27d4da3482e8ffc99c2a6ed18d4 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 7 Dec 2013 12:43:40 -0800 Subject: [PATCH] More work on builtin pager --- fish.xcodeproj/project.pbxproj | 2 +- pager.cpp | 2 ++ pager.h | 15 +++++++++++++++ screen.h | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/fish.xcodeproj/project.pbxproj b/fish.xcodeproj/project.pbxproj index a69bb526e..81de12554 100644 --- a/fish.xcodeproj/project.pbxproj +++ b/fish.xcodeproj/project.pbxproj @@ -1083,7 +1083,6 @@ D0D02A86159839D5008E62BD /* postfork.cpp in Sources */, D0D02A87159839D5008E62BD /* screen.cpp in Sources */, D0D02A88159839D5008E62BD /* signal.cpp in Sources */, - D032388B1849D1980032CF2C /* pager.cpp in Sources */, D0D2694A15983779005D9B9C /* builtin.cpp in Sources */, D0D2694915983772005D9B9C /* function.cpp in Sources */, D0D02A67159837AD008E62BD /* complete.cpp in Sources */, @@ -1107,6 +1106,7 @@ D0D02A7915983888008E62BD /* intern.cpp in Sources */, D0D02A7A15983916008E62BD /* env_universal.cpp in Sources */, D0D02A7B15983928008E62BD /* env_universal_common.cpp in Sources */, + D032388B1849D1980032CF2C /* pager.cpp in Sources */, D0D02A89159839DF008E62BD /* fish.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/pager.cpp b/pager.cpp index 62e2b1bb2..646975ed0 100644 --- a/pager.cpp +++ b/pager.cpp @@ -1,5 +1,7 @@ #include "config.h" +#include "pager.h" + #include #include #include diff --git a/pager.h b/pager.h index e69de29bb..218f0530a 100644 --- a/pager.h +++ b/pager.h @@ -0,0 +1,15 @@ +/** \file pager.h + Pager support +*/ + +#include "complete.h" +#include "screen.h" + +/* Represents rendering from the pager */ +class page_rendering_t +{ + screen_data_t screen_data; +}; + +typedef std::vector completion_list_t; +page_rendering_t render_completions(const completion_list_t &raw_completions, const wcstring &prefix); diff --git a/screen.h b/screen.h index ef74383d7..d3676a0be 100644 --- a/screen.h +++ b/screen.h @@ -13,6 +13,7 @@ #define FISH_SCREEN_H #include +#include /** A class representing a single line of a screen.