Mercurial > projects > dwt-linux
annotate dwt/widgets/Widget.d @ 152:17f8449522fd
overloads second walkthrough
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 31 Jan 2008 23:19:20 +0100 |
parents | f2e04420fd6c |
children | e4c3c05ade69 |
rev | line source |
---|---|
72 | 1 /******************************************************************************* |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
2 * Copyright (c) 2000, 2007 IBM Corporation and others. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
3 * All rights reserved. This program and the accompanying materials |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
5 * which accompanies this distribution, and is available at |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
6 * http://www.eclipse.org/legal/epl-v10.html |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
7 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
8 * Contributors: |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
9 * IBM Corporation - initial API and implementation |
72 | 10 * Port to the D programming language: |
11 * Frank Benoit <benoit@tionex.de> | |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
12 *******************************************************************************/ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
13 module dwt.widgets.Widget; |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
14 |
71 | 15 import dwt.DWT; |
28 | 16 import dwt.dwthelper.utils; |
17 | |
18 import dwt.events.DisposeListener; | |
19 import dwt.internal.Converter; | |
71 | 20 import dwt.internal.DWTEventListener; |
28 | 21 import dwt.internal.gtk.OS; |
22 import dwt.widgets.Display; | |
27 | 23 import dwt.widgets.Event; |
28 | 24 import dwt.widgets.EventTable; |
25 import dwt.widgets.Listener; | |
26 import dwt.widgets.TypedListener; | |
26 | 27 |
28 | 28 import tango.stdc.stringz; |
29 import tango.stdc.string; | |
46 | 30 import tango.core.Thread; |
28 | 31 |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
32 //version=LOG; |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
33 version(LOG){ |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
34 import tango.io.Stdout; |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
35 } |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
36 |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
37 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
38 * This class is the abstract superclass of all user interface objects. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
39 * Widgets are created, disposed and issue notification to listeners |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
40 * when events occur which affect them. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
41 * <dl> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
42 * <dt><b>Styles:</b></dt> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
43 * <dd>(none)</dd> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
44 * <dt><b>Events:</b></dt> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
45 * <dd>Dispose</dd> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
46 * </dl> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
47 * <p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
48 * IMPORTANT: This class is intended to be subclassed <em>only</em> |
71 | 49 * within the DWT implementation. However, it has not been marked |
50 * final to allow those outside of the DWT development team to implement | |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
51 * patched versions of the class in order to get around specific |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
52 * limitations in advance of when those limitations can be addressed |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
53 * by the team. Any class built using subclassing to access the internals |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
54 * of this class will likely fail to compile or run between releases and |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
55 * may be strongly platform specific. Subclassing should not be attempted |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
56 * without an intimate and detailed understanding of the workings of the |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
57 * hierarchy. No support is provided for user-written classes which are |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
58 * implemented as subclasses of this class. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
59 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
60 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
61 * @see #checkSubclass |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
62 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
63 public abstract class Widget { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
64 /** |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
65 * the handle to the OS resource |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
66 * (Warning: This field is platform dependent) |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
67 * <p> |
71 | 68 * <b>IMPORTANT:</b> This field is <em>not</em> part of the DWT |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
69 * public API. It is marked public only so that it can be shared |
71 | 70 * within the packages provided by DWT. It is not available on all |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
71 * platforms and should never be accessed from application code. |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
72 * </p> |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
73 */ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
74 public GtkWidget* handle; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
75 int style, state; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
76 Display display; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
77 EventTable eventTable; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
78 Object data; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
79 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
80 /* Global state flags */ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
81 static const int DISPOSED = 1<<0; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
82 static const int CANVAS = 1<<1; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
83 static const int KEYED_DATA = 1<<2; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
84 static const int HANDLE = 1<<3; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
85 static const int DISABLED = 1<<4; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
86 static const int MENU = 1<<5; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
87 static const int OBSCURED = 1<<6; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
88 static const int MOVED = 1<<7; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
89 static const int RESIZED = 1<<8; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
90 static const int ZERO_WIDTH = 1<<9; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
91 static const int ZERO_HEIGHT = 1<<10; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
92 static const int HIDDEN = 1<<11; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
93 static const int FOREGROUND = 1<<12; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
94 static const int BACKGROUND = 1<<13; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
95 static const int FONT = 1<<14; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
96 static const int PARENT_BACKGROUND = 1<<15; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
97 static const int THEME_BACKGROUND = 1<<16; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
98 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
99 /* A layout was requested on this widget */ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
100 static const int LAYOUT_NEEDED = 1<<17; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
101 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
102 /* The preferred size of a child has changed */ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
103 static const int LAYOUT_CHANGED = 1<<18; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
104 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
105 /* A layout was requested in this widget hierachy */ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
106 static const int LAYOUT_CHILD = 1<<19; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
107 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
108 /* More global state flags */ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
109 static const int RELEASED = 1<<20; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
110 static const int DISPOSE_SENT = 1<<21; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
111 static const int FOREIGN_HANDLE = 1<<22; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
112 static const int DRAG_DETECT = 1<<23; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
113 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
114 /* Default size for widgets */ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
115 static const int DEFAULT_WIDTH = 64; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
116 static const int DEFAULT_HEIGHT = 64; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
117 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
118 /* GTK signals data */ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
119 static const int ACTIVATE = 1; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
120 static const int BUTTON_PRESS_EVENT = 2; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
121 static const int BUTTON_PRESS_EVENT_INVERSE = 3; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
122 static const int BUTTON_RELEASE_EVENT = 4; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
123 static const int BUTTON_RELEASE_EVENT_INVERSE = 5; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
124 static const int CHANGED = 6; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
125 static const int CHANGE_VALUE = 7; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
126 static const int CLICKED = 8; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
127 static const int COMMIT = 9; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
128 static const int CONFIGURE_EVENT = 10; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
129 static const int DELETE_EVENT = 11; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
130 static const int DELETE_RANGE = 12; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
131 static const int DELETE_TEXT = 13; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
132 static const int ENTER_NOTIFY_EVENT = 14; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
133 static const int EVENT = 15; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
134 static const int EVENT_AFTER = 16; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
135 static const int EXPAND_COLLAPSE_CURSOR_ROW = 17; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
136 static const int EXPOSE_EVENT = 18; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
137 static const int EXPOSE_EVENT_INVERSE = 19; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
138 static const int FOCUS = 20; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
139 static const int FOCUS_IN_EVENT = 21; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
140 static const int FOCUS_OUT_EVENT = 22; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
141 static const int GRAB_FOCUS = 23; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
142 static const int HIDE = 24; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
143 static const int INPUT = 25; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
144 static const int INSERT_TEXT = 26; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
145 static const int KEY_PRESS_EVENT = 27; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
146 static const int KEY_RELEASE_EVENT = 28; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
147 static const int LEAVE_NOTIFY_EVENT = 29; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
148 static const int MAP = 30; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
149 static const int MAP_EVENT = 31; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
150 static const int MNEMONIC_ACTIVATE = 32; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
151 static const int MOTION_NOTIFY_EVENT = 33; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
152 static const int MOTION_NOTIFY_EVENT_INVERSE = 34; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
153 static const int MOVE_FOCUS = 35; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
154 static const int OUTPUT = 36; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
155 static const int POPUP_MENU = 37; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
156 static const int PREEDIT_CHANGED = 38; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
157 static const int REALIZE = 39; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
158 static const int ROW_ACTIVATED = 40; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
159 static const int SCROLL_CHILD = 41; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
160 static const int SCROLL_EVENT = 42; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
161 static const int SELECT = 43; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
162 static const int SHOW = 44; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
163 static const int SHOW_HELP = 45; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
164 static const int SIZE_ALLOCATE = 46; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
165 static const int STYLE_SET = 47; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
166 static const int SWITCH_PAGE = 48; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
167 static const int TEST_COLLAPSE_ROW = 49; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
168 static const int TEST_EXPAND_ROW = 50; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
169 static const int TEXT_BUFFER_INSERT_TEXT = 51; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
170 static const int TOGGLED = 52; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
171 static const int UNMAP = 53; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
172 static const int UNMAP_EVENT = 54; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
173 static const int UNREALIZE = 55; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
174 static const int VALUE_CHANGED = 56; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
175 static const int VISIBILITY_NOTIFY_EVENT = 57; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
176 static const int WINDOW_STATE_EVENT = 58; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
177 static const int ACTIVATE_INVERSE = 59; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
178 static const int DAY_SELECTED = 60; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
179 static const int MONTH_CHANGED = 61; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
180 static const int LAST_SIGNAL = 62; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
181 |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
182 template UD_Getter( char[] name ){ |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
183 const char[] UD_Getter = "void* ud"~name~"(){ return getDisplay().getWindowProcUserData( "~name~"); }\n"; |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
184 } |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
185 |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
186 mixin ( UD_Getter!( "ACTIVATE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
187 mixin ( UD_Getter!( "BUTTON_PRESS_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
188 mixin ( UD_Getter!( "BUTTON_PRESS_EVENT_INVERSE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
189 mixin ( UD_Getter!( "BUTTON_RELEASE_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
190 mixin ( UD_Getter!( "BUTTON_RELEASE_EVENT_INVERSE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
191 mixin ( UD_Getter!( "CHANGED" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
192 mixin ( UD_Getter!( "CHANGE_VALUE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
193 mixin ( UD_Getter!( "CLICKED" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
194 mixin ( UD_Getter!( "COMMIT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
195 mixin ( UD_Getter!( "CONFIGURE_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
196 mixin ( UD_Getter!( "DELETE_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
197 mixin ( UD_Getter!( "DELETE_RANGE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
198 mixin ( UD_Getter!( "DELETE_TEXT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
199 mixin ( UD_Getter!( "ENTER_NOTIFY_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
200 mixin ( UD_Getter!( "EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
201 mixin ( UD_Getter!( "EVENT_AFTER" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
202 mixin ( UD_Getter!( "EXPAND_COLLAPSE_CURSOR_ROW" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
203 mixin ( UD_Getter!( "EXPOSE_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
204 mixin ( UD_Getter!( "EXPOSE_EVENT_INVERSE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
205 mixin ( UD_Getter!( "FOCUS" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
206 mixin ( UD_Getter!( "FOCUS_IN_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
207 mixin ( UD_Getter!( "FOCUS_OUT_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
208 mixin ( UD_Getter!( "GRAB_FOCUS" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
209 mixin ( UD_Getter!( "HIDE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
210 mixin ( UD_Getter!( "INPUT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
211 mixin ( UD_Getter!( "INSERT_TEXT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
212 mixin ( UD_Getter!( "KEY_PRESS_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
213 mixin ( UD_Getter!( "KEY_RELEASE_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
214 mixin ( UD_Getter!( "LEAVE_NOTIFY_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
215 mixin ( UD_Getter!( "MAP" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
216 mixin ( UD_Getter!( "MAP_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
217 mixin ( UD_Getter!( "MNEMONIC_ACTIVATE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
218 mixin ( UD_Getter!( "MOTION_NOTIFY_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
219 mixin ( UD_Getter!( "MOTION_NOTIFY_EVENT_INVERSE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
220 mixin ( UD_Getter!( "MOVE_FOCUS" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
221 mixin ( UD_Getter!( "OUTPUT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
222 mixin ( UD_Getter!( "POPUP_MENU" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
223 mixin ( UD_Getter!( "PREEDIT_CHANGED" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
224 mixin ( UD_Getter!( "REALIZE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
225 mixin ( UD_Getter!( "ROW_ACTIVATED" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
226 mixin ( UD_Getter!( "SCROLL_CHILD" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
227 mixin ( UD_Getter!( "SCROLL_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
228 mixin ( UD_Getter!( "SELECT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
229 mixin ( UD_Getter!( "SHOW" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
230 mixin ( UD_Getter!( "SHOW_HELP" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
231 mixin ( UD_Getter!( "SIZE_ALLOCATE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
232 mixin ( UD_Getter!( "STYLE_SET" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
233 mixin ( UD_Getter!( "SWITCH_PAGE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
234 mixin ( UD_Getter!( "TEST_COLLAPSE_ROW" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
235 mixin ( UD_Getter!( "TEST_EXPAND_ROW" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
236 mixin ( UD_Getter!( "TEXT_BUFFER_INSERT_TEXT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
237 mixin ( UD_Getter!( "TOGGLED" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
238 mixin ( UD_Getter!( "UNMAP" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
239 mixin ( UD_Getter!( "UNMAP_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
240 mixin ( UD_Getter!( "UNREALIZE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
241 mixin ( UD_Getter!( "VALUE_CHANGED" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
242 mixin ( UD_Getter!( "VISIBILITY_NOTIFY_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
243 mixin ( UD_Getter!( "WINDOW_STATE_EVENT" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
244 mixin ( UD_Getter!( "ACTIVATE_INVERSE" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
245 mixin ( UD_Getter!( "DAY_SELECTED" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
246 mixin ( UD_Getter!( "MONTH_CHANGED" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
247 mixin ( UD_Getter!( "LAST_SIGNAL" )); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
248 |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
249 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
250 * Prevents uninitialized instances from being created outside the package. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
251 */ |
28 | 252 this () {} |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
253 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
254 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
255 * Constructs a new instance of this class given its parent |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
256 * and a style value describing its behavior and appearance. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
257 * <p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
258 * The style value is either one of the style constants defined in |
71 | 259 * class <code>DWT</code> which is applicable to instances of this |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
260 * class, or must be built by <em>bitwise OR</em>'ing together |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
261 * (that is, using the <code>int</code> "|" operator) two or more |
71 | 262 * of those <code>DWT</code> style constants. The class description |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
263 * lists the style constants that are applicable to the class. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
264 * Style bits are also inherited from superclasses. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
265 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
266 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
267 * @param parent a widget which will be the parent of the new instance (cannot be null) |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
268 * @param style the style of widget to construct |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
269 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
270 * @exception IllegalArgumentException <ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
271 * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
272 * <li>ERROR_INVALID_ARGUMENT - if the parent is disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
273 * </ul> |
71 | 274 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
275 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
276 * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
277 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
278 * |
71 | 279 * @see DWT |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
280 * @see #checkSubclass |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
281 * @see #getStyle |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
282 */ |
28 | 283 public this (Widget parent, int style) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
284 checkSubclass (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
285 checkParent (parent); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
286 this.style = style; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
287 display = parent.display; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
288 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
289 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
290 void _addListener (int eventType, Listener listener) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
291 if (eventTable is null) eventTable = new EventTable (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
292 eventTable.hook (eventType, listener); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
293 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
294 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
295 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
296 * Adds the listener to the collection of listeners who will |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
297 * be notified when an event of the given type occurs. When the |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
298 * event does occur in the widget, the listener is notified by |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
299 * sending it the <code>handleEvent()</code> message. The event |
71 | 300 * type is one of the event constants defined in class <code>DWT</code>. |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
301 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
302 * @param eventType the type of event to listen for |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
303 * @param listener the listener which should be notified when the event occurs |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
304 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
305 * @exception IllegalArgumentException <ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
306 * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
307 * </ul> |
71 | 308 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
309 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
310 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
311 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
312 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
313 * @see Listener |
71 | 314 * @see DWT |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
315 * @see #removeListener(int, Listener) |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
316 * @see #notifyListeners |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
317 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
318 public void addListener (int eventType, Listener listener) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
319 checkWidget (); |
71 | 320 if (listener is null) error (DWT.ERROR_NULL_ARGUMENT); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
321 _addListener (eventType, listener); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
322 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
323 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
324 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
325 * Adds the listener to the collection of listeners who will |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
326 * be notified when the widget is disposed. When the widget is |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
327 * disposed, the listener is notified by sending it the |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
328 * <code>widgetDisposed()</code> message. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
329 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
330 * @param listener the listener which should be notified when the receiver is disposed |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
331 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
332 * @exception IllegalArgumentException <ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
333 * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
334 * </ul> |
71 | 335 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
336 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
337 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
338 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
339 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
340 * @see DisposeListener |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
341 * @see #removeDisposeListener |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
342 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
343 public void addDisposeListener (DisposeListener listener) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
344 checkWidget (); |
71 | 345 if (listener is null) error (DWT.ERROR_NULL_ARGUMENT); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
346 TypedListener typedListener = new TypedListener (listener); |
71 | 347 addListener (DWT.Dispose, typedListener); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
348 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
349 |
28 | 350 GdkWindow* paintWindow () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
351 return null; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
352 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
353 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
354 static int checkBits (int style, int int0, int int1, int int2, int int3, int int4, int int5) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
355 int mask = int0 | int1 | int2 | int3 | int4 | int5; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
356 if ((style & mask) is 0) style |= int0; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
357 if ((style & int0) !is 0) style = (style & ~mask) | int0; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
358 if ((style & int1) !is 0) style = (style & ~mask) | int1; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
359 if ((style & int2) !is 0) style = (style & ~mask) | int2; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
360 if ((style & int3) !is 0) style = (style & ~mask) | int3; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
361 if ((style & int4) !is 0) style = (style & ~mask) | int4; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
362 if ((style & int5) !is 0) style = (style & ~mask) | int5; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
363 return style; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
364 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
365 |
89
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
366 void cellDataProc ( |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
367 GtkTreeViewColumn *tree_column, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
368 GtkCellRenderer *cell, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
369 GtkTreeModel *tree_model, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
370 GtkTreeIter *iter, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
371 void* data) |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
372 { |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
373 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
374 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
375 void checkOpen () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
376 /* Do nothing */ |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
377 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
378 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
379 void checkOrientation (Widget parent) { |
71 | 380 style &= ~DWT.MIRRORED; |
381 if ((style & (DWT.LEFT_TO_RIGHT | DWT.RIGHT_TO_LEFT)) is 0) { | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
382 if (parent !is null) { |
71 | 383 if ((parent.style & DWT.LEFT_TO_RIGHT) !is 0) style |= DWT.LEFT_TO_RIGHT; |
384 if ((parent.style & DWT.RIGHT_TO_LEFT) !is 0) style |= DWT.RIGHT_TO_LEFT; | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
385 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
386 } |
71 | 387 style = checkBits (style, DWT.LEFT_TO_RIGHT, DWT.RIGHT_TO_LEFT, 0, 0, 0, 0); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
388 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
389 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
390 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
391 * Throws an exception if the specified widget can not be |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
392 * used as a parent for the receiver. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
393 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
394 * @exception IllegalArgumentException <ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
395 * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
396 * <li>ERROR_INVALID_ARGUMENT - if the parent is disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
397 * </ul> |
71 | 398 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
399 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
400 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
401 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
402 void checkParent (Widget parent) { |
71 | 403 if (parent is null) error (DWT.ERROR_NULL_ARGUMENT); |
404 if (parent.isDisposed ()) error (DWT.ERROR_INVALID_ARGUMENT); | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
405 parent.checkWidget (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
406 parent.checkOpen (); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
407 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
408 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
409 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
410 * Checks that this class can be subclassed. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
411 * <p> |
71 | 412 * The DWT class library is intended to be subclassed |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
413 * only at specific, controlled points (most notably, |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
414 * <code>Composite</code> and <code>Canvas</code> when |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
415 * implementing new widgets). This method enforces this |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
416 * rule unless it is overridden. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
417 * </p><p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
418 * <em>IMPORTANT:</em> By providing an implementation of this |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
419 * method that allows a subclass of a class which does not |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
420 * normally allow subclassing to be created, the implementer |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
421 * agrees to be fully responsible for the fact that any such |
71 | 422 * subclass will likely fail between DWT releases and will be |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
423 * strongly platform specific. No support is provided for |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
424 * user-written classes which are implemented in this fashion. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
425 * </p><p> |
71 | 426 * The ability to subclass outside of the allowed DWT classes |
427 * is intended purely to enable those not on the DWT development | |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
428 * team to implement patches in order to get around specific |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
429 * limitations in advance of when those limitations can be |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
430 * addressed by the team. Subclassing should not be attempted |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
431 * without an intimate and detailed understanding of the hierarchy. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
432 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
433 * |
71 | 434 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
435 * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
436 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
437 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
438 protected void checkSubclass () { |
71 | 439 if (!isValidSubclass ()) error (DWT.ERROR_INVALID_SUBCLASS); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
440 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
441 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
442 /** |
71 | 443 * Throws an <code>DWTException</code> if the receiver can not |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
444 * be accessed by the caller. This may include both checks on |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
445 * the state of the receiver and more generally on the entire |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
446 * execution context. This method <em>should</em> be called by |
71 | 447 * widget implementors to enforce the standard DWT invariants. |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
448 * <p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
449 * Currently, it is an error to invoke any method (other than |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
450 * <code>isDisposed()</code>) on a widget that has had its |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
451 * <code>dispose()</code> method called. It is also an error |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
452 * to call widget methods from any thread that is different |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
453 * from the thread that created the widget. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
454 * </p><p> |
71 | 455 * In future releases of DWT, there may be more or fewer error |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
456 * checks and exceptions may be thrown for different reasons. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
457 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
458 * |
71 | 459 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
460 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
461 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
462 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
463 */ |
77 | 464 public void checkWidget () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
465 Display display = this.display; |
71 | 466 if (display is null) error (DWT.ERROR_WIDGET_DISPOSED); |
467 if (display.thread !is Thread.getThis ()) error (DWT.ERROR_THREAD_INVALID_ACCESS); | |
468 if ((state & DISPOSED) !is 0) error (DWT.ERROR_WIDGET_DISPOSED); | |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
469 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
470 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
471 void createHandle (int index) { |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
472 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
473 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
474 void createWidget (int index) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
475 createHandle (index); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
476 setOrientation (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
477 hookEvents (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
478 register (); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
479 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
480 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
481 void deregister () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
482 if (handle is null) return; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
483 if ((state & HANDLE) !is 0) display.removeWidget (handle); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
484 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
485 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
486 void destroyWidget () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
487 GtkWidget* h = topHandle (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
488 releaseHandle (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
489 if (h !is null && (state & HANDLE) !is 0) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
490 OS.gtk_widget_destroy (h); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
491 } |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
492 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
493 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
494 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
495 * Disposes of the operating system resources associated with |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
496 * the receiver and all its descendants. After this method has |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
497 * been invoked, the receiver and all descendants will answer |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
498 * <code>true</code> when sent the message <code>isDisposed()</code>. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
499 * Any internal connections between the widgets in the tree will |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
500 * have been removed to facilitate garbage collection. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
501 * <p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
502 * NOTE: This method is not called recursively on the descendants |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
503 * of the receiver. This means that, widget implementers can not |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
504 * detect when a widget is being disposed of by re-implementing |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
505 * this method, but should instead listen for the <code>Dispose</code> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
506 * event. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
507 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
508 * |
71 | 509 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
510 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
511 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
512 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
513 * @see #addDisposeListener |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
514 * @see #removeDisposeListener |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
515 * @see #checkWidget |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
516 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
517 public void dispose () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
518 /* |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
519 * Note: It is valid to attempt to dispose a widget |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
520 * more than once. If this happens, fail silently. |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
521 */ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
522 if (isDisposed ()) return; |
71 | 523 if (!isValidThread ()) error (DWT.ERROR_THREAD_INVALID_ACCESS); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
524 release (true); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
525 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
526 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
527 void error (int code) { |
71 | 528 DWT.error (code); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
529 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
530 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
531 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
532 * Returns the application defined widget data associated |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
533 * with the receiver, or null if it has not been set. The |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
534 * <em>widget data</em> is a single, unnamed field that is |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
535 * stored with every widget. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
536 * <p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
537 * Applications may put arbitrary objects in this field. If |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
538 * the object stored in the widget data needs to be notified |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
539 * when the widget is disposed of, it is the application's |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
540 * responsibility to hook the Dispose event on the widget and |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
541 * do so. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
542 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
543 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
544 * @return the widget data |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
545 * |
71 | 546 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
547 * <li>ERROR_WIDGET_DISPOSED - when the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
548 * <li>ERROR_THREAD_INVALID_ACCESS - when called from the wrong thread</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
549 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
550 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
551 * @see #setData(Object) |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
552 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
553 public Object getData () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
554 checkWidget(); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
555 return (state & KEYED_DATA) !is 0 ? (cast(ArrayWrapperObject)data).array[0] : data; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
556 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
557 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
558 * Returns the application defined property of the receiver |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
559 * with the specified name, or null if it has not been set. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
560 * <p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
561 * Applications may have associated arbitrary objects with the |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
562 * receiver in this fashion. If the objects stored in the |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
563 * properties need to be notified when the widget is disposed |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
564 * of, it is the application's responsibility to hook the |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
565 * Dispose event on the widget and do so. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
566 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
567 * |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
568 * @param key the name of the property |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
569 * @return the value of the property or null if it has not been set |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
570 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
571 * @exception IllegalArgumentException <ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
572 * <li>ERROR_NULL_ARGUMENT - if the key is null</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
573 * </ul> |
71 | 574 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
575 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
576 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
577 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
578 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
579 * @see #setData(String, Object) |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
580 */ |
28 | 581 public Object getData (char[] key) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
582 checkWidget(); |
71 | 583 if (key is null) error (DWT.ERROR_NULL_ARGUMENT); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
584 if ((state & KEYED_DATA) !is 0) { |
120 | 585 Object[] table = (cast(ArrayWrapperObject) data).array; |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
586 for (int i=1; i<table.length; i+=2) { |
120 | 587 char[] tablekey = (cast(ArrayWrapperString) table[i]).array; |
588 if (key ==/*eq*/ tablekey ) return table [i+1]; | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
589 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
590 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
591 return null; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
592 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
593 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
594 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
595 * Returns the <code>Display</code> that is associated with |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
596 * the receiver. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
597 * <p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
598 * A widget's display is either provided when it is created |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
599 * (for example, top level <code>Shell</code>s) or is the |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
600 * same as its parent's display. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
601 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
602 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
603 * @return the receiver's display |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
604 * |
71 | 605 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
606 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
607 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
608 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
609 public Display getDisplay () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
610 Display display = this.display; |
71 | 611 if (display is null) error (DWT.ERROR_WIDGET_DISPOSED); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
612 return display; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
613 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
614 |
28 | 615 char[] getName () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
616 // char[] str = getClass ().getName (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
617 // int index = str.lastIndexOf ('.'); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
618 // if (index is -1) return str; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
619 char[] str = this.classinfo.name; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
620 int index = str.length; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
621 while ((--index > 0) && (str[index] !is '.')) {} |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
622 return str[index + 1 .. $ ]; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
623 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
624 |
28 | 625 char[] getNameText () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
626 return ""; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
627 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
628 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
629 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
630 * Returns the receiver's style information. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
631 * <p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
632 * Note that the value which is returned by this method <em>may |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
633 * not match</em> the value which was provided to the constructor |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
634 * when the receiver was created. This can occur when the underlying |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
635 * operating system does not support a particular combination of |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
636 * requested styles. For example, if the platform widget used to |
71 | 637 * implement a particular DWT widget always has scroll bars, the |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
638 * result of calling this method would always have the |
71 | 639 * <code>DWT.H_SCROLL</code> and <code>DWT.V_SCROLL</code> bits set. |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
640 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
641 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
642 * @return the style bits |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
643 * |
71 | 644 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
645 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
646 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
647 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
648 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
649 public int getStyle () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
650 checkWidget (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
651 return style; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
652 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
653 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
654 |
28 | 655 int /*long*/ gtk_activate (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
656 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
657 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
658 |
37 | 659 int /*long*/ gtk_button_press_event (GtkWidget* widget, GdkEventButton* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
660 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
661 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
662 |
37 | 663 int /*long*/ gtk_button_release_event (GtkWidget* widget, GdkEventButton* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
664 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
665 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
666 |
28 | 667 int /*long*/ gtk_changed (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
668 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
669 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
670 |
28 | 671 int /*long*/ gtk_change_value (GtkWidget* widget, int /*long*/ scroll, int /*long*/ value1, int /*long*/ value2) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
672 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
673 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
674 |
28 | 675 int /*long*/ gtk_clicked (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
676 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
677 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
678 |
37 | 679 int /*long*/ gtk_commit (GtkIMContext* imcontext, char* text) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
680 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
681 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
682 |
28 | 683 int /*long*/ gtk_configure_event (GtkWidget* widget, int /*long*/ event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
684 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
685 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
686 |
28 | 687 int /*long*/ gtk_day_selected (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
688 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
689 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
690 |
28 | 691 int /*long*/ gtk_delete_event (GtkWidget* widget, int /*long*/ event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
692 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
693 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
694 |
28 | 695 int /*long*/ gtk_delete_range (GtkWidget* widget, int /*long*/ iter1, int /*long*/ iter2) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
696 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
697 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
698 |
28 | 699 int /*long*/ gtk_delete_text (GtkWidget* widget, int /*long*/ start_pos, int /*long*/ end_pos) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
700 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
701 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
702 |
37 | 703 int /*long*/ gtk_enter_notify_event (GtkWidget* widget, GdkEventCrossing* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
704 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
705 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
706 |
37 | 707 int /*long*/ gtk_event (GtkWidget* widget, GdkEvent* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
708 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
709 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
710 |
37 | 711 int /*long*/ gtk_event_after (GtkWidget* widget, GdkEvent* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
712 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
713 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
714 |
28 | 715 int /*long*/ gtk_expand_collapse_cursor_row (GtkWidget* widget, int /*long*/ logical, int /*long*/ expand, int /*long*/ open_all) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
716 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
717 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
718 |
37 | 719 int /*long*/ gtk_expose_event (GtkWidget* widget, GdkEventExpose* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
720 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
721 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
722 |
38 | 723 int /*long*/ gtk_focus (GtkWidget* widget, int directionType) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
724 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
725 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
726 |
37 | 727 int /*long*/ gtk_focus_in_event (GtkWidget* widget, GdkEventFocus* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
728 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
729 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
730 |
37 | 731 int /*long*/ gtk_focus_out_event (GtkWidget* widget, GdkEventFocus* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
732 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
733 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
734 |
28 | 735 int /*long*/ gtk_grab_focus (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
736 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
737 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
738 |
28 | 739 int /*long*/ gtk_hide (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
740 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
741 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
742 |
28 | 743 int /*long*/ gtk_input (GtkWidget* widget, int /*long*/ arg1) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
744 return 0; |
28 | 745 } |
746 | |
60 | 747 int /*long*/ gtk_insert_text (GtkEditable* widget, char* new_text, int new_text_length, int position) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
748 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
749 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
750 |
28 | 751 int /*long*/ gtk_key_press_event (GtkWidget* widget, GdkEventKey* event) { |
71 | 752 return sendKeyEvent (DWT.KeyDown, event) ? 0 : 1; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
753 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
754 |
28 | 755 int /*long*/ gtk_key_release_event (GtkWidget* widget, GdkEventKey* event) { |
71 | 756 return sendKeyEvent (DWT.KeyUp, event) ? 0 : 1; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
757 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
758 |
37 | 759 int /*long*/ gtk_leave_notify_event (GtkWidget* widget, GdkEventCrossing* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
760 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
761 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
762 |
28 | 763 int /*long*/ gtk_map (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
764 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
765 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
766 |
28 | 767 int /*long*/ gtk_map_event (GtkWidget* widget, int /*long*/ event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
768 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
769 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
770 |
28 | 771 int /*long*/ gtk_mnemonic_activate (GtkWidget* widget, int /*long*/ arg1) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
772 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
773 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
774 |
28 | 775 int /*long*/ gtk_month_changed (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
776 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
777 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
778 |
37 | 779 int /*long*/ gtk_motion_notify_event (GtkWidget* widget, GdkEventMotion* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
780 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
781 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
782 |
38 | 783 int /*long*/ gtk_move_focus (GtkWidget* widget, int directionType) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
784 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
785 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
786 |
28 | 787 int /*long*/ gtk_output (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
788 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
789 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
790 |
28 | 791 int /*long*/ gtk_popup_menu (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
792 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
793 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
794 |
37 | 795 int /*long*/ gtk_preedit_changed (GtkIMContext* imcontext) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
796 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
797 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
798 |
28 | 799 int /*long*/ gtk_realize (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
800 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
801 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
802 |
89
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
803 void gtk_row_activated (GtkTreeView* tree, GtkTreePath* path, GtkTreeViewColumn* column) { |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
804 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
805 |
28 | 806 int /*long*/ gtk_scroll_child (GtkWidget* widget, int /*long*/ scrollType, int /*long*/ horizontal) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
807 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
808 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
809 |
37 | 810 int /*long*/ gtk_scroll_event (GtkWidget* widget, GdkEventScroll* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
811 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
812 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
813 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
814 int /*long*/ gtk_select (int /*long*/ item) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
815 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
816 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
817 |
28 | 818 int /*long*/ gtk_show (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
819 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
820 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
821 |
28 | 822 int /*long*/ gtk_show_help (GtkWidget* widget, int /*long*/ helpType) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
823 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
824 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
825 |
28 | 826 int /*long*/ gtk_size_allocate (GtkWidget* widget, int /*long*/ allocation) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
827 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
828 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
829 |
28 | 830 int /*long*/ gtk_style_set (GtkWidget* widget, int /*long*/ previousStyle) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
831 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
832 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
833 |
28 | 834 int /*long*/ gtk_switch_page (GtkWidget* widget, int /*long*/ page, int /*long*/ page_num) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
835 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
836 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
837 |
90
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
838 int gtk_test_collapse_row ( |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
839 GtkTreeView *tree_view, |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
840 GtkTreeIter *iter, |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
841 GtkTreePath *path) |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
842 { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
843 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
844 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
845 |
90
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
846 int /*long*/ gtk_test_expand_row ( |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
847 GtkTreeView *tree_view, |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
848 GtkTreeIter *iter, |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
849 GtkTreePath *path) |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
850 { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
851 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
852 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
853 |
60 | 854 int /*long*/ gtk_text_buffer_insert_text (GtkTextBuffer *buffer, GtkTextIter *iter, char *text, int len) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
855 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
856 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
857 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
858 int /*long*/ gtk_timer () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
859 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
860 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
861 |
89
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
862 int /*long*/ gtk_toggled (int /*long*/ renderer, char* pathStr) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
863 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
864 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
865 |
28 | 866 int /*long*/ gtk_unmap (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
867 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
868 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
869 |
28 | 870 int /*long*/ gtk_unmap_event (GtkWidget* widget, int /*long*/ event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
871 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
872 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
873 |
28 | 874 int /*long*/ gtk_unrealize (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
875 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
876 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
877 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
878 int /*long*/ gtk_value_changed (int /*long*/ adjustment) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
879 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
880 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
881 |
37 | 882 int /*long*/ gtk_visibility_notify_event (GtkWidget* widget, GdkEventVisibility* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
883 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
884 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
885 |
38 | 886 int /*long*/ gtk_window_state_event (GtkWidget* widget, GdkEventWindowState* event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
887 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
888 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
889 |
28 | 890 int fontHeight ( PangoFontDescription* font, GtkWidget* widgetHandle ) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
891 auto context = OS.gtk_widget_get_pango_context (widgetHandle); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
892 auto lang = OS.pango_context_get_language (context); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
893 auto metrics = OS.pango_context_get_metrics (context, font, lang); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
894 int ascent = OS.pango_font_metrics_get_ascent (metrics); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
895 int descent = OS.pango_font_metrics_get_descent (metrics); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
896 OS.pango_font_metrics_unref (metrics); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
897 return OS.PANGO_PIXELS (ascent + descent); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
898 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
899 |
38 | 900 int filterProc (XEvent* xEvent, GdkEvent* gdkEvent, void* data) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
901 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
902 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
903 |
28 | 904 bool filters (int eventType) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
905 return display.filters (eventType); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
906 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
907 |
28 | 908 int /*long*/ fixedMapProc (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
909 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
910 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
911 |
28 | 912 char [] fixMnemonic (char[] str) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
913 int len = str.length; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
914 char [] text = new char [len]; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
915 text = str[0 .. len]; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
916 int i = 0, j = 0; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
917 char [] result = new char [len * 2]; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
918 while (i < len) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
919 switch (text [i]) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
920 case '&': |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
921 if (i + 1 < len && text [i + 1] is '&') { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
922 i++; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
923 } else { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
924 text [i] = '_'; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
925 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
926 break; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
927 case '_': |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
928 result [j++] = '_'; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
929 break; |
55
93981635e709
Checked and inserted missing default switch cases.
Frank Benoit <benoit@tionex.de>
parents:
48
diff
changeset
|
930 default: |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
931 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
932 result [j++] = text [i++]; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
933 } |
60 | 934 return result[0..j]; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
935 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
936 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
937 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
938 * Returns <code>true</code> if the widget has been disposed, |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
939 * and <code>false</code> otherwise. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
940 * <p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
941 * This method gets the dispose state for the widget. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
942 * When a widget has been disposed, it is an error to |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
943 * invoke any other method using the widget. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
944 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
945 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
946 * @return <code>true</code> when the widget is disposed and <code>false</code> otherwise |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
947 */ |
28 | 948 public bool isDisposed () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
949 return (state & DISPOSED) !is 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
950 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
951 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
952 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
953 * Returns <code>true</code> if there are any listeners |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
954 * for the specified event type associated with the receiver, |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
955 * and <code>false</code> otherwise. The event type is one of |
71 | 956 * the event constants defined in class <code>DWT</code>. |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
957 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
958 * @param eventType the type of event |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
959 * @return true if the event is hooked |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
960 * |
71 | 961 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
962 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
963 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
964 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
965 * |
71 | 966 * @see DWT |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
967 */ |
28 | 968 public bool isListening (int eventType) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
969 checkWidget (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
970 return hooks (eventType); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
971 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
972 |
28 | 973 bool isValidThread () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
974 return getDisplay ().isValidThread (); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
975 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
976 |
28 | 977 bool isValidSubclass() { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
978 return true;//Display.isValidClass(getClass()); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
979 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
980 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
981 void hookEvents () { |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
982 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
983 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
984 /* |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
985 * Returns <code>true</code> if the specified eventType is |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
986 * hooked, and <code>false</code> otherwise. Implementations |
71 | 987 * of DWT can avoid creating objects and sending events |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
988 * when an event happens in the operating system but |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
989 * there are no listeners hooked for the event. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
990 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
991 * @param eventType the event to be checked |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
992 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
993 * @return <code>true</code> when the eventType is hooked and <code>false</code> otherwise |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
994 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
995 * @see #isListening |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
996 */ |
28 | 997 bool hooks (int eventType) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
998 if (eventTable is null) return false; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
999 return eventTable.hooks (eventType); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1000 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1001 |
28 | 1002 int /*long*/ hoverProc (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1003 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1004 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1005 |
48 | 1006 void menuPositionProc (GtkMenu* menu, int* x, int* y, int* push_in, void* user_data) { |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1007 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1008 |
152
17f8449522fd
overloads second walkthrough
Frank Benoit <benoit@tionex.de>
parents:
150
diff
changeset
|
1009 bool mnemonicHit (GtkWidget* mnemonicHandle, wchar key) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1010 if (!mnemonicMatch (mnemonicHandle, key)) return false; |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1011 OS.g_signal_handlers_block_matched ( cast(void*)mnemonicHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, null, null, udMNEMONIC_ACTIVATE); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1012 bool result = cast(bool)OS.gtk_widget_mnemonic_activate (cast(GtkWidget*)mnemonicHandle, false); |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1013 OS.g_signal_handlers_unblock_matched (cast(void*)mnemonicHandle, OS.G_SIGNAL_MATCH_DATA, 0, 0, null, null, udMNEMONIC_ACTIVATE); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1014 return result; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1015 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1016 |
152
17f8449522fd
overloads second walkthrough
Frank Benoit <benoit@tionex.de>
parents:
150
diff
changeset
|
1017 bool mnemonicMatch (GtkWidget* mnemonicHandle, wchar key) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1018 int keyval1 = OS.gdk_keyval_to_lower (OS.gdk_unicode_to_keyval (key)); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1019 int keyval2 = OS.gdk_keyval_to_lower (OS.gtk_label_get_mnemonic_keyval (cast(GtkLabel*)mnemonicHandle)); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1020 return keyval1 is keyval2; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1021 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1022 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1023 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1024 * Notifies all of the receiver's listeners for events |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1025 * of the given type that one such event has occurred by |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1026 * invoking their <code>handleEvent()</code> method. The |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1027 * event type is one of the event constants defined in class |
71 | 1028 * <code>DWT</code>. |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1029 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1030 * @param eventType the type of event which has occurred |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1031 * @param event the event data |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1032 * |
71 | 1033 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1034 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1035 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1036 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1037 * |
71 | 1038 * @see DWT |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1039 * @see #addListener |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1040 * @see #removeListener(int, Listener) |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1041 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1042 public void notifyListeners (int eventType, Event event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1043 checkWidget(); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1044 if (event is null) event = new Event (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1045 sendEvent (eventType, event); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1046 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1047 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1048 void postEvent (int eventType) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1049 sendEvent (eventType, null, false); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1050 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1051 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1052 void postEvent (int eventType, Event event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1053 sendEvent (eventType, event, false); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1054 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1055 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1056 void register () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1057 if (handle is null) return; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1058 if ((state & HANDLE) !is 0) display.addWidget (handle, this); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1059 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1060 |
28 | 1061 void release (bool destroy) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1062 if ((state & DISPOSE_SENT) is 0) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1063 state |= DISPOSE_SENT; |
71 | 1064 sendEvent (DWT.Dispose); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1065 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1066 if ((state & DISPOSED) is 0) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1067 releaseChildren (destroy); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1068 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1069 if ((state & RELEASED) is 0) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1070 state |= RELEASED; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1071 if (destroy) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1072 releaseParent (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1073 releaseWidget (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1074 destroyWidget (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1075 } else { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1076 releaseWidget (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1077 releaseHandle (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1078 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1079 } |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1080 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1081 |
28 | 1082 void releaseChildren (bool destroy) { |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1083 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1084 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1085 void releaseHandle () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1086 handle = null; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1087 state |= DISPOSED; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1088 display = null; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1089 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1090 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1091 void releaseParent () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1092 /* Do nothing */ |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1093 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1094 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1095 void releaseWidget () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1096 deregister (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1097 eventTable = null; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1098 data = null; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1099 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1100 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1101 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1102 * Removes the listener from the collection of listeners who will |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1103 * be notified when an event of the given type occurs. The event |
71 | 1104 * type is one of the event constants defined in class <code>DWT</code>. |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1105 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1106 * @param eventType the type of event to listen for |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1107 * @param listener the listener which should no longer be notified when the event occurs |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1108 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1109 * @exception IllegalArgumentException <ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1110 * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1111 * </ul> |
71 | 1112 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1113 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1114 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1115 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1116 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1117 * @see Listener |
71 | 1118 * @see DWT |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1119 * @see #addListener |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1120 * @see #notifyListeners |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1121 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1122 public void removeListener (int eventType, Listener handler) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1123 checkWidget (); |
71 | 1124 if (handler is null) error (DWT.ERROR_NULL_ARGUMENT); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1125 if (eventTable is null) return; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1126 eventTable.unhook (eventType, handler); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1127 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1128 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1129 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1130 * Removes the listener from the collection of listeners who will |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1131 * be notified when an event of the given type occurs. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1132 * <p> |
71 | 1133 * <b>IMPORTANT:</b> This method is <em>not</em> part of the DWT |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1134 * public API. It is marked public only so that it can be shared |
71 | 1135 * within the packages provided by DWT. It should never be |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1136 * referenced from application code. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1137 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1138 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1139 * @param eventType the type of event to listen for |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1140 * @param listener the listener which should no longer be notified when the event occurs |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1141 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1142 * @exception IllegalArgumentException <ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1143 * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1144 * </ul> |
71 | 1145 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1146 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1147 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1148 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1149 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1150 * @see Listener |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1151 * @see #addListener |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1152 */ |
71 | 1153 protected void removeListener (int eventType, DWTEventListener handler) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1154 checkWidget (); |
71 | 1155 if (handler is null) error (DWT.ERROR_NULL_ARGUMENT); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1156 if (eventTable is null) return; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1157 eventTable.unhook (eventType, handler); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1158 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1159 |
89
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1160 void rendererGetSizeProc ( |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1161 GtkCellRenderer *cell, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1162 GtkWidget *widget, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1163 GdkRectangle *cell_area, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1164 int *x_offset, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1165 int *y_offset, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1166 int *width, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1167 int *height) |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1168 { |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1169 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1170 |
89
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1171 void rendererRenderProc ( |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1172 GtkCellRenderer * cell, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1173 GdkDrawable * window, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1174 GtkWidget * widget, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1175 GdkRectangle *background_area, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1176 GdkRectangle *cell_area, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1177 GdkRectangle *expose_area, |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1178 int flags) |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1179 { |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1180 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1181 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1182 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1183 * Removes the listener from the collection of listeners who will |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1184 * be notified when the widget is disposed. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1185 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1186 * @param listener the listener which should no longer be notified when the receiver is disposed |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1187 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1188 * @exception IllegalArgumentException <ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1189 * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1190 * </ul> |
71 | 1191 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1192 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1193 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1194 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1195 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1196 * @see DisposeListener |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1197 * @see #addDisposeListener |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1198 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1199 public void removeDisposeListener (DisposeListener listener) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1200 checkWidget (); |
71 | 1201 if (listener is null) error (DWT.ERROR_NULL_ARGUMENT); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1202 if (eventTable is null) return; |
71 | 1203 eventTable.unhook (DWT.Dispose, listener); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1204 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1205 |
120 | 1206 |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1207 void sendEvent (Event event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1208 Display display = event.display; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1209 if (!display.filterEvent (event)) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1210 if (eventTable !is null) eventTable.sendEvent (event); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1211 } |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1212 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1213 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1214 void sendEvent (int eventType) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1215 sendEvent (eventType, null, true); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1216 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1217 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1218 void sendEvent (int eventType, Event event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1219 sendEvent (eventType, event, true); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1220 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1221 |
28 | 1222 void sendEvent (int eventType, Event event, bool send) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1223 if (eventTable is null && !display.filters (eventType)) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1224 return; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1225 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1226 if (event is null) event = new Event (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1227 event.type = eventType; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1228 event.display = display; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1229 event.widget = this; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1230 if (event.time is 0) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1231 event.time = display.getLastEventTime (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1232 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1233 if (send) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1234 sendEvent (event); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1235 } else { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1236 display.postEvent (event); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1237 } |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1238 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1239 |
28 | 1240 bool sendKeyEvent (int type, GdkEventKey* keyEvent) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1241 int len = keyEvent.length; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1242 if (keyEvent.string is null || OS.g_utf8_strlen (keyEvent.string, len) <= 1) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1243 Event event = new Event (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1244 event.time = keyEvent.time; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1245 if (!setKeyState (event, keyEvent)) return true; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1246 sendEvent (type, event); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1247 // widget could be disposed at this point |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1248 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1249 /* |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1250 * It is possible (but unlikely), that application |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1251 * code could have disposed the widget in the key |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1252 * events. If this happens, end the processing of |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1253 * the key by returning false. |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1254 */ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1255 if (isDisposed ()) return false; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1256 return event.doit; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1257 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1258 char [] chars = fromUtf8z( keyEvent.string ); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1259 return sendIMKeyEvent (type, keyEvent, chars) !is null; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1260 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1261 |
28 | 1262 char [] sendIMKeyEvent (int type, GdkEventKey* keyEvent, char [] chars) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1263 int index = 0, count = 0, state = 0; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1264 GdkEvent* ptr = null; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1265 if (keyEvent is null) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1266 ptr = OS.gtk_get_current_event (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1267 if (ptr !is null) { |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1268 keyEvent = cast(GdkEventKey*)ptr; |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1269 switch (cast(int)keyEvent.type) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1270 case OS.GDK_KEY_PRESS: |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1271 case OS.GDK_KEY_RELEASE: |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1272 state = keyEvent.state; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1273 break; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1274 default: |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1275 keyEvent = null; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1276 break; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1277 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1278 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1279 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1280 if (keyEvent is null) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1281 int buffer; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1282 OS.gtk_get_current_event_state (&buffer); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1283 state = buffer; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1284 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1285 while (index < chars.length) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1286 Event event = new Event (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1287 if (keyEvent !is null && chars.length <= 1) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1288 setKeyState (event, keyEvent); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1289 } else { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1290 setInputState (event, state); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1291 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1292 event.character = chars [index]; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1293 sendEvent (type, event); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1294 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1295 /* |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1296 * It is possible (but unlikely), that application |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1297 * code could have disposed the widget in the key |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1298 * events. If this happens, end the processing of |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1299 * the key by returning null. |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1300 */ |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1301 if (isDisposed ()) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1302 if (ptr !is null) OS.gdk_event_free (ptr); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1303 return null; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1304 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1305 if (event.doit) chars [count++] = chars [index]; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1306 index++; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1307 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1308 if (ptr !is null) OS.gdk_event_free (ptr); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1309 if (count is 0) return null; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1310 if (index !is count) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1311 char [] result = new char [count]; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1312 System.arraycopy (chars, 0, result, 0, count); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1313 return result; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1314 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1315 return chars; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1316 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1317 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1318 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1319 * Sets the application defined widget data associated |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1320 * with the receiver to be the argument. The <em>widget |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1321 * data</em> is a single, unnamed field that is stored |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1322 * with every widget. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1323 * <p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1324 * Applications may put arbitrary objects in this field. If |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1325 * the object stored in the widget data needs to be notified |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1326 * when the widget is disposed of, it is the application's |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1327 * responsibility to hook the Dispose event on the widget and |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1328 * do so. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1329 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1330 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1331 * @param data the widget data |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1332 * |
71 | 1333 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1334 * <li>ERROR_WIDGET_DISPOSED - when the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1335 * <li>ERROR_THREAD_INVALID_ACCESS - when called from the wrong thread</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1336 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1337 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1338 * @see #getData() |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1339 */ |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1340 public void setData (Object data) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1341 checkWidget(); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1342 if ((state & KEYED_DATA) !is 0) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1343 (cast(ArrayWrapperObject) this.data).array[0] = data; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1344 } else { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1345 this.data = data; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1346 } |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1347 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1348 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1349 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1350 * Sets the application defined property of the receiver |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1351 * with the specified name to the given value. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1352 * <p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1353 * Applications may associate arbitrary objects with the |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1354 * receiver in this fashion. If the objects stored in the |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1355 * properties need to be notified when the widget is disposed |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1356 * of, it is the application's responsibility to hook the |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1357 * Dispose event on the widget and do so. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1358 * </p> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1359 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1360 * @param key the name of the property |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1361 * @param value the new value for the property |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1362 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1363 * @exception IllegalArgumentException <ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1364 * <li>ERROR_NULL_ARGUMENT - if the key is null</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1365 * </ul> |
71 | 1366 * @exception DWTException <ul> |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1367 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1368 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1369 * </ul> |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1370 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1371 * @see #getData(String) |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1372 */ |
28 | 1373 public void setData (char[] key, Object value) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1374 checkWidget(); |
120 | 1375 if (key.length is 0) error (DWT.ERROR_NULL_ARGUMENT); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1376 int index = 1; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1377 Object [] table = null; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1378 if ((state & KEYED_DATA) !is 0) { |
120 | 1379 table = (cast(ArrayWrapperObject) data).array; |
1380 while (index < table.length) { | |
1381 char[] tablekey = (cast(ArrayWrapperString)table[index]).array; | |
1382 if (key ==/*eq*/ tablekey ) break; | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1383 index += 2; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1384 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1385 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1386 if (value !is null) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1387 if ((state & KEYED_DATA) !is 0) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1388 if (index is table.length) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1389 Object [] newTable = new Object [table.length + 2]; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1390 System.arraycopy (table, 0, newTable, 0, table.length); |
28 | 1391 table = newTable; |
1392 data = new ArrayWrapperObject( table ); | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1393 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1394 } else { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1395 table = new Object [3]; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1396 table [0] = data; |
28 | 1397 data = new ArrayWrapperObject( table ); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1398 state |= KEYED_DATA; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1399 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1400 table [index] = new ArrayWrapperString( key ); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1401 table [index + 1] = value; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1402 } else { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1403 if ((state & KEYED_DATA) !is 0) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1404 if (index !is table.length) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1405 int len = table.length - 2; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1406 if (len is 1) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1407 data = table [0]; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1408 state &= ~KEYED_DATA; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1409 } else { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1410 Object [] newTable = new Object [len]; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1411 System.arraycopy (table, 0, newTable, 0, index); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1412 System.arraycopy (table, index + 2, newTable, index, len - index); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1413 data = new ArrayWrapperObject( newTable ); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1414 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1415 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1416 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1417 } |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1418 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1419 |
28 | 1420 void setForegroundColor (GtkWidget* handle, GdkColor* color) { |
1421 auto style = OS.gtk_widget_get_modifier_style (handle); | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1422 OS.gtk_rc_style_set_fg (style, OS.GTK_STATE_NORMAL, color); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1423 OS.gtk_rc_style_set_fg (style, OS.GTK_STATE_ACTIVE, color); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1424 OS.gtk_rc_style_set_fg (style, OS.GTK_STATE_PRELIGHT, color); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1425 int flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_NORMAL); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1426 flags = (color is null) ? flags & ~OS.GTK_RC_FG: flags | OS.GTK_RC_FG; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1427 OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_NORMAL, flags); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1428 flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_ACTIVE); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1429 flags = (color is null) ? flags & ~OS.GTK_RC_FG: flags | OS.GTK_RC_FG; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1430 OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_ACTIVE, flags); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1431 flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_PRELIGHT); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1432 flags = (color is null) ? flags & ~OS.GTK_RC_FG: flags | OS.GTK_RC_FG; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1433 OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_PRELIGHT, flags); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1434 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1435 OS.gtk_rc_style_set_text (style, OS.GTK_STATE_NORMAL, color); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1436 OS.gtk_rc_style_set_text (style, OS.GTK_STATE_ACTIVE, color); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1437 OS.gtk_rc_style_set_text (style, OS.GTK_STATE_PRELIGHT, color); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1438 flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_NORMAL); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1439 flags = (color is null) ? flags & ~OS.GTK_RC_TEXT: flags | OS.GTK_RC_TEXT; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1440 OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_NORMAL, flags); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1441 flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_PRELIGHT); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1442 flags = (color is null) ? flags & ~OS.GTK_RC_TEXT: flags | OS.GTK_RC_TEXT; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1443 OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_PRELIGHT, flags); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1444 flags = OS.gtk_rc_style_get_color_flags (style, OS.GTK_STATE_ACTIVE); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1445 flags = (color is null) ? flags & ~OS.GTK_RC_TEXT: flags | OS.GTK_RC_TEXT; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1446 OS.gtk_rc_style_set_color_flags (style, OS.GTK_STATE_ACTIVE, flags); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1447 OS.gtk_widget_modify_style (handle, style); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1448 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1449 |
28 | 1450 bool setInputState (Event event, int state) { |
71 | 1451 if ((state & OS.GDK_MOD1_MASK) !is 0) event.stateMask |= DWT.ALT; |
1452 if ((state & OS.GDK_SHIFT_MASK) !is 0) event.stateMask |= DWT.SHIFT; | |
1453 if ((state & OS.GDK_CONTROL_MASK) !is 0) event.stateMask |= DWT.CONTROL; | |
1454 if ((state & OS.GDK_BUTTON1_MASK) !is 0) event.stateMask |= DWT.BUTTON1; | |
1455 if ((state & OS.GDK_BUTTON2_MASK) !is 0) event.stateMask |= DWT.BUTTON2; | |
1456 if ((state & OS.GDK_BUTTON3_MASK) !is 0) event.stateMask |= DWT.BUTTON3; | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1457 return true; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1458 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1459 |
28 | 1460 bool setKeyState (Event event, GdkEventKey* keyEvent) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1461 if (keyEvent.string !is null && OS.g_utf8_strlen (keyEvent.string, keyEvent.length) > 1) return false; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1462 bool isNull = false; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1463 event.keyCode = Display.translateKey (keyEvent.keyval); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1464 switch (keyEvent.keyval) { |
71 | 1465 case OS.GDK_BackSpace: event.character = DWT.BS; break; |
1466 case OS.GDK_Linefeed: event.character = DWT.LF; break; | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1467 case OS.GDK_KP_Enter: |
71 | 1468 case OS.GDK_Return: event.character = DWT.CR; break; |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1469 case OS.GDK_KP_Delete: |
71 | 1470 case OS.GDK_Delete: event.character = DWT.DEL; break; |
1471 case OS.GDK_Escape: event.character = DWT.ESC; break; | |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1472 case OS.GDK_Tab: |
71 | 1473 case OS.GDK_ISO_Left_Tab: event.character = DWT.TAB; break; |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1474 default: { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1475 if (event.keyCode is 0) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1476 uint keyval; |
28 | 1477 int effective_group, level; |
33
27324bbbac70
changed to regenerated BCD bindings
Frank Benoit <benoit@tionex.de>
parents:
29
diff
changeset
|
1478 int consumed_modifiers; |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1479 if (OS.gdk_keymap_translate_keyboard_state(OS.gdk_keymap_get_default (), keyEvent.hardware_keycode, 0, keyEvent.group, &keyval, &effective_group, &level, &consumed_modifiers)) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1480 event.keyCode = OS.gdk_keyval_to_unicode (keyval ); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1481 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1482 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1483 int key = keyEvent.keyval; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1484 if ((keyEvent.state & OS.GDK_CONTROL_MASK) !is 0 && (0 <= key && key <= 0x7F)) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1485 if ('a' <= key && key <= 'z') key -= 'a' - 'A'; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1486 if (64 <= key && key <= 95) key -= 64; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1487 event.character = cast(char) key; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1488 isNull = keyEvent.keyval is '@' && key is 0; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1489 } else { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1490 event.character = cast(char) OS.gdk_keyval_to_unicode (key); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1491 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1492 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1493 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1494 if (event.keyCode is 0 && event.character is 0) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1495 if (!isNull) return false; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1496 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1497 return setInputState (event, keyEvent.state); |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1498 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1499 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1500 void setOrientation () { |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1501 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1502 |
38 | 1503 int /*long*/ shellMapProc (GtkWidget* handle, int /*long*/ arg0, int /*long*/ user_data) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1504 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1505 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1506 |
38 | 1507 int /*long*/ sizeAllocateProc (GtkWidget* handle, int /*long*/ arg0, int /*long*/ user_data) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1508 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1509 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1510 |
38 | 1511 int /*long*/ sizeRequestProc (GtkWidget* handle, int /*long*/ arg0, int /*long*/ user_data) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1512 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1513 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1514 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1515 /** |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1516 * Returns a string containing a concise, human-readable |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1517 * description of the receiver. |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1518 * |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1519 * @return a string representation of the receiver |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1520 */ |
150
f2e04420fd6c
reworked overrides and superclass aliases
Frank Benoit <benoit@tionex.de>
parents:
120
diff
changeset
|
1521 public override char[] toString () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1522 char[] str = "*Disposed*"; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1523 if (!isDisposed ()) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1524 str = "*Wrong Thread*"; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1525 if (isValidThread ()) str = getNameText (); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1526 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1527 return getName () ~ " {" ~ str ~ "}"; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1528 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1529 |
28 | 1530 GtkWidget* topHandle () { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1531 return handle; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1532 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1533 |
28 | 1534 int /*long*/ timerProc (GtkWidget* widget) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1535 return 0; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1536 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1537 |
90
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
1538 void treeSelectionProc ( |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
1539 GtkTreeModel *model, |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
1540 GtkTreePath *path, |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
1541 GtkTreeIter *iter, |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
1542 int[] selection, |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
1543 int length) |
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
1544 { |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1545 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1546 |
28 | 1547 bool translateTraversal (int event) { |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1548 return false; |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1549 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1550 |
28 | 1551 int /*long*/ windowProc (GtkWidget* handle, int /*long*/ user_data) { |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1552 void trace( char[] str ){ |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1553 version(LOG) Stderr.formatln( "Widget windowProc {}", str ).flush; |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1554 } |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1555 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1556 switch (cast(int)/*64*/user_data) { |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1557 case ACTIVATE: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1558 trace( "ACTIVATE" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1559 return gtk_activate (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1560 case CHANGED: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1561 trace( "CHANGED" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1562 return gtk_changed (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1563 case CLICKED: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1564 trace( "CLICKED" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1565 return gtk_clicked (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1566 case DAY_SELECTED: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1567 trace( "DAY_SELECTED" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1568 return gtk_day_selected (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1569 case HIDE: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1570 trace( "HIDE" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1571 return gtk_hide (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1572 case GRAB_FOCUS: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1573 trace( "GRAB_FOCUS" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1574 return gtk_grab_focus (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1575 case MAP: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1576 trace( "MAP" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1577 return gtk_map (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1578 case MONTH_CHANGED: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1579 trace( "MONTH_CHANGED" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1580 return gtk_month_changed (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1581 case OUTPUT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1582 trace( "OUTPUT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1583 return gtk_output (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1584 case POPUP_MENU: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1585 trace( "POPUP_MENU" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1586 return gtk_popup_menu (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1587 case PREEDIT_CHANGED: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1588 trace( "PREEDIT_CHANGED" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1589 return gtk_preedit_changed (cast(GtkIMContext*)handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1590 case REALIZE: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1591 trace( "REALIZE" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1592 return gtk_realize (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1593 case SELECT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1594 trace( "SELECT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1595 return gtk_select (cast(int)handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1596 case SHOW: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1597 trace( "SHOW" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1598 return gtk_show (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1599 case VALUE_CHANGED: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1600 trace( "VALUE_CHANGED" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1601 return gtk_value_changed (cast(int)handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1602 case UNMAP: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1603 trace( "UNMAP" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1604 return gtk_unmap (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1605 case UNREALIZE: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1606 trace( "UNREALIZE" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1607 return gtk_unrealize (handle); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1608 default: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1609 trace( "default" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1610 return 0; |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1611 } |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1612 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1613 |
28 | 1614 int /*long*/ windowProc (GtkWidget* handle, int /*long*/ arg0, int /*long*/ user_data) { |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1615 void trace( char[] str ){ |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1616 version(LOG) Stderr.formatln( "Widget windowProc1 {}", str ).flush; |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1617 } |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1618 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1619 switch (cast(int)/*64*/user_data) { |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1620 case EXPOSE_EVENT_INVERSE: { |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1621 trace( "EXPOSE_EVENT_INVERSE" ); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1622 GdkEventExpose* gdkEvent = cast(GdkEventExpose*) arg0; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1623 auto paintWindow = paintWindow(); |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1624 auto window = gdkEvent.window; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1625 if (window !is paintWindow) return 0; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1626 return (state & OBSCURED) !is 0 ? 1 : 0; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1627 } |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1628 case BUTTON_PRESS_EVENT_INVERSE: |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1629 case BUTTON_RELEASE_EVENT_INVERSE: |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1630 case MOTION_NOTIFY_EVENT_INVERSE: { |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1631 trace( "BUTTON_PRESS_EVENT_INVERSE BUTTON_RELEASE_EVENT_INVERSE MOTION_NOTIFY_EVENT_INVERSE" ); |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1632 return 1; |
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1633 } |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1634 case BUTTON_PRESS_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1635 trace( "BUTTON_PRESS_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1636 return gtk_button_press_event (handle, cast(GdkEventButton*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1637 case BUTTON_RELEASE_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1638 trace( "BUTTON_RELEASE_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1639 return gtk_button_release_event (handle, cast(GdkEventButton*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1640 case COMMIT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1641 trace( "COMMIT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1642 return gtk_commit (cast(GtkIMContext*)handle, cast(char*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1643 case CONFIGURE_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1644 trace( "CONFIGURE_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1645 return gtk_configure_event (handle, arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1646 case DELETE_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1647 trace( "DELETE_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1648 return gtk_delete_event (handle, arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1649 case ENTER_NOTIFY_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1650 trace( "ENTER_NOTIFY_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1651 return gtk_enter_notify_event (handle, cast(GdkEventCrossing*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1652 case EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1653 trace( "EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1654 return gtk_event (handle, cast(GdkEvent*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1655 case EVENT_AFTER: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1656 trace( "EVENT_AFTER" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1657 return gtk_event_after (handle, cast(GdkEvent*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1658 case EXPOSE_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1659 trace( "EXPOSE_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1660 return gtk_expose_event (handle, cast(GdkEventExpose*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1661 case FOCUS: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1662 trace( "FOCUS" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1663 return gtk_focus (handle, arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1664 case FOCUS_IN_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1665 trace( "FOCUS_IN_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1666 return gtk_focus_in_event (handle, cast(GdkEventFocus*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1667 case FOCUS_OUT_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1668 trace( "FOCUS_OUT_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1669 return gtk_focus_out_event (handle, cast(GdkEventFocus*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1670 case KEY_PRESS_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1671 trace( "KEY_PRESS_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1672 return gtk_key_press_event (handle, cast(GdkEventKey*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1673 case KEY_RELEASE_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1674 trace( "KEY_RELEASE_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1675 return gtk_key_release_event (handle, cast(GdkEventKey*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1676 case INPUT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1677 trace( "INPUT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1678 return gtk_input (handle, arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1679 case LEAVE_NOTIFY_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1680 trace( "LEAVE_NOTIFY_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1681 return gtk_leave_notify_event (handle, cast(GdkEventCrossing*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1682 case MAP_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1683 trace( "MAP_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1684 return gtk_map_event (handle, arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1685 case MNEMONIC_ACTIVATE: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1686 trace( "MNEMONIC_ACTIVATE" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1687 return gtk_mnemonic_activate (handle, arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1688 case MOTION_NOTIFY_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1689 trace( "MOTION_NOTIFY_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1690 return gtk_motion_notify_event (handle, cast(GdkEventMotion*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1691 case MOVE_FOCUS: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1692 trace( "MOVE_FOCUS" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1693 return gtk_move_focus (handle, arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1694 case SCROLL_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1695 trace( "SCROLL_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1696 return gtk_scroll_event (handle, cast(GdkEventScroll*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1697 case SHOW_HELP: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1698 trace( "SHOW_HELP" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1699 return gtk_show_help (handle, arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1700 case SIZE_ALLOCATE: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1701 trace( "SIZE_ALLOCATE" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1702 return gtk_size_allocate (handle, arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1703 case STYLE_SET: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1704 trace( "STYLE_SET" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1705 return gtk_style_set (handle, arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1706 case TOGGLED: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1707 trace( "TOGGLED" ); |
89
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1708 return gtk_toggled (cast(int)handle, cast(char*)arg0); |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1709 case UNMAP_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1710 trace( "UNMAP_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1711 return gtk_unmap_event (handle, arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1712 case VISIBILITY_NOTIFY_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1713 trace( "VISIBILITY_NOTIFY_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1714 return gtk_visibility_notify_event (handle, cast(GdkEventVisibility*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1715 case WINDOW_STATE_EVENT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1716 trace( "WINDOW_STATE_EVENT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1717 return gtk_window_state_event (handle, cast(GdkEventWindowState*)arg0); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1718 default: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1719 trace( "default" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1720 return 0; |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1721 } |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1722 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1723 |
28 | 1724 int /*long*/ windowProc (GtkWidget* handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ user_data) { |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1725 void trace( char[] str ){ |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1726 version(LOG) Stderr.formatln( "Widget windowProc2 {}", str ).flush; |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1727 } |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1728 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1729 switch (cast(int)/*64*/user_data) { |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1730 case DELETE_RANGE: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1731 trace( "DELETE_RANGE" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1732 return gtk_delete_range (handle, arg0, arg1); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1733 case DELETE_TEXT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1734 trace( "DELETE_TEXT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1735 return gtk_delete_text (handle, arg0, arg1); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1736 case ROW_ACTIVATED: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1737 trace( "ROW_ACTIVATED" ); |
89
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1738 gtk_row_activated (cast(GtkTreeView*)handle, cast(GtkTreePath*)arg0, cast(GtkTreeViewColumn*)arg1); |
9f6c2c92be2b
Table, TableColumn and TableItem
Frank Benoit <benoit@tionex.de>
parents:
77
diff
changeset
|
1739 return 0; |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1740 case SCROLL_CHILD: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1741 trace( "SCROLL_CHILD" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1742 return gtk_scroll_child (handle, arg0, arg1); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1743 case SWITCH_PAGE: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1744 trace( "SWITCH_PAGE" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1745 return gtk_switch_page (handle, arg0, arg1); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1746 case TEST_COLLAPSE_ROW: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1747 trace( "TEST_COLLAPSE_ROW" ); |
90
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
1748 return gtk_test_collapse_row (cast(GtkTreeView*)handle, cast(GtkTreeIter*)arg0, cast(GtkTreePath*)arg1); |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1749 case TEST_EXPAND_ROW: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1750 trace( "TEST_EXPAND_ROW" ); |
90
9ba02d7fb226
Tree, TreeItem and TreeColumn
Frank Benoit <benoit@tionex.de>
parents:
89
diff
changeset
|
1751 return gtk_test_expand_row(cast(GtkTreeView*)handle, cast(GtkTreeIter*)arg0, cast(GtkTreePath*)arg1); |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1752 default: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1753 trace( "default" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1754 return 0; |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1755 } |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1756 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1757 |
28 | 1758 int /*long*/ windowProc (GtkWidget* handle, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ user_data) { |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1759 void trace( char[] str ){ |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1760 version(LOG) Stderr.formatln( "Widget windowProc3 {}", str ).flush; |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1761 } |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1762 |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1763 switch (cast(int)/*64*/user_data) { |
66
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1764 case CHANGE_VALUE: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1765 trace( "CHANGE_VALUE" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1766 return gtk_change_value (handle, arg0, arg1, arg2); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1767 case EXPAND_COLLAPSE_CURSOR_ROW: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1768 trace( "EXPAND_COLLAPSE_CURSOR_ROW" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1769 return gtk_expand_collapse_cursor_row (handle, arg0, arg1, arg2); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1770 case INSERT_TEXT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1771 trace( "INSERT_TEXT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1772 return gtk_insert_text (cast(GtkEditable*)handle, cast(char*)arg0, arg1, arg2); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1773 case TEXT_BUFFER_INSERT_TEXT: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1774 trace( "TEXT_BUFFER_INSERT_TEXT" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1775 return gtk_text_buffer_insert_text (cast(GtkTextBuffer*)handle, cast(GtkTextIter*)arg0, cast(char*)arg1, arg2); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1776 default: |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1777 trace( "default" ); |
bb2217c09e61
Fixed signal blocking/unblocking:
Frank Benoit <benoit@tionex.de>
parents:
60
diff
changeset
|
1778 return 0; |
59
8cec8f536af3
All D sources complete gvim retab (4 spaces), bug with Composite moveAbove/moveBelow fixed.
Frank Benoit <benoit@tionex.de>
parents:
58
diff
changeset
|
1779 } |
25
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1780 } |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1781 |
fc2b263b8a3f
Merged back the System.arraycopy and use a System class
Frank Benoit <benoit@tionex.de>
parents:
diff
changeset
|
1782 } |