Application Design
###Application Design Learn the basics of writing, designing, and packaging a Python OS application.
An application should contain at least two files.
- A Python source, usually
__init__.py
, containing your application. - An
app.json
file, containing manifest data.
app.json
This file contains JSON data. It is read by Python OS and is used to determine application properties. It can contain any data, which is loaded into an Application
object's parameters
variable. Below is a list of all the supported (meaningful) entries. Those marked with a * are required to build the object.
-
name
*: The name (package name) of the application. -
title
* The title of the app. Appears in the launcher. -
version
*: The version of the app. Must be a float or an int, for example 1.0 or 10. -
author
*: The author of the app. -
module
*: The importable path of the application, relative to theapps/
directory. -
main
: The function to run as the app's main loop. -
description
: A description of the app. -
more
: A dictionary containing further information about the application.
Items contained in more
-
icon
: The path to the app's icon. -
onStart
: The method to call when the app is started.
Wiki and documentation by Adam Furman. Find an error or have a suggestion? Send it to furmada (at) gmail dot com.
Documentation
-
Application
class -
ApplicationList
class -
Notification
class-
PermanentNotification
class
-
-
NotificationQueue
class -
DataStore
class -
ImmersionUI
class
-
State
class
-
GUI
class
The following classes are all under the GUI class, e.g. Font
is actually accessed as GUI.Font
.
-
Font
class -
Icons
class -
ColorPalette
class -
LongClickEvent
class -
IntermediateUpdateEvent
class -
EventQueue
class -
FunctionBar
class -
Keyboard
class -
Overlay
class -
Dialog
class-
OKDialog
dialog -
ErrorDialog
dialog -
WarningDialog
dialog -
YNDialog
dialog -
OKCancelDialog
dialog -
AskDialog
dialog -
CustomContentDialog
dialog
-
-
NotificationMenu
overlay-
RecentAppSwitcher
overlay -
Selector
overlay
-
-
Component
class
The following classes are all Components
, they inherit from that class.
-
Container
component -
AppContainer
container -
Button
container -
KeyboardButton
container -
TextEntryField
container -
PagedContainer
container-
GriddedPagedContainer
container -
ListedPagedContainer
container
-
-
ButtonRow
container -
ScrollableContainer
container-
ListScrollableContainer
container -
TextScrollableContainer
container -
MultiLineTextEntryField
container
-
-
Text
component -
MultiLineText
component -
ExpandingMultiLineText
component -
Image
component -
Slider
component -
Checkbox
component -
Switch
component -
Canvas
component -
ScrollIndicator
component