diff dwt/widgets/Control.d @ 33:27324bbbac70

changed to regenerated BCD bindings
author Frank Benoit <benoit@tionex.de>
date Thu, 10 Jan 2008 02:18:07 +0100
parents 5e5d1c9cffdb
children c86fc3d50cfa
line wrap: on
line diff
--- a/dwt/widgets/Control.d	Wed Jan 09 07:07:50 2008 +0100
+++ b/dwt/widgets/Control.d	Thu Jan 10 02:18:07 2008 +0100
@@ -10,7 +10,6 @@
  *******************************************************************************/
 module dwt.widgets.Control;
 
-import dwt.internal.gtk.c.gtktypes;
 
 import dwt.SWT;
 //import dwt.accessibility.Accessible;
@@ -164,7 +163,7 @@
 	if (window is null) return false;
 	int orientation = vertical ? OS.GTK_ORIENTATION_HORIZONTAL : OS.GTK_ORIENTATION_VERTICAL;
     char dummy;
-	OS.gtk_paint_handle (OS.gtk_widget_get_style (paintHandle), window, cast(GtkStateType)OS.GTK_STATE_NORMAL, cast(GtkShadowType)OS.GTK_SHADOW_OUT, null, paintHandle, &dummy, x, y, width, height, cast(GtkOrientation)orientation);
+	OS.gtk_paint_handle (OS.gtk_widget_get_style (paintHandle), window, OS.GTK_STATE_NORMAL, OS.GTK_SHADOW_OUT, null, paintHandle, &dummy, x, y, width, height, orientation);
 	return true;
 }
 
@@ -220,7 +219,7 @@
 	if (childStyle !is null) {
 		GdkColor* color = new GdkColor();
 		OS.gtk_style_get_bg (childStyle, 0, color);
-		OS.gtk_widget_modify_bg (handle, cast(GtkStateType) 0, color);
+		OS.gtk_widget_modify_bg (handle, 0, color);
 	}
 }
 
@@ -312,7 +311,7 @@
 
 int /*long*/ hoverProc (int /*long*/ widget) {
 	int x, y;
-    GdkModifierType mask;
+    int mask;
 	OS.gdk_window_get_pointer (null, &x, &y, &mask);
 	sendMouseEvent (SWT.MouseHover, 0, /*time*/0, x , y , false, mask );
 	/* Always return zero in order to cancel the hover timer */
@@ -2645,7 +2644,7 @@
 	int state = gdkEvent.state;
 	if (gdkEvent.is_hint !is 0) {
 		int pointer_x, pointer_y;
-        GdkModifierType mask;
+        int mask;
 		auto window = eventWindow ();
 		OS.gdk_window_get_pointer (window, &pointer_x, &pointer_y, &mask);
 		x = pointer_x;
@@ -3607,8 +3606,8 @@
 
 void setOrientation () {
 	if ((style & SWT.RIGHT_TO_LEFT) !is 0) {
-		if (handle !is null) OS.gtk_widget_set_direction (handle, cast(GtkTextDirection)OS.GTK_TEXT_DIR_RTL);
-		if (fixedHandle !is null) OS.gtk_widget_set_direction (fixedHandle, cast(GtkTextDirection)OS.GTK_TEXT_DIR_RTL);
+		if (handle !is null) OS.gtk_widget_set_direction (handle, OS.GTK_TEXT_DIR_RTL);
+		if (fixedHandle !is null) OS.gtk_widget_set_direction (fixedHandle, OS.GTK_TEXT_DIR_RTL);
 	}
 }
 
@@ -3699,7 +3698,7 @@
 				/* Explicitly hiding the window avoids flicker on GTK+ >= 2.6 */
 				OS.gdk_window_hide (redrawWindow);
 				OS.gdk_window_destroy (redrawWindow);
-				OS.gdk_window_set_events (window, cast(GdkEventMask)OS.gtk_widget_get_events (paintHandle ()));
+				OS.gdk_window_set_events (window, OS.gtk_widget_get_events (paintHandle ()));
 				redrawWindow = null;
 			}
 		}
@@ -3720,7 +3719,7 @@
 						OS.GDK_POINTER_MOTION_MASK | OS.GDK_POINTER_MOTION_HINT_MASK |
 						OS.GDK_BUTTON_MOTION_MASK | OS.GDK_BUTTON1_MOTION_MASK |
 						OS.GDK_BUTTON2_MOTION_MASK | OS.GDK_BUTTON3_MOTION_MASK;
-					OS.gdk_window_set_events (window, cast(GdkEventMask)(OS.gdk_window_get_events (window) & ~mouseMask));
+					OS.gdk_window_set_events (window, OS.gdk_window_get_events (window) & ~mouseMask);
 					OS.gdk_window_set_back_pixmap (redrawWindow, null, false);
 					OS.gdk_window_show (redrawWindow);
 				}
@@ -4280,7 +4279,7 @@
 					OS.gdk_gc_set_clip_region (gdkGC, gdkEvent.region);
 					int dest_x, dest_y;
 					OS.gtk_widget_translate_coordinates (paintHandle (), control.paintHandle (), 0, 0, &dest_x, &dest_y);
-					OS.gdk_gc_set_fill (gdkGC, cast(GdkFill)OS.GDK_TILED);
+					OS.gdk_gc_set_fill (gdkGC, OS.GDK_TILED);
 					OS.gdk_gc_set_ts_origin (gdkGC, -dest_x, -dest_y);
 					OS.gdk_gc_set_tile (gdkGC, cast(GdkPixmap*)control.backgroundImage.pixmap);
  					OS.gdk_draw_rectangle (cast(GdkDrawable*)window, gdkGC, 1, gdkEvent.area.x, gdkEvent.area.y, gdkEvent.area.width, gdkEvent.area.height);