Mercurial > projects > dwt-linux
comparison dwt/widgets/Display.d @ 40:7fb1ab011933
made macro implementations active, one compile problem in OS.d:2554
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 10 Jan 2008 08:18:45 +0100 |
parents | 6e625fa1612d |
children | 787b5413b0ce |
comparison
equal
deleted
inserted
replaced
39:8e76ddc90b31 | 40:7fb1ab011933 |
---|---|
605 CallbackData* cbdata = cast(CallbackData*)user_data; | 605 CallbackData* cbdata = cast(CallbackData*)user_data; |
606 return cbdata.display.allChildrenProc( cast(GtkWidget*)handle, cast(int)cbdata.data ); | 606 return cbdata.display.allChildrenProc( cast(GtkWidget*)handle, cast(int)cbdata.data ); |
607 } | 607 } |
608 int /*long*/ allChildrenProc (GtkWidget* widget, int /*long*/ recurse) { | 608 int /*long*/ allChildrenProc (GtkWidget* widget, int /*long*/ recurse) { |
609 allChildren = OS.g_list_append (allChildren, widget); | 609 allChildren = OS.g_list_append (allChildren, widget); |
610 if (recurse !is 0 && OS.GTK_IS_CONTAINER (widget)) { | 610 if (recurse !is 0 && OS.GTK_IS_CONTAINER (cast(GTypeInstance*)widget)) { |
611 allChildrenProcCallbackData.display = this; | 611 allChildrenProcCallbackData.display = this; |
612 allChildrenProcCallbackData.data = cast(void*)recurse; | 612 allChildrenProcCallbackData.data = cast(void*)recurse; |
613 OS.gtk_container_forall (cast(GtkContainer*)widget, cast(GtkCallback)&allChildrenProcFunc, &allChildrenProcCallbackData); | 613 OS.gtk_container_forall (cast(GtkContainer*)widget, cast(GtkCallback)&allChildrenProcFunc, &allChildrenProcCallbackData); |
614 } | 614 } |
615 return 0; | 615 return 0; |
711 if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS); | 711 if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS); |
712 OS.gdk_beep(); | 712 OS.gdk_beep(); |
713 if (!OS.GDK_WINDOWING_X11 ()) { | 713 if (!OS.GDK_WINDOWING_X11 ()) { |
714 OS.gdk_flush (); | 714 OS.gdk_flush (); |
715 } else { | 715 } else { |
716 GdkDisplay* xDisplay = OS.GDK_DISPLAY (); | 716 void* xDisplay = OS.GDK_DISPLAY (); |
717 OS.XFlush (xDisplay); | 717 OS.XFlush (xDisplay); |
718 } | 718 } |
719 } | 719 } |
720 | 720 |
721 int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*long*/ tree_model, int /*long*/ iter, GtkWidget* data) { | 721 int /*long*/ cellDataProc (int /*long*/ tree_column, int /*long*/ cell, int /*long*/ tree_model, int /*long*/ iter, GtkWidget* data) { |
1166 * in a scroll bar). | 1166 * in a scroll bar). |
1167 */ | 1167 */ |
1168 Shell shell = null; | 1168 Shell shell = null; |
1169 Control control = null; | 1169 Control control = null; |
1170 auto grabHandle = OS.gtk_grab_get_current (); | 1170 auto grabHandle = OS.gtk_grab_get_current (); |
1171 if (grabHandle !is null && OS.GTK_IS_WINDOW (grabHandle) && OS.gtk_window_get_modal (cast(GtkWindow*)grabHandle)) { | 1171 if (grabHandle !is null && OS.GTK_IS_WINDOW (cast(GTypeInstance*)grabHandle) && OS.gtk_window_get_modal (cast(GtkWindow*)grabHandle)) { |
1172 switch (eventType) { | 1172 switch (eventType) { |
1173 case OS.GDK_KEY_PRESS: | 1173 case OS.GDK_KEY_PRESS: |
1174 case OS.GDK_KEY_RELEASE: | 1174 case OS.GDK_KEY_RELEASE: |
1175 case OS.GDK_ENTER_NOTIFY: | 1175 case OS.GDK_ENTER_NOTIFY: |
1176 case OS.GDK_LEAVE_NOTIFY: | 1176 case OS.GDK_LEAVE_NOTIFY: |
3462 private static extern(C) int /*long*/ setDirectionProcFunc (GtkWidget* widget, void* direction) { | 3462 private static extern(C) int /*long*/ setDirectionProcFunc (GtkWidget* widget, void* direction) { |
3463 return setDirectionProc( widget, cast(int)direction ); | 3463 return setDirectionProc( widget, cast(int)direction ); |
3464 } | 3464 } |
3465 static int /*long*/ setDirectionProc (GtkWidget* widget, int /*long*/ direction) { | 3465 static int /*long*/ setDirectionProc (GtkWidget* widget, int /*long*/ direction) { |
3466 OS.gtk_widget_set_direction (widget, direction); | 3466 OS.gtk_widget_set_direction (widget, direction); |
3467 if (OS.GTK_IS_CONTAINER (widget)) { | 3467 if (OS.GTK_IS_CONTAINER (cast(GTypeInstance*)widget)) { |
3468 OS.gtk_container_forall (cast(GtkContainer*)widget, cast(GtkCallback)&setDirectionProcFunc, cast(void*)direction); | 3468 OS.gtk_container_forall (cast(GtkContainer*)widget, cast(GtkCallback)&setDirectionProcFunc, cast(void*)direction); |
3469 } | 3469 } |
3470 return 0; | 3470 return 0; |
3471 } | 3471 } |
3472 | 3472 |