GTK Binding for Alice Robert Grabowski Eine GTK-Schnittstelle für Alice.

Slides:



Advertisements
Similar presentations
Sml2java a source to source translator Justin Koser, Haakon Larsen, Jeffrey Vaughan PLI 2003 DP-COOL.
Advertisements

Chapter 22 Implementing lists: linked implementations.
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Based on Java Software Development, 5th Ed. By Lewis &Loftus
And so to Code. Forward, Reverse, and Round-Trip Engineering Forward Engineering Reverse Engineering Round-Trip Engineering.
Contents o Introduction o Characteristics of Constructor. o Types of constructor. - Default Constructor - Parameterized Constructor - Copy Constructor.
CS18000: Problem Solving and Object-Oriented Programming.
C++ Programming Languages
Copyright © 2012 Pearson Education, Inc. Chapter 9 Delegates and Events.
Portability and Safety Mahdi Milani Fard Dec, 2006 Java.
Best Practices for Interop with Visual C++ Boris Jabes Program Manager Microsoft Corporation.
Plab 2003 Lecture 41 C++ - Classes. Plab 2003 Lecture 42 Motivating Example Goal: Graphics package Handle drawing of different shapes Maintain list of.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
1 Chapter 7 Graphics and Event Handling. 2 Overview The java.awt and javax.swing packages and their subpackages support graphics and event handling. Many.
Distributed Systems Lecture #3: Remote Communication.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
Principles of Object-Oriented Software Development The language Java.
C#.NET C# language. C# A modern, general-purpose object-oriented language Part of the.NET family of languages ECMA standard Based on C and C++
Wednesday, 10/9/02, Slide #1 CS 106 Intro to CS 1 Wednesday, 10/9/02  QUESTIONS ??  Today:  Discuss HW #02  Discuss test question types  Review 
Metro II : A Next-Generation Framework for Platform-based Design Abhijit Davare, Douglas Densmore, Trevor Meyerowitz, Alessandro Pinto, Alberto Sangiovanni-Vincentelli,
C#: Project Cool Arthur Ketchel II Keith Francisco Chris McInnis.
Terms and Rules Professor Evan Korth New York University (All rights reserved)
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
1 Standard Widget Toolkit. 2 SWT l a widget toolkit for Java developers l provides a portable API and tight integration with the underlying native OS.
IT PUTS THE ++ IN C++ Object Oriented Programming.
Differences between C# and C++ Dr. Catherine Stringfellow Dr. Stewart Carpenter.
Chapter 6 Class Inheritance F Superclasses and Subclasses F Keywords: super F Overriding methods F The Object Class F Modifiers: protected, final and abstract.
Java Programming Robert Chatley William Lee
C++ Code Analysis: an Open Architecture for the Verification of Coding Rules Paolo Tonella ITC-irst, Centro per la Ricerca Scientifica e Tecnologica
Yingcai Xiao EDP Scripting Yingcai Xiao. Why do we need EDP? What is EDP? How to implement EDP? How can we take advantages of EDP in game design and implement?
COP INTERMEDIATE JAVA Designing Classes. Class Template or blueprint for creating objects. Their definition includes the list of properties (fields)
Managed C++. Objectives Overview to Visual C++.NET Concepts and architecture Developing with Managed Extensions for C++ Use cases Managed C++, Visual.
07 Coding Conventions. 2 Demonstrate Developing Local Variables Describe Separating Public and Private Members during Declaration Explore Using System.exit.
Algorithm Programming Bar-Ilan University תשס"ח by Moshe Fresko.
Object-Oriented Programming in C++
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
Introduction to Building Windows 8.1 & Windows Phone Applications.
1 Chapter 8 – Classes and Object: A Deeper Look Outline 1 Introduction 2 Implementing a Time Abstract Data Type with a Class 3 Class Scope 4 Controlling.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures C++ Review Part-I.
Chapter 5: Ball Worlds Features 2 classes, constant data fields, constructors, extension through inheritance, graphics.
Copyright 2012 & 2015 – Noah Mendelsohn A Brief Intro to the RPC Project Framework Noah Mendelsohn Tufts University
10-Nov-15 Java Object Oriented Programming What is it?
Introduction to C#. Why C#? Develop on the Following Platforms ASP.NET Native Windows Windows 8 / 8.1 Windows Phone WPF Android (Xamarin) iOS (Xamarin)
GAM 200 Club. How to Game Engine GAM 200 Club Zachary Nawar.
Electronic Payment Systems (1)
Session 7 Methods Strings Constructors this Inheritance.
Summing Up Object Oriented Design. Four Major Components: Abstraction modeling real-life entities by essential information only Encapsulation clustering.
1 JTransformer Framework Tobias Windeln Institut für Informatik III Rheinische Friedrich-Wilhelms-Universität Bonn.
COP INTERMEDIATE JAVA Designing Classes. Class Template or blueprint for creating objects. Their definition includes the list of properties (fields)
Designing Classes CS239 – Jan 26, Key points from yesterday’s lab  Enumerated types are abstract data types that define a set of values.  They.
CS Introduction to Data Structures Spring Term 2004 Franz Hiergeist.
Chapter 7: Class Inheritance F Superclasses and Subclasses F Keywords: super and this F Overriding methods F The Object Class F Modifiers: protected, final.
Managing C++ CHRIS DAHLBERG MID-TIER DEVELOPER SCOTTRADE.
1 FESA architecture v.1.0 Framework Configuration & Data-entry Tool 5 th December 2003.
STL CSSE 250 Susan Reeder. What is the STL? Standard Template Library Standard C++ Library is an extensible framework which contains components for Language.
Presented by Ted Higgins, SQL Server DBA An Introduction to Object – Oriented Programming.
Chapter 1 C++ Basics Review (Section 1.4). Classes Defines the organization of a data user-defined type. Members can be  Data  Functions/Methods Information.
1 Chapter 8 Class Inheritance and Interfaces F Superclasses and Subclasses  Keywords: super F Overriding methods  The Object Class  Modifiers: protected,
FASTFAST All rights reserved © MEP Make programming fun again.
July FLTK The Fast Light Toolkit • A C++ graphical user interface toolkit • Can be used under X, Windows, MacOS • Supports OpenGL • Provides: – Interactive.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
Objects and Classes. F OO Programming Concepts F Creating Objects and Object Reference Variables –Differences between primitive data type and object type.
C# for C++ Programmers 1.
Abstract Data Types and Encapsulation Concepts
Interface.
CSE 1030: Data Structure Mark Shtern.
Object-Oriented Software Engineering
ICOM 4029 Fall 2003 Lecture 2 (Adapted from Prof. Necula UCB CS 164)
Presentation transcript:

GTK Binding for Alice Robert Grabowski Eine GTK-Schnittstelle für Alice

Overview Concepts Implementation Demo Outlook

Overview Concepts –GTK+ –Mapping C Libraries to Alice –Event Handling –Garbage Collection Implementation Demo Outlook

Collection of libraries: OS APIGDK - platform graphics abstraction GTK - widget collection GnomeCanvas - a special widget GTK+

GTK+ - Main Ideas widgets attributes connect callback functions for handling events event-driven main loop automatic memory management

Mapping C Libraries to Alice functions  wrapper (marshalling) structures  field accessor functions constants  datatype constructors C Libary contains:Alice Mapping:

callbackprogram C Event Handling in C delegate control to main loop......which invokes registered callback functions check events idle handle events event

callbackprogram Alice C Naive Approach main loop never returns  breaks concurrency model ? cannot register Alice functions check events idle handle events event

Alice C handle events check events idle event Solution split main loop callback  marshaller id dispatcher id  id asynchronous callback function call

Alice 5 C Garbage Collection GTK: own memory management reference counters Problem: GTK may delete object too early 0 ?

5 Alice C Solution keep reference to object while visible in Alice 6 1

3 Alice C Solution keep reference to object while visible in Alice 1 Alice finalization decreases counter

0 Alice C Solution keep reference to object while visible in Alice Alice finalization decreases counter

Overview Concepts Implementation –Design –Generator –Type Mapping –Examples Demo Outlook

Design generated interface –function wrappers, constants, field accessors GTK+ core hand-written core –main loop, event handling, garbage collection generated interface Alice C

Design generated interface –function wrappers, constants, field accessors GTK+ hand-written core –main loop, event handling, garbage collection Alice C FFI coregenerated interface

Generator GTK+ header files all declarations C preprocessor, clean-up programs Abstract Syntax Tree CKIT own representation Mapper generated components: native high-level

Type Mapping

Constants C-Deklaration: typedef enum { GTK_WINDOW_TOPLEVEL, GTK_WINDOW_POPUP } GtkWindowType; Alice-Deklaration: datatype GtkWindowType = WINDOW_TOPLEVEL | WINDOW_POPUP

Examples void gtk_scale_set_draw_value(GtkScale*, gboolean) val scaleSetDrawValue : object * bool  unit Simple example val entryGetLayoutOffsets’ : object * int * int  int * int Input/Output argument example void gtk_entry_get_layout_offsets (GtkEntry*, int*, int*) val entryGetLayoutOffsets : object  int * int

Overview Concepts Implementation Demo Outlook

Overview Concepts Implementation Demo Outlook

Outlook GTK –high-level functional UI design –GtkBuilder –use advanced Alice features Generic Generator Tool –work in progress by Sven Woop