From 51a0e82eb29a6dfc79f93479883383fbdbf8bcc2 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Wed, 5 Sep 2012 15:24:24 -0400 Subject: TWRP-ify AOSP code Pull in most TWRP sources Stub out partition management code Make it compile -- probably will not boot Kind of a mess but have to start somewhere --- gui/fill.cpp | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 gui/fill.cpp (limited to 'gui/fill.cpp') diff --git a/gui/fill.cpp b/gui/fill.cpp new file mode 100644 index 000000000..094814e0f --- /dev/null +++ b/gui/fill.cpp @@ -0,0 +1,56 @@ +// fill.cpp - GUIFill object + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +extern "C" { +#include "../common.h" +#include "../minuitwrp/minui.h" +#include "../recovery_ui.h" +} + +#include "rapidxml.hpp" +#include "objects.hpp" + +GUIFill::GUIFill(xml_node<>* node) +{ + xml_attribute<>* attr; + xml_node<>* child; + + if (!node) + return; + + attr = node->first_attribute("color"); + if (!attr) + return; + + std::string color = attr->value(); + ConvertStrToColor(color, &mColor); + + // Load the placement + LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH); + + return; +} + +int GUIFill::Render(void) +{ + gr_color(mColor.red, mColor.green, mColor.blue, mColor.alpha); + gr_fill(mRenderX, mRenderY, mRenderW, mRenderH); + return 0; +} + -- cgit v1.2.3