Skip to content

Commit b842a95

Browse files
authored
Gtk docs package install step (#464)
* Remove gstreamer1-devel-docs from installation instructions. The package is not available in Fedora due to missing dependencies. https://src.fedoraproject.org/rpms/gstreamer1/c/b4c0175387da1c2086b892e7b04119d0c6168275 * C/GTK code block styling fixup.
1 parent b0508db commit b842a95

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tech/languages/c/gtk.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Gtk+ is a cross-platform GUI toolkit created for the development of the GIMP pro
1010

1111
For C programming with Gtk+ you need to install the development version of the important GNOME libraries. Those contain the header files and additional linker information:
1212

13-
```
14-
sudo dnf install gtk3-devel gstreamer1-devel clutter-devel webkit2gtk3-devel libgda-devel gobject-introspection-devel
13+
```console
14+
$ sudo dnf install gtk3-devel gstreamer1-devel clutter-devel webkit2gtk3-devel libgda-devel gobject-introspection-devel
1515
```
1616

17-
In addition, you will want to install the documentation packages of this libraries so you can view them in the API browser (devhelp):
17+
In addition, you will want to install the documentation packages of the libraries so you can view them in the API browser (devhelp):
1818

19-
```
20-
sudo dnf install devhelp gtk3-devel-docs gstreamer1-devel-docs clutter-doc
19+
```console
20+
$ sudo dnf install devhelp gtk3-devel-docs clutter-doc
2121
```
2222

2323
## Getting started
@@ -47,11 +47,11 @@ main(int argc,
4747
4848
You can compile the above program with gcc using:
4949
50-
```
51-
gcc hello.c -o hello `pkg-config --cflags --libs gtk+-3.0`
50+
```console
51+
$ gcc hello.c -o hello `pkg-config --cflags --libs gtk+-3.0`
5252
```
5353

54-
In the program above we initially included gtk/gtk.h, which declares all the gtk+ objects used in the rest of the program:
54+
In the program above we initially included `gtk/gtk.h`, which declares all the gtk+ objects used in the rest of the program:
5555

5656
```c
5757
#include <gtk/gtk.h>
@@ -63,13 +63,13 @@ or
6363
#include <gtk-3.0/gtk/gtk.h>
6464
```
6565

66-
After the declaration of the window object variable, we call the gtk_init method which initializes the library and its internal procedures.
66+
After the declaration of the window object variable, we call the `gtk_init` method which initializes the library and its internal procedures.
6767

6868
```c
6969
gtk_init (&argc, &argv);
7070
```
7171
72-
The next line creates a GtkWindow object with the GTK_WINDOW_TOPLEVEL type. Nearly always, that's the type of the GtkWindow, but it could differ if you are implementing something else.
72+
The next line creates a GtkWindow object with the `GTK_WINDOW_TOPLEVEL` type. Nearly always, that's the type of the GtkWindow, but it could differ if you are implementing something else.
7373
7474
```c
7575
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
@@ -81,7 +81,7 @@ Below that, we set the title of the GtkWindow to a string of our choice:
8181
gtk_window_set_title (GTK_WINDOW (window), "Hello World");
8282
```
8383
84-
After that, the gtk_widget_show() function lets Gtk+ know that we are done setting the attributes of this widget, and that it can display it.
84+
After that, the `gtk_widget_show()` function lets Gtk+ know that we are done setting the attributes of this widget, and that it can display it.
8585
8686
```c
8787
gtk_window_show (window);

0 commit comments

Comments
 (0)