Transparent background in window?

2002-09-04 Thread Egon Andersen, Talura

Hi,

Is it possible to make the background in a window transparent?
The reason that I ask is that I have made a splash screen with an image 
that is not rectangular (transparent background) and I would like the 
window to appear as having the same shape as the image.
I've been looking at gtk_style family, but I haven't found the solution.

Any hints?

Best regards
Egon Andersen

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Killing a GTK Applikation

2002-09-04 Thread Sthr Kirsten

Hello,

i have a problem:

I want to write information about a GTK program into a config-file if the X-Window 
System is going down.
I have try to set up a signal handler for the kill signal because there is no signal 
at killing time.
How can i write my informations into a config-file, if the gtk-program is killed by 
the WindowMaker!

Kirsten!


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Transparent background in window?

2002-09-04 Thread Brett Granger


Though I keep hoping somebody will be able to explain to me otherwise, 
there does not appear to be any way to make top level X windows 
transparent or translucent with the stock GTK (due to a limitation in X 
itself, I believe)...

However, if all you want is the shape, and the contents don't need to be 
transparent then take a look at gtk_widget_shape_combine_mask -- 
http://developer.gnome.org/doc/API/2.0/gtk/gtkwidget.html#gtk-widget-shape-combine-mask

--Brett


Egon Andersen, Talura wrote:
 Hi,
 
 Is it possible to make the background in a window transparent?
 The reason that I ask is that I have made a splash screen with an image 
 that is not rectangular (transparent background) and I would like the 
 window to appear as having the same shape as the image.
 I've been looking at gtk_style family, but I haven't found the solution.
 
 Any hints?
 
 Best regards
 Egon Andersen
 
 ___
 gtk-list mailing list
 [EMAIL PROTECTED]
 http://mail.gnome.org/mailman/listinfo/gtk-list


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Transparent background in window?

2002-09-04 Thread Joachim Backes


On 04-Sep-2002 Brett Granger wrote: 
  
  Though I keep hoping somebody will be able to explain to me otherwise, 
  there does not appear to be any way to make top level X windows 
  transparent or translucent with the stock GTK (due to a limitation in X 
  itself, I believe)...

Hi, this is not correct:

when working with pure X11, you can use the

Nonrectangular Window Shape Extension

which will be provided by

#include X11/extensions/shape.h

which is part of Xfree86: /usr/X11R6/include/X11/extensions

There is a good manual concerning this item:

X11 NONRECTANGULAR WINDOW SHAPE EXTENSION

made by Keith Packard (X Consortium)

You will find the document for ex. in

nscp.upenn.edu/aix4.3html/x11/specs/pdf/shape.PDF

Regards

Joachim Backes

--

Joachim Backes [EMAIL PROTECTED]   | Univ. of Kaiserslautern
Computer Center, High Performance Computing  | Phone: +49-631-205-2438 
D-67653 Kaiserslautern, PO Box 3049, Germany | Fax:   +49-631-205-3056 
-+
WWW: http://hlrwm.rhrk.uni-kl.de/home/staff/backes.html  



  
  However, if all you want is the shape, and the contents don't need to be 
  transparent then take a look at gtk_widget_shape_combine_mask -- 
  http://developer.gnome.org/doc/API/2.0/gtk/gtkwidget.html#gtk-widget-shape-combine
  -mask
  
  --Brett
  
  
  Egon Andersen, Talura wrote:
  Hi,
  
  Is it possible to make the background in a window transparent?
  The reason that I ask is that I have made a splash screen with an image 
  that is not rectangular (transparent background) and I would like the 
  window to appear as having the same shape as the image.
  I've been looking at gtk_style family, but I haven't found the solution.
  
  Any hints?
  
  Best regards
  Egon Andersen
  
  ___
  gtk-list mailing list
  [EMAIL PROTECTED]
  http://mail.gnome.org/mailman/listinfo/gtk-list
  
  
  ___
  gtk-list mailing list
  [EMAIL PROTECTED]
  http://mail.gnome.org/mailman/listinfo/gtk-list


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Transparent background in window?

2002-09-04 Thread Brett Granger



Joachim Backes wrote:
 On 04-Sep-2002 Brett Granger wrote: 
 
 
 Though I keep hoping somebody will be able to explain to me otherwise, 
 there does not appear to be any way to make top level X windows 
 transparent or translucent with the stock GTK (due to a limitation in X 
 itself, I believe)...
 
 
 Hi, this is not correct:
 
 when working with pure X11, you can use the
 
 Nonrectangular Window Shape Extension
 

Thanks, Joachim.

But I am not interested in non-rectangular windows via the shape 
extension (which I have used quite a bit) -- I am interested in 
translucent rectangular (alpha-blended) top level windows, preferably 
with minimal modification to X or to GTK.  There have been previous 
discussions on this list (or was it the app-devel list?) about this, 
indicating that it is possible with DirectFB or perhaps faked using a 
patch from Owen.  Seems like it ought to be possible to create something 
using the render extension, but performance might be an issue?  I'm 
working in a remote display environment, so DirectFB might not really be 
feasible...

--Brett


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Transparent background in window?

2002-09-04 Thread John . Cupitt

Brett Granger wrote:
 But I am not interested in non-rectangular windows via the shape 
 extension (which I have used quite a bit) -- I am interested in 
 translucent rectangular (alpha-blended) top level windows, preferably 
 with minimal modification to X or to GTK.  There have been previous 
 discussions on this list (or was it the app-devel list?) about this, 
 indicating that it is possible with DirectFB or perhaps faked using a 
 patch from Owen.  Seems like it ought to be possible to create something 
 using the render extension, but performance might be an issue?  I'm 
 working in a remote display environment, so DirectFB might not really be 
 feasible...
 
 --Brett

Hi, I don't know if this is any help, but the liquid theme on Qt fakes 
this by:

- before mapping a window, it grabs the area of the screen the
   window will occupy

- all painting to the window is done to an offscreen pixmap

- on an expose event, the offscreen pixmap is copied to the
   client, blended with the underlying window, and then
   pasted back to the display

This does not work if the window underneath is changing, and is also 
slow :-( but it does look rather nice.

John



== 
Fabric of Vision 
Dress and Drapery in Painting 

19 June - 8 September 2002 

For information and tickets: 
http://www.nationalgallery.org.uk/exhibitions/fabric/
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Fatal Error when trying to run GTK

2002-09-04 Thread Daryl Schott

Fatal error: dl() is not supported in multithreaded Web servers - use
extension statements in your php.ini in c:\apache\htdocs\gtk.php on line 6

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Drag-n-drop to empty GtkTreeView

2002-09-04 Thread Joseph

Hello,

I've gotten drag and drop to work with a GtkTreeView by replacing the
functions in the drag dest iface with my own, however none of the
functions are called when the tree is empty. Is there something
special I can do to handle d-n-d to empty trees, or should I just
install a drag handler for the tree's container? 

Joseph



___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Problems building testgtk

2002-09-04 Thread Larry McQueary

Hi,

I'm compiling gtk+ 2.0.6 on Solaris 8 (sparc) with gcc 3.2 and the Sun 
linker and archiver (/usr/ccs/bin/ld and /usr/ccs/bin/ar, respectively). 
 I am configuring with --disable-static.

I have had some problems building testgtk   Upon linking testgtk, I get 
undefined symbols for the following:

gtk_major_version
gtk_minor_version
gtk_micro_version

On closer inspection, it seems these are declared in gtkmain.c as 
const and therefore are treated by gcc-3.2 as private to the 
translation unit (gtkmain.c) and can't be exported.

I suppose there are four possible solutions, but I leave it to the folks 
who regularly code this stuff to comment:

1. Munge the configure script so that it provides some magical flag to 
gcc to make it export these variables (don't even know if this is 
possible, and don't care) if gcc is = 3.x.  Very Ugly.

2. Have testgtk.c refer to GTK_MAJOR_VERSION, et al (from gtk.h), 
instead of gtk_major_version, et al. (from gtkmain.c).  I find this ugly 
and somewhat brute force.

3. Add a function similar to gtk_check_version to gtkmain.c, which will 
return these three values (major, minor, and micro version).  Like it.

All this being said, why hasn't anyone else run into this before?

Larry


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



write GTK+ shared library

2002-09-04 Thread Mullin Yu



Hi all,

I'm new to GTK+. I just followed the Hello World 
example, and I could compile and run the application.

Now, I want to change it from a application to a 
shared library and then called by another C program, so thatsimilarly 
adialog box with a button will become up.

Any ideas and comments on 

1. how to change it to shared library?
2. how to change the C program to call 
it?

Thanks a lot!

Best regards,
Mullin