diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt')
35 files changed, 293 insertions, 619 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDKPIXBUF.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDKPIXBUF.java index 713ba8d723..d84a0bec18 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDKPIXBUF.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDKPIXBUF.java @@ -19,7 +19,7 @@ public class GDKPIXBUF extends OS { /* GdkColorspace enumeration */ /* R/G/B additive color space */ - public final static int GDK_COLORSPACE_RGB = 0; + public static final native int GDK_COLORSPACE_RGB(); /* GIF-like animation overlay modes for frames */ public final static int GDK_PIXBUF_FRAME_RETAIN = 0; @@ -215,11 +215,4 @@ public static final native int gdk_pixbuf_get_from_drawable ( int width, int height); - - -/* LOAD THE DLL */ - -static { - Library.loadLibrary ("swt-pixbuf"); -} } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEvent.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEvent.java deleted file mode 100644 index 6da6571c0a..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEvent.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GdkEvent {
- public int type;
- public int window;
- public byte send_event;
- public static final int sizeof = 88;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventButton.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventButton.java deleted file mode 100644 index 17d1febbcf..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventButton.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GdkEventButton extends GdkEvent {
- public int time;
- public long x;
- public long y;
- public long pressure;
- public long xtilt;
- public long ytilt;
- public int state;
- public int button;
- public int source;
- public int deviceid;
- public long x_root;
- public long y_root;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventExpose.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventExpose.java index 6fd9920e97..33dca749ec 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventExpose.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventExpose.java @@ -13,10 +13,16 @@ package org.eclipse.swt.internal.gtk; * this distribution shall govern.
*/
-public class GdkEventExpose extends GdkEvent {
+public class GdkEventExpose {
public short x;
public short y;
public short width;
public short height;
+ public int region;
public int count;
+
+ GdkEventExpose() {};
+ public GdkEventExpose(int ptr) {
+ OS.memmove(this, ptr);
+ }
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java deleted file mode 100644 index 6e4acded51..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GdkEventKey extends GdkEvent {
- public int time;
- public int state;
- public int keyval;
- public int length;
- public int string;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java deleted file mode 100644 index 5a8d5b9c16..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GdkEventMotion extends GdkEvent {
- public int time;
- public long x;
- public long y;
- public long pressure;
- public long xtilt;
- public long ytilt;
- public int state;
- public int is_hint;
- public int source;
- public int deviceid;
- public long x_root;
- public long y_root;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkVisual.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkVisual.java index 3b0630a614..d95eccbd2e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkVisual.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkVisual.java @@ -28,5 +28,9 @@ public class GdkVisual { public int blue_mask;
public int blue_shift;
public int blue_prec;
- public static final int sizeof = 56;
+
+ private GdkVisual () {}
+ public GdkVisual (int ptr) {
+ OS.memmove(this, ptr);
+ }
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkAdjustment.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkAdjustment.java index b1a55987f6..fd982995cd 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkAdjustment.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkAdjustment.java @@ -13,12 +13,16 @@ package org.eclipse.swt.internal.gtk; * this distribution shall govern.
*/
-public class GtkAdjustment extends GtkObject {
- public float lower;
- public float upper;
- public float value;
- public float step_increment;
- public float page_increment;
- public float page_size;
- public static final int sizeof = 40;
+public class GtkAdjustment {
+ public double lower;
+ public double upper;
+ public double value;
+ public double step_increment;
+ public double page_increment;
+ public double page_size;
+
+ private GtkAdjustment() {}
+ public GtkAdjustment (int ptr) {
+ OS.memmove(this, ptr);
+ }
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBin.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBin.java deleted file mode 100644 index d408fc5b42..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBin.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.eclipse.swt.internal.gtk; - -/* - * Copyright (c) IBM Corp. 2000, 2001. All rights reserved. - * - * The contents of this file are made available under the terms - * of the GNU Lesser General Public License (LGPL) Version 2.1 that - * accompanies this distribution (lgpl-v21.txt). The LGPL is also - * available at http://www.gnu.org/licenses/lgpl.html. If the version - * of the LGPL at http://www.gnu.org is different to the version of - * the LGPL accompanying this distribution and there is any conflict - * between the two license versions, the terms of the LGPL accompanying - * this distribution shall govern. - */ - -public class GtkBin extends GtkContainer { - public int child; - public static final int sizeof = 64; -} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBox.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBox.java deleted file mode 100644 index f948c7e4fd..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkBox.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GtkBox extends GtkContainer {
- public int children;
- public short spacing;
- public int homogeneous;
- public static final int sizeof = 68;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCList.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCList.java index cb4843b18c..5f9f19d6ac 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCList.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCList.java @@ -13,7 +13,7 @@ package org.eclipse.swt.internal.gtk; * this distribution shall govern. */ -public class GtkCList extends GtkContainer { +public class GtkCList { public short clist_flags; public int row_mem_chunk; public int cell_mem_chunk; @@ -70,5 +70,9 @@ public class GtkCList extends GtkContainer { public int sort_type; public int compare; public int sort_column; - public static final int sizeof = 252; + + private GtkCList() {} + public GtkCList(int ptr) { + OS.memmove(this, ptr); + } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCListColumn.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCListColumn.java index 818924d046..d7548d1204 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCListColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCListColumn.java @@ -31,4 +31,9 @@ public class GtkCListColumn { public int auto_resize;
public int button_passive;
public static final int sizeof = 40;
+
+ private GtkCListColumn() {}
+ public GtkCListColumn(int ptr) {
+ OS.memmove(this, ptr);
+ }
} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCListRow.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCListRow.java index 73c9063ebd..fae41809eb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCListRow.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCListRow.java @@ -30,5 +30,9 @@ public class GtkCListRow { public int fg_set; // bitfield: 1
public int bg_set; // bitfield: 1
public int selectable; // bitfield: 1
- public static final int sizeof = 48;
+
+ private GtkCListRow() {}
+ public GtkCListRow(int ptr) {
+ OS.memmove(this, ptr);
+ }
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCTree.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCTree.java index 7f6bb8ef21..219af8611d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCTree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCTree.java @@ -13,8 +13,12 @@ package org.eclipse.swt.internal.gtk; * this distribution shall govern. */ -public class GtkCTree extends GtkCList { +public class GtkCTree { public int tree_indent; public int tree_column; - public static final int sizeof = 276; + + private GtkCTree() {} + public GtkCTree(int ptr) { + OS.memmove(this, ptr); + } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCTreeRow.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCTreeRow.java index ce9e4d6b4f..73ccc86315 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCTreeRow.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCTreeRow.java @@ -13,7 +13,7 @@ package org.eclipse.swt.internal.gtk; * this distribution shall govern.
*/
-public class GtkCTreeRow extends GtkCListRow {
+public class GtkCTreeRow {
public int parent;
public int sibling;
public int children;
@@ -24,5 +24,10 @@ public class GtkCTreeRow extends GtkCListRow { public short level;
public int is_leaf; // bitfield: 1
public int expanded; // bitfield: 1
- public static final int sizeof = 80;
+
+
+ private GtkCTreeRow() {}
+ public GtkCTreeRow(int ptr) {
+ OS.memmove(this, ptr);
+ }
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCheckMenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCheckMenuItem.java deleted file mode 100644 index ce3c4db9b3..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCheckMenuItem.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GtkCheckMenuItem extends GtkMenuItem {
- public int active;
- public int always_show_toggle;
- public static final int sizeof = 88;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkColorSelectionDialog.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkColorSelectionDialog.java deleted file mode 100644 index b677e23d94..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkColorSelectionDialog.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GtkColorSelectionDialog extends GtkWindow {
- public int colorsel;
- public int main_vbox;
- public int ok_button;
- public int reset_button;
- public int cancel_button;
- public int help_button;
- public static final int sizeof = 120;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCombo.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCombo.java index 2b44b570d1..0389cf2480 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCombo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkCombo.java @@ -13,20 +13,12 @@ package org.eclipse.swt.internal.gtk; * this distribution shall govern. */ -public class GtkCombo extends GtkHBox { +public class GtkCombo { public int entry; - public int button; - public int popup; - public int popwin; public int list; - public int entry_change_id; - public int list_change_id; - public int value_in_list; // bitfield : 1 - public int ok_if_empty; // bitfield : 1 - public int case_sensitive; // bitfield : 1 - public int use_arrows; // bitfield : 1 - public int use_arrows_always; // bitfield : 1 - public short current_button; - public int activate_id; - public static final int sizeof = 104; + + private GtkCombo () {} + public GtkCombo (int ptr) { + OS.memmove(this, ptr); + } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkContainer.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkContainer.java deleted file mode 100644 index 52cb47acf2..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkContainer.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.eclipse.swt.internal.gtk; - -/* - * Copyright (c) IBM Corp. 2000, 2001. All rights reserved. - * - * The contents of this file are made available under the terms - * of the GNU Lesser General Public License (LGPL) Version 2.1 that - * accompanies this distribution (lgpl-v21.txt). The LGPL is also - * available at http://www.gnu.org/licenses/lgpl.html. If the version - * of the LGPL at http://www.gnu.org is different to the version of - * the LGPL accompanying this distribution and there is any conflict - * between the two license versions, the terms of the LGPL accompanying - * this distribution shall govern. - */ - -public class GtkContainer extends GtkWidget { - public int focus_child; - public int border_width; - public int need_resize; - public int resize_mode; - public int resize_widgets; - public static final int sizeof = 60; -} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkDialog.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkDialog.java deleted file mode 100644 index d4f2ddf603..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkDialog.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.eclipse.swt.internal.gtk; - -/* - * Copyright (c) IBM Corp. 2000, 2001. All rights reserved. - * - * The contents of this file are made available under the terms - * of the GNU Lesser General Public License (LGPL) Version 2.1 that - * accompanies this distribution (lgpl-v21.txt). The LGPL is also - * available at http://www.gnu.org/licenses/lgpl.html. If the version - * of the LGPL at http://www.gnu.org is different to the version of - * the LGPL accompanying this distribution and there is any conflict - * between the two license versions, the terms of the LGPL accompanying - * this distribution shall govern. - */ - -public class GtkDialog extends GtkWindow { - public int vbox; - public int action_area; - public static final int sizeof = 104; -} - diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkEditable.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkEditable.java index 8f2b772924..7ef967488f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkEditable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkEditable.java @@ -13,7 +13,7 @@ package org.eclipse.swt.internal.gtk; * this distribution shall govern. */ -public class GtkEditable extends GtkWidget { +public class GtkEditable { public int current_pos; public int selection_start_pos; public int selection_end_pos; @@ -23,5 +23,9 @@ public class GtkEditable extends GtkWidget { public int ic; public int ic_attr; public int clipboard_text; - public static final int sizeof = 76; + + private GtkEditable() {} + public GtkEditable(int ptr) { + OS.memmove(this, ptr); + } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFileSelection.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFileSelection.java deleted file mode 100644 index ebaf37d250..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFileSelection.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GtkFileSelection extends GtkWindow {
- public int dir_list;
- public int file_list;
- public int selection_entry;
- public int selection_text;
- public int main_vbox;
- public int ok_button;
- public int cancel_button;
- public int help_button;
- public int history_pulldown;
- public int history_menu;
- public int history_list;
- public int fileop_dialog;
- public int fileop_entry;
- public int fileop_file;
- public int cmpl_state;
- public int fileop_c_dir;
- public int fileop_del_file;
- public int fileop_ren_file;
- public int button_area;
- public int action_area;
- public static final int sizeof = 176;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFontSelectionDialog.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFontSelectionDialog.java deleted file mode 100644 index 09ee75981c..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFontSelectionDialog.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GtkFontSelectionDialog extends GtkWindow {
- public int fontsel;
- public int main_vbox;
- public int action_area;
- public int ok_button;
- public int apply_button;
- public int cancel_button;
- public int dialog_width;
- public int auto_resize;
- public static final int sizeof = 132;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFrame.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFrame.java deleted file mode 100644 index 0541461e5b..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkFrame.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.eclipse.swt.internal.gtk; - -/* - * Copyright (c) IBM Corp. 2000, 2001. All rights reserved. - * - * The contents of this file are made available under the terms - * of the GNU Lesser General Public License (LGPL) Version 2.1 that - * accompanies this distribution (lgpl-v21.txt). The LGPL is also - * available at http://www.gnu.org/licenses/lgpl.html. If the version - * of the LGPL at http://www.gnu.org is different to the version of - * the LGPL accompanying this distribution and there is any conflict - * between the two license versions, the terms of the LGPL accompanying - * this distribution shall govern. - */ - -public class GtkFrame extends GtkBin { - public int label; - public short shadow_type; - public short label_width; - public short label_height; - public float label_xalign; - public float label_yalign; - public static final int sizeof = 84; -} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkHBox.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkHBox.java deleted file mode 100644 index 656601480a..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkHBox.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GtkHBox extends GtkBox {
- public static final int sizeof = 68;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkItem.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkItem.java deleted file mode 100644 index 80db35e791..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkItem.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GtkItem extends GtkBin {
- public static final int sizeof = 64;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkMenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkMenuItem.java deleted file mode 100644 index ed4542029e..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkMenuItem.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.eclipse.swt.internal.gtk;
-
-/*
- * Copyright (c) IBM Corp. 2000, 2001. All rights reserved.
- *
- * The contents of this file are made available under the terms
- * of the GNU Lesser General Public License (LGPL) Version 2.1 that
- * accompanies this distribution (lgpl-v21.txt). The LGPL is also
- * available at http://www.gnu.org/licenses/lgpl.html. If the version
- * of the LGPL at http://www.gnu.org is different to the version of
- * the LGPL accompanying this distribution and there is any conflict
- * between the two license versions, the terms of the LGPL accompanying
- * this distribution shall govern.
- */
-
-public class GtkMenuItem extends GtkItem {
- public int submenu;
- public int accelerator_signal;
- public int toggle_size;
- public int accelerator_width;
- public int show_toggle_indicator;
- public int show_submenu_indicator;
- public int submenu_placement;
- public int submenu_direction;
- public int right_justify;
- public int timer;
- public static final int sizeof = 84;
-}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkObject.java deleted file mode 100644 index 226d4a7d0c..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkObject.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.eclipse.swt.internal.gtk; - -/* - * Copyright (c) IBM Corp. 2000, 2001. All rights reserved. - * - * The contents of this file are made available under the terms - * of the GNU Lesser General Public License (LGPL) Version 2.1 that - * accompanies this distribution (lgpl-v21.txt). The LGPL is also - * available at http://www.gnu.org/licenses/lgpl.html. If the version - * of the LGPL at http://www.gnu.org is different to the version of - * the LGPL accompanying this distribution and there is any conflict - * between the two license versions, the terms of the LGPL accompanying - * this distribution shall govern. - */ - -public class GtkObject { - public int klass; - public int flags; - public int ref_count; - public int object_data; - public static final int sizeof = 16; -} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkRequisition.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkRequisition.java index 0c12fe44f0..d9134d4369 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkRequisition.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkRequisition.java @@ -16,5 +16,6 @@ package org.eclipse.swt.internal.gtk; public class GtkRequisition {
public short width;
public short height;
- public static final int sizeof = 4;
+
+ public GtkRequisition() {}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkStyle.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkStyle.java index a07067261a..e92aad2bb1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkStyle.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkStyle.java @@ -14,7 +14,6 @@ package org.eclipse.swt.internal.gtk; */ public class GtkStyle { - public int klass; public int fg0_pixel; public short fg0_red, fg0_green, fg0_blue; public int fg1_pixel; @@ -85,11 +84,16 @@ public class GtkStyle { public short base3_red, base3_green, base3_blue; public int base4_pixel; public short base4_red, base4_green, base4_blue; + public int black_pixel; public short black_red, black_green, black_blue; public int white_pixel; public short white_red, white_green, white_blue; - public int font; + + public int font_desc; + + public int xthickness, ythickness; + public int fg_gc0, fg_gc1, fg_gc2, fg_gc3, fg_gc4; public int bg_gc0, bg_gc1, bg_gc2, bg_gc3, bg_gc4; public int light_gc0, light_gc1, light_gc2, light_gc3, light_gc4; @@ -100,13 +104,9 @@ public class GtkStyle { public int black_gc; public int white_gc; public int bg_pixmap0, bg_pixmap1, bg_pixmap2, bg_pixmap3, bg_pixmap4, bg_pixmap5; - public int ref_count; - public int attach_count; - public int depth; - public int colormap; - public int engine; - public int engine_data; - public int rc_style; - public int styles; - public static final int sizeof = 652; + + private GtkStyle() {} + public GtkStyle(int ptr) { + OS.memmove(this, ptr); + } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkStyleClass.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkStyleClass.java index a086ab46fd..445f494e8d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkStyleClass.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkStyleClass.java @@ -16,5 +16,9 @@ package org.eclipse.swt.internal.gtk; public class GtkStyleClass {
public int xthickness;
public int ythickness;
- public static final int sizeof = 8;
+
+ private GtkStyleClass() {}
+ public GtkStyleClass(int ptr) {
+ OS.memmove(this, ptr);
+ }
} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkText.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkText.java index fda4196346..005e7e62e9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkText.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkText.java @@ -13,7 +13,7 @@ package org.eclipse.swt.internal.gtk; * this distribution shall govern.
*/
-public class GtkText extends GtkEditable {
+public class GtkText {
public int first_line_start_index;
public int first_onscreen_hor_pixel;
public int first_onscreen_ver_pixel;
@@ -21,5 +21,9 @@ public class GtkText extends GtkEditable { public int cursor_pos_x;
public int cursor_pos_y;
public int cursor_virtual_x;
- public static final int sizeof = 244;
+
+ private GtkText() {}
+ public GtkText(int ptr) {
+// OS.memmove(this, ptr);
+ }
} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkWidget.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkWidget.java deleted file mode 100644 index 405fbeb6b2..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkWidget.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.eclipse.swt.internal.gtk; - -/* - * Copyright (c) IBM Corp. 2000, 2001. All rights reserved. - * - * The contents of this file are made available under the terms - * of the GNU Lesser General Public License (LGPL) Version 2.1 that - * accompanies this distribution (lgpl-v21.txt). The LGPL is also - * available at http://www.gnu.org/licenses/lgpl.html. If the version - * of the LGPL at http://www.gnu.org is different to the version of - * the LGPL accompanying this distribution and there is any conflict - * between the two license versions, the terms of the LGPL accompanying - * this distribution shall govern. - */ - -public class GtkWidget extends GtkObject { - public short private_flags; - public byte state; - public byte saved_state; - public int name; - public int style; - public short req_width; - public short req_height; - public short alloc_x; - public short alloc_y; - public short alloc_width; - public short alloc_height; - public int window; - public int parent; - public static final int sizeof = 48; -} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkWindow.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkWindow.java deleted file mode 100644 index 152dc729f1..0000000000 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GtkWindow.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.eclipse.swt.internal.gtk; - -/* - * Copyright (c) IBM Corp. 2000, 2001. All rights reserved. - * - * The contents of this file are made available under the terms - * of the GNU Lesser General Public License (LGPL) Version 2.1 that - * accompanies this distribution (lgpl-v21.txt). The LGPL is also - * available at http://www.gnu.org/licenses/lgpl.html. If the version - * of the LGPL at http://www.gnu.org is different to the version of - * the LGPL accompanying this distribution and there is any conflict - * between the two license versions, the terms of the LGPL accompanying - * this distribution shall govern. - */ - -public class GtkWindow extends GtkBin { - public int title; - public int wmclass_name; - public int wmclass_class; - public int type; - public int focus_widget; - public int default_widget; - public int transient_parent; - public short resize_count; - public int allow_shrink; - public int allow_grow; - public int auto_shrink; - public int handling_resize; - public int position; - public int use_uposition; - public int modal; - public static final int sizeof = 96; -} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java index 2433905716..2823c06148 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java @@ -208,11 +208,12 @@ public class OS { public static final int GTK_PROGRESS_RIGHT_TO_LEFT = 1; public static final int GTK_PROGRESS_BOTTOM_TO_TOP = 2; public static final int GTK_PROGRESS_TOP_TO_BOTTOM = 3; - public static final int GTK_TOOLBAR_CHILD_SPACE = 0; - public static final int GTK_TOOLBAR_CHILD_BUTTON = 1; - public static final int GTK_TOOLBAR_CHILD_TOGGLEBUTTON = 2; - public static final int GTK_TOOLBAR_CHILD_RADIOBUTTON = 3; - public static final int GTK_TOOLBAR_CHILD_WIDGET = 4; + +public static final native int GTK_TOOLBAR_CHILD_SPACE(); +public static final native int GTK_TOOLBAR_CHILD_BUTTON(); +public static final native int GTK_TOOLBAR_CHILD_TOGGLEBUTTON(); +public static final native int GTK_TOOLBAR_CHILD_RADIOBUTTON(); +public static final native int GTK_TOOLBAR_CHILD_WIDGET(); public static final int G_LOG_FLAG_RECURSION = 1 << 0; public static final int G_LOG_FLAG_FATAL = 1 << 1; @@ -223,15 +224,95 @@ public class OS { // public static final int G_LOG_LEVEL_INFO = 1 << 6; // public static final int G_LOG_LEVEL_DEBUG = 1 << 7; public static final int G_LOG_LEVEL_MASK = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL); - + + + + +/* + * Native methods. + */ + +/* GLIB */ + +public static final native void g_signal_connect (int handle, String eventName, int proc, int swtEvent); +public static final native void g_signal_connect_after (int handle, String eventName, int proc, int swtEvent); + + +/* + * Main loop + */ + +public static final native int gtk_set_locale(); +public static final native boolean gtk_init_check(int[] argc, int[] argv); + + + + +/* GtkWidget */ public static final native int GTK_WIDGET_FLAGS(int wid); public static final native void GTK_WIDGET_SET_FLAGS(int wid,int flag); public static final native void GTK_WIDGET_UNSET_FLAGS(int wid,int flag); +public static final native int GTK_WIDGET_WINDOW(int wid); +public static final native int GTK_WIDGET_PARENT(int wid); public static final native boolean GTK_WIDGET_NO_WINDOW(int wid); -public static final native void gdk_rgb_init(); public static final native boolean GTK_WIDGET_SENSITIVE(int wid); public static final native boolean GTK_WIDGET_IS_SENSITIVE(int wid); -public static final native void memmove(GtkStyleClass dest, int src, int size); +public static final native boolean GTK_WIDGET_TOPLEVEL(int wid); +public static final native boolean GTK_WIDGET_REALISED(int wid); +public static final native boolean GTK_WIDGET_MAPPED(int wid); +public static final native boolean GTK_WIDGET_VISIBLE(int wid); +public static final native boolean GTK_WIDGET_DRAWABLE(int wid); +public static final native boolean GTK_WIDGET_CAN_FOCUS(int wid); +public static final native boolean GTK_WIDGET_HAS_FOCUS(int wid); +public static final native boolean GTK_WIDGET_HAS_GRAB(int wid); + + +/* GtkWindow and Dialogs */ + +public static final native int GTK_FONT_SELECTION_DIALOG_OK_BUTTON(int handle); +public static final native int GTK_FONT_SELECTION_DIALOG_CANCEL_BUTTON(int handle); +public static final native int GTK_FILE_SELECTION_OK_BUTTON(int handle); +public static final native int GTK_FILE_SELECTION_CANCEL_BUTTON(int handle); +public static final native int GTK_COLOR_SELECTION_OK_BUTTON(int handle); +public static final native int GTK_COLOR_SELECTION_CANCEL_BUTTON(int handle); +public static final native int GTK_COLOR_SELECTION_HELP_BUTTON(int handle); +public static final native int GTK_COLOR_SELECTION_COLORSEL(int handle); +public static final native int GTK_DIALOG_ACTION_AREA(int handle); +public static final native int GTK_DIALOG_VBOX(int handle); +public static final native void gtk_window_get_position(int handle, int[] x, int[] y); +public static final native void gtk_window_get_size(int handle, int[] x, int[] y); +public static final native void gtk_window_move(int handle, int x, int y); +public static final native void gtk_window_resize(int handle, int x, int y); +public static final native void gtk_window_iconify(int handle); +public static final native void gtk_window_deiconify(int handle); +public static final native void gtk_window_maximize(int handle); +public static final native void gtk_window_unmaximize(int handle); + + + +/* Menus */ + +public static final native boolean gtk_check_menu_item_get_active(int wid); +public static final native void gtk_check_menu_item_set_active(int wid, boolean active); + +/* Containers */ + +public static final native int eclipse_fixed_new(); +public static final native void eclipse_fixed_get_location(int fixed, int child, int[] loc); +public static final native boolean eclipse_fixed_get_size(int fixed, int child, int[] sz); +public static final native void eclipse_fixed_set_location(int fixed, int child, int x, int y); +public static final native void eclipse_fixed_set_size(int fixed, int child, int width, int height); +public static final native void eclipse_fixed_move_above(int fixed, int child, int sibling); +public static final native void eclipse_fixed_move_below(int fixed, int child, int sibling); + + +/* GDK */ + +public static final native void gdk_rgb_init(); +public static final native int gdk_font_from_description(int desc); + + + public static final native void gtk_signal_handler_block_by_data(int object, int data); public static final native void gtk_signal_handler_unblock_by_data(int object, int data); public static final native int gtk_object_get_data_by_id(int object, int data_id); @@ -267,6 +348,8 @@ public static final native int gdk_cursor_new(int cursor_type); public static final native int gdk_bitmap_create_from_data(int window, byte[] data, int width, int height); public static final native int gdk_cursor_new_from_pixmap(int source, int mask, GdkColor fg, GdkColor bg, int x, int y); public static final native void gdk_cursor_destroy(int cursor); +public static final native int GDK_FONT_ASCENT(int font); +public static final native int GDK_FONT_DESCENT(int font); public static final native int gdk_font_load(byte[] font_name); public static final native int gdk_font_ref(int font); public static final native void gdk_font_unref(int font); @@ -297,12 +380,29 @@ public static final native boolean gdk_color_white(int colormap, GdkColor color) public static final native int gdk_image_get(int window, int x, int y, int width, int height); public static final native int gdk_image_get_pixel(int image, int x, int y); public static final native void gdk_gc_set_exposures(int gc, boolean exposures); + + +/* + * GdkEvents + */ public static final native int gdk_event_get_graphics_expose(int window); public static final native void gdk_event_free(int event); +public static final native int gdk_event_get_time(int event); +public static final native boolean gdk_event_get_state(int event, int[] pmod); +public static final native boolean gdk_event_get_coords(int event, double[] px, double[] py); +public static final native boolean gdk_event_get_root_coords(int event, double[] px, double[] py); +public static final native int gdk_event_key_get_keyval(int event); +public static final native int gdk_event_key_get_length(int event); +public static final native String gdk_event_key_get_string(int event); +public static final native int gdk_event_button_get_button(int event); + + + public static final native void gdk_flush(); public static final native void gdk_beep(); public static final native void gdk_color_free(GdkColor color); public static final native int GDK_ROOT_PARENT(); +public static final native int GDK_EVENT_TYPE(int event); public static final native void gdk_gc_set_stipple(int gc, int stipple); public static final native void gdk_gc_set_subwindow(int gc, int mode); public static final native void gdk_gc_set_fill(int gc, int fill); @@ -332,9 +432,10 @@ public static final native void gdk_window_clear_area_e(int window, int x, int y public static final native void gdk_window_resize(int window, int width, int height); public static final native void gdk_window_move (int window, int x, int y); public static final native int gdk_window_at_pointer(int[] win_x, int[] win_y); -public static final native int gdk_time_get(); +public static final native int GDK_CURRENT_TIME(); public static final native int gdk_screen_width_mm(); -public static final native void gdk_window_get_geometry(int window, int[] x, int[] y, int[] width, int[] height, int[] depth); +public static final native void gdk_drawable_get_size(int drawable, int[] width, int[] height); +public static final native int gdk_drawable_get_depth(int drawable); public static final native void gdk_window_raise(int window); public static final native void gdk_window_lower(int window); public static final native int gdk_window_get_origin(int window, int[] x, int[] y); @@ -370,7 +471,6 @@ public static final native void gtk_clist_freeze(int clist); public static final native void gtk_clist_get_pixtext(int clist, int row, int column, int[] text, int[] spacing, int[] pixmap, int[] mask); public static final native void gtk_check_menu_item_set_show_toggle(int menu_item, boolean always); public static final native void gtk_clist_column_titles_passive(int clist); -public static final native void gtk_check_menu_item_set_active(int check_menu_item, boolean is_active); public static final native int gtk_clist_insert(int clist, int row, int[] text); public static final native int gtk_clist_new(int columns); public static final native void gtk_clist_set_selection_mode(int clist, int mode); @@ -424,9 +524,7 @@ public static final native int gtk_dialog_new(); public static final native int gtk_event_box_new(); public static final native int gtk_editable_get_position(int editable); public static final native void gtk_editable_set_position(int editable, int position); -public static final native int gtk_fixed_new(); public static final native void gtk_entry_set_editable(int entry, boolean editable); -public static final native void gtk_fixed_put(int fixed, int widget, short x, short y); public static final native int gtk_entry_get_text(int entry); public static final native void gtk_entry_set_text(int entry, byte[] text); public static final native void gtk_editable_select_region(int editable, int start, int end); @@ -442,18 +540,18 @@ public static final native int gtk_font_selection_dialog_get_font_name(int fsd); public static final native int gtk_font_selection_dialog_new(byte[] title); public static final native boolean gtk_font_selection_dialog_set_font_name(int fsd, byte[] fontname); public static final native void gtk_editable_set_editable(int editable, boolean is_editable); -public static final native boolean gtk_font_selection_set_font_name(int fontsel, byte[] fontname); public static final native int gtk_entry_new(); public static final native void gtk_entry_append_text(int entry, byte[] text); public static final native void gtk_editable_delete_selection(int editable); public static final native int gtk_editable_get_chars(int editable, int start_pos, int end_pos); public static final native void gtk_entry_set_visibility(int entry, boolean visible); public static final native void gtk_entry_set_max_length(int entry, short max); -public static final native void gtk_fixed_move(int fixed, int widget, short x, short y); -public static final native boolean gtk_init_check(int[] argc, int[] argv); +/* frame */ public static final native int gtk_frame_new(byte[] label); public static final native void gtk_frame_set_shadow_type(int frame, int type); public static final native void gtk_frame_set_label(int frame, byte[] label); +public static final native void swt_frame_get_trim(int handle, int[] trims); + public static final native int gtk_hseparator_new(); public static final native int gtk_hbox_new(boolean homogeneous, int spacing); public static final native void gtk_grab_add(int widget); @@ -462,7 +560,7 @@ public static final native void gtk_grab_remove(int widget); public static final native int gtk_hscale_new(int adjustment); public static final native int gtk_hscrollbar_new(int adjustment); public static final native void gtk_label_set_justify(int label, int jtype); -public static final native int gtk_label_new(byte[] str); +public static final native int gtk_label_new(String label); public static final native void gtk_label_set_pattern(int label, byte[] pattern); public static final native void gtk_main_quit(); public static final native void gtk_main(); @@ -493,6 +591,7 @@ public static final native void gtk_notebook_set_page(int notebook, int page_num public static final native void gtk_object_set_user_data(int object, int data); public static final native int gtk_object_get_user_data(int object); public static final native int gtk_pixmap_new(int pixmap, int mask); +public static final native double gtk_adjustment_get_value(int adj); public static final native int gtk_progress_bar_new(); public static final native void gtk_progress_bar_set_orientation(int pbar, int orientation); public static final native void gtk_progress_bar_set_bar_style(int pbar, int style); @@ -526,7 +625,7 @@ public static final native void gtk_timeout_remove(int timeout_handler_id); public static final native int gtk_text_new(int hadj, int vadj); public static final native void gtk_text_set_word_wrap(int text, int word_wrap); public static final native int gtk_text_get_length(int text); -public static final native int gtk_toolbar_new(int orientation, int style); +public static final native int gtk_toolbar_new(); public static final native void gtk_toolbar_set_button_relief(int toolbar, int relief); public static final native void gtk_toolbar_insert_widget(int toolbar, int widget, byte[] tooltip_text, byte[] tooltip_private_text, int position); public static final native void gtk_toolbar_set_orientation(int toolbar, int orientation); @@ -565,99 +664,107 @@ public static final native void gtk_widget_queue_draw(int widget); public static final native void gtk_widget_set_style(int widget, int style); public static final native void gtk_widget_set_sensitive(int widget, boolean sensitive); public static final native void gtk_widget_set_state(int widget, int state); -public static final native int gtk_window_new(int type); public static final native void gtk_widget_size_request(int widget, GtkRequisition requisition); public static final native void gtk_widget_set_uposition(int widget, int x, int y); public static final native void gtk_widget_set_usize(int widget, int width, int height); public static final native void gtk_widget_remove_accelerator(int widget, int accel_group, int accel_key, int accel_mods); public static final native void gtk_widget_set_parent(int widget, int parent); -public static final native void gtk_window_add_accel_group(int window, int accel_group); +public static final native void gtk_widget_modify_font(int widget, int pango_font_descr); +public static final native void gtk_widget_reparent(int widget, int new_parent); +public static final native void gtk_widget_size_allocate(int widget, GtkAllocation allocation); + + +/* gtk_window_* */ +public static final native int gtk_window_new(int type); +public static final native void gtk_window_set_title(int window, byte[] title); public static final native void gtk_window_set_policy(int window, int allow_shrink, int allow_grow, int auto_shrink); +public static final native void gtk_window_set_resizable(int window, boolean resizable); +public static final native int gtk_window_get_focus(int window); + + public static final native void gtk_window_set_modal(int window, boolean modal); -public static final native void gtk_window_set_title(int window, byte[] title); +public static final native void gtk_window_add_accel_group(int window, int accel_group); public static final native void gtk_window_set_transient_for(int window, int parent); -public static final native void gtk_widget_reparent(int widget, int new_parent); -public static final native void gtk_widget_size_allocate(int widget, GtkAllocation allocation); + + + +/* Pango */ +public static final native int PANGO_WEIGHT_NORMAL(); +public static final native int PANGO_WEIGHT_BOLD(); +public static final native int PANGO_STYLE_NORMAL(); +public static final native int PANGO_STYLE_ITALIC(); +public static final native int PANGO_STYLE_OBLIQUE(); +public static final native int PANGO_SCALE(); +public static final native int PANGO_STRETCH_NORMAL(); + +public static final native int PANGO_PIXELS(int dimension); + +public static final native int pango_context_new(); +public static final native int pango_context_get_font_description(int context); +public static final native void pango_context_set_font_description(int context, int descr); +public static final native int pango_context_get_metrics(int context, int desc, String language); + + +public static final native int pango_font_description_new(); +public static final native int pango_font_description_from_string(String str); +public static final native String pango_font_description_to_string(int desc); +public static final native boolean pango_font_description_equal(int desc1, int desc2); +public static final native void pango_font_description_free(int desc); +public static final native String pango_font_description_get_family(int desc); +public static final native void pango_font_description_set_family(int desc, String style); +public static final native int pango_font_description_get_size(int desc); +public static final native void pango_font_description_set_size(int desc, int size); +public static final native void pango_font_description_set_stretch(int desc, int stretch); +public static final native int pango_font_description_get_style(int desc); +public static final native void pango_font_description_set_style(int desc, int weight); +public static final native int pango_font_description_get_weight(int desc); +public static final native void pango_font_description_set_weight(int desc, int weight); + +public static final native int pango_font_metrics_get_ascent(int metrics); +public static final native int pango_font_metrics_get_descent(int metrics); +public static final native int pango_font_metrics_get_approximate_char_width(int metrics); + + + + + + +/* Other */ + public static final native int XListFonts(byte[] pattern, int maxFonts, int[] pnum_fonts); -public static final native void memmove(int[] dest, int src, int size); public static final native int strlen (int str); -/* NEW MEMMOVES - doesn't work because of inheritance of natives */ + + +/* Primitive memmoves */ +public static final native void memmove(int[] dest, int src, int size); public static final native void memmove(byte[] dest, int src, int size); -public static final native void memmove(int dest, GtkStyle src, int size); -public static final native void memmove(GdkFont dest, int src, int size); -public static final native void memmove(GtkStyle dest, int src, int size); public static final native void memmove(int[] dest, byte[] src, int size); public static final native void memmove(int dest, byte[] src, int size); -public static final native void memmove(GdkColor dest, int src, int size); -public static final native void memmove(GdkEventButton dest, int src, int size); -public static final native void memmove(GdkEventExpose dest, int src, int size); -public static final native void memmove(GdkEventKey dest, int src, int size); -public static final native void memmove(GdkEventMotion dest, int src, int size); public static final native void memmove(int dest, int[] src, int size); -public static final native void memmove(GdkVisual dest, int src, int size); -public static final native void memmove(GtkAdjustment dest, int src, int size); -public static final native void memmove(GtkBin dest, int src, int size); -public static final native void memmove(GtkCList dest, int src, int size); -public static final native void memmove(GtkCombo dest, int src, int size); -public static final native void memmove(GtkContainer dest, int src, int size); -public static final native void memmove(GtkCTreeRow dest, int src, int size); -public static final native void memmove(GtkEditable dest, int src, int size); -public static final native void memmove(GtkDialog dest, int src, int size); -public static final native void memmove(GtkObject dest, int src, int size); -public static final native void memmove(GtkWidget dest, int src, int size); -public static final native void memmove(int dest, GtkAdjustment src, int size); -public static final native void memmove(int dest, GtkBin src, int size); -public static final native void memmove(int dest, GtkCListColumn src, int size); -public static final native void memmove(GtkCListRow dest, int src, int size); -public static final native void memmove(GtkCListColumn dest, int src, int size); + + +/* Read memmoves */ +static final native void memmove(GdkVisual dest, int src); +static final native void memmove(GdkFont dest, int src); +static final native void memmove(GdkColor dest, int src); +static final native void memmove(GdkEventExpose dest, int src); +static final native void memmove(GtkAdjustment dest, int src); +static final native void memmove(GtkCombo dest, int src); +static final native void memmove(GtkEditable dest, int src); +static final native void memmove(GtkStyle dest, int src); +static final native void memmove(GtkStyleClass dest, int src); +static final native void memmove(GtkCListRow dest, int src); +static final native void memmove(GtkCListColumn dest, int src); +static final native void memmove(GtkCList dest, int src); +static final native void memmove(GtkCTreeRow dest, int src); +static final native void memmove(GtkCTree dest, int src); + +/* Write memmoves */ public static final native void memmove(int dest, GtkEditable src, int size); public static final native void memmove(int dest, GtkText src, int size); -public static final native void memmove(int dest, GtkObject src, int size); - -/* OLD MEMMOVES - these need to be pruned */ -public static final native void memmove(int dest, GdkColor src, int size); -public static final native void memmove(int dest, GdkEventButton src, int size); -public static final native void memmove(int dest, GdkEventExpose src, int size); -public static final native void memmove(int dest, GdkEventKey src, int size); -public static final native void memmove(int dest, GdkEventMotion src, int size); -public static final native void memmove(int dest, GdkGCValues src, int size); -public static final native void memmove(int dest, GdkRectangle src, int size); -public static final native void memmove(int dest, GdkVisual src, int size); -public static final native void memmove(int dest, GtkAllocation src, int size); -//public static final native void memmove(int dest, GtkArg src, int size); -public static final native void memmove(int dest, GtkBox src, int size); -public static final native void memmove(int dest, GtkCList src, int size); -public static final native void memmove(int dest, GtkCListRow src, int size); -public static final native void memmove(int dest, GtkCTreeRow src, int size); -public static final native void memmove(int dest, GtkCheckMenuItem src, int size); -public static final native void memmove(int dest, GtkColorSelectionDialog src, int size); -public static final native void memmove(int dest, GtkCombo src, int size); -public static final native void memmove(int dest, GtkContainer src, int size); -//public static final native void memmove(int dest, GtkData src, int size); -public static final native void memmove(int dest, GtkFileSelection src, int size); -public static final native void memmove(int dest, GtkFontSelectionDialog src, int size); -public static final native void memmove(int dest, GtkHBox src, int size); -public static final native void memmove(int dest, GtkMenuItem src, int size); -public static final native void memmove(int dest, GtkRequisition src, int size); -public static final native void memmove(int dest, GtkWidget src, int size); -public static final native void memmove(int dest, GtkWindow src, int size); -public static final native void memmove(int dest, GtkCTree src, int size); -public static final native void memmove(GdkGCValues dest, int src, int size); -public static final native void memmove(GdkRectangle dest, int src, int size); -public static final native void memmove(GtkAllocation dest, int src, int size); -//public static final native void memmove(GtkArg dest, int src, int size); -public static final native void memmove(GtkBox dest, int src, int size); -public static final native void memmove(GtkCheckMenuItem dest, int src, int size); -public static final native void memmove(GtkColorSelectionDialog dest, int src, int size); -//public static final native void memmove(GtkData dest, int src, int size); -public static final native void memmove(GtkFrame dest, int src, int size); -public static final native void memmove(GtkFileSelection dest, int src, int size); -public static final native void memmove(GtkFontSelectionDialog dest, int src, int size); -public static final native void memmove(GtkHBox dest, int src, int size); -public static final native void memmove(GtkMenuItem dest, int src, int size); -public static final native void memmove(GtkRequisition dest, int src, int size); -public static final native void memmove(GtkText dest, int src, int size); -public static final native void memmove(GtkWindow dest, int src, int size); -public static final native void memmove(GtkCTree dest, int src, int size); +public static final native void memmove(int dest, GtkStyle src, int size); +public static final native void memmove(int dest, GtkAdjustment src); // sure needed +public static final native void memmove(int dest, GtkCListColumn src, int size); + } |