- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
gtk--最小化到系统托盘(Gtk-- minimize to system tray)
gtk--最小化到系统托盘(Gtk-- minimize to system tray)
Many programs have system tray icons, which can be completed on the Gtk using the GtkStatusIcon component
Here we simply test a program to minimize the system tray
When we click the minimize button, the program window disappears, and then displays our icons on the panel. When we click on the icon on the panel, the window is displayed
Here, in addition to using the GtkStatusIcon component, there is another area to note: how to capture the minimized signal of the window
This signal is the window_state_event signal
GdkEventWindowState
Typedef struct
{
GdkEventType type;
GdkWindow *window;
Gint8 send_event;
GdkWindowState changed_mask;
GdkWindowState new_window_state;
} GdkEventWindowState;
Generated, when, the, state, of, a, toplevel, window, changes.
GdkEventType type;
The, type, of, the, event (GDK_WINDOW_STATE)
GdkWindow *window;
The, window, which, received, the, event.
Gint8 send_event;
TRUE, if, the, event, was, sent, explicitly (e.g., using, XSendEvent)
GdkWindowState changed_mask;
Mask, specifying, what, flags, have, changed.
GdkWindowState new_window_state;
The, new, window, state, a, combination, of, GdkWindowState, bits.
Enum GdkWindowState
Typedef enum
{
GDK_WINDOW_STATE_WITHDRAWN = 1 0,
GDK_WINDOW_STATE_ICONIFIED = 1 1,
GDK_WINDOW_STATE_MAXIMIZED = 1 2,
GDK_WINDOW_STATE_STICKY = 1 3,
GDK_WINDOW_STATE_FULLSCREEN = 1 4,
GDK_WINDOW_STATE_ABOVE = 1 5,
GDK_WINDOW_STATE_BELOW = 1 6
} GdkWindowState;
Specifies, the, state, of, a, toplevel, window.
GDK_WINDOW_STATE_WITHDRAWN
The, window, is, not, shown.
GDK_WINDOW_STATE_ICONIFIED
The window is minimized.
GDK_WINDOW_STATE_MAXIMIZED
The window is maximized.
GDK_WINDOW_STATE_STICKY
The window is sticky.
GDK_WINDOW_STATE_FULLSCREEN
The, window, is, maximized, without, decorations.
GDK_WINDOW_STATE_ABOVE
The, window, is, kept, above, other, windows.
GDK_WINDOW_STATE_BELOW
The, window, is, kept, below, other, windows.
Heres the code
#include gtk/gtk.h
Void tray_on_click (GtkS
您可能关注的文档
- coreldraw题库(coreldraw题库).doc
- 图表统计在应用问题教学中的尝试(The attempt of chart statistics in the teaching of applied problems).doc
- 图解系列(Graphic series).doc
- 圆的面积---邱子珍(The area of the circle --- Qiu Zizhen).doc
- 土壤污染(soil pollution).doc
- 土建施工员应该知道的数据(The data that the builder should know).doc
- 土建管理(Civil Engineering Management).doc
- 土楼(Tulou).doc
- 土豆的营养价值(The nutritional value of potatoes).doc
- 圣典(Canon).doc
- g代码 m代码(G code, M code).doc
- hdl companion.v2.8编程开发软件(HDL companion.v2.8 programming software).doc
- hillary 2000 senate election victory speech in new york(希拉里2000纽约参议院选举胜利演讲).doc
- hp 1522 故障代码(惠普1522故障代码).doc
- hp5310m(hp5310m).doc
- hpux系统管理常用方法小结(Summary of commonly used methods for HPUX system management).doc
- htaccess文件使用教程3.htaccess文件的密码保护和防止盗链(Password protection and prevent Daolian.Htaccess files using 3.htaccess tutorial files).doc
- html中英对照(HTML Chinese and English comparison).doc
- html元素参考手册(HTML element reference manual).doc
- html代码大全(HTML code Daquan).doc
原创力文档


文档评论(0)