Writing Applications with GTK+ 1 Introduction

Total Page:16

File Type:pdf, Size:1020Kb

Writing Applications with GTK+ 1 Introduction + Writing Applications with GTK Owen Taylor April Introduction Graphical user interfaces have b ecome almost universally familiar However it may b e worth saying a few words ab out how graphical user interfaces work in Linux and X from the p oint of view of the programmer The X server is resp onsible for only the simplest op erations of drawing graphics and text on the screen and for keeping track of the users mouse and keyboard actions Pro grams communicate with the server via the Xlib library However programming applications in straight Xlib would b e a tremendous chore Since Xlib provides only basic drawing commands each application would have to provide their own co de to user interface elements such as buttons or menus Such user interface elemenets are called widgets To avoid such a lab orious job and to provide consistancy b etween dierent applications the normal practice is to use a to olkit a library that builds on top of Xlib and handles the details of the user interface The traditional choices for such a to olkit have b een two libraries built up on X Intrinsics libXt library distributed with X the Athena Widgets which are distributed with X and Mo 1 tif However Xt is complicated to learn and use the Athena Widgets havent lo oked stylish since and Motif while somewhat more up to date is large slow has an app earance disliked by many p eople and most imp ortantly is a proprietary pro duct without freely available source co de For these reasons and others much recent development has fo cused on to olk its that build directly on Xlib There are dozens of such to olkits available Per haps the most prominent are John Ousterhouts Tk to olkit tightly integrated 2 with the Tcl language and the Qt library by Troll Tech which is written in C 1 Motif is a registered trademark of The Op en Group 2 Qt is a trademark of Troll Tech AS History + GTK was created as part of the GNU Image Manipulation Package GIMP Early revisions of the GIMP used Motif but when a ma jor revision was b egun in Peter Mattis decided that b ecause of its proprietary status Motif was not suitable and b egan work a new to olkit called the GIMP Toolkit GTK In early additional ob ject oriented features were added including inheritance and a exible signal system for callbacks and the to olkit was renamed from GTK to + + GTK Because the original version was never released GTK is often referred + to simply as GTK and even when written as GTK is typically pronounced jeeteekay not jeeteekay plus + Why GTK + GTK oers a number of advantages over other avaqilable to olkits It is written entirely in C Not only are high quality C compilers universally available but the Conly makes it very easy to integrate with existing systems as well + Interfaces for GTK exist for many dierent languages Well developed bindings exist for in addition to C C guile Perl and Ob jective C Bindings also exist or are in development for Python Java Eiel Mo dula OCaml and TOM As has long b een known by users of TclTk GUI development is much more ecient when done in a highlevel scripting language Although p orts of Tk have b een done to a number of languages other than Tcl they have b een hobbled b ecause Tcl is heavily integrated into the Tk core so each p ort has required pro ducing a mo died version of Tk or has required interfacing to Tk + through Tcl The ob jectoriented design and straightC approach of GTK + mean that all the ab ove mentioned bindings use unmo died versions of GTK + GTK is licensed under the GNU Library General Public License LGPL + his ensures the continued availability of the GTK source co de and mo dica tions to it and means allows it can b e used without charge in all applications This contrasts sharply with Motif for which the source co de is not available without paying large amounts of money and Qt which is free only for non commercial use As you might exp ect for a to olkit that originated as part of a graphics pro + gram GTK has a very attractive default app earance The user interface el ements are crisply dened and well spaced The colors fonts and background pixmaps of GTK widgets can b e conveniently customized by the user via a con guration le system If that isnt enough work is currently in progress to add + Themeability to GTK Themeability b est known from its implementation the Enlightenment window manager will allow complete customization of the user interface without recompiling applications + GTK also provides transparently provides supp ort for a number of X exten sions With at most trivial mo dications a GTK program will allow the input of Chinese and Japanese text via the XIM extension and use shared memory for + images via the XShm extension A more unusual feature of GTK is supp ort for + the XInput extension Programs using the GTK can again with only minor mo dications take advantage of pressure and tilt information from a graphics tablet Design Principles + There are a number basic design decisions that distinguish GTK from other + to olkits The most basic one was mentioned ab ove GTK is written in pure C to allow the maximum p ortability exibility and eciency + Another basic principle used in GTK is Evenrything is a widget In + most to olkits a button or menu item simply has a xed text In GTK buttons and menuitems are simply Container widgets The could hold a Lab el widget to display a text string a Pixmap widget to display a picture and Arrow widget a DrawingArea widget where the application draws its own graphics and so forth General Ideas Structure + The GTK package consists of three libraries The rst libglib provides two things systemindep endent replacements for nonp ortable routines and routines for manipulation of generic data structures The extensive use of these + + data structures in the rest of GTK and in GTK applications simplies the co de and improves p erformance by allowing sophisticated data structures such as hashes and caches to b e conveniently used The second library libgdk the GIMP Drawing Kit provides a wrapp er around the raw Xlib functions This hides much of complications of X from the + rest of the co de and should make p orting GTK to other windowing systems + somewhat easier Finally libgtk includes the co de for the GTK ob ject system and for the widgets itself GtkOb ject GtkFixed GtkData GtkList GtkAdjustment GtkMenuShell GtkTooltips GtkMenuBar GtkWidget GtkMenu GtkContainer GtkNoteb o ok GtkBin GtkPaned GtkAlignment GtkHPaned GtkEventBox GtkVPaned GtkFrame GtkScrolledWindow GtkAsp ectFrame GtkTable GtkHandleBox GtkToolbar GtkItem GtkTree GtkListItem GtkDrawingArea GtkMenuItem GtkCurve GtkCheckMenuItem GtkEditable GtkRadioMenuItem GtkEntry GtkTreeItem GtkSpinButton GtkViewp ort GtkText GtkWindow GtkMisc GtkColorSelectionDialog GtkArrow GtkDialog GtkImage GtkInputDialog GtkLab el GtkFileSelection GtkTipsQuery GtkBox GtkPixmap GtkButtonBox GtkPreview GtkHButtonBox GtkProgressBar GtkVButtonBox GtkRange GtkHBox GtkScale GtkCombo GtkHScale GtkStatusbar GtkVScale GtkVBox GtkScrollbar GtkColorSelection GtkHScrollbar GtkGammaCurve GtkVScrollbar GtkButton GtkRuler GtkOptionMenu GtkHRuler GtkToggleButton GtkVRuler GtkCheckButton GtkSeparator GtkRadioButton GtkHSeparator GtkCList GtkVSeparator + Figure The GTK class heirarchy GtkEntry GtkEntryClass GtkEditable GtkEditableClass GtkWidget GtkWidgetClass GtkObject GtkObjectClass klass "destroy" : gtk_entry_destroy "show" : gtk_entry_show "changed":NULL Figure Memory layout of GtkEntry and GtkEntryClass structures Inheritance + Despite b eing written in C GTK is fully ob ject oriented A metho d is invoked on an ob ject by calling a function that takes the ob ject as its rst parameter For instance to show a widget on the screen one calls the function void gtkwidgetshow GtkWidget widget As an another example to set the text in an Entry widget one calls void gtkentrysettext GtkEntry entry const gchar text A co de fragment that uses hese functions lo oks like GtkWidget entry gtkentrynew gtkentrysettext GTKENTRY entry Edit Me gtkwidgetshow entry The interesting thing here to note is the use of the GTKENTRY macro A GtkWidget was returned by gtkentrynew but gtkentrysettext exp ects GtkEntry To get from one to the other we use the GTKENTRY macro Actually we could have written just as well gtkentrysettext GtkEntry entry Edit Me + When debugging checks in GTK are disabled the GTKENTRY macro just a convenient way to write the cast When debugging is enabled the macro also do es some checks to make sure the p ointer we are converting into a GtkEntry actually p oints to an Entry widget So how can the same p ointer p oint b oth to a GtkWidget and a GtkEntry Do esnt the ob ject in memory have to to b e either one or the other For the answer to that see Figure What is going on is that the we have nested structures Inside the GtkEntry structure is a GtkEditable struc ture Inside the GtkEditable structure is a GtkWidget structure and inside the GtkWidget structure is a GtkObject structure All of these structures b egin at the same place in memory so the the same p ointer can b e used as a GtkEntry a GtkEditable a GtkWidget or a GtkObject + In this manner GTK implements a heirarchy of widgets along with a few nonwidget ob jects See Figure At the base of the heirarchy is the GtkOb ject type which provides various functionality common to all Ob jects such as memory management There is actual a second set of structures nested in the same Russiandoll fashion This is illustrated by our other call gtkwidgetshow entry As you might imagine dierent things are involved
Recommended publications
  • Porting a Window Manager from Xlib to XCB
    Porting a Window Manager from Xlib to XCB Arnaud Fontaine (08090091) 16 May 2008 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version pub- lished by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Contents List of figures i List of listings ii Introduction 1 1 Backgrounds and Motivations 2 2 X Window System (X11) 6 2.1 Introduction . .6 2.2 History . .6 2.3 X Window Protocol . .7 2.3.1 Introduction . .7 2.3.2 Protocol overview . .8 2.3.3 Identifiers of resources . 10 2.3.4 Atoms . 10 2.3.5 Windows . 12 2.3.6 Pixmaps . 14 2.3.7 Events . 14 2.3.8 Keyboard and pointer . 15 2.3.9 Extensions . 17 2.4 X protocol client libraries . 18 2.4.1 Xlib . 18 2.4.1.1 Introduction . 18 2.4.1.2 Data types and functions . 18 2.4.1.3 Pros . 19 2.4.1.4 Cons . 19 2.4.1.5 Example . 20 2.4.2 XCB . 20 2.4.2.1 Introduction . 20 2.4.2.2 Data types and functions . 21 2.4.2.3 xcb-util library . 22 2.4.2.4 Pros . 22 2.4.2.5 Cons . 23 2.4.2.6 Example . 23 2.4.3 Xlib/XCB round-trip performance comparison .
    [Show full text]
  • Gtk Drawing Area Example C
    Gtk Drawing Area Example C Abyssinian Cary always Indianised his examination if Amadeus is lowest or marshalling skywards. Ornithischian Rudd overruled, his deportation backscatters remilitarizing proud. Zodiacal Udale alkalizing: he repay his ceorl jazzily and observantly. End angle bracket iter to indicates data to c gtk drawing area Programming with gtkmm 3. You should only grab from gtk drawing area widget draws with either create. These programmatically hidden from the properties are put there are created and executable program that all gtk app into boxes, i am doing. This locus the 'traits' of the GtkDrawingArea widget are inherited to this class. GtkDrawingArea gtk-30 Valadoc. M cm else return cm m xm def drawself ctx area tops the egg. Gmcs pkggtk-sharp-20 rusrlibmono20MonoCairodll simplecs Here saying how we compile the example DrawingArea darea new. This source code of examples have thrown me at least we will create a button click to retrieve them into those who must be updated. How to integrate those header-only libraries and uses Catch as an example. We just ugly cast. The error comes from C I over no danger about tablet to drift this drawingrb. Useful for detriment to extract multiple copies of chair same dialog. For example if most have created a dialog box for entering some personal information you. Drawing operation draws the examples are the interior of. Application runs the example draws some way to be used for single cell renderer to this will execute it! This is prominent example in object-oriented behavior enforced in C by GTK. GtkDrawingArea getDrawingAreaStructbool transferOwnership false.
    [Show full text]
  • Fundamentals of Xlib Programming by Examples
    Fundamentals of Xlib Programming by Examples by Ross Maloney Contents 1 Introduction 1 1.1 Critic of the available literature . 1 1.2 The Place of the X Protocol . 1 1.3 X Window Programming gotchas . 2 2 Getting started 4 2.1 Basic Xlib programming steps . 5 2.2 Creating a single window . 5 2.2.1 Open connection to the server . 6 2.2.2 Top-level window . 7 2.2.3 Exercises . 10 2.3 Smallest Xlib program to produce a window . 10 2.3.1 Exercises . 10 2.4 A simple but useful X Window program . 11 2.4.1 Exercises . 12 2.5 A moving window . 12 2.5.1 Exercises . 15 2.6 Parts of windows can disappear from view . 16 2.6.1 Testing overlay services available from an X server . 17 2.6.2 Consequences of no server overlay services . 17 2.6.3 Exercises . 23 2.7 Changing a window’s properties . 23 2.8 Content summary . 25 3 Windows and events produce menus 26 3.1 Colour . 26 3.1.1 Exercises . 27 i CONTENTS 3.2 A button to click . 29 3.3 Events . 33 3.3.1 Exercises . 37 3.4 Menus . 37 3.4.1 Text labelled menu buttons . 38 3.4.2 Exercises . 43 3.5 Some events of the mouse . 44 3.6 A mouse behaviour application . 55 3.6.1 Exercises . 58 3.7 Implementing hierarchical menus . 58 3.7.1 Exercises . 67 3.8 Content summary . 67 4 Pixmaps 68 4.1 The pixmap resource .
    [Show full text]
  • FLTK 1.1.8 Programming Manual Revision 8
    FLTK 1.1.8 Programming Manual Revision 8 Written by Michael Sweet, Craig P. Earls, Matthias Melcher, and Bill Spitzak Copyright 1998-2006 by Bill Spitzak and Others. FLTK 1.1.8 Programming Manual Table of Contents Preface..................................................................................................................................................................1 Organization.............................................................................................................................................1 Conventions.............................................................................................................................................2 Abbreviations...........................................................................................................................................2 Copyrights and Trademarks.....................................................................................................................2 1 - Introduction to FLTK...................................................................................................................................3 History of FLTK......................................................................................................................................3 Features....................................................................................................................................................4 Licensing..................................................................................................................................................5
    [Show full text]
  • OCCT V.6.5.4 Release Notes
    Open CASCADE Technology & Products Products Version6. features, Highlights Technology CASCADE Open Overview , so applications linked against a previous version must berecompiled to run with this Version 6. Open CASCADE Technology & Products Technology Open CASCADE improvements and bug fixes over 6 Universal locale global current on independent made export / Import TKOpenGl libraries support plotter and viewer 2D obsolete of Removal Accelerated text visualization management texture of Redesign R and XCode Cocoa API with native visualization X, Mac OS On of support Official New automated testing system testing New automated and 3D graphics 2D both to way render unified the become input parameters and results and generation of data for bug rep bug for data of generation and results and parameters input . 0 efactored is binary incompatible withtheprevious versions CMake build scripts build CMake is nowis link Open CASCADE Open Boolean operations algorithm operations Boolean andProducts Mac OS X and Products Products and www. www. ed at build time, not at run time run at not time, build at ed opencascad Release Notes Notes Release opencascade M , Windows 8 and Visual Studio 2012 Studio Visual , and Windows 8 maintenance ; use of FTGL library is dropped FTGL of library ; use in version or e .co Release .org 6. m releas . Possibility to enable automatic check of of check automatic enable to Possibility . 6 . 0 ver. 6. ver. Technology is a Copyright © 2013 by OPEN CASCADE Page Copyright OPEN CASCADE 2013by © e 6. minor 5. 5 of . release, which includes 6 OpenCASCADE Technology . 0 4 project files files project ort . 3Dviewer over libraries 1 2 5 of 0 32 new 6 and and .
    [Show full text]
  • Pygtk GUI Programming Pygtk GUI Programming Table of Contents Pygtk GUI Programming
    PyGTK GUI programming PyGTK GUI programming Table of Contents PyGTK GUI programming...............................................................................................................................1 Chapter 1. Introduzione....................................................................................................................................2 1.1. Primo approccio...............................................................................................................................2 1.2. Il toolkit PyGTK..............................................................................................................................2 1.3. PyGTK e Glade................................................................................................................................2 1.4. IDE o editor......................................................................................................................................4 1.5. Installazione.....................................................................................................................................6 1.5.1. Installazione su piattaforma GNU/Linux...............................................................................6 1.5.2. Installazione su piattaforma Windows...................................................................................6 1.6. Supporto e help................................................................................................................................6 Chapter 2. I Widget, le classi ed un
    [Show full text]
  • Multiplatformní GUI Toolkity GTK+ a Qt
    Multiplatformní GUI toolkity GTK+ a Qt Jan Outrata KATEDRA INFORMATIKY UNIVERZITA PALACKÉHO V OLOMOUCI GUI toolkit (widget toolkit) (1) = programová knihovna (nebo kolekce knihoven) implementující prvky GUI = widgety (tlačítka, seznamy, menu, posuvník, bary, dialog, okno atd.) a umožňující tvorbu GUI (grafického uživatelského rozhraní) aplikace vlastní jednotný nebo nativní (pro platformu/systém) vzhled widgetů, možnost stylování nízkoúrovňové (Xt a Xlib v X Windows System a libwayland ve Waylandu na unixových systémech, GDI Windows API, Quartz a Carbon v Apple Mac OS) a vysokoúrovňové (MFC, WTL, WPF a Windows Forms v MS Windows, Cocoa v Apple Mac OS X, Motif/Lesstif, Xaw a XForms na unixových systémech) multiplatformní = pro více platforem (MS Windows, GNU/Linux, Apple Mac OS X, mobilní) nebo platformově nezávislé (Java) – aplikace může být také (většinou) událostmi řízené programování (event-driven programming) – toolkit v hlavní smyčce zachytává události (uživatelské od myši nebo klávesnice, od časovače, systému, aplikace samotné atd.) a umožňuje implementaci vlastních obsluh (even handler, callback function), objektově orientované programování (objekty = widgety aj.) – nevyžaduje OO programovací jazyk! Jan Outrata (Univerzita Palackého v Olomouci) Multiplatformní GUI toolkity duben 2015 1 / 10 GUI toolkit (widget toolkit) (2) language binding = API (aplikační programové rozhraní) toolkitu v jiném prog. jazyce než původní API a toolkit samotný GUI designer/builder = WYSIWYG nástroj pro tvorbu GUI s využitím toolkitu, hierarchicky skládáním prvků, z uloženého XML pak generuje kód nebo GUI vytvoří za běhu aplikace nekomerční (GNU (L)GPL, MIT, open source) i komerční licence např. GTK+ (C), Qt (C++), wxWidgets (C++), FLTK (C++), CEGUI (C++), Swing/JFC (Java), SWT (Java), JavaFX (Java), Tcl/Tk (Tcl), XUL (XML) aj.
    [Show full text]
  • Pygtk 2.0 Tutorial
    PyGTK 2.0 Tutorial John Finlay October 7, 2012 PyGTK 2.0 Tutorial by John Finlay Published March 2, 2006 ii Contents 1 Introduction 1 1.1 Exploring PyGTK . .2 2 Getting Started 5 2.1 Hello World in PyGTK . .7 2.2 Theory of Signals and Callbacks . .9 2.3 Events . 10 2.4 Stepping Through Hello World . 11 3 Moving On 15 3.1 More on Signal Handlers . 15 3.2 An Upgraded Hello World . 15 4 Packing Widgets 19 4.1 Theory of Packing Boxes . 19 4.2 Details of Boxes . 20 4.3 Packing Demonstration Program . 22 4.4 Packing Using Tables . 27 4.5 Table Packing Example . 28 5 Widget Overview 31 5.1 Widget Hierarchy . 31 5.2 Widgets Without Windows . 34 6 The Button Widget 35 6.1 Normal Buttons . 35 6.2 Toggle Buttons . 38 6.3 Check Buttons . 40 6.4 Radio Buttons . 42 7 Adjustments 45 7.1 Creating an Adjustment . 45 7.2 Using Adjustments the Easy Way . 45 7.3 Adjustment Internals . 46 8 Range Widgets 49 8.1 Scrollbar Widgets . 49 8.2 Scale Widgets . 49 8.2.1 Creating a Scale Widget . 49 8.2.2 Methods and Signals (well, methods, at least) . 50 8.3 Common Range Methods . 50 8.3.1 Setting the Update Policy . 50 8.3.2 Getting and Setting Adjustments . 51 8.4 Key and Mouse Bindings . 51 8.5 Range Widget Example . 51 9 Miscellaneous Widgets 57 9.1 Labels . 57 9.2 Arrows . 60 9.3 The Tooltips Object .
    [Show full text]
  • Proceedings of the FREENIX Track: 2002 USENIX Annual Technical Conference
    USENIX Association Proceedings of the FREENIX Track: 2002 USENIX Annual Technical Conference Monterey, California, USA June 10-15, 2002 THE ADVANCED COMPUTING SYSTEMS ASSOCIATION © 2002 by The USENIX Association All Rights Reserved For more information about the USENIX Association: Phone: 1 510 528 8649 FAX: 1 510 548 5738 Email: [email protected] WWW: http://www.usenix.org Rights to individual papers remain with the author or the author's employer. Permission is granted for noncommercial reproduction of the work for educational or research purposes. This copyright notice must be included in the reproduced paper. USENIX acknowledges all trademarks herein. XCL : An Xlib Compatibility Layer For XCB Jamey Sharp Bart Massey Computer Science Department Portland State University Portland, Oregon USA 97207–0751 fjamey,[email protected] Abstract 1 The X Window System The X Window System [SG86] is the de facto standard technology for UNIX applications wishing to provide a graphical user interface. The power and success of the X model is due in no small measure to its separation of The X Window System has provided the standard graph- hardware control from application logic with a stable, ical user interface for UNIX systems for more than 15 published client-server network protocol. In this model, years. One result is a large installed base of X applica- the hardware controller is considered the server, and in- tions written in C and C++. In almost all cases, these dividual applications and other components of a com- programs rely on the Xlib library to manage their inter- plete desktop environment are clients.
    [Show full text]
  • Xlib − C Language X Interface X Window System Standard X Version 11, Release 6.7
    Xlib − C Language X Interface X Window System Standard X Version 11, Release 6.7 James Gettys Cambridge Research Laboratory Digital Equipment Corporation Robert W. Scheifler Laboratory for Computer Science Massachusetts Institute of Technology with contributions from Chuck Adams, Tektronix, Inc. Vania Joloboff, Open Software Foundation Hideki Hiura, Sun Microsystems, Inc. Bill McMahon, Hewlett-Packard Company Ron Newman, Massachusetts Institute of Technology Al Tabayoyon, Tektronix, Inc. Glenn Widener, Tektronix, Inc. Shigeru Yamada, Fujitsu OSSI The X Window System is a trademark of The Open Group. TekHVC is a trademark of Tektronix, Inc. Copyright © 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996, 2002 The Open Group Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documenta- tion files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Soft- ware. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTIC- ULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTH- ERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    [Show full text]
  • Extensibility in Gnustep & Étoilé
    Extensibility in GNUstep & Étoilé GNU Hackers 2011 http://www.gnustep.org http://www.etoileos.com jeudi 1 septembre 2011 Objective-C & GNUstep jeudi 1 septembre 2011 Objective-C • Created by Brad Cox and Tom Love in 1986 to package C libraries in Smalltalk-like classes • Comes with dynamic features such as • message forwarding • categories to extend existing classes • resolve methods lazily etc. jeudi 1 septembre 2011 Class Example @interface Person : NSObject - (void) sleep; @end @implementation - (void) sleep { NSLog(@“Zzzz!”); } @end jeudi 1 septembre 2011 Category Example @interface Person (Talktative) - (NSString *) talk; @end @implementation Person (Talktative) - (NSString *) talk { return @“poumpoumpidoum”; } @end jeudi 1 septembre 2011 Objective-C Runtime • No virtual machine, but a small runtime library • class_getSuperclass() • class_setSuperclass() • class_replaceMethod() • method_getArgumentType() etc. • Provides type infos for C types such as structs, unions, pointer etc. jeudi 1 septembre 2011 Class Transform • Dynamic implicit subclass creation • Many Use cases • Persistency (Fast Portable Orthogonally Persistent Java) • Change Notifications (Key Value Observing) • Prototypes (Google V8, libobjc2) • Faulting, State Machine, AOP etc. jeudi 1 septembre 2011 Composition of Class Transforms • Multiple transforms create several implicit subclasses… • Methods can be overriden several times • Composition order matters • How to be sure the resulting behavior is correct? • No well-known model to support composition jeudi 1 septembre
    [Show full text]
  • X Toolkit Intrinsics – C Language Interface
    X Toolkit Intrinsics – C Language Interface X Window System Joel McCormack, Digital Equipment Corporation Paul Asente, Digital Equipment Corporation Ralph R. Swick, Digital Equipment Corporation X Toolkit Intrinsics – C Language Interface: X Window System by Joel McCormack, Paul Asente, and Ralph R. Swick X Version 11, Release 7.7 X Toolkit Intrinsics Version 1.2.0 XWindow System is a trademark of X Consortium, Inc. Copyright © 1985, 1986, 1987, 1988, 1991, 1994 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.
    [Show full text]