GithubHelp home page GithubHelp logo

caoyfcode / gtk4-tutorial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from toshiocp/gtk4-tutorial

0.0 0.0 0.0 5.14 MB

A gtk4 tutorial for beginners

Ruby 23.55% C 63.23% Meson 1.98% Makefile 0.26% Lex 1.26% Yacc 9.72%

gtk4-tutorial's Introduction

Gtk4 Tutorial for beginners

Contents of this repository

This tutorial illustrates how to write C programs with Gtk4 library. It focuses on beginners so the contents are limited to basic things. The table of contents are shown at the end of this abstract.

  • Section 3 to 21 describes basics and the example is a simple editor tfe (Text File Editor).
  • Section 22 to 24 describes GtkDrawingArea.
  • Section 25 to 28 describes list model and list view (GtkListView, GtkGridView and GtkColumnView). It also describes GtkExpression.

The latest version of the tutorial is located at Gtk4-tutorial github repository. You can read it without download.

Gtk4 Documentation

Please refer to Gtk API Reference and Gnome Developer Documentation Website for further topics.

These websites are newly opend lately (Aug/2021). The old documentation is located at Gtk Reference Manual and Gnome Developer Center. The new website is in progress at present, so you might need to refer to the old version.

If you want to know about GObject and type system, refer to GObject tutorial. They are basic and also necessary to write Gtk4 programs.

Contribution

This tutorial is under development and unstable. Even though the codes of the examples have been tested on Gtk4 version 4.0, there might exist bugs. If you find any bugs, errors or mistakes in the tutorial and C examples, please let me know. You can post it to github issues. You can also post corrected files as a commit to pull request. When you make corrections, correct the source files, which are under the 'src' directory. And run rake, then GFM files under the 'gfm' directory are automatically updated.

If you have a question, feel free to post it to the issue. Any question is helpful to make this tutorial get better.

How to get a HTML or PDF version

If you want to get a HTML or PDF version, you can make them with rake, which is a ruby version of make. Type rake html for HTML. Type rake pdf for PDF. There is a documentation ("How to build Gtk4 Tutorial") that describes how to make them.

Table of contents

  1. Prerequisite and License
  2. Installation of Gtk4 to Linux distributions
  3. GtkApplication and GtkApplicationWindow
  4. Widgets (1)
  5. Widgets (2)
  6. String and memory management
  7. Widgets (3)
  8. Define Child object
  9. Ui file and GtkBuilder
  10. Build system
  11. Initialization and destruction of instances
  12. Signals
  13. Functions in TfeTextView
  14. Functions in GtkNotebook
  15. tfeapplication.c
  16. tfe5 source files
  17. Menu and action
  18. Stateful action
  19. Ui file for menu and action entries
  20. GtkMenuButton, accelerators, font, pango and gsettings
  21. Template XML and composite widget
  22. GtkDrawingArea and Cairo
  23. Combine GtkDrawingArea and TfeTextView
  24. Tiny turtle graphics interpreter
  25. GtkListView
  26. GtkGridView and activate signal
  27. GtkExpression
  28. GtkColumnView

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.