Update to v106r55 release.

byuu says:

Everything *should* be working again, but of course that won't
actually be the case. Here's where things stand:

  - bsnes, higan, icarus, and genius compile and run fine on FreeBSD
    with GTK
  - ruby video and audio drivers are untested on Windows, macOS, and
    Linux
  - hiro is untested on macOS
  - bsnes' status bar is not showing up properly with hiro/qt
  - bsnes and higan's about screen is not showing up properly with
    hiro/qt (1x1 window size)
  - bsnes on Windows crashes often when saving states, and I'm not sure
    why ... it happens inside Encode::RLE
  - bsnes on Windows crashes with ruby.input.windows (unsure why)
  - bsnes on Windows fails to show the verified emblem on the status bar
    properly
  - hiro on Windows flickers when changing tabs

To build the Windows bsnes and higan ports, use

    ruby="video.gdi audio.directsound"

Compilation error logs for Linux will help me fix the inevitable list of
typos there. I can fix the typos on other platforms, I just haven't
gotten to it yet.
This commit is contained in:
Tim Allen 2018-08-05 19:00:15 +10:00
parent 552d385031
commit 5da4532771
117 changed files with 1316 additions and 2383 deletions

View File

@ -43,6 +43,7 @@ ListWindow::ListWindow() {
}); });
layout.setPadding(5); layout.setPadding(5);
gameList.setHeadered();
gameList.onActivate([&] { modifyButton.doActivate(); }); gameList.onActivate([&] { modifyButton.doActivate(); });
gameList.onChange([&] { updateWindow(); }); gameList.onChange([&] { updateWindow(); });
appendButton.setText("Append").onActivate([&] { appendButton.setText("Append").onActivate([&] {
@ -75,19 +76,16 @@ auto ListWindow::quit() -> void {
auto ListWindow::reloadList() -> void { auto ListWindow::reloadList() -> void {
gameList.reset(); gameList.reset();
gameList.append(TableViewHeader() gameList.append(TableViewColumn().setText("Name").setExpandable());
.append(TableViewColumn().setText("Name").setExpandable()) gameList.append(TableViewColumn().setText("Region"));
.append(TableViewColumn().setText("Region")) gameList.append(TableViewColumn().setText("Revision"));
.append(TableViewColumn().setText("Revision")) gameList.append(TableViewColumn().setText("Board"));
.append(TableViewColumn().setText("Board"))
);
for(auto& game : games) { for(auto& game : games) {
gameList.append(TableViewItem() TableViewItem item{&gameList};
.append(TableViewCell().setText(game.name)) item.append(TableViewCell().setText(game.name));
.append(TableViewCell().setText(game.region)) item.append(TableViewCell().setText(game.region));
.append(TableViewCell().setText(game.revision)) item.append(TableViewCell().setText(game.revision));
.append(TableViewCell().setText(game.board)) item.append(TableViewCell().setText(game.board));
);
} }
Application::processEvents(); Application::processEvents();
gameList.resizeColumns(); gameList.resizeColumns();

View File

@ -13,7 +13,7 @@ using namespace nall;
namespace Emulator { namespace Emulator {
static const string Name = "higan"; static const string Name = "higan";
static const string Version = "106.54"; static const string Version = "106.55";
static const string Author = "byuu"; static const string Author = "byuu";
static const string License = "GPLv3"; static const string License = "GPLv3";
static const string Website = "https://byuu.org/"; static const string Website = "https://byuu.org/";

View File

@ -1,9 +1,8 @@
#include <nall/nall.hpp>
#include "resource.hpp" #include "resource.hpp"
namespace Resource { namespace Resource {
namespace Sprite { namespace Sprite {
const nall::vector<uint8_t> CrosshairRed = { //size: 342 const unsigned char CrosshairRed[342] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,0,115,122,122, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,0,115,122,122,
244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14, 244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14,
196,1,149,43,14,27,0,0,0,248,73,68,65,84,88,133,205,87,65,14,196,32,8,132,102,255,255,101,246,176,177,139, 196,1,149,43,14,27,0,0,0,248,73,68,65,84,88,133,205,87,65,14,196,32,8,132,102,255,255,101,246,176,177,139,
@ -16,7 +15,7 @@ const nall::vector<uint8_t> CrosshairRed = { //size: 342
94,23,13,77,214,104,44,103,174,163,143,86,189,244,187,224,232,151,81,21,132,39,210,33,91,246,54,132,193,44,226,219, 94,23,13,77,214,104,44,103,174,163,143,86,189,244,187,224,232,151,81,21,132,39,210,33,91,246,54,132,193,44,226,219,
107,95,57,136,120,253,172,254,16,23,0,0,0,0,73,69,78,68,174,66,96,130, 107,95,57,136,120,253,172,254,16,23,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> CrosshairGreen = { //size: 329 const unsigned char CrosshairGreen[329] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,0,115,122,122, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,0,115,122,122,
244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14, 244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14,
196,1,149,43,14,27,0,0,0,235,73,68,65,84,88,133,213,87,65,18,195,32,8,196,78,31,230,211,253,153,61,180, 196,1,149,43,14,27,0,0,0,235,73,68,65,84,88,133,213,87,65,18,195,32,8,196,78,31,230,211,253,153,61,180,
@ -29,7 +28,7 @@ const nall::vector<uint8_t> CrosshairGreen = { //size: 329
238,241,241,126,143,125,62,216,173,151,209,35,222,134,235,96,98,252,229,226,3,112,72,179,236,202,138,114,18,0,0,0, 238,241,241,126,143,125,62,216,173,151,209,35,222,134,235,96,98,252,229,226,3,112,72,179,236,202,138,114,18,0,0,0,
0,73,69,78,68,174,66,96,130, 0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> CrosshairBlue = { //size: 332 const unsigned char CrosshairBlue[332] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,0,115,122,122, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,32,0,0,0,32,8,6,0,0,0,115,122,122,
244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14, 244,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,14,196,0,0,14,
196,1,149,43,14,27,0,0,0,238,73,68,65,84,88,133,213,87,91,18,195,32,8,196,78,15,232,81,189,161,253,9, 196,1,149,43,14,27,0,0,0,238,73,68,65,84,88,133,213,87,91,18,195,32,8,196,78,15,232,81,189,161,253,9,

View File

@ -1,7 +1,7 @@
namespace Resource { namespace Resource {
namespace Sprite { namespace Sprite {
extern const nall::vector<uint8_t> CrosshairRed; extern const unsigned char CrosshairRed[342];
extern const nall::vector<uint8_t> CrosshairGreen; extern const unsigned char CrosshairGreen[329];
extern const nall::vector<uint8_t> CrosshairBlue; extern const unsigned char CrosshairBlue[332];
} }
} }

View File

@ -77,7 +77,7 @@ auto SuperScope::data() -> uint2 {
bool newturbo = platform->inputPoll(port, ID::Device::SuperScope, Turbo); bool newturbo = platform->inputPoll(port, ID::Device::SuperScope, Turbo);
if(newturbo && !oldturbo) { if(newturbo && !oldturbo) {
turbo = !turbo; //toggle state turbo = !turbo; //toggle state
sprite->setPixels(turbo ? Resource::Sprite::CrosshairRed : Resource::Sprite::CrosshairGreen); sprite->setPixels(turbo ? (image)Resource::Sprite::CrosshairRed : (image)Resource::Sprite::CrosshairGreen);
} }
oldturbo = newturbo; oldturbo = newturbo;

View File

@ -14,19 +14,19 @@ auto InputManager::bindHotkeys() -> void {
})); }));
hotkeys.append(InputHotkey("Save State").onPress([&] { hotkeys.append(InputHotkey("Save State").onPress([&] {
program.saveState({"quick/slot ", stateSlot}); program.saveState({"Quick/Slot ", stateSlot});
})); }));
hotkeys.append(InputHotkey("Load State").onPress([&] { hotkeys.append(InputHotkey("Load State").onPress([&] {
program.loadState({"quick/slot ", stateSlot}); program.loadState({"Quick/Slot ", stateSlot});
})); }));
hotkeys.append(InputHotkey("Load Undo State").onPress([&] { hotkeys.append(InputHotkey("Load Undo State").onPress([&] {
program.loadState("quick/undo"); program.loadState("Quick/Undo");
})); }));
hotkeys.append(InputHotkey("Load Redo State").onPress([&] { hotkeys.append(InputHotkey("Load Redo State").onPress([&] {
program.loadState("quick/redo"); program.loadState("Quick/Redo");
})); }));
hotkeys.append(InputHotkey("Increment State Slot").onPress([&] { hotkeys.append(InputHotkey("Increment State Slot").onPress([&] {

View File

@ -79,41 +79,42 @@ auto Presentation::create() -> void {
saveState.setIcon(Icon::Action::Save).setText("Save State"); saveState.setIcon(Icon::Action::Save).setText("Save State");
for(uint index : range(QuickStates)) { for(uint index : range(QuickStates)) {
MenuItem item{&saveState}; MenuItem item{&saveState};
item.setProperty("name", {"quick/slot ", 1 + index}); item.setProperty("name", {"Quick/Slot ", 1 + index});
item.setProperty("title", {"Slot ", 1 + index}); item.setProperty("title", {"Slot ", 1 + index});
item.setText({"Slot ", 1 + index}); item.setText({"Slot ", 1 + index});
item.onActivate([=] { program.saveState({"quick/slot ", 1 + index}); }); item.onActivate([=] { program.saveState({"Quick/Slot ", 1 + index}); });
} }
loadState.setIcon(Icon::Media::Play).setText("Load State"); loadState.setIcon(Icon::Media::Play).setText("Load State");
for(uint index : range(QuickStates)) { for(uint index : range(QuickStates)) {
MenuItem item{&loadState}; MenuItem item{&loadState};
item.setProperty("name", {"quick/slot ", 1 + index}); item.setProperty("name", {"Quick/Slot ", 1 + index});
item.setProperty("title", {"Slot ", 1 + index}); item.setProperty("title", {"Slot ", 1 + index});
item.setText({"Slot ", 1 + index}); item.setText({"Slot ", 1 + index});
item.onActivate([=] { program.loadState({"quick/slot ", 1 + index}); }); item.onActivate([=] { program.loadState({"Quick/Slot ", 1 + index}); });
} }
loadState.append(MenuSeparator()); loadState.append(MenuSeparator());
loadState.append(MenuItem() loadState.append(MenuItem()
.setProperty("name", "quick/undo") .setProperty("name", "Quick/Undo")
.setProperty("title", "Undo Last Save") .setProperty("title", "Undo Last Save")
.setIcon(Icon::Edit::Undo).setText("Undo Last Save").onActivate([&] { .setIcon(Icon::Edit::Undo).setText("Undo Last Save").onActivate([&] {
program.loadState("quick/undo"); program.loadState("Quick/Undo");
})); }));
loadState.append(MenuItem() loadState.append(MenuItem()
.setProperty("name", "quick/redo") .setProperty("name", "Quick/Redo")
.setProperty("title", "Redo Last Undo") .setProperty("title", "Redo Last Undo")
.setIcon(Icon::Edit::Redo).setText("Redo Last Undo").onActivate([&] { .setIcon(Icon::Edit::Redo).setText("Redo Last Undo").onActivate([&] {
program.loadState("quick/redo"); program.loadState("Quick/Redo");
})); }));
loadState.append(MenuItem().setIcon(Icon::Edit::Clear).setText("Remove All States").onActivate([&] { loadState.append(MenuItem().setIcon(Icon::Edit::Clear).setText("Remove All States").onActivate([&] {
if(MessageDialog("Are you sure you want to permanently remove all quick states for this game?").setParent(*this).question() == "Yes") { if(MessageDialog("Are you sure you want to permanently remove all quick states for this game?").setParent(*this).question() == "Yes") {
for(uint index : range(QuickStates)) program.removeState({"quick/slot ", 1 + index}); for(uint index : range(QuickStates)) program.removeState({"Quick/Slot ", 1 + index});
program.removeState("quick/undo"); program.removeState("Quick/Undo");
program.removeState("quick/redo"); program.removeState("Quick/Redo");
updateStateMenus();
} }
})); }));
speedMenu.setIcon(Icon::Device::Clock).setText("Speed"); speedMenu.setIcon(Icon::Device::Clock).setText("Speed").setEnabled(
!settings["Video/Blocking"].boolean() && settings["Audio/Blocking"].boolean()
);
speedSlowest.setText("50% (Slowest)").setProperty("multiplier", "2.0").onActivate([&] { program.updateAudioFrequency(); }); speedSlowest.setText("50% (Slowest)").setProperty("multiplier", "2.0").onActivate([&] { program.updateAudioFrequency(); });
speedSlow.setText("75% (Slow)").setProperty("multiplier", "1.333").onActivate([&] { program.updateAudioFrequency(); }); speedSlow.setText("75% (Slow)").setProperty("multiplier", "1.333").onActivate([&] { program.updateAudioFrequency(); });
speedNormal.setText("100% (Normal)").setProperty("multiplier", "1.0").onActivate([&] { program.updateAudioFrequency(); }); speedNormal.setText("100% (Normal)").setProperty("multiplier", "1.0").onActivate([&] { program.updateAudioFrequency(); });
@ -195,7 +196,7 @@ auto Presentation::create() -> void {
#if defined(PLATFORM_WINDOWS) #if defined(PLATFORM_WINDOWS)
Application::Windows::onModalChange([&](bool modal) { Application::Windows::onModalChange([&](bool modal) {
if(modal && audio) audio->clear(); if(modal) audio.clear();
}); });
#endif #endif
@ -443,7 +444,7 @@ auto Presentation::updateSizeMenu() -> void {
} }
auto Presentation::updateStateMenus() -> void { auto Presentation::updateStateMenus() -> void {
auto states = program.availableStates("quick/"); auto states = program.availableStates("Quick/");
for(auto& action : saveState.actions()) { for(auto& action : saveState.actions()) {
if(auto item = action.cast<MenuItem>()) { if(auto item = action.cast<MenuItem>()) {
@ -507,7 +508,7 @@ auto Presentation::updateRecentGames() -> void {
displayName.append(Location::prefix(part), " + "); displayName.append(Location::prefix(part), " + ");
} }
displayName.trimRight(" + ", 1L); displayName.trimRight(" + ", 1L);
item.setIcon(games(0).endsWith("/") ? Icon::Action::Open : Icon::Emblem::File); item.setIcon(games(0).endsWith("/") ? (image)Icon::Action::Open : (image)Icon::Emblem::File);
item.setText(displayName); item.setText(displayName);
item.onActivate([=] { item.onActivate([=] {
program.gameQueue = games; program.gameQueue = games;

View File

@ -27,7 +27,7 @@ auto Program::load() -> void {
hackCompatibility(); hackCompatibility();
emulator->power(); emulator->power();
if(emulatorSettings.autoLoadStateOnLoad.checked()) { if(emulatorSettings.autoLoadStateOnLoad.checked()) {
program.loadState("quick/undo"); program.loadState("Quick/Undo");
} }
showMessage({ showMessage({
verified() ? "Verified game loaded" : "Game loaded", verified() ? "Verified game loaded" : "Game loaded",

View File

@ -12,11 +12,11 @@ auto Program::open(uint id, string name, vfs::file::mode mode, bool required) ->
if(id == 0) { //System if(id == 0) { //System
if(name == "boards.bml" && mode == vfs::file::mode::read) { if(name == "boards.bml" && mode == vfs::file::mode::read) {
result = vfs::memory::file::open(Resource::System::Boards.data(), Resource::System::Boards.size()); result = vfs::memory::file::open(Resource::System::Boards, sizeof(Resource::System::Boards));
} }
if(name == "ipl.rom" && mode == vfs::file::mode::read) { if(name == "ipl.rom" && mode == vfs::file::mode::read) {
result = vfs::memory::file::open(Resource::System::IPLROM.data(), Resource::System::IPLROM.size()); result = vfs::memory::file::open(Resource::System::IPLROM, sizeof(Resource::System::IPLROM));
} }
} }

View File

@ -16,10 +16,11 @@ Program program;
auto Program::create(vector<string> arguments) -> void { auto Program::create(vector<string> arguments) -> void {
Emulator::platform = this; Emulator::platform = this;
aboutWindow.create();
presentation.create(); presentation.create();
presentation.setVisible(); presentation.setVisible();
aboutWindow.create();
settingsWindow.create();
videoSettings.create(); videoSettings.create();
audioSettings.create(); audioSettings.create();
inputSettings.create(); inputSettings.create();
@ -27,15 +28,14 @@ auto Program::create(vector<string> arguments) -> void {
pathSettings.create(); pathSettings.create();
emulatorSettings.create(); emulatorSettings.create();
driverSettings.create(); driverSettings.create();
settingsWindow.create();
toolsWindow.create();
cheatDatabase.create(); cheatDatabase.create();
cheatWindow.create(); cheatWindow.create();
cheatEditor.create(); cheatEditor.create();
stateWindow.create(); stateWindow.create();
stateManager.create(); stateManager.create();
manifestViewer.create(); manifestViewer.create();
toolsWindow.create();
if(settings["Crashed"].boolean()) { if(settings["Crashed"].boolean()) {
MessageDialog( MessageDialog(

View File

@ -60,8 +60,8 @@ auto Program::loadStateData(string filename) -> vector<uint8_t> {
auto Program::loadState(string filename) -> bool { auto Program::loadState(string filename) -> bool {
string prefix = Location::file(filename); string prefix = Location::file(filename);
if(auto memory = loadStateData(filename)) { if(auto memory = loadStateData(filename)) {
if(filename != "quick/undo") saveUndoState(); if(filename != "Quick/Undo") saveUndoState();
if(filename == "quick/undo") saveRedoState(); if(filename == "Quick/Undo") saveRedoState();
auto serializerRLE = Decode::RLE<uint8_t>(memory.data() + 3 * sizeof(uint)); auto serializerRLE = Decode::RLE<uint8_t>(memory.data() + 3 * sizeof(uint));
serializer s{serializerRLE.data(), serializerRLE.size()}; serializer s{serializerRLE.data(), serializerRLE.size()};
if(!emulator->unserialize(s)) return showMessage({"[", prefix, "] is in incompatible format"}), false; if(!emulator->unserialize(s)) return showMessage({"[", prefix, "] is in incompatible format"}), false;
@ -122,7 +122,7 @@ auto Program::saveState(string filename) -> bool {
output.append(location, saveState.data(), saveState.size()); output.append(location, saveState.data(), saveState.size());
} }
if(filename.beginsWith("quick/")) presentation.updateStateMenus(); if(filename.beginsWith("Quick/")) presentation.updateStateMenus();
stateManager.stateEvent(filename); stateManager.stateEvent(filename);
return showMessage({"Saved [", prefix, "]"}), true; return showMessage({"Saved [", prefix, "]"}), true;
} }
@ -130,7 +130,7 @@ auto Program::saveState(string filename) -> bool {
auto Program::saveUndoState() -> bool { auto Program::saveUndoState() -> bool {
auto statusTime = this->statusTime; auto statusTime = this->statusTime;
auto statusMessage = this->statusMessage; auto statusMessage = this->statusMessage;
auto result = saveState("quick/undo"); auto result = saveState("Quick/Undo");
this->statusTime = statusTime; this->statusTime = statusTime;
this->statusMessage = statusMessage; this->statusMessage = statusMessage;
return result; return result;
@ -139,7 +139,7 @@ auto Program::saveUndoState() -> bool {
auto Program::saveRedoState() -> bool { auto Program::saveRedoState() -> bool {
auto statusTime = this->statusTime; auto statusTime = this->statusTime;
auto statusMessage = this->statusMessage; auto statusMessage = this->statusMessage;
auto result = saveState("quick/redo"); auto result = saveState("Quick/Redo");
this->statusTime = statusTime; this->statusTime = statusTime;
this->statusMessage = statusMessage; this->statusMessage = statusMessage;
return result; return result;

View File

@ -2,5 +2,5 @@ namespace name=Resource
binary name=Icon file=icon.png binary name=Icon file=icon.png
binary name=Logo file=logo.png binary name=Logo file=logo.png
namespace name=System namespace name=System
binary name=Boards file="../../systems/Super Famicom.sys/boards.bml" string name=Boards file="../../systems/Super Famicom.sys/boards.bml"
binary name=IPLROM file="../../systems/Super Famicom.sys/ipl.rom" binary name=IPLROM file="../../systems/Super Famicom.sys/ipl.rom"

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
namespace Resource { namespace Resource {
extern const nall::vector<uint8_t> Icon; extern const unsigned char Icon[3463];
extern const nall::vector<uint8_t> Logo; extern const unsigned char Logo[23467];
namespace System { namespace System {
extern const nall::vector<uint8_t> Boards; extern const char Boards[30183];
extern const nall::vector<uint8_t> IPLROM; extern const unsigned char IPLROM[64];
} }
} }

View File

@ -20,6 +20,7 @@ auto DriverSettings::create() -> void {
videoBlockingToggle.setText("Synchronize").onToggle([&] { videoBlockingToggle.setText("Synchronize").onToggle([&] {
settings["Video/Blocking"].setValue(videoBlockingToggle.checked()); settings["Video/Blocking"].setValue(videoBlockingToggle.checked());
program.updateVideoBlocking(); program.updateVideoBlocking();
presentation.speedMenu.setEnabled(!videoBlockingToggle.checked() && audioBlockingToggle.checked());
}); });
videoFlushToggle.setText("GPU sync").onToggle([&] { videoFlushToggle.setText("GPU sync").onToggle([&] {
settings["Video/Flush"].setValue(videoFlushToggle.checked()); settings["Video/Flush"].setValue(videoFlushToggle.checked());
@ -47,6 +48,7 @@ auto DriverSettings::create() -> void {
audioBlockingToggle.setText("Synchronize").onToggle([&] { audioBlockingToggle.setText("Synchronize").onToggle([&] {
settings["Audio/Blocking"].setValue(audioBlockingToggle.checked()); settings["Audio/Blocking"].setValue(audioBlockingToggle.checked());
program.updateAudioBlocking(); program.updateAudioBlocking();
presentation.speedMenu.setEnabled(!videoBlockingToggle.checked() && audioBlockingToggle.checked());
}); });
audioDynamicToggle.setText("Dynamic rate").onToggle([&] { audioDynamicToggle.setText("Dynamic rate").onToggle([&] {
settings["Audio/Dynamic"].setValue(audioDynamicToggle.checked()); settings["Audio/Dynamic"].setValue(audioDynamicToggle.checked());

View File

@ -56,7 +56,7 @@ auto CheatWindow::create() -> void {
nameValue.onActivate([&] { if(acceptButton.enabled()) acceptButton.doActivate(); }); nameValue.onActivate([&] { if(acceptButton.enabled()) acceptButton.doActivate(); });
nameValue.onChange([&] { doChange(); }); nameValue.onChange([&] { doChange(); });
codeLayout.setAlignment(0.0); codeLayout.setAlignment(0.0);
codeLabel.setText("Code:"); codeLabel.setText("Code(s):");
codeValue.setFont(Font().setFamily(Font::Mono)); codeValue.setFont(Font().setFamily(Font::Mono));
codeValue.onChange([&] { doChange(); }); codeValue.onChange([&] { doChange(); });
enableOption.setText("Enable"); enableOption.setText("Enable");

View File

@ -34,7 +34,7 @@ auto ManifestViewer::loadManifest() -> void {
if(offset == 1 && program.bsMemory) verified = program.bsMemory.verified; if(offset == 1 && program.bsMemory) verified = program.bsMemory.verified;
if(offset == 1 && program.sufamiTurboA) verified = program.sufamiTurboA.verified; if(offset == 1 && program.sufamiTurboA) verified = program.sufamiTurboA.verified;
if(offset == 2 && program.sufamiTurboB) verified = program.sufamiTurboB.verified; if(offset == 2 && program.sufamiTurboB) verified = program.sufamiTurboB.verified;
item.setIcon(verified ? Icon::Emblem::Program : Icon::Emblem::Binary); item.setIcon(verified ? (image)Icon::Emblem::Program : (image)Icon::Emblem::Binary);
} }
manifestOption.doChange(); manifestOption.doChange();
} }
@ -49,6 +49,6 @@ auto ManifestViewer::selectManifest() -> void {
if(offset == 1 && program.bsMemory) location = program.bsMemory.location; if(offset == 1 && program.bsMemory) location = program.bsMemory.location;
if(offset == 1 && program.sufamiTurboA) location = program.sufamiTurboA.location; if(offset == 1 && program.sufamiTurboA) location = program.sufamiTurboA.location;
if(offset == 2 && program.sufamiTurboB) location = program.sufamiTurboB.location; if(offset == 2 && program.sufamiTurboB) location = program.sufamiTurboB.location;
typeIcon.setIcon(location.endsWith("/") ? Icon::Action::Open : Icon::Emblem::File); typeIcon.setIcon(location.endsWith("/") ? (image)Icon::Action::Open : (image)Icon::Emblem::File);
nameLabel.setText(location.trimRight("/", 1L)); nameLabel.setText(location.trimRight("/", 1L));
} }

View File

@ -60,8 +60,8 @@ auto StateManager::create() -> void {
stateList.sort(); stateList.sort();
}); });
categoryLabel.setText("Category:"); categoryLabel.setText("Category:");
categoryOption.append(ComboButtonItem().setText("Managed States").setProperty("type", "managed/")); categoryOption.append(ComboButtonItem().setText("Managed States").setProperty("type", "Managed/"));
categoryOption.append(ComboButtonItem().setText("Quick States").setProperty("type", "quick/")); categoryOption.append(ComboButtonItem().setText("Quick States").setProperty("type", "Quick/"));
categoryOption.onChange([&] { loadStates(); }); categoryOption.onChange([&] { loadStates(); });
statePreviewSeparator.setColor({192, 192, 192}); statePreviewSeparator.setColor({192, 192, 192});
statePreviewLabel.setFont(Font().setBold()).setText("Preview"); statePreviewLabel.setFont(Font().setBold()).setText("Preview");
@ -142,8 +142,8 @@ auto StateManager::updateSelection() -> void {
loadButton.setEnabled(batched.size() == 1); loadButton.setEnabled(batched.size() == 1);
saveButton.setEnabled(batched.size() == 1); saveButton.setEnabled(batched.size() == 1);
editButton.setEnabled(batched.size() == 1); editButton.setEnabled(batched.size() == 1);
addButton.setVisible(type() != "quick/"); addButton.setVisible(type() != "Quick/");
editButton.setVisible(type() != "quick/"); editButton.setVisible(type() != "Quick/");
removeButton.setEnabled(batched.size() >= 1); removeButton.setEnabled(batched.size() >= 1);
statePreview.setColor({0, 0, 0}); statePreview.setColor({0, 0, 0});

View File

@ -12,10 +12,13 @@ auto locate(string name) -> string {
return {Path::userData(), "higan/", name}; return {Path::userData(), "higan/", name};
} }
#include <nall/main.hpp> auto hiro::initialize() -> void {
auto nall::main(vector<string> arguments) -> void {
Application::setName("higan"); Application::setName("higan");
Application::setScreenSaver(false); Application::setScreenSaver(false);
}
#include <nall/main.hpp>
auto nall::main(vector<string> arguments) -> void {
new Program(arguments); new Program(arguments);
Application::run(); Application::run();
} }

View File

@ -264,13 +264,13 @@ auto Presentation::clearViewport() -> void {
uint length = 0; uint length = 0;
uint width = 16; uint width = 16;
uint height = 16; uint height = 16;
if(video->lock(output, length, width, height)) { if(video->acquire(output, length, width, height)) {
for(uint y : range(height)) { for(uint y : range(height)) {
auto line = output + y * (length >> 2); auto line = output + y * (length >> 2);
for(uint x : range(width)) *line++ = 0xff000000; for(uint x : range(width)) *line++ = 0xff000000;
} }
if(!emulator || !emulator->loaded()) drawIcon(output, length, width, height); if(!emulator || !emulator->loaded()) drawIcon(output, length, width, height);
video->unlock(); video->release();
video->output(); video->output();
} }
} }
@ -385,7 +385,7 @@ auto Presentation::loadSystems() -> void {
string filename = system["Load"].text(); string filename = system["Load"].text();
string load = Location::base(filename).trimRight("/", 1L); string load = Location::base(filename).trimRight("/", 1L);
string alias = system["Alias"].text(); string alias = system["Alias"].text();
item.setIcon(load ? Icon::Emblem::Folder : Icon::Device::Storage); item.setIcon(load ? (image)Icon::Emblem::Folder : (image)Icon::Device::Storage);
item.setText({alias ? alias : load ? load : name, " ..."}); item.setText({alias ? alias : load ? load : name, " ..."});
item.onActivate([=] { item.onActivate([=] {
for(auto& emulator : program->emulators) { for(auto& emulator : program->emulators) {

View File

@ -67,14 +67,14 @@ auto Program::videoRefresh(uint displayID, const uint32* data, uint pitch, uint
height -= overscanVertical * 2; height -= overscanVertical * 2;
} }
if(video->lock(output, length, width, height)) { if(video->acquire(output, length, width, height)) {
length >>= 2; length >>= 2;
for(auto y : range(height)) { for(auto y : range(height)) {
memory::copy<uint32>(output + y * length, data + y * pitch, width); memory::copy<uint32>(output + y * length, data + y * pitch, width);
} }
video->unlock(); video->release();
video->output(); video->output();
} }

View File

@ -1,41 +1,44 @@
auto Program::initializeVideoDriver() -> void { auto Program::initializeVideoDriver() -> void {
if(!Video::availableDrivers().find(settings["Video/Driver"].text())) { if(!Video::hasDrivers().find(settings["Video/Driver"].text())) {
settings["Video/Driver"].setValue("None"); settings["Video/Driver"].setValue(Video::safestDriver());
} }
video = Video::create(settings["Video/Driver"].text()); video = new Video;
video->create(settings["Video/Driver"].text());
video->setContext(presentation->viewport.handle()); video->setContext(presentation->viewport.handle());
video->setBlocking(settings["Video/Synchronize"].boolean()); video->setBlocking(settings["Video/Synchronize"].boolean());
if(!video->ready()) { if(!video->ready()) {
MessageDialog().setText("Failed to initialize video driver").warning(); MessageDialog().setText("Failed to initialize video driver").warning();
video = Video::create("None"); video = new Video;
video->create("None");
} }
presentation->clearViewport(); presentation->clearViewport();
} }
auto Program::initializeAudioDriver() -> void { auto Program::initializeAudioDriver() -> void {
if(!Audio::availableDrivers().find(settings["Audio/Driver"].text())) { if(!Audio::hasDrivers().find(settings["Audio/Driver"].text())) {
settings["Audio/Driver"].setValue("None"); settings["Audio/Driver"].setValue("None");
} }
audio = Audio::create(settings["Audio/Driver"].text()); audio = new Audio;
audio->create(settings["Audio/Driver"].text());
audio->setContext(presentation->viewport.handle()); audio->setContext(presentation->viewport.handle());
if(!audio->availableDevices().find(settings["Audio/Device"].text())) { if(!audio->hasDevices().find(settings["Audio/Device"].text())) {
settings["Audio/Device"].setValue(audio->availableDevices()(0)); settings["Audio/Device"].setValue(audio->device());
} }
audio->setDevice(settings["Audio/Device"].text()); audio->setDevice(settings["Audio/Device"].text());
if(!audio->availableFrequencies().find(settings["Audio/Frequency"].real())) { if(!audio->hasFrequencies().find(settings["Audio/Frequency"].natural())) {
settings["Audio/Frequency"].setValue(audio->availableFrequencies()(0)); settings["Audio/Frequency"].setValue(audio->frequency());
} }
audio->setFrequency(settings["Audio/Frequency"].real()); audio->setFrequency(settings["Audio/Frequency"].natural());
if(!audio->availableLatencies().find(settings["Audio/Latency"].natural())) { if(!audio->hasLatencies().find(settings["Audio/Latency"].natural())) {
settings["Audio/Latency"].setValue(audio->availableLatencies()(0)); settings["Audio/Latency"].setValue(audio->latency());
} }
audio->setLatency(settings["Audio/Latency"].real()); audio->setLatency(settings["Audio/Latency"].natural());
audio->setChannels(2); audio->setChannels(2);
audio->setExclusive(settings["Audio/Exclusive"].boolean()); audio->setExclusive(settings["Audio/Exclusive"].boolean());
@ -43,22 +46,25 @@ auto Program::initializeAudioDriver() -> void {
if(!audio->ready()) { if(!audio->ready()) {
MessageDialog().setText("Failed to initialize audio driver").warning(); MessageDialog().setText("Failed to initialize audio driver").warning();
audio = Audio::create("None"); audio = new Audio;
audio->create("None");
} }
Emulator::audio.setFrequency(settings["Audio/Frequency"].real()); Emulator::audio.setFrequency(settings["Audio/Frequency"].real());
} }
auto Program::initializeInputDriver() -> void { auto Program::initializeInputDriver() -> void {
if(!Input::availableDrivers().find(settings["Input/Driver"].text())) { if(!Input::hasDrivers().find(settings["Input/Driver"].text())) {
settings["Input/Driver"].setValue("None"); settings["Input/Driver"].setValue("None");
} }
input = Input::create(settings["Input/Driver"].text()); input = new Input;
input->create(settings["Input/Driver"].text());
input->setContext(presentation->viewport.handle()); input->setContext(presentation->viewport.handle());
if(!input->ready()) { if(!input->ready()) {
MessageDialog().setText("Failed to initialize input driver").warning(); MessageDialog().setText("Failed to initialize input driver").warning();
input = Input::create("None"); input = new Input;
input->create("None");
} }
} }

View File

@ -1,8 +1,7 @@
#include <nall/nall.hpp>
#include "resource.hpp" #include "resource.hpp"
namespace Resource { namespace Resource {
const nall::vector<uint8_t> Icon = { //size: 3088 const unsigned char Icon[3088] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,112,0,0,0,112,8,6,0,0,0,198,224,244, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,112,0,0,0,112,8,6,0,0,0,198,224,244,
75,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,0,32,99,72,82,77,0,0,122,38,0,0,128, 75,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,0,32,99,72,82,77,0,0,122,38,0,0,128,
132,0,0,250,0,0,0,128,232,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,112,156,186,81,60,0,0,0, 132,0,0,250,0,0,0,128,232,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,112,156,186,81,60,0,0,0,
@ -101,7 +100,7 @@ const nall::vector<uint8_t> Icon = { //size: 3088
105,97,47,104,105,103,97,110,47,105,99,111,110,47,104,105,103,97,110,45,110,111,99,105,114,99,108,101,46,115,118,103, 105,97,47,104,105,103,97,110,47,105,99,111,110,47,104,105,103,97,110,45,110,111,99,105,114,99,108,101,46,115,118,103,
144,27,14,155,0,0,0,0,73,69,78,68,174,66,96,130, 144,27,14,155,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Logo = { //size: 25128 const unsigned char Logo[25128] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,143,0,0,0,95,8,6,0,0,0,16,211,75, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,143,0,0,0,95,8,6,0,0,0,16,211,75,
124,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,0,32,99,72,82,77,0,0,122,38,0,0,128, 124,0,0,0,4,103,65,77,65,0,0,177,143,11,252,97,5,0,0,0,32,99,72,82,77,0,0,122,38,0,0,128,
132,0,0,250,0,0,0,128,232,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,112,156,186,81,60,0,0,0, 132,0,0,250,0,0,0,128,232,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,112,156,186,81,60,0,0,0,

View File

@ -1,4 +1,4 @@
namespace Resource { namespace Resource {
extern const nall::vector<uint8_t> Icon; extern const unsigned char Icon[3088];
extern const nall::vector<uint8_t> Logo; extern const unsigned char Logo[25128];
} }

View File

@ -7,26 +7,23 @@ AdvancedSettings::AdvancedSettings(TabFrame* parent) : TabFrameItem(parent) {
driverLabel.setText("Driver Selection").setFont(Font().setBold()); driverLabel.setText("Driver Selection").setFont(Font().setBold());
videoLabel.setText("Video:"); videoLabel.setText("Video:");
videoDriver.onChange([&] { settings["Video/Driver"].setValue(videoDriver.selected().text()); }); videoDriver.onChange([&] { settings["Video/Driver"].setValue(videoDriver.selected().text()); });
for(auto& driver : Video::availableDrivers()) { for(auto& driver : Video::hasDrivers()) {
ComboButtonItem item; ComboButtonItem item{&videoDriver};
item.setText(driver); item.setText(driver);
videoDriver.append(item);
if(settings["Video/Driver"].text() == driver) item.setSelected(); if(settings["Video/Driver"].text() == driver) item.setSelected();
} }
audioLabel.setText("Audio:"); audioLabel.setText("Audio:");
audioDriver.onChange([&] { settings["Audio/Driver"].setValue(audioDriver.selected().text()); }); audioDriver.onChange([&] { settings["Audio/Driver"].setValue(audioDriver.selected().text()); });
for(auto& driver : Audio::availableDrivers()) { for(auto& driver : Audio::hasDrivers()) {
ComboButtonItem item; ComboButtonItem item{&audioDriver};
item.setText(driver); item.setText(driver);
audioDriver.append(item);
if(settings["Audio/Driver"].text() == driver) item.setSelected(); if(settings["Audio/Driver"].text() == driver) item.setSelected();
} }
inputLabel.setText("Input:"); inputLabel.setText("Input:");
inputDriver.onChange([&] { settings["Input/Driver"].setValue(inputDriver.selected().text()); }); inputDriver.onChange([&] { settings["Input/Driver"].setValue(inputDriver.selected().text()); });
for(auto& driver : Input::availableDrivers()) { for(auto& driver : Input::hasDrivers()) {
ComboButtonItem item; ComboButtonItem item{&inputDriver};
item.setText(driver); item.setText(driver);
inputDriver.append(item);
if(settings["Input/Driver"].text() == driver) item.setSelected(); if(settings["Input/Driver"].text() == driver) item.setSelected();
} }

View File

@ -13,7 +13,7 @@ AudioSettings::AudioSettings(TabFrame* parent) : TabFrameItem(parent) {
updateDevice(); updateDevice();
}); });
for(auto& device : audio->availableDevices()) { for(auto& device : audio->hasDevices()) {
deviceList.append(ComboButtonItem().setText(device)); deviceList.append(ComboButtonItem().setText(device));
if(device == settings["Audio/Device"].text()) { if(device == settings["Audio/Device"].text()) {
deviceList.item(deviceList.itemCount() - 1).setSelected(); deviceList.item(deviceList.itemCount() - 1).setSelected();
@ -54,15 +54,15 @@ AudioSettings::AudioSettings(TabFrame* parent) : TabFrameItem(parent) {
auto AudioSettings::updateDevice() -> void { auto AudioSettings::updateDevice() -> void {
frequencyList.reset(); frequencyList.reset();
for(auto& frequency : audio->availableFrequencies()) { for(auto& frequency : audio->hasFrequencies()) {
frequencyList.append(ComboButtonItem().setText((uint)frequency)); frequencyList.append(ComboButtonItem().setText(frequency));
if(frequency == settings["Audio/Frequency"].real()) { if(frequency == settings["Audio/Frequency"].natural()) {
frequencyList.item(frequencyList.itemCount() - 1).setSelected(); frequencyList.item(frequencyList.itemCount() - 1).setSelected();
} }
} }
latencyList.reset(); latencyList.reset();
for(auto& latency : audio->availableLatencies()) { for(auto& latency : audio->hasLatencies()) {
latencyList.append(ComboButtonItem().setText(latency)); latencyList.append(ComboButtonItem().setText(latency));
if(latency == settings["Audio/Latency"].natural()) { if(latency == settings["Audio/Latency"].natural()) {
latencyList.item(latencyList.itemCount() - 1).setSelected(); latencyList.item(latencyList.itemCount() - 1).setSelected();

View File

@ -3,6 +3,7 @@ HotkeySettings::HotkeySettings(TabFrame* parent) : TabFrameItem(parent) {
setText("Hotkeys"); setText("Hotkeys");
layout.setPadding(5); layout.setPadding(5);
mappingList.setHeadered();
mappingList.onActivate([&] { assignMapping(); }); mappingList.onActivate([&] { assignMapping(); });
mappingList.onChange([&] { eraseButton.setEnabled((bool)mappingList.selected()); }); mappingList.onChange([&] { eraseButton.setEnabled((bool)mappingList.selected()); });
resetButton.setText("Reset").onActivate([&] { resetButton.setText("Reset").onActivate([&] {
@ -24,15 +25,12 @@ HotkeySettings::HotkeySettings(TabFrame* parent) : TabFrameItem(parent) {
auto HotkeySettings::reloadMappings() -> void { auto HotkeySettings::reloadMappings() -> void {
mappingList.reset(); mappingList.reset();
mappingList.append(TableViewHeader().setVisible() mappingList.append(TableViewColumn().setText("Name"));
.append(TableViewColumn().setText("Name")) mappingList.append(TableViewColumn().setText("Mapping").setExpandable());
.append(TableViewColumn().setText("Mapping").setExpandable())
);
for(auto& hotkey : inputManager->hotkeys) { for(auto& hotkey : inputManager->hotkeys) {
mappingList.append(TableViewItem() TableViewItem item{&mappingList};
.append(TableViewCell().setText(hotkey->name)) item.append(TableViewCell().setText(hotkey->name));
.append(TableViewCell()) item.append(TableViewCell());
);
} }
mappingList.resizeColumns(); mappingList.resizeColumns();
} }

View File

@ -23,6 +23,7 @@ InputSettings::InputSettings(TabFrame* parent) : TabFrameItem(parent) {
emulatorList.onChange([&] { reloadPorts(); }); emulatorList.onChange([&] { reloadPorts(); });
portList.onChange([&] { reloadDevices(); }); portList.onChange([&] { reloadDevices(); });
deviceList.onChange([&] { reloadMappings(); }); deviceList.onChange([&] { reloadMappings(); });
mappingList.setHeadered();
mappingList.onActivate([&] { assignMapping(); }); mappingList.onActivate([&] { assignMapping(); });
mappingList.onChange([&] { updateControls(); }); mappingList.onChange([&] { updateControls(); });
assignMouse1.setVisible(false).onActivate([&] { assignMouseInput(0); }); assignMouse1.setVisible(false).onActivate([&] { assignMouseInput(0); });
@ -98,15 +99,12 @@ auto InputSettings::reloadDevices() -> void {
auto InputSettings::reloadMappings() -> void { auto InputSettings::reloadMappings() -> void {
eraseButton.setEnabled(false); eraseButton.setEnabled(false);
mappingList.reset(); mappingList.reset();
mappingList.append(TableViewHeader().setVisible() mappingList.append(TableViewColumn().setText("Name"));
.append(TableViewColumn().setText("Name")) mappingList.append(TableViewColumn().setText("Mapping").setExpandable());
.append(TableViewColumn().setText("Mapping").setExpandable())
);
for(auto& mapping : activeDevice().mappings) { for(auto& mapping : activeDevice().mappings) {
mappingList.append(TableViewItem() TableViewItem item{&mappingList};
.append(TableViewCell().setText(mapping.name)) item.append(TableViewCell().setText(mapping.name));
.append(TableViewCell()) item.append(TableViewCell());
);
} }
refreshMappings(); refreshMappings();
} }

View File

@ -32,10 +32,8 @@ SystemSettings::SystemSettings(TabFrame* parent) : TabFrameItem(parent) {
auto SystemSettings::reload() -> void { auto SystemSettings::reload() -> void {
systemList.reset(); systemList.reset();
systemList.append(TableViewHeader().setVisible() systemList.append(TableViewColumn());
.append(TableViewColumn()) systemList.append(TableViewColumn().setText("System").setExpandable());
.append(TableViewColumn().setText("System").setExpandable())
);
for(auto system : settings.find("Systems/System")) { for(auto system : settings.find("Systems/System")) {
string name = system.text(); string name = system.text();
string load = Location::base(system["Load"].text()).trimRight("/", 1L); string load = Location::base(system["Load"].text()).trimRight("/", 1L);
@ -46,7 +44,7 @@ auto SystemSettings::reload() -> void {
.setChecked(system["Visible"].boolean()) .setChecked(system["Visible"].boolean())
) )
.append(TableViewCell() .append(TableViewCell()
.setIcon(load ? Icon::Emblem::Folder : Icon::Device::Storage) .setIcon(load ? (image)Icon::Emblem::Folder : (image)Icon::Device::Storage)
.setText(alias ? alias : load ? load : name) .setText(alias ? alias : load ? load : name)
) )
); );

View File

@ -3,19 +3,17 @@ CheatEditor::CheatEditor(TabFrame* parent) : TabFrameItem(parent) {
setText("Cheat Editor"); setText("Cheat Editor");
layout.setPadding(5); layout.setPadding(5);
cheatList.append(TableViewHeader().setVisible() cheatList.setHeadered();
.append(TableViewColumn()) cheatList.append(TableViewColumn());
.append(TableViewColumn().setText("Slot").setForegroundColor({0, 128, 0}).setAlignment(1.0)) cheatList.append(TableViewColumn().setText("Slot").setForegroundColor({0, 128, 0}).setAlignment(1.0));
.append(TableViewColumn().setText("Code(s)")) cheatList.append(TableViewColumn().setText("Code(s)"));
.append(TableViewColumn().setText("Description").setExpandable()) cheatList.append(TableViewColumn().setText("Description").setExpandable());
);
for(auto slot : range(Slots)) { for(auto slot : range(Slots)) {
cheatList.append(TableViewItem() TableViewItem item{&cheatList};
.append(TableViewCell().setCheckable()) item.append(TableViewCell().setCheckable());
.append(TableViewCell().setText(1 + slot)) item.append(TableViewCell().setText(1 + slot));
.append(TableViewCell()) item.append(TableViewCell());
.append(TableViewCell()) item.append(TableViewCell());
);
} }
cheatList.onChange([&] { doChangeSelected(); }); cheatList.onChange([&] { doChangeSelected(); });
cheatList.onToggle([&](auto cell) { cheatList.onToggle([&](auto cell) {

View File

@ -3,15 +3,13 @@ StateManager::StateManager(TabFrame* parent) : TabFrameItem(parent) {
setText("State Manager"); setText("State Manager");
layout.setPadding(5); layout.setPadding(5);
stateList.append(TableViewHeader().setVisible() stateList.setHeadered();
.append(TableViewColumn().setText("Slot").setForegroundColor({0, 128, 0}).setAlignment(1.0)) stateList.append(TableViewColumn().setText("Slot").setForegroundColor({0, 128, 0}).setAlignment(1.0));
.append(TableViewColumn().setText("Description").setExpandable()) stateList.append(TableViewColumn().setText("Description").setExpandable());
);
for(auto slot : range(Slots)) { for(auto slot : range(Slots)) {
stateList.append(TableViewItem() TableViewItem item{&stateList};
.append(TableViewCell().setText(1 + slot)) item.append(TableViewCell().setText(1 + slot));
.append(TableViewCell()) item.append(TableViewCell());
);
} }
stateList.onActivate([&] { doLoad(); }); stateList.onActivate([&] { doLoad(); });
stateList.onChange([&] { doChangeSelected(); }); stateList.onChange([&] { doChangeSelected(); });

View File

@ -4,20 +4,20 @@
-(NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication*)sender { -(NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication*)sender {
using hiro::Application; using hiro::Application;
if(Application::state.cocoa.onQuit) Application::Cocoa::doQuit(); if(Application::state().cocoa.onQuit) Application::Cocoa::doQuit();
else Application::quit(); else Application::quit();
return NSTerminateCancel; return NSTerminateCancel;
} }
-(BOOL) applicationShouldHandleReopen:(NSApplication*)application hasVisibleWindows:(BOOL)flag { -(BOOL) applicationShouldHandleReopen:(NSApplication*)application hasVisibleWindows:(BOOL)flag {
using hiro::Application; using hiro::Application;
if(Application::state.cocoa.onActivate) Application::Cocoa::doActivate(); if(Application::state().cocoa.onActivate) Application::Cocoa::doActivate();
return NO; return NO;
} }
-(void) run:(NSTimer*)timer { -(void) run:(NSTimer*)timer {
using hiro::Application; using hiro::Application;
if(Application::state.onMain) Application::doMain(); if(Application::state().onMain) Application::doMain();
} }
-(void) updateInDock:(NSTimer*)timer { -(void) updateInDock:(NSTimer*)timer {
@ -40,7 +40,7 @@ namespace hiro {
auto pApplication::run() -> void { auto pApplication::run() -> void {
//applicationTimer = [NSTimer scheduledTimerWithTimeInterval:0.1667 target:cocoaDelegate selector:@selector(updateInDock:) userInfo:nil repeats:YES]; //applicationTimer = [NSTimer scheduledTimerWithTimeInterval:0.1667 target:cocoaDelegate selector:@selector(updateInDock:) userInfo:nil repeats:YES];
if(Application::state.onMain) { if(Application::state().onMain) {
applicationTimer = [NSTimer scheduledTimerWithTimeInterval:0.0 target:cocoaDelegate selector:@selector(run:) userInfo:nil repeats:YES]; applicationTimer = [NSTimer scheduledTimerWithTimeInterval:0.0 target:cocoaDelegate selector:@selector(run:) userInfo:nil repeats:YES];
//below line is needed to run application during window resize; however it has a large performance penalty on the resize smoothness //below line is needed to run application during window resize; however it has a large performance penalty on the resize smoothness
@ -63,7 +63,7 @@ auto pApplication::pendingEvents() -> bool {
auto pApplication::processEvents() -> void { auto pApplication::processEvents() -> void {
@autoreleasepool { @autoreleasepool {
while(!Application::state.quit) { while(!Application::state().quit) {
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES]; NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES];
if(event == nil) break; if(event == nil) break;
[event retain]; [event retain];

View File

@ -2,7 +2,7 @@
namespace hiro { namespace hiro {
struct pObject : mLock { struct pObject : Lock {
pObject(mObject& reference) : reference(reference) {} pObject(mObject& reference) : reference(reference) {}
virtual ~pObject() {} virtual ~pObject() {}
auto self() const -> mObject& { return (mObject&)reference; } auto self() const -> mObject& { return (mObject&)reference; }

View File

@ -47,7 +47,6 @@
#include "widget/tab-frame.cpp" #include "widget/tab-frame.cpp"
#include "widget/tab-frame-item.cpp" #include "widget/tab-frame-item.cpp"
#include "widget/table-view.cpp" #include "widget/table-view.cpp"
#include "widget/table-view-header.cpp"
#include "widget/table-view-column.cpp" #include "widget/table-view-column.cpp"
#include "widget/table-view-item.cpp" #include "widget/table-view-item.cpp"
#include "widget/table-view-cell.cpp" #include "widget/table-view-cell.cpp"

View File

@ -51,7 +51,6 @@
#include "widget/tab-frame.hpp" #include "widget/tab-frame.hpp"
#include "widget/tab-frame-item.hpp" #include "widget/tab-frame-item.hpp"
#include "widget/table-view.hpp" #include "widget/table-view.hpp"
#include "widget/table-view-header.hpp"
#include "widget/table-view-column.hpp" #include "widget/table-view-column.hpp"
#include "widget/table-view-item.hpp" #include "widget/table-view-item.hpp"
#include "widget/table-view-cell.hpp" #include "widget/table-view-cell.hpp"

View File

@ -4,7 +4,7 @@ namespace hiro {
auto pTableViewColumn::construct() -> void { auto pTableViewColumn::construct() -> void {
@autoreleasepool { @autoreleasepool {
if(auto tableView = _grandparent()) { if(auto tableView = _parent()) {
[tableView->cocoaView reloadColumns]; [tableView->cocoaView reloadColumns];
} }
} }
@ -12,7 +12,7 @@ auto pTableViewColumn::construct() -> void {
auto pTableViewColumn::destruct() -> void { auto pTableViewColumn::destruct() -> void {
@autoreleasepool { @autoreleasepool {
if(auto tableView = _grandparent()) { if(auto tableView = _parent()) {
[tableView->cocoaView reloadColumns]; [tableView->cocoaView reloadColumns];
} }
} }
@ -43,20 +43,25 @@ auto pTableViewColumn::setHorizontalAlignment(double alignment) -> void {
} }
auto pTableViewColumn::setIcon(const image& icon) -> void { auto pTableViewColumn::setIcon(const image& icon) -> void {
//TODO
} }
auto pTableViewColumn::setResizable(bool resizable) -> void { auto pTableViewColumn::setResizable(bool resizable) -> void {
} }
auto pTableViewColumn::setSortable(bool sortable) -> void { auto pTableViewColumn::setSorting(Sort sorting) -> void {
setText(state().text);
} }
auto pTableViewColumn::setText(const string& text) -> void { auto pTableViewColumn::setText(const string& text) -> void {
@autoreleasepool { @autoreleasepool {
if(auto pTableView = _grandparent()) { if(auto parent = _parent()) {
NSTableColumn* tableColumn = [[pTableView->cocoaView content] tableColumnWithIdentifier:[[NSNumber numberWithInteger:self().offset()] stringValue]]; string label = text;
[[tableColumn headerCell] setStringValue:[NSString stringWithUTF8STring:text]]; if(state().sorting == Sort::Ascending ) label.append(" \u25b4");
[[pTableView->cocoaView headerView] setNeedsDisplay:YES]; if(state().sorting == Sort::Descending) label.append(" \u25be");
NSTableColumn* tableColumn = [[parent->cocoaView content] tableColumnWithIdentifier:[[NSNumber numberWithInteger:self().offset()] stringValue]];
[[tableColumn headerCell] setStringValue:[NSString stringWithUTF8STring:label]];
[[parent->cocoaView headerView] setNeedsDisplay:YES];
} }
} }
} }
@ -70,16 +75,11 @@ auto pTableViewColumn::setVisible(bool visible) -> void {
auto pTableViewColumn::setWidth(signed width) -> void { auto pTableViewColumn::setWidth(signed width) -> void {
} }
auto pTableViewColumn::_grandparent() -> maybe<pTableView&> { auto pTableViewColumn::_parent() -> maybe<pTableView&> {
if(auto parent = _parent()) return parent->_parent();
return nothing;
}
auto pTableViewColumn::_parent() -> maybe<pTableViewHeader&> {
if(auto parent = self().parentTableViewHeader()) { if(auto parent = self().parentTableViewHeader()) {
if(auto self = parent->self()) return *self; if(auto self = parent->self()) return *self;
} }
return nothing; return {};
} }
} }

View File

@ -15,14 +15,13 @@ struct pTableViewColumn : pObject {
auto setHorizontalAlignment(double) -> void; auto setHorizontalAlignment(double) -> void;
auto setIcon(const image& icon) -> void; auto setIcon(const image& icon) -> void;
auto setResizable(bool resizable) -> void; auto setResizable(bool resizable) -> void;
auto setSortable(bool sortable) -> void; auto setSorting(Sort sorting) -> void;
auto setText(const string& text) -> void; auto setText(const string& text) -> void;
auto setVerticalAlignment(double) -> void; auto setVerticalAlignment(double) -> void;
auto setVisible(bool visible) -> void override; auto setVisible(bool visible) -> void override;
auto setWidth(signed width) -> void; auto setWidth(signed width) -> void;
auto _grandparent() -> maybe<pTableView&>; auto _parent() -> maybe<pTableView&>;
auto _parent() -> maybe<pTableViewHeader&>;
}; };
} }

View File

@ -1,38 +0,0 @@
#if defined(Hiro_TableView)
namespace hiro {
auto pTableViewHeader::construct() -> void {
}
auto pTableViewHeader::destruct() -> void {
}
auto pTableViewHeader::append(sTableViewColumn column) -> void {
}
auto pTableViewHeader::remove(sTableViewColumn column) -> void {
}
auto pTableViewHeader::setVisible(bool visible) -> void {
@autoreleasepool {
if(auto pTableView = _parent()) {
if(visible) {
[[pTableView->cocoaView content] setHeaderView:[[[NSTableHeaderView alloc] init] autorelease]];
} else {
[[pTableView->cocoaView content] setHeaderView:nil];
}
}
}
}
auto pTableViewHeader::_parent() -> maybe<pTableView&> {
if(auto parent = self().parentTableView()) {
if(auto self = parent->self()) return *self;
}
return nothing;
}
}
#endif

View File

@ -1,17 +0,0 @@
#if defined(Hiro_TableView)
namespace hiro {
struct pTableViewHeader : pObject {
Declare(TableViewHeader, Object)
auto append(sTableViewColumn column) -> void;
auto remove(sTableViewColumn column) -> void;
auto setVisible(bool visible) -> void override;
auto _parent() -> maybe<pTableView&>;
};
}
#endif

View File

@ -267,6 +267,8 @@ auto pTableView::construct() -> void {
setBordered(state().bordered); setBordered(state().bordered);
setFont(self().font(true)); setFont(self().font(true));
setForegroundColor(state().foregroundColor); setForegroundColor(state().foregroundColor);
setHeadered(state().headered);
setSortable(state().sortable);
} }
} }
@ -277,12 +279,10 @@ auto pTableView::destruct() -> void {
} }
} }
auto pTableView::append(sTableViewHeader header) -> void { auto pTableView::append(sTableViewColumn column) -> void {
@autoreleasepool { @autoreleasepool {
[cocoaView reloadColumns]; [cocoaView reloadColumns];
resizeColumns(); resizeColumns();
header->setVisible(header->visible());
} }
} }
@ -292,7 +292,7 @@ auto pTableView::append(sTableViewItem item) -> void {
} }
} }
auto pTableView::remove(sTableViewHeader header) -> void { auto pTableView::remove(sTableViewColumn column) -> void {
@autoreleasepool { @autoreleasepool {
[cocoaView reloadColumns]; [cocoaView reloadColumns];
resizeColumns(); resizeColumns();
@ -307,30 +307,28 @@ auto pTableView::remove(sTableViewItem item) -> void {
auto pTableView::resizeColumns() -> void { auto pTableView::resizeColumns() -> void {
@autoreleasepool { @autoreleasepool {
if(auto& header = state().header) { vector<int> widths;
vector<int> widths; int minimumWidth = 0;
int minimumWidth = 0; int expandable = 0;
int expandable = 0; for(uint column : range(self().columnCount())) {
for(auto column : range(header->columnCount())) { int width = _width(column);
int width = _width(column); widths.append(width);
widths.append(width); minimumWidth += width;
minimumWidth += width; if(state().columns[column]->expandable()) expandable++;
if(header->column(column).expandable()) expandable++; }
}
int maximumWidth = self().geometry().width() - 18; //include margin for vertical scroll bar int maximumWidth = self().geometry().width() - 18; //include margin for vertical scroll bar
int expandWidth = 0; int expandWidth = 0;
if(expandable && maximumWidth > minimumWidth) { if(expandable && maximumWidth > minimumWidth) {
expandWidth = (maximumWidth - minimumWidth) / expandable; expandWidth = (maximumWidth - minimumWidth) / expandable;
} }
for(auto column : range(header->columnCount())) { for(uint column : range(self().columnCount())) {
if(auto self = header->state.columns[column]->self()) { if(auto self = state().columns[column]->self()) {
int width = widths[column]; int width = widths[column];
if(self->state().expandable) width += expandWidth; if(self->state().expandable) width += expandWidth;
NSTableColumn* tableColumn = [[cocoaView content] tableColumnWithIdentifier:[[NSNumber numberWithInteger:column] stringValue]]; NSTableColumn* tableColumn = [[cocoaView content] tableColumnWithIdentifier:[[NSNumber numberWithInteger:column] stringValue]];
[tableColumn setWidth:width]; [tableColumn setWidth:width];
}
} }
} }
} }
@ -367,6 +365,17 @@ auto pTableView::setFont(const Font& font) -> void {
auto pTableView::setForegroundColor(Color color) -> void { auto pTableView::setForegroundColor(Color color) -> void {
} }
auto pTableView::setHeadered(bool headered) -> void {
@autoreleasepool {
if(headered == state().headered) return;
if(headered) {
[[pTableView->cocoaView content] setHeaderView:[[[NSTableHeaderView alloc] init] autorelease]];
} else {
[[pTableView->cocoaView content] setHeaderView:nil];
}
}
}
auto pTableView::_cellWidth(uint row, uint column) -> uint { auto pTableView::_cellWidth(uint row, uint column) -> uint {
uint width = 8; uint width = 8;
if(auto pTableViewItem = self().item(row)) { if(auto pTableViewItem = self().item(row)) {
@ -387,57 +396,32 @@ auto pTableView::_cellWidth(uint row, uint column) -> uint {
auto pTableView::_columnWidth(uint column) -> uint { auto pTableView::_columnWidth(uint column) -> uint {
uint width = 8; uint width = 8;
if(auto& header = state().header) { if(auto column = self().column(column)) {
if(auto pTableViewColumn = header->column(column)) { if(auto& icon = column->state.icon) {
if(auto& icon = pTableViewColumn->state.icon) { width += icon.width() + 2;
width += icon.width() + 2; }
} if(auto& text = column->state.text) {
if(auto& text = pTableViewColumn->state.text) { width += pFont::size(column->font(true), text).width();
width += pFont::size(pTableViewColumn->font(true), text).width(); }
} if(column->state.sorting != Sort::None) {
width += 16;
} }
} }
return width; return width;
} }
auto pTableView::_width(uint column) -> uint { auto pTableView::_width(uint column) -> uint {
if(auto& header = state().header) { if(auto width = self().column(column).width()) return width;
if(auto width = header->column(column).width()) return width; uint width = 1;
uint width = 1; if(!self().column(column).visible()) return width;
if(!header->column(column).visible()) return width; if(state().headered) width = max(width, _columnWidth(column));
if(header->visible()) width = max(width, _columnWidth(column)); for(auto row : range(state().items.size())) {
for(auto row : range(state().items.size())) { width = max(width, _cellWidth(row, column));
width = max(width, _cellWidth(row, column));
}
return width;
} }
return 1; return width;
} }
/* /*
auto pTableView::autoSizeColumns() -> void {
@autoreleasepool {
if(tableView.state.checkable) {
NSTableColumn* tableColumn = [[cocoaView content] tableColumnWithIdentifier:@"check"];
[tableColumn setWidth:20.0];
}
unsigned height = [[cocoaView content] rowHeight];
for(unsigned column = 0; column < max(1u, tableView.state.headerText.size()); column++) {
NSTableColumn* tableColumn = [[cocoaView content] tableColumnWithIdentifier:[[NSNumber numberWithInteger:column] stringValue]];
unsigned minimumWidth = pFont::size([[tableColumn headerCell] font], tableView.state.headerText(column)).width + 4;
for(unsigned row = 0; row < tableView.state.text.size(); row++) {
unsigned width = pFont::size([cocoaView font], tableView.state.text(row)(column)).width + 2;
if(tableView.state.image(row)(height)) width += height + 2;
if(width > minimumWidth) minimumWidth = width;
}
[tableColumn setWidth:minimumWidth];
}
[[cocoaView content] sizeLastColumnToFit];
}
}
auto pTableView::setSelected(bool selected) -> void { auto pTableView::setSelected(bool selected) -> void {
@autoreleasepool { @autoreleasepool {
if(selected == false) { if(selected == false) {

View File

@ -46,9 +46,9 @@ namespace hiro {
struct pTableView : pWidget { struct pTableView : pWidget {
Declare(TableView, Widget) Declare(TableView, Widget)
auto append(sTableViewHeader header) -> void; auto append(sTableViewColumn column) -> void;
auto append(sTableViewItem item) -> void; auto append(sTableViewItem item) -> void;
auto remove(sTableViewHeader header) -> void; auto remove(sTableViewColumn column) -> void;
auto remove(sTableViewItem item) -> void; auto remove(sTableViewItem item) -> void;
auto resizeColumns() -> void; auto resizeColumns() -> void;
auto setAlignment(Alignment alignment) -> void; auto setAlignment(Alignment alignment) -> void;
@ -58,6 +58,8 @@ struct pTableView : pWidget {
auto setEnabled(bool enabled) -> void override; auto setEnabled(bool enabled) -> void override;
auto setFont(const Font& font) -> void override; auto setFont(const Font& font) -> void override;
auto setForegroundColor(Color color) -> void; auto setForegroundColor(Color color) -> void;
auto setHeadered(bool headered) -> void;
auto setSortable(bool sortable) -> void;
auto _cellWidth(uint row, uint column) -> uint; auto _cellWidth(uint row, uint column) -> uint;
auto _columnWidth(uint column) -> uint; auto _columnWidth(uint column) -> uint;

View File

@ -17,7 +17,8 @@
NSBundle* bundle = [NSBundle mainBundle]; NSBundle* bundle = [NSBundle mainBundle];
NSDictionary* dictionary = [bundle infoDictionary]; NSDictionary* dictionary = [bundle infoDictionary];
NSString* applicationName = [dictionary objectForKey:@"CFBundleDisplayName"]; NSString* applicationName = [dictionary objectForKey:@"CFBundleDisplayName"];
if(applicationName == nil) applicationName = [NSString stringWithUTF8String:hiro::Application::state.name]; string hiroName = hiro::Application::state().name ? hiro::Application::state().name : string{"hiro"};
if(applicationName == nil) applicationName = [NSString stringWithUTF8String:hiroName];
menuBar = [[NSMenu alloc] init]; menuBar = [[NSMenu alloc] init];

View File

@ -1,13 +1,11 @@
#if defined(Hiro_Application) #if defined(Hiro_Application)
Application::State Application::state;
auto Application::doMain() -> void { auto Application::doMain() -> void {
if(state.onMain) return state.onMain(); if(state().onMain) return state().onMain();
} }
auto Application::font() -> Font { auto Application::font() -> Font {
return state.font; return state().font;
} }
auto Application::kill() -> void { auto Application::kill() -> void {
@ -16,19 +14,19 @@ auto Application::kill() -> void {
} }
auto Application::locale() -> Locale& { auto Application::locale() -> Locale& {
return state.locale; return state().locale;
} }
auto Application::modal() -> bool { auto Application::modal() -> bool {
return state.modal > 0; return state().modal > 0;
} }
auto Application::name() -> string { auto Application::name() -> string {
return state.name; return state().name;
} }
auto Application::onMain(const function<void ()>& callback) -> void { auto Application::onMain(const function<void ()>& callback) -> void {
state.onMain = callback; state().onMain = callback;
} }
auto Application::run() -> void { auto Application::run() -> void {
@ -44,87 +42,93 @@ auto Application::processEvents() -> void {
} }
auto Application::quit() -> void { auto Application::quit() -> void {
state.quit = true; state().quit = true;
return pApplication::quit(); return pApplication::quit();
} }
auto Application::scale() -> float { auto Application::scale() -> float {
return state.scale; return state().scale;
} }
auto Application::scale(float value) -> float { auto Application::scale(float value) -> float {
return value * state.scale; return value * state().scale;
} }
auto Application::screenSaver() -> bool { auto Application::screenSaver() -> bool {
return state.screenSaver; return state().screenSaver;
} }
auto Application::setFont(const Font& font) -> void { auto Application::setFont(const Font& font) -> void {
state.font = font; state().font = font;
} }
auto Application::setName(const string& name) -> void { auto Application::setName(const string& name) -> void {
state.name = name; state().name = name;
} }
auto Application::setScale(float scale) -> void { auto Application::setScale(float scale) -> void {
state.scale = scale; state().scale = scale;
} }
auto Application::setScreenSaver(bool screenSaver) -> void { auto Application::setScreenSaver(bool screenSaver) -> void {
state.screenSaver = screenSaver; state().screenSaver = screenSaver;
pApplication::setScreenSaver(screenSaver); pApplication::setScreenSaver(screenSaver);
} }
//this ensures Application::state is initialized prior to use
auto Application::state() -> State& {
static State state;
return state;
}
auto Application::unscale(float value) -> float { auto Application::unscale(float value) -> float {
return value * (1.0 / state.scale); return value * (1.0 / state().scale);
} }
//Windows //Windows
//======= //=======
auto Application::Windows::doModalChange(bool modal) -> void { auto Application::Windows::doModalChange(bool modal) -> void {
if(state.windows.onModalChange) return state.windows.onModalChange(modal); if(state().windows.onModalChange) return state().windows.onModalChange(modal);
} }
auto Application::Windows::onModalChange(const function<void (bool)>& callback) -> void { auto Application::Windows::onModalChange(const function<void (bool)>& callback) -> void {
state.windows.onModalChange = callback; state().windows.onModalChange = callback;
} }
//Cocoa //Cocoa
//===== //=====
auto Application::Cocoa::doAbout() -> void { auto Application::Cocoa::doAbout() -> void {
if(state.cocoa.onAbout) return state.cocoa.onAbout(); if(state().cocoa.onAbout) return state().cocoa.onAbout();
} }
auto Application::Cocoa::doActivate() -> void { auto Application::Cocoa::doActivate() -> void {
if(state.cocoa.onActivate) return state.cocoa.onActivate(); if(state().cocoa.onActivate) return state().cocoa.onActivate();
} }
auto Application::Cocoa::doPreferences() -> void { auto Application::Cocoa::doPreferences() -> void {
if(state.cocoa.onPreferences) return state.cocoa.onPreferences(); if(state().cocoa.onPreferences) return state().cocoa.onPreferences();
} }
auto Application::Cocoa::doQuit() -> void { auto Application::Cocoa::doQuit() -> void {
if(state.cocoa.onQuit) return state.cocoa.onQuit(); if(state().cocoa.onQuit) return state().cocoa.onQuit();
} }
auto Application::Cocoa::onAbout(const function<void ()>& callback) -> void { auto Application::Cocoa::onAbout(const function<void ()>& callback) -> void {
state.cocoa.onAbout = callback; state().cocoa.onAbout = callback;
} }
auto Application::Cocoa::onActivate(const function<void ()>& callback) -> void { auto Application::Cocoa::onActivate(const function<void ()>& callback) -> void {
state.cocoa.onActivate = callback; state().cocoa.onActivate = callback;
} }
auto Application::Cocoa::onPreferences(const function<void ()>& callback) -> void { auto Application::Cocoa::onPreferences(const function<void ()>& callback) -> void {
state.cocoa.onPreferences = callback; state().cocoa.onPreferences = callback;
} }
auto Application::Cocoa::onQuit(const function<void ()>& callback) -> void { auto Application::Cocoa::onQuit(const function<void ()>& callback) -> void {
state.cocoa.onQuit = callback; state().cocoa.onQuit = callback;
} }
//Internal //Internal

View File

@ -65,7 +65,8 @@ struct Application {
function<void ()> onQuit; function<void ()> onQuit;
} cocoa; } cocoa;
}; };
static State state;
static auto initialize() -> void; static auto initialize() -> void;
static auto state() -> State&;
}; };
#endif #endif

View File

@ -2,7 +2,7 @@
struct Font { struct Font {
using type = Font; using type = Font;
Font(const string& family = "", float size = 0); Font(const string& family = "", float size = 0.0);
explicit operator bool() const; explicit operator bool() const;
auto operator==(const Font& source) const -> bool; auto operator==(const Font& source) const -> bool;
@ -15,7 +15,7 @@ struct Font {
auto setBold(bool bold = true) -> type&; auto setBold(bool bold = true) -> type&;
auto setFamily(const string& family = "") -> type&; auto setFamily(const string& family = "") -> type&;
auto setItalic(bool italic = true) -> type&; auto setItalic(bool italic = true) -> type&;
auto setSize(float size = 0) -> type&; auto setSize(float size = 0.0) -> type&;
auto size() const -> float; auto size() const -> float;
auto size(const string& text) const -> Size; auto size(const string& text) const -> Size;
@ -27,7 +27,7 @@ struct Font {
//sizeof(Font) == 32 //sizeof(Font) == 32
struct State { struct State {
string family; //24 string family; //24
float size = 8.0; //4 float size = 0.0; //4
char bold = false; //1+ char bold = false; //1+
char italic = false; //1=4 char italic = false; //1=4
} state; } state;

View File

@ -2,12 +2,10 @@
//shared functionality used for pObject on all platforms //shared functionality used for pObject on all platforms
struct mLock { struct Lock {
struct Handle { struct Handle {
Handle(const mLock* self) : self(self) { Handle(const Lock* self) : self(self) {
if(self) { if(self) ++self->locks;
++self->locks;
}
} }
~Handle() { ~Handle() {
@ -23,11 +21,11 @@ struct mLock {
return false; return false;
} }
const mLock* self = nullptr; const Lock* self = nullptr;
}; };
auto acquired() const -> bool { auto acquired() const -> bool {
return locks || Application::state.quit; return locks || Application::state().quit;
} }
auto acquire() const -> Handle { auto acquire() const -> Handle {
@ -50,5 +48,3 @@ struct mLock {
mutable int locks = 0; mutable int locks = 0;
}; };
using Lock = mLock;

View File

@ -292,10 +292,10 @@ auto mWindow::setMinimumSize(Size size) -> type& {
auto mWindow::setModal(bool modal) -> type& { auto mWindow::setModal(bool modal) -> type& {
state.modal = modal; state.modal = modal;
if(modal) { if(modal) {
Application::state.modal++; Application::state().modal++;
} else { } else {
Application::state.modal--; Application::state().modal--;
assert(Application::state.modal >= 0); assert(Application::state().modal >= 0);
} }
signal(setModal, modal); signal(setModal, modal);
return *this; return *this;

View File

@ -228,7 +228,7 @@ auto BrowserDialogWindow::setPath(string path) -> void {
if(state.action == "openFolder") continue; if(state.action == "openFolder") continue;
} }
if(!isMatch(content)) continue; if(!isMatch(content)) continue;
view.append(ListViewItem().setText(content).setIcon(isFolder ? Icon::Action::Open : Icon::Emblem::File)); view.append(ListViewItem().setText(content).setIcon(isFolder ? (image)Icon::Action::Open : (image)Icon::Emblem::File));
} }
Application::processEvents(); Application::processEvents();

View File

@ -15,7 +15,7 @@ struct MessageDialog {
private: private:
struct State { struct State {
vector<string> buttons; vector<string> buttons;
vector<uint8_t> icon; image icon;
sWindow parent; sWindow parent;
string response; string response;
string text; string text;

View File

@ -10,7 +10,7 @@ bool pApplication::xdgScreenSaver = false;
#endif #endif
auto pApplication::run() -> void { auto pApplication::run() -> void {
while(!Application::state.quit) { while(!Application::state().quit) {
Application::doMain(); Application::doMain();
processEvents(); processEvents();
} }
@ -48,7 +48,7 @@ auto pApplication::initialize() -> void {
#endif #endif
//set WM_CLASS to Application::name() //set WM_CLASS to Application::name()
auto name = Application::state.name ? Application::state.name : string{"hiro"}; auto name = Application::state().name ? Application::state().name : string{"hiro"};
gdk_set_program_class(name); gdk_set_program_class(name);
#if defined(BUILD_DEBUG) #if defined(BUILD_DEBUG)

View File

@ -3,7 +3,7 @@
namespace hiro { namespace hiro {
auto pKeyboard::poll() -> vector<bool> { auto pKeyboard::poll() -> vector<bool> {
if(Application::state.quit) return {}; if(Application::state().quit) return {};
vector<bool> result; vector<bool> result;
char state[256]; char state[256];

View File

@ -9,7 +9,7 @@ static auto Message(MessageWindow::State& state, GtkMessageType messageStyle) ->
); );
if(state.title) gtk_window_set_title(GTK_WINDOW(dialog), state.title); if(state.title) gtk_window_set_title(GTK_WINDOW(dialog), state.title);
else if(Application::state.name) gtk_window_set_title(GTK_WINDOW(dialog), Application::state.name); else if(Application::state().name) gtk_window_set_title(GTK_WINDOW(dialog), Application::state().name);
switch(state.buttons) { switch(state.buttons) {
case MessageWindow::Buttons::Ok: case MessageWindow::Buttons::Ok:

View File

@ -2,7 +2,7 @@
namespace hiro { namespace hiro {
struct pObject : mLock { struct pObject : Lock {
pObject(mObject& reference) : reference(reference) {} pObject(mObject& reference) : reference(reference) {}
virtual ~pObject() {} virtual ~pObject() {}
auto self() const -> mObject& { return (mObject&)reference; } auto self() const -> mObject& { return (mObject&)reference; }

View File

@ -14,6 +14,7 @@ auto pRadioLabel::construct() -> void {
gtkToggleButton = GTK_TOGGLE_BUTTON(gtkWidget); gtkToggleButton = GTK_TOGGLE_BUTTON(gtkWidget);
gtkRadioButton = GTK_RADIO_BUTTON(gtkWidget); gtkRadioButton = GTK_RADIO_BUTTON(gtkWidget);
setGroup(state().group);
setText(state().text); setText(state().text);
g_signal_connect(G_OBJECT(gtkWidget), "toggled", G_CALLBACK(RadioLabel_activate), (gpointer)this); g_signal_connect(G_OBJECT(gtkWidget), "toggled", G_CALLBACK(RadioLabel_activate), (gpointer)this);
@ -31,9 +32,8 @@ auto pRadioLabel::minimumSize() const -> Size {
} }
auto pRadioLabel::setChecked() -> void { auto pRadioLabel::setChecked() -> void {
lock(); auto lock = acquire();
gtk_toggle_button_set_active(gtkToggleButton, true); gtk_toggle_button_set_active(gtkToggleButton, true);
unlock();
} }
auto pRadioLabel::setGroup(sGroup group) -> void { auto pRadioLabel::setGroup(sGroup group) -> void {
@ -42,7 +42,7 @@ auto pRadioLabel::setGroup(sGroup group) -> void {
if(auto object = weak.acquire()) { if(auto object = weak.acquire()) {
if(auto radioLabel = dynamic_cast<mRadioLabel*>(object.data())) { if(auto radioLabel = dynamic_cast<mRadioLabel*>(object.data())) {
if(auto self = radioLabel->self()) { if(auto self = radioLabel->self()) {
self->lock(); auto lock = self->acquire();
gtk_radio_button_set_group(self->gtkRadioButton, nullptr); gtk_radio_button_set_group(self->gtkRadioButton, nullptr);
if(!gtkRadioButton) { if(!gtkRadioButton) {
gtkRadioButton = self->gtkRadioButton; gtkRadioButton = self->gtkRadioButton;
@ -51,7 +51,6 @@ auto pRadioLabel::setGroup(sGroup group) -> void {
gtk_radio_button_set_group(self->gtkRadioButton, gtk_radio_button_get_group(*gtkRadioButton)); gtk_radio_button_set_group(self->gtkRadioButton, gtk_radio_button_get_group(*gtkRadioButton));
gtk_toggle_button_set_active(self->gtkToggleButton, radioLabel->state.checked = false); gtk_toggle_button_set_active(self->gtkToggleButton, radioLabel->state.checked = false);
} }
self->unlock();
} }
} }
} }

View File

@ -138,7 +138,7 @@ auto pWindow::construct() -> void {
gtk_window_set_resizable(GTK_WINDOW(widget), true); gtk_window_set_resizable(GTK_WINDOW(widget), true);
//if program was given a name, try and set the window taskbar icon from one of the pixmaps folders //if program was given a name, try and set the window taskbar icon from one of the pixmaps folders
if(!Application::state.name); if(!Application::state().name);
else if(_setIcon({Path::user(), ".local/share/icons/"})); else if(_setIcon({Path::user(), ".local/share/icons/"}));
else if(_setIcon("/usr/local/share/pixmaps/")); else if(_setIcon("/usr/local/share/pixmaps/"));
else if(_setIcon("/usr/share/pixmaps/")); else if(_setIcon("/usr/share/pixmaps/"));
@ -379,8 +379,8 @@ auto pWindow::setMinimumSize(Size size) -> void {
auto pWindow::setModal(bool modal) -> void { auto pWindow::setModal(bool modal) -> void {
if(modal) { if(modal) {
gtk_window_set_modal(GTK_WINDOW(widget), true); gtk_window_set_modal(GTK_WINDOW(widget), true);
while(!Application::state.quit && state().modal) { while(!Application::state().quit && state().modal) {
if(Application::state.onMain) { if(Application::state().onMain) {
Application::doMain(); Application::doMain();
} else { } else {
usleep(20 * 1000); usleep(20 * 1000);
@ -454,13 +454,13 @@ auto pWindow::_menuTextHeight() const -> int {
auto pWindow::_setIcon(const string& pathname) -> bool { auto pWindow::_setIcon(const string& pathname) -> bool {
string filename; string filename;
filename = {pathname, Application::state.name, ".svg"}; filename = {pathname, Application::state().name, ".svg"};
if(file::exists(filename)) { if(file::exists(filename)) {
gtk_window_set_icon_from_file(GTK_WINDOW(widget), filename, nullptr); gtk_window_set_icon_from_file(GTK_WINDOW(widget), filename, nullptr);
return true; return true;
} }
filename = {pathname, Application::state.name, ".png"}; filename = {pathname, Application::state().name, ".png"};
if(file::exists(filename)) { if(file::exists(filename)) {
//maximum image size GTK+ supports is 256x256; scale image down if necessary to prevent error //maximum image size GTK+ supports is 256x256; scale image down if necessary to prevent error
image icon(filename); image icon(filename);

View File

@ -23,7 +23,7 @@ auto pMenuRadioItem::construct() -> void {
} }
auto pMenuRadioItem::destruct() -> void { auto pMenuRadioItem::destruct() -> void {
if(Application::state.quit) return; //TODO: hack if(Application::state().quit) return; //TODO: hack
delete qtMenuRadioItem; delete qtMenuRadioItem;
delete qtActionGroup; delete qtActionGroup;
qtMenuRadioItem = nullptr; qtMenuRadioItem = nullptr;

View File

@ -23,7 +23,7 @@ auto pMenu::construct() -> void {
} }
auto pMenu::destruct() -> void { auto pMenu::destruct() -> void {
if(Application::state.quit) return; //TODO: hack if(Application::state().quit) return; //TODO: hack
delete qtMenu; delete qtMenu;
qtMenu = nullptr; qtMenu = nullptr;
} }

View File

@ -5,8 +5,8 @@ namespace hiro {
XlibDisplay* pApplication::display = nullptr; XlibDisplay* pApplication::display = nullptr;
auto pApplication::run() -> void { auto pApplication::run() -> void {
if(Application::state.onMain) { if(Application::state().onMain) {
while(!Application::state.quit) { while(!Application::state().quit) {
Application::doMain(); Application::doMain();
processEvents(); processEvents();
} }
@ -53,7 +53,7 @@ auto pApplication::initialize() -> void {
display = XOpenDisplay(0); display = XOpenDisplay(0);
auto name = Application::state.name ? Application::state.name : string{"hiro"}; static auto name = Application::state().name ? Application::state().name : string{"hiro"};
//QApplication stores references to argc; //QApplication stores references to argc;
//and will access them after pApplication::initialize() returns //and will access them after pApplication::initialize() returns

View File

@ -3,6 +3,8 @@
#if HIRO_QT==5 #if HIRO_QT==5
#include <QtWidgets> #include <QtWidgets>
#endif #endif
#undef foreach
#include <nall/xorg/guard.hpp> #include <nall/xorg/guard.hpp>
#define XK_MISCELLANY #define XK_MISCELLANY
#define XK_LATIN1 #define XK_LATIN1

View File

@ -2,7 +2,7 @@
namespace hiro { namespace hiro {
struct pObject : mLock { struct pObject : Lock {
pObject(mObject& reference) : reference(reference) {} pObject(mObject& reference) : reference(reference) {}
virtual ~pObject() {} virtual ~pObject() {}
auto self() const -> mObject& { return (mObject&)reference; } auto self() const -> mObject& { return (mObject&)reference; }

View File

@ -50,7 +50,6 @@
#include "widget/tab-frame.cpp" #include "widget/tab-frame.cpp"
#include "widget/tab-frame-item.cpp" #include "widget/tab-frame-item.cpp"
#include "widget/table-view.cpp" #include "widget/table-view.cpp"
#include "widget/table-view-header.cpp"
#include "widget/table-view-column.cpp" #include "widget/table-view-column.cpp"
#include "widget/table-view-item.cpp" #include "widget/table-view-item.cpp"
#include "widget/table-view-cell.cpp" #include "widget/table-view-cell.cpp"

View File

@ -52,7 +52,6 @@
#include "widget/tab-frame.hpp" #include "widget/tab-frame.hpp"
#include "widget/tab-frame-item.hpp" #include "widget/tab-frame-item.hpp"
#include "widget/table-view.hpp" #include "widget/table-view.hpp"
#include "widget/table-view-header.hpp"
#include "widget/table-view-column.hpp" #include "widget/table-view-column.hpp"
#include "widget/table-view-item.hpp" #include "widget/table-view-item.hpp"
#include "widget/table-view-cell.hpp" #include "widget/table-view-cell.hpp"

View File

@ -10,7 +10,7 @@ auto pComboButton::construct() -> void {
} }
auto pComboButton::destruct() -> void { auto pComboButton::destruct() -> void {
if(Application::state.quit) return; //TODO: hack if(Application::state().quit) return; //TODO: hack
delete qtComboButton; delete qtComboButton;
qtWidget = qtComboButton = nullptr; qtWidget = qtComboButton = nullptr;
} }

View File

@ -11,7 +11,7 @@ auto pTabFrame::construct() -> void {
} }
auto pTabFrame::destruct() -> void { auto pTabFrame::destruct() -> void {
if(Application::state.quit) return; //TODO: hack if(Application::state().quit) return; //TODO: hack
delete qtTabFrame; delete qtTabFrame;
qtWidget = qtTabFrame = nullptr; qtWidget = qtTabFrame = nullptr;
} }

View File

@ -3,7 +3,18 @@
namespace hiro { namespace hiro {
auto pTableViewColumn::construct() -> void { auto pTableViewColumn::construct() -> void {
if(auto header = _parent()) header->_setState(); if(auto parent = _parent()) {
auto lock = parent->acquire();
//parent->qtTableView->setAlternatingRowColors(parent->self().columnCount() >= 2);
parent->qtTableView->setColumnCount(parent->self().columnCount());
for(auto& column : parent->state().columns) {
if(auto delegate = column->self()) {
delegate->setIcon(delegate->state().icon);
delegate->setText(delegate->state().text); //also handles setSorting();
delegate->_setState();
}
}
}
} }
auto pTableViewColumn::destruct() -> void { auto pTableViewColumn::destruct() -> void {
@ -42,19 +53,31 @@ auto pTableViewColumn::setHorizontalAlignment(double alignment) -> void {
} }
auto pTableViewColumn::setIcon(const image& icon) -> void { auto pTableViewColumn::setIcon(const image& icon) -> void {
//unsupported if(auto parent = _parent()) {
parent->qtTableView->headerItem()->setIcon(self().offset(), CreateIcon(icon));
}
} }
auto pTableViewColumn::setResizable(bool resizable) -> void { auto pTableViewColumn::setResizable(bool resizable) -> void {
_setState(); _setState();
} }
auto pTableViewColumn::setSortable(bool sortable) -> void { auto pTableViewColumn::setSorting(Sort) -> void {
_setState(); if(auto parent = _parent()) {
string label = state().text;
if(state().sorting == Sort::Ascending ) label.append(" \u25b4");
if(state().sorting == Sort::Descending) label.append(" \u25be");
parent->qtTableView->headerItem()->setText(self().offset(), QString::fromUtf8(label));
}
} }
auto pTableViewColumn::setText(const string& text) -> void { auto pTableViewColumn::setText(const string&) -> void {
_setState(); if(auto parent = _parent()) {
string label = state().text;
if(state().sorting == Sort::Ascending ) label.append(" \u25b4");
if(state().sorting == Sort::Descending) label.append(" \u25be");
parent->qtTableView->headerItem()->setText(self().offset(), QString::fromUtf8(label));
}
} }
auto pTableViewColumn::setVerticalAlignment(double alignment) -> void { auto pTableViewColumn::setVerticalAlignment(double alignment) -> void {
@ -69,36 +92,26 @@ auto pTableViewColumn::setWidth(signed width) -> void {
_setState(); _setState();
} }
auto pTableViewColumn::_parent() -> maybe<pTableViewHeader&> { auto pTableViewColumn::_parent() -> maybe<pTableView&> {
if(auto parent = self().parentTableViewHeader()) { if(auto parent = self().parentTableView()) {
if(auto delegate = parent->self()) return *delegate; if(auto delegate = parent->self()) return *delegate;
} }
return nothing; return {};
} }
auto pTableViewColumn::_setState() -> void { auto pTableViewColumn::_setState() -> void {
if(auto header = _parent()) { if(auto parent = _parent()) {
if(auto parent = header->_parent()) { auto lock = parent->acquire();
auto lock = parent->acquire(); #if HIRO_QT==4
#if HIRO_QT==4 parent->qtTableView->header()->setResizeMode(self().offset(), state().resizable ? QHeaderView::Interactive : QHeaderView::Fixed);
parent->qtTableView->header()->setResizeMode(self().offset(), state().resizable ? QHeaderView::Interactive : QHeaderView::Fixed); #elif HIRO_QT==5
#elif HIRO_QT==5 parent->qtTableView->header()->setSectionResizeMode(self().offset(), state().resizable ? QHeaderView::Interactive : QHeaderView::Fixed);
parent->qtTableView->header()->setSectionResizeMode(self().offset(), state().resizable ? QHeaderView::Interactive : QHeaderView::Fixed); #endif
#endif parent->qtTableView->setColumnHidden(self().offset(), !self().visible());
bool clickable = false;
for(auto& column : header->state().columns) clickable |= column->state.sortable;
#if HIRO_QT==4
parent->qtTableView->header()->setClickable(clickable);
#elif HIRO_QT==5
parent->qtTableView->header()->setSectionsClickable(clickable);
#endif
parent->qtTableView->headerItem()->setText(self().offset(), QString::fromUtf8(state().text));
parent->qtTableView->setColumnHidden(self().offset(), !self().visible());
for(auto& item : parent->state().items) { for(auto& item : parent->state().items) {
if(auto cell = item->cell(self().offset())) { if(auto cell = item->cell(self().offset())) {
if(auto self = cell->self()) self->_setState(); if(auto self = cell->self()) self->_setState();
}
} }
} }
} }

View File

@ -15,13 +15,13 @@ struct pTableViewColumn : pObject {
auto setHorizontalAlignment(double alignment) -> void; auto setHorizontalAlignment(double alignment) -> void;
auto setIcon(const image& icon) -> void; auto setIcon(const image& icon) -> void;
auto setResizable(bool resizable) -> void; auto setResizable(bool resizable) -> void;
auto setSortable(bool sortable) -> void; auto setSorting(Sort sorting) -> void;
auto setText(const string& text) -> void; auto setText(const string& text) -> void;
auto setVerticalAlignment(double alignment) -> void; auto setVerticalAlignment(double alignment) -> void;
auto setVisible(bool visible) -> void; auto setVisible(bool visible) -> void;
auto setWidth(signed width) -> void; auto setWidth(signed width) -> void;
auto _parent() -> maybe<pTableViewHeader&>; auto _parent() -> maybe<pTableView&>;
auto _setState() -> void; auto _setState() -> void;
}; };

View File

@ -1,43 +0,0 @@
#if defined(Hiro_TableView)
namespace hiro {
auto pTableViewHeader::construct() -> void {
}
auto pTableViewHeader::destruct() -> void {
}
auto pTableViewHeader::append(sTableViewColumn column) -> void {
_setState();
}
auto pTableViewHeader::remove(sTableViewColumn column) -> void {
}
auto pTableViewHeader::setVisible(bool visible) -> void {
_setState();
}
auto pTableViewHeader::_parent() -> maybe<pTableView&> {
if(auto parent = self().parentTableView()) {
if(auto delegate = parent->self()) return *delegate;
}
return nothing;
}
auto pTableViewHeader::_setState() -> void {
if(auto parent = _parent()) {
auto lock = parent->acquire();
//parent->qtTableView->setAlternatingRowColors(self().columnCount() >= 2);
parent->qtTableView->setColumnCount(self().columnCount());
parent->qtTableView->setHeaderHidden(!self().visible());
for(auto& column : state().columns) {
if(auto self = column->self()) self->_setState();
}
}
}
}
#endif

View File

@ -1,18 +0,0 @@
#if defined(Hiro_TableView)
namespace hiro {
struct pTableViewHeader : pObject {
Declare(TableViewHeader, Object)
auto append(sTableViewColumn column) -> void;
auto remove(sTableViewColumn column) -> void;
auto setVisible(bool visible) -> void override;
auto _parent() -> maybe<pTableView&>;
auto _setState() -> void;
};
}
#endif

View File

@ -27,24 +27,21 @@ auto pTableView::construct() -> void {
setBatchable(state().batchable); setBatchable(state().batchable);
setBordered(state().bordered); setBordered(state().bordered);
setForegroundColor(state().foregroundColor); setForegroundColor(state().foregroundColor);
setHeadered(state().headered);
setSortable(state().sortable);
pWidget::construct(); pWidget::construct();
} }
auto pTableView::destruct() -> void { auto pTableView::destruct() -> void {
if(Application::state.quit) return; //TODO: hack if(Application::state().quit) return; //TODO: hack
delete qtTableViewDelegate; delete qtTableViewDelegate;
delete qtTableView; delete qtTableView;
qtWidget = qtTableView = nullptr; qtWidget = qtTableView = nullptr;
qtTableViewDelegate = nullptr; qtTableViewDelegate = nullptr;
} }
auto pTableView::append(sTableViewHeader header) -> void { auto pTableView::append(sTableViewColumn column) -> void {
lock();
if(auto self = header->self()) {
self->_setState();
}
unlock();
} }
auto pTableView::append(sTableViewItem item) -> void { auto pTableView::append(sTableViewItem item) -> void {
@ -56,44 +53,40 @@ auto pTableView::append(sTableViewItem item) -> void {
unlock(); unlock();
} }
auto pTableView::remove(sTableViewHeader header) -> void { auto pTableView::remove(sTableViewColumn column) -> void {
} }
auto pTableView::remove(sTableViewItem item) -> void { auto pTableView::remove(sTableViewItem item) -> void {
} }
auto pTableView::resizeColumns() -> void { auto pTableView::resizeColumns() -> void {
lock(); auto lock = acquire();
if(auto& header = state().header) { vector<signed> widths;
vector<signed> widths; signed minimumWidth = 0;
signed minimumWidth = 0; signed expandable = 0;
signed expandable = 0; for(auto column : range(self().columnCount())) {
for(auto column : range(header->columnCount())) { signed width = _width(column);
signed width = _width(column); widths.append(width);
widths.append(width); minimumWidth += width;
minimumWidth += width; if(self().column(column).expandable()) expandable++;
if(header->column(column).expandable()) expandable++;
}
signed maximumWidth = self().geometry().width() - 6;
if(auto scrollBar = qtTableView->verticalScrollBar()) {
if(scrollBar->isVisible()) maximumWidth -= scrollBar->geometry().width();
}
signed expandWidth = 0;
if(expandable && maximumWidth > minimumWidth) {
expandWidth = (maximumWidth - minimumWidth) / expandable;
}
for(auto column : range(header->columnCount())) {
signed width = widths[column];
if(header->column(column).expandable()) width += expandWidth;
qtTableView->setColumnWidth(column, width);
}
} }
unlock(); signed maximumWidth = self().geometry().width() - 6;
if(auto scrollBar = qtTableView->verticalScrollBar()) {
if(scrollBar->isVisible()) maximumWidth -= scrollBar->geometry().width();
}
signed expandWidth = 0;
if(expandable && maximumWidth > minimumWidth) {
expandWidth = (maximumWidth - minimumWidth) / expandable;
}
for(auto column : range(self().columnCount())) {
signed width = widths[column];
if(self().column(column).expandable()) width += expandWidth;
qtTableView->setColumnWidth(column, width);
}
} }
auto pTableView::setAlignment(Alignment alignment) -> void { auto pTableView::setAlignment(Alignment alignment) -> void {
@ -128,40 +121,48 @@ auto pTableView::setForegroundColor(Color color) -> void {
qtTableView->setAutoFillBackground((bool)color); qtTableView->setAutoFillBackground((bool)color);
} }
auto pTableView::setHeadered(bool headered) -> void {
qtTableView->setHeaderHidden(!headered);
}
auto pTableView::setSortable(bool sortable) -> void {
#if HIRO_QT==4
qtTableView->header()->setClickable(sortable);
#elif HIRO_QT==5
qtTableView->header()->setSectionsClickable(sortable);
#endif
}
//called on resize/show events //called on resize/show events
auto pTableView::_onSize() -> void { auto pTableView::_onSize() -> void {
//resize columns only if at least one column is expandable //resize columns only if at least one column is expandable
if(auto& header = state().header) { for(auto& column : state().columns) {
for(auto& column : header->state.columns) { if(column->expandable()) return resizeColumns();
if(column->expandable()) return resizeColumns();
}
} }
} }
auto pTableView::_width(unsigned column) -> unsigned { auto pTableView::_width(unsigned column) -> unsigned {
if(auto& header = state().header) { if(auto width = self().column(column).width()) return width;
if(auto width = header->column(column).width()) return width; unsigned width = 1;
unsigned width = 1; if(!self().column(column).visible()) return width;
if(!header->column(column).visible()) return width; if(state().headered) width = max(width, _widthOfColumn(column));
if(header->visible()) width = max(width, _widthOfColumn(column)); for(auto row : range(state().items.size())) {
for(auto row : range(state().items.size())) { width = max(width, _widthOfCell(row, column));
width = max(width, _widthOfCell(row, column));
}
return width;
} }
return 1; return width;
} }
auto pTableView::_widthOfColumn(unsigned _column) -> unsigned { auto pTableView::_widthOfColumn(unsigned _column) -> unsigned {
unsigned width = 8; unsigned width = 8;
if(auto& header = state().header) { if(auto column = self().column(_column)) {
if(auto column = header->column(_column)) { if(auto& icon = column->state.icon) {
if(auto& icon = column->state.icon) { width += icon.width() + 4;
width += icon.width() + 4; }
} if(auto& text = column->state.text) {
if(auto& text = column->state.text) { width += pFont::size(column->font(true), text).width();
width += pFont::size(column->font(true), text).width(); }
} if(column->state.sorting != Sort::None) {
width += 12;
} }
} }
return width; return width;
@ -204,10 +205,8 @@ auto QtTableView::onContext() -> void {
} }
auto QtTableView::onSort(int columnNumber) -> void { auto QtTableView::onSort(int columnNumber) -> void {
if(auto& header = p.state().header) { if(auto column = p.self().column(columnNumber)) {
if(auto column = header->column(columnNumber)) { if(!p.locked() && p.state().sortable) p.self().doSort(column);
if(!p.locked() && column.sortable()) p.self().doSort(column);
}
} }
} }

View File

@ -5,9 +5,9 @@ namespace hiro {
struct pTableView : pWidget { struct pTableView : pWidget {
Declare(TableView, Widget) Declare(TableView, Widget)
auto append(sTableViewHeader header) -> void; auto append(sTableViewColumn header) -> void;
auto append(sTableViewItem item) -> void; auto append(sTableViewItem item) -> void;
auto remove(sTableViewHeader header) -> void; auto remove(sTableViewColumn header) -> void;
auto remove(sTableViewItem item) -> void; auto remove(sTableViewItem item) -> void;
auto resizeColumns() -> void; auto resizeColumns() -> void;
auto setAlignment(Alignment alignment) -> void; auto setAlignment(Alignment alignment) -> void;
@ -15,6 +15,8 @@ struct pTableView : pWidget {
auto setBatchable(bool batchable) -> void; auto setBatchable(bool batchable) -> void;
auto setBordered(bool bordered) -> void; auto setBordered(bool bordered) -> void;
auto setForegroundColor(Color color) -> void; auto setForegroundColor(Color color) -> void;
auto setHeadered(bool headered) -> void;
auto setSortable(bool sortable) -> void;
auto _onSize() -> void; auto _onSize() -> void;
auto _width(unsigned column) -> unsigned; auto _width(unsigned column) -> unsigned;

View File

@ -13,7 +13,7 @@ auto pTextEdit::construct() -> void {
} }
auto pTextEdit::destruct() -> void { auto pTextEdit::destruct() -> void {
if(Application::state.quit) return; //TODO: hack if(Application::state().quit) return; //TODO: hack
delete qtTextEdit; delete qtTextEdit;
qtWidget = qtTextEdit = nullptr; qtWidget = qtTextEdit = nullptr;
} }

View File

@ -7,7 +7,7 @@ auto pWindow::construct() -> void {
qtWindow->setWindowTitle(" "); qtWindow->setWindowTitle(" ");
//if program was given a name, try and set the window taskbar icon to a matching pixmap image //if program was given a name, try and set the window taskbar icon to a matching pixmap image
if(auto name = Application::state.name) { if(auto name = Application::state().name) {
if(file::exists({Path::user(), ".local/share/icons/", name, ".png"})) { if(file::exists({Path::user(), ".local/share/icons/", name, ".png"})) {
qtWindow->setWindowIcon(QIcon(QString::fromUtf8(string{Path::user(), ".local/share/icons/", name, ".png"}))); qtWindow->setWindowIcon(QIcon(QString::fromUtf8(string{Path::user(), ".local/share/icons/", name, ".png"})));
} else if(file::exists({"/usr/local/share/pixmaps/", name, ".png"})) { } else if(file::exists({"/usr/local/share/pixmaps/", name, ".png"})) {
@ -44,7 +44,7 @@ auto pWindow::construct() -> void {
} }
auto pWindow::destruct() -> void { auto pWindow::destruct() -> void {
if(Application::state.quit) return; //TODO: hack if(Application::state().quit) return; //TODO: hack
delete qtStatusBar; delete qtStatusBar;
delete qtContainer; delete qtContainer;
delete qtMenuBar; delete qtMenuBar;
@ -189,8 +189,8 @@ auto pWindow::setModal(bool modal) -> void {
setVisible(false); setVisible(false);
qtWindow->setWindowModality(Qt::ApplicationModal); qtWindow->setWindowModality(Qt::ApplicationModal);
setVisible(true); setVisible(true);
while(!Application::state.quit && state().modal) { while(!Application::state().quit && state().modal) {
if(Application::state.onMain) { if(Application::state().onMain) {
Application::doMain(); Application::doMain();
} else { } else {
usleep(20 * 1000); usleep(20 * 1000);
@ -217,13 +217,12 @@ auto pWindow::setTitle(const string& text) -> void {
} }
auto pWindow::setVisible(bool visible) -> void { auto pWindow::setVisible(bool visible) -> void {
lock(); auto lock = acquire();
qtWindow->setVisible(visible); qtWindow->setVisible(visible);
if(visible) { if(visible) {
_updateFrameGeometry(); _updateFrameGeometry();
setGeometry(state().geometry); setGeometry(state().geometry);
} }
unlock();
} }
auto pWindow::_append(mWidget& widget) -> void { auto pWindow::_append(mWidget& widget) -> void {

View File

@ -1,6 +1,8 @@
#include "resource.hpp"
namespace Icon { namespace Icon {
namespace Action { namespace Action {
const nall::vector<uint8_t> Add = { //size: 323 const unsigned char Add[323] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,214,1,11,16,0,17,148,68,120,161,0,0,0,208,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,214,1,11,16,0,17,148,68,120,161,0,0,0,208,73,
@ -13,7 +15,7 @@ const nall::vector<uint8_t> Add = { //size: 323
243,217,244,107,103,140,137,170,181,79,182,21,127,155,61,84,114,75,11,139,178,119,142,0,0,0,0,73,69,78,68,174, 243,217,244,107,103,140,137,170,181,79,182,21,127,155,61,84,114,75,11,139,178,119,142,0,0,0,0,73,69,78,68,174,
66,96,130, 66,96,130,
}; };
const nall::vector<uint8_t> Attach = { //size: 649 const unsigned char Attach[649] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,27,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,27,73,68,65,84,56,141,
@ -36,7 +38,7 @@ const nall::vector<uint8_t> Attach = { //size: 649
106,179,62,2,12,83,155,131,52,48,11,220,5,194,1,127,176,172,4,126,1,41,32,186,81,242,76,218,213,0,0,0, 106,179,62,2,12,83,155,131,52,48,11,220,5,194,1,127,176,172,4,126,1,41,32,186,81,242,76,218,213,0,0,0,
0,73,69,78,68,174,66,96,130, 0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Bookmark = { //size: 686 const unsigned char Bookmark[686] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,17,21,6,52,65,49,61,207,0,0,2,59,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,17,21,6,52,65,49,61,207,0,0,2,59,73,
@ -60,7 +62,7 @@ const nall::vector<uint8_t> Bookmark = { //size: 686
221,234,14,26,128,72,36,194,78,163,215,90,127,221,211,211,211,189,147,194,104,52,218,7,240,7,70,86,184,198,50,151, 221,234,14,26,128,72,36,194,78,163,215,90,127,221,211,211,211,189,147,194,104,52,218,7,240,7,70,86,184,198,50,151,
228,191,0,0,0,0,73,69,78,68,174,66,96,130, 228,191,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> FullScreen = { //size: 650 const unsigned char FullScreen[650] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,214,3,16,19,13,53,226,119,223,154,0,0,0,53,116, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,214,3,16,19,13,53,226,119,223,154,0,0,0,53,116,
@ -83,7 +85,7 @@ const nall::vector<uint8_t> FullScreen = { //size: 650
234,217,110,100,141,226,182,80,40,220,28,142,15,157,110,102,151,243,185,252,173,21,142,211,185,159,81,219,35,189,0,0, 234,217,110,100,141,226,182,80,40,220,28,142,15,157,110,102,151,243,185,252,173,21,142,211,185,159,81,219,35,189,0,0,
0,0,73,69,78,68,174,66,96,130, 0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Mute = { //size: 632 const unsigned char Mute[632] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,10,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,10,73,68,65,84,56,141,
@ -105,7 +107,7 @@ const nall::vector<uint8_t> Mute = { //size: 632
4,13,209,40,149,189,61,154,122,123,169,236,238,82,45,149,216,5,255,92,0,192,188,82,47,66,120,122,218,151,51,227, 4,13,209,40,149,189,61,154,122,123,169,236,238,82,45,149,216,5,255,92,0,192,188,82,47,66,120,122,218,151,51,227,
91,48,254,11,41,211,229,38,66,238,34,57,0,0,0,0,73,69,78,68,174,66,96,130, 91,48,254,11,41,211,229,38,66,238,34,57,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> New = { //size: 477 const unsigned char New[477] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,252,0,233,0,79,52,215,177,13,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,252,0,233,0,79,52,215,177,13,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,2,18,14,38,28,211,182,25,41,0,0,1,106,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,2,18,14,38,28,211,182,25,41,0,0,1,106,73,
@ -122,7 +124,7 @@ const nall::vector<uint8_t> New = { //size: 477
123,17,134,57,120,136,124,199,193,176,165,193,217,176,29,51,169,221,177,17,114,185,28,143,129,139,227,248,67,146,36,197, 123,17,134,57,120,136,124,199,193,176,165,193,217,176,29,51,169,221,177,17,114,185,28,143,129,139,227,248,67,146,36,197,
127,33,197,113,252,158,255,133,43,204,61,153,96,123,172,20,201,0,0,0,0,73,69,78,68,174,66,96,130, 127,33,197,113,252,158,255,133,43,204,61,153,96,123,172,20,201,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Open = { //size: 672 const unsigned char Open[672] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13,
215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99, 215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,
@ -145,7 +147,7 @@ const nall::vector<uint8_t> Open = { //size: 672
136,187,7,119,103,109,163,245,96,94,127,90,173,63,207,113,216,217,217,5,145,175,33,23,237,179,83,75,29,119,192,89, 136,187,7,119,103,109,163,245,96,94,127,90,173,63,207,113,216,217,217,5,145,175,33,23,237,179,83,75,29,119,192,89,
94,90,251,175,195,180,188,108,100,228,222,111,248,2,75,29,117,50,217,195,0,0,0,0,73,69,78,68,174,66,96,130, 94,90,251,175,195,180,188,108,100,228,222,111,248,2,75,29,117,50,217,195,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Properties = { //size: 464 const unsigned char Properties[464] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,11,4,10,21,27,198,210,43,84,0,0,1,93,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,11,4,10,21,27,198,210,43,84,0,0,1,93,73,
@ -162,7 +164,7 @@ const nall::vector<uint8_t> Properties = { //size: 464
135,118,45,211,52,41,151,203,41,63,11,96,219,246,207,96,48,120,125,230,43,218,182,253,201,127,232,15,224,142,163,230, 135,118,45,211,52,41,151,203,41,63,11,96,219,246,207,96,48,120,125,230,43,218,182,253,201,127,232,15,224,142,163,230,
109,49,155,36,0,0,0,0,73,69,78,68,174,66,96,130, 109,49,155,36,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Quit = { //size: 799 const unsigned char Quit[799] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13,
215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99, 215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,
@ -189,7 +191,7 @@ const nall::vector<uint8_t> Quit = { //size: 799
109,189,252,188,173,151,247,239,107,204,204,204,44,25,248,190,127,234,234,181,43,35,181,90,21,17,97,236,209,216,55,235, 109,189,252,188,173,151,247,239,107,204,204,204,44,25,248,190,127,234,234,181,43,35,181,90,21,17,97,236,209,216,55,235,
252,117,57,231,8,130,224,15,32,253,31,63,61,253,93,147,0,165,101,0,0,0,0,73,69,78,68,174,66,96,130, 252,117,57,231,8,130,224,15,32,253,31,63,61,253,93,147,0,165,101,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Refresh = { //size: 912 const unsigned char Refresh[912] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,3,34,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,3,34,73,68,65,84,56,141,
@ -220,7 +222,7 @@ const nall::vector<uint8_t> Refresh = { //size: 912
3,192,123,13,134,182,87,49,111,144,82,197,13,93,155,33,194,80,213,145,135,108,203,252,219,15,247,127,46,85,118,106, 3,192,123,13,134,182,87,49,111,144,82,197,13,93,155,33,194,80,213,145,135,108,203,252,219,15,247,127,46,85,118,106,
19,101,204,198,0,0,0,0,73,69,78,68,174,66,96,130, 19,101,204,198,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Remove = { //size: 247 const unsigned char Remove[247] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,214,1,11,15,59,34,0,92,18,194,0,0,0,132,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,214,1,11,15,59,34,0,92,18,194,0,0,0,132,73,
@ -230,7 +232,7 @@ const nall::vector<uint8_t> Remove = { //size: 247
20,208,125,60,239,182,71,2,51,97,130,126,16,222,139,175,9,51,56,199,209,74,28,10,154,71,94,109,62,225,248,254, 20,208,125,60,239,182,71,2,51,97,130,126,16,222,139,175,9,51,56,199,209,74,28,10,154,71,94,109,62,225,248,254,
63,241,3,172,83,45,219,70,228,128,216,0,0,0,0,73,69,78,68,174,66,96,130, 63,241,3,172,83,45,219,70,228,128,216,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Save = { //size: 911 const unsigned char Save[911] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,11,10,13,55,15,158,42,216,191,0,0,0,140,116, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,11,10,13,55,15,158,42,216,191,0,0,0,140,116,
@ -261,7 +263,7 @@ const nall::vector<uint8_t> Save = { //size: 911
237,120,93,28,165,20,241,186,58,148,82,44,137,70,115,150,3,169,142,228,25,224,52,255,167,206,95,147,59,51,76,213, 237,120,93,28,165,20,241,186,58,148,82,44,137,70,115,150,3,169,142,228,25,224,52,255,167,206,95,147,59,51,76,213,
34,98,109,0,0,0,0,73,69,78,68,174,66,96,130, 34,98,109,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Search = { //size: 935 const unsigned char Search[935] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,6,29,17,18,8,200,223,108,120,0,0,3,52,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,6,29,17,18,8,200,223,108,120,0,0,3,52,73,
@ -293,7 +295,7 @@ const nall::vector<uint8_t> Search = { //size: 935
185,206,1,0,90,91,91,91,84,205,242,195,220,238,67,248,191,122,9,59,169,102,147,104,79,162,5,0,0,0,0,73, 185,206,1,0,90,91,91,91,84,205,242,195,220,238,67,248,191,122,9,59,169,102,147,104,79,162,5,0,0,0,0,73,
69,78,68,174,66,96,130, 69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Settings = { //size: 611 const unsigned char Settings[611] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,9,26,12,19,57,139,99,194,72,0,0,1,240,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,9,26,12,19,57,139,99,194,72,0,0,1,240,73,
@ -315,7 +317,7 @@ const nall::vector<uint8_t> Settings = { //size: 611
210,190,66,48,146,186,4,76,56,184,219,196,59,225,55,55,226,213,246,234,188,84,188,0,0,0,0,73,69,78,68,174, 210,190,66,48,146,186,4,76,56,184,219,196,59,225,55,55,226,213,246,234,188,84,188,0,0,0,0,73,69,78,68,174,
66,96,130, 66,96,130,
}; };
const nall::vector<uint8_t> Stop = { //size: 820 const unsigned char Stop[820] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,17,23,45,13,107,192,156,192,0,0,2,193,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,17,23,45,13,107,192,156,192,0,0,2,193,73,
@ -345,7 +347,7 @@ const nall::vector<uint8_t> Stop = { //size: 820
}; };
} }
namespace Application { namespace Application {
const nall::vector<uint8_t> Browser = { //size: 928 const unsigned char Browser[928] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,26,7,44,7,230,25,222,143,0,0,0,53,116, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,26,7,44,7,230,25,222,143,0,0,0,53,116,
@ -376,7 +378,7 @@ const nall::vector<uint8_t> Browser = { //size: 928
59,197,235,66,151,199,31,218,194,61,250,6,198,204,23,78,156,158,213,173,192,139,232,178,15,132,80,202,239,168,78,123, 59,197,235,66,151,199,31,218,194,61,250,6,198,204,23,78,156,158,213,173,192,139,232,178,15,132,80,202,239,168,78,123,
93,9,237,179,175,63,153,62,195,255,205,223,112,108,55,247,49,218,29,149,0,0,0,0,73,69,78,68,174,66,96,130, 93,9,237,179,175,63,153,62,195,255,205,223,112,108,55,247,49,218,29,149,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Calculator = { //size: 686 const unsigned char Calculator[686] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,6,6,13,47,29,93,206,74,167,0,0,0,53,116, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,6,6,13,47,29,93,206,74,167,0,0,0,53,116,
@ -400,7 +402,7 @@ const nall::vector<uint8_t> Calculator = { //size: 686
65,128,70,132,189,189,47,124,255,241,141,195,232,96,16,114,31,80,174,86,55,206,252,157,255,0,132,92,203,16,0,89, 65,128,70,132,189,189,47,124,255,241,141,195,232,96,16,114,31,80,174,86,55,206,252,157,255,0,132,92,203,16,0,89,
204,210,0,0,0,0,73,69,78,68,174,66,96,130, 204,210,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Calendar = { //size: 603 const unsigned char Calendar[603] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,251,0,251,0,251,85,89,109,150,0,0,0,9,112,72,89,115,0,0,11,18,0, 97,0,0,0,6,98,75,71,68,0,251,0,251,0,251,85,89,109,150,0,0,0,9,112,72,89,115,0,0,11,18,0,
0,11,18,1,210,221,126,252,0,0,0,7,116,73,77,69,7,213,6,3,15,29,43,75,94,175,19,0,0,0,62,116, 0,11,18,1,210,221,126,252,0,0,0,7,116,73,77,69,7,213,6,3,15,29,43,75,94,175,19,0,0,0,62,116,
@ -421,7 +423,7 @@ const nall::vector<uint8_t> Calendar = { //size: 603
40,20,46,128,135,135,63,108,183,91,42,149,202,139,197,225,8,12,13,124,144,219,239,155,27,224,235,253,253,239,55,255, 40,20,46,128,135,135,63,108,183,91,42,149,202,139,197,225,8,12,13,124,144,219,239,155,27,224,235,253,253,239,55,255,
145,63,127,253,184,249,11,104,130,125,246,45,41,107,239,0,0,0,0,73,69,78,68,174,66,96,130, 145,63,127,253,184,249,11,104,130,125,246,45,41,107,239,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Chat = { //size: 422 const unsigned char Chat[422] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,6,6,13,5,59,224,168,3,114,0,0,1,51,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,6,6,13,5,59,224,168,3,114,0,0,1,51,73,
@ -437,7 +439,7 @@ const nall::vector<uint8_t> Chat = { //size: 422
165,115,93,248,243,71,0,172,22,178,122,77,213,130,72,51,210,15,141,12,145,160,100,148,198,107,0,0,0,0,73,69, 165,115,93,248,243,71,0,172,22,178,122,77,213,130,72,51,210,15,141,12,145,160,100,148,198,107,0,0,0,0,73,69,
78,68,174,66,96,130, 78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> FileManager = { //size: 378 const unsigned char FileManager[378] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,6,16,18,41,48,44,67,93,90,0,0,1,7,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,6,16,18,41,48,44,67,93,90,0,0,1,7,73,
@ -451,7 +453,7 @@ const nall::vector<uint8_t> FileManager = { //size: 378
48,33,96,236,43,155,27,135,99,131,212,123,164,82,164,222,231,62,208,56,39,90,59,107,247,139,11,254,76,235,218,84, 48,33,96,236,43,155,27,135,99,131,212,123,164,82,164,222,231,62,208,56,39,90,59,107,247,139,11,254,76,235,218,84,
7,231,146,194,8,95,134,90,101,183,231,143,210,134,0,0,0,0,73,69,78,68,174,66,96,130, 7,231,146,194,8,95,134,90,101,183,231,143,210,134,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Mail = { //size: 550 const unsigned char Mail[550] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,18,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,18,0,
0,11,18,1,210,221,126,252,0,0,0,7,116,73,77,69,7,213,6,6,12,23,54,231,47,101,43,0,0,1,179,73, 0,11,18,1,210,221,126,252,0,0,0,7,116,73,77,69,7,213,6,6,12,23,54,231,47,101,43,0,0,1,179,73,
@ -471,7 +473,7 @@ const nall::vector<uint8_t> Mail = { //size: 550
145,82,6,2,134,199,198,71,251,254,227,142,134,143,228,26,183,0,252,253,172,100,78,184,216,168,0,0,0,0,73,69, 145,82,6,2,134,199,198,71,251,254,227,142,134,143,228,26,183,0,252,253,172,100,78,184,216,168,0,0,0,0,73,69,
78,68,174,66,96,130, 78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Monitor = { //size: 611 const unsigned char Monitor[611] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,19,17,58,52,159,194,36,103,0,0,1,240,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,19,17,58,52,159,194,36,103,0,0,1,240,73,
@ -493,7 +495,7 @@ const nall::vector<uint8_t> Monitor = { //size: 611
81,95,135,73,96,122,114,242,198,246,127,227,255,230,39,112,67,0,83,217,168,244,129,0,0,0,0,73,69,78,68,174, 81,95,135,73,96,122,114,242,198,246,127,227,255,230,39,112,67,0,83,217,168,244,129,0,0,0,0,73,69,78,68,174,
66,96,130, 66,96,130,
}; };
const nall::vector<uint8_t> Terminal = { //size: 668 const unsigned char Terminal[668] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,18,21,37,27,70,252,216,25,0,0,2,41,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,18,21,37,27,70,252,216,25,0,0,2,41,73,
@ -516,7 +518,7 @@ const nall::vector<uint8_t> Terminal = { //size: 668
89,41,104,224,105,32,226,239,228,151,190,147,205,205,95,54,198,100,180,214,149,81,54,166,12,217,30,101,173,53,70,155, 89,41,104,224,105,32,226,239,228,151,190,147,205,205,95,54,198,100,180,214,149,81,54,166,12,217,30,101,173,53,70,155,
216,88,59,36,34,247,254,2,215,162,130,23,152,77,245,29,0,0,0,0,73,69,78,68,174,66,96,130, 216,88,59,36,34,247,254,2,215,162,130,23,152,77,245,29,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> TextEditor = { //size: 574 const unsigned char TextEditor[574] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,9,22,18,55,41,59,82,2,72,0,0,1,203,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,9,22,18,55,41,59,82,2,72,0,0,1,203,73,
@ -538,7 +540,7 @@ const nall::vector<uint8_t> TextEditor = { //size: 574
}; };
} }
namespace Device { namespace Device {
const nall::vector<uint8_t> Clock = { //size: 897 const unsigned char Clock[897] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,9,15,8,58,5,128,132,46,85,0,0,3,14,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,9,15,8,58,5,128,132,46,85,0,0,3,14,73,
@ -569,7 +571,7 @@ const nall::vector<uint8_t> Clock = { //size: 897
155,26,40,3,171,64,22,40,0,234,182,248,95,201,36,100,6,22,194,54,223,0,0,0,0,73,69,78,68,174,66,96, 155,26,40,3,171,64,22,40,0,234,182,248,95,201,36,100,6,22,194,54,223,0,0,0,0,73,69,78,68,174,66,96,
130, 130,
}; };
const nall::vector<uint8_t> Display = { //size: 662 const unsigned char Display[662] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13,
215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99, 215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,
@ -592,7 +594,7 @@ const nall::vector<uint8_t> Display = { //size: 662
135,191,179,49,102,164,222,172,63,109,70,205,107,214,154,51,128,22,161,248,50,240,131,197,222,110,255,158,136,196,127,190, 135,191,179,49,102,164,222,172,63,109,70,205,107,214,154,51,128,22,161,248,50,240,131,197,222,110,255,158,136,196,127,190,
255,5,119,143,242,70,185,147,13,30,0,0,0,0,73,69,78,68,174,66,96,130, 255,5,119,143,242,70,185,147,13,30,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Joypad = { //size: 812 const unsigned char Joypad[812] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,172,0,77,0,0,52,214,215,123,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,172,0,77,0,0,52,214,215,123,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,7,15,10,39,178,201,163,153,0,0,0,140,116, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,7,15,10,39,178,201,163,153,0,0,0,140,116,
@ -620,7 +622,7 @@ const nall::vector<uint8_t> Joypad = { //size: 812
36,210,68,2,168,86,171,0,212,106,181,142,6,142,227,120,70,237,70,121,7,53,251,31,168,192,0,159,97,230,172,204, 36,210,68,2,168,86,171,0,212,106,181,142,6,142,227,120,70,237,70,121,7,53,251,31,168,192,0,159,97,230,172,204,
0,0,0,0,73,69,78,68,174,66,96,130, 0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Keyboard = { //size: 587 const unsigned char Keyboard[587] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13,
215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99, 215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,
@ -641,7 +643,7 @@ const nall::vector<uint8_t> Keyboard = { //size: 587
233,179,39,90,169,225,157,236,156,3,199,55,24,112,226,191,98,104,31,252,55,129,95,252,113,137,228,164,151,154,151,0, 233,179,39,90,169,225,157,236,156,3,199,55,24,112,226,191,98,104,31,252,55,129,95,252,113,137,228,164,151,154,151,0,
0,0,0,73,69,78,68,174,66,96,130, 0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Microphone = { //size: 703 const unsigned char Microphone[703] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,234,0,234,0,234,127,141,58,17,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,234,0,234,0,234,127,141,58,17,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,11,3,22,42,33,208,235,186,119,0,0,2,76,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,11,3,22,42,33,208,235,186,119,0,0,2,76,73,
@ -665,7 +667,7 @@ const nall::vector<uint8_t> Microphone = { //size: 703
18,224,0,108,255,149,178,178,189,53,221,114,177,133,220,122,14,41,20,190,121,148,194,128,167,127,170,238,95,0,34,78, 18,224,0,108,255,149,178,178,189,53,221,114,177,133,220,122,14,41,20,190,121,148,194,128,167,127,170,238,95,0,34,78,
167,235,92,197,218,49,136,84,79,254,0,227,216,1,121,79,52,137,54,0,0,0,0,73,69,78,68,174,66,96,130, 167,235,92,197,218,49,136,84,79,254,0,227,216,1,121,79,52,137,54,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Mouse = { //size: 720 const unsigned char Mouse[720] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,8,13,24,4,51,189,102,0,0,0,0,53,116, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,8,13,24,4,51,189,102,0,0,0,0,53,116,
@ -690,7 +692,7 @@ const nall::vector<uint8_t> Mouse = { //size: 720
110,4,168,85,171,213,187,147,19,227,143,38,39,198,47,3,87,26,116,149,1,174,2,107,135,47,254,2,161,171,0,195, 110,4,168,85,171,213,187,147,19,227,143,38,39,198,47,3,87,26,116,149,1,174,2,107,135,47,254,2,161,171,0,195,
167,31,206,166,0,0,0,0,73,69,78,68,174,66,96,130, 167,31,206,166,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Network = { //size: 408 const unsigned char Network[408] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,18,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,18,0,
0,11,18,1,210,221,126,252,0,0,0,7,116,73,77,69,7,214,2,16,22,3,20,11,54,9,17,0,0,1,37,73, 0,11,18,1,210,221,126,252,0,0,0,7,116,73,77,69,7,214,2,16,22,3,20,11,54,9,17,0,0,1,37,73,
@ -705,7 +707,7 @@ const nall::vector<uint8_t> Network = { //size: 408
199,235,186,214,31,127,222,182,183,118,118,139,2,172,141,245,77,194,48,204,157,76,88,129,194,0,124,223,231,191,146,101, 199,235,186,214,31,127,222,182,183,118,118,139,2,172,141,245,77,194,48,204,157,76,88,129,194,0,124,223,231,191,146,101,
124,85,244,9,241,192,132,130,214,14,135,66,0,0,0,0,73,69,78,68,174,66,96,130, 124,85,244,9,241,192,132,130,214,14,135,66,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Optical = { //size: 720 const unsigned char Optical[720] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,5,17,7,21,115,1,202,165,0,0,0,140,116, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,5,17,7,21,115,1,202,165,0,0,0,140,116,
@ -730,7 +732,7 @@ const nall::vector<uint8_t> Optical = { //size: 720
108,110,221,190,115,107,169,16,28,123,110,89,214,221,185,213,87,125,45,34,91,27,213,205,111,217,250,63,189,144,236,196, 108,110,221,190,115,107,169,16,28,123,110,89,214,221,185,213,87,125,45,34,91,27,213,205,111,217,250,63,189,144,236,196,
0,156,143,39,0,0,0,0,73,69,78,68,174,66,96,130, 0,156,143,39,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Printer = { //size: 481 const unsigned char Printer[481] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,17,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,17,0,
0,11,17,1,127,100,95,145,0,0,0,7,116,73,77,69,7,213,8,18,15,53,11,122,248,175,234,0,0,1,110,73, 0,11,17,1,127,100,95,145,0,0,0,7,116,73,77,69,7,213,8,18,15,53,11,122,248,175,234,0,0,1,110,73,
@ -748,7 +750,7 @@ const nall::vector<uint8_t> Printer = { //size: 481
151,1,120,188,189,187,57,253,194,111,126,252,0,186,104,203,229,25,65,188,29,0,0,0,0,73,69,78,68,174,66,96, 151,1,120,188,189,187,57,253,194,111,126,252,0,186,104,203,229,25,65,188,29,0,0,0,0,73,69,78,68,174,66,96,
130, 130,
}; };
const nall::vector<uint8_t> Speaker = { //size: 592 const unsigned char Speaker[592] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,1,226,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,1,226,73,68,65,84,56,141,
@ -769,7 +771,7 @@ const nall::vector<uint8_t> Speaker = { //size: 592
189,213,106,245,219,30,160,51,196,78,213,106,181,231,56,115,222,247,253,100,191,254,95,55,56,136,126,0,228,148,200,42, 189,213,106,245,219,30,160,51,196,78,213,106,181,231,56,115,222,247,253,100,191,254,95,55,56,136,126,0,228,148,200,42,
201,231,90,24,0,0,0,0,73,69,78,68,174,66,96,130, 201,231,90,24,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Storage = { //size: 603 const unsigned char Storage[603] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,5,15,53,8,235,207,124,119,0,0,0,140,116, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,5,15,53,8,235,207,124,119,0,0,0,140,116,
@ -792,7 +794,7 @@ const nall::vector<uint8_t> Storage = { //size: 603
}; };
} }
namespace Edit { namespace Edit {
const nall::vector<uint8_t> Clear = { //size: 773 const unsigned char Clear[773] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,151,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,151,73,68,65,84,56,141,
@ -819,7 +821,7 @@ const nall::vector<uint8_t> Clear = { //size: 773
45,83,138,62,165,16,224,154,181,156,76,56,242,120,254,220,75,126,7,67,8,40,132,18,218,0,0,0,0,73,69,78, 45,83,138,62,165,16,224,154,181,156,76,56,242,120,254,220,75,126,7,67,8,40,132,18,218,0,0,0,0,73,69,78,
68,174,66,96,130, 68,174,66,96,130,
}; };
const nall::vector<uint8_t> Copy = { //size: 498 const unsigned char Copy[498] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,26,20,8,47,131,20,52,155,0,0,1,127,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,26,20,8,47,131,20,52,155,0,0,1,127,73,
@ -837,7 +839,7 @@ const nall::vector<uint8_t> Copy = { //size: 498
221,22,167,18,177,228,28,233,21,31,30,167,179,166,105,46,121,125,172,191,42,0,40,36,98,201,29,0,248,5,66,89, 221,22,167,18,177,228,28,233,21,31,30,167,179,166,105,46,121,125,172,191,42,0,40,36,98,201,29,0,248,5,66,89,
166,3,21,136,247,216,0,0,0,0,73,69,78,68,174,66,96,130, 166,3,21,136,247,216,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Cut = { //size: 807 const unsigned char Cut[807] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,28,22,29,49,104,65,100,94,0,0,2,180,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,28,22,29,49,104,65,100,94,0,0,2,180,73,
@ -865,7 +867,7 @@ const nall::vector<uint8_t> Cut = { //size: 807
55,16,200,241,135,195,26,95,36,226,83,168,84,231,173,162,232,254,13,160,243,58,7,220,52,193,60,0,0,0,0,73, 55,16,200,241,135,195,26,95,36,226,83,168,84,231,173,162,232,254,13,160,243,58,7,220,52,193,60,0,0,0,0,73,
69,78,68,174,66,96,130, 69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Delete = { //size: 680 const unsigned char Delete[680] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,141,0,142,0,139,33,244,163,126,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,141,0,142,0,139,33,244,163,126,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,214,6,19,15,29,9,72,179,203,198,0,0,0,15,116, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,214,6,19,15,29,9,72,179,203,198,0,0,0,15,116,
@ -889,7 +891,7 @@ const nall::vector<uint8_t> Delete = { //size: 680
60,73,164,146,51,68,32,16,152,185,61,159,253,206,178,220,134,9,248,9,228,204,195,8,165,247,44,101,0,0,0,0, 60,73,164,146,51,68,32,16,152,185,61,159,253,206,178,220,134,9,248,9,228,204,195,8,165,247,44,101,0,0,0,0,
73,69,78,68,174,66,96,130, 73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Find = { //size: 617 const unsigned char Find[617] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,240,0,240,0,239,52,6,103,27,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,240,0,240,0,239,52,6,103,27,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,11,5,16,15,5,37,253,173,47,0,0,1,246,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,11,5,16,15,5,37,253,173,47,0,0,1,246,73,
@ -911,7 +913,7 @@ const nall::vector<uint8_t> Find = { //size: 617
43,130,127,68,44,30,149,13,145,255,18,0,148,88,60,106,1,148,13,131,191,6,140,246,211,127,51,231,46,0,0,0, 43,130,127,68,44,30,149,13,145,255,18,0,148,88,60,106,1,148,13,131,191,6,140,246,211,127,51,231,46,0,0,0,
0,73,69,78,68,174,66,96,130, 0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Paste = { //size: 561 const unsigned char Paste[561] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213, 97,0,0,0,9,112,72,89,115,0,0,11,19,0,0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,
10,14,0,28,21,175,226,241,24,0,0,1,208,73,68,65,84,56,203,149,147,177,107,83,81,20,198,127,247,189,52,130, 10,14,0,28,21,175,226,241,24,0,0,1,208,73,68,65,84,56,203,149,147,177,107,83,81,20,198,127,247,189,52,130,
@ -931,7 +933,7 @@ const nall::vector<uint8_t> Paste = { //size: 561
3,0,36,181,138,49,102,83,85,59,6,96,225,92,247,26,49,140,51,130,84,187,215,248,228,21,75,127,1,79,230,225, 3,0,36,181,138,49,102,83,85,59,6,96,225,92,247,26,49,140,51,130,84,187,215,248,228,21,75,127,1,79,230,225,
152,120,105,196,218,0,0,0,0,73,69,78,68,174,66,96,130, 152,120,105,196,218,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Redo = { //size: 591 const unsigned char Redo[591] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,214,7,26,10,39,21,63,184,237,33,0,0,1,220,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,214,7,26,10,39,21,63,184,237,33,0,0,1,220,73,
@ -952,7 +954,7 @@ const nall::vector<uint8_t> Redo = { //size: 591
175,59,118,63,127,36,184,137,35,192,2,80,5,54,158,36,221,239,2,188,249,69,167,243,47,131,223,215,75,186,5,94, 175,59,118,63,127,36,184,137,35,192,2,80,5,54,158,36,221,239,2,188,249,69,167,243,47,131,223,215,75,186,5,94,
207,53,222,0,0,0,0,73,69,78,68,174,66,96,130, 207,53,222,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Replace = { //size: 776 const unsigned char Replace[776] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,214,1,6,22,4,3,245,118,104,130,0,0,2,149,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,214,1,6,22,4,3,245,118,104,130,0,0,2,149,73,
@ -979,7 +981,7 @@ const nall::vector<uint8_t> Replace = { //size: 776
237,66,136,9,83,20,75,146,156,127,135,199,227,105,7,114,252,15,253,6,121,205,27,12,206,189,173,89,0,0,0,0, 237,66,136,9,83,20,75,146,156,127,135,199,227,105,7,114,252,15,253,6,121,205,27,12,206,189,173,89,0,0,0,0,
73,69,78,68,174,66,96,130, 73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Undo = { //size: 650 const unsigned char Undo[650] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,214,7,26,10,14,0,22,35,150,33,0,0,2,23,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,214,7,26,10,14,0,22,35,150,33,0,0,2,23,73,
@ -1004,7 +1006,7 @@ const nall::vector<uint8_t> Undo = { //size: 650
}; };
} }
namespace Emblem { namespace Emblem {
const nall::vector<uint8_t> Archive = { //size: 540 const unsigned char Archive[540] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,6,16,18,24,9,181,27,210,224,0,0,1,169,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,6,16,18,24,9,181,27,210,224,0,0,1,169,73,
@ -1023,7 +1025,7 @@ const nall::vector<uint8_t> Archive = { //size: 540
17,224,74,61,216,46,1,169,251,93,7,113,149,224,123,255,32,205,247,17,130,252,2,176,229,107,211,19,199,207,108,102, 17,224,74,61,216,46,1,169,251,93,7,113,149,224,123,255,32,205,247,17,130,252,2,176,229,107,211,19,199,207,108,102,
252,95,19,189,193,255,176,111,224,210,135,204,19,41,165,180,0,0,0,0,73,69,78,68,174,66,96,130, 252,95,19,189,193,255,176,111,224,210,135,204,19,41,165,180,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Audio = { //size: 688 const unsigned char Audio[688] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13,
215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99, 215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,
@ -1047,7 +1049,7 @@ const nall::vector<uint8_t> Audio = { //size: 688
245,115,26,235,43,208,111,142,103,158,101,153,30,49,70,98,133,204,49,242,37,77,236,27,140,121,253,7,117,49,14,53, 245,115,26,235,43,208,111,142,103,158,101,153,30,49,70,98,133,204,49,242,37,77,236,27,140,121,253,7,117,49,14,53,
175,233,38,194,0,0,0,0,73,69,78,68,174,66,96,130, 175,233,38,194,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Binary = { //size: 560 const unsigned char Binary[560] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,4,22,20,7,56,114,185,172,74,0,0,1,189,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,4,22,20,7,56,114,185,172,74,0,0,1,189,73,
@ -1067,7 +1069,7 @@ const nall::vector<uint8_t> Binary = { //size: 560
12,59,166,175,197,29,94,21,62,95,168,46,82,16,148,252,173,44,20,142,76,224,27,231,184,202,252,6,31,155,240,68, 12,59,166,175,197,29,94,21,62,95,168,46,82,16,148,252,173,44,20,142,76,224,27,231,184,202,252,6,31,155,240,68,
82,120,70,77,0,0,0,0,73,69,78,68,174,66,96,130, 82,120,70,77,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> File = { //size: 741 const unsigned char File[741] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13,
215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99, 215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,
@ -1093,7 +1095,7 @@ const nall::vector<uint8_t> File = { //size: 741
186,188,7,163,82,153,216,86,213,251,139,11,175,63,3,252,5,198,186,65,227,184,230,144,207,0,0,0,0,73,69,78, 186,188,7,163,82,153,216,86,213,251,139,11,175,63,3,252,5,198,186,65,227,184,230,144,207,0,0,0,0,73,69,78,
68,174,66,96,130, 68,174,66,96,130,
}; };
const nall::vector<uint8_t> Folder = { //size: 581 const unsigned char Folder[581] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13,
215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99, 215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,
@ -1114,7 +1116,7 @@ const nall::vector<uint8_t> Folder = { //size: 581
119,199,119,159,130,243,227,251,248,159,1,34,140,69,194,139,223,71,22,33,158,28,99,167,49,0,0,0,0,73,69,78, 119,199,119,159,130,243,227,251,248,159,1,34,140,69,194,139,223,71,22,33,158,28,99,167,49,0,0,0,0,73,69,78,
68,174,66,96,130, 68,174,66,96,130,
}; };
const nall::vector<uint8_t> Font = { //size: 627 const unsigned char Font[627] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,5,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,5,73,68,65,84,56,141,
@ -1136,7 +1138,7 @@ const nall::vector<uint8_t> Font = { //size: 627
197,24,236,163,169,186,187,162,116,119,29,105,186,119,28,7,165,148,19,0,134,110,223,185,117,243,63,191,243,181,95,46, 197,24,236,163,169,186,187,162,116,119,29,105,186,119,28,7,165,148,19,0,134,110,223,185,117,243,63,191,243,181,95,46,
181,156,109,120,254,28,88,0,0,0,0,73,69,78,68,174,66,96,130, 181,156,109,120,254,28,88,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Image = { //size: 558 const unsigned char Image[558] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,11,10,16,7,18,54,148,178,182,0,0,1,187,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,11,10,16,7,18,54,148,178,182,0,0,1,187,73,
@ -1156,7 +1158,7 @@ const nall::vector<uint8_t> Image = { //size: 558
167,114,14,16,66,176,186,178,156,165,231,48,69,74,153,1,235,141,199,15,239,141,250,157,207,0,181,88,225,150,139,66, 167,114,14,16,66,176,186,178,156,165,231,48,69,74,153,1,235,141,199,15,239,141,250,157,207,0,181,88,225,150,139,66,
18,171,0,0,0,0,73,69,78,68,174,66,96,130, 18,171,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Markup = { //size: 709 const unsigned char Markup[709] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,22,20,19,51,203,197,162,151,0,0,2,82,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,22,20,19,51,203,197,162,151,0,0,2,82,73,
@ -1181,7 +1183,7 @@ const nall::vector<uint8_t> Markup = { //size: 709
173,81,193,197,118,193,196,48,76,110,77,116,146,203,229,248,5,131,250,25,20,161,246,118,40,0,0,0,0,73,69,78, 173,81,193,197,118,193,196,48,76,110,77,116,146,203,229,248,5,131,250,25,20,161,246,118,40,0,0,0,0,73,69,78,
68,174,66,96,130, 68,174,66,96,130,
}; };
const nall::vector<uint8_t> Program = { //size: 609 const unsigned char Program[609] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,214,1,5,14,9,17,179,225,58,161,0,0,1,238,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,214,1,5,14,9,17,179,225,58,161,0,0,1,238,73,
@ -1203,7 +1205,7 @@ const nall::vector<uint8_t> Program = { //size: 609
245,153,250,129,201,122,147,215,84,249,95,226,7,144,100,183,170,35,108,244,94,0,0,0,0,73,69,78,68,174,66,96, 245,153,250,129,201,122,147,215,84,249,95,226,7,144,100,183,170,35,108,244,94,0,0,0,0,73,69,78,68,174,66,96,
130, 130,
}; };
const nall::vector<uint8_t> Script = { //size: 516 const unsigned char Script[516] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,236,0,236,0,236,29,35,22,54,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,236,0,236,0,236,29,35,22,54,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,9,15,10,59,4,237,28,251,236,0,0,1,145,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,9,15,10,59,4,237,28,251,236,0,0,1,145,73,
@ -1222,7 +1224,7 @@ const nall::vector<uint8_t> Script = { //size: 516
253,118,195,252,191,251,219,110,63,0,75,23,217,217,95,1,152,44,191,17,163,238,139,75,0,0,0,0,73,69,78,68, 253,118,195,252,191,251,219,110,63,0,75,23,217,217,95,1,152,44,191,17,163,238,139,75,0,0,0,0,73,69,78,68,
174,66,96,130, 174,66,96,130,
}; };
const nall::vector<uint8_t> Text = { //size: 333 const unsigned char Text[333] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,22,20,15,56,186,96,38,66,0,0,0,218,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,4,22,20,15,56,186,96,38,66,0,0,0,218,73,
@ -1235,7 +1237,7 @@ const nall::vector<uint8_t> Text = { //size: 333
4,33,147,221,61,200,178,140,191,40,49,198,124,54,77,115,61,146,100,140,121,227,191,244,5,84,81,95,185,252,185,63, 4,33,147,221,61,200,178,140,191,40,49,198,124,54,77,115,61,146,100,140,121,227,191,244,5,84,81,95,185,252,185,63,
236,0,0,0,0,73,69,78,68,174,66,96,130, 236,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Video = { //size: 592 const unsigned char Video[592] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,4,28,9,32,30,1,50,75,149,0,0,1,221,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,4,28,9,32,30,1,50,75,149,0,0,1,221,73,
@ -1258,7 +1260,7 @@ const nall::vector<uint8_t> Video = { //size: 592
}; };
} }
namespace Go { namespace Go {
const nall::vector<uint8_t> Down = { //size: 683 const unsigned char Down[683] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,61,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,61,73,68,65,84,56,141,
@ -1282,7 +1284,7 @@ const nall::vector<uint8_t> Down = { //size: 683
230,63,95,218,104,253,191,0,0,56,124,69,189,15,0,195,55,197,217,127,245,252,2,115,74,18,42,134,104,28,203,0, 230,63,95,218,104,253,191,0,0,56,124,69,189,15,0,195,55,197,217,127,245,252,2,115,74,18,42,134,104,28,203,0,
0,0,0,73,69,78,68,174,66,96,130, 0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Home = { //size: 606 const unsigned char Home[606] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,10,14,20,37,19,83,42,210,59,0,0,1,235,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,10,14,20,37,19,83,42,210,59,0,0,1,235,73,
@ -1303,7 +1305,7 @@ const nall::vector<uint8_t> Home = { //size: 606
112,245,3,65,36,18,193,182,109,18,137,4,2,137,16,16,139,197,112,28,103,0,178,44,43,252,23,174,207,58,175,0, 112,245,3,65,36,18,193,182,109,18,137,4,2,137,16,16,139,197,112,28,103,0,178,44,43,252,23,174,207,58,175,0,
135,225,98,245,229,139,215,119,255,0,86,248,213,163,133,187,128,26,0,0,0,0,73,69,78,68,174,66,96,130, 135,225,98,245,229,139,215,119,255,0,86,248,213,163,133,187,128,26,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Left = { //size: 655 const unsigned char Left[655] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,33,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,33,73,68,65,84,56,141,
@ -1326,7 +1328,7 @@ const nall::vector<uint8_t> Left = { //size: 655
203,229,138,87,90,181,6,94,182,58,82,195,182,80,50,191,156,11,120,17,212,124,229,90,239,252,23,109,243,52,116,236, 203,229,138,87,90,181,6,94,182,58,82,195,182,80,50,191,156,11,120,17,212,124,229,90,239,252,23,109,243,52,116,236,
202,203,9,0,0,0,0,73,69,78,68,174,66,96,130, 202,203,9,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Right = { //size: 676 const unsigned char Right[676] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,54,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,54,73,68,65,84,56,141,
@ -1350,7 +1352,7 @@ const nall::vector<uint8_t> Right = { //size: 676
254,167,4,66,18,95,78,167,238,197,162,133,145,243,241,27,65,222,9,180,110,118,229,182,0,0,0,0,73,69,78,68, 254,167,4,66,18,95,78,167,238,197,162,133,145,243,241,27,65,222,9,180,110,118,229,182,0,0,0,0,73,69,78,68,
174,66,96,130, 174,66,96,130,
}; };
const nall::vector<uint8_t> Up = { //size: 652 const unsigned char Up[652] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,30,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,30,73,68,65,84,56,141,
@ -1375,7 +1377,7 @@ const nall::vector<uint8_t> Up = { //size: 652
}; };
} }
namespace Media { namespace Media {
const nall::vector<uint8_t> Back = { //size: 770 const unsigned char Back[770] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,45,2,189,124,103,101,0,0,2,143,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,45,2,189,124,103,101,0,0,2,143,73,
@ -1402,7 +1404,7 @@ const nall::vector<uint8_t> Back = { //size: 770
74,105,0,0,33,196,95,134,145,133,66,107,180,191,249,146,220,194,180,154,76,242,0,0,0,0,73,69,78,68,174,66, 74,105,0,0,33,196,95,134,145,133,66,107,180,191,249,146,220,194,180,154,76,242,0,0,0,0,73,69,78,68,174,66,
96,130, 96,130,
}; };
const nall::vector<uint8_t> Eject = { //size: 628 const unsigned char Eject[628] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,6,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,6,73,68,65,84,56,141,
@ -1424,7 +1426,7 @@ const nall::vector<uint8_t> Eject = { //size: 628
83,255,21,203,178,92,2,202,87,0,208,9,160,11,43,49,110,73,0,64,26,192,44,85,125,103,250,79,1,6,128,191, 83,255,21,203,178,92,2,202,87,0,208,9,160,11,43,49,110,73,0,64,26,192,44,85,125,103,250,79,1,6,128,191,
20,183,247,30,217,9,206,54,0,0,0,0,73,69,78,68,174,66,96,130, 20,183,247,30,217,9,206,54,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Flash = { //size: 607 const unsigned char Flash[607] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13,
215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99, 215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,
@ -1445,7 +1447,7 @@ const nall::vector<uint8_t> Flash = { //size: 607
152,152,224,99,249,125,238,95,104,93,212,81,44,22,241,38,104,255,92,39,137,211,231,167,31,32,238,8,134,216,181,11, 152,152,224,99,249,125,238,95,104,93,212,81,44,22,241,38,104,255,92,39,137,211,231,167,31,32,238,8,134,216,181,11,
218,28,104,2,119,23,74,243,79,254,2,78,177,239,207,22,156,213,133,0,0,0,0,73,69,78,68,174,66,96,130, 218,28,104,2,119,23,74,243,79,254,2,78,177,239,207,22,156,213,133,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Floppy = { //size: 561 const unsigned char Floppy[561] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,1,195,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,1,195,73,68,65,84,56,141,
@ -1465,7 +1467,7 @@ const nall::vector<uint8_t> Floppy = { //size: 561
183,126,243,92,252,173,110,76,76,32,48,61,7,187,177,176,35,134,192,158,191,144,139,169,27,145,240,227,15,253,243,15, 183,126,243,92,252,173,110,76,76,32,48,61,7,187,177,176,35,134,192,158,191,144,139,169,27,145,240,227,15,253,243,15,
58,103,73,91,81,0,0,0,0,73,69,78,68,174,66,96,130, 58,103,73,91,81,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Next = { //size: 771 const unsigned char Next[771] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,45,27,217,23,207,165,0,0,2,144,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,45,27,217,23,207,165,0,0,2,144,73,
@ -1492,7 +1494,7 @@ const nall::vector<uint8_t> Next = { //size: 771
46,82,74,175,148,146,236,115,84,74,73,241,63,248,13,221,115,236,68,32,12,77,214,0,0,0,0,73,69,78,68,174, 46,82,74,175,148,146,236,115,84,74,73,241,63,248,13,221,115,236,68,32,12,77,214,0,0,0,0,73,69,78,68,174,
66,96,130, 66,96,130,
}; };
const nall::vector<uint8_t> Optical = { //size: 931 const unsigned char Optical[931] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,13,215,0,
0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,4,1,17,53,53,42,125,41,75,0,0,3,48,73, 0,13,215,1,66,40,155,120,0,0,0,7,116,73,77,69,7,213,4,1,17,53,53,42,125,41,75,0,0,3,48,73,
@ -1524,7 +1526,7 @@ const nall::vector<uint8_t> Optical = { //size: 931
68,16,4,155,158,231,253,100,24,198,248,201,57,255,11,186,149,81,110,74,152,180,58,0,0,0,0,73,69,78,68,174, 68,16,4,155,158,231,253,100,24,198,248,201,57,255,11,186,149,81,110,74,152,180,58,0,0,0,0,73,69,78,68,174,
66,96,130, 66,96,130,
}; };
const nall::vector<uint8_t> Pause = { //size: 464 const unsigned char Pause[464] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,32,43,74,96,129,68,0,0,1,93,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,32,43,74,96,129,68,0,0,1,93,73,
@ -1541,7 +1543,7 @@ const nall::vector<uint8_t> Pause = { //size: 464
5,150,237,218,108,55,167,68,34,165,105,99,35,17,41,72,115,74,26,143,116,191,185,183,252,23,241,19,86,58,109,31, 5,150,237,218,108,55,167,68,34,165,105,99,35,17,41,72,115,74,26,143,116,191,185,183,252,23,241,19,86,58,109,31,
74,23,56,251,0,0,0,0,73,69,78,68,174,66,96,130, 74,23,56,251,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Play = { //size: 660 const unsigned char Play[660] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,36,33,206,217,173,94,0,0,2,33,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,36,33,206,217,173,94,0,0,2,33,73,
@ -1564,7 +1566,7 @@ const nall::vector<uint8_t> Play = { //size: 660
53,125,66,61,57,7,48,155,138,162,80,207,81,38,162,48,0,3,192,26,195,48,214,127,215,146,136,216,131,212,249,23, 53,125,66,61,57,7,48,155,138,162,80,207,81,38,162,48,0,3,192,26,195,48,214,127,215,146,136,216,131,212,249,23,
48,70,193,31,65,224,78,98,0,0,0,0,73,69,78,68,174,66,96,130, 48,70,193,31,65,224,78,98,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Record = { //size: 653 const unsigned char Record[653] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,31,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,2,31,73,68,65,84,56,141,
@ -1587,7 +1589,7 @@ const nall::vector<uint8_t> Record = { //size: 653
251,103,148,127,235,35,145,188,13,164,25,72,120,192,78,134,249,108,92,223,149,128,255,213,47,18,206,244,197,113,23,107, 251,103,148,127,235,35,145,188,13,164,25,72,120,192,78,134,249,108,92,223,149,128,255,213,47,18,206,244,197,113,23,107,
46,0,0,0,0,73,69,78,68,174,66,96,130, 46,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Rewind = { //size: 764 const unsigned char Rewind[764] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,39,32,146,243,206,11,0,0,2,137,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,39,32,146,243,206,11,0,0,2,137,73,
@ -1613,7 +1615,7 @@ const nall::vector<uint8_t> Rewind = { //size: 764
246,131,228,119,37,112,22,23,101,2,238,5,144,81,20,87,10,0,108,219,17,0,104,0,87,255,186,77,156,115,101,13, 246,131,228,119,37,112,22,23,101,2,238,5,144,81,20,87,10,0,108,219,17,0,104,0,87,255,186,77,156,115,101,13,
70,56,231,250,63,87,245,59,186,53,233,69,8,225,63,138,0,0,0,0,73,69,78,68,174,66,96,130, 70,56,231,250,63,87,245,59,186,53,233,69,8,225,63,138,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Skip = { //size: 782 const unsigned char Skip[782] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,39,8,167,70,102,241,0,0,2,155,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,39,8,167,70,102,241,0,0,2,155,73,
@ -1640,7 +1642,7 @@ const nall::vector<uint8_t> Skip = { //size: 782
108,187,224,3,192,83,144,117,81,16,54,246,124,6,74,169,151,82,74,118,225,2,254,71,126,1,54,156,22,72,126,132, 108,187,224,3,192,83,144,117,81,16,54,246,124,6,74,169,151,82,74,118,225,2,254,71,126,1,54,156,22,72,126,132,
128,72,0,0,0,0,73,69,78,68,174,66,96,130, 128,72,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Stop = { //size: 429 const unsigned char Stop[429] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,40,46,242,211,255,195,0,0,1,58,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,12,6,17,40,46,242,211,255,195,0,0,1,58,73,
@ -1658,7 +1660,7 @@ const nall::vector<uint8_t> Stop = { //size: 429
}; };
} }
namespace Place { namespace Place {
const nall::vector<uint8_t> Bookmarks = { //size: 753 const unsigned char Bookmarks[753] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,6,3,42,40,185,100,186,202,0,0,0,53,116, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,10,6,3,42,40,185,100,186,202,0,0,0,53,116,
@ -1684,7 +1686,7 @@ const nall::vector<uint8_t> Bookmarks = { //size: 753
240,31,132,238,134,76,222,201,152,165,149,170,56,221,55,57,85,92,152,253,207,239,204,226,171,105,1,240,27,115,187,219, 240,31,132,238,134,76,222,201,152,165,149,170,56,221,55,57,85,92,152,253,207,239,204,226,171,105,1,240,27,115,187,219,
217,106,190,108,255,0,0,0,0,73,69,78,68,174,66,96,130, 217,106,190,108,255,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Desktop = { //size: 722 const unsigned char Desktop[722] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,2,23,0,42,10,182,151,62,76,0,0,2,95,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,2,23,0,42,10,182,151,62,76,0,0,2,95,73,
@ -1709,7 +1711,7 @@ const nall::vector<uint8_t> Desktop = { //size: 722
11,59,140,241,114,146,69,17,119,228,81,211,213,211,64,255,152,52,46,55,191,168,226,111,159,137,255,93,63,1,185,254, 11,59,140,241,114,146,69,17,119,228,81,211,213,211,64,255,152,52,46,55,191,168,226,111,159,137,255,93,63,1,185,254,
98,48,219,255,91,223,0,0,0,0,73,69,78,68,174,66,96,130, 98,48,219,255,91,223,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Home = { //size: 679 const unsigned char Home[679] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13,
215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99, 215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,
@ -1733,7 +1735,7 @@ const nall::vector<uint8_t> Home = { //size: 679
239,119,103,159,130,178,255,171,125,133,234,87,155,8,109,17,243,226,47,238,171,54,255,32,151,176,79,0,0,0,0,73, 239,119,103,159,130,178,255,171,125,133,234,87,155,8,109,17,243,226,47,238,171,54,255,32,151,176,79,0,0,0,0,73,
69,78,68,174,66,96,130, 69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Server = { //size: 642 const unsigned char Server[642] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,96,0,96,0,96,101,20,102,74,0,0,0,9,112,72,89,115,0,0,11,18,0, 97,0,0,0,6,98,75,71,68,0,96,0,96,0,96,101,20,102,74,0,0,0,9,112,72,89,115,0,0,11,18,0,
0,11,18,1,210,221,126,252,0,0,0,7,116,73,77,69,7,213,5,24,13,41,13,225,69,167,57,0,0,0,62,116, 0,11,18,1,210,221,126,252,0,0,0,7,116,73,77,69,7,213,5,24,13,41,13,225,69,167,57,0,0,0,62,116,
@ -1756,7 +1758,7 @@ const nall::vector<uint8_t> Server = { //size: 642
162,75,129,231,151,151,151,31,252,63,158,1,254,0,124,80,17,254,250,115,5,147,0,0,0,0,73,69,78,68,174,66, 162,75,129,231,151,151,151,31,252,63,158,1,254,0,124,80,17,254,250,115,5,147,0,0,0,0,73,69,78,68,174,66,
96,130, 96,130,
}; };
const nall::vector<uint8_t> Settings = { //size: 629 const unsigned char Settings[629] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,11,4,11,55,32,209,169,238,103,0,0,0,29,116, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,11,4,11,55,32,209,169,238,103,0,0,0,29,116,
@ -1778,7 +1780,7 @@ const nall::vector<uint8_t> Settings = { //size: 629
223,201,193,112,13,142,84,237,187,73,212,49,51,211,25,10,187,69,39,153,230,199,79,31,78,37,241,220,127,225,255,215, 223,201,193,112,13,142,84,237,187,73,212,49,51,211,25,10,187,69,39,153,230,199,79,31,78,37,241,220,127,225,255,215,
95,179,89,175,43,2,12,187,45,0,0,0,0,73,69,78,68,174,66,96,130, 95,179,89,175,43,2,12,187,45,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Share = { //size: 697 const unsigned char Share[697] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,72,89,115,0,0,13,215,0,0,13,
215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99, 215,1,66,40,155,120,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,
@ -1804,7 +1806,7 @@ const nall::vector<uint8_t> Share = { //size: 697
}; };
} }
namespace Prompt { namespace Prompt {
const nall::vector<uint8_t> Error = { //size: 653 const unsigned char Error[653] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,11,10,9,50,14,147,83,180,176,0,0,2,26,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,11,10,9,50,14,147,83,180,176,0,0,2,26,73,
@ -1827,7 +1829,7 @@ const nall::vector<uint8_t> Error = { //size: 653
182,141,233,237,69,69,112,154,77,58,245,58,95,143,142,186,206,139,183,110,227,255,172,243,79,194,71,102,30,185,88,118, 182,141,233,237,69,69,112,154,77,58,245,58,95,143,142,186,206,139,183,110,227,255,172,243,79,194,71,102,30,185,88,118,
119,0,0,0,0,73,69,78,68,174,66,96,130, 119,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Information = { //size: 863 const unsigned char Information[863] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,0,0,0,0,0,249,67,187,127,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,3,2,6,32,50,58,80,156,247,0,0,0,53,116, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,213,3,2,6,32,50,58,80,156,247,0,0,0,53,116,
@ -1856,7 +1858,7 @@ const nall::vector<uint8_t> Information = { //size: 863
169,105,108,90,78,167,141,206,204,190,50,2,210,16,253,52,250,194,216,236,4,0,80,85,125,242,122,141,32,196,31,89, 169,105,108,90,78,167,141,206,204,190,50,2,210,16,253,52,250,194,216,236,4,0,80,85,125,242,122,141,32,196,31,89,
88,88,120,157,151,23,251,40,146,233,55,86,76,54,94,124,138,29,4,0,0,0,0,73,69,78,68,174,66,96,130, 88,88,120,157,151,23,251,40,146,233,55,86,76,54,94,124,138,29,4,0,0,0,0,73,69,78,68,174,66,96,130,
}; };
const nall::vector<uint8_t> Question = { //size: 932 const unsigned char Question[932] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114, 97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,25,116,69,88,116,83,111,102,116,119,97,114,
101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,3,54,73,68,65,84,56,141, 101,0,119,119,119,46,105,110,107,115,99,97,112,101,46,111,114,103,155,238,60,26,0,0,3,54,73,68,65,84,56,141,
@ -1888,7 +1890,7 @@ const nall::vector<uint8_t> Question = { //size: 932
74,5,1,164,148,93,179,179,217,136,82,234,150,56,255,7,102,247,76,148,162,219,138,97,0,0,0,0,73,69,78,68, 74,5,1,164,148,93,179,179,217,136,82,234,150,56,255,7,102,247,76,148,162,219,138,97,0,0,0,0,73,69,78,68,
174,66,96,130, 174,66,96,130,
}; };
const nall::vector<uint8_t> Warning = { //size: 603 const unsigned char Warning[603] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255, 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,0,31,243,255,
97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0, 97,0,0,0,6,98,75,71,68,0,255,0,255,0,255,160,189,167,147,0,0,0,9,112,72,89,115,0,0,11,19,0,
0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,214,2,16,14,39,45,183,238,146,119,0,0,1,232,73, 0,11,19,1,0,154,156,24,0,0,0,7,116,73,77,69,7,214,2,16,14,39,45,183,238,146,119,0,0,1,232,73,

View File

@ -1,103 +1,103 @@
namespace Icon { namespace Icon {
namespace Action { namespace Action {
extern const nall::vector<uint8_t> Add; extern const unsigned char Add[323];
extern const nall::vector<uint8_t> Attach; extern const unsigned char Attach[649];
extern const nall::vector<uint8_t> Bookmark; extern const unsigned char Bookmark[686];
extern const nall::vector<uint8_t> FullScreen; extern const unsigned char FullScreen[650];
extern const nall::vector<uint8_t> Mute; extern const unsigned char Mute[632];
extern const nall::vector<uint8_t> New; extern const unsigned char New[477];
extern const nall::vector<uint8_t> Open; extern const unsigned char Open[672];
extern const nall::vector<uint8_t> Properties; extern const unsigned char Properties[464];
extern const nall::vector<uint8_t> Quit; extern const unsigned char Quit[799];
extern const nall::vector<uint8_t> Refresh; extern const unsigned char Refresh[912];
extern const nall::vector<uint8_t> Remove; extern const unsigned char Remove[247];
extern const nall::vector<uint8_t> Save; extern const unsigned char Save[911];
extern const nall::vector<uint8_t> Search; extern const unsigned char Search[935];
extern const nall::vector<uint8_t> Settings; extern const unsigned char Settings[611];
extern const nall::vector<uint8_t> Stop; extern const unsigned char Stop[820];
} }
namespace Application { namespace Application {
extern const nall::vector<uint8_t> Browser; extern const unsigned char Browser[928];
extern const nall::vector<uint8_t> Calculator; extern const unsigned char Calculator[686];
extern const nall::vector<uint8_t> Calendar; extern const unsigned char Calendar[603];
extern const nall::vector<uint8_t> Chat; extern const unsigned char Chat[422];
extern const nall::vector<uint8_t> FileManager; extern const unsigned char FileManager[378];
extern const nall::vector<uint8_t> Mail; extern const unsigned char Mail[550];
extern const nall::vector<uint8_t> Monitor; extern const unsigned char Monitor[611];
extern const nall::vector<uint8_t> Terminal; extern const unsigned char Terminal[668];
extern const nall::vector<uint8_t> TextEditor; extern const unsigned char TextEditor[574];
} }
namespace Device { namespace Device {
extern const nall::vector<uint8_t> Clock; extern const unsigned char Clock[897];
extern const nall::vector<uint8_t> Display; extern const unsigned char Display[662];
extern const nall::vector<uint8_t> Joypad; extern const unsigned char Joypad[812];
extern const nall::vector<uint8_t> Keyboard; extern const unsigned char Keyboard[587];
extern const nall::vector<uint8_t> Microphone; extern const unsigned char Microphone[703];
extern const nall::vector<uint8_t> Mouse; extern const unsigned char Mouse[720];
extern const nall::vector<uint8_t> Network; extern const unsigned char Network[408];
extern const nall::vector<uint8_t> Optical; extern const unsigned char Optical[720];
extern const nall::vector<uint8_t> Printer; extern const unsigned char Printer[481];
extern const nall::vector<uint8_t> Speaker; extern const unsigned char Speaker[592];
extern const nall::vector<uint8_t> Storage; extern const unsigned char Storage[603];
} }
namespace Edit { namespace Edit {
extern const nall::vector<uint8_t> Clear; extern const unsigned char Clear[773];
extern const nall::vector<uint8_t> Copy; extern const unsigned char Copy[498];
extern const nall::vector<uint8_t> Cut; extern const unsigned char Cut[807];
extern const nall::vector<uint8_t> Delete; extern const unsigned char Delete[680];
extern const nall::vector<uint8_t> Find; extern const unsigned char Find[617];
extern const nall::vector<uint8_t> Paste; extern const unsigned char Paste[561];
extern const nall::vector<uint8_t> Redo; extern const unsigned char Redo[591];
extern const nall::vector<uint8_t> Replace; extern const unsigned char Replace[776];
extern const nall::vector<uint8_t> Undo; extern const unsigned char Undo[650];
} }
namespace Emblem { namespace Emblem {
extern const nall::vector<uint8_t> Archive; extern const unsigned char Archive[540];
extern const nall::vector<uint8_t> Audio; extern const unsigned char Audio[688];
extern const nall::vector<uint8_t> Binary; extern const unsigned char Binary[560];
extern const nall::vector<uint8_t> File; extern const unsigned char File[741];
extern const nall::vector<uint8_t> Folder; extern const unsigned char Folder[581];
extern const nall::vector<uint8_t> Font; extern const unsigned char Font[627];
extern const nall::vector<uint8_t> Image; extern const unsigned char Image[558];
extern const nall::vector<uint8_t> Markup; extern const unsigned char Markup[709];
extern const nall::vector<uint8_t> Program; extern const unsigned char Program[609];
extern const nall::vector<uint8_t> Script; extern const unsigned char Script[516];
extern const nall::vector<uint8_t> Text; extern const unsigned char Text[333];
extern const nall::vector<uint8_t> Video; extern const unsigned char Video[592];
} }
namespace Go { namespace Go {
extern const nall::vector<uint8_t> Down; extern const unsigned char Down[683];
extern const nall::vector<uint8_t> Home; extern const unsigned char Home[606];
extern const nall::vector<uint8_t> Left; extern const unsigned char Left[655];
extern const nall::vector<uint8_t> Right; extern const unsigned char Right[676];
extern const nall::vector<uint8_t> Up; extern const unsigned char Up[652];
} }
namespace Media { namespace Media {
extern const nall::vector<uint8_t> Back; extern const unsigned char Back[770];
extern const nall::vector<uint8_t> Eject; extern const unsigned char Eject[628];
extern const nall::vector<uint8_t> Flash; extern const unsigned char Flash[607];
extern const nall::vector<uint8_t> Floppy; extern const unsigned char Floppy[561];
extern const nall::vector<uint8_t> Next; extern const unsigned char Next[771];
extern const nall::vector<uint8_t> Optical; extern const unsigned char Optical[931];
extern const nall::vector<uint8_t> Pause; extern const unsigned char Pause[464];
extern const nall::vector<uint8_t> Play; extern const unsigned char Play[660];
extern const nall::vector<uint8_t> Record; extern const unsigned char Record[653];
extern const nall::vector<uint8_t> Rewind; extern const unsigned char Rewind[764];
extern const nall::vector<uint8_t> Skip; extern const unsigned char Skip[782];
extern const nall::vector<uint8_t> Stop; extern const unsigned char Stop[429];
} }
namespace Place { namespace Place {
extern const nall::vector<uint8_t> Bookmarks; extern const unsigned char Bookmarks[753];
extern const nall::vector<uint8_t> Desktop; extern const unsigned char Desktop[722];
extern const nall::vector<uint8_t> Home; extern const unsigned char Home[679];
extern const nall::vector<uint8_t> Server; extern const unsigned char Server[642];
extern const nall::vector<uint8_t> Settings; extern const unsigned char Settings[629];
extern const nall::vector<uint8_t> Share; extern const unsigned char Share[697];
} }
namespace Prompt { namespace Prompt {
extern const nall::vector<uint8_t> Error; extern const unsigned char Error[653];
extern const nall::vector<uint8_t> Information; extern const unsigned char Information[863];
extern const nall::vector<uint8_t> Question; extern const unsigned char Question[932];
extern const nall::vector<uint8_t> Warning; extern const unsigned char Warning[603];
} }
} }

View File

@ -8,8 +8,8 @@ static auto CALLBACK Application_windowProc(HWND, UINT, WPARAM, LPARAM) -> LRESU
auto pApplication::run() -> void { auto pApplication::run() -> void {
MSG msg; MSG msg;
if(Application::state.onMain) { if(Application::state().onMain) {
while(!Application::state.quit) { while(!Application::state().quit) {
Application::doMain(); Application::doMain();
processEvents(); processEvents();
} }
@ -243,7 +243,7 @@ case WM_GETMINMAXINFO: {
*/ */
static auto CALLBACK Application_windowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -> LRESULT { static auto CALLBACK Application_windowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -> LRESULT {
if(Application::state.quit) return DefWindowProc(hwnd, msg, wparam, lparam); if(Application::state().quit) return DefWindowProc(hwnd, msg, wparam, lparam);
auto object = (mObject*)GetWindowLongPtr(hwnd, GWLP_USERDATA); auto object = (mObject*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if(!object) return DefWindowProc(hwnd, msg, wparam, lparam); if(!object) return DefWindowProc(hwnd, msg, wparam, lparam);

View File

@ -2,7 +2,7 @@
namespace hiro { namespace hiro {
struct pObject : mLock { struct pObject : Lock {
pObject(mObject& reference) : reference(reference) {} pObject(mObject& reference) : reference(reference) {}
virtual ~pObject() = default; virtual ~pObject() = default;
virtual auto construct() -> void; virtual auto construct() -> void;

View File

@ -41,7 +41,6 @@
#include "widget/label.cpp" #include "widget/label.cpp"
#include "widget/line-edit.cpp" #include "widget/line-edit.cpp"
#include "widget/table-view.cpp" #include "widget/table-view.cpp"
#include "widget/table-view-header.cpp"
#include "widget/table-view-column.cpp" #include "widget/table-view-column.cpp"
#include "widget/table-view-item.cpp" #include "widget/table-view-item.cpp"
#include "widget/table-view-cell.cpp" #include "widget/table-view-cell.cpp"

View File

@ -68,7 +68,6 @@ static vector<wObject> windows;
#include "widget/tab-frame.hpp" #include "widget/tab-frame.hpp"
#include "widget/tab-frame-item.hpp" #include "widget/tab-frame-item.hpp"
#include "widget/table-view.hpp" #include "widget/table-view.hpp"
#include "widget/table-view-header.hpp"
#include "widget/table-view-column.hpp" #include "widget/table-view-column.hpp"
#include "widget/table-view-item.hpp" #include "widget/table-view-item.hpp"
#include "widget/table-view-cell.hpp" #include "widget/table-view-cell.hpp"

View File

@ -148,7 +148,7 @@ static auto CALLBACK Menu_windowProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM
} }
static auto CALLBACK Shared_windowProc(WindowProc windowProc, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -> LRESULT { static auto CALLBACK Shared_windowProc(WindowProc windowProc, HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) -> LRESULT {
if(Application::state.quit) return DefWindowProc(hwnd, msg, wparam, lparam); if(Application::state().quit) return DefWindowProc(hwnd, msg, wparam, lparam);
auto object = (mObject*)GetWindowLongPtr(hwnd, GWLP_USERDATA); auto object = (mObject*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if(!object) return DefWindowProc(hwnd, msg, wparam, lparam); if(!object) return DefWindowProc(hwnd, msg, wparam, lparam);

View File

@ -36,12 +36,12 @@ auto pLineEdit::setEditable(bool editable) -> void {
} }
auto pLineEdit::setForegroundColor(Color color) -> void { auto pLineEdit::setForegroundColor(Color color) -> void {
InvalidateRect(hwnd, 0, true);
} }
auto pLineEdit::setText(const string& text) -> void { auto pLineEdit::setText(const string& text) -> void {
lock(); auto lock = acquire();
SetWindowText(hwnd, utf16_t(text)); SetWindowText(hwnd, utf16_t(text));
unlock();
} }
auto pLineEdit::onChange() -> void { auto pLineEdit::onChange() -> void {

View File

@ -3,25 +3,23 @@
namespace hiro { namespace hiro {
auto pTableViewColumn::construct() -> void { auto pTableViewColumn::construct() -> void {
if(auto grandparent = _grandparent()) { if(auto parent = _parent()) {
grandparent->lock(); auto lock = parent->acquire();
wchar_t text[] = L""; wchar_t text[] = L"";
LVCOLUMN lvColumn{0}; LVCOLUMN lvColumn{0};
lvColumn.mask = LVCF_FMT | LVCF_TEXT | LVCF_SUBITEM; lvColumn.mask = LVCF_FMT | LVCF_TEXT | LVCF_SUBITEM;
lvColumn.fmt = LVCFMT_LEFT; lvColumn.fmt = LVCFMT_LEFT;
lvColumn.iSubItem = self().offset(); lvColumn.iSubItem = self().offset();
lvColumn.pszText = text; lvColumn.pszText = text;
ListView_InsertColumn(grandparent->hwnd, self().offset(), &lvColumn); ListView_InsertColumn(parent->hwnd, self().offset(), &lvColumn);
_setState(); _setState();
grandparent->unlock();
} }
} }
auto pTableViewColumn::destruct() -> void { auto pTableViewColumn::destruct() -> void {
if(auto grandparent = _grandparent()) { if(auto parent = _parent()) {
grandparent->lock(); auto lock = parent->acquire();
ListView_DeleteColumn(grandparent->hwnd, self().offset()); ListView_DeleteColumn(parent->hwnd, self().offset());
grandparent->unlock();
} }
} }
@ -57,7 +55,8 @@ auto pTableViewColumn::setResizable(bool resizable) -> void {
_setState(); _setState();
} }
auto pTableViewColumn::setSortable(bool sortable) -> void { auto pTableViewColumn::setSorting(Sort sorting) -> void {
_setState();
} }
auto pTableViewColumn::setText(const string& text) -> void { auto pTableViewColumn::setText(const string& text) -> void {
@ -71,36 +70,33 @@ auto pTableViewColumn::setWidth(signed width) -> void {
_setState(); _setState();
} }
auto pTableViewColumn::_grandparent() -> maybe<pTableView&> { auto pTableViewColumn::_parent() -> maybe<pTableView&> {
if(auto parent = _parent()) return parent->_parent(); if(auto parent = self().parentTableView()) {
return nothing;
}
auto pTableViewColumn::_parent() -> maybe<pTableViewHeader&> {
if(auto parent = self().parentTableViewHeader()) {
if(auto self = parent->self()) return *self; if(auto self = parent->self()) return *self;
} }
return nothing; return {};
} }
auto pTableViewColumn::_setState() -> void { auto pTableViewColumn::_setState() -> void {
if(auto grandparent = _grandparent()) { if(auto parent = _parent()) {
grandparent->lock(); auto lock = parent->acquire();
grandparent->_setIcons(); parent->_setIcons();
utf16_t text(state().text); string text = state().text;
if(state().sorting == Sort::Ascending ) text.append(" ^");
if(state().sorting == Sort::Descending) text.append(" v");
utf16_t wtext(text);
LVCOLUMN lvColumn; LVCOLUMN lvColumn;
lvColumn.mask = LVCF_FMT | LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH; lvColumn.mask = LVCF_FMT | LVCF_SUBITEM | LVCF_TEXT | LVCF_WIDTH;
lvColumn.fmt = LVCFMT_CENTER; lvColumn.fmt = LVCFMT_CENTER;
lvColumn.iSubItem = self().offset(); lvColumn.iSubItem = self().offset();
lvColumn.iImage = self().offset(); lvColumn.iImage = self().offset();
lvColumn.pszText = text; lvColumn.pszText = wtext;
lvColumn.cx = _width; lvColumn.cx = _width;
if(state().horizontalAlignment < 0.333) lvColumn.fmt = LVCFMT_LEFT; if(state().horizontalAlignment < 0.333) lvColumn.fmt = LVCFMT_LEFT;
if(state().horizontalAlignment > 0.666) lvColumn.fmt = LVCFMT_RIGHT; if(state().horizontalAlignment > 0.666) lvColumn.fmt = LVCFMT_RIGHT;
if(state().icon) lvColumn.mask |= LVCF_IMAGE; if(state().icon) lvColumn.mask |= LVCF_IMAGE;
if(!state().resizable) lvColumn.fmt |= LVCFMT_FIXED_WIDTH; if(!state().resizable) lvColumn.fmt |= LVCFMT_FIXED_WIDTH;
ListView_SetColumn(grandparent->hwnd, self().offset(), &lvColumn); ListView_SetColumn(parent->hwnd, self().offset(), &lvColumn);
grandparent->unlock();
} }
} }

View File

@ -14,13 +14,12 @@ struct pTableViewColumn : pObject {
auto setHorizontalAlignment(double alignment) -> void; auto setHorizontalAlignment(double alignment) -> void;
auto setIcon(const image& icon) -> void; auto setIcon(const image& icon) -> void;
auto setResizable(bool resizable) -> void; auto setResizable(bool resizable) -> void;
auto setSortable(bool sortable) -> void; auto setSorting(Sort sorting) -> void;
auto setText(const string& text) -> void; auto setText(const string& text) -> void;
auto setVerticalAlignment(double alignment) -> void; auto setVerticalAlignment(double alignment) -> void;
auto setWidth(signed width) -> void; auto setWidth(signed width) -> void;
auto _grandparent() -> maybe<pTableView&>; auto _parent() -> maybe<pTableView&>;
auto _parent() -> maybe<pTableViewHeader&>;
auto _setState() -> void; auto _setState() -> void;
signed _width = 128; //computed width (via TableView::resizeColumns) signed _width = 128; //computed width (via TableView::resizeColumns)

View File

@ -1,42 +0,0 @@
#if defined(Hiro_TableView)
namespace hiro {
auto pTableViewHeader::construct() -> void {
_setState();
}
auto pTableViewHeader::destruct() -> void {
}
auto pTableViewHeader::append(sTableViewColumn column) -> void {
}
auto pTableViewHeader::remove(sTableViewColumn column) -> void {
}
auto pTableViewHeader::setVisible(bool visible) -> void {
_setState();
}
auto pTableViewHeader::_parent() -> maybe<pTableView&> {
if(auto parent = self().parentTableView()) {
if(auto self = parent->self()) return *self;
}
return nothing;
}
auto pTableViewHeader::_setState() -> void {
if(auto parent = _parent()) {
auto style = GetWindowLong(parent->hwnd, GWL_STYLE);
self().visible() ? style &=~ LVS_NOCOLUMNHEADER : style |= LVS_NOCOLUMNHEADER;
SetWindowLong(parent->hwnd, GWL_STYLE, style);
for(auto& column : state().columns) {
if(auto self = column->self()) self->_setState();
}
}
}
}
#endif

View File

@ -1,18 +0,0 @@
#if defined(Hiro_TableView)
namespace hiro {
struct pTableViewHeader : pObject {
Declare(TableViewHeader, Object)
auto append(sTableViewColumn column) -> void;
auto remove(sTableViewColumn column) -> void;
auto setVisible(bool visible) -> void override;
auto _parent() -> maybe<pTableView&>;
auto _setState() -> void;
};
}
#endif

View File

@ -35,8 +35,9 @@ auto pTableView::construct() -> void {
setBackgroundColor(state().backgroundColor); setBackgroundColor(state().backgroundColor);
setBatchable(state().batchable); setBatchable(state().batchable);
setBordered(state().bordered); setBordered(state().bordered);
setHeadered(state().headered);
setSortable(state().sortable);
_setIcons(); _setIcons();
_setSortable();
resizeColumns(); resizeColumns();
} }
@ -45,61 +46,53 @@ auto pTableView::destruct() -> void {
DestroyWindow(hwnd); DestroyWindow(hwnd);
} }
auto pTableView::append(sTableViewHeader header) -> void { auto pTableView::append(sTableViewColumn column) -> void {
resizeColumns(); resizeColumns();
} }
auto pTableView::append(sTableViewItem item) -> void { auto pTableView::append(sTableViewItem item) -> void {
} }
auto pTableView::remove(sTableViewHeader header) -> void { auto pTableView::remove(sTableViewColumn column) -> void {
LVCOLUMN lvColumn{LVCF_WIDTH};
while(ListView_GetColumn(hwnd, 0, &lvColumn)) {
ListView_DeleteColumn(hwnd, 0);
}
} }
auto pTableView::remove(sTableViewItem item) -> void { auto pTableView::remove(sTableViewItem item) -> void {
} }
auto pTableView::resizeColumns() -> void { auto pTableView::resizeColumns() -> void {
lock(); auto lock = acquire();
if(auto& header = state().header) { vector<signed> widths;
vector<signed> widths; signed minimumWidth = 0;
signed minimumWidth = 0; signed expandable = 0;
signed expandable = 0; for(auto column : range(self().columnCount())) {
for(auto column : range(header->columnCount())) { signed width = _width(column);
signed width = _width(column); widths.append(width);
widths.append(width); minimumWidth += width;
minimumWidth += width; if(state().columns[column]->expandable()) expandable++;
if(header->column(column).expandable()) expandable++; }
}
signed maximumWidth = self().geometry().width() - 4; signed maximumWidth = self().geometry().width() - 4;
SCROLLBARINFO sbInfo{sizeof(SCROLLBARINFO)}; SCROLLBARINFO sbInfo{sizeof(SCROLLBARINFO)};
if(GetScrollBarInfo(hwnd, OBJID_VSCROLL, &sbInfo)) { if(GetScrollBarInfo(hwnd, OBJID_VSCROLL, &sbInfo)) {
if(!(sbInfo.rgstate[0] & STATE_SYSTEM_INVISIBLE)) { if(!(sbInfo.rgstate[0] & STATE_SYSTEM_INVISIBLE)) {
maximumWidth -= sbInfo.rcScrollBar.right - sbInfo.rcScrollBar.left; maximumWidth -= sbInfo.rcScrollBar.right - sbInfo.rcScrollBar.left;
}
}
signed expandWidth = 0;
if(expandable && maximumWidth > minimumWidth) {
expandWidth = (maximumWidth - minimumWidth) / expandable;
}
for(auto column : range(header->columnCount())) {
if(auto self = header->state.columns[column]->self()) {
signed width = widths[column];
if(self->state().expandable) width += expandWidth;
self->_width = width;
self->_setState();
}
} }
} }
unlock(); signed expandWidth = 0;
if(expandable && maximumWidth > minimumWidth) {
expandWidth = (maximumWidth - minimumWidth) / expandable;
}
for(auto column : range(self().columnCount())) {
if(auto self = state().columns[column]->self()) {
signed width = widths[column];
if(self->state().expandable) width += expandWidth;
self->_width = width;
self->_setState();
}
}
} }
auto pTableView::setAlignment(Alignment alignment) -> void { auto pTableView::setAlignment(Alignment alignment) -> void {
@ -125,10 +118,8 @@ auto pTableView::setForegroundColor(Color color) -> void {
auto pTableView::setGeometry(Geometry geometry) -> void { auto pTableView::setGeometry(Geometry geometry) -> void {
pWidget::setGeometry(geometry); pWidget::setGeometry(geometry);
if(auto& header = state().header) { for(auto& column : state().columns) {
for(auto& column : header->state.columns) { if(column->state.expandable) return resizeColumns();
if(column->state.expandable) return resizeColumns();
}
} }
} }
@ -179,9 +170,7 @@ auto pTableView::onCustomDraw(LPARAM lparam) -> LRESULT {
HDC hdc = lvcd->nmcd.hdc; HDC hdc = lvcd->nmcd.hdc;
HDC hdcSource = CreateCompatibleDC(hdc); HDC hdcSource = CreateCompatibleDC(hdc);
unsigned row = lvcd->nmcd.dwItemSpec; unsigned row = lvcd->nmcd.dwItemSpec;
auto& header = state().header; for(auto column : range(self().columnCount())) {
if(!header) break;
for(auto column : range(header->columnCount())) {
RECT rc, rcLabel; RECT rc, rcLabel;
ListView_GetSubItemRect(hwnd, row, column, LVIR_BOUNDS, &rc); ListView_GetSubItemRect(hwnd, row, column, LVIR_BOUNDS, &rc);
ListView_GetSubItemRect(hwnd, row, column, LVIR_LABEL, &rcLabel); ListView_GetSubItemRect(hwnd, row, column, LVIR_LABEL, &rcLabel);
@ -278,10 +267,8 @@ auto pTableView::onCustomDraw(LPARAM lparam) -> LRESULT {
auto pTableView::onSort(LPARAM lparam) -> void { auto pTableView::onSort(LPARAM lparam) -> void {
auto nmlistview = (LPNMLISTVIEW)lparam; auto nmlistview = (LPNMLISTVIEW)lparam;
if(auto& header = state().header) { if(auto column = self().column(nmlistview->iSubItem)) {
if(auto column = header->column(nmlistview->iSubItem)) { if(state().sortable) self().doSort(column);
if(column->sortable()) self().doSort(column);
}
} }
} }
@ -301,6 +288,19 @@ auto pTableView::onToggle(LPARAM lparam) -> void {
} }
} }
auto pTableView::setHeadered(bool headered) -> void {
auto style = GetWindowLong(hwnd, GWL_STYLE);
headered ? style &=~ LVS_NOCOLUMNHEADER : style |= LVS_NOCOLUMNHEADER;
SetWindowLong(hwnd, GWL_STYLE, style);
}
auto pTableView::setSortable(bool sortable) -> void {
//note: this won't change the visual style: WC_LISTVIEW caches this in CreateWindow
auto style = GetWindowLong(hwnd, GWL_STYLE);
sortable ? style &=~ LVS_NOSORTHEADER : style |= LVS_NOSORTHEADER;
SetWindowLong(hwnd, GWL_STYLE, style);
}
auto pTableView::_backgroundColor(unsigned _row, unsigned _column) -> Color { auto pTableView::_backgroundColor(unsigned _row, unsigned _column) -> Color {
if(auto item = self().item(_row)) { if(auto item = self().item(_row)) {
if(auto cell = item->cell(_column)) { if(auto cell = item->cell(_column)) {
@ -308,11 +308,11 @@ auto pTableView::_backgroundColor(unsigned _row, unsigned _column) -> Color {
} }
if(auto color = item->backgroundColor()) return color; if(auto color = item->backgroundColor()) return color;
} }
// if(auto column = self().column(_column)) { //if(auto column = self().column(_column)) {
// if(auto color = column->backgroundColor()) return color; // if(auto color = column->backgroundColor()) return color;
// } //}
if(auto color = self().backgroundColor()) return color; if(auto color = self().backgroundColor()) return color;
// if(state().columns.size() >= 2 && _row % 2) return {240, 240, 240}; //if(state().columns.size() >= 2 && _row % 2) return {240, 240, 240};
return {255, 255, 255}; return {255, 255, 255};
} }
@ -336,14 +336,15 @@ auto pTableView::_cellWidth(unsigned _row, unsigned _column) -> unsigned {
auto pTableView::_columnWidth(unsigned _column) -> unsigned { auto pTableView::_columnWidth(unsigned _column) -> unsigned {
unsigned width = 12; unsigned width = 12;
if(auto header = state().header) { if(auto column = self().column(_column)) {
if(auto column = header->column(_column)) { if(auto& icon = column->state.icon) {
if(auto& icon = column->state.icon) { width += 16 + 12; //yes; icon spacing in column headers is excessive
width += 16 + 12; //yes; icon spacing in column headers is excessive }
} if(auto& text = column->state.text) {
if(auto& text = column->state.text) { width += pFont::size(self().font(true), text).width();
width += pFont::size(self().font(true), text).width(); }
} if(column->state.sorting != Sort::None) {
width += 12;
} }
} }
return width; return width;
@ -356,9 +357,9 @@ auto pTableView::_font(unsigned _row, unsigned _column) -> Font {
} }
if(auto font = item->font()) return font; if(auto font = item->font()) return font;
} }
// if(auto column = self().column(_column)) { //if(auto column = self().column(_column)) {
// if(auto font = column->font()) return font; // if(auto font = column->font()) return font;
// } //}
if(auto font = self().font(true)) return font; if(auto font = self().font(true)) return font;
return {}; return {};
} }
@ -370,9 +371,9 @@ auto pTableView::_foregroundColor(unsigned _row, unsigned _column) -> Color {
} }
if(auto color = item->foregroundColor()) return color; if(auto color = item->foregroundColor()) return color;
} }
// if(auto column = self().column(_column)) { //if(auto column = self().column(_column)) {
// if(auto color = column->foregroundColor()) return color; // if(auto color = column->foregroundColor()) return color;
// } //}
if(auto color = self().foregroundColor()) return color; if(auto color = self().foregroundColor()) return color;
return {0, 0, 0}; return {0, 0, 0};
} }
@ -383,21 +384,19 @@ auto pTableView::_setIcons() -> void {
imageList = ImageList_Create(16, 16, ILC_COLOR32, 1, 0); imageList = ImageList_Create(16, 16, ILC_COLOR32, 1, 0);
ListView_SetImageList(hwnd, imageList, LVSIL_SMALL); ListView_SetImageList(hwnd, imageList, LVSIL_SMALL);
if(auto& header = state().header) { for(auto column : range(self().columnCount())) {
for(auto column : range(header->columnCount())) { image icon;
image icon; if(auto& sourceIcon = state().columns[column]->state.icon) {
if(auto& sourceIcon = header->state.columns[column]->state.icon) { icon.allocate(sourceIcon.width(), sourceIcon.height());
icon.allocate(sourceIcon.width(), sourceIcon.height()); memory::copy(icon.data(), sourceIcon.data(), icon.size());
memory::copy(icon.data(), sourceIcon.data(), icon.size()); icon.scale(16, 16);
icon.scale(16, 16); } else {
} else { icon.allocate(16, 16);
icon.allocate(16, 16); icon.fill(0x00ffffff);
icon.fill(0x00ffffff);
}
auto bitmap = CreateBitmap(icon);
ImageList_Add(imageList, bitmap, nullptr);
DeleteObject(bitmap);
} }
auto bitmap = CreateBitmap(icon);
ImageList_Add(imageList, bitmap, nullptr);
DeleteObject(bitmap);
} }
//empty icon used for ListViewItems (drawn manually via onCustomDraw) //empty icon used for ListViewItems (drawn manually via onCustomDraw)
@ -409,31 +408,14 @@ auto pTableView::_setIcons() -> void {
DeleteObject(bitmap); DeleteObject(bitmap);
} }
auto pTableView::_setSortable() -> void {
bool sortable = false;
if(auto& header = state().header) {
for(auto& column : header->state.columns) {
if(column->sortable()) sortable = true;
}
}
//note: this won't change the visual style: WC_LISTVIEW caches this in CreateWindow
auto style = GetWindowLong(hwnd, GWL_STYLE);
!sortable ? style |= LVS_NOSORTHEADER : style &=~ LVS_NOSORTHEADER;
SetWindowLong(hwnd, GWL_STYLE, style);
}
auto pTableView::_width(unsigned column) -> unsigned { auto pTableView::_width(unsigned column) -> unsigned {
if(auto& header = state().header) { if(auto width = self().column(column).width()) return width;
if(auto width = header->state.columns[column]->width()) return width; unsigned width = 1;
unsigned width = 1; if(state().headered) width = max(width, _columnWidth(column));
if(header->visible()) width = max(width, _columnWidth(column)); for(auto row : range(state().items.size())) {
for(auto row : range(state().items.size())) { width = max(width, _cellWidth(row, column));
width = max(width, _cellWidth(row, column));
}
return width;
} }
return 1; return width;
} }
} }

View File

@ -5,9 +5,9 @@ namespace hiro {
struct pTableView : pWidget { struct pTableView : pWidget {
Declare(TableView, Widget) Declare(TableView, Widget)
auto append(sTableViewHeader header) -> void; auto append(sTableViewColumn column) -> void;
auto append(sTableViewItem item) -> void; auto append(sTableViewItem item) -> void;
auto remove(sTableViewHeader header) -> void; auto remove(sTableViewColumn column) -> void;
auto remove(sTableViewItem item) -> void; auto remove(sTableViewItem item) -> void;
auto resizeColumns() -> void; auto resizeColumns() -> void;
auto setAlignment(Alignment alignment) -> void; auto setAlignment(Alignment alignment) -> void;
@ -16,6 +16,8 @@ struct pTableView : pWidget {
auto setBordered(bool bordered) -> void; auto setBordered(bool bordered) -> void;
auto setForegroundColor(Color color) -> void; auto setForegroundColor(Color color) -> void;
auto setGeometry(Geometry geometry) -> void override; auto setGeometry(Geometry geometry) -> void override;
auto setHeadered(bool headered) -> void;
auto setSortable(bool sortable) -> void;
auto onActivate(LPARAM lparam) -> void; auto onActivate(LPARAM lparam) -> void;
auto onChange(LPARAM lparam) -> void; auto onChange(LPARAM lparam) -> void;
@ -30,7 +32,6 @@ struct pTableView : pWidget {
auto _font(unsigned row, unsigned column) -> Font; auto _font(unsigned row, unsigned column) -> Font;
auto _foregroundColor(unsigned row, unsigned column) -> Color; auto _foregroundColor(unsigned row, unsigned column) -> Color;
auto _setIcons() -> void; auto _setIcons() -> void;
auto _setSortable() -> void;
auto _width(unsigned column) -> unsigned; auto _width(unsigned column) -> unsigned;
WindowProc windowProc = nullptr; WindowProc windowProc = nullptr;

View File

@ -25,6 +25,7 @@ auto pTextEdit::destruct() -> void {
auto pTextEdit::setBackgroundColor(Color color) -> void { auto pTextEdit::setBackgroundColor(Color color) -> void {
if(backgroundBrush) { DeleteObject(backgroundBrush); backgroundBrush = 0; } if(backgroundBrush) { DeleteObject(backgroundBrush); backgroundBrush = 0; }
backgroundBrush = CreateSolidBrush(color ? CreateRGB(color) : GetSysColor(COLOR_WINDOW)); backgroundBrush = CreateSolidBrush(color ? CreateRGB(color) : GetSysColor(COLOR_WINDOW));
InvalidateRect(hwnd, 0, true);
} }
auto pTextEdit::setCursor(Cursor cursor) -> void { auto pTextEdit::setCursor(Cursor cursor) -> void {
@ -40,14 +41,14 @@ auto pTextEdit::setEditable(bool editable) -> void {
} }
auto pTextEdit::setForegroundColor(Color color) -> void { auto pTextEdit::setForegroundColor(Color color) -> void {
InvalidateRect(hwnd, 0, true);
} }
auto pTextEdit::setText(string text) -> void { auto pTextEdit::setText(string text) -> void {
lock(); auto lock = acquire();
text.replace("\r", ""); text.replace("\r", "");
text.replace("\n", "\r\n"); text.replace("\n", "\r\n");
SetWindowText(hwnd, utf16_t(text)); SetWindowText(hwnd, utf16_t(text));
unlock();
} }
auto pTextEdit::setWordWrap(bool wordWrap) -> void { auto pTextEdit::setWordWrap(bool wordWrap) -> void {

View File

@ -170,7 +170,7 @@ auto pWindow::setModal(bool modality) -> void {
_modalityUpdate(); _modalityUpdate();
while(state().modal) { while(state().modal) {
Application::processEvents(); Application::processEvents();
if(Application::state.onMain) { if(Application::state().onMain) {
Application::doMain(); Application::doMain();
} else { } else {
usleep(20 * 1000); usleep(20 * 1000);
@ -193,6 +193,9 @@ auto pWindow::setTitle(string text) -> void {
auto pWindow::setVisible(bool visible) -> void { auto pWindow::setVisible(bool visible) -> void {
auto lock = acquire(); auto lock = acquire();
ShowWindow(hwnd, visible ? SW_SHOWNORMAL : SW_HIDE); ShowWindow(hwnd, visible ? SW_SHOWNORMAL : SW_HIDE);
if(auto& sizable = state().sizable) {
sizable->setGeometry(self().geometry().setPosition());
}
if(!visible) setModal(false); if(!visible) setModal(false);
} }

View File

@ -46,8 +46,9 @@ struct image {
inline image(image&& source); inline image(image&& source);
inline image(bool endian, uint depth, uint64_t alphaMask, uint64_t redMask, uint64_t greenMask, uint64_t blueMask); inline image(bool endian, uint depth, uint64_t alphaMask, uint64_t redMask, uint64_t greenMask, uint64_t blueMask);
inline image(const string& filename); inline image(const string& filename);
inline image(const void* data, uint size);
inline image(const vector<uint8_t>& buffer); inline image(const vector<uint8_t>& buffer);
inline image(const uint8_t* data, uint size); template<typename Type, uint Size> inline image(Type (&Name)[Size]);
inline image(); inline image();
inline ~image(); inline ~image();

View File

@ -24,18 +24,17 @@ image::image(const string& filename) {
load(filename); load(filename);
} }
image::image(const vector<uint8_t>& buffer) { image::image(const void* data_, uint size) {
auto data = buffer.data(); auto data = (const uint8_t*)data_;
auto size = buffer.size(); if(size < 4);
if(0);
else if(data[0] == 'B' && data[1] == 'M') loadBMP(data, size); else if(data[0] == 'B' && data[1] == 'M') loadBMP(data, size);
else if(data[1] == 'P' && data[2] == 'N' && data[3] == 'G') loadPNG(data, size); else if(data[1] == 'P' && data[2] == 'N' && data[3] == 'G') loadPNG(data, size);
} }
image::image(const uint8_t* data, unsigned size) { image::image(const vector<uint8_t>& buffer) : image(buffer.data(), buffer.size()) {
if(0); }
else if(data[0] == 'B' && data[1] == 'M') loadBMP(data, size);
else if(data[1] == 'P' && data[2] == 'N' && data[3] == 'G') loadPNG(data, size); template<typename Type, uint Size> image::image(Type (&Name)[Size]) : image(Name, Size) {
} }
image::image() { image::image() {

View File

@ -5,9 +5,9 @@ namespace nall { namespace vfs { namespace memory {
struct file : vfs::file { struct file : vfs::file {
~file() { delete[] _data; } ~file() { delete[] _data; }
static auto open(const uint8_t* data, uintmax size) -> vfs::shared::file { static auto open(const void* data, uintmax size) -> vfs::shared::file {
auto instance = shared_pointer<file>{new file}; auto instance = shared_pointer<file>{new file};
instance->_open(data, size); instance->_open((const uint8_t*)data, size);
return instance; return instance;
} }

View File

@ -12,8 +12,7 @@ ifeq ($(ruby),)
ruby += audio.oss audio.alsa audio.openal audio.pulseaudio audio.pulseaudiosimple audio.ao ruby += audio.oss audio.alsa audio.openal audio.pulseaudio audio.pulseaudiosimple audio.ao
ruby += input.sdl input.xlib input.udev ruby += input.sdl input.xlib input.udev
else ifeq ($(platform),bsd) else ifeq ($(platform),bsd)
# ruby += video.glx video.glx2 video.xvideo video.xshm ruby += video.glx video.glx2 video.xvideo video.xshm
ruby += video.glx2 video.xshm
ruby += audio.oss audio.openal ruby += audio.oss audio.openal
ruby += input.sdl input.xlib ruby += input.sdl input.xlib
endif endif
@ -39,7 +38,7 @@ ruby.options += $(if $(findstring video.xvideo,$(ruby)),-lXv)
ruby.options += $(if $(findstring audio.alsa,$(ruby)),-lasound) ruby.options += $(if $(findstring audio.alsa,$(ruby)),-lasound)
ruby.options += $(if $(findstring audio.ao,$(ruby)),-lao) ruby.options += $(if $(findstring audio.ao,$(ruby)),-lao)
ruby.options += $(if $(findstring audio.directsound,$(ruby)),-ldsound) ruby.options += $(if $(findstring audio.directsound,$(ruby)),-ldsound -luuid)
ruby.options += $(if $(findstring audio.pulseaudio,$(ruby)),-lpulse) ruby.options += $(if $(findstring audio.pulseaudio,$(ruby)),-lpulse)
ruby.options += $(if $(findstring audio.pulseaudiosimple,$(ruby)),-lpulse-simple) ruby.options += $(if $(findstring audio.pulseaudiosimple,$(ruby)),-lpulse-simple)
ruby.options += $(if $(findstring audio.wasapi,$(ruby)),-lavrt -luuid) ruby.options += $(if $(findstring audio.wasapi,$(ruby)),-lavrt -luuid)

View File

@ -1,63 +1,58 @@
#include <alsa/asoundlib.h> #include <alsa/asoundlib.h>
struct AudioALSA : Audio { struct AudioALSA : AudioDriver {
AudioALSA() { initialize(); } AudioALSA& self = *this;
AudioALSA(Audio& super) : AudioDriver(super) {}
~AudioALSA() { terminate(); } ~AudioALSA() { terminate(); }
auto create() -> bool override {
super.setDevice(hasDevices().first());
super.setChannels(2);
super.setFrequency(48000);
super.setLatency(20);
return initialize();
}
auto driver() -> string override { return "ALSA"; } auto driver() -> string override { return "ALSA"; }
auto ready() -> bool override { return _ready; } auto ready() -> bool override { return _ready; }
auto hasDevice() -> bool override { return true; }
auto hasBlocking() -> bool override { return true; } auto hasBlocking() -> bool override { return true; }
auto hasChannels() -> bool override { return true; }
auto hasFrequency() -> bool override { return true; }
auto hasLatency() -> bool override { return true; }
auto availableDevices() -> vector<string> override { auto hasDevices() -> vector<string> override {
return queryDevices(); vector<string> devices;
char** list;
if(snd_device_name_hint(-1, "pcm", (void***)&list) == 0) {
uint index = 0;
while(list[index]) {
char* deviceName = snd_device_name_get_hint(list[index], "NAME");
if(deviceName) devices.append(deviceName);
free(deviceName);
index++;
}
}
snd_device_name_free_hint((void**)list);
return devices;
} }
auto availableChannels() -> vector<uint> override { auto hasChannels() -> vector<uint> override {
return {2}; return {2};
} }
auto availableFrequencies() -> vector<double> override { auto hasFrequencies() -> vector<uint> override {
return {44100.0, 48000.0, 96000.0}; return {44100, 48000, 96000};
} }
auto availableLatencies() -> vector<uint> override { auto hasLatencies() -> vector<uint> override {
return {20, 40, 60, 80, 100}; return {20, 40, 60, 80, 100};
} }
auto setDevice(string device) -> bool override { auto setDevice(string device) -> bool override { return initialize(); }
if(device == Audio::device()) return true; auto setBlocking(bool blocking) -> bool override { return true; }
if(!Audio::setDevice(device)) return false; auto setChannels(uint channels) -> bool override { return true; }
return initialize(); auto setFrequency(uint frequency) -> bool override { return initialize(); }
} auto setLatency(uint latency) -> bool override { return initialize(); }
auto setBlocking(bool blocking) -> bool override {
if(blocking == Audio::blocking()) return true;
if(!Audio::setBlocking(blocking)) return false;
return true;
}
auto setChannels(uint channels) -> bool override {
if(channels == Audio::channels()) return true;
if(!Audio::setChannels(channels)) return false;
return true;
}
auto setFrequency(double frequency) -> bool override {
if(frequency == Audio::frequency()) return true;
if(!Audio::setFrequency(frequency)) return false;
return initialize();
}
auto setLatency(uint latency) -> bool override {
if(latency == Audio::latency()) return true;
if(!Audio::setLatency(latency)) return false;
return initialize();
}
auto level() -> double override { auto level() -> double override {
snd_pcm_sframes_t available = snd_pcm_avail_update(_interface); snd_pcm_sframes_t available = snd_pcm_avail_update(_interface);
@ -66,8 +61,6 @@ struct AudioALSA : Audio {
} }
auto output(const double samples[]) -> void override { auto output(const double samples[]) -> void override {
if(!ready()) return;
_buffer[_offset] = (uint16_t)sclamp<16>(samples[0] * 32767.0) << 0; _buffer[_offset] = (uint16_t)sclamp<16>(samples[0] * 32767.0) << 0;
_buffer[_offset] |= (uint16_t)sclamp<16>(samples[1] * 32767.0) << 16; _buffer[_offset] |= (uint16_t)sclamp<16>(samples[1] * 32767.0) << 16;
_offset++; _offset++;
@ -77,7 +70,7 @@ struct AudioALSA : Audio {
available = snd_pcm_avail_update(_interface); available = snd_pcm_avail_update(_interface);
if(available < 0) snd_pcm_recover(_interface, available, 1); if(available < 0) snd_pcm_recover(_interface, available, 1);
if(available < _offset) { if(available < _offset) {
if(!_blocking) { if(!self.blocking) {
_offset = 0; _offset = 0;
return; return;
} }
@ -113,13 +106,12 @@ private:
auto initialize() -> bool { auto initialize() -> bool {
terminate(); terminate();
string device = "default"; if(!hasDevices().find(self.device)) self.device = hasDevices().first();
if(queryDevices().find(_device)) device = _device; if(snd_pcm_open(&_interface, self.device, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK) < 0) return terminate(), false;
if(snd_pcm_open(&_interface, device, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK) < 0) return terminate(), false;
uint rate = (uint)_frequency; uint rate = self.frequency;
uint bufferTime = _latency * 1000; uint bufferTime = self.latency * 1000;
uint periodTime = _latency * 1000 / 8; uint periodTime = self.latency * 1000 / 8;
snd_pcm_hw_params_t* hardwareParameters; snd_pcm_hw_params_t* hardwareParameters;
snd_pcm_hw_params_alloca(&hardwareParameters); snd_pcm_hw_params_alloca(&hardwareParameters);
@ -162,24 +154,6 @@ private:
} }
} }
auto queryDevices() -> vector<string> {
vector<string> devices;
char** list;
if(snd_device_name_hint(-1, "pcm", (void***)&list) == 0) {
uint index = 0;
while(list[index]) {
char* deviceName = snd_device_name_get_hint(list[index], "NAME");
if(deviceName) devices.append(deviceName);
free(deviceName);
index++;
}
}
snd_device_name_free_hint((void**)list);
return devices;
}
bool _ready = false; bool _ready = false;
snd_pcm_t* _interface = nullptr; snd_pcm_t* _interface = nullptr;

View File

@ -1,24 +1,29 @@
#include <ao/ao.h> #include <ao/ao.h>
struct AudioAO : Audio { struct AudioAO : AudioDriver {
AudioAO() { initialize(); } AudioAO& self = *this;
AudioAO(Audio& super) : AudioDriver(super) {}
~AudioAO() { terminate(); } ~AudioAO() { terminate(); }
auto create() -> bool override {
super.setChannels(2);
super.setFrequency(48000);
return initialize();
}
auto driver() -> string override { return "libao"; } auto driver() -> string override { return "libao"; }
auto ready() -> bool override { return _ready; } auto ready() -> bool override { return _ready; }
auto hasFrequencies() -> bool override { return true; } auto hasChannels() -> vector<uint> override {
return {2};
auto availableFrequencies() -> vector<double> override {
return {44100.0, 48000.0, 96000.0};
} }
auto setFrequency(double frequency) -> bool override { auto hasFrequencies() -> vector<uint> override {
if(frequency == Audio::frequency()) return true; return {44100, 48000, 96000};
if(!Audio::setFrequency(frequency)) return false;
return initialize();
} }
auto setFrequency(uint frequency) -> bool override { return initialize(); }
auto output(const double samples[]) -> void override { auto output(const double samples[]) -> void override {
uint32_t sample = 0; uint32_t sample = 0;
sample |= (uint16_t)sclamp<16>(samples[0] * 32767.0) << 0; sample |= (uint16_t)sclamp<16>(samples[0] * 32767.0) << 0;
@ -38,7 +43,7 @@ private:
ao_sample_format format; ao_sample_format format;
format.bits = 16; format.bits = 16;
format.channels = 2; format.channels = 2;
format.rate = (uint)_frequency; format.rate = self.frequency;
format.byte_format = AO_FMT_LITTLE; format.byte_format = AO_FMT_LITTLE;
format.matrix = nullptr; format.matrix = nullptr;

View File

@ -2,80 +2,70 @@
#include "asio.hpp" #include "asio.hpp"
struct AudioASIO : Audio { struct AudioASIO : Audio {
static AudioASIO* self; static AudioASIO* instance;
AudioASIO() { self = this; initialize(); } AudioASIO& self = *this;
AudioASIO(Audio& super) : AudioDriver(super) { instance = this; }
~AudioASIO() { terminate(); } ~AudioASIO() { terminate(); }
auto create() -> bool override {
super.setDevice(hasDevices().first());
super.setChannels(2);
super.setFrequency(48000);
super.setLatency(2048);
return initialize();
}
auto driver() -> string override { return "ASIO"; } auto driver() -> string override { return "ASIO"; }
auto ready() -> bool override { return _ready; } auto ready() -> bool override { return _ready; }
auto hasContext() -> bool override { return true; } auto hasContext() -> bool override { return true; }
auto hasDevice() -> bool override { return true; }
auto hasBlocking() -> bool override { return true; } auto hasBlocking() -> bool override { return true; }
auto hasChannels() -> bool override { return true; }
auto hasFrequency() -> bool override { return true; }
auto hasLatency() -> bool override { return true; }
auto availableDevices() -> vector<string> override { auto hasDevices() -> vector<string> override {
self.devices.reset();
for(auto candidate : registry::contents("HKLM\\SOFTWARE\\ASIO\\")) {
if(auto classID = registry::read({"HKLM\\SOFTWARE\\ASIO\\", candidate, "CLSID"})) {
self.devices.append({candidate.trimRight("\\", 1L), classID});
}
}
vector<string> devices; vector<string> devices;
for(auto& device : _devices) devices.append(device.name); for(auto& device : self.devices) devices.append(device.name);
return devices; return devices;
} }
auto availableChannels() -> vector<uint> override { auto hasChannels() -> vector<uint> override {
return {1, 2}; return {1, 2};
} }
auto availableFrequencies() -> vector<double> override { auto hasFrequencies() -> vector<uint> override {
return {_frequency}; return {self.frequency};
} }
auto availableLatencies() -> vector<uint> override { auto hasLatencies() -> vector<uint> override {
vector<uint> latencies; vector<uint> latencies;
uint latencyList[] = {64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 6144}; //factors of 6144 uint latencyList[] = {64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 6144}; //factors of 6144
for(auto& latency : latencyList) { for(auto& latency : latencyList) {
if(latency < _active.minimumBufferSize) continue; if(self.activeDevice) {
if(latency > _active.maximumBufferSize) continue; if(latency < self.activeDevice.minimumBufferSize) continue;
if(latency > self.activeDevice.maximumBufferSize) continue;
}
latencies.append(latency); latencies.append(latency);
} }
return latencies; return latencies;
} }
auto setContext(uintptr context) -> bool override { auto setContext(uintptr context) -> bool override { return initialize(); }
if(context == Audio::context()) return true; auto setDevice(string device) -> bool override { return initialize(); }
if(!Audio::setContext(context)) return false; auto setBlocking(bool blocking) -> bool override { return initialize(); }
return initialize(); auto setChannels(uint channels) -> bool override { return initialize(); }
} auto setLatency(uint latency) -> bool override { return initialize(); }
auto setDevice(string device) -> bool override {
if(device == Audio::device()) return true;
if(!Audio::setDevice(device)) return false;
return initialize();
}
auto setBlocking(bool blocking) -> bool override {
if(blocking == Audio::blocking()) return true;
if(!Audio::setBlocking(blocking)) return false;
return initialize();
}
auto setChannels(uint channels) -> bool override {
if(channels == Audio::channels()) return true;
if(!Audio::setChannels(channels)) return false;
return initialize();
}
auto setLatency(uint latency) -> bool override {
if(latency == Audio::latency()) return true;
if(!Audio::setLatency(latency)) return false;
return initialize();
}
auto clear() -> void override { auto clear() -> void override {
if(!ready()) return; if(!ready()) return;
for(uint n : range(_channels)) { for(uint n : range(self.channels)) {
memory::fill<uint8_t>(_channel[n].buffers[0], _latency * _sampleSize); memory::fill<uint8_t>(_channel[n].buffers[0], self.latency * _sampleSize);
memory::fill<uint8_t>(_channel[n].buffers[1], _latency * _sampleSize); memory::fill<uint8_t>(_channel[n].buffers[1], self.latency * _sampleSize);
} }
memory::fill<uint8_t>(_queue.samples, sizeof(_queue.samples)); memory::fill<uint8_t>(_queue.samples, sizeof(_queue.samples));
_queue.read = 0; _queue.read = 0;
@ -85,10 +75,10 @@ struct AudioASIO : Audio {
auto output(const double samples[]) -> void override { auto output(const double samples[]) -> void override {
if(!ready()) return; if(!ready()) return;
if(_blocking) { if(self.blocking) {
while(_queue.count >= _latency); while(_queue.count >= self.latency);
} }
for(uint n : range(_channels)) { for(uint n : range(self.channels)) {
_queue.samples[_queue.write][n] = samples[n]; _queue.samples[_queue.write][n] = samples[n];
} }
_queue.write++; _queue.write++;
@ -99,39 +89,40 @@ private:
auto initialize() -> bool { auto initialize() -> bool {
terminate(); terminate();
//enumerate available ASIO drivers from the registry hasDevices(); //this call populates self.devices
for(auto candidate : registry::contents("HKLM\\SOFTWARE\\ASIO\\")) { if(!self.devices) return false;
if(auto classID = registry::read({"HKLM\\SOFTWARE\\ASIO\\", candidate, "CLSID"})) {
_devices.append({candidate.trimRight("\\", 1L), classID}); self.activeDevice = {};
if(candidate == _device) _active = _devices.right(); for(auto& device : self.devices) {
if(self.device == device.name) {
self.activeDevice = device;
break;
} }
} }
if(!_devices) return false; if(!self.activeDevice) {
self.activeDevice = self.devices.first();
if(!_active.name) { self.device = self.activeDevice.name;
_active = _devices.left();
_device = _active.name;
} }
CLSID classID; CLSID classID;
if(CLSIDFromString((LPOLESTR)utf16_t(_active.classID), (LPCLSID)&classID) != S_OK) return false; if(CLSIDFromString((LPOLESTR)utf16_t(self.activeDevice.classID), (LPCLSID)&classID) != S_OK) return false;
if(CoCreateInstance(classID, 0, CLSCTX_INPROC_SERVER, classID, (void**)&_asio) != S_OK) return false; if(CoCreateInstance(classID, 0, CLSCTX_INPROC_SERVER, classID, (void**)&_asio) != S_OK) return false;
if(!_asio->init((void*)_context)) return false; if(!_asio->init((void*)self.context)) return false;
if(_asio->getSampleRate(&_active.sampleRate) != ASE_OK) return false; if(_asio->getSampleRate(&self.activeDevice.sampleRate) != ASE_OK) return false;
if(_asio->getChannels(&_active.inputChannels, &_active.outputChannels) != ASE_OK) return false; if(_asio->getChannels(&self.activeDevice.inputChannels, &self.activeDevice.outputChannels) != ASE_OK) return false;
if(_asio->getBufferSize( if(_asio->getBufferSize(
&_active.minimumBufferSize, &self.activeDevice.minimumBufferSize,
&_active.maximumBufferSize, &self.activeDevice.maximumBufferSize,
&_active.preferredBufferSize, &self.activeDevice.preferredBufferSize,
&_active.granularity &self.activeDevice.granularity
) != ASE_OK) return false; ) != ASE_OK) return false;
_frequency = _active.sampleRate; self.frequency = self.activeDevice.sampleRate;
_latency = _latency < _active.minimumBufferSize ? _active.minimumBufferSize : _latency; self.latency = self.latency < self.activeDevice.minimumBufferSize ? self.activeDevice.minimumBufferSize : self.latency;
_latency = _latency > _active.maximumBufferSize ? _active.maximumBufferSize : _latency; self.latency = self.latency > self.activeDevice.maximumBufferSize ? self.activeDevice.maximumBufferSize : self.latency;
for(auto n : range(_channels)) { for(uint n : range(self.channels)) {
_channel[n].isInput = false; _channel[n].isInput = false;
_channel[n].channelNum = n; _channel[n].channelNum = n;
_channel[n].buffers[0] = nullptr; _channel[n].buffers[0] = nullptr;
@ -142,8 +133,8 @@ private:
callbacks.sampleRateDidChange = &AudioASIO::_sampleRateDidChange; callbacks.sampleRateDidChange = &AudioASIO::_sampleRateDidChange;
callbacks.asioMessage = &AudioASIO::_asioMessage; callbacks.asioMessage = &AudioASIO::_asioMessage;
callbacks.bufferSwitchTimeInfo = &AudioASIO::_bufferSwitchTimeInfo; callbacks.bufferSwitchTimeInfo = &AudioASIO::_bufferSwitchTimeInfo;
if(_asio->createBuffers(_channel, _channels, _latency, &callbacks) != ASE_OK) return false; if(_asio->createBuffers(_channel, self.channels, self.latency, &callbacks) != ASE_OK) return false;
if(_asio->getLatencies(&_active.inputLatency, &_active.outputLatency) != ASE_OK) return false; if(_asio->getLatencies(&self.activeDevice.inputLatency, &self.activeDevice.outputLatency) != ASE_OK) return false;
//assume for the sake of sanity that all buffers use the same sample format ... //assume for the sake of sanity that all buffers use the same sample format ...
ASIOChannelInfo channelInformation = {}; ASIOChannelInfo channelInformation = {};
@ -167,8 +158,7 @@ private:
auto terminate() -> void { auto terminate() -> void {
_ready = false; _ready = false;
_devices.reset(); self.activeDevice = {};
_active = {};
if(_asio) { if(_asio) {
_asio->stop(); _asio->stop();
_asio->disposeBuffers(); _asio->disposeBuffers();
@ -179,33 +169,33 @@ private:
private: private:
static auto _bufferSwitch(long doubleBufferInput, ASIOBool directProcess) -> void { static auto _bufferSwitch(long doubleBufferInput, ASIOBool directProcess) -> void {
return self->bufferSwitch(doubleBufferInput, directProcess); return instance->bufferSwitch(doubleBufferInput, directProcess);
} }
static auto _sampleRateDidChange(ASIOSampleRate sampleRate) -> void { static auto _sampleRateDidChange(ASIOSampleRate sampleRate) -> void {
return self->sampleRateDidChange(sampleRate); return instance->sampleRateDidChange(sampleRate);
} }
static auto _asioMessage(long selector, long value, void* message, double* optional) -> long { static auto _asioMessage(long selector, long value, void* message, double* optional) -> long {
return self->asioMessage(selector, value, message, optional); return instance->asioMessage(selector, value, message, optional);
} }
static auto _bufferSwitchTimeInfo(ASIOTime* parameters, long doubleBufferIndex, ASIOBool directProcess) -> ASIOTime* { static auto _bufferSwitchTimeInfo(ASIOTime* parameters, long doubleBufferIndex, ASIOBool directProcess) -> ASIOTime* {
return self->bufferSwitchTimeInfo(parameters, doubleBufferIndex, directProcess); return instance->bufferSwitchTimeInfo(parameters, doubleBufferIndex, directProcess);
} }
auto bufferSwitch(long doubleBufferInput, ASIOBool directProcess) -> void { auto bufferSwitch(long doubleBufferInput, ASIOBool directProcess) -> void {
for(uint sampleIndex : range(_latency)) { for(uint sampleIndex : range(self.latency)) {
double samples[8] = {0}; double samples[8] = {0};
if(_queue.count) { if(_queue.count) {
for(uint n : range(_channels)) { for(uint n : range(self.channels)) {
samples[n] = _queue.samples[_queue.read][n]; samples[n] = _queue.samples[_queue.read][n];
} }
_queue.read++; _queue.read++;
_queue.count--; _queue.count--;
} }
for(uint n : range(_channels)) { for(uint n : range(self.channels)) {
auto buffer = (uint8_t*)_channel[n].buffers[doubleBufferInput]; auto buffer = (uint8_t*)_channel[n].buffers[doubleBufferInput];
buffer += sampleIndex * _sampleSize; buffer += sampleIndex * _sampleSize;
@ -263,6 +253,8 @@ private:
}; };
struct Device { struct Device {
explicit operator bool() const { return name; }
string name; string name;
string classID; string classID;
@ -278,12 +270,12 @@ private:
}; };
Queue _queue; Queue _queue;
vector<Device> _devices; vector<Device> devices;
Device _active; Device activeDevice;
IASIO* _asio = nullptr; IASIO* _asio = nullptr;
ASIOBufferInfo _channel[8]; ASIOBufferInfo _channel[8];
long _sampleFormat; long _sampleFormat;
long _sampleSize; long _sampleSize;
}; };
AudioASIO* AudioASIO::self = nullptr; AudioASIO* AudioASIO::instance = nullptr;

View File

@ -1,51 +1,33 @@
#include <dsound.h> #include <dsound.h>
struct AudioDirectSound : Audio { struct AudioDirectSound : AudioDriver {
AudioDirectSound() { AudioDirectSound& self = *this;
Audio::setFrequency(48000.0); AudioDirectSound(Audio& super) : AudioDriver(super) {}
Audio::setLatency(40); ~AudioDirectSound() { terminate(); }
initialize();
}
~AudioDirectSound() { auto create() -> bool override {
terminate(); super.setChannels(2);
super.setFrequency(48000);
super.setLatency(40);
return initialize();
} }
auto driver() -> string override { return "DirectSound"; } auto driver() -> string override { return "DirectSound"; }
auto ready() -> bool override { return _ready; } auto ready() -> bool override { return _ready; }
auto hasBlocking() -> bool override { return true; } auto hasBlocking() -> bool override { return true; }
auto hasFrequency() -> bool override { return true; }
auto hasLatency() -> bool override { return true; }
auto availableFrequencies() -> vector<double> override { auto hasFrequencies() -> vector<uint> override {
return {44100.0, 48000.0, 96000.0}; return {44100, 48000, 96000};
} }
auto availableLatencies() -> vector<uint> override { auto hasLatencies() -> vector<uint> override {
return {40, 60, 80, 100}; return {40, 60, 80, 100};
} }
auto defaultFrequency() -> double override { return 48000.0; } auto setBlocking(bool blocking) -> bool override { return true; }
auto defaultLatency() -> uint override { return 40; } auto setFrequency(uint frequency) -> bool override { return initialize(); }
auto setLatency(uint latency) -> bool override { return initialize(); }
auto setBlocking(bool blocking) -> bool override {
if(blocking == Audio::blocking()) return true;
if(!Audio::setBlocking(blocking)) return false;
return true;
}
auto setFrequency(double frequency) -> bool override {
if(frequency == Audio::frequency()) return true;
if(!Audio::setFrequency(frequency)) return false;
return initialize();
}
auto setLatency(uint latency) -> bool override {
if(latency == Audio::latency()) return true;
if(!Audio::setLatency(latency)) return false;
return initialize();
}
auto clear() -> void override { auto clear() -> void override {
if(!ready()) return; if(!ready()) return;
@ -78,7 +60,7 @@ struct AudioDirectSound : Audio {
if(++_offset < _period) return; if(++_offset < _period) return;
_offset = 0; _offset = 0;
if(_blocking) { if(self.blocking) {
//wait until playback buffer has an empty ring to write new audio data to //wait until playback buffer has an empty ring to write new audio data to
while(_ringDistance >= _rings - 1) { while(_ringDistance >= _rings - 1) {
DWORD position; DWORD position;
@ -115,7 +97,7 @@ private:
terminate(); terminate();
_rings = 8; _rings = 8;
_period = _frequency * _latency / _rings / 1000.0 + 0.5; _period = self.frequency * self.latency / _rings / 1000.0 + 0.5;
_buffer = new uint32_t[_period * _rings]; _buffer = new uint32_t[_period * _rings];
_offset = 0; _offset = 0;
@ -131,8 +113,8 @@ private:
WAVEFORMATEX waveFormat = {}; WAVEFORMATEX waveFormat = {};
waveFormat.wFormatTag = WAVE_FORMAT_PCM; waveFormat.wFormatTag = WAVE_FORMAT_PCM;
waveFormat.nChannels = _channels; waveFormat.nChannels = self.channels;
waveFormat.nSamplesPerSec = (uint)_frequency; waveFormat.nSamplesPerSec = self.frequency;
waveFormat.wBitsPerSample = 16; waveFormat.wBitsPerSample = 16;
waveFormat.nBlockAlign = waveFormat.nChannels * waveFormat.wBitsPerSample / 8; waveFormat.nBlockAlign = waveFormat.nChannels * waveFormat.wBitsPerSample / 8;
waveFormat.nAvgBytesPerSec = waveFormat.nSamplesPerSec * waveFormat.nBlockAlign; waveFormat.nAvgBytesPerSec = waveFormat.nSamplesPerSec * waveFormat.nBlockAlign;
@ -145,7 +127,7 @@ private:
secondaryDescription.guid3DAlgorithm = GUID_NULL; secondaryDescription.guid3DAlgorithm = GUID_NULL;
secondaryDescription.lpwfxFormat = &waveFormat; secondaryDescription.lpwfxFormat = &waveFormat;
_interface->CreateSoundBuffer(&secondaryDescription, &_secondary, 0); _interface->CreateSoundBuffer(&secondaryDescription, &_secondary, 0);
_secondary->SetFrequency((uint)_frequency); _secondary->SetFrequency(self.frequency);
_secondary->SetCurrentPosition(0); _secondary->SetCurrentPosition(0);
_ready = true; _ready = true;

View File

@ -7,6 +7,7 @@
#endif #endif
struct AudioOpenAL : AudioDriver { struct AudioOpenAL : AudioDriver {
AudioOpenAL& self = *this;
AudioOpenAL(Audio& driver) : AudioDriver(super) {} AudioOpenAL(Audio& driver) : AudioDriver(super) {}
~AudioOpenAL() { terminate(); } ~AudioOpenAL() { terminate(); }
@ -161,8 +162,6 @@ private:
return true; return true;
} }
AudioOpenAL& self = *this;
bool _ready = false; bool _ready = false;
ALCdevice* _openAL = nullptr; ALCdevice* _openAL = nullptr;

View File

@ -14,6 +14,7 @@
#endif #endif
struct AudioOSS : AudioDriver { struct AudioOSS : AudioDriver {
AudioOSS& self = *this;
AudioOSS(Audio& super) : AudioDriver(super) {} AudioOSS(Audio& super) : AudioDriver(super) {}
~AudioOSS() { terminate(); } ~AudioOSS() { terminate(); }
@ -118,8 +119,6 @@ private:
return true; return true;
} }
AudioOSS& self = *this;
int _fd = -1; int _fd = -1;
int _format = AFMT_S16_LE; int _format = AFMT_S16_LE;
int _bufferSize = 1; int _bufferSize = 1;

View File

@ -1,41 +1,32 @@
#include <pulse/pulseaudio.h> #include <pulse/pulseaudio.h>
struct AudioPulseAudio : Audio { struct AudioPulseAudio : Audio {
AudioPulseAudio() { initialize(); } AudioPulseAudio& self = *this;
AudioPulseAudio(Audio& super) : AudioDriver(super) {}
~AudioPulseAudio() { terminate(); } ~AudioPulseAudio() { terminate(); }
auto create() -> bool override {
super.setFrequency(48000);
super.setLatency(40);
return initialize();
}
auto driver() -> string override { return "PulseAudio"; } auto driver() -> string override { return "PulseAudio"; }
auto ready() -> bool override { return _ready; } auto ready() -> bool override { return _ready; }
auto hasBlocking() -> bool override { return true; } auto hasBlocking() -> bool override { return true; }
auto hasFrequency() -> bool override { return true; }
auto hasLatency() -> bool override { return true; }
auto availableFrequencies() -> vector<double> override { auto hasFrequencies() -> vector<uint> override {
return {44100.0, 48000.0, 96000.0}; return {44100, 48000, 96000};
} }
auto availableLatencies() -> vector<uint> override { auto hasLatencies() -> vector<uint> override {
return {20, 40, 60, 80, 100}; return {20, 40, 60, 80, 100};
} }
auto setBlocking(bool blocking) -> bool override { auto setBlocking(bool blocking) -> bool override { return true; }
if(blocking == Audio::blocking()) return true; auto setFrequency(double frequency) -> bool override { return initialize(); }
if(!Audio::setBlocking(blocking)) return false; auto setLatency(uint latency) -> bool override { return initialize(); }
return true;
}
auto setFrequency(double frequency) -> bool override {
if(frequency == Audio::frequency()) return true;
if(!Audio::setFrequency(frequency)) return false;
return initialize();
}
auto setLatency(uint latency) -> bool override {
if(latency == Audio::latency()) return true;
if(!Audio::setLatency(latency)) return false;
return initialize();
}
auto output(const double samples[]) -> void override { auto output(const double samples[]) -> void override {
pa_stream_begin_write(_stream, (void**)&_buffer, &_period); pa_stream_begin_write(_stream, (void**)&_buffer, &_period);
@ -80,12 +71,12 @@ private:
_specification.format = PA_SAMPLE_S16LE; _specification.format = PA_SAMPLE_S16LE;
_specification.channels = 2; _specification.channels = 2;
_specification.rate = (uint)_frequency; _specification.rate = self.frequency;
_stream = pa_stream_new(_context, "audio", &_specification, nullptr); _stream = pa_stream_new(_context, "audio", &_specification, nullptr);
pa_buffer_attr bufferAttributes; pa_buffer_attr bufferAttributes;
bufferAttributes.maxlength = -1; bufferAttributes.maxlength = -1;
bufferAttributes.tlength = pa_usec_to_bytes(_latency * PA_USEC_PER_MSEC, &_specification); bufferAttributes.tlength = pa_usec_to_bytes(self.latency * PA_USEC_PER_MSEC, &_specification);
bufferAttributes.prebuf = -1; bufferAttributes.prebuf = -1;
bufferAttributes.minreq = -1; bufferAttributes.minreq = -1;
bufferAttributes.fragsize = -1; bufferAttributes.fragsize = -1;

View File

@ -1,24 +1,25 @@
#include <pulse/simple.h> #include <pulse/simple.h>
#include <pulse/error.h> #include <pulse/error.h>
struct AudioPulseAudioSimple : Audio { struct AudioPulseAudioSimple : AudioDriver {
AudioPulseAudioSimple() { initialize(); } AudioPulseAudioSimple& self = *this;
AudioPulseAudioSimple(Audio& super) : AudioDriver(super) {}
~AudioPulseAudioSimple() { terminate(); } ~AudioPulseAudioSimple() { terminate(); }
auto create() -> bool override {
super.setBlocking(true);
super.setFrequency(48000);
return initialize();
}
auto driver() -> string override { return "PulseAudioSimple"; } auto driver() -> string override { return "PulseAudioSimple"; }
auto ready() -> bool override { return _ready; } auto ready() -> bool override { return _ready; }
auto hasFrequency() -> bool override { return true; } auto hasFrequencies() -> vector<uint> override {
return {44100, 48000, 96000};
auto availableFrequencies() -> vector<double> override {
return {44100.0, 48000.0, 96000.0};
} }
auto setFrequency(double frequency) -> bool override { auto setFrequency(uint frequency) -> bool override { return initialize(); }
if(frequency == Audio::frequency()) return true;
if(!Audio::setFrequency(frequency)) return false;
return initialize();
}
auto output(const double samples[]) -> void override { auto output(const double samples[]) -> void override {
if(!ready()) return; if(!ready()) return;
@ -39,7 +40,7 @@ private:
pa_sample_spec specification; pa_sample_spec specification;
specification.format = PA_SAMPLE_S16LE; specification.format = PA_SAMPLE_S16LE;
specification.channels = 2; specification.channels = 2;
specification.rate = (uint)_frequency; specification.rate = self.frequency;
int error = 0; int error = 0;
_interface = pa_simple_new( _interface = pa_simple_new(

Some files were not shown because too many files have changed in this diff Show More