problem using gdk_directfb_window_set_opacity()



hi

 I used gdk_directfb_window_set_opacity() 
 but i did not  get any result of opacity change ..

i configured DirectFB-0.9-20 
 as well gtk+-directfb-2.0 . 
but  gtk+ applications run well .
 when i tries to run gdk/directfb application to set opacity gdk_directfb_window_set_opacity()  , it does not set any opacity value for the window .

 Here is some sample code which i ran for setting opacity .

#include<gdk/gdkdirectfb.h>
#include<gtk/gtk.h>
                                                                                                    
/*void gdk_directfb_window_fade (GdkWinodw * fade_window, gchar opacity,
                               long duration);
                                                                                                    
 void gdk_directfb_window_fadeout(GdkWindow *fade_out_window);*/
void
button_clicked (GtkWidget * widget, GdkEvent * event, gpointer data)
{
  GtkWidget *b_window;
  b_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (b_window), "Clicked window");
  gtk_widget_realize(b_window);
  gdk_directfb_window_set_opacity (b_window->window,
                                   9);
  /*   gdk_directfb_window_fade (b_window->window, 234,3123456); */
  gtk_widget_show (b_window);
}
                                                                                                    
int
main (int argc, char *argv[])
{
                                                                                                    
  GtkWidget *widget, *button;
  gtk_init (&argc, &argv);
  widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (widget), "Opacity Window !");
  /* Sets the border width of the window. */
  gtk_container_set_border_width (GTK_CONTAINER (widget) button = gtk_button_new_with_mnemonic ("_Yes");
  gtk_widget_realize(widget);
  gdk_directfb_window_set_opacity(widget->window , 102);
  gtk_widget_show (button);
  gtk_container_add (GTK_CONTAINER (widget), button);
  gtk_widget_show (widget);
  g_signal_connect (G_OBJECT (button), "clicked",
                    G_CALLBACK (button_clicked), NULL);
                                                                                                    
  gtk_main ();
                                                                                                    
  return 0;
}
, 100);

If i am not wrong i asked same question to you at directfb  . 

So how to use it to work .
Please   tell me .

With Regards
Manoj


"Sven Neumann"<sven gimp org> wrote:
Hi,

"bhattadatabase" <bhattadatabase indiatimes com> writes:

> I am using gtk+-2.0 .
> I want to implement gdk_window_fade_in(GdkWindow *window, gint *timeinsec )
> 
> But i found you have made it for X11 and it is for some cvs version
> .  i could not use that function .  BTW i want it to use it at gtk
> tree level . I mean to say i need it for directfb/linux-fb/x11 . So
> how to implement it ? i am more concern about directfb but if i can
> get some idea from you it will be better .

for GTK+-DirectFB you would be using gdk_directfb_window_set_opacity().


Sven
Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

 Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com

Bid for for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to http://airsahara.indiatimes.com and Bid Now!




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]