forked from AuroraMiddleware/gtk
c1a14d036d
Wed Jul 4 22:35:40 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtklabel.c gtk/gtkmenubar.c gtk/gtktreeviewcolumn.c gtk/gtkwidget.c: Check GTK_WIDGET_TOPLEVEL(gtk_widget_get_toplevel (widget)), not GTK_WIDGET_GET_ANCESTOR ... see http://mail.gnome.org/archives/gtk-devel-list/2001-July/msg00072.html. Indicate the best practice in the docs for gtk_widget_get_toplevel(). * gtk/gtkwidget.[ch]: Expose a private _gtk_widget_hierarchy_changed(), so GtkPlug can give the correct signals when transforming from a child to a toplevel. * gtk/gtkdnd.c (gtk_drag_dest_hierarchy_changed): Handle reparentation correctly. * gtk/gtkwidget.c (gtk_widget_propagate_hierarchy_changed): Propagate the previous_toplevel argument down properly. * gtk/gtklabel.c (gtk_label_finalize): Fix unrefing of wrong atr list. * gtk/gtkplug.[ch]: Add an "embedded" signal. * gtk/gtksocket.[ch]: Add "child_added", "child_removed" signals. * gtk/gtkplug.[ch] gtk/gtksocket.[ch]: Add functions gtk_plug_get_id(), gtk_socket_get_id(), to avoid the user having to worry about realization, and gdkx.h. * tests/testsocket.c: Extend to try out the new signals and gtk_plug/socket_get_id(). * gtk/gtklabel.c (gtk_label_set_pattern_internal): Fix setting of underline attributes. * gdk/x11/gdkevents-x11.c (gdk_event_translate): Ignore DestroyNotify events from SubstructureNotifyMask * gdk/x11/gdkwindow-x11.c (gdk_window_reparent): Switch GDK_WINDOW_TYPE (window) as needed. * gdk/x11/gdkwindow-x11.c (gdk_window_new): Clean up, allow creation of toplevel windows as children of foreign windows. * gtk/gtkplug.c: Remove hacks involving changing private fields of GdkWindow. * gtk/gtkplug.[ch] gtk/gtksocket.c: Work to make exactly the same signals and notification be emitted for local embedding as for inter-process embedding.
87 lines
2.5 KiB
C
87 lines
2.5 KiB
C
/* GTK - The GIMP Toolkit
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free
|
|
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
*/
|
|
|
|
/*
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
* files for a list of changes. These files are distributed with
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
*/
|
|
|
|
#ifndef __GTK_PLUG_H__
|
|
#define __GTK_PLUG_H__
|
|
|
|
|
|
#include <gdk/gdk.h>
|
|
#include <gtk/gtksocket.h>
|
|
#include <gtk/gtkwindow.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
#define GTK_TYPE_PLUG (gtk_plug_get_type ())
|
|
#define GTK_PLUG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_PLUG, GtkPlug))
|
|
#define GTK_PLUG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PLUG, GtkPlugClass))
|
|
#define GTK_IS_PLUG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_PLUG))
|
|
#define GTK_IS_PLUG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PLUG))
|
|
#define GTK_PLUG_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_PLUG, GtkPlugClass))
|
|
|
|
|
|
typedef struct _GtkPlug GtkPlug;
|
|
typedef struct _GtkPlugClass GtkPlugClass;
|
|
|
|
|
|
struct _GtkPlug
|
|
{
|
|
GtkWindow window;
|
|
|
|
GdkWindow *socket_window;
|
|
GtkWidget *modality_window;
|
|
GtkWindowGroup *modality_group;
|
|
guint same_app : 1;
|
|
};
|
|
|
|
struct _GtkPlugClass
|
|
{
|
|
GtkWindowClass parent_class;
|
|
|
|
void (*embedded) (GtkPlug *plug);
|
|
};
|
|
|
|
|
|
GtkType gtk_plug_get_type (void) G_GNUC_CONST;
|
|
void gtk_plug_construct (GtkPlug *plug, GdkNativeWindow socket_id);
|
|
|
|
GtkWidget* gtk_plug_new (GdkNativeWindow socket_id);
|
|
GdkNativeWindow gtk_plug_get_id (GtkPlug *plug);
|
|
|
|
void _gtk_plug_add_to_socket (GtkPlug *plug,
|
|
GtkSocket *socket);
|
|
void _gtk_plug_remove_from_socket (GtkPlug *plug,
|
|
GtkSocket *socket);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
#endif /* __GTK_PLUG_H__ */
|