From: Mark Wielaard Date: Wed, 21 Apr 2004 06:52:26 +0000 (+0000) Subject: gnu_java_awt_peer_gtk_GtkCheckboxPeer.c: Changed C++ comments into C comments. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2635995aca3d2b67d9544622a371e91ea30b369b;p=gcc.git gnu_java_awt_peer_gtk_GtkCheckboxPeer.c: Changed C++ comments into C comments. 2004-04-21 Mark Wielaard * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c: Changed C++ comments into C comments. Removed commented out code. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c: Likewise. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c: Likewise. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c: Likewise. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c: Likewise. * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c: Likewise. * native/jni/gtk-peer/gthread-jni.c: Likewise. From-SVN: r80946 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index cf7cf4e2206..24f315164ab 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,20 @@ +2004-04-21 Mark Wielaard + + * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c: + Changed C++ comments into C comments. Removed commented out code. + * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c: + Likewise. + * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c: + Likewise. + * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c: + Likewise. + * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c: + Likewise. + * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c: + Likewise. + * native/jni/gtk-peer/gthread-jni.c: + Likewise. + 2004-04-21 Mark Wielaard * javax/awt/JFrame.java: Implement WindowConstants. Remove final diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c index b0582cbe57b..88821ae9a48 100644 --- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCheckboxPeer.c @@ -1,5 +1,5 @@ /* gtkcheckboxpeer.c -- Native implementation of GtkCheckboxPeer - Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -230,7 +230,6 @@ Java_gnu_java_awt_peer_gtk_GtkCheckboxPeer_gtkSetLabel static void item_toggled (GtkToggleButton *item, jobject peer) { - //g_print ("toggled\n"); (*gdk_env)->CallVoidMethod (gdk_env, peer, postItemEventID, peer, diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c index 62866d5d5bd..99cd841386e 100644 --- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c @@ -1,5 +1,5 @@ /* gtkcomponentpeer.c -- Native implementation of GtkComponentPeer - Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -610,10 +610,12 @@ Java_gnu_java_awt_peer_gtk_GtkComponentPeer_set__Ljava_lang_String_2Ljava_lang_O gboolean filter_expose_event_handler (GtkWidget *widget, GdkEvent *event, jobject peer) { - // Prevent the default event handler from getting this signal if applicable - // FIXME: I came up with these filters by looking for patterns in the unwanted - // expose events that are fed back to us from gtk/X. Perhaps there is - // a way to prevent them from occuring in the first place. + /* + * Prevent the default event handler from getting this signal if applicable + * FIXME: I came up with these filters by looking for patterns in the unwanted + * expose events that are fed back to us from gtk/X. Perhaps there is + * a way to prevent them from occuring in the first place. + */ if (event->type == GDK_EXPOSE && (!GTK_IS_LAYOUT(widget) || event->any.window != widget->window)) { @@ -622,8 +624,8 @@ filter_expose_event_handler (GtkWidget *widget, GdkEvent *event, jobject peer) } else { - // There may be non-expose events that are triggered while we're - // painting a heavyweight peer. + /* There may be non-expose events that are triggered while we're + painting a heavyweight peer. */ return pre_event_handler(widget, event, peer); } } @@ -641,8 +643,8 @@ JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_addExposeFilt gdk_threads_enter (); - // GtkFramePeer is built as a GtkLayout inside a GtkVBox inside a GtkWindow. - // Events go to the GtkLayout layer, so we filter them there. + /* GtkFramePeer is built as a GtkLayout inside a GtkVBox inside a GtkWindow. + Events go to the GtkLayout layer, so we filter them there. */ if (GTK_IS_WINDOW(ptr)) { children = gtk_container_get_children(GTK_CONTAINER(ptr)); @@ -685,8 +687,8 @@ JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkComponentPeer_removeExposeF gdk_threads_enter (); - // GtkFramePeer is built as a GtkLayout inside a GtkVBox inside a GtkWindow. - // Events go to the GtkLayout layer, so we filter them there. + /* GtkFramePeer is built as a GtkLayout inside a GtkVBox inside a GtkWindow. + Events go to the GtkLayout layer, so we filter them there. */ if (GTK_IS_WINDOW(ptr)) { children = gtk_container_get_children(GTK_CONTAINER(ptr)); diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c index 95f73011186..efee7c8f1a2 100644 --- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c @@ -1,5 +1,5 @@ /* gtkevents.c -- GDK/GTK event handlers - Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -934,9 +934,9 @@ pre_event_handler (GtkWidget *widget, GdkEvent *event, jobject peer) click_count, JNI_FALSE); - // Generate an AWT click event only if the release occured in the - // window it was pressed in, and the mouse has not been dragged since - // the last time it was pressed. + /* Generate an AWT click event only if the release occured in the + window it was pressed in, and the mouse has not been dragged since + the last time it was pressed. */ gdk_window_get_size (event->any.window, &width, &height); if (! hasBeenDragged && event->button.x >= 0 @@ -1038,11 +1038,11 @@ pre_event_handler (GtkWidget *widget, GdkEvent *event, jobject peer) break; case GDK_EXPOSE: { - // This filters out unwanted feedback expose events from gtk/X - // when we explictly invalidate and update heavyweight components, - // thus avoiding an infinite loop. - // FIXME: I'm not quite sure why we're getting these expose events. - // Maybe there is a way to avoid them? + /* This filters out unwanted feedback expose events from gtk/X + when we explictly invalidate and update heavyweight components, + thus avoiding an infinite loop. + FIXME: I'm not quite sure why we're getting these expose events. + Maybe there is a way to avoid them? */ if((event->any.window == widget->window && event->any.send_event) || GTK_IS_LAYOUT(widget)) { @@ -1181,7 +1181,6 @@ attach_jobject (GdkWindow *window, jobject *obj) | GDK_KEY_PRESS_MASK | GDK_FOCUS_CHANGE_MASK); - // g_print("storing obj %p property on window %p\n", obj, window); gdk_property_change (window, addr_atom, type_atom, @@ -1196,10 +1195,8 @@ connect_awt_hook (JNIEnv *env, jobject peer_obj, int nwindows, ...) { va_list ap; jobject *obj; - //void *ptr = NSA_GET_PTR (env, peer_obj); obj = NSA_GET_GLOBAL_REF (env, peer_obj); - //g_print("Connection obj %s\n", gtk_widget_get_name (GTK_WIDGET (ptr))); g_assert (obj); va_start (ap, nwindows); diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c index 9b9a3dd931a..92e2de33205 100644 --- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFileDialogPeer.c @@ -1,5 +1,5 @@ /* gtkfiledialogpeer.c -- Native implementation of GtkFileDialogPeer - Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2002, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -156,7 +156,7 @@ window_closed (GtkDialog *dialog __attribute__((unused)), static jmethodID disposeID; void *ptr; - // We only need this for the case when the user closed the window + /* We only need this for the case when the user closed the window. */ if (responseId != GTK_RESPONSE_DELETE_EVENT) return; diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c index ac6f389f8d8..87ecafce991 100644 --- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkListPeer.c @@ -1,5 +1,5 @@ /* gtklistpeer.c -- Native implementation of GtkListPeer - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -324,7 +324,6 @@ item_select (GtkCList *list __attribute__((unused)), GdkEventButton *event __attribute__((unused)), jobject peer_obj) { - //g_print ("select_row\n"); (*gdk_env)->CallVoidMethod (gdk_env, peer_obj, postListItemEventID, row, @@ -338,7 +337,6 @@ item_unselect (GtkCList *list __attribute__((unused)), GdkEventButton *event __attribute__((unused)), jobject peer_obj) { - //g_print ("unselect_row\n"); (*gdk_env)->CallVoidMethod (gdk_env, peer_obj, postListItemEventID, row, diff --git a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c index 2ec87f012ea..0d7d55562c5 100644 --- a/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c +++ b/libjava/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextComponentPeer.c @@ -1,5 +1,5 @@ /* gtktextcomponentpeer.c -- Native implementation of GtkTextComponentPeer - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -112,8 +112,8 @@ Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getCaretPosition { void *ptr; int pos = 0; - GtkEditable *editable; // type of GtkEntry (TextField) - GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkEditable *editable; /* type of GtkEntry (TextField) */ + GtkWidget *text = NULL; /* type of GtkTextView (TextArea) */ GtkTextBuffer *buf; GtkTextMark *mark; GtkTextIter iter; @@ -157,8 +157,8 @@ Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_setCaretPosition (JNIEnv *env, jobject obj, jint pos) { void *ptr; - GtkEditable *editable; // type of GtkEntry (TextField) - GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkEditable *editable; /* type of GtkEntry (TextField) */ + GtkWidget *text = NULL; /* type of GtkTextView (TextArea) */ GtkTextBuffer *buf; GtkTextIter iter; @@ -198,8 +198,8 @@ Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getSelectionStart { void *ptr; int pos = 0; - GtkEditable *editable; // type of GtkEntry (TextField) - GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkEditable *editable; /* type of GtkEntry (TextField) */ + GtkWidget *text = NULL; /* type of GtkTextView (TextArea) */ GtkTextBuffer *buf; GtkTextIter start; GtkTextIter end; @@ -255,8 +255,8 @@ Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getSelectionEnd { void *ptr; int pos = 0; - GtkEditable *editable; // type of GtkEntry (TextField) - GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkEditable *editable; /* type of GtkEntry (TextField) */ + GtkWidget *text = NULL; /* type of GtkTextView (TextArea) */ GtkTextBuffer *buf; GtkTextIter start; GtkTextIter end; @@ -311,8 +311,8 @@ Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_select (JNIEnv *env, jobject obj, jint start, jint end) { void *ptr; - GtkEditable *editable; // type of GtkEntry (TextField) - GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkEditable *editable; /* type of GtkEntry (TextField) */ + GtkWidget *text = NULL; /* type of GtkTextView (TextArea) */ GtkTextBuffer *buf; GtkTextIter iter; @@ -357,8 +357,8 @@ Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_setEditable (JNIEnv *env, jobject obj, jboolean state) { void *ptr; - GtkEditable *editable; // type of GtkEntry (TextField) - GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkEditable *editable; /* type of GtkEntry (TextField) */ + GtkWidget *text = NULL; /* type of GtkTextView (TextArea) */ ptr = NSA_GET_PTR (env, obj); @@ -396,8 +396,8 @@ Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_getText void *ptr; char *contents = NULL; jstring jcontents; - GtkEditable *editable; // type of GtkEntry (TextField) - GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkEditable *editable; /* type of GtkEntry (TextField) */ + GtkWidget *text = NULL; /* type of GtkTextView (TextArea) */ GtkTextBuffer *buf; GtkTextIter start, end; @@ -444,7 +444,7 @@ Java_gnu_java_awt_peer_gtk_GtkTextComponentPeer_setText { void *ptr; const char *str; - GtkWidget *text = NULL; // type of GtkTextView (TextArea) + GtkWidget *text = NULL; /* type of GtkTextView (TextArea) */ GtkTextBuffer *buf; ptr = NSA_GET_PTR (env, obj); diff --git a/libjava/jni/gtk-peer/gthread-jni.c b/libjava/jni/gtk-peer/gthread-jni.c index a762b4e56ed..cd37fe105af 100644 --- a/libjava/jni/gtk-peer/gthread-jni.c +++ b/libjava/jni/gtk-peer/gthread-jni.c @@ -1,5 +1,5 @@ /* gthread-jni.c -- JNI threading routines for GLIB - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -204,7 +204,7 @@ static void g_mutex_lock_jni_impl (GMutex *mutex __attribute__((unused))) { static gboolean g_mutex_trylock_jni_impl (GMutex *mutex __attribute__((unused))) { - // Shall we implement this in a JikesRVM-specific way under a flag? + /* XXX Shall we implement this in a VM-specific way under a flag? */ return FALSE; }