Page 1 of 1
How make transparent window
Posted: Sun Jan 27, 2008 10:14 pm
by karu
Sorry my bad English but how i can make transparent window in linux. I need to do textgadget with transparent background and window. Transparent text i can draw with png but how to make windows transparent?
Posted: Sat Feb 02, 2008 2:04 pm
by Anonymous
hello,you can make a transparent window with GTK. , this this :
http://plan99.net/~mike/blog/?p=38
Posted: Sat Feb 02, 2008 7:48 pm
by walker
since GTK 2.12 you can simply use
Code: Select all
gtk_window_set_opacity (*widget, opacity.f)
where opacity is a range from 0.0 to 1.0
This only works if a compisite manager is running
To check that, use
Code: Select all
gtk_widget_is_composited (*widget)
where widget is the WindowID
for sure you have to import these funcions with the
ImportC function
Code: Select all
ImportC
gtk_window_set_opacity (*widget, opacity.f)
gtk_widget_is_composited (*widget)
EndImport
Posted: Fri Feb 08, 2008 2:59 pm
by karu
ok, thanks but gtk_window_set_opacity is setting whole window opacity, i need that window is transparent and gadgets is not. Shortly i want to do scrolling text like subtitles in video
Posted: Wed Sep 17, 2008 10:49 pm
by Progi1984
walker wrote:
for sure you have to import these funcions with the
ImportC function
Code: Select all
ImportC
gtk_window_set_opacity (*widget, opacity.f)
gtk_widget_is_composited (*widget)
EndImport
@walker : which library must we import for using these functions ?