sh\nsudo apt-get install libgtk-3-dev\n<\/pre>\n<\/p>\n\u5728 Fedora \u7b49 Red Hat \u7cfb\u7edf\u4e2d\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528 dnf \u547d\u4ee4\uff1a<\/p>\n
\n
sh\nsudo dnf install gtk3-devel\n<\/pre>\n<\/p>\n\u56db\u3001GTK \u7684\u57fa\u672c\u7ec4\u4ef6<\/p>\n
GTK \u63d0\u4f9b\u4e86\u8bb8\u591a\u57fa\u672c\u7ec4\u4ef6linux gtk \u56fe\u5f62\u5316\u7f16\u7a0b<\/strong>\uff0c\u5982 Label\u3001Button\u3001Entry \u7b49\u3002\u8fd9\u4e9b\u7ec4\u4ef6\u53ef\u4ee5\u901a\u8fc7\u4ee3\u7801\u6216 Glade \u5de5\u5177\u8fdb\u884c\u521b\u5efa\u548c\u5b9a\u5236\u3002<\/p>\n<\/p>\n
\u4e94\u3001Glade \u5de5\u5177\u4ecb\u7ecd<\/p>\n
Glade \u662f\u4e00\u4e2a GUI \u6784\u5efa\u5668\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u5feb\u901f\u521b\u5efa\u754c\u9762\u5e03\u5c40\uff0c\u5e76\u751f\u6210\u76f8\u5e94\u7684\u4ee3\u7801\u3002Glade \u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u5982C\u3001C++\u548c Python\u3002<\/p>\n
\u516d\u3001\u4f7f\u7528 Glade \u521b\u5efa\u7a97\u53e3<\/p>\n
\u9996\u5148\uff0c\u5728 Glade \u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\uff0c\u5e76\u6dfb\u52a0\u7a97\u53e3\u7ec4\u4ef6\u3002\u7136\u540e\uff0c\u5728\u5c5e\u6027\u7f16\u8f91\u5668\u4e2d\u5bf9\u7a97\u53e3\u8fdb\u884c\u8bbe\u7f6e\uff0c\u5982\u6807\u9898\u548c\u5927\u5c0f\u7b49\u3002\u6700\u540e\uff0c\u5c06\u7a97\u53e3\u4fdd\u5b58\u4e3a XML \u6587\u4ef6linux gtk \u56fe\u5f62\u5316\u7f16\u7a0b<\/strong>\uff0c\u5e76\u5728\u4ee3\u7801\u4e2d\u52a0\u8f7d\u8be5\u6587\u4ef6\u5373\u53ef\u3002<\/p>\n\u4e03\u3001\u4e8b\u4ef6\u5904\u7406\u4e0e\u4fe1\u53f7\u4f20\u9012<\/p>\n
\u5728 GTK \u4e2dlinux\u89c6\u9891\u6559\u7a0b\uff0c\u4e8b\u4ef6\u90fd\u662f\u4ee5\u4fe1\u53f7\uff08Signal\uff09\u7684\u5f62\u5f0f\u4f20\u9012\u7684\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u8fde\u63a5\u4fe1\u53f7\u548c\u56de\u8c03\u51fd\u6570\u6765\u5b9e\u73b0\u4e8b\u4ef6\u5904\u7406\u903b\u8f91\u3002<\/p>\n
\u516b\u3001\u5e03\u5c40\u7ba1\u7406\u5668\u4ecb\u7ecd<\/p>\n
\u5e03\u5c40\u7ba1\u7406\u5668\u662f\u4e00\u79cd\u7528\u4e8e\u63a7\u5236 GUI \u5143\u7d20\u4f4d\u7f6e\u548c\u5927\u5c0f\u7684\u5de5\u5177\u3002GTK \u63d0\u4f9b\u4e86\u591a\u79cd\u5e03\u5c40\u7ba1\u7406\u5668\uff0c\u5982 Box\u3001Grid \u548c Stack \u7b49\u3002<\/p>\n
\u4e5d\u3001\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u4e0e\u4e3b\u9898\u5b9a\u5236<\/p>\n
\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u6765\u5b9e\u73b0\u7279\u6b8a\u9700\u6c42\u4e0b\u7684\u754c\u9762\u5143\u7d20\u3002\u540c\u65f6\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4e3b\u9898\u5b9a\u5236\u6765\u5b9e\u73b0\u6574\u4f53\u98ce\u683c\u4e0a\u7684\u8c03\u6574\u3002<\/p>\n
\u5341\u3001\u7ed3\u8bed<\/p>\n
\u672c\u6587\u5bf9 Linux GTK \u56fe\u5f62\u5316\u7f16\u7a0b\u8fdb\u884c\u4e86\u5168\u9762\u4ecb\u7ecd\uff0c\u5e76\u63d0\u4f9b\u4e86\u591a\u4e2a\u65b9\u9762\u7684\u8be6\u7ec6\u8bb2\u89e3\u53ca\u793a\u4f8b\u4ee3\u7801\u3002\u5e0c\u671b\u8bfb\u8005\u80fd\u591f\u901a\u8fc7\u672c\u6587\u4e86\u89e3\u5230\u66f4\u591a\u6709\u5173 GTK \u7684\u77e5\u8bc6\uff0c\u5e76\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d\u66f4\u597d\u5730\u8fd0\u7528\u5b83\u4eec\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u4e0b\u7684\u56fe\u5f62\u5de5\u5177\u5305\uff0c\u88ab\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5404\u79cd\u684c\u9762\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002\u56fe\u5f62\u5316\u7f16\u7a0b\uff0c\u5e2e\u52a9\u8bfb\u8005\u6253\u9020\u9ad8\u6548\u7f8e\u89c2\u7684\u754c\u9762\u4f53\u9a8c\u3002Program\uff09\u56fe\u50cf\u5904\u7406\u8f6f\u4ef6\u7684\u4e00\u90e8\u5206\uff0c\u662f\u4e00\u5957\u7528\u4e8e\u521b\u5efa\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09\u7684\u5de5\u5177\u5305\u3002\u6811\u4ee3\u8868\u4e86\u5e94\u7528\u7a0b\u5e8f\u4e2d\u6240\u6709\u53ef\u89c1\u5143\u7d20\uff0c\u5982\u7a97\u53e3\u3001\u6309\u94ae\u7b49\u3002\u6784\u5efa\u5668\uff0c\u5b83\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u5feb\u901f\u521b\u5efa\u754c\u9762\u5e03\u5c40\uff0c\u5e76\u751f\u6210\u76f8\u5e94\u7684\u4ee3\u7801\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u6765\u5b9e\u73b0\u7279\u6b8a\u9700\u6c42\u4e0b\u7684\u754c\u9762\u5143\u7d20\u3002\u56fe\u5f62\u5316\u7f16\u7a0b\u8fdb\u884c\u4e86\u5168\u9762\u4ecb\u7ecd\uff0c\u5e76\u63d0\u4f9b\u4e86\u591a\u4e2a\u65b9\u9762\u7684\u8be6\u7ec6\u8bb2\u89e3\u53ca\u793a\u4f8b\u4ee3\u7801\u3002<\/p>\n","protected":false},"author":1,"featured_media":267009,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-267008","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/267008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=267008"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/267008\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/267009"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=267008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=267008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=267008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}