Mercurial > projects > dwt-linux
changeset 113:1401263f71b0
renamed setCursor(Gtk..) to gtk_setCursor, so the public interface do not need a cast for passing null
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 19 Jan 2008 12:21:23 +0100 |
parents | 126d7fddf14f |
children | 3476fddbb4c8 |
files | dwt/custom/BusyIndicator.d dwt/custom/CBanner.d dwt/widgets/Control.d dwt/widgets/Link.d dwt/widgets/Sash.d dwt/widgets/Shell.d dwt/widgets/Spinner.d dwt/widgets/Text.d |
diffstat | 8 files changed, 21 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/dwt/custom/BusyIndicator.d Fri Jan 18 23:54:18 2008 +0100 +++ b/dwt/custom/BusyIndicator.d Sat Jan 19 12:21:23 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -76,7 +76,7 @@ for (int i = 0; i < shells.length; i++) { Integer id = cast(Integer)shells[i].getData(BUSYID_NAME); if ( id !is null && id == busyId) { - shells[i].setCursor(cast(Cursor)null); + shells[i].setCursor(null); shells[i].setData(BUSYID_NAME, null); } }
--- a/dwt/custom/CBanner.d Fri Jan 18 23:54:18 2008 +0100 +++ b/dwt/custom/CBanner.d Sat Jan 19 12:21:23 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -273,7 +273,7 @@ } } void onMouseExit() { - if (!dragging) setCursor(cast(Cursor)null); + if (!dragging) setCursor(null); } void onMouseMove(int x, int y) { if (dragging) { @@ -292,7 +292,7 @@ if (curveRect.contains(x, y)) { setCursor(resizeCursor); } else { - setCursor(cast(Cursor)null); + setCursor(null); } } void onMouseUp () {
--- a/dwt/widgets/Control.d Fri Jan 18 23:54:18 2008 +0100 +++ b/dwt/widgets/Control.d Sat Jan 19 12:21:23 2008 +0100 @@ -3294,10 +3294,10 @@ checkWidget(); if (cursor !is null && cursor.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT); this.cursor = cursor; - setCursor (cursor !is null ? cursor.handle : null); + gtk_setCursor (cursor !is null ? cursor.handle : null); } -void setCursor (GdkCursor* cursor) { +void gtk_setCursor (GdkCursor* cursor) { auto window = eventWindow (); if (window !is null) { OS.gdk_window_set_cursor (window, cursor);
--- a/dwt/widgets/Link.d Fri Jan 18 23:54:18 2008 +0100 +++ b/dwt/widgets/Link.d Sat Jan 19 12:21:23 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -473,7 +473,7 @@ } } } - setCursor ( cast(Cursor)null); + setCursor (null); } return result; }
--- a/dwt/widgets/Sash.d Fri Jan 18 23:54:18 2008 +0100 +++ b/dwt/widgets/Sash.d Sat Jan 19 12:21:23 2008 +0100 @@ -1,4 +1,4 @@ -/******************************************************************************* +/******************************************************************************* * Copyright (c) 2000, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -380,7 +380,7 @@ } override int gtk_realize (GtkWidget* widget) { - setCursor (cursor !is null ? cursor.handle : null); + gtk_setCursor (cursor !is null ? cursor.handle : null); return super.gtk_realize (widget); } @@ -420,8 +420,8 @@ eventTable.unhook (DWT.DefaultSelection,listener); } -void setCursor (GdkCursor* cursor) { - super.setCursor (cursor !is null ? cursor : cast(GdkCursor*)defaultCursor); +void gtk_setCursor (GdkCursor* cursor) { + super.gtk_setCursor (cursor !is null ? cursor : cast(GdkCursor*)defaultCursor); } int traversalCode (int key, GdkEventKey event) {
--- a/dwt/widgets/Shell.d Fri Jan 18 23:54:18 2008 +0100 +++ b/dwt/widgets/Shell.d Sat Jan 19 12:21:23 2008 +0100 @@ -1245,8 +1245,7 @@ return result; } -alias Decorations.setCursor setCursor; -void setCursor (GdkCursor* cursor) { +void gtk_setCursor (GdkCursor* cursor) { if (enableWindow !is null) { OS.gdk_window_set_cursor (cast(GdkDrawable*)enableWindow, cursor); if (!OS.GDK_WINDOWING_X11 ()) { @@ -1256,7 +1255,7 @@ OS.XFlush (xDisplay); } } - super.setCursor (cursor); + super.gtk_setCursor (cursor); } public void setEnabled (bool enabled) {
--- a/dwt/widgets/Spinner.d Fri Jan 18 23:54:18 2008 +0100 +++ b/dwt/widgets/Spinner.d Sat Jan 19 12:21:23 2008 +0100 @@ -582,7 +582,7 @@ } override int /*long*/ gtk_event_after (GtkWidget* widget, GdkEvent* gdkEvent) { - if (cursor !is null) setCursor (cursor.handle); + if (cursor !is null) gtk_setCursor (cursor.handle); return super.gtk_event_after (widget, gdkEvent); } @@ -776,10 +776,10 @@ OS.gtk_widget_modify_base (handle, 0, color); } -void setCursor (GdkCursor* cursor) { +override void gtk_setCursor (GdkCursor* cursor) { GdkCursor* defaultCursor; if (cursor is null) defaultCursor = OS.gdk_cursor_new (OS.GDK_XTERM); - super.setCursor (cursor !is null ? cursor : defaultCursor); + super.gtk_setCursor (cursor !is null ? cursor : defaultCursor); if (cursor is null) OS.gdk_cursor_destroy (defaultCursor); }
--- a/dwt/widgets/Text.d Fri Jan 18 23:54:18 2008 +0100 +++ b/dwt/widgets/Text.d Sat Jan 19 12:21:23 2008 +0100 @@ -1217,7 +1217,7 @@ } override int /*long*/ gtk_event_after (GtkWidget* widget, GdkEvent* event) { - if (cursor !is null) setCursor (cursor.handle); + if (cursor !is null) gtk_setCursor (cursor.handle); /* * Feature in GTK. The gtk-entry-select-on-focus property is a global * setting. Return it to its default value after the GtkEntry has done @@ -1563,10 +1563,10 @@ OS.gtk_widget_modify_base (handle, 0, color); } -void setCursor (GdkCursor* cursor) { +override void gtk_setCursor (GdkCursor* cursor) { GdkCursor* defaultCursor; if (cursor is null) defaultCursor = OS.gdk_cursor_new (OS.GDK_XTERM); - super.setCursor (cursor !is null ? cursor : defaultCursor); + super.gtk_setCursor (cursor !is null ? cursor : defaultCursor); if (cursor is null) OS.gdk_cursor_destroy (defaultCursor); }