Windowing Systems

Total Page:16

File Type:pdf, Size:1020Kb

Windowing Systems CS 485 Systems Programming Windowing Systems CS 485 Systems Programming Fall 2015 Instructor: James Griffioen 1 CS 485 Systems Programming User Interfaces ¢ Terminals § Simple devices connected via serial lines § Character-oriented devices § Support Both input and output (keyBoard + terminal) § Input/output generates hardware interrupts to the OS on every character ¢ Graphical Users Displays § Replace the simply terminal with a (color) Bitmapped display § Display divided into pixels § Color of each pixel is defined By a numBer § The pixel depth (numBer of Bits per pixel) defines the numBer of colors supported § The numBer of pixels in the x and y direcQons determines the display’s resoluQon. § Add a mouse device as a poinQng device § Provides (x,y) coordinates or relave moQon § KeyBoard conQnues to provide character input § KeyBoard, mouse, and display generate interrupts to the OS § Most displays are now driven By GPUs (graphics processing units) that offload work that would otherwise have to Be done By OS/Windowing system code running on the CPU. 2 CS 485 Systems Programming Device Driver Basics ¢ Device drivers handle interrupts from devices ¢ Are device-specific and o[en include low-level code wri\en in ASM ¢ O[en must handle Both input and output interrupts ¢ Data is usually desQned for, or coming from, user-level applicaons which requires synchronizaon Between the OS kernel device driver rouQnes and the user-level code that consumes or produces the data. ¢ Buffering is typically supported inside the OS to allow applicaons to run ahead of output or run Behind input. ¢ Because Buffers are finite, Blocking is necessary to prevent buffer overflow. 3 CS 485 Systems Programming Device Drivers App I/O Systems Calls Kernel I/O Buffer I/O Handler CPU MEM TTY 5 CS 485 Systems Programming Windowing Systems ¢ Are complex pieces of soGware § Like the OS, windowing systems have Become massive pieces of so[ware. § In many cases they are Qghtly integrated with the OS (i.e., the windowing system is integral to the OS). In other cases windowing system is modular, and can Be (easily) replaced with alternave implementaons of the windowing system. ¢ Enhance the device driver of a graphical user display § Provide higher level API calls that applicaons can invoke to manipulate the display. § Provide common “window system abstracQons” needed By most applicaons. examples include text windows, Bu\ons, radio Boxes, menus, scrollBars, etc. § Hide many of the mouse interrupts from the applicaon, only passing key “events” to the applicaon. For example, mouse moQon are o[en handled By the windowing system, only passing mouse click events to the applicaon. 6 CS 485 Systems Programming X Windows ¢ A modular windowing system used on most Unix systems ¢ Developed as part of the Athena project at MIT in the mid 1980’s and was later taken over and supported By the X Consorum. ¢ It is a networked windowing system implying that it can used By remote applicaons ¢ It has a well-defined protocol (the X protocol) that defines the messages that can Be sent to, and received from the Windowing system. ¢ A server, knows as the X-server, controls/manages the physical graphical display, rendering images on the display and handling interrupts from the mouse and keyBoard. ¢ User applicaons use the network (TCP/IP) to interact with the X-server and create the “windows” required By the applicaon. 7 CS 485 Systems Programming X window applicaons can run anywhere Window Window on main on laptop frame Window Window on on smart super phone computer 8 CS 485 Systems Programming X-Window Architecture X Server Operang System X Display Driver Hardware 9 CS 485 Systems Programming X-Window Architecture X Server Operang System X Display Driver Hardware 10 CS 485 Systems Programming X-Window Architecture App 1 X Server ApplicaJons “speak” Operang System the X protocol to the X server. X Display Driver Hardware 11 CS 485 Systems Programming X-Window Architecture App 1 X Server Xlib Operang System X Display Driver Hardware 12 CS 485 Systems Programming Xlib ¢ A library that handles all X communicaJon for ApplicaJons ¢ Supports basic “drawing” operaons § Draw a line at this locaon § Tell me that the mouse moved, or the mouse was clicked § etc ¢ While it simplifies talking to the X server, it is sJll difficult to create the types of nice user interface things that people are used to using (e.g., buons, sliders, etc). 13 CS 485 Systems Programming X-Window Architecture App 1 X Server Toolkit Xlib Operang System X Display Driver Hardware 14 CS 485 Systems Programming Toolkits ¢ Toolkits are designed to help applicaon create useful graphical user interfaces. ¢ They do not necessary define the “look and feel”, But rather help create the “funcQonality”. ¢ Toolkits offer common widgets via a “widget liBrary”. example widgets include Bu\ons, scroll Bars, radio Bu\ons, sliders, etc. They o[en also support “canvas” widgets that provide an area of the screen on which other things can Be drawn or displayed. ¢ Many different widget liBraries and toolkits: § MoQf § Gtk § Qt § Xforms § FLTK § LessTif 15 CS 485 Systems Programming X-Window Architecture Window Manager App 1 X Server Toolkit Xlib Operang System X Display Driver Hardware 16 CS 485 Systems Programming Window Managers ¢ Window managers manage the way windows look and feel § The way windows are placed on the display § How windows are moved around on the screen § How they are iconified § PossiBly defining whether they have Qtle Bars and what features those Qtle Bars support § etc ¢ Window managers are just X clients like applicaons – alBeit special applicaons. ¢ example Window Managers include: § twm § fvwm § sawfish § kwm § icewm § enlightenment § metacity 17 CS 485 Systems Programming X-Window Architecture Window Manager App 1 App 2 X Server Toolkit Toolkit Xlib Xlib Operang System Operang X Display Driver System Hardware Hardware Network 18 CS 485 Systems Programming X-Window Architecture Desktop Window Manager App 1 App 2 X Server Toolkit Toolkit Xlib Xlib Operang System Operang X Display Driver System Hardware Hardware Network 19 CS 485 Systems Programming Desktops ¢ Desktops are used to § Define a consistent look and feel across windows § Provide useful services and features (e.g., panels, a visiBle “desktop” folder, lauch Bars, trash, etc.) ¢ example Desktops include: § Gnome § KDe § Xfce 20 .
Recommended publications
  • Linux on a Stick Everyone Knows You Can Boot Linux from a Live CD, but Have You Thought About Putting Linux on a Compact and Highly Portable USB
    KNOW HOW Memory Stick Linux Booting Linux from a USB Memory Stick Linux on a Stick Everyone knows you can boot Linux from a live CD, but have you thought about putting Linux on a compact and highly portable USB memory stick? BY FABRIZIO CIACCHI bootable “live” CD like Knoppix much more common. Part of our pur- ent from DSL, but it includes more [1] or Kanotix [2] gives the user a pose is to create an inexpensive system, software (about 14 MB plus), and it Afully portable operating environ- so I will base this discussion on the stan- has already been refined and tested for ment. You can carry your system with dard and very common 128 MB size. USB devices. you and boot it from anywhere. However, the procedure I describe in this • Flonix [8]: Flonix is also based on Your tools, your files, and your work- article can also be used to put a larger DSL, but it uses some different pro- space will follow you wherever you go – Knoppix-based distribution on a larger grams (for instance, IceWM instead even to another PC with a different USB memory stick. of Fluxbox). The Flonix project also operating system. Live CDs are also used Assuming you want room to work and introduced a useful web install by system administrators for trouble- store documents, it is a good idea to only process. Ultimately, Flonix was so shooting computers that won’t boot use half of the available space (64 MB) successful that it become a commer- normally. for the Linux system and related tools.
    [Show full text]
  • Eves2005-Dformstfp04
    Chapter 1 Disjoint Forms in Graphical User Interfaces Sander Evers, Peter Achten, Rinus Plasmeijer1 Abstract: Forms are parts of a graphical user interface (GUI) that show a (struc- tured) value and allow the user to update it. Some forms express a choice between two or more (structured) values using radio buttons or check boxes. We show that explicitly modelling such a choice leads to a cleaner separation of logic and lay- out. This is done by extending the combinator library FunctionalForms with dis- joint form combinators. To implement these, we have generalized the technique of compositional functional references which underlies the library. 1.1 INTRODUCTION Forms are parts of a graphical user interface (GUI) that show a (structured) value and allow the user to update it. For example, the omnipresent dialogs labeled Options, Settings and Preferences are forms. An address book can also be con- sidered a form. In our previous work, we have developed the combinator library FunctionalForms[2] for building forms in a concise, compositional way. Many real-life forms allow a choice between two or more alternatives, some of which require extra information. For example, the form in Fig. 1.1 indicates whether the user wishes to receive a certain newsletter; if s/he does, the text entry field next to this option should contain his/her email adress. If s/he does not, this text field is irrelevant (some GUIs provide a visual clue for this: the control is dimmed). Usually, the information in such a form is processed as a product-like data structure containing the choice (e.g.
    [Show full text]
  • Part II, Window Managers and Desktop Environments
    Part II Window Managers and Desktop Environments The window manager is responsible for managing application windows and application- independent behavior, such as pop-up menus appearing in the background. The window manager manages the placement, borders, and decorations of all windows, and is responsible for the look and feel of your particular X session. Desktop environments typically include an integrated window manager, some sort of control panel, applications, and a consistent look and feel across applications. The chapters in Part II, Window Managers and Desktop Environments, are: Overview This chapter provides a conceptual introduction to window managers and desktop environments and briefly surveys some of the many window managers and desktop environments available for Linux. FVWM FVWM is a traditional window manager for Linux systems. It is now into its second major version, FVWM2. Window Maker Window Maker is an elegant X11 window manager designed to give integration support to GNUstep-based applications. It emulates the look and feel of OpenStep, the NeXTSTEP GUI. Enlightenment Enlightenment, often shortened to just E, may be the most elaborate and bizarre window manager available. Enlightenment’s motto, “time to rethink everything,” provides a good indication of the uniqueness and flashiness behind Enlightenment. Using GNOME GNOME, which stands for GNU Network Object Model Environment, is a freely available desktop environment that can be used with any of several window managers, including Enlightenment and Sawfish. Using KDE KDE, the K Desktop Environment, is another freely available desktop environment. KDE includes an assortment of games and utilities, as well as an integrated suite of office productivity applications..
    [Show full text]
  • Comparison of Common Xml-Based Web User Interface Languages
    Journal of Web Engineering, Vol. 9, No. 2 (2010) 095–115 c Rinton Press COMPARISON OF COMMON XML-BASED WEB USER INTERFACE LANGUAGES MIKKO POHJA Department of Media Technology, Aalto University P.O. Box 15400, FI-00076 Aalto, Finland mikko.pohja@hut.fi Received August 1, 2009 Revised February 25, 2010 In addition to being a platform for information access, the World Wide Web is increas- ingly becoming an application platform. While web applications have several benefits compared to desktop applications, there are also some problems. With legacy HTML, for example, one cannot produce user interfaces such as those that users have become accustomed to with desktop applications. What worked for static documents is not suf- ficient for the complicated web applications of today. Several parties have addressed this problem by defining a specific UI description language. In addition, the renewal of HTML aims to enhance support for web applications. This study evaluated five XML- based UI description formats, including HTML 5, in order to determine which language is best suited for modern web application development. The study also assessed what kind of applications are suited to each format. The requirements for a Web UI descrip- tion language from the literature were revised and three use cases were defined, through which the languages are evaluated. The paper also presents the model differences of the languages. Keywords: Web User Interface Description Language, Web Application Communicated by: D. Lowe & O. Pastor 1 Introduction Commerce and communication tasks, such as the use of e-mail, are common today on the World Wide Web (WWW), as is a trend towards realizing higher interaction tasks, such as in- formation authoring.
    [Show full text]
  • Introduction to the Enlightenment Foundation Libraries
    Introduction to the Enlightenment foundation libraries. An overview of EFL Kostis Kapelonis Introduction to the Enlightenment foundation libraries.: An overview of EFL Kostis Kapelonis Abstract The target audience of this document are UNIX programmers who are interested in the Enlightenment Foundation Libraries (EFL). You must already know C programming. You will not however learn how to program using the EFL. Instead, you will learn why you should program with the EFL. If you ever wanted to evaluate the EFL but did not see any advantages over previous graphic libraries then this document is for you! Table of Contents 1. Introduction ............................................................................................................................1 A little History ...................................................................................................................1 Related documentation ......................................................................................................... 2 Obtaining the EFL libraries ................................................................................................... 2 2. The EFL structure .................................................................................................................... 4 Organization of the Libraries ................................................................................................. 4 Brief description of each EFL library ...................................................................................... 5 3.
    [Show full text]
  • The Glib/GTK+ Development Platform
    The GLib/GTK+ Development Platform A Getting Started Guide Version 0.8 Sébastien Wilmet March 29, 2019 Contents 1 Introduction 3 1.1 License . 3 1.2 Financial Support . 3 1.3 Todo List for this Book and a Quick 2019 Update . 4 1.4 What is GLib and GTK+? . 4 1.5 The GNOME Desktop . 5 1.6 Prerequisites . 6 1.7 Why and When Using the C Language? . 7 1.7.1 Separate the Backend from the Frontend . 7 1.7.2 Other Aspects to Keep in Mind . 8 1.8 Learning Path . 9 1.9 The Development Environment . 10 1.10 Acknowledgments . 10 I GLib, the Core Library 11 2 GLib, the Core Library 12 2.1 Basics . 13 2.1.1 Type Definitions . 13 2.1.2 Frequently Used Macros . 13 2.1.3 Debugging Macros . 14 2.1.4 Memory . 16 2.1.5 String Handling . 18 2.2 Data Structures . 20 2.2.1 Lists . 20 2.2.2 Trees . 24 2.2.3 Hash Tables . 29 2.3 The Main Event Loop . 31 2.4 Other Features . 33 II Object-Oriented Programming in C 35 3 Semi-Object-Oriented Programming in C 37 3.1 Header Example . 37 3.1.1 Project Namespace . 37 3.1.2 Class Namespace . 39 3.1.3 Lowercase, Uppercase or CamelCase? . 39 3.1.4 Include Guard . 39 3.1.5 C++ Support . 39 1 3.1.6 #include . 39 3.1.7 Type Definition . 40 3.1.8 Object Constructor . 40 3.1.9 Object Destructor .
    [Show full text]
  • THE 2003 Editionlinux
    SUBSCRIBE or renew your subscription to APC for your chance to WIN the new Alfa 156 JTS, valued at over $54,000 Only $65 for 12 issues THE 2003 edition linux POCKETBOOK Subscribe ... www.apcmag.com Online at magshop.com.au or Call 13 61 16 Authorised under NSW Permit No. L02/09075 VIC: 02/2531 SA: T02/3553 ACT: TP02/3650 NT: NT02/3286 For terms and conditions refer to www.xmas.magshop.au. Expiry date: 24/12/02 Contents CHAPTER 1 Customising Gnome 57 CHAPTER 6 Editorial INTRODUCTION 11 Exploring KDE 60 WORKING WITH WINDOWS 131 The origins of the Customising KDE 64 What about Windows? 132 Welcome back to The Linux Pocketbook 2003 edition! penguin 12 Windows connectivity 138 Many of you will probably remember the original print ver- CHAPTER 4 sions of The Linux Pocketbook on newsstands across the country. Why Linux? 18 Basic security 145 The original versions sold so well that we ran out of copies. We’ve The ways of the world 20 USING LINUX 67 had countless requests for reprints, so we’ve decided to bundle the Connecting to the Net 68 CHAPTER 7 entire book into this single resource. This version of the pocketbook relies heavily on Mandrake Linux 9.0 or Red Hat 8.0. Both were CHAPTER 2 Applications 71 PLAYING WITH LINUX 151 released late in 2002, and can be easily found for sale at www.everyth INSTALLING LINUX 21 Conjuring Linux 75 Linux multimedia 152 inglinux.com.au, or for download from either mandrakelinux.com or First published December 2000.
    [Show full text]
  • Model-Driven Architecture for Cancer Research
    Model-driven architecture for cancer research Radu Calinescu, Steve Harris, Jeremy Gibbons and Jim Davies Computing Laboratory, University of Oxford Wolfson Building, Parks Road, Oxford OX1 3QD, UK Igor Toujilov and Sylvia B. Nagl Oncology Department, The Royal Free and University College Medical School Hampstead Campus, Rowland Hill Street, Hampstead, London NW3 2PF, UK Abstract trial designer tool provides oncology clinicians with an in- tegrated environment for the design of cancer clinical trials It is a common phenomenon for research projects to col- that are instances of the metamodel. This use of a common lect and analyse valuable data using ad-hoc information metamodel for the design of different clinical trials enables systems. These costly-to-build systems are often composed the model-driven development of reusable software compo- of incompatible variants of the same modules, and record nents for cancer research. Additionally, the tool enforces data in ways that prevent any meaningful result analysis the consistent use of controlled cancer vocabulary and com- across similar projects. We present a framework that uses a mon data elements (i.e., cancer metadata)—a key factor for combination of formal methods, model-driven development sharing data across clinical trials. Starting from a set of and service-oriented architecture (SOA) technologies to au- trial designs produced by means of this tool, an assembly tomate the generation of data management systems for can- of software artefact generators build the complete code for cer clinical trial research, an area particularly affected by the services, electronic forms and documentation that com- these problems. The SOA solution generated by the frame- pose a trial management system.
    [Show full text]
  • A Successor to the X Window System
    Y: A Successor to the X Window System Mark Thomas <[email protected]> Project Supervisor: D. R¨uckert <[email protected]> Second Marker: E. Lupu <[email protected]> June 18, 2003 ii Abstract UNIX desktop environments are a mess. The proliferation of incompatible and inconsistent user interface toolkits is now the primary factor in the failure of enterprises to adopt UNIX as a desktop solution. This report documents the creation of a comprehensive, elegant framework for a complete windowing system, including a standardised graphical user interface toolkit. ‘Y’ addresses many of the problems associated with current systems, whilst keeping and improving on their best features. An initial implementation, which supports simple applications like a terminal emulator, a clock and a calculator, is provided. iii iv Acknowledgements Thanks to Daniel R¨uckert for supervising the project and for his help and advice regarding it. Thanks to David McBride for his assistance with setting up my project machine and providing me with an ATI Radeon for it. Thanks to Philip Willoughby for his knowledge of the POSIX standard and help with the GNU Autotools and some of the more obscure libc functions. Thanks to Andrew Suffield for his help with the GNU Autotools and Arch. Thanks to Nick Maynard and Karl O’Keeffe for discussions on window system and GUI design. Thanks to Tim Southerwood for discussions about possible features of Y. Thanks to Duncan White for discussions about the virtues of X. All company and product names are trademarks and/or registered trademarks of their respective owners.
    [Show full text]
  • Apg Zope-Plone3 Zope-Externaleditor 0. Poppler-Utils 0. Apache2.2
    deluge-core libmagickcore2 libecpg6 libcvaux-dev libcairo-perl 0.655021834061 0. 0. libisc50 libfindlib-ocaml-dev 0. libparrot1.4.0 libjaxp1.3-java-gcj 0. 0. libgssrpc4 peercast 0. gcj-4.4-jre 0. libxfconf-0-2 0. 0. 0. libbind9-50 deluge-common 0. 0. liblqr-1-0 libecpg-compat3 0. libcv-dev libavahi-common-data libgtk2-perl 0. 1.03092783505 1.5873015873 0. 0. libasm0 2.94117647059 2.40963855422 libacl1 coreutils 0.0842023447114 0. 0.655021834061 0. 0. libplasma-ruby1.8 0. 0. 0. 0. 2.38095238095 libxalan2-java-gcj 0. 0. 0. 0. libfindlib-ocaml 0. librevm0 python-poker-engine 0. peercast-geekast 1.03092783505 0. libxfcegui4-4 0.1941370607650.278515447892 0. libisccc50 0. 0.0971754340503 libparrot-dev parrot 0.0226346763241 0. 0. geoip-database 0. libhighgui-dev 0. libmagickwand2 libpango-perl libpgtypes3 0. gcj-4.4-jdk libgcj10-awt 2.94117647059 libkdb5-4 libkadm5srv6 0. 0. 0. 0. 0.01295672454 libasn1-8-heimdal 0.340676811265 kamera python 1.61290322581 libpoconet8-dbg python-alsaaudio 0. 0. libedfmt0 0. 0. step 1.3314094576 0. 0. libxerces2-java-gcj 0. 0. xfconf ocaml-findlib 3.79746835443 dpkg libattr1 0. peercast-servent 3.75283079909 0. libplasma-ruby gnustep-base-runtime 0.2915263021511.24614678297 libdns50 0. 0. 3.79746835443 apg python-poker-network 0. libdigest-bubblebabble-perl 0. libloader-java-openoffice.org libhx509-4-heimdal libavahi-client3 libavahi-common3 0. libdb4.5 0. libcrypt-openssl-dsa-perl libpococrypto8-dbg 0.3179650238473.05646290247 0. 0. 0. 0. 1.23302944842 2.63157894737 0. kcolorchooser libisccfg50 0. libetrace0 libgcj10-dev 0. marble libkrb5-dev 1.52816947596 parrot-minimal 0.
    [Show full text]
  • The Gnome Desktop Comes to Hp-Ux
    GNOME on HP-UX Stormy Peters Hewlett-Packard Company 970-898-7277 [email protected] THE GNOME DESKTOP COMES TO HP-UX by Stormy Peters, Jim Leth, and Aaron Weber At the Linux World Expo in San Jose last August, a consortium of companies, including Hewlett-Packard, inaugurated the GNOME Foundation to further the goals of the GNOME project. An organization of open-source software developers, the GNOME project is the major force behind the GNOME desktop: a powerful, open-source desktop environment with an intuitive user interface, a component-based architecture, and an outstanding set of applications for both developers and users. The GNOME Foundation will provide resources to coordinate releases, determine future project directions, and promote GNOME through communication and press releases. At the same conference in San Jose, Hewlett-Packard also announced that GNOME would become the default HP-UX desktop environment. This will enhance the user experience on HP-UX, providing a full feature set and access to new applications, and also will allow commonality of desktops across different vendors' implementations of UNIX and Linux. HP will provide transition tools for migrating users from CDE to GNOME, and support for GNOME will be available from HP. Those users who wish to remain with CDE will continue to be supported. Hewlett-Packard, working with Ximian, Inc. (formerly known as Helix Code), will be providing the GNOME desktop on HP-UX. Ximian is an open-source desktop company that currently employs many of the original and current developers of GNOME, including Miguel de Icaza. They have developed and contributed applications such as Evolution and Red Carpet to GNOME.
    [Show full text]
  • Microsoft, Adobe & W3C to Shake up Electronic Forms Market
    Vol. 11, No, 8 October 2003 www.gilbane.com Published by: Bluebill Advisors, Inc. 763 Massachusetts Ave. Cambridge, MA 02139 USA (617) 497.9443 Fax (617) 497.5256 www.bluebilladvisors.com Editor: Frank Gilbane [email protected] (617) 497.9443 Content Technology Works! Editors Emeriti: Tim Bray [email protected] (604) 708.9592 MICROSOFT, ADOBE & XFORMS TO David Weinberger [email protected] (617) 738.8323 SHAKE UP ELECTRONIC FORMS MARKET Senior Editors: Sebastian Holst [email protected] Our title this month reads like a news headline on purpose. There are a number Bill Trippe [email protected] of new, and upcoming, developments in electronic forms (eForms) technology (617) 497.9443 that should be grabbing your attention. Some of these are of major importance Recent Contributors: on their own, but taken together, they signal the start of a major improvement Kathleen Reidy in businesses’ ability to easily collect, integrate, and process information. [email protected] Bob Doyle [email protected] “Electronic forms” have been around for years, but the term refers to a wide variety of technologies – from scanned image applications to HTML forms – Production Assistant: Sarah G. Dionne that are not at all similar and far from equal in their ability to accelerate and [email protected] smooth business processes. What eForm technology has shared is: a level of (617) 497.9443 difficulty that kept it out of the reach of office professionals who were com- Subscriptions: fortable enough with documents and spreadsheets, but scared-off by forms, [email protected] (617) 497.9443 and proprietary data formats that made information integration costly and complex.
    [Show full text]