toolButton Disable
- From: "Luiz Rafael Culik Guimaraes" <luiz xharbour com br>
- Cc: <gtk-app-devel-list gnome org>
- Subject: toolButton Disable
- Date: Sat, 22 Mar 2008 23:01:23 -0300
Dear Friends
Is their an way to disable an specific tool buton like the winapi?
I read the docs, but could not find an reference
Regards
Luiz
----- Original Message -----
From: "ying lcs" <yinglcs gmail com>
To: "Luis Menina" <liberforce freeside fr>
Cc: <gtk-app-devel-list gnome org>
Sent: Saturday, March 22, 2008 10:48 PM
Subject: Re: Question in using gdk_pixbuf_get_from_drawable()
Luis,
The 'window' object is from:
gtk_window_new(GTK_WINDOW_TOPLEVEL)
I do see it works something, while other times, I see the screenshot
get out of place (as shown in the image I attached).
I suspect my window is obscured during the capture.
So how can I programmatic make sure my window is not obscured before
the catpure?
I have tried adding:
gdk_window_raise(window);
gdk_flush();
But it does not always help.
Thank you for any more pointers.
On Thu, Mar 20, 2008 at 7:37 PM, Luis Menina <liberforce freeside fr> wrote:
Hi,
where does your "window" object come from ? Could you please give us the
code where you initilized it ? I've tried to adapt your code in a simple
example, and it just works... I get a screenshot of what is in the
window, without the window decoration.
Cheers,
Luis
ying lcs a écrit :
> Hi,
>
> I have a question of using gdk_pixbuf_get_from_drawable(). I have the
> following code which save the gdk window to a png file.
> But something I get something which is totally not what is displayed
> on the window. Can you please tell me what am I missing?
>
> GdkWindow *window ;
>
> if (window != NULL) {
>
> int x, y, width, height, depth;
>
> gdk_window_get_geometry( window, &x, &y, &width, &height,
&depth );
>
> printf (" width=%d, height=%d\n", width, height);
>
> /* copy the pixmap from the treeview and from the title */
> pb = gdk_pixbuf_get_from_drawable(NULL,
> GDK_DRAWABLE(window),
> NULL, 0, 0, 0, 0, width, height);
>
>
> /* save the pixbuf to a png file */
> gdk_pixbuf_save(pb, filename, "png", NULL,
> "compression", "9",
> NULL);
> }
>
> Thank you.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]