How make transparent window

Linux specific forum
karu
Enthusiast
Enthusiast
Posts: 255
Joined: Fri Jan 13, 2006 12:14 am

How make transparent window

Post 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?
Anonymous

Post by Anonymous »

hello,you can make a transparent window with GTK. , this this :http://plan99.net/~mike/blog/?p=38
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post 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
karu
Enthusiast
Enthusiast
Posts: 255
Joined: Fri Jan 13, 2006 12:14 am

Post 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
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post 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 ?
Post Reply