Commit 39aee7284af2836542d7e8ec081158af9b7e5ac9

  • avatar
  • Emmanuele Bassi <ebassi @li…x.intel.com> (Committer)
  • Sat Jun 27 16:21:06 CEST 2009
  • avatar
  • Alexander Larsson (Author)
  • Thu Jun 25 12:11:17 CEST 2009
Make GtkClutterEmbed derive from GtkContainer

This is required to later add child widgets when embedding Gtk+ widgets in
clutter.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
  
5858
5959#endif /* HAVE_CLUTTER_GTK_{X11,WIN32} */
6060
61G_DEFINE_TYPE (GtkClutterEmbed, gtk_clutter_embed, GTK_TYPE_WIDGET);
61G_DEFINE_TYPE (GtkClutterEmbed, gtk_clutter_embed, GTK_TYPE_CONTAINER);
6262
6363#define GTK_CLUTTER_EMBED_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_CLUTTER_TYPE_EMBED, GtkClutterEmbedPrivate))
6464
514514}
515515
516516static void
517gtk_clutter_embed_add (GtkContainer *container,
518 GtkWidget *widget)
519{
520 g_warning ("GtkClutterEmbed children not yet supported");
521}
522
523static void
524gtk_clutter_embed_remove (GtkContainer *container,
525 GtkWidget *widget)
526{
527 g_warning ("GtkClutterEmbed children not yet supported");
528}
529
530static void
531gtk_clutter_embed_forall (GtkContainer *container,
532 gboolean include_internals,
533 GtkCallback callback,
534 gpointer callback_data)
535{
536}
537
538static GType
539gtk_clutter_embed_child_type (GtkContainer *container)
540{
541 /* No children supported yet */
542 return G_TYPE_NONE;
543}
544
545static void
517546gtk_clutter_embed_class_init (GtkClutterEmbedClass *klass)
518547{
519548 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
520549 GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
550 GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
521551
522552 g_type_class_add_private (klass, sizeof (GtkClutterEmbedPrivate));
523553
572572 widget_class->focus_in_event = gtk_clutter_embed_focus_in;
573573 widget_class->focus_out_event = gtk_clutter_embed_focus_out;
574574 widget_class->scroll_event = gtk_clutter_embed_scroll_event;
575
576 container_class->add = gtk_clutter_embed_add;
577 container_class->remove = gtk_clutter_embed_remove;
578 container_class->forall = gtk_clutter_embed_forall;
579 container_class->child_type = gtk_clutter_embed_child_type;
575580}
576581
577582static void
  
5353struct _GtkClutterEmbed
5454{
5555 /*< private >*/
56 GtkWidget parent_instance;
56 GtkContainer parent_instance;
5757
5858 GtkClutterEmbedPrivate *priv;
5959};
6868struct _GtkClutterEmbedClass
6969{
7070 /*< private >*/
71 GtkWidgetClass parent_class;
71 GtkContainerClass parent_class;
7272
7373 /* padding for future expansion */
7474 void (*_clutter_gtk_reserved1) (void);