diff options
-rw-r--r-- | .codedocs | 26 | ||||
-rw-r--r-- | doxygen_resources/Doxyfile.doxy | 3 | ||||
-rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/doxygen/Doxyfile | 33 | ||||
-rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/doxygen/DoxygenLayout.xml | 199 | ||||
-rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/doxygen/Modules/logo-python.png | bin | 0 -> 6197 bytes | |||
-rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/doxygen/Modules/modules_python.dox | 143 |
6 files changed, 399 insertions, 5 deletions
@@ -9,4 +9,28 @@ ALIASES = "table_start=<table width= 100% style= border bgcolor= "table_h3{3}=<tr bgcolor= 576f9f><th width= 30% align=left>\1</th><th width= 10% align=left>\2</th><th width= 60% align=left>\3</th></tr>" \ "table_row3{3}=<tr bgcolor=white><td width= 30% align=left>\1</td><td width= 10% align=left>\2</td><td width= 60% align=left>\3</td></tr>" \ "python_func{1}=\htmlonly <h4><code><span style=\"font-style: italic;\">Function: </span><span style=\"font-style: bold;\"><font color=31363b><big>\1</big></font></span></code></h4> \endhtmlonly" \ - "python_class{1}=\htmlonly <h4><code><span style=\"font-style: italic;\">Class: </span><span style=\"font-style: bold;\"><font color=31363b><big>\1</big></font></span></code></h4> \endhtmlonly" + "python_class{1}=\htmlonly <h4><code><span style=\"font-style: italic;\">Class: </span><span style=\"font-style: bold;\"><font color=31363b><big>\1</big></font></span></code></h4> \endhtmlonly" \ + "doc_header{1}=\htmlonly <h3><span style=\"text-decoration: underline;\"><span style=\"font-style: italic;\"><span style=\"color: rgb(102, 102, 102);\">\1</span></span></span></h3> \endhtmlonly" + +# Hide undocumented class members. +HIDE_UNDOC_MEMBERS = + +# Hide undocumented classes. +HIDE_UNDOC_CLASSES = + +# Specify a markdown page whose contents should be used as the main page +# (index.html). This will override a page marked as \mainpage. For example, a +# README.md file usually serves as a useful main page. +USE_MDFILE_AS_MAINPAGE = + +# Specify external repository to link documentation with. +# This is similar to Doxygen's TAGFILES option, but will automatically link to +# tags of other repositories already using CodeDocs. List each repository to +# link with by giving its location in the form of owner/repository. +# For example: +# TAGLINKS = doxygen/doxygen CodeDocs/osg +# Note: these repositories must already be built on CodeDocs. +TAGLINKS = + +PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \ + DOXYGEN_SHOULD_USE_THIS diff --git a/doxygen_resources/Doxyfile.doxy b/doxygen_resources/Doxyfile.doxy index d8b64e9419..3cafe816d8 100644 --- a/doxygen_resources/Doxyfile.doxy +++ b/doxygen_resources/Doxyfile.doxy @@ -2088,7 +2088,8 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = +PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \ + DOXYGEN_SHOULD_USE_THIS # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/xbmc/addons/kodi-addon-dev-kit/doxygen/Doxyfile b/xbmc/addons/kodi-addon-dev-kit/doxygen/Doxyfile index 7beda22999..13a35a1987 100644 --- a/xbmc/addons/kodi-addon-dev-kit/doxygen/Doxyfile +++ b/xbmc/addons/kodi-addon-dev-kit/doxygen/Doxyfile @@ -178,7 +178,7 @@ STRIP_FROM_INC_PATH = . # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. -SHORT_NAMES = YES +SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief @@ -379,7 +379,7 @@ SUBGROUPING = YES # SEPARATE_MEMBER_PAGES. # The default value is: NO. -INLINE_GROUPED_CLASSES = YES +INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in @@ -782,6 +782,7 @@ INPUT = main.txt \ ../../../../CODING_GUIDELINES.dox \ ../../../GUIInfoManager.cpp \ Modules/modules_general.dox \ + Modules/modules_python.dox \ Skin/skin.dox \ ../../../guilib/GUIRenderingControl.dox \ ../../../guilib/GUIButtonControl.dox \ @@ -829,6 +830,31 @@ INPUT = main.txt \ ../../../interfaces/builtins/SkinBuiltins.cpp \ ../../../interfaces/builtins/SystemBuiltins.cpp \ ../../../interfaces/builtins/WeatherBuiltins.cpp \ + ../../../interfaces/legacy/Keyboard.h \ + ../../../interfaces/legacy/InfoTagMusic.h \ + ../../../interfaces/legacy/InfoTagVideo.h \ + ../../../interfaces/legacy/Addon.h \ + ../../../interfaces/legacy/Dialog.h \ + ../../../interfaces/legacy/ModuleXbmc.h \ + ../../../interfaces/legacy/ModuleXbmcgui.h \ + ../../../interfaces/legacy/File.h \ + ../../../interfaces/legacy/ListItem.h \ + ../../../interfaces/legacy/Monitor.h \ + ../../../interfaces/legacy/ModuleXbmcvfs.h \ + ../../../interfaces/legacy/ModuleXbmcplugin.h \ + ../../../interfaces/legacy/InfoTagRadioRDS.h \ + ../../../interfaces/legacy/Window.h \ + ../../../interfaces/legacy/WindowDialog.h \ + ../../../interfaces/legacy/WindowXML.h \ + ../../../interfaces/legacy/Stat.h \ + ../../../interfaces/legacy/PlayList.h \ + ../../../interfaces/legacy/Player.h \ + ../../../interfaces/legacy/RenderCapture.h \ + ../../../interfaces/legacy/Control.h \ + ../../../interfaces/legacy/wsgi/WsgiErrorStream.h \ + ../../../interfaces/legacy/wsgi/WsgiInputStream.h \ + ../../../interfaces/legacy/wsgi/WsgiResponseBody.h \ + ../../../interfaces/legacy/wsgi/WsgiResponse.h \ ../../../pictures/PictureInfoTag.cpp # This tag can be used to specify the character encoding of the source files @@ -2113,7 +2139,8 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS +PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS \ + DOXYGEN_SHOULD_USE_THIS # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/xbmc/addons/kodi-addon-dev-kit/doxygen/DoxygenLayout.xml b/xbmc/addons/kodi-addon-dev-kit/doxygen/DoxygenLayout.xml new file mode 100644 index 0000000000..6f71873003 --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/doxygen/DoxygenLayout.xml @@ -0,0 +1,199 @@ +<doxygenlayout version="1.0"> + <!-- Generated by doxygen 1.8.9.1 --> + <!-- Navigation index tabs for HTML output --> + <navindex> + <tab type="mainpage" visible="yes" title=""/> + <tab type="pages" visible="yes" title="" intro=""/> + <tab type="modules" visible="yes" title="Language Development" intro=""/> +<!-- <tab type="namespaces" visible="yes" title=""> + <tab type="namespacelist" visible="yes" title="" intro=""/> + <tab type="namespacemembers" visible="yes" title="" intro=""/> + </tab> + <tab type="classes" visible="yes" title=""> + <tab type="classlist" visible="yes" title="" intro=""/> + <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> + <tab type="hierarchy" visible="yes" title="" intro=""/> + <tab type="classmembers" visible="yes" title="" intro=""/> + </tab>--> + <tab type="files" visible="yes" title=""> + <tab type="filelist" visible="yes" title="" intro=""/> + <tab type="globals" visible="yes" title="" intro=""/> + </tab> + <tab type="examples" visible="yes" title="" intro=""/> + </navindex> + + <!-- Layout definition for a class page --> + <class> + <briefdescription visible="yes"/> + <detaileddescription title=""/> + <includes visible="$SHOW_INCLUDE_FILES"/> + <inheritancegraph visible="$CLASS_GRAPH"/> + <collaborationgraph visible="$COLLABORATION_GRAPH"/> + <memberdecl> + <nestedclasses visible="yes" title=""/> + <publictypes title=""/> + <services title=""/> + <interfaces title=""/> + <publicslots title=""/> + <signals title=""/> + <publicmethods title=""/> + <publicstaticmethods title=""/> + <publicattributes title=""/> + <publicstaticattributes title=""/> + <protectedtypes title=""/> + <protectedslots title=""/> + <protectedmethods title=""/> + <protectedstaticmethods title=""/> + <protectedattributes title=""/> + <protectedstaticattributes title=""/> + <packagetypes title=""/> + <packagemethods title=""/> + <packagestaticmethods title=""/> + <packageattributes title=""/> + <packagestaticattributes title=""/> + <properties title=""/> + <events title=""/> + <privatetypes title=""/> + <privateslots title=""/> + <privatemethods title=""/> + <privatestaticmethods title=""/> + <privateattributes title=""/> + <privatestaticattributes title=""/> + <friends title=""/> + <related title="" subtitle=""/> + <membergroups visible="yes"/> + </memberdecl> +<!-- <detaileddescription title=""/> --> + <memberdef> + <inlineclasses title=""/> + <typedefs title=""/> + <enums title=""/> + <services title=""/> + <interfaces title=""/> + <constructors title=""/> + <functions title=""/> + <related title=""/> + <variables title=""/> + <properties title=""/> + <events title=""/> + </memberdef> + <allmemberslink visible="yes"/> + <usedfiles visible="$SHOW_USED_FILES"/> + <authorsection visible="yes"/> + </class> + + <!-- Layout definition for a namespace page --> + <namespace> + <briefdescription visible="yes"/> + <detaileddescription title=""/> + <memberdecl> + <nestednamespaces visible="yes" title=""/> + <constantgroups visible="yes" title=""/> + <classes visible="yes" title=""/> + <typedefs title=""/> + <enums title=""/> + <functions title=""/> + <variables title=""/> + <membergroups visible="yes"/> + </memberdecl> +<!-- <detaileddescription title=""/> --> + <memberdef> + <inlineclasses title=""/> + <typedefs title=""/> + <enums title=""/> + <functions title=""/> + <variables title=""/> + </memberdef> + <authorsection visible="yes"/> + </namespace> + + <!-- Layout definition for a file page --> + <file> + <briefdescription visible="yes"/> + <detaileddescription title=""/> + <includes visible="$SHOW_INCLUDE_FILES"/> + <includegraph visible="$INCLUDE_GRAPH"/> + <includedbygraph visible="$INCLUDED_BY_GRAPH"/> + <sourcelink visible="yes"/> + <memberdecl> + <classes visible="yes" title=""/> + <namespaces visible="yes" title=""/> + <constantgroups visible="yes" title=""/> + <defines title=""/> + <typedefs title=""/> + <enums title=""/> + <functions title=""/> + <variables title=""/> + <membergroups visible="yes"/> + </memberdecl> +<!-- <detaileddescription title=""/> --> + <memberdef> + <inlineclasses title=""/> + <defines title=""/> + <typedefs title=""/> + <enums title=""/> + <functions title=""/> + <variables title=""/> + </memberdef> + <authorsection/> + </file> + + <!-- Layout definition for a group page --> + <group> +<!-- <briefdescription visible="yes"/> --> + <detaileddescription title=""/> + <groupgraph visible="$GROUP_GRAPHS"/> + <memberdecl> + <nestedgroups visible="yes" title=""/> + <dirs visible="yes" title=""/> + <files visible="yes" title=""/> + <namespaces visible="yes" title=""/> +<!-- <classes visible="yes" title=""/> --> + <defines title=""/> + <typedefs title=""/> +<!-- <enums title=""/> --> + <enumvalues title=""/> +<!-- <functions title=""/> --> + <variables title=""/> + <signals title=""/> + <publicslots title=""/> + <protectedslots title=""/> + <privateslots title=""/> + <events title=""/> + <properties title=""/> + <friends title=""/> +<!-- <membergroups visible="yes"/>--> + </memberdecl> +<!-- <detaileddescription title=""/> --> + <memberdef> + <pagedocs/> + <inlineclasses title=""/> + <defines title=""/> + <typedefs title=""/> + <enums title=""/> + <enumvalues title=""/> + <functions title=""/> + <variables title=""/> + <signals title=""/> + <publicslots title=""/> + <protectedslots title=""/> + <privateslots title=""/> + <events title=""/> + <properties title=""/> + <friends title=""/> + </memberdef> + <authorsection visible="yes"/> + </group> + + <!-- Layout definition for a directory page --> + <directory> + <briefdescription visible="yes"/> + <directorygraph visible="yes"/> + <detaileddescription title=""/> + <memberdecl> + <dirs visible="yes"/> + <files visible="yes"/> + </memberdecl> +<!-- <detaileddescription title=""/> --> + </directory> +</doxygenlayout> diff --git a/xbmc/addons/kodi-addon-dev-kit/doxygen/Modules/logo-python.png b/xbmc/addons/kodi-addon-dev-kit/doxygen/Modules/logo-python.png Binary files differnew file mode 100644 index 0000000000..ac16311862 --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/doxygen/Modules/logo-python.png diff --git a/xbmc/addons/kodi-addon-dev-kit/doxygen/Modules/modules_python.dox b/xbmc/addons/kodi-addon-dev-kit/doxygen/Modules/modules_python.dox new file mode 100644 index 0000000000..7911f934ff --- /dev/null +++ b/xbmc/addons/kodi-addon-dev-kit/doxygen/Modules/modules_python.dox @@ -0,0 +1,143 @@ +/*! + + +\defgroup python Python +\image html logo-python.png +\brief \htmlonly + <h3><span style="text-decoration: underline;"><span style="font-style: italic;"><span + style="color: rgb(102, 102, 102);">Python Script Add-On Development</span></span></span></h3> + \endhtmlonly + +Kodi includes a built-in [Python interpreter](http://en.wikipedia.org/wiki/Python_%28programming_language%29) +that allows users to develop add-ons (scripts and plugins) that interface easily +and cleanly with the Kodi dashboard. These add-ons can extend the functionality +of Kodi without requiring extensive programming experience or ability. While you +may not feel comfortable browsing the Kodi source code and submitting patches (or +even bug reports), you can learn how to write a script or plugin with just a few +hours' practice, using the information available in these pages. + +This page is intended as an introduction to Kodi Python for new developers, and +a quick reference for more experienced programmers. If you're not interested in +programming, you might want to visit [this page](http://kodi.wiki/view/Add-ons) +for information about installing and using Python add-ons as an end user. If +you're already familiar with Kodi Python, you can probably skip on down to the +[environment details](http://kodi.wiki/view/Python_Development#Environment_details) +or the [resource links](http://kodi.wiki/view/Python_Development#Resource_links) +below for quick reference material. + +_ _ _ + +Built-in modules +---------------- + +In addition to the standard libraries, Kodi [Python](https://www.python.org/) +uses a handful of custom modules to expose Kodi functionality to Python. + +| Module | Description | +|------------------------------------:|:-----------------------------------------------------------| +| \ref python_xbmc "xbmc" | Offers classes and functions that provide information about the media currently playing and that allow manipulation of the media player (such as starting a new song). You can also find system information using the functions available in this library. +| \ref python_xbmcgui "xbmcgui" | Offers classes and functions that manipulate the Graphical User Interface through windows, dialogs, and various control widgets. +| \ref python_xbmcplugin "xbmcplugin" | Offers classes and functions that allow a developer to present information through Kodi's standard menu structure. While plugins don't have the same flexibility as scripts, they boast significantly quicker development time and a more consistent user experience. +| \ref python_xbmcaddon "xbmcaddon" | Offers classes and functions that manipulate the add-on settings, information and localization. +| \ref python_xbmcvfs "xbmcvfs" | Offers classes and functions offers access to the Virtual File Server (VFS) which you can use to manipulate files and folders. +| \ref python_xbmcwsgi "xbmcwsgi" | The [<b>Web Server Gateway Interface (WSGI)</b>](https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface) is a specification for simple and universal interface between web servers and web applications or frameworks for the Python programming language. + +_ _ _ + +Installing additional modules +---------------- + +Additional modules may be installed by simply adding the module to the root +folder of your add-on. + +A common way to organized third-party modules that are not part of add-on source +code itself, is to add a lib directory and place an __init__.py file and other +third-party modules inside it. These modules may then normally be imported using +from lib import some module. + +_ _ _ + +Python plugins versus scripts +---------------- + +Please do not confuse "Plugins" with "Scripts". Unlike the Scripts, Plugins are +not meant to be directly invoked by the user. Instead, Plugins are automatically +invoked when the user enters such a virtual folder. Do not try to run Plugins +files from the scripts window as that will only give you a weird error message. +Plugins, unlike Scripts, do not really provide new functionality to Kodi, +instead what they do do is provide an easy way to present content listings in +Kodi through the native GUI interface. + +_ _ _ + +Script development +---------------- + +If you're new to Python programming (or just new to Kodi Python), the easiest +way to get started is with a script. The traditional Hello World program, +written as an Kodi Python script, would look like this: +~~~~~~~~~~~~~{.py} +print("Hello World!") +~~~~~~~~~~~~~ +That's the same code you would enter at the Python command line, because Kodi +runs a full-featured, standard Python interpreter (for more information +concerning the current version number and included modules see the environment +details below). If you're already familiar with Python programming, the only new +challenge is learning the custom modules that allow you to gather information +from Kodi and manipulate the Graphical User Interface (GUI). + +There are some excellent tutorials available to introduce you to Kodi scripting +(and Python in general). See the [HOW-TO](http://kodi.wiki/view/HOW-TO_write_Python_Scripts) +included in the Kodi Online Manual, or visit Alexpoet's Kodi Scripting site for +a popular beginner's tutorial (PDF). + +_ _ _ +Plugin development +---------------- + +While scripts offer you flexibility and full control over the Kodi GUI, plugins +allow you to quickly and consistently present information to the user through +the standard Kodi menu structure. + +When a user launches a plugin, the plugin generates a list of menu items and +hands them to Kodi to draw on the screen (regardless of screen resolution, skin, +or any other user setting). While plugin developers lose some amount of control +over the presentation, they no longer have to make up their own UIs, or worry +about creating a usable look and feel across multiple displays. + +Plugins are most commonly used to scrape websites for links to streaming videos, +displaying the video list in Kodi just like it would movie files on the local +hard drive, but a plugin can be used anywhere a script could, as long as the +menu structure is a sufficient GUI for the add-on's needs. + +Also, note that a script can launch a plugin, and a plugin can launch a script +(and, for that matter, it can call all the same functions available to a script) +so the distinction is more theoretical than practical. + + +@{ +\ingroup python +\defgroup python_xbmc Library - xbmc + +\ingroup python +\defgroup python_xbmcgui Library - xbmcgui + +\ingroup python +\defgroup python_xbmcplugin Library - xbmcplugin + +\ingroup python +\defgroup python_xbmcaddon Library - xbmcaddon + +\ingroup python +\defgroup python_xbmcvfs Library - xbmcvfs + +\ingroup python +\defgroup python_xbmcwsgi Library - xbmcwsgi +@brief **Web Server Gateway Interface** + +The [<b>Web Server Gateway Interface (WSGI)</b>](https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface) +is a specification for simple and universal interface between web servers and +web applications or frameworks for the Python programming language. +@} + +*/ |