⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 developers.txt

📁 gtk是linux一款强大的夸平台的图形化开发工具
💻 TXT
字号:
Things to care about when using/programing for GTK+===================================================This file is meant to collect some frequently triggered failures whenprogramming for/with Gtk, having the spirit of a developers FAQ.It is also the correct place to list up things that programmers shouldcare about in general.In the hope that this text might be usefull to someone,        - Tim Janik <timj@gimp.org>          1998/02/11Automatic destruction of widgets on removal from parent-------------------------------------------------------This is a reference counting issue, you would want to referto refcounting.txt on it.What are all the widget flags about?------------------------------------Refer to the file widget_system.txt which covers widget flags and theresulting invariants in a detailed way.GdkWindow pointers may be NULL in GdkEvents-------------------------------------------The notification nature of the signal mechanism might cause events tobe emitted that have their GdkWindow pointer set to NULL.This is due to the fact that certain events need to be emitted after thereal GdkWindow of a widget is not any longer pertinent.It's up to the signal handling function (application) to check for thewindow field of the event structure to be != NULL, if it is going toperform any operations through Gdk calls on it.Events that a likely to trigger a missing check for the window pointercurrently are (and correspond to the trailing signals):GDK_SELECTION_CLEAR     GtkWidget::selection_clear_eventGDK_FOCUS_CHANGE        GtkWidget::focus_in_event                        GtkWidget::focus_out_eventEvents that are asured to have a valid GdkEvent.any.window field areGDK_EXPOSE		GtkWidget::expose_eventgtk_widget_ref() vs. gtk_object_ref()-------------------------------------The widget referencing functions gtk_widget_ref() and gtk_widget_unref()are currently just wrappers about the corresponding referencing functionsfor objects. Still you should use the widget referencing functions if youare sure the referenced object is of type GTK_WIDGET_TYPE.Writing Gdk functions---------------------When writing Gdk functions that operate on GdkWindow structures in anymaeningfull sense, that is casting to a GdkWindowPrivate structure foraccess to fields other then GdkWindow.user_data, the programmer isrecommended to check for the GdkWindowPrivate.destroyed field to be ==FALSE, especially if the GdkWindowPrivate.xwindow field is used.Silent abortion of the Gdk function is the correct behaviour if thiscondition isn't met.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -