mirror of
https://github.com/libretro/RetroArch
synced 2025-03-18 13:20:57 +00:00
(BlackBerry) Add an initial BB10 UI with no backend logic yet.
This commit is contained in:
parent
a4ddcd7d35
commit
3ca36a49d7
@ -126,47 +126,6 @@
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.toolChain.909118143">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.toolChain.909118143" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildProperties="" description="" id="com.qnx.qcc.toolChain.909118143" name="Simulator-Debug" parent="org.eclipse.cdt.build.core.emptycfg">
|
||||
<folderInfo id="com.qnx.qcc.toolChain.909118143.414585179" name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.433273103" name="com.qnx.qcc.toolChain" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.os.288972332" name="Target OS:" superClass="com.qnx.qcc.option.os"/>
|
||||
<option id="com.qnx.qcc.option.cpu.1656717976" name="Target CPU:" superClass="com.qnx.qcc.option.cpu"/>
|
||||
<option id="com.qnx.qcc.option.compiler.259358634" name="Compiler:" superClass="com.qnx.qcc.option.compiler"/>
|
||||
<option id="com.qnx.qcc.option.runtime.28376933" name="Runtime:" superClass="com.qnx.qcc.option.runtime"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.367181009" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder autoBuildTarget="Simulator-Debug" enableAutoBuild="true" id="com.qnx.qcc.toolChain.909118143.1316917183" incrementalBuildTarget="Simulator-Debug" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.838427162" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.867961838" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.0" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.592769933" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1937785677" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1519327803" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.909396629" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.1497654129" name="QCC Linker" superClass="com.qnx.qcc.tool.linker"/>
|
||||
<tool id="com.qnx.qcc.tool.archiver.525603259" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="helloforeignwindow.null.1735512392" name="helloforeignwindow"/>
|
||||
|
@ -2,6 +2,7 @@ APP_NAME = RetroArch-Cascades
|
||||
|
||||
CONFIG += qt warn_on cascades10
|
||||
|
||||
LIBS += -lscreen
|
||||
LIBS += -lscreen
|
||||
LIBS += -lbbcascadespickers
|
||||
|
||||
include(config.pri)
|
||||
|
BIN
blackberry-qnx/bb10/assets/images/file.png
Normal file
BIN
blackberry-qnx/bb10/assets/images/file.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
blackberry-qnx/bb10/assets/images/icon.png
Normal file
BIN
blackberry-qnx/bb10/assets/images/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
blackberry-qnx/bb10/assets/images/open.png
Normal file
BIN
blackberry-qnx/bb10/assets/images/open.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 669 B |
@ -1,25 +1,109 @@
|
||||
/* Copyright (c) 2012 Research In Motion Limited.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import bb.cascades 1.0
|
||||
import bb.cascades.pickers 1.0
|
||||
|
||||
TabbedPane {
|
||||
Tab {
|
||||
Page {
|
||||
Container {
|
||||
|
||||
actions: [
|
||||
ActionItem {
|
||||
title: "Play"
|
||||
ActionBar.placement: ActionBarPlacement.OnBar
|
||||
imageSource: "asset:///images/open.png"
|
||||
onTriggered: {
|
||||
if(RetroArch.rom == "" || RetroArch.core == ""){
|
||||
//Do something to focus on select rom box
|
||||
} else {
|
||||
OrientationSupport.supportedDisplayOrientation =
|
||||
SupportedDisplayOrientation.DisplayLandscape;
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
titleBar: TitleBar {
|
||||
id: titleBar
|
||||
title: "RetroArch"
|
||||
}
|
||||
|
||||
Container {
|
||||
horizontalAlignment: HorizontalAlignment.Fill
|
||||
verticalAlignment: VerticalAlignment.Fill
|
||||
rightPadding: 20
|
||||
leftPadding: 20
|
||||
|
||||
layout: DockLayout {}
|
||||
|
||||
Container {
|
||||
preferredWidth: 680
|
||||
horizontalAlignment: HorizontalAlignment.Center
|
||||
verticalAlignment: VerticalAlignment.Center
|
||||
|
||||
ImageView
|
||||
{
|
||||
horizontalAlignment: HorizontalAlignment.Center
|
||||
imageSource: "asset:///images/icon.png"
|
||||
preferredWidth: 200
|
||||
preferredHeight: 200
|
||||
}
|
||||
|
||||
DropDown
|
||||
{
|
||||
id: _core
|
||||
objectName: "dropdown_core"
|
||||
horizontalAlignment: HorizontalAlignment.Center
|
||||
title: "Core Selection"
|
||||
}
|
||||
|
||||
Container {
|
||||
horizontalAlignment: HorizontalAlignment.Center
|
||||
preferredWidth: 680
|
||||
|
||||
layout: StackLayout {
|
||||
orientation: LayoutOrientation.LeftToRight
|
||||
}
|
||||
|
||||
DropDown
|
||||
{
|
||||
id: romName
|
||||
verticalAlignment: VerticalAlignment.Center
|
||||
horizontalAlignment: HorizontalAlignment.Center
|
||||
preferredWidth: 600
|
||||
enabled: false
|
||||
//hintText: "Select a ROM"
|
||||
title: if(picker.selectedFile)
|
||||
picker.selectedFile
|
||||
else
|
||||
"Rom Selection"
|
||||
}
|
||||
|
||||
ImageButton {
|
||||
horizontalAlignment: HorizontalAlignment.Right
|
||||
defaultImageSource: "asset:///images/file.png"
|
||||
onClicked: {
|
||||
picker.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
attachedObjects: [
|
||||
FilePicker {
|
||||
id: picker
|
||||
|
||||
property string selectedFile
|
||||
|
||||
title: "Rom Selector"
|
||||
filter: []
|
||||
type: FileType.Other
|
||||
directories: ["/accounts/1000/shared/documents/roms"]
|
||||
|
||||
onFileSelected: {
|
||||
RetroArch.rom = selectedFiles[0];
|
||||
selectedFile = RetroArch.rom.substr(RetroArch.rom.lastIndexOf('/')+1);
|
||||
picker.directories = [RetroArch.rom.substr(0, RetroArch.rom.lastIndexOf('/'))];
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Tab {
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
<!-- A universally unique application identifier. Must be unique across all BlackBerry 10 applications.
|
||||
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
|
||||
<id>com.example.helloforeignwindow</id>
|
||||
<id>com.example.RetroArch</id>
|
||||
|
||||
<!-- The name that is displayed in the BlackBerry 10 application installer.
|
||||
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
||||
@ -30,8 +30,7 @@
|
||||
<!-- Name of author which is used for signing. Must match the developer name of your development certificate. -->
|
||||
|
||||
<initialWindow>
|
||||
<aspectRatio>landscape</aspectRatio>
|
||||
<autoOrients>false</autoOrients>
|
||||
<autoOrients>true</autoOrients>
|
||||
<systemChrome>none</systemChrome>
|
||||
<transparent>false</transparent>
|
||||
</initialWindow>
|
||||
@ -68,7 +67,7 @@
|
||||
|
||||
|
||||
<!-- Bright theme is used for this application. -->
|
||||
<cascadesTheme>bright</cascadesTheme>
|
||||
<cascadesTheme>dark</cascadesTheme>
|
||||
|
||||
<!-- Request permission to execute native code. Required for native applications. -->
|
||||
<permission system="true">run_native</permission>
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <bb/cascades/AbstractPane>
|
||||
#include <bb/cascades/QmlDocument>
|
||||
#include <bb/cascades/Window>
|
||||
#include <bb/cascades/pickers/FilePicker>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
@ -26,6 +27,9 @@ using namespace bb::cascades;
|
||||
|
||||
RetroArch::RetroArch()
|
||||
{
|
||||
qmlRegisterType<bb::cascades::pickers::FilePicker>("bb.cascades.pickers", 1, 0, "FilePicker");
|
||||
qmlRegisterUncreatableType<bb::cascades::pickers::FileType>("bb.cascades.pickers", 1, 0, "FileType", "");
|
||||
|
||||
// Create a QML document and load the main UI QML file, using build patterns.
|
||||
QmlDocument *qml = QmlDocument::create("asset:///mainPage.qml");
|
||||
|
||||
@ -58,6 +62,29 @@ RetroArch::~RetroArch()
|
||||
void RetroArch::run()
|
||||
{
|
||||
while (true) {
|
||||
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Properties
|
||||
*/
|
||||
|
||||
QString RetroArch::getRom()
|
||||
{
|
||||
return rom;
|
||||
}
|
||||
|
||||
void RetroArch::setRom(QString rom)
|
||||
{
|
||||
this->rom = rom;
|
||||
}
|
||||
|
||||
QString RetroArch::getCore()
|
||||
{
|
||||
return core;
|
||||
}
|
||||
void RetroArch::setCore(QString core)
|
||||
{
|
||||
this->core = core;
|
||||
}
|
||||
|
@ -1,19 +1,5 @@
|
||||
/* Copyright (c) 2012 Research In Motion Limited.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifndef _HELLOFOREIGNWINDOW_H_
|
||||
#define _HELLOFOREIGNWINDOW_H_
|
||||
#ifndef _RETROARCHCASCADES_H_
|
||||
#define _RETROARCHCASCADES_H_
|
||||
|
||||
#include <bb/cascades/Application>
|
||||
#include <screen/screen.h>
|
||||
@ -33,10 +19,17 @@ class RetroArch: public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(QString rom READ getRom WRITE setRom NOTIFY romChanged)
|
||||
Q_PROPERTY(QString core READ getCore WRITE setCore NOTIFY coreChanged)
|
||||
|
||||
public:
|
||||
RetroArch();
|
||||
~ RetroArch();
|
||||
|
||||
signals:
|
||||
void romChanged(QString);
|
||||
void coreChanged(QString);
|
||||
|
||||
private:
|
||||
/**
|
||||
* This QThread-run function runs the custom window rendering in a separate thread to avoid lag
|
||||
@ -44,6 +37,14 @@ private:
|
||||
*/
|
||||
void run();
|
||||
|
||||
QString rom;
|
||||
QString getRom();
|
||||
void setRom(QString rom);
|
||||
|
||||
QString core;
|
||||
QString getCore();
|
||||
void setCore(QString core);
|
||||
|
||||
};
|
||||
|
||||
#endif // ifndef _HELLOFOREIGNWINDOW_H_
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user