
- 152 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
An Introduction to C & GUI Programming
About this book
The popular C programming language is used for a huge range of applications, from the tiny microcontrollers used in toasters and watches up to complete operating systems. The first half of this book is an introduction to C, and covers the basics of writing simple command-line programs. The second half of the book shows how to use the GTK user interface toolkit with C to create feature-rich GUI applications which can be run on the desktop. No previous experience of C or GTK is required - even if you are an absolute beginner, this book will teach you all you need to know.
In this book, you'll learn how to:
- Create simple command-line C programs.
- Control flow with conditions and loops.
- Handle variables, strings, and files.
- Design graphical user interface applications in C.
- Handle user input with buttons and menus.
- Use advanced UI features such as data stores and dialogs.
Updated for GTK3, this book will teach you all you need to know to write simple programs in C and start creating GUIs. Although the examples in this book were developed on a Raspberry Pi running, Raspberry Pi OS, you can follow along on other operating systems, including Linux, macOS, and Windows with the Windows Subsystem for Linux.
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Information
Table of contents
- Cover
- Copyright
- Welcome to An Introduction to C & GUI Programming
- About the Author
- Dedication
- Contents
- Chapter 1: Getting started: Learn how to use C to program the Raspberry Pi
- Chapter 2: Variables and arithmetic: Create variables and do maths
- Chapter 3: Conditions and comparisons: Control the flow of your C programs
- Chapter 4: More advanced flow control: For loops and case statements
- Chapter 5: Pointers: Variables have addresses too
- Chapter 6: Functions: Split your code into bite-sized chunks
- Chapter 7: Arrays and strings: Handle lists of values, and letters
- Chapter 8: The string library: Simplify common operations on strings
- Chapter 9: User Input: Reading and interpreting user input
- Chapter 10: File input and output: Learn to read from and write to files
- Chapter 11: More about types and variables: Type definitions, enumerations, and more
- Chapter 12: Header files and the preprocessor: Splitting code up into multiple files
- Chapter 13: Introduction to GTK: Get ready to start creating GUI elements
- Chapter 14: Your first GTK program: Start coding in C with the GTK library
- Chapter 15: Buttons: Make your window do something by adding a button
- Chapter 16: Labels and layout: Use a box widget to add a text label to your window
- Chapter 17: More advanced layout: Expand your window, and position and resize buttons automatically
- Chapter 18: User input: Enable users to enter text and data, and to select options
- Chapter 19: Combo boxes and list stores: Create combo boxes for user input and associate list stores with them
- Chapter 20: Tree views: Use the GtkTreeView widget to display information
- Chapter 21: Menus: Create menu bars with drop-down menus
- Chapter 22: Dialogs: Give users information and ask them questions
- Chapter 23: Built-in dialogs: GTK contains some ready-made dialogs
- Chapter 24: Customising widgets: Change the properties of widgets
- Chapter 25: Glade: Create window layouts for applications
- Chapter 26: Quick reference: Cheat sheets and code examples
- Back Cover