第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

GTK+編程用什么函數(shù)實(shí)現(xiàn)窗口的最大化\最小化控制?

GTK+編程用什么函數(shù)實(shí)現(xiàn)窗口的最大化\最小化控制?

炎炎設(shè)計(jì) 2019-02-05 10:06:42
GTK+編程用什么函數(shù)實(shí)現(xiàn)窗口的最大化\最小化控制
查看完整描述

2 回答

?
ibeautiful

TA貢獻(xiàn)1993條經(jīng)驗(yàn) 獲得超6個(gè)贊

自定義調(diào)函數(shù)捕捉化化信號(hào)用自函數(shù)進(jìn)行處理行 #include #include gtk.h> void callback(gpointer data) { GtkWidget *window=GTK_WIDGET(data); switch(gdk_window_get_state(GDK_WINDOW(window->window))) { case 一<<0/* GDK_WINDOW_STATE_WITHDRAWN*/: printf("GDK_WINDOW_STATE_WITHDRAWN:the window is not shown.\n");break; case 一<<一/* GDK_WINDOW_STATE_ICONIFIED*/: printf("GDK_WINDOW_STATE_ICONIFIED:the window is minimized.\n");break;//化處理 case 一<<二/* GDK_WINDOW_STATE_MAXIMIZED*/: printf("GDK_WINDOW_STATE_MAXIMIZED:the window is maximized.\n");break;//化處理 case 一<<三/* GDK_WINDOW_STATE_STICKY*/: printf("GDK_WINDOW_STATE_STICKY:the window is sticky.\n");break; case 一<<四/* GDK_WINDOW_STATE_FULLSCREEN*/: printf("GDK_WINDOW_STATE_FULLSCREEN:the window is maximized without decorations.\n");break; case 一<<5/* GDK_WINDOW_STATE_ABOVE*/: printf("GDK_WINDOW_STATE_ABOVE:the window is kept above other windows. \n");break; case 一<<陸/* GDK_WINDOW_STATE_BELOW*/: printf("GDK_WINDOW_STATE_BELOW:the window is kept below other windows. \n");break; default:break; } } int main(int argc,char *argv[]) { gtk_init(&argc,&argv); GtkWidget *window; window=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_widget_show(window); g_signal_connect_swapped(window,"window_state_event", G_CALLBACK(callback),window); gtk_main(); return 一; }  

查看完整回答
反對(duì) 回復(fù) 2019-03-14
?
SMILET

TA貢獻(xiàn)1796條經(jīng)驗(yàn) 獲得超4個(gè)贊

這個(gè)是我把樓上的答案重新整理了以下,發(fā)現(xiàn)是對(duì)的

#include <gtk/gtk.h>

void callback(gpointer data)
{
GtkWidget *window=GTK_WIDGET(data);
switch(gdk_window_get_state(GDK_WINDOW(window->window)))
{
case GDK_WINDOW_STATE_WITHDRAWN :printf("GDK_WINDOW_STATE_WITHDRAWN:the window is not shown.\n"); break;
case GDK_WINDOW_STATE_ICONIFIED:printf("GDK_WINDOW_STATE_ICONIFIED:the window is minimized.\n");break;//化處理
case GDK_WINDOW_STATE_MAXIMIZED:printf("GDK_WINDOW_STATE_MAXIMIZED:the window is maximized.\n");break;//化處理
case GDK_WINDOW_STATE_STICKY:printf("GDK_WINDOW_STATE_STICKY:the window is sticky.\n");break;
case GDK_WINDOW_STATE_FULLSCREEN: printf("GDK_WINDOW_STATE_FULLSCREEN:the window is maximized without decorations.\n");break;
case GDK_WINDOW_STATE_ABOVE:printf("GDK_WINDOW_STATE_ABOVE:the window is kept above other windows. \n");break;
case GDK_WINDOW_STATE_BELOW: printf("GDK_WINDOW_STATE_BELOW:the window is kept below other windows. \n");break;
default:break;
}
}
int main(int argc,char *argv[])
{
gtk_init(&argc,&argv);
GtkWidget *window;
window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show(window);
g_signal_connect_swapped(window,"window_state_event", G_CALLBACK(callback),window);
gtk_main();
return 0;
}



查看完整回答
反對(duì) 回復(fù) 2019-03-14
  • 2 回答
  • 0 關(guān)注
  • 1340 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)