how to make a GTK widget get fully focus and how to get its window state ?
- From: Aaron Lewis <the warl0ck 1989 gmail com>
- To: gtk-list gnome org
- Subject: how to make a GTK widget get fully focus and how to get its window state ?
- Date: Wed, 9 Feb 2011 19:56:24 +0800
Hi,
I got two questions relating a GTK widget:
1. How can i get a window state ? i mean , a GTkWidget , i tried
these code and didn't got a reply:
// BEGIN CODE , it's for libunique , and gpAppFrame->window is an
// pointer for a GTKWidget
void message_received_cb () {
// I got this printed on screen
g_print ( "Message Received , Starting up GUI" );
switch ( gdk_window_get_state ( GDK_WINDOW(gpAppFrame->window) ) ) {
case GDK_WINDOW_STATE_WITHDRAWN: g_print ("GDK_WINDOW_STATE_WITHDRAWN");
case GDK_WINDOW_STATE_ICONIFIED: g_print ("GDK_WINDOW_STATE_ICONIFIED");
case GDK_WINDOW_STATE_MAXIMIZED: g_print ("GDK_WINDOW_STATE_MAXIMIZED");
case GDK_WINDOW_STATE_STICKY: g_print ("GDK_WINDOW_STATE_STICKY");
case GDK_WINDOW_STATE_FULLSCREEN: g_print ("GDK_WINDOW_STATE_FULLSCREEN");
case GDK_WINDOW_STATE_ABOVE: g_print ("GDK_WINDOW_STATE_ABOVE");
case GDK_WINDOW_STATE_BELOW: g_print ("GDK_WINDOW_STATE_BELOW");
}
gtk_widget_show ( gpAppFrame->window );
}
2. How can i force a program to be the "current" program , namely ,
it didn't get the focus of user , and i want it to get the focus ,
and make all other programs below it.
Many thanks for answering my stupid question if they really are ;-)
--
Best Regards,
Aaron Lewis - PGP: 0xDFE6C29E ( http://http://pgp.mit.edu/ )
Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]