GNOME 3 Application Development Beginner's Guide

Total Page:16

File Type:pdf, Size:1020Kb

GNOME 3 Application Development Beginner's Guide GNOME 3 Application Development Beginner's Guide Step-by-step practical guide to get to grips with GNOME application development Mohammad Anwari BIRMINGHAM - MUMBAI GNOME 3 Application Development Beginner's Guide Copyright © 2013 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: February 2013 Production Reference: 1080213 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-84951-942-7 www.packtpub.com Cover Image by Duraid Fatouhi ([email protected]) Credits Author Project Coordinator Mohammad Anwari Abhishek Kori Reviewers Proofreader Dhi Aurrahman Mario Cecere Joaquim Rocha Indexer Acquisition Editor Tejal Soni Mary Jasmine Graphics Lead Technical Editor Aditi Gajjar Ankita Shashi Production Coordinator Technical Editors Aparna Bhagat Charmaine Pereira Cover Work Dominic Pereira Aparna Bhagat Copy Editors Laxmi Subramanian Aditya Nair Alfida Paiva Ruta Waghmare Insiya Morbiwala About the Author Mohammad Anwari is a software hacker from Indonesia with more than 13 years of experience in software development. He has been working with Linux-based systems, applications in GNOME, and Qt platforms. The projects he has worked on range from the development of constrained devices and desktop applications, to high traffic server systems and applications. He worked for his own startup company during the dotcom era before moving to Finland to work for Nokia/MeeGo. Now he's back in Indonesia, regaining his entrepreneurship by establishing a new startup company that focuses on Node.js and Linux-based projects. In his free time, he serves as an executive director for BlankOn, one of the biggest open source projects in Indonesia. In the past, he has published a couple of books on Linux in the Indonesian language. This book would have been impossible to write without the great and continuous support from my family: Rini, Alif, and Abil. About the Reviewers Dhi Aurrahman is a Project Manager at Labtek Indie, where he leads the development of custom-tailored interactive applications for various installations and platforms. Prior to this, he worked on various projects based on real-time computer vision systems with Samsung Electronics in South Korea. He has proven skills in C++ programming; application development using Qt for various platforms, including desktop and mobile; and JavaScript programming. Dhi has done his B.Sc in Computational Physics from Bandung Institute of Technology, Indonesia, and his M.Eng in Computer Engineering, focused on computer vision and machine learning, from Chonnam National University, South Korea. Joaquim Rocha is a Portuguese software developer with an M.Sc. degree in Computer Science. He has over six years of experience in developing graphical user interfaces and has been involved in a number of Free Software projects. He is also a member of the GNOME Foundation and is the author of the most complete OCR application, OCRFeeder, which was developed for the GNOME desktop. As part of his work for the Free Software consultancy Igalia, Joaquim has created the world's first Free Software skeleton-tracking library, completely written with GNOME technologies. www.PacktPub.com Support files, eBooks, discount offers and more You might want to visit www.PacktPub.com for support files and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version atwww.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why Subscribe? Fully searchable across every book published by Packt Copy and paste, print and bookmark content On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. Table of Contents Preface 1 Chapter 1: Installing GNOME 3 and SDK 7 System requirements 8 The GNOME Shell 8 GNOME Panel/Fallback 8 Development requirements 9 GNOME 3 desktop architecture 9 GNOME and the SDK 12 Time for action – installing GNOME and SDK in Fedora 17 12 Marking packages to be installed 14 Ready to install the packages 15 Time for action – installing GNOME and SDK in openSUSE 12 15 Marking SDK packages 17 Starting the installation 18 Time for action – installing GNOME and SDK in Debian Testing 18 Marking SDK packages 19 Applying the installation 20 Time for action – installing GNOME and SDK in Ubuntu 12.04 20 Continue installing the SDK 21 Summary 21 Chapter 2: Preparing Our Weapons 23 Firing up Anjuta 24 Time for action – creating a new Vala project 24 The IDE layout 25 Bookmarks 26 Files 26 Project 26 Symbols 26 Watches 26 Table of Contents Breakpoints 26 Messages 26 Terminal 27 Navigation between tabs 27 Time for action – navigating between tabs 27 Comment block 28 Time for action – commenting/uncommenting a block 28 Time for action – running the program for the first time 29 Make an error and see how it works 32 Editing UI 33 Time for action – editing UI 33 Palette 34 Widgets 34 Time for action – adding a label and a button 35 Time for action – changing widget properties 36 A responsive button 37 Time for action – making the button responsive 37 Tracking symbols 40 Time for action – finding a symbol 40 Getting help 41 Summary 41 Chapter 3: Programming Languages 43 Programming GNOME with JavaScript 44 Time for action – saying hello to Seed 44 Time for action – running our program with Seed 45 Loosely typed language 47 Time for action – playing with data types 47 Controlling iteration 49 Time for action – controlling Iteration 49 Time for action – manipulating an array 51 Object-oriented programming (OOP) with JavaScript 52 Time for action – using the JavaScript object 52 With great power comes great responsibility 54 Constructing objects 54 Time for action – playing with constructors 55 Class and object 56 Using prototypes 56 Time for action – adding prototypes 57 Time for action – modifying the prototype of an object 59 Modularization 61 Time for action – modularizing our program 61 [ ii ] Table of Contents Getting to know Vala 63 Time for action – entry point to our program 64 Member access specifier 65 Time for action – defining member access 65 The access specifiers 68 Basic data types 68 Time for action – experiment with data types 68 Gee, what is it? 71 Time for action – adding the Gee library 71 Time for action – Gee in action 72 Initializing members when declaring 75 Time for action – watching for signals 75 Summary 78 Chapter 4: Using GNOME Core Libraries 79 Before we start 80 The GLib main loop 80 Time for action – playing with the GLib main loop 80 GObject signals 84 Time for action – handling GObject signals 84 GLib properties 86 Time for action – accessing properties 86 Configuration files 91 Time for action – reading configuration files 91 GIO, the input/output library 94 Time for action – accessing files 94 Network access with GIO 97 Time for action – accessing a network 98 Understanding GSettings 102 Time for action – learning GSettings 102 GSettings API 103 Time for action – accessing GSettings programmatically 104 Summary 106 Chapter 5: Building Graphical User Interface Applications 107 Before we start 107 Creating a basic GTK+ application 108 Time for action – implementing the mockup 109 Time for action – adding icons to the buttons 115 Porting the code without GtkBuilder 117 Time for action – programming with raw GTK+ 117 GUI programming with Clutter 121 [ iii ] Table of Contents Time for action – implementing the mockup with Clutter 121 Summary 129 Chapter 6: Creating Widgets 131 Before we take off 132 Overriding the widget's standard functions 132 Time for action – overriding the set_title function 132 Adding new functionalities 136 Time for action – making a composite widget 136 Maintaining compatibility 144 Implementing a GTK+ custom widget 144 Time for action – implementing the custom widget 145 Maintaining widgets in a library 151 Time for action – creating a library 152 Summary 157 Chapter 7: Having Fun with Multimedia 159 Packages required 159 Understanding the basic
Recommended publications
  • Desktop Migration and Administration Guide
    Red Hat Enterprise Linux 7 Desktop Migration and Administration Guide GNOME 3 desktop migration planning, deployment, configuration, and administration in RHEL 7 Last Updated: 2021-05-05 Red Hat Enterprise Linux 7 Desktop Migration and Administration Guide GNOME 3 desktop migration planning, deployment, configuration, and administration in RHEL 7 Marie Doleželová Red Hat Customer Content Services [email protected] Petr Kovář Red Hat Customer Content Services [email protected] Jana Heves Red Hat Customer Content Services Legal Notice Copyright © 2018 Red Hat, Inc. This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. Linux ® is the registered trademark of Linus Torvalds in the United States and other countries. Java ® is a registered trademark of Oracle and/or its affiliates. XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
    [Show full text]
  • Free Email Software Download Best Free Email Client 2021
    free email software download Best Free Email Client 2021. This article is all about best free email clients and how they can help you be more productive. We also talk about Clean Email, an easy-to-use email cleaner compatible with virtually all major email services. But before we go over the best email clients for 2021, we believe that we should first explain what advantages email clients have over web-based interfaces of various email services. Clean Email. Take control of your mailbox. What Is an Email Client and Why Should I Use One? If you’re like most people, you probably check your email at least once every day. And if you’re someone whose work involves communication with customers, clients, and coworkers, the chances are that you deal with emails all the time. Even though we spend so much time writing, forwarding, and managing emails, we hardly ever pause for a moment and think about how we could improve our emailing experience. We use clunky web interfaces that are not meant for professional use, we accept outdated applications as if alternatives didn’t exist, and we settle for the default email apps on our mobile devices even though app stores are full of excellent third-party email apps. Broadly speaking, an email client is a computer program used to access and manage a user’s email. But when we use the term email client in this article, we only mean those email clients that can be installed on a desktop computer or a mobile device—not web-based email clients that are hosted remotely and are accessible only from a web browser.
    [Show full text]
  • Annual Report in This Report
    GNOME FOUNDATION 2018–2019 ANNUAL REPORT IN THIS REPORT 3 Letter from the GNOME Foundation 4 About GNOME 5 Releases 6 Accessibility 6 GNOME Moves to Discourse 7 GitLab Statistics and Activity 8 Hackfests CREDITS 9 Conferences Thank you to everyone involved in the making of this report! We appreciate the authors, editors, and organizers that helped highlight 10 Finances at a Glance all the great work GNOME accomplished in the 2018‑2019 fiscal year. Gaurav Agrawal, Matthias Clasen, Emmanuele Bassi, Molly de Blanc, 12 Outreach Sebastian Dröge, Caroline Henriksen, Juanjo Marin, Neil McGovern, Bartłomiej Piotrowski, Kristi Progri, Oliver Propst, Andrea Veri, 13 Friends of GNOME Britt Yazel, and Rosanna Yuen. 2 2019 was an exciting year for us! We increased the Foundation‘s staff with three new employees—a GTK+ core developer, a Program LETTER FROM Coordinator, and a Strategic Initiatives Manager—expanded our efforts with new projects, and continued making great soware. We had three wildly successful conferences, several hackfests, and a number of newcomer events geared towards helping new contributors get THE GNOME involved in GNOME. We sponsored three amazing Outreachy interns and mentored nine students through Google Summer of Code. There were numerous technical successes: updates to GTK, two new releases of the desktop environment, and numerous infrastructure improvements, including both hardware and soware upgrades. We introduced an Inclusion and Diversity team in order to make the FOUNDATION GNOME community a more welcoming place. We announced the GNOME Community Engagement Challenge. We had speakers and booths at conferences in Asia, Europe, North America, and South America.
    [Show full text]
  • Nix on SHARCNET
    Nix on SHARCNET Tyson Whitehead May 14, 2015 Nix Overview An enterprise approach to package management I a package is a specific piece of code compiled in a specific way I each package is entirely self contained and does not change I each users select what packages they want and gets a custom enviornment https://nixos.org/nix Ships with several thousand packages already created https://nixos.org/nixos/packages.html SHARCNET What this adds to SHARCNET I each user can have their own custom environments I environments should work everywhere (closed with no external dependencies) I several thousand new and newer packages Current issues (first is permanent, second will likely be resolved) I newer glibc requires kernel 2.6.32 so no requin I package can be used but not installed/removed on viz/vdi https: //sourceware.org/ml/libc-alpha/2014-01/msg00511.html Enabling Nix Nix is installed under /home/nixbld on SHARCNET. Enable for a single sessiong by running source /home/nixbld/profile.d/nix-profile.sh To always enable add this to the end of ~/.bash_profile echo source /home/nixbld/profile.d/nix-profile.sh \ >> ~/.bash_profile Reseting Nix A basic reset is done by removing all .nix* files from your home directory rm -fr ~/.nix* A complete reset done by remove your Nix per-user directories rm -fr /home/nixbld/var/nix/profile/per-user/$USER rm -fr /home/nixbld/var/nix/gcroots/per-user/$USER The nix-profile.sh script will re-create these with the defaults next time it runs. Environment The nix-env commands maintains your environments I query packages (available and installed) I create a new environment from current one by adding packages I create a new environment from current one by removing packages I switching between existing environments I delete unused environements Querying Packages The nix-env {--query | -q} ..
    [Show full text]
  • An User & Developer Perspective on Immutable Oses
    An User & Developer Perspective on Dario Faggioli Virtualization SW. Eng. @ SUSE Immutable OSes [email protected] dariof @DarioFaggioli https://dariofaggioli.wordpress.com/ https://about.me/dario.faggioli About Me What I do ● Virtualization Specialist Sw. Eng. @ SUSE since 2018, working on Xen, KVM, QEMU, mostly about performance related stuff ● Daily activities ⇒ how and what for I use my workstation ○ Read and send emails (Evolution, git-send-email, stg mail, ...) ○ Write, build & test code (Xen, KVM, Libvirt, QEMU) ○ Work with the Open Build Service (OBS) ○ Browse Web ○ Test OSes in VMs ○ Meetings / Video calls / Online conferences ○ Chat, work and personal ○ Some 3D Printing ○ Occasionally play games ○ Occasional video-editing ○ Maybe scan / print some document 2 ● Can all of the above be done with an immutable OS ? Immutable OS: What ? Either: ● An OS that you cannot modify Or, at least: ● An OS that you will have an hard time modifying What do you mean “modify” ? ● E.g., installing packages ● ⇒ An OS on which you cannot install packages ● ⇒ An OS on which you will have an hard time installing packages 3 Immutable OS: What ? Seriously? 4 Immutable OS: Why ? Because it will stay clean and hard to break ● Does this sound familiar? ○ Let’s install foo, and it’s dependency, libfoobar_1 ○ Let’s install bar (depends from libfoobar_1, we have it already) ○ Actually, let’s add an external repo. It has libfoobar_2 that makes foo work better! ○ Oh no... libfoobar_2 would break bar!! ● Yeah. It happens. Even in the best families distros
    [Show full text]
  • The Linux Command Line
    The Linux Command Line Fifth Internet Edition William Shotts A LinuxCommand.org Book Copyright ©2008-2019, William E. Shotts, Jr. This work is licensed under the Creative Commons Attribution-Noncommercial-No De- rivative Works 3.0 United States License. To view a copy of this license, visit the link above or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042. A version of this book is also available in printed form, published by No Starch Press. Copies may be purchased wherever fine books are sold. No Starch Press also offers elec- tronic formats for popular e-readers. They can be reached at: https://www.nostarch.com. Linux® is the registered trademark of Linus Torvalds. All other trademarks belong to their respective owners. This book is part of the LinuxCommand.org project, a site for Linux education and advo- cacy devoted to helping users of legacy operating systems migrate into the future. You may contact the LinuxCommand.org project at http://linuxcommand.org. Release History Version Date Description 19.01A January 28, 2019 Fifth Internet Edition (Corrected TOC) 19.01 January 17, 2019 Fifth Internet Edition. 17.10 October 19, 2017 Fourth Internet Edition. 16.07 July 28, 2016 Third Internet Edition. 13.07 July 6, 2013 Second Internet Edition. 09.12 December 14, 2009 First Internet Edition. Table of Contents Introduction....................................................................................................xvi Why Use the Command Line?......................................................................................xvi
    [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]
  • SEED™ Assessment Guide for Family Planning Programming
    SEED™ Assessment Guide for Family Planning Programming SEED™ Assessment Guide for Family Planning Programming © 2011 EngenderHealth EngenderHealth 440 Ninth Avenue New York, NY 10001 U.S.A. Telephone: 212-561-8000 Fax: 212-561-8067 e-mail: [email protected] www.engenderhealth.org This publication was made possible through support provided by the F.M. Kirby Foundation. The opinions expressed herein are those of the publisher and do not necessarily reflect the views of the foundation. Cover design, graphic design, and typesetting: Weronika Murray and Tor de Vries Printing: Automated Graphic Systems ISBN 978-1-885063-97-7 Printed in the United States of America. Printed on recycled paper. Suggested citation: EngenderHealth. 2011. The SEED assessment guide for family planning programming. New York. Photo credits: M. Tuschman/EngenderHealth, A. Fiorente/EngenderHealth, C. Svingen/EngenderHealth. ii ContEntS Acknowledgments .................................................................................................................................. iv Acronyms and Abbreviations ................................................................................................................... v Introduction ................................................................................................................................. 2 EngenderHealth’s SEED Programming Model .......................................................................................... 3 How to Use This Assessment Guide........................................................................................................
    [Show full text]
  • SUSE® Linux Enterprise Desktop 12 and the Workstation Extension: What's New ?
    SUSE® Linux Enterprise Desktop 12 and the Workstation Extension: What's New ? Frédéric Crozat <[email protected]> Enterprise Desktop Release Manager Scott Reeves <[email protected]> Enterprise Desktop Development Manager Agenda • Design Criteria • Desktop Environment in SUSE Linux Enterprise 12 • GNOME Shell • Desktop Features and Applications 2 Design Criteria SUSE Linux Enterprise Desktop Interoperability Ease of Use Security Ease of Management Lower Costs 4 SUSE Linux Enterprise Desktop 12 • Focus on technical workstation ‒ Developers and System administrators • One tool for the job • Main desktop applications will be shipped: ‒ Mail client, Office Suite, Graphical Editors, ... • SUSE Linux Enterprise Workstation Extension ‒ Extend SUSE Linux Enterprise Server with packages only available on SUSE Linux Enterprise Desktop. (x86-64 only) 5 Desktop in SUSE Linux Enterprise 12 As Part of the Common Code Base SUSE Linux Enterprise 12 Desktop Environment • SUSE Linux Enterprise 12 contains one primary desktop environment • Additional light-weight environment for special use-cases: ‒ Integrated Systems • Desktop environment is shared between the server and desktop products 7 SUSE Linux Enterprise 12 Desktop Environment • GNOME 3 is the main desktop environment ‒ SLE Classic mode by default ‒ GNOME 3 Classic Mode and GNOME 3 Shell Mode also available • SUSE Linux Enterprise 12 ships also lightweight IceWM ‒ Targeted at Integrated Systems • QT fully supported: ‒ QT5 supported for entire SLE12 lifecycle ‒ QT4 supported, will be removed in future
    [Show full text]
  • Guile-GNOME: Atk Version 2.16.2, Updated 9 December 2011
    Guile-GNOME: Atk version 2.16.2, updated 9 December 2011 Bill Haneman Marc Mulcahy Padraig O'Briain This manual is for (gnome atk) (version 2.16.2, updated 9 December 2011) Copyright 2001-2007 Bill Haneman, Marc Mulcahy, Padraig O'Briain Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. i Short Contents 1 Overview :::::::::::::::::::::::::::::::::::::::::::: 1 2 AtkAction ::::::::::::::::::::::::::::::::::::::::::: 2 3 AtkComponent ::::::::::::::::::::::::::::::::::::::: 4 4 AtkDocument :::::::::::::::::::::::::::::::::::::::: 8 5 AtkEditableText ::::::::::::::::::::::::::::::::::::: 10 6 AtkGObjectAccessible :::::::::::::::::::::::::::::::: 12 7 AtkHyperlinkImpl :::::::::::::::::::::::::::::::::::: 13 8 AtkHyperlink ::::::::::::::::::::::::::::::::::::::: 14 9 AtkHypertext ::::::::::::::::::::::::::::::::::::::: 17 10 AtkImage::::::::::::::::::::::::::::::::::::::::::: 18 11 AtkNoOpObjectFactory ::::::::::::::::::::::::::::::: 20 12 AtkNoOpObject ::::::::::::::::::::::::::::::::::::: 21 13 AtkObjectFactory :::::::::::::::::::::::::::::::::::: 22 14 AtkObject :::::::::::::::::::::::::::::::::::::::::: 23 15 AtkRegistry ::::::::::::::::::::::::::::::::::::::::: 29 16 AtkRelationSet :::::::::::::::::::::::::::::::::::::: 31 17 AtkRelation::::::::::::::::::::::::::::::::::::::::: 33 18 AtkSelection :::::::::::::::::::::::::::::::::::::::: 35 19 AtkStateSet :::::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • Seed Modules Reference Manual
    Seed Modules Reference Manual May 20, 2009 Seed Modules Reference Manual ii Contents 1 readline module. 1 1.1 API Reference . .1 1.2 Examples . .1 2 SQLite module. 3 2.1 API Reference . .3 2.2 Examples . .3 3 GtkBuilder module. 5 3.1 API Reference . .5 3.2 Examples . .5 4 Sandbox module. 7 4.1 API Reference . .7 4.2 Examples . .7 iii Chapter 1 readline module. Robert Carr 1.1 API Reference The readline module allows for basic usage of the GNU readline library, in Seed. More advanced fea- tures may be added a a later time. In order to use the readline module it must be first imported. readline= imports.readline; readline.readline (prompt) Prompts for one line of input on standard input using prompt as the prompt. prompt A string to use as the readline prompt Returns A string entered on standard input. readline.bind (key, function) Binds key to function causing the function to be invokved when- ever key is pressed key A string specifying the key to bind function The function to invoke when key is pressed readline.done () Indicates that readline should finish the current line, and return from readline- .readline. Can be used in callbacks to implement features like multiline editing readline.buffer() Retrieve the current readline buffer Returns The current readline buffer readline.insert (string) Inserts string in to the current readline buffer string The string to insert 1.2 Examples Below are several examples of using the Seed readline module. For additional resources, consult the examples/ folder of the Seed source 1 CHAPTER 1.
    [Show full text]
  • Final Study Report on CEF Automated Translation Value Proposition in the Context of the European LT Market/Ecosystem
    Final study report on CEF Automated Translation value proposition in the context of the European LT market/ecosystem FINAL REPORT A study prepared for the European Commission DG Communications Networks, Content & Technology by: Digital Single Market CEF AT value proposition in the context of the European LT market/ecosystem Final Study Report This study was carried out for the European Commission by Luc MEERTENS 2 Khalid CHOUKRI Stefania AGUZZI Andrejs VASILJEVS Internal identification Contract number: 2017/S 108-216374 SMART number: 2016/0103 DISCLAIMER By the European Commission, Directorate-General of Communications Networks, Content & Technology. The information and views set out in this publication are those of the author(s) and do not necessarily reflect the official opinion of the Commission. The Commission does not guarantee the accuracy of the data included in this study. Neither the Commission nor any person acting on the Commission’s behalf may be held responsible for the use which may be made of the information contained therein. ISBN 978-92-76-00783-8 doi: 10.2759/142151 © European Union, 2019. All rights reserved. Certain parts are licensed under conditions to the EU. Reproduction is authorised provided the source is acknowledged. 2 CEF AT value proposition in the context of the European LT market/ecosystem Final Study Report CONTENTS Table of figures ................................................................................................................................................ 7 List of tables ..................................................................................................................................................
    [Show full text]