27.9.2016 User Interface Programming X Window Jozef Mlích Department of Computer Graphics and Multimedia Faculty of Information Technology, Brno University.

Slides:



Advertisements
Similar presentations
X Ricardo A. Baratto NCL. Overview System overview X protocol X server Architecture Porting process XFree86 (device drivers)
Advertisements

Guide to Linux Installation and Administration, 2e1 Chapter 5 Using Linux Graphical Environments.
X11 future Desktop Environments CERN IT/DIS/OSE : Paola Ciccarelli (Caspur) Lionel Cons Victor Robles Forcada German Cancio Melia PRESENTED BY : Philippe.
1. Reasons for logging on as a root •Most people are familiar with Windows systems with regard to administrative privileges. Many user running windows.
For the Raspberry Pi Tommy (Cho Long) Chor.  X. Org Foundation was created in 2004  Open source implementation of the X Window System  Developed in.
COM vs. CORBA.
Linux GUI X-Windows System. X-Windows System A stable and extremely powerful GUI system that provides a complete Client/Server framework. The X-org foundation.
1 Lecture 5: Window Manager Input Models Brad Myers Advanced User Interface Software.
Chapter 2: Exploring the Desktop The Complete Guide to Linux System Administration.
Operating Systems.
An Overview of Qt - asankar1. Agenda About Qt –A brief intro of Qt Qt development tools –Tools used for building Qt application Qt Architecture –The underlying.
The University of Akron Summit College Business Technology Department Computer Information Systems 2440: 145 Operating Systems Introduction to UNIX/Linux.
Telnet/SSH: Connecting to Hosts Internet Technology1.
Computer for Health Sciences
Lecture 7: Objects and Interaction 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271 
Section 2.1 Identify hardware Describe processing components Compare and contrast input and output devices Compare and contrast storage devices Section.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Linux GUI Chapter 5. Graphical User Interface GUI vs. CLI Easier and more intuitive More popular and advanced Needed for graphics, web browsing Linux.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Getting to Know TiVo: The Home Media Engine (HME SDK) Eric M. Upchurch CS 525 Spring 2008.
COM vs. CORBA Computer Science at Azusa Pacific University September 19, 2015 Azusa Pacific University, Azusa, CA 91702, Tel: (800) Department.
1 Lecture 5: Conventional Input Models for Window Managers and Toolkits Brad Myers Advanced User Interface Software © Brad Myers.
SUSE Linux Enterprise Desktop Administration Chapter 2 Use the Linux Desktop.
Gary MarsdenSlide 1University of Cape Town Human-Computer Interaction - 3 Programmer Support Gary Marsden ( ) July 2002.
CHAPTER TEN AUTHORING.
Interactive Textures as Spatial User Interfaces in X3D Web3D 2010 Symposium Sabine Webel Y. Jung, M. Olbrich, T. Drevensek, T. Franke, M.Roth, D.Fellner,
Copyright © by Shayne R Flint Simplified Web Application Development Shayne R Flint Department of Computer Science Australian National University.
X-WindowsP.K.K.Thambi The X Window System Module 5.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Module 2 Part I Introduction To Windows Operating Systems Intro & History Introduction To Windows Operating Systems Intro & History.
Introduction to Interactive Media Interactive Media Tools: Authoring Applications.
Chapter Eleven The X Window System. 2 Lesson A Starting and Navigating an X Window System.
1 Software. 2 What is software ► Software is the term that we use for all the programs and data on a computer system. ► Two types of software ► Program.
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
CIS Lesson 7 X. Understanding X Overview One of the original open source projects Developed at MIT Criticisms of X Handles fonts poorly Security.
S.Linev: Go4 - J.Adamczewski, H.G.Essel, S.Linev ROOT 2005 New development in Go4.
Linux & UNIX OS Overview Fort Collins, CO Copyright © XTR Systems, LLC Overview of the Linux & UNIX Operating Systems Instructor: Joseph DiVerdi, Ph.D.,
X Window System introduction to Beryl Omid Mottaghi Welcome.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
X Window System
Identify internal hardware devices (e. g
Session / Window Managers
Section 2.1 Section 2.2 Identify hardware
X Programming with Xlib
Operating System.
Java Look-and-Feel Design Guidelines
Distributed object monitoring for ROOT analyses with Go4 v.3
Event Driven Programming Dick Steflik
Guide To UNIX Using Linux Third Edition
The Client/Server Database Environment
Configuring the X Windows Server
Lecture 6: Window Manager Input Models
#01 Client/Server Computing
Computer Technology Notes #3
Chapter 3: Windows7 Part 4.
Ch > 28.4.
Telnet/SSH Connecting to Hosts Internet Technology.
Qt Programming.
X Windows.
GRAPHICAL USER INTERFACE
Software models - Software Architecture Design Patterns
PalmOS.
The Basic Usage and The Event Handling in Glade.
Fundamentals of Using Microsoft Windows XP
Chapter 14 The User View of Operating Systems
Chapter 2: Operating-System Structures
Materials prepared by Dhimas Ruswanto, BMm
February 16th, 2004 Class Meeting 5
New Tools In Education Minjun Wang
#01 Client/Server Computing
Presentation transcript:

User Interface Programming X Window Jozef Mlích Department of Computer Graphics and Multimedia Faculty of Information Technology, Brno University of Technology Božetěchova 2, Brno, Czech Republic

ITU: X Window | 2 / Agenda History How things works – XServer – XProtocol – Extensions – Useful tools Programing of XApplications – Xlib – toolkits (xtoolkit, motif, gtk, qt, wxWindows) – Makefile/imake/qmake/autotools/cmake – printf(“Hello XWindow\n”);

ITU: X Window | 3 / History June X1 First use of the name "X" February X10R3 First release outside MIT. September 15, 1987 – X11 First release of the current protocol. March 31, X11R6.4 Xinerama April 6, X11R6.7.0 First X.Org Foundation release October 2, 2009 – x.org 1.7 Multi-pointer X (MPX)

ITU: X Window | 4 / How things works - XServer What is XServer? extension of the operating system providing a graphical user interface (for Linux / QNX / windows / etc.) Features: client-server architecture network transparent hardware independent the system is not only centralized or only distributed extendable

ITU: X Window | 5 / How things works - XServer 2 Graphical user interface in this case consists of X Server window manager – window position and layout (KDE, gnome, blackbox,..) session manager – manages the environment related to one session (xsm, ksmserver) – X Session Management Protocol (XSMP) toolkits (Qt, Gtk, Xtoolkit, Motif) applications

ITU: X Window | 6 / How things works - XServer 3 Windows are in tree hierarchy Main window is window manager (kde/gnome/xfce/etc.) Position of window elements is relative to parent window Each window is processed in the X server separately

ITU: X Window | 7 / How things works - XServer 4 single session (single user) KDE window manager – takes care about title bar, borders of window – contains special applications (desktop icons/panel with task list..) Applications – programmed in different toolkits (konsole is based on KDE/Qt, Epiphany is based on Gtk)

ITU: X Window | 8 / How things works - XServer 5

ITU: X Window | 9 / How things works - XServer 6 X Server – X Klient vs. Server – Klient X server is running on graphical workstation – takes care about rendering, keyboard and mouse events X Clients is on backend of program (computationally intensive simulation / database connection / etc. )

ITU: X Window | 10 / How things works - X Window Core Protocol standardized (ICCCM, EWMH, XDS, Freedesktop) could use TCP/IP, pipes or shared memory used by all applications (including window manager and session manager) different XServers are compatible with different XClients open source / binary compatible

ITU: X Window | 11 / How things works - X Window Core Protocol 2 requests – The client requests information from the server or requests it to perform an action. replies – The server responds to a request. Not all requests generate replies. events – The server sends an event to the client, e.g., keyboard or mouse input, or a window being moved /resized/exposed. errors – The server sends an error packet if a request is invalid.

ITU: X Window | 12 / How things works - X Window Core Protocol 3 Windows – defined by size and position – tree hierarchy – InputOutput vs. InputOnly (invisible, event handling) Pixmaps – few memory chunks / rendered on request – it is possible to display it into the window (double buffering) Graphical Context (GC) and fonts – similar like in windows – structure for window rendering (including foreground and background color, font, destination pixmap or window, etc.) – accesible only by Xfunctions

ITU: X Window | 13 / How things works - X Window Core Protocol 4 Resources and identifiers – Identifier is just “pointer” (32-bit integer) on resource – Resource: Window, Pixmap, Font, Colormap, Graphic context Events – KeyPressed, etc. – Expose (XClient want to repaint part of window) Atoms – 32-bit integer

ITU: X Window | 14 / How things works - Extension XServer is designed to be robust. DPMS – power management MIT-SHM – shared memory SHAPE – non-rectangular windows RANDR – dynamical change of resolution, screen rotation RENDER – antialiasing, alpha blending, atd. XKEYBOARD – enhanced keyboard layout handling. XINEREMA – desktop on more monitors XVideo (XV) – hardware acceleration of video

ITU: X Window | 15 / How things works - useful tools Remote connection – ssh -X – xming ( xwinlogon xnest – more xservers on same computer xdpyinfo – list of supported extensions xwininfo – detailed information about window glxinfo – detailed information about OpenGL extension of X Window System

ITU: X Window | 16 / How things works - useful tools 2 xrandr – Section "Screen" Option "RandRRotation" "true" xev – X events of window zenity/kdialog/xdialog – very nice in combination with bash/shell scripts – zenity --file-selection – kdialog --yesno "Is this boring?" xnee – tool for users actions recording and replaying xrestop – resources allocated by xserver

ITU: X Window | 17 / How things works - useful tools 3 xwit – command line tool for setting of window parameters xautomation – set of command line tools (xte)

ITU: X Window | 18 / Programing of XApplications - Xlib Xlib provides C API for X Protocol Some basic functions – XOpenDisplay(char *display_name), XCloseDisplay, XSetCloseDownMode – char *display_name=“hostname:number.screen_number” – XLockDisplay, XUnlockDisplay – XAddConnectionWatch, XRemoveConnectionWatch – XCreateWindow, XcreateSimpleWindow, XDestroyWindow, XDestroySubwindows – _X11TransConnectDisplay, _X11TransGetConnectionNumber, _XSendClientPrefix, _X11TransGetConnectionNumber

ITU: X Window | 19 / Programing of XApplications - Xlib 2 Graphical Operations – XDrawPoint, XDrawLine, XDrawRectangle, XDrawSegments, XDrawArc, XDrawString, XDrawImageString, XDrawText, XCopyArea, XCopyPlane, XPutImage, XDefineCursor User interaction – KeyPress, KeyRelease, MappingNotify, FocusIn, FocusOut – ButtonPress, ButtonRelease, MotionNotify, EnterNotify, LeaveNotify

ITU: X Window | 20 / Programing of XApplications - Xlib 3 Notification about application state – Expose, GraphicsExpose, NoExpose, ColormapNotify, VisibilityNotify – CirculateNotify, ConfigureNotify, CreateNotify, DestroyNotify, GravityNotify, MapNotify, ReparentNotify, UnmapNotify Messages from different application – ClientMessage, PropertyNotify, SelectionClear, SelectionRequest, SelectionNotify

ITU: X Window | 21 / Programing of XApplications - Xlib 4 – Xlib vs. WinAPI

ITU: X Window | 22 / Programing of XApplications - Xlib 5 Conclusions: Xlib is to low level for normal GUI applications but it is very nice for low level things – user interface analysis, reader for blind people – own gui toolkit – XServer hacking (acceleration, new features) Future: XCB (X C Binding) – less complex, closer to X protocol

ITU: X Window | 23 / Programing of XApplications - Xtoolkit, motif extension of Xlib by some basic elements (buttons, scrollbars, etc.) still very low level and programer unfriendly

ITU: X Window | 24 / Programing of XApplications - Gtk, Gtkmm very popular because of licence GUI description is in Glade Gtkmm is object oriented extension of Gtk

ITU: X Window | 25 / Programing of XApplications - Qt qtassistant – documentation qdesigner – gui designer (paint the gui, save as xml, compile to header file) qmake – qenerator of makefile for Qt cmake – generator of makefile for KDE moc – meta object compiler (there is a macro language designed for internal communication based on “slots” and “signals”)

ITU: X Window | 26 / Credits Materials are based on GUX and ITU Lectures writen by ing. Lampa materialy/os/oslinux/2.0.31/sak4/xx.htm on2008Brno