diff options
author | Alexander Kurtakov <akurtako@redhat.com> | 2012-10-19 13:30:14 +0300 |
---|---|---|
committer | Alexander Kurtakov <akurtako@redhat.com> | 2012-10-19 13:30:14 +0300 |
commit | e5d64fd81f96f67f474e48cc570d6faada05a8c9 (patch) | |
tree | 8c958959c863be0cbf38cbf658e724eb5ee56243 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java | |
parent | 7de2989f15b2bd13e02b5d525529cc8b072bde8e (diff) | |
download | eclipse.platform.swt-e5d64fd81f96f67f474e48cc570d6faada05a8c9.tar.gz eclipse.platform.swt-e5d64fd81f96f67f474e48cc570d6faada05a8c9.tar.xz eclipse.platform.swt-e5d64fd81f96f67f474e48cc570d6faada05a8c9.zip |
Bug 392420 - Use g_type_query to query for sizes of GtkFixed.
Because of sealing we can no longer access GtkFixed and GtkFixed sizeof
so remove them with the standard gobject api for retrieving this
documentation.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java index 3a6bd74ca2..2404970ff2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java @@ -935,10 +935,15 @@ void createDisplay (DeviceData data) { fixedSizeAllocateCallback = new Callback (getClass (), "fixedSizeAllocateProc", 2); //$NON-NLS-1$ fixedSizeAllocateProc = fixedSizeAllocateCallback.getAddress (); if (fixedSizeAllocateProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); + long /*int*/ queryPtr = OS.g_malloc (GTypeQuery.sizeof); + OS.g_type_query (OS.GTK_TYPE_FIXED(), queryPtr); + GTypeQuery query = new GTypeQuery (); + OS.memmove (query, queryPtr, GTypeQuery.sizeof); + OS.g_free (queryPtr); GTypeInfo fixed_info = new GTypeInfo (); - fixed_info.class_size = (short) OS.GtkFixedClass_sizeof (); + fixed_info.class_size = (short) query.class_size; fixed_info.class_init = fixedClassInitProc; - fixed_info.instance_size = (short) OS.GtkFixed_sizeof (); + fixed_info.instance_size = (short) query.instance_size; fixed_info_ptr = OS.g_malloc (GTypeInfo.sizeof); OS.memmove (fixed_info_ptr, fixed_info, GTypeInfo.sizeof); fixed_type = OS.g_type_register_static (OS.GTK_TYPE_FIXED (), type_name, fixed_info_ptr, 0); |