Quick Multitouch Apps using kivy and Python

Similar documents
KIVY - A Framework for Natural User Interfaces

Kivy Designer Documentation

GUI in C++ PV264 Advanced Programming in C++ Nikola Beneš Jan Mrázek Vladimír Štill. Faculty of Informatics, Masaryk University.

Chapter 2: Operating-System Structures

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edition

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edit9on

Chapter 2. Operating-System Structures

Pro Android 2. Sayed Y. Hashimi Satya Komatineni Dave Mac Lean. Apress

Android App Development

Press Input to open the on screen input menu. Then tap on any input to select it.

CHAPTER 2: SYSTEM STRUCTURES. By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

ios vs Android By: Group 2

Instruction Manual. Vimar By-web KNX Software for Apple mobile devices User Manual

Event Dispatch. Interactor Tree Lightweight vs. Heavyweight Positional Dispatch Focus Dispatch. 2.4 Event Dispatch 1

Event Dispatch. Interactor Tree Lightweight vs. Heavyweight Positional Dispatch Focus Dispatch. Event Architecture. A pipeline: Event Capture

Developer s overview of the Android platform

Qt + Maemo development

Game Programming with. presented by Nathan Baur

An imperative approach to video user experiences using LUNA

(Refer Slide Time: 1:07)

Andy OS User Manual 46

CS 465 Program 4: Modeller

Instruction Manual. Vimar By-web Software for Android mobile devices User Manual

DP Computer Science Unit 6: Managing system resources

Connecting Your Device to a Wireless Network

The isit. Admin Overview. Use the left and right arrows to go through the instructions.

Here is the design that I created in response to the user feedback.

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

An overview of mobile and embedded platforms

Four Components of a Computer System

Revision 1.0.0, 5/30/14

Object-Oriented Programming

Session 2. >_ {Code4Loop}; Roochir Purani

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Questions and Answers. Q.1) Which of the following is the most ^aeuroeresource hungry ^aeuroepart of dealing with activities on android?

Creating Apps In Kivy: Mobile With Python By Dusty Phillips READ ONLINE

mgwt Cross platform development with Java

12.1 Introduction OpenCV4Android SDK Getting the SDK

Mobile Image Processing

User Guide. Campus Connect

Roessner Hall Classroom 221 Documentation

Microsoft Office is a collection of programs that you will be already using in school. This includes Word, PowerPoint, Publisher, Excel etc..

MultiTouch CornerStone Software Development. MultiTouch.fi, all rights reserved

UI, Graphics & EFL. Carsten Haitzler Principal Engineer Samsung Electronics Korea Founder/Leader Enlightenment / EFL

Review. Designing Interactive Systems II. Review. Base Window System. Apps UITK BWS GEL. 4-Layer Model Graphics and Event Library BWS GEL

Introduction CHAPTER. Review Questions

Setting Up KidiConnect : Unlock KidiConnect

Simpli.Fi. App for wifi DK series cameras OWNER'S MANUAL. APP DSE Simpli.Fi for Wi-Fi DK series cameras. Product description. Download DSE Simpli.

Anjuli Kannan. Google Earth Driving Simulators (3:00-7:00)

Tutorial guideline for App Inventor

ios Simulator User Guide

Nutmeg Documentation. Release 0.1. Christopher Ham

Android Pre-Release Deployment Release Notes (R2)

Mobile Image Processing

SRX-Pro Mobile Remote App - Android INNOVATIONS AT THE SPEED OF THOUGHT

Setting up a Display. Updated 4/25/2017 Version 1.0

TUTORIAL. Ve r s i on 1. 0

central processing unit (CPU) software operating system (OS) input device output device

GUI Output. Adapted from slides by Michelle Strout with some slides from Rick Mercer. CSc 210

How to create a prototype

SOFTWARE INSTALLATION MANUAL

About Smart Motion Detection... 4 Storage and the SD Card...4 Setting Up Automatic Network Replenishment...4

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK M.E III SEM CSE MOBILE APPLICATION DEVELOPMENT UNIT -I INTRODUCTION

Three OPTIMIZING. Your System for Photoshop. Tuning for Performance

Introduction to Mobile Application and Development

Project Your Presentation Wirelessly

Mac OSX Basics. Spring 2014

CPS221 Lecture: Operating System Protection

Ganz CORTROL Mobile User Manual

Hello App Inventor! Android programming for kids and the rest of us. Chapter 2. by Paula Beer and Carl Simmons. Copyright 2015 Manning Publications

ROUTED EVENTS. Chapter 5 of Pro WPF : By Matthew MacDonald Assist Lect. Wadhah R. Baiee. College of IT Univ. of Babylon

Developing Applications for ios

Ringling College ShareLink Devices

Make sure that you have following items supplied with your DVR. If any of these items is missing or damaged, notify your vendor immediately.

ASSESSMENT & FEEDBACK

CuriousDroid: Automated User Interface Interaction for Android Application Analysis Sandboxes

UI Toolkits. HCID 520 User Interface Software & Technology

WYBCS Android Programming (with AppInventor) Family fun day

What is the Selendroid?

Apps Every College Student Should Have

If the ball goes off either the right or left edge, turn the ball around. If x is greater than width or if x is less than zero, reverse speed.

ANDROID HERO + SHIELD GUIDE:

Firepoint: Porting Application to Mobile Platforms

Hosted Feature Service to Custom Report with Data Driven Pages

In this lesson you are going to create a drawing program similar to Windows Paint. 1. Start with a new project and remove the default cat sprite.

BCSWomen Android programming (with AppInventor) Family fun day World record attempt

Q.bo Webi User s Guide

QUICK START GUIDE NTS HOSTED PBX CALL MANAGER. Welcome. Getting Oriented

Android App Development for Beginners

Multimedia-Programmierung Übung 7

Mobile Computing Professor Pushpedra Singh Indraprasth Institute of Information Technology Delhi Andriod Development Lecture 09

5/19/2015. Objectives. JavaScript, Sixth Edition. Using Touch Events and Pointer Events. Creating a Drag-and Drop Application with Mouse Events

MOBILE COMPUTING 1/20/18. How many of you. CSE 40814/60814 Spring have implemented a command-line user interface?

CS260 Intro to Java & Android 05.Android UI(Part I)

OMINO PYTHON for After Effects

Contextual Android Education

Ecamm Live for Facebook User Guide

Chapter 2 Welcome App

via Citrix Remote Access (formally

Interactor Tree. Edith Law & Mike Terry

Transcription:

Quick Multitouch Apps using kivy and Python

About Me!

Python and Kivy +

Setting up Kivy... 1) in Linux 2) in Windows 3) Mac OSX

Hello World in Kivy :)

Controlling the Environment Many environment variables are available to control the initialization and behavior of Kivy. $ KIVY_TEXT=cairo python main.py Or set the variables before importing kivy: import os os.environ['kivy_text'] = 'cairo' import kivy

Controlling the Environment To force default config, use KIVY_USE_DEFAULTCONFIG KIVY_WINDOW: pygame KIVY_TEXT: pil, cairo, pygame KIVY_VIDEO: gstreamer, pyglet, ffmpeg KIVY_AUDIO: gstreamer, pygame KIVY_IMAGE: pil, pygame

Controlling the Environment KIVY_CAMERA: gstreamer, opencv, videocapture KIVY_SPELLING: enchant, osxappkit KIVY_CLIPBOARD: pygame, dummy

Configuring Kivy The location of the configuration file is in: <HOME_DIRECTORY>/.kivy/config.ini If your user is named karan, the file will be located at: Windows: C:\Users\karan\.kivy\config.ini MacOSX: /Users/karan/.kivy/config.ini Linux: /home/karan/.kivy/config.ini Understanding the config file: read docs on kivy.config

Architecture of Kivy 1) Core Providers and Input Providers 2) Graphics 3) Core 4) UIX (Widgets & Layouts) 5) Modules 6) Input Events (Touches) 7) Widgets and Event Dispatching

Core Providers and Input Providers We try to abstract from basic tasks such as opening a window, displaying images and text, playing audio, getting images from a camera, spelling correction and so on. We call these core tasks. Core providers allow us to accomplish these core tasks!

Core Providers and Input Providers An input provider is a piece of code that adds support for a specific input device, such as Apple s trackpads, TUIO or a mouse emulator. If you need to add support for a new input device, you can simply provide a new class that reads your input data from your device and transforms them into Kivy basic events.

Graphics Kivy s graphics API is our abstraction of OpenGL. On the lowest level, Kivy issues hardware-accelerated drawing commands using OpenGL. All of kivy's widgets themselves use this graphics API, which is implemented on the C level for performance reasons.

Graphics The graphics API can automatically optimise the graphics commands issued by your kivy app. You can, of course, still use raw OpenGL commands if you prefer that. :) Targeted version is OpenGL 2.0 ES(GLES 2 ) use this for cross-platform compatibility

Core Clock You can use the clock to schedule timer events. Both one-shot timers and periodic timers are supported. Cache If you need to cache something that you use often, you can use our class for that instead of writing your own. interface description.

Core Gesture Detection We ship a simple gesture recognizer that you can use to detect various kinds of strokes, such as circles or rectangles. You can train it to detect your own strokes.

Core Kivy Language The kivy language is used to easily and efficiently describe user interfaces. Properties These are not the normal properties that you may know from python. It is our own properties class that links your widget code with the user

UIX Widgets Widgets are user interface elements that you add to your program to provide some kind of functionality. They may or may not be visible. Examples would be a file browser, buttons, sliders, lists and so on. Widgets receive MotionEvents.

UIX Layouts You use layouts to arrange widgets. It is of course possible to calculate your widgets positions yourself, but often it is more convenient to use one of our ready made layouts. Examples would be Grid Layouts or Box Layouts. You can also nest layouts.

Modules Similar to addons for broswers we can add new functionality in old kivy apps ex. FPS counter, exit button overlay

Input Events (Touches) Down A touch is down only once, at the very moment where it first appears. Move A touch can be in this state for a potentially unlimited time. A Move happens whenever the 2D position of a touch changes.

Input Events (Touches) Up A touch goes up at most once, or never. obviously you wouldn't want to keep on pressing forever?

Widgets and Event Dispatching Tree Based Widget Strucutre Widgets from a hierarchy just like a tree There is a root widget and children widgets similar to other popular GUI hierarchy approaches...ex. Qt

Widgets and Event Dispatching Is a widget hungry? Digest and Pass of Events == just like us? Flow of events along the Tree from Root to children

Widgets and Event Dispatching

Your First Kivy Widget :D Lets have some more FUN! :D

Manipulating the Widget Tree The tree can be manipulated with 3 methods: add_widget(): add a widget as a child remove_widget(): remove a widget from the children list clear_widgets(): remove all children from a widget

Events You have 2 types of events living in Kivy: Clock events: if you want to call a function X times per seconds, or if you want to call a function later. ex. Similar to timers in Qt Widget events: if you want to call a function where something change in the widget, or attach a function to a widget specific event. e.x. Similar to signals in Qt

Clock Events clock.schedule_interval(fn_name, time to call the fn) clock.unschedule(fn_name) == to unschedule a previously scheduled event Or return False in fn_name to automatically unschedule clock.schedule_once(fn_name, time to call the fn)

Clock Events for Trigering triggering can be achieved with: But this is expensive, since no matter whether an event has been scheduled or not we are unscheduling it still...

Clock Events for Trigering triggering can be achieved with: But this is expensive, since no matter whether an event has been scheduled or not we are unscheduling it still...

Clock Events for Trigering # better way to implemnent triggers = Clock.create_trigger(my_callback) # later on trigger()

Widget Events A widget have 2 types of events: Property event: if your widget change of pos or size, you ll have an event fired, And we can also define our own custom properties too Widget defined event: a Button will have even fired when it s pressed or released.ex. Button pressed or released

Input management Input Event Architecture Motion Profiles Touch Events as specialized motion events Touch Shapes Double Tap Grabbing Touches and Limitations

Kivy Language Used for interface specification of kivy apps can use.kv files to generate User Interfaces... example?

Kivy on Android! Yay! :) Kivy on Android! how to run on Android? how to package for Android? Debugging on Android? Supported Devices?

Kivy Packaging? Kivy Packaging on Other Platforms? Windows Linux MacOSX

Puzzled? ANY DOUBTS? Apart from me, go BUG these people! Mailing Lists, kivy-users and kivy-dev on google groups And #kivy on irc.freenode.net

Finally! The End :)