X Window System Libraries Reference Manual

Total Page:16

File Type:pdf, Size:1020Kb

X Window System Libraries Reference Manual The Mjølner BETA System X Window System Libraries Reference Manual Mjølner Informatics Report MIA 91-16(1.2) August 1994 Copyright © 1991-94 Mjølner Informatics ApS. All rights reserved. No part of this document may be copied or distributed without the prior written permission of Mjølner Informatics The X Window System is a trademark of MIT. UNIX is a registered trademark of AT&T. OPEN LOOK is a trademark of AT&T. OSF/MOTIF is a trademark of Open Software Foundation, Inc. Parts of this report are based on X Toolkit Intrinsic-C language Interface, by Joel McCormack, Paul Asente, and Ralph Swich, and X Toolkit Athene Widgets-C Language Interface, by Ralph Swich and Terry Weissman, both of which are copyrighted © 1985 - 1989 the Massachusetts Institute of Technology, Cambridge, Massachusetts, and Digital Equipment Corporation, Maynard, Massachusetts. We have used this material under the terms of its copyright, which grants free use, subject to the following condi- tions: Permission to use, copy, modify and distribute this documentation (i.e. the original MIT and DEC material) for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of M.I.T. or Digital not be used in in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T and Digital makes no representations about the suitability of the software described herein for any purpose. It is provided ``as is'' without express or implied warranty. Table of Contents 1 Introduction .................................................................................................................1 1.1 What is Xt?......................................................................................................1 1.2 The BETA interface to Xt et. al. .....................................................................2 1.3 Demo programs...............................................................................................2 1.4 Environment Variables ...................................................................................3 2 XtEnv...........................................................................................................................4 2.1 Using the XtEnv fragment ..............................................................................5 2.2 Basic XtEnv widget patterns...........................................................................5 2.2.1 Core ...................................................................................................5 2.2.2 Composite..........................................................................................7 2.2.3 Constraint ..........................................................................................7 2.2.4 Shell...................................................................................................8 2.2.5 WMShell ...........................................................................................8 2.2.6 ToplevelShell.....................................................................................8 2.2.7 TransientShell....................................................................................8 2.2.8 OverrideShell.....................................................................................8 2.2.9 VendorShell.......................................................................................8 2.3 Other XtEnv Objects and Patterns ..................................................................8 2.3.1 Toplevel.............................................................................................8 2.3.2 Display...............................................................................................9 2.3.3 Timer .................................................................................................9 2.3.4 WorkProc...........................................................................................9 2.3.5 TranslationTable................................................................................9 2.3.6 Accelerator Table ..............................................................................9 2.3.7 RegisteredAction ...............................................................................9 2.3.8 StringArray........................................................................................9 2.3.9 FallbackResources.............................................................................9 2.3.10 Options ..............................................................................................9 2.3.11 ErrorHandler......................................................................................9 2.3.12 WarningHandler ..............................................................................10 2.4 Examples using Xt widgets...........................................................................10 2.5 XtEnv Interface Description .........................................................................13 2.5.1 XtEnv Interface ...............................................................................13 2.5.2 Events Interface...............................................................................34 2.5.3 XSystemEnv Interface.....................................................................46 3 AwEnv.......................................................................................................................48 3.1 What is the Athena Widget set?....................................................................48 3.2 Using the AwEnv fragment...........................................................................48 3.3 Overview of AwEnv Widget Patterns...........................................................49 3.4 Simple Athena Patterns.................................................................................50 3.4.1 Simple..............................................................................................50 3.4.2 Label................................................................................................50 3.4.3 Command ........................................................................................50 3.4.4 ListWidget .......................................................................................51 3.4.5 StripChart ........................................................................................51 3.4.6 Toggle..............................................................................................51 3.4.7 Grip..................................................................................................51 3.4.8 Scrollbar ..........................................................................................51 3.5 Examples using simple Athena Widgets.......................................................52 i ii X Window System Libraries 3.5.1 Using Label .....................................................................................52 3.5.2 Using ListWidget ............................................................................52 3.5.3 Using Command .............................................................................53 3.5.4 Using StripChart .............................................................................54 3.5.5 Using Toggle...................................................................................55 3.5.6 Using ScrollBar...............................................................................56 3.6 Composite Athena Widgets ..........................................................................57 3.6.1 Box..................................................................................................58 3.6.2 Form ................................................................................................58 3.6.3 Dialog..............................................................................................59 3.6.4 Paned...............................................................................................59 3.6.5 ViewPort .........................................................................................60 3.7 Using composite Athena Widgets ................................................................60 3.7.1 Using Form .....................................................................................60 3.8 Cursors, Fonts and PixelMaps ......................................................................61 3.9 Menus ...........................................................................................................62 3.9.1 SimpleMenu ....................................................................................63 3.9.2 MenuButton ....................................................................................64 3.9.3 Sme..................................................................................................64 3.9.4 SmeBSB..........................................................................................64 3.9.5 SmeLine ..........................................................................................64 3.9.6 SmeCascade ....................................................................................64 3.10 Examples of using Menus.............................................................................64 3.10.1 A SimpleMenu example..................................................................64 3.10.2 Using cascading menus...................................................................66
Recommended publications
  • Overview Known Issues Platform Support Windows Linux Mac Setup
    LiveCode 6.5.0 Release Notes 11/27/13 Overview Known issues Platform support Windows Linux Mac Setup Installation Uninstallation Reporting installer issues Activation Multi-user and network install support (4.5.3) Command-line installation Command-line activation Proposed changes Engine changes Full screen scaling mode. Improved image editing tools. Take account of keyboard visibility in Android "effective working screenrect". Notify engine of changes to keyboard visibility. Crash when attempting to print to file on linux. Fullscreen modes cause clipped text on Windows Printing text to PDF on Windows can result in poor layout. Server graphics support The fullscreenModes are now camel-case. PCRE library updated to version 8.33 libUrlSetSSLVerification now supported on mobile platforms Resolution Independence New Graphics Layer Multiple Density Support Density Mapped Images Future Plans More control over automatic scaling Hi-DPI support on desktop platforms. New global property colorDialogColors Integration of revFont external Enhanced 'filter' command Filtering items Matching regular expressions Storing the output in another container Adoption of 'convert' semantics Backward compatibility Text Measurement The optional *recursively* adverb has been added to union and intersect commands 1 LiveCode 6.5.0 Release Notes 11/27/13 Xpath functions Syntax Usage Standalones now set default font settings the same as the IDE. Setting the filename of an image which already has a filename causes the property to be unset and 'could not load image' in
    [Show full text]
  • Gnustep-Gui Improvements
    GNUstep-gui Improvements Author: Eric Wasylishen Presenter: Fred Kiefer Overview ● Introduction ● Recent Improvements ● Resolution Independence ● NSImage ● Text System ● Miscellaneous ● Work in Progress ● Open Projects 2012-02-04 GNUstep-gui Improvements 2 Introduction ● Cross-platform (X11, Windows) GUI toolkit, fills a role similar to gtk ● Uses cairo as the drawing backend ● License: LGPLv2+; bundled tools: GPLv3+ ● Code is copyright FSF (contributors must sign copyright agreement) ● Latest release: 0.20.0 (2011/04) ● New release coming out soon 2012-02-04 GNUstep-gui Improvements 3 Introduction: Nice Features ● Objective-C is a good compromise language ● Readable, Smalltalk-derived syntax ● Object-Oriented features easy to learn ● Superset of C ● OpenStep/Cocoa API, which GNUstep-gui follows, is generally well-designed 2012-02-04 GNUstep-gui Improvements 4 Recent Improvements: Resolution Independence ● Basic problem: pixel resolution of computer displays varies widely 2012-02-04 GNUstep-gui Improvements 5 Resolution Independence ● In GNUstep-gui we draw everything with Display PostScript commands and all graphics coordinates are floating-point, so it would seem to be easy to scale UI graphics up or down ● Drawing elements ● Geometry ● Images ● Text 2012-02-04 GNUstep-gui Improvements 6 Resolution Independence ● Challenges: ● Auto-sized/auto-positioned UI elements should be aligned on pixel boundaries ● Need a powerful image object which can select between multiple versions of an image depending on the destination resolution (luckily NSImage is capable) 2012-02-04 GNUstep-gui Improvements 7 Recent Improvements: NSImage ● An NSImage is a lightweight container which holds one or more image representations (NSImageRep) ● Some convenience code for choosing which representation to use, drawing it, caching..
    [Show full text]
  • Re-Envisioning the Operator Consoles for Dhruva Control Room
    WEPD28 Proceedings of PCaPAC2012, Kolkata, India RE-ENVISIONING THE OPERATOR CONSOLE FOR DHRUVA CONTROL ROOM S. Gaur, P. Sridharan, P. M.Nair,M.P. Diwakar, N. Gohel, C. K.Pithawa BARC, Mumbai, India Abstract They provide: Control Room design is undergoing rapid changes with • Multiple views of plant state for quick assessment of the progressive adoption of computerization and Automa- situation. tion. Advances in man-machine interfaces have further ac- • Alarm Visualization(Analysing, organizing, filtering, celerated this trend. This paper presents the design and viewing alarms) main features of Operator consoles (OC) for Dhruva con- • Archival of Periodic Data, Alarms, Diagnostics with a trol room developed using new technologies. The OCs data life cycle of 5 years. have been designed so as not to burden the operator with • Logging and reporting with data export to Excel. information overload but to help him quickly assess the • Real-time and historical data trending. situation and timely take appropriate steps. The consoles provide minimalistic yet intuitive interfaces, context sensi- DESIGN APPROACH tive navigation, display of important information and pro- The OC has been designed keeping in mind the common gressive disclosure of situation based information. The use requirements across systems of similar categories while al- of animations, 3D graphics, and real time trends with the lowing the UI to be tailored to specific requirements of benefit of hardware acceleration to provide a resolution- the system. This has resulted in a common OC plat- independent rich user experience. The use of XAML, an form. Variability between these applications were anal- XML based Mark-up Language for User Interface defini- ysed and addressed through configuration points.
    [Show full text]
  • Master Thesis
    Charles University in Prague Faculty of Mathematics and Physics MASTER THESIS Petr Koupý Graphics Stack for HelenOS Department of Distributed and Dependable Systems Supervisor of the master thesis: Mgr. Martin Děcký Study programme: Informatics Specialization: Software Systems Prague 2013 I would like to thank my supervisor, Martin Děcký, not only for giving me an idea on how to approach this thesis but also for his suggestions, numerous pieces of advice and significant help with code integration. Next, I would like to express my gratitude to all members of Hele- nOS developer community for their swift feedback and for making HelenOS such a good plat- form for works like this. Finally, I am very grateful to my parents and close family members for supporting me during my studies. I declare that I carried out this master thesis independently, and only with the cited sources, literature and other professional sources. I understand that my work relates to the rights and obligations under the Act No. 121/2000 Coll., the Copyright Act, as amended, in particular the fact that the Charles University in Pra- gue has the right to conclude a license agreement on the use of this work as a school work pursuant to Section 60 paragraph 1 of the Copyright Act. In Prague, March 27, 2013 Petr Koupý Název práce: Graphics Stack for HelenOS Autor: Petr Koupý Katedra / Ústav: Katedra distribuovaných a spolehlivých systémů Vedoucí diplomové práce: Mgr. Martin Děcký Abstrakt: HelenOS je experimentální operační systém založený na mikro-jádrové a multi- serverové architektuře. Před započetím této práce již HelenOS obsahoval početnou množinu moderně navržených subsystémů zajišťujících různé úkoly v rámci systému.
    [Show full text]
  • Programming Windows Presentation Foundation by Ian Griffiths, Chris Sells
    Programming Windows Presentation Foundation By Ian Griffiths, Chris Sells ............................................... Publisher: O'Reilly Pub Date: September 2005 ISBN: 0-596-10113-9 Pages: 447 Slots: 1.0 Table of Contents | Index Windows Presentation Foundation (WPF) (formerly known by its code name "Avalon") is a brand-new presentation framework for Windows XP and Windows Vista, the next version of the Windows client operating system. For developers, WPF is a cornucopia of new technologies, including a new graphics engine that supports 3-D graphics, animation, and more; an XML-based markup language (XAML) for declaring the structure of your Windows UI; and a radical new model for controls. Programming Windows Presentation Foundation is the book you need to get up to speed on WPF. By page two, you'll have written your first WPF application, and by the end of Chapter 1, "Hello WPF," you'll have completed a rapid tour of the framework and its major elements. These include the XAML markup language and the mapping of XAML markup to WinFX code; the WPF content model; layout; controls, styles, and templates; graphics and animation; and, finally, deployment. Programming Windows Presentation Foundation features: ● Scores of C# and XAML examples that show you what it takes to get a WPF application up and running, from a simple "Hello, Avalon" program to a tic-tac-toe game ● Insightful discussions of the powerful new programming styles that WPF brings to Windows development, especially its new model for controls ● A color insert to better illustrate WPF support for 3-D, color, and other graphics effects ● A tutorial on XAML, the new HTML-like markup language for declaring Windows UI ● An explanation and comparison of the features that support interoperability with Windows Forms and other Windows legacy applications The next generation of Windows applications is going to blaze a trail into the unknown.
    [Show full text]
  • Essential Windows Presentation Foundation
    Essential Windows Presentation Foundation Prothalloid Moshe loops no pulsojet re-echo anyplace after Claire reorganised drawlingly, quite amebic. Uncurable and leonine Montgomery behoove her shotes skimpiness blip and sizing manageably. Marshy Arlo enlace undauntedly or flowers thenceforward when Kent is hebdomadary. This presentation foundation and behave according to create an essential windows forms to show the first chapter is. Aenean eu leo quam. Which skinning might want to animating a foundation experts give my friends in essential windows presentation foundation for you can develop your reports. Pmp is perfect for subsequent launches, in essential windows presentation foundation tools to japanese woodworking, remote learning wpf the foundation? Here are books about WPF 2007-04-11 Essential Windows Presentation Foundation Edition 1 Series Microsoft NET Development Author. We have a number of data in presenting a number of the dispatcher, mil can define the base class but this is great learning wpf controls. Here are essential windows presentation foundation, and window if a significant amount of the look and. WPF utilities, samples, and demos. Windows Presentation Foundation WPF replaces Microsofts diverse presentation technologies with a unified state-of-the-art platform for he rich applications. The foundation presentation foundation applications of the same web. Chris Anderson was one of interest chief architects of arms next-generation GUI stack the Windows Presentation Framework WPF which master the subject of love book. Essential Windows Presentation Foundation WPF Pro WPF Windows Presentation Foundation house NET 30 Programming WPF. Windows Presentation Foundation 4 Brushes and Colors. GPUs are optimized for parallel pixel computations; this tends to speed up screen refreshes at the more of decreased compatibility in markets where GPUs are not necessarily as powerful, comprehensive as the netbook market.
    [Show full text]
  • Diffusion Curves: a Vector Representation for Smooth-Shaded Images Alexandrina Orzan, Adrien Bousseau, Holger Winnemöller, Pascal Barla, Joëlle Thollot, David Salesin
    Diffusion Curves: A Vector Representation for Smooth-Shaded Images Alexandrina Orzan, Adrien Bousseau, Holger Winnemöller, Pascal Barla, Joëlle Thollot, David Salesin To cite this version: Alexandrina Orzan, Adrien Bousseau, Holger Winnemöller, Pascal Barla, Joëlle Thollot, et al.. Dif- fusion Curves: A Vector Representation for Smooth-Shaded Images. ACM Transactions on Graphics, Association for Computing Machinery, 2008, Special Issue: Proceedings of ACM SIGGRAPH 2008, 27 (3), pp.92:1-8. 10.1145/1399504.1360691. inria-00274768 HAL Id: inria-00274768 https://hal.inria.fr/inria-00274768 Submitted on 14 Jun 2011 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Diffusion Curves: A Vector Representation for Smooth-Shaded Images Alexandrina Orzan1;2 Adrien Bousseau1;2;3 Holger Winnemoller¨ 3 Pascal Barla1 Joelle¨ Thollot1;2 David Salesin3;4 1INRIA 2Grenoble University 3Adobe Systems 4University of Washington Figure 1: Diffusion curves (left), and the corresponding color image (right). Note the complex shading on the folds and blur on the face. Abstract 1 Introduction We describe a new vector-based primitive for creating smooth- Vector graphics, in which primitives are defined geometrically, shaded images, called the diffusion curve. A diffusion curve parti- dates back to the earliest days of our field.
    [Show full text]
  • Output: Software
    Output: Software Output System Layers Application 1 Application 2 Application 3 Swing SWT ... UIKit Window System Operating System Hardware (e.g., graphics card) 2 The Window System 3 Window System Basics l Developed to support metaphor of overlapping pieces of paper on a desk (desktop metaphor) l Good use of limited space l leverages human memory l Good/rich conceptual model 4 A little history... l The BitBlt algorithm l Dan Ingalls, “Bit Block Transfer” l (Factoid: Same guy also invented pop-up menus) l Introduced in Smalltalk 80 l Enabled real-time interaction with windows in the UI l Why important? l Allowed fast transfer of blocks of bits between main memory and display memory l Fast transfer required for multiple overlapping windows l Xerox Alto had a BitBlt machine instruction 5 Goals of window systems l Virtual devices (central goal) l virtual display abstraction l multiple raster surfaces to draw on l implemented on a single raster surface l illusion of contiguous non-overlapping surfaces l Keep applications’ output separated l Enforcement of strong separation among applications l A single app that crashes brings down its component hierarchy... l ... but can’t affect other windows or the window system as a whole l In essence: window system is the part of the OS that manages the display and input device hardware 6 Virtual devices l Also multiplexing of physical input devices l May provide simulated or higher level “devices” l Overall better use of very limited resources (e.g. screen space) l Strong analogy to operating systems l Each application “owns” its own windows, and can’t clobber the windows of other apps l Centralized support within the OS (usually) l X Windows: client/server running in user space l SunTools: window system runs in kernel l Windows/Mac: combination of both 7 Window system goals: Uniformity l Uniformity of UI l The window system provides some of the “between application” UI l E.g., desktop l Cut/copy/paste, drag-and-drop l Window titlebars, close gadgets, etc.
    [Show full text]
  • Solaris X Window System Developer's Guide Provides Detailed Information on the Solaris X Server
    Solaris XWindow System Developer's Guide Part No: 816–0279–10 May 2002 Copyright ©2002Sun Microsystems 4150 Network Circle, Santa Clara, CA 95054 U.S.A. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. Sun, Sun Microsystems, the Sun logo, docs.sun.com, AnswerBook, AnswerBook2, and Solaris are trademarks, registered trademarks, or service marks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. The OPEN LOOK and Sun Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun's licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's written license agreements.
    [Show full text]
  • Implementation of a Library for Declarative, Resolution-Independent 2D Graphics in Haskell
    Programming Languages and Compiler Construction Department of Computer Science Christian-Albrechts-University of Kiel Bachelor Thesis Implementation of a Library for Declarative, Resolution-Independent 2D Graphics in Haskell Author: Finn Teegen Date: 30th September 2013 Advised by: Prof. Dr. Michael Hanus and Dipl.-Inf. Fabian Skrlac Declaration of Authorship I hereby certify that this bachelor thesis has been composed by myself, and describes my own work, unless otherwise acknowledged in the text. All references and verbatim extracts have been quoted, and all sources of information have been specically acknowl- edged. It has not been accepted in any previous application for a degree. Place, date Signature iii Contents 1. Introduction1 2. Preliminaries3 2.1. Haskell......................................3 2.1.1. Strictness................................3 2.1.2. Foreign Function Interface.......................4 2.2. Cairo.......................................4 2.3. Simple DirectMedia Layer...........................4 3. Design 5 3.1. Paths......................................5 3.2. Shapes......................................7 3.3. Textures.....................................7 3.4. Textured Shapes................................9 3.5. Drawings....................................9 3.6. Transformations................................. 10 3.7. Window Management............................. 11 4. Implementation 13 4.1. Basic Concept.................................. 13 4.2. Setup...................................... 14 4.3. Event Loop..................................
    [Show full text]
  • Diffusion Curves: a Vector Representation for Smooth-Shaded Images
    Diffusion Curves: A Vector Representation for Smooth-Shaded Images Alexandrina Orzan1;2 Adrien Bousseau1;2;3 Holger Winnemoller¨ 3 Pascal Barla1 Joelle¨ Thollot1;2 David Salesin3;4 1INRIA 2Grenoble University 3Adobe Systems 4University of Washington Figure 1: Diffusion curves (left), and the corresponding color image (right). Note the complex shading on the folds and blur on the face. Abstract 1 Introduction We describe a new vector-based primitive for creating smooth- Vector graphics, in which primitives are defined geometrically, shaded images, called the diffusion curve. A diffusion curve parti- dates back to the earliest days of our field. Early cathode-ray tubes, tions the space through which it is drawn, defining different colors starting with the Whirlwind-I in 1950, were all vector displays, on either side. These colors may vary smoothly along the curve. In while the seminal Sketchpad system [Sutherland 1980] allowed addition, the sharpness of the color transition from one side of the users to manipulate geometric primitives like points, lines, and curve to the other can be controlled. Given a set of diffusion curves, curves. Raster graphics provides an alternative representation for the final image is constructed by solving a Poisson equation whose describing images via a grid of pixels rather than geometry. Raster constraints are specified by the set of gradients across all diffusion graphics arose with the advent of the framebuffer in the 1970s and curves. Like all vector-based primitives, diffusion curves conve- is now commonly used for storing, displaying, and editing images. niently support a variety of operations, including geometry-based However, while raster graphics offers some advantages over vector editing, keyframe animation, and ready stylization.
    [Show full text]
  • Final Report
    SKETCHI - FROM SKETCHES TO GUIS Johnathan Tunnicliffe Supervisor: Dr Simon Colton Individual Project Report for MEng Computing, Imperial College London [email protected] June 2009 ABSTRACT Despite the dominance of Graphical User Interfaces (GUIs) in both consumer and business applications, there is still no simple, straightforward way of producing them. Manual coding requires a programmer to do a designer’s job whilst drag-and-drop tools produce verbose, difficult-to-read code. Various tools and techniques have been created over the years to aid developers in producing GUIs whilst reducing some of the prerequisite knowledge required. However, there is still a wealth of expertise needed regarding the specific widget toolkit to use these tools and produce a good quality interface for an end user. This report discusses a new, more natural tool that developers can use to build GUIs particularly for Swing in Java. We explore transforming sketches and natural input into the code for user interfaces. We have implemented a new GUI design tool that removes the learning curve in creating GUIs, produces concise code and requires minimal user intervention and prior toolkit knowledge. The results show that we can produce quality GUIs from natural input with minimal widget toolkit knowledge. Furthermore, the code created is more concise and of a higher quality than existing tools. The final finding is that we can abstract the toolkit so a single GUI sketch can produce code for multiple toolkits and programming languages. 1 ACKNOWLEDGEMENTS I would firstly like to thank my supervisor Dr Simon Colton for his excellent project idea as well as his help throughout the duration of the project.
    [Show full text]