On Mon, 2014-03-10 at 09:26 +0100, Joël Krähemann wrote:
> On Sun, 2014-03-09 at 14:03 +0000, Richard Shann wrote:
> > > From: Jo?l Kr?hemann <j...@weedlight.ch>
> > > To: gtk-app-devel-list@gnome.org
> > > Subject: Re: Help replacing GtkDrawingArea with GtkLayout
> > > Message-ID: <1394327737.3369.3.camel@debian>
> > > Content-Type: text/plain; charset="us-ascii"
> > > 
> > > Hi,
> > > 
> > > Didn't before but may be check the following:
> > > 
> > > g_object_set(G_OBJECT(layout),
> > >   "app-paintable\0", TRUE, 
> > >   NULL);
> > 
> > Hmm, I hadn't noticed that property. It is presumably set ok since I can
> > draw and place widgets on the GtkLayout. It was the configure and scroll
> > events that I didn't receive.
> > BTW why do you have two NULL bytes at the end of the property name
> > (AFAIK only one is needed)?
> > 
> > Richard
> > 
> > 
> 
> Assumed you get annoyed by warnings, you can slightly disable it. It's
> distribution depend what flags are per default on. For further reading:
> 
> http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
> 
> regards
> Joël
> 
> 
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

You should ask why I forget to add GDK_SCROLL_MASK

gtk_widget_set_events (GTK_WIDGET (layout),
  GDK_EXPOSURE_MASK 
  | GDK_LEAVE_NOTIFY_MASK 
  | GDK_BUTTON_PRESS_MASK 
  | GDK_BUTTON_RELEASE_MASK 
  | GDK_POINTER_MOTION_MASK 
  | GDK_POINTER_MOTION_HINT_MASK 
  | GDK_SCROLL_MASK
  );

then you have to

g_signal_connect(G_OBJECT(layout), "scroll-event\0",
  G_CALLBACK(layout_callback), NULL);


gboolean
layout_callback(GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
  /* do your thing */

  return(FALSE);
}



_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to