Update to v094r40 release.

byuu says:

Changelog:
- updated to newest hiro API
- SFC performance profile builds once again
- hiro: Qt port completed

Errata 1: the hiro/Qt target won't run tomoko just yet. Starts by
crashing inside InputSettings because hiro/Qt isn't forcefully selecting
the first item added to a ComboButton just yet. Even with a monkey patch
to get around that, the UI is incredibly unstable. Lots of geometry
calculation bugs, and a crash when you try and access certain folders in
the browser dialog. Lots of work left to be done there, sadly.

Errata 2: the hiro/Windows port has black backgrounds on all ListView
items. It's because I need to test for unassigned colors and grab the
default Windows brush colors in those cases.

Note: alternating row colors on multi-column ListView widgets is gone
now. Not a bug. May add it back later, but I'm not sure. It doesn't
interact nicely with per-cell background colors.

Things left to do:

First, I have to fix the Windows and Qt target bugs.

Next, I need to go through and revise the hiro API even more (nothing
too major.)

Next, I need to update icarus to use the new hiro API, and add support
for the SFC games database.

Next, I have to rewrite my TSV->BML cheat code tool.

Next, I need to post a final WIP of higan+icarus publicly and wait a few
days.

Next, I need to fix any bugs reported from the final WIP that I can.

Finally, I should be able to release v095.
This commit is contained in:
Tim Allen
2015-08-18 20:18:00 +10:00
parent 0271d6a12b
commit 4344b916b6
200 changed files with 7246 additions and 5659 deletions

View File

@@ -64,6 +64,7 @@ Declare(IconViewItem)
Declare(Label)
Declare(LineEdit)
Declare(ListView)
Declare(ListViewHeader)
Declare(ListViewColumn)
Declare(ListViewItem)
Declare(ListViewCell)
@@ -85,6 +86,7 @@ Declare(Viewport)
enum class Edge : unsigned { Top, Bottom, Left, Right };
enum class Orientation : unsigned { Horizontal, Vertical };
enum class Placement : unsigned { Top, Bottom, Left, Right };
#if defined(Hiro_Application)
struct Application {
@@ -174,6 +176,31 @@ struct Color {
};
#endif
#if defined(Hiro_Alignment)
struct Alignment {
using type = Alignment;
Alignment();
Alignment(double horizontal, double vertical = 0.5);
explicit operator bool() const;
auto operator==(const Alignment& source) const -> bool;
auto operator!=(const Alignment& source) const -> bool;
auto horizontal() const -> double;
auto setAlignment(double horizontal = -1.0, double vertical = 0.5) -> type&;
auto setHorizontal(double horizontal) -> type&;
auto setVertical(double vertical) -> type&;
auto vertical() const -> double;
//private:
struct State {
double horizontal;
double vertical;
} state;
};
#endif
#if defined(Hiro_Position)
struct Position {
using type = Position;
@@ -421,6 +448,7 @@ struct mObject {
auto parentIconView(bool recursive = false) const -> mIconView*;
auto parentLayout(bool recursive = false) const -> mLayout*;
auto parentListView(bool recursive = false) const -> mListView*;
auto parentListViewHeader(bool recursive = false) const -> mListViewHeader*;
auto parentListViewItem(bool recursive = false) const -> mListViewItem*;
auto parentMenu(bool recursive = false) const -> mMenu*;
auto parentMenuBar(bool recursive = false) const -> mMenuBar*;
@@ -466,7 +494,8 @@ struct mGroup : mObject {
auto append(sObject object) -> type&;
auto object(unsigned offset) const -> Object;
auto objects() const -> unsigned;
auto objectCount() const -> unsigned;
auto objects() const -> vector<Object>;
auto remove(sObject object) -> type&;
//private:
@@ -484,10 +513,10 @@ struct mHotkey : mObject {
auto doRelease() const -> void;
auto onPress(const function<void ()>& callback = {}) -> type&;
auto onRelease(const function<void ()>& callback = {}) -> type&;
auto parent() const -> wObject;
auto owner() const -> wObject;
auto remove() -> type& override;
auto sequence() const -> string;
auto setParent(sObject parent) -> type&;
auto setOwner(sObject owner) -> type&;
auto setSequence(const string& sequence = "") -> type&;
//private:
@@ -496,7 +525,7 @@ struct mHotkey : mObject {
vector<unsigned> keys;
function<void ()> onPress;
function<void ()> onRelease;
wObject parent;
wObject owner;
string sequence;
} state;
};
@@ -552,6 +581,7 @@ struct mWindow : mObject {
auto remove(sStatusBar statusBar) -> type&;
auto reset() -> type& override;
auto resizable() const -> bool;
auto setAlignment(Alignment alignment) -> type&;
auto setBackgroundColor(Color color = {}) -> type&;
auto setCentered(sWindow parent = {}) -> type&;
auto setDroppable(bool droppable = true) -> type&;
@@ -561,7 +591,6 @@ struct mWindow : mObject {
auto setFullScreen(bool fullScreen = true) -> type&;
auto setGeometry(Geometry geometry) -> type&;
auto setModal(bool modal = true) -> type&;
auto setPlacement(double x, double y) -> type&;
auto setPosition(Position position) -> type&;
auto setResizable(bool resizable = true) -> type&;
auto setSize(Size size) -> type&;
@@ -614,7 +643,8 @@ struct mMenuBar : mObject {
auto append(sMenu menu) -> type&;
auto menu(unsigned position) const -> Menu;
auto menus() const -> unsigned;
auto menuCount() const -> unsigned;
auto menus() const -> vector<Menu>;
auto remove() -> type& override;
auto remove(sMenu menu) -> type&;
auto reset() -> type&;
@@ -635,11 +665,12 @@ struct mPopupMenu : mObject {
using mObject::remove;
auto action(unsigned position) const -> Action;
auto actions() const -> unsigned;
auto actionCount() const -> unsigned;
auto actions() const -> vector<Action>;
auto append(sAction action) -> type&;
auto remove(sAction action) -> type&;
auto reset() -> type&;
//TODO setParent
auto setParent(mObject* parent = nullptr, signed offset = -1) -> type& override;
auto setVisible(bool visible = true) -> type& override;
//private:
@@ -669,7 +700,8 @@ struct mMenu : mAction {
using mObject::remove;
auto action(unsigned position) const -> Action;
auto actions() const -> unsigned;
auto actionCount() const -> unsigned;
auto actions() const -> vector<Action>;
auto append(sAction action) -> type&;
auto icon() const -> image;
auto remove(sAction action) -> type&;
@@ -788,7 +820,8 @@ struct mLayout : mSizable {
virtual auto reset() -> type&;
auto setParent(mObject* parent = nullptr, signed offset = -1) -> type& override;
auto sizable(unsigned position) const -> Sizable;
auto sizables() const -> unsigned;
auto sizableCount() const -> unsigned;
auto sizables() const -> vector<Sizable>;
//private:
struct State {
@@ -905,7 +938,7 @@ struct mCheckButton : mWidget {
//private:
struct State {
bool bordered = false;
bool bordered = true;
bool checked = false;
image icon;
function<void ()> onToggle;
@@ -943,7 +976,8 @@ struct mComboButton : mWidget {
auto append(sComboButtonItem item) -> type&;
auto doChange() const -> void;
auto item(unsigned position) const -> ComboButtonItem;
auto items() const -> unsigned;
auto itemCount() const -> unsigned;
auto items() const -> vector<ComboButtonItem>;
auto onChange(const function<void ()>& callback = {}) -> type&;
auto remove(sComboButtonItem item) -> type&;
auto reset() -> type&;
@@ -1033,31 +1067,31 @@ struct mFrame : mWidget {
struct mHexEdit : mWidget {
Declare(HexEdit)
auto address() const -> unsigned;
auto backgroundColor() const -> Color;
auto columns() const -> unsigned;
auto doRead(unsigned offset) const -> uint8_t;
auto doWrite(unsigned offset, uint8_t data) const -> void;
auto foregroundColor() const -> Color;
auto length() const -> unsigned;
auto offset() const -> unsigned;
auto onRead(const function<uint8_t (unsigned)>& callback = {}) -> type&;
auto onWrite(const function<void (unsigned, uint8_t)>& callback = {}) -> type&;
auto rows() const -> unsigned;
auto setAddress(unsigned address = 0) -> type&;
auto setBackgroundColor(Color color = {}) -> type&;
auto setColumns(unsigned columns = 16) -> type&;
auto setForegroundColor(Color color = {}) -> type&;
auto setLength(unsigned length) -> type&;
auto setOffset(unsigned offset) -> type&;
auto setRows(unsigned rows = 16) -> type&;
auto update() -> type&;
//private:
struct State {
unsigned address = 0;
Color backgroundColor;
unsigned columns = 16;
Color foregroundColor;
unsigned length = 0;
unsigned offset = 0;
function<uint8_t (unsigned)> onRead;
function<void (unsigned, uint8_t)> onWrite;
unsigned rows = 16;
@@ -1118,7 +1152,8 @@ struct mIconView : mWidget {
auto flow() const -> Orientation;
auto foregroundColor() const -> Color;
auto item(unsigned position) const -> IconViewItem;
auto items() const -> unsigned;
auto itemCount() const -> unsigned;
auto items() const -> vector<IconViewItem>;
auto multiSelect() const -> bool;
auto onActivate(const function<void ()>& callback = {}) -> type&;
auto onChange(const function<void ()>& callback = {}) -> type&;
@@ -1178,18 +1213,15 @@ struct mIconViewItem : mObject {
struct mLabel : mWidget {
Declare(Label)
auto horizontalAlignment() const -> double;
auto setHorizontalAlignment(double alignment = 0.0) -> type&;
auto alignment() const -> Alignment;
auto setAlignment(Alignment alignment = {}) -> type&;
auto setText(const string& text = "") -> type&;
auto setVerticalAlignment(double alignment = 0.5) -> type&;
auto text() const -> string;
auto verticalAlignment() const -> double;
//private:
struct State {
double horizontalAlignment = 0.0;
Alignment alignment;
string text;
double verticalAlignment = 0.5;
} state;
};
#endif
@@ -1228,80 +1260,90 @@ struct mListView : mWidget {
Declare(ListView)
using mObject::remove;
auto append(sListViewColumn column) -> type&;
auto alignment() const -> Alignment;
auto append(sListViewHeader column) -> type&;
auto append(sListViewItem item) -> type&;
auto backgroundColor() const -> Color;
auto batchable() const -> bool;
auto checkable() const -> bool;
auto checkAll() -> type&;
auto checked() const -> vector<ListViewItem>;
auto column(unsigned position) const -> ListViewColumn;
auto columns() const -> unsigned;
auto batched() const -> vector<ListViewItem>;
auto bordered() const -> bool;
auto doActivate() const -> void;
auto doChange() const -> void;
auto doContext() const -> void;
auto doEdit(sListViewCell cell) const -> void;
auto doSort(sListViewColumn column) const -> void;
auto doToggle(sListViewItem item) const -> void;
auto doToggle(sListViewCell cell) const -> void;
auto foregroundColor() const -> Color;
auto gridVisible() const -> bool;
auto headerVisible() const -> bool;
auto header() const -> ListViewHeader;
auto item(unsigned position) const -> ListViewItem;
auto items() const -> unsigned;
auto itemCount() const -> unsigned;
auto items() const -> vector<ListViewItem>;
auto onActivate(const function<void ()>& callback = {}) -> type&;
auto onChange(const function<void ()>& callback = {}) -> type&;
auto onContext(const function<void ()>& callback = {}) -> type&;
auto onEdit(const function<void (ListViewCell)>& callback = {}) -> type&;
auto onSort(const function<void (ListViewColumn)>& callback = {}) -> type&;
auto onToggle(const function<void (ListViewItem)>& callback = {}) -> type&;
auto remove(sListViewColumn column) -> type&;
auto onToggle(const function<void (ListViewCell)>& callback = {}) -> type&;
auto remove(sListViewHeader column) -> type&;
auto remove(sListViewItem item) -> type&;
auto reset() -> type&;
auto resizeColumns() -> type&;
auto selectAll() -> type&;
auto selected() const -> ListViewItem;
auto selectedItems() const -> vector<ListViewItem>;
auto setAlignment(Alignment alignment = {}) -> type&;
auto setBackgroundColor(Color color = {}) -> type&;
auto setBatchable(bool batchable = true) -> type&;
auto setCheckable(bool checkable = true) -> type&;
auto setBordered(bool bordered = true) -> type&;
auto setForegroundColor(Color color = {}) -> type&;
auto setGridVisible(bool visible = true) -> type&;
auto setHeaderVisible(bool visible = true) -> type&;
auto setParent(mObject* parent = nullptr, signed offset = -1) -> type& override;
auto setSortable(bool sortable = true) -> type&;
auto sortable() const -> bool;
auto uncheckAll() -> type&;
auto unselectAll() -> type&;
//private:
struct State {
unsigned activeColumn = 0;
Alignment alignment;
Color backgroundColor;
bool batchable = false;
bool checkable = false;
vector<sListViewColumn> columns;
bool bordered = false;
Color foregroundColor;
bool gridVisible = false;
bool headerVisible = false;
sListViewHeader header;
vector<sListViewItem> items;
function<void ()> onActivate;
function<void ()> onChange;
function<void ()> onContext;
function<void (ListViewCell)> onEdit;
function<void (ListViewColumn)> onSort;
function<void (ListViewItem)> onToggle;
bool sortable = false;
function<void (ListViewCell)> onToggle;
} state;
auto destruct() -> void override;
};
#endif
#if defined(Hiro_ListView)
struct mListViewHeader : mObject {
Declare(ListViewHeader)
auto append(sListViewColumn column) -> type&;
auto column(unsigned position) const -> ListViewColumn;
auto columnCount() const -> unsigned;
auto columns() const -> vector<ListViewColumn>;
auto remove() -> type& override;
auto remove(sListViewColumn column) -> type&;
auto setParent(mObject* parent = nullptr, signed offset = -1) -> type& override;
//private:
struct State {
vector<sListViewColumn> columns;
} state;
};
#endif
#if defined(Hiro_ListView)
struct mListViewColumn : mObject {
Declare(ListViewColumn)
auto active() const -> bool;
auto alignment() const -> Alignment;
auto backgroundColor() const -> Color;
auto editable() const -> bool;
auto expandable() const -> bool;
@@ -1311,32 +1353,35 @@ struct mListViewColumn : mObject {
auto remove() -> type& override;
auto resizable() const -> bool;
auto setActive() -> type&;
auto setAlignment(Alignment alignment = {}) -> type&;
auto setBackgroundColor(Color color = {}) -> type&;
auto setEditable(bool editable = true) -> type&;
auto setExpandable(bool expandable = true) -> type&;
auto setFont(const string& font = "") -> type&;
auto setForegroundColor(Color color = {}) -> type&;
auto setHorizontalAlignment(double alignment = 0.0) -> type&;
auto setIcon(const image& icon = {}) -> type&;
auto setResizable(bool resizable = true) -> type&;
auto setSortable(bool sortable = true) -> type&;
auto setText(const string& text = "") -> type&;
auto setVerticalAlignment(double alignment = 0.5) -> type&;
auto setVisible(bool visible = true) -> type&;
auto setWidth(signed width = 0) -> type&;
auto sortable() const -> bool;
auto text() const -> string;
auto verticalAlignment() const -> double;
auto width() const -> signed;
//private:
struct State {
Alignment alignment;
Color backgroundColor;
bool editable = false;
bool expandable = false;
string font;
Color foregroundColor;
double horizontalAlignment = 0.0;
image icon;
bool resizable = true;
bool sortable = false;
string text;
double verticalAlignment = 0.5;
bool visible = true;
@@ -1349,19 +1394,18 @@ struct mListViewColumn : mObject {
struct mListViewItem : mObject {
Declare(ListViewItem)
auto alignment() const -> Alignment;
auto append(sListViewCell cell) -> type&;
auto backgroundColor() const -> Color;
auto cell(unsigned position) const -> ListViewCell;
auto cells() const -> unsigned;
auto checkable() const -> bool;
auto checked() const -> bool;
auto cellCount() const -> unsigned;
auto cells() const -> vector<ListViewCell>;
auto foregroundColor() const -> Color;
auto remove() -> type& override;
auto remove(sListViewCell cell) -> type&;
auto selected() const -> bool;
auto setAlignment(Alignment alignment = {}) -> type&;
auto setBackgroundColor(Color color = {}) -> type&;
auto setCheckable(bool checkable = true) -> type&;
auto setChecked(bool checked = true) -> type&;
auto setFocused() -> type& override;
auto setForegroundColor(Color color = {}) -> type&;
auto setParent(mObject* parent = nullptr, signed offset = -1) -> type& override;
@@ -1369,10 +1413,9 @@ struct mListViewItem : mObject {
//private:
struct State {
Alignment alignment;
Color backgroundColor;
vector<sListViewCell> cells;
bool checkable = true;
bool checked = false;
Color foregroundColor;
bool selected = false;
} state;
@@ -1383,10 +1426,17 @@ struct mListViewItem : mObject {
struct mListViewCell : mObject {
Declare(ListViewCell)
auto backgroundColor() const -> Color;
auto foregroundColor() const -> Color;
auto alignment(bool recursive = false) const -> Alignment;
auto backgroundColor(bool recursive = false) const -> Color;
auto checkable() const -> bool;
auto checked() const -> bool;
auto font(bool recursive = false) const -> string;
auto foregroundColor(bool recursive = false) const -> Color;
auto icon() const -> image;
auto setAlignment(Alignment alignment = {}) -> type&;
auto setBackgroundColor(Color color = {}) -> type&;
auto setCheckable(bool checkable = true) -> type&;
auto setChecked(bool checked = true) -> type&;
auto setForegroundColor(Color color = {}) -> type&;
auto setIcon(const image& icon = {}) -> type&;
auto setText(const string& text = "") -> type&;
@@ -1394,7 +1444,10 @@ struct mListViewCell : mObject {
//private:
struct State {
Alignment alignment;
Color backgroundColor;
bool checkable = false;
bool checked = false;
Color foregroundColor;
image icon;
string text;
@@ -1508,7 +1561,8 @@ struct mTabFrame : mWidget {
auto doMove(sTabFrameItem from, sTabFrameItem to) const -> void;
auto edge() const -> Edge;
auto item(unsigned position) const -> TabFrameItem;
auto items() const -> unsigned;
auto itemCount() const -> unsigned;
auto items() const -> vector<TabFrameItem>;
auto onChange(const function<void ()>& callback = {}) -> type&;
auto onClose(const function<void (TabFrameItem)>& callback = {}) -> type&;
auto onMove(const function<void (TabFrameItem, TabFrameItem)>& callback = {}) -> type&;
@@ -1617,7 +1671,8 @@ struct mTreeView : mWidget {
auto expand() -> type&;
auto foregroundColor() const -> Color;
auto item(const string& path) const -> TreeViewItem;
auto items() const -> unsigned;
auto itemCount() const -> unsigned;
auto items() const -> vector<TreeViewItem>;
auto onActivate(const function<void ()>& callback = {}) -> type&;
auto onChange(const function<void ()>& callback = {}) -> type&;
auto onContext(const function<void ()>& callback = {}) -> type&;
@@ -1655,7 +1710,8 @@ struct mTreeViewItem : mObject {
auto checked() const -> bool;
auto icon() const -> image;
auto item(const string& path) const -> TreeViewItem;
auto items() const -> unsigned;
auto itemCount() const -> unsigned;
auto items() const -> vector<TreeViewItem>;
auto path() const -> string;
auto remove() -> type& override;
auto remove(sTreeViewItem item) -> type&;