Imported GNU Classpath 0.90
Imported GNU Classpath 0.90 * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore. * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant. * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5. * java/lang/Math.java: New override file. * java/lang/Character.java: Merged from Classpath. (start, end): Now 'int's. (canonicalName): New field. (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants. (UnicodeBlock): Added argument. (of): New overload. (forName): New method. Updated unicode blocks. (sets): Updated. * sources.am: Regenerated. * Makefile.in: Likewise. From-SVN: r111942
This commit is contained in:
parent
27079765d0
commit
8aa540d2f7
1367 changed files with 188789 additions and 22762 deletions
|
@ -1,5 +1,5 @@
|
|||
/* GtkGenericPeer.java - Has a hashcode. Yuck.
|
||||
Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998, 1999, 2002, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
|
@ -39,23 +39,28 @@ exception statement from your version. */
|
|||
package gnu.java.awt.peer.gtk;
|
||||
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.Font;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
public class GtkGenericPeer
|
||||
{
|
||||
// Used by Native State Association (NSA) functions to map
|
||||
// gtk_widget to peer object.
|
||||
final int native_state = getUniqueInteger ();
|
||||
|
||||
// Next native state value we will assign.
|
||||
private static int next_native_state = 0;
|
||||
|
||||
// The widget or other java-side object we wrap.
|
||||
protected Object awtWidget;
|
||||
protected final Object awtWidget;
|
||||
|
||||
// Global event queue.
|
||||
protected static EventQueue q = null;
|
||||
|
||||
// Dispose of our native state.
|
||||
/**
|
||||
* Dispose of our native state. Calls gtk_widget_destroy on the
|
||||
* native widget and removes the awtWidget from the native state
|
||||
* tables. Should be overridden by subclasses if this is not (all)
|
||||
* that needs to be done.
|
||||
*/
|
||||
public native void dispose ();
|
||||
|
||||
static EventQueue q ()
|
||||
|
@ -68,12 +73,6 @@ public class GtkGenericPeer
|
|||
this.awtWidget = awtWidget;
|
||||
}
|
||||
|
||||
public static void enableQueue (EventQueue sq)
|
||||
{
|
||||
if (q == null)
|
||||
q = sq;
|
||||
}
|
||||
|
||||
protected void postActionEvent (String command, int mods)
|
||||
{
|
||||
q().postEvent (new ActionEvent (awtWidget, ActionEvent.ACTION_PERFORMED,
|
||||
|
@ -88,8 +87,20 @@ public class GtkGenericPeer
|
|||
// Let's assume this will never wrap.
|
||||
return next_native_state++;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to set Font for Gtk Widget.
|
||||
*/
|
||||
protected void gtkWidgetModifyFont(Font f)
|
||||
{
|
||||
gtkWidgetModifyFont(f.getName(), f.getStyle(), f.getSize());
|
||||
}
|
||||
|
||||
native void gtkWidgetModifyFont (String name, int style, int size);
|
||||
/**
|
||||
* Sets font for this Gtk Widget. Should be overridden by peers which
|
||||
* are composed of different widgets or are contained in bins.
|
||||
*/
|
||||
protected native void gtkWidgetModifyFont(String name, int style, int size);
|
||||
|
||||
static void printCurrentThread ()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue