[其他] GNome KDE / GTK GTK+ Qt / GDK / Glib

GTK, GTK+, and Qt are GUI toolkits. These are libraries that developers use to design graphical interfaces, all running on top of the X Server or Wayland. These are things that you need to install as dependencies. They're the Linux "equivalent" to Windows' GDI/GDI+. When an application uses any of these, it will usually have a general "look and feel".

GNOME and KDE are Desktop Environments. GNOME primarily uses the GTK+ toolkit, while KDE primarily uses the Qt toolkit. There are applications designed for GNOME or KDE, such as a settings menu or a default music player, usually in the appropriate toolkit. These Desktop Environments have a set of utilities/window managers/design specification to create a more unified desktop. You can mix the two if you feel like it, but you may run into issues with colliding standards and applications (which is a bit more common on systems like Arch).

Unity uses many of the GNOME utilities and backends (Nautilus, Rhythmbox, gvfs, etc.), so Unity is more GNOME than KDE.

One A GNOME program uses multiple libraries to form a hierarchy:

The Gnome library is at the top level, including help routines, classes, and special widgets, and provides an infrastructure for your application.

The second layer is GTK, which is part of the GTK + library. This library provides a basic toolkit and widget to create GUI applications. Most GUIs are written directly with GTK. GTK also provides a powerful object system for the GNOME library.

The next layer is GDK, which is simply packaged with the X function library, which is only used when we make special drawings or set the special properties of the window.

The bottom layer is glib, a utility library for C, which includes portability and some utility functions, as well as some container classes, such as lists, variable groups, variable-length strings, hashes (seemingly Hassi), caching, an event loop, and other useful constructs

小结:

  • GLib 是基础对象库,不涉及任何图形绘制。
  • GDK 是图形绘制库,如果想定制化widget,则再此层实现。不太需要关心。
  • GTK GTK+ 和 Qt 都是 GUI 库,同级别。设备事件管理和窗口管理都在在这一层。
  • GNome 和 KDE 是对 GUI 库的二次封装。

一般开发触及到 GNome 和 GTK/GTK+ 即可。

相关推荐
ye1501277745512 小时前
DC6v-36V转3.2V1A恒流驱动芯片WT7017
单片机·嵌入式硬件·其他
草莓熊Lotso1 天前
《详解 C++ Date 类的设计与实现:从运算符重载到功能测试》
开发语言·c++·经验分享·笔记·其他
草莓熊Lotso2 天前
《吃透 C++ 类和对象(中):const 成员函数与取地址运算符重载解析》
c语言·开发语言·c++·笔记·其他
老陈头聊SEO4 天前
AI增强SEO关键词表现
其他
草莓熊Lotso4 天前
《吃透 C++ 类和对象(中):拷贝构造函数与赋值运算符重载深度解析》
开发语言·c++·经验分享·笔记·其他
晨非辰5 天前
#C语言——学习攻略:自定义类型路线--结构体--结构体类型,结构体变量的创建和初始化,结构体内存对齐,结构体传参,结构体实现位段
c语言·开发语言·经验分享·学习·其他·学习方法·visual studio
草莓熊Lotso5 天前
《吃透 C++ 类和对象(中):构造函数与析构函数的核心逻辑》
c++·经验分享·笔记·程序人生·其他
草莓熊Lotso6 天前
【C语言强化训练16天】--从基础到进阶的蜕变之旅:Day2
c语言·经验分享·笔记·其他
草莓熊Lotso6 天前
《吃透 C++ 类和对象(上):封装、实例化与 this 指针详解》
开发语言·c++·经验分享·笔记·其他
晨非辰7 天前
#C语言——刷题攻略:牛客编程入门训练(八):分支控制(二)
c语言·开发语言·经验分享·学习·其他·学习方法·visual studio