* 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.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.Free
*/
/*
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkwindowprivate.h"
+#include "gtkwidgetprivate.h"
+#include "gtkcontainerprivate.h"
static void gtk_win32_embed_widget_realize (GtkWidget *widget);
}
GtkWidget*
-_gtk_win32_embed_widget_new (GdkNativeWindow parent_id)
+_gtk_win32_embed_widget_new (HWND parent)
{
GtkWin32EmbedWidget *embed_widget;
embed_widget->parent_window =
gdk_win32_window_lookup_for_display (gdk_display_get_default (),
- parent_id);
+ parent);
if (!embed_widget->parent_window)
embed_widget->parent_window =
gdk_win32_window_foreign_new_for_display (gdk_display_get_default (),
- parent_id);
+ parent);
return GTK_WIDGET (embed_widget);
}
if (embed_widget->parent_window != NULL)
{
- gdk_window_set_user_data (embed_widget->parent_window, NULL);
+ gtk_widget_unregister_window (widget, embed_widget->parent_window);
g_object_unref (embed_widget->parent_window);
embed_widget->parent_window = NULL;
}
GtkWin32EmbedWidget *embed_widget;
gpointer user_data;
- window = gdk_win32_window_lookup_for_display (gdk_display_get_default (),
- (GdkNativeWindow)hwnd);
+ window = gdk_win32_window_lookup_for_display (gdk_display_get_default (), hwnd);
if (window == NULL) {
g_warning ("No such window!");
return 0;
gdk_window = gdk_window_new (embed_widget->parent_window,
&attributes, attributes_mask);
gtk_widget_set_window (widget, gdk_window);
- gdk_window_set_user_data (gdk_window, window);
+ gtk_widget_register_window (widget, gdk_window);
embed_widget->old_window_procedure = (gpointer)
SetWindowLongPtrW(GDK_WINDOW_HWND (gdk_window),