mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
Compare commits
534
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4147a93068 | ||
|
|
051ff83952 | ||
|
|
e2becf58a9 | ||
|
|
ed8732872b | ||
|
|
a04ffadd7e | ||
|
|
54d3a8f59e | ||
|
|
617d43420c | ||
|
|
e395c57b2a | ||
|
|
37123e347e | ||
|
|
c76c5a2be9 | ||
|
|
fcef4ebc68 | ||
|
|
a0c137790b | ||
|
|
8fd846bf0a | ||
|
|
b173582247 | ||
|
|
b6fe7eeddd | ||
|
|
edf77a4a9a | ||
|
|
a18e604768 | ||
|
|
adb3e06e63 | ||
|
|
00b474ee98 | ||
|
|
219c2e2923 | ||
|
|
a359e84040 | ||
|
|
be620c3408 | ||
|
|
30fe4d3cb5 | ||
|
|
e944d50cef | ||
|
|
5c810089c1 | ||
|
|
aa7574acdb | ||
|
|
8ba518e76f | ||
|
|
d760e66977 | ||
|
|
d625202604 | ||
|
|
168c288631 | ||
|
|
4e6f20adb3 | ||
|
|
3d3dd9eb8e | ||
|
|
ce6ee30fe4 | ||
|
|
5e963bcf5d | ||
|
|
b287d431b5 | ||
|
|
b286bf5179 | ||
|
|
9a7d3973b2 | ||
|
|
13f40a38f3 | ||
|
|
26082385ee | ||
|
|
7ac6994303 | ||
|
|
d1e3e4a4ec | ||
|
|
589971802b | ||
|
|
3a8023de4a | ||
|
|
6ac70f813a | ||
|
|
51e69e4674 | ||
|
|
ca782149cd | ||
|
|
a0a7d7e255 | ||
|
|
a3b0e4b652 | ||
|
|
27f8787c6c | ||
|
|
534c7a2c2a | ||
|
|
c7229c7551 | ||
|
|
fee3f7c382 | ||
|
|
0fe27d146d | ||
|
|
9ced887f71 | ||
|
|
a54b2d7817 | ||
|
|
4054f4d83f | ||
|
|
8156b22f87 | ||
|
|
0c09ab72e5 | ||
|
|
12b2f0e7c7 | ||
|
|
23824f11f1 | ||
|
|
9904f37266 | ||
|
|
effb5efcac | ||
|
|
f23a2c4a33 | ||
|
|
f4bdfe7e7c | ||
|
|
7dc4ecf189 | ||
|
|
ec12d06a98 | ||
|
|
951f759f1b | ||
|
|
f3dd797697 | ||
|
|
3e1171f36a | ||
|
|
607c16cb86 | ||
|
|
1e9e7d9ee7 | ||
|
|
ac8704eed0 | ||
|
|
5eccec4f8d | ||
|
|
54c7a9cbfb | ||
|
|
48b6668436 | ||
|
|
36ae1a4488 | ||
|
|
6c7ace253c | ||
|
|
6284c84eb7 | ||
|
|
243ec2f2a7 | ||
|
|
877e17230a | ||
|
|
0e2fcdce63 | ||
|
|
8995defef7 | ||
|
|
6ab44a36cb | ||
|
|
e60d0e2982 | ||
|
|
238f2ff322 | ||
|
|
9c5f90d9c4 | ||
|
|
cfcca8f235 | ||
|
|
a724f82493 | ||
|
|
1dfdef5631 | ||
|
|
7006de857a | ||
|
|
1e9a55cf9e | ||
|
|
0dea85d6fe | ||
|
|
d4516d8678 | ||
|
|
9624b29657 | ||
|
|
d50e91d67f | ||
|
|
2b0d5288b7 | ||
|
|
4635491b7e | ||
|
|
74cebebcb5 | ||
|
|
998fd8c065 | ||
|
|
4d06e628f8 | ||
|
|
1e73251274 | ||
|
|
901d0ff658 | ||
|
|
63bd1901a0 | ||
|
|
921bb1fdb4 | ||
|
|
e7ecb4c4d0 | ||
|
|
1a06c0238c | ||
|
|
0990f55340 | ||
|
|
01502f2526 | ||
|
|
e94d4efa94 | ||
|
|
1dc8ef4391 | ||
|
|
cc495bc616 | ||
|
|
8f534540ce | ||
|
|
567704a032 | ||
|
|
f0c3de7298 | ||
|
|
2868f1e62d | ||
|
|
6073498a99 | ||
|
|
60c4e915b8 | ||
|
|
64c18b175d | ||
|
|
4bb4c32cf5 | ||
|
|
5c547851a1 | ||
|
|
2e0a8f65ae | ||
|
|
09625a5c5e | ||
|
|
ac47537db2 | ||
|
|
5addfa6d64 | ||
|
|
ef6a384543 | ||
|
|
3e70582560 | ||
|
|
1329f66618 | ||
|
|
2e4c675be7 | ||
|
|
cf42d05cbd | ||
|
|
b26f3e034a | ||
|
|
4fcdc1838f | ||
|
|
beae31c28d | ||
|
|
1d4eff3e3f | ||
|
|
70b90169ac | ||
|
|
572c5dd0dc | ||
|
|
e5e4d5f30a | ||
|
|
1b4b569bd7 | ||
|
|
68710d1662 | ||
|
|
521e6d4a3b | ||
|
|
642e198e29 | ||
|
|
ee18084318 | ||
|
|
e5b15494b2 | ||
|
|
524f401e02 | ||
|
|
f69764238b | ||
|
|
c21729f6ca | ||
|
|
e63e0963f8 | ||
|
|
80ec54d87a | ||
|
|
c6714c6bfe | ||
|
|
89c42ecd9d | ||
|
|
84dc0f3135 | ||
|
|
582e3b313f | ||
|
|
4592e1fca4 | ||
|
|
1748763acc | ||
|
|
05adac8f24 | ||
|
|
702724fd19 | ||
|
|
8a1d910f40 | ||
|
|
ccbb8e3b50 | ||
|
|
74ac0aa7b1 | ||
|
|
4354a1b8fb | ||
|
|
7a32a29c20 | ||
|
|
c884cdbe40 | ||
|
|
699527a6f6 | ||
|
|
a71b1eca06 | ||
|
|
9ca70719ad | ||
|
|
c539cf49a2 | ||
|
|
4a29148533 | ||
|
|
3a58628a3b | ||
|
|
33297ac713 | ||
|
|
447590f787 | ||
|
|
70753f8feb | ||
|
|
e5e6203b9b | ||
|
|
cff7c392ce | ||
|
|
f8c8d81e7f | ||
|
|
99b4cb33d9 | ||
|
|
2b4e73ad1c | ||
|
|
b6bec0c78f | ||
|
|
c683c2cd1a | ||
|
|
23c64685e5 | ||
|
|
99e82424c8 | ||
|
|
630914904f | ||
|
|
53dbd17ba1 | ||
|
|
bd597361e0 | ||
|
|
611316845b | ||
|
|
f614b228dc | ||
|
|
5e0a4df0d8 | ||
|
|
2aba10408a | ||
|
|
ee751dc4e9 | ||
|
|
54916e1a88 | ||
|
|
a44076d1a4 | ||
|
|
051d8814cc | ||
|
|
56b8f97ad6 | ||
|
|
e5b1a479fd | ||
|
|
3cafdf69c5 | ||
|
|
1b6cb3b0ad | ||
|
|
2a54f7ba41 | ||
|
|
2bf7791b27 | ||
|
|
9c2848e25f | ||
|
|
2db32943b5 | ||
|
|
ace223bbfe | ||
|
|
00b1c549a7 | ||
|
|
bdf7e29582 | ||
|
|
debbf709d1 | ||
|
|
b86c32b401 | ||
|
|
0a5b6171d7 | ||
|
|
8db26e413f | ||
|
|
4dda2de1de | ||
|
|
8e3706c559 | ||
|
|
215f375fb4 | ||
|
|
6caf6203c3 | ||
|
|
e45d10831c | ||
|
|
da88e6b66e | ||
|
|
103552c72c | ||
|
|
6dde15ed4f | ||
|
|
4110f272ba | ||
|
|
8667d75a4b | ||
|
|
693d902e4b | ||
|
|
9dc920b0c6 | ||
|
|
7eea926385 | ||
|
|
8a5ab90026 | ||
|
|
488ecc889f | ||
|
|
748a1ef357 | ||
|
|
38cbdd968a | ||
|
|
18de07ff81 | ||
|
|
044db990c6 | ||
|
|
a05becde80 | ||
|
|
edce75b667 | ||
|
|
ed222fc830 | ||
|
|
3413a7f302 | ||
|
|
fe135d95dc | ||
|
|
f4bc6fe6eb | ||
|
|
1bb01d3e28 | ||
|
|
9fdc65a259 | ||
|
|
875edd6d8d | ||
|
|
d7651a163c | ||
|
|
4affca0e04 | ||
|
|
d248e18508 | ||
|
|
5757fa30be | ||
|
|
d54df3e29d | ||
|
|
47cd320811 | ||
|
|
8e48cbb8ff | ||
|
|
14a9440bd3 | ||
|
|
d33c1759a7 | ||
|
|
4565e2ec31 | ||
|
|
02d6c381dc | ||
|
|
9c847de0a2 | ||
|
|
1f09c72d4d | ||
|
|
111f13ecbe | ||
|
|
2c73c8d166 | ||
|
|
2a5d0a47b4 | ||
|
|
1e9d99a951 | ||
|
|
ed57714a5f | ||
|
|
e3abc83acb | ||
|
|
6cbebe399d | ||
|
|
f2f9a94bce | ||
|
|
ceb4f95251 | ||
|
|
b66e1b253b | ||
|
|
c396b3e156 | ||
|
|
3733f8ba87 | ||
|
|
b81061ba4c | ||
|
|
4b1eded31b | ||
|
|
dcbb59b493 | ||
|
|
a68a817312 | ||
|
|
657c877302 | ||
|
|
5c5fdf4a98 | ||
|
|
df6591d7f3 | ||
|
|
e792c7c5cd | ||
|
|
d2c8e83da7 | ||
|
|
c7d4f7e171 | ||
|
|
773832a3e5 | ||
|
|
a831ac16b5 | ||
|
|
e9889b6fca | ||
|
|
4573a15a1d | ||
|
|
c129af1942 | ||
|
|
29beaff7b5 | ||
|
|
f560e44dbe | ||
|
|
73cfa42470 | ||
|
|
c3b1bf8fe6 | ||
|
|
571dee84c3 | ||
|
|
3435d254bf | ||
|
|
773335c277 | ||
|
|
84afe617ac | ||
|
|
23224514c6 | ||
|
|
537c60cb52 | ||
|
|
8799bcab87 | ||
|
|
cb20bd6be1 | ||
|
|
a906a5f5c0 | ||
|
|
213249e0b0 | ||
|
|
f9b96ec9c3 | ||
|
|
8a01835f45 | ||
|
|
fd0fcfd2bc | ||
|
|
6df5b1ab24 | ||
|
|
f6d7377985 | ||
|
|
7416bb8d6f | ||
|
|
0fffd32d9a | ||
|
|
88497e0dbe | ||
|
|
84f2481310 | ||
|
|
9c6da612c7 | ||
|
|
07e391df4f | ||
|
|
5266794175 | ||
|
|
2e99b8d298 | ||
|
|
a57cd64a04 | ||
|
|
3699950a04 | ||
|
|
587cecdb0c | ||
|
|
6d95cf89e2 | ||
|
|
2cd43b9ee7 | ||
|
|
e562293608 | ||
|
|
b3913f7b77 | ||
|
|
27dcf5bcdd | ||
|
|
41dcb72519 | ||
|
|
011bd63fcc | ||
|
|
6b40ba726a | ||
|
|
79eeb04df2 | ||
|
|
42281c4845 | ||
|
|
4e27c09963 | ||
|
|
5221e53fda | ||
|
|
447168e8c8 | ||
|
|
c3bb988dd9 | ||
|
|
253431811a | ||
|
|
f608d928d4 | ||
|
|
e91cad6a63 | ||
|
|
aec32df817 | ||
|
|
f455475981 | ||
|
|
cdb057a21c | ||
|
|
bfee1fb2da | ||
|
|
fc4207b5ab | ||
|
|
0c662b57b3 | ||
|
|
2c8b06cd90 | ||
|
|
97246217a6 | ||
|
|
5e42abf59a | ||
|
|
e1de07f152 | ||
|
|
1620eac119 | ||
|
|
3545dd5eff | ||
|
|
76e4ebabf9 | ||
|
|
f8316c4caf | ||
|
|
1eb2fe23c4 | ||
|
|
8015223328 | ||
|
|
a02b4a95ab | ||
|
|
3702686059 | ||
|
|
6a378da272 | ||
|
|
38daa604b0 | ||
|
|
2c733c2a20 | ||
|
|
f7b2963b13 | ||
|
|
ba3f5b85ca | ||
|
|
fe46d4ce52 | ||
|
|
02fac1b92e | ||
|
|
bdf1c06ad3 | ||
|
|
2f81f65dc3 | ||
|
|
1f12b8d706 | ||
|
|
414705f5ef | ||
|
|
eef810c8ee | ||
|
|
d66224e87c | ||
|
|
3692cb862a | ||
|
|
152ad12e08 | ||
|
|
6cfc56cf39 | ||
|
|
cce4b3ae96 | ||
|
|
3b4c879ac0 | ||
|
|
93314cd44c | ||
|
|
ffcf1cfcac | ||
|
|
97c96f0a3c | ||
|
|
d07103e7f1 | ||
|
|
8384791b13 | ||
|
|
908ff003b9 | ||
|
|
3622cdcf9e | ||
|
|
081fb00ba2 | ||
|
|
3a6e1b6b60 | ||
|
|
b030a1037f | ||
|
|
0551783bfc | ||
|
|
5639cacb2c | ||
|
|
87fcf57b04 | ||
|
|
1b5a8c10e9 | ||
|
|
2e261bee40 | ||
|
|
71d851bad0 | ||
|
|
2f46599cce | ||
|
|
92a4d9045a | ||
|
|
9c47748a73 | ||
|
|
fe60d4b2f7 | ||
|
|
25cb2fe3ce | ||
|
|
badd19415b | ||
|
|
5fb1ea83ee | ||
|
|
fdb13aa520 | ||
|
|
6541fd6d40 | ||
|
|
eb6a81a956 | ||
|
|
c01b616f5d | ||
|
|
dea3d4c13f | ||
|
|
5747ae5c59 | ||
|
|
06093c36a5 | ||
|
|
c51ba6daae | ||
|
|
32a5444bfe | ||
|
|
b51b3e4c5d | ||
|
|
7e6582a25d | ||
|
|
a2760ee1d3 | ||
|
|
13fffc73a8 | ||
|
|
553aad470f | ||
|
|
2db3de1fd5 | ||
|
|
ce0ff3da1b | ||
|
|
7d258e14af | ||
|
|
a8ccb82ef3 | ||
|
|
d22ad668e7 | ||
|
|
2e3386df35 | ||
|
|
b47097ea6a | ||
|
|
5b902a4465 | ||
|
|
677b25b099 | ||
|
|
4474c0890f | ||
|
|
4c2bbc43a0 | ||
|
|
6a84d3c639 | ||
|
|
ab83dcf609 | ||
|
|
2251d1dcd8 | ||
|
|
5b1c13af04 | ||
|
|
d5b2e66dcf | ||
|
|
367427ab6f | ||
|
|
7ad0dcd256 | ||
|
|
15ed7fe07d | ||
|
|
9c7665f6b3 | ||
|
|
89a9ee6a34 | ||
|
|
620f50b194 | ||
|
|
129576c3bd | ||
|
|
1d2f1d82f4 | ||
|
|
764ba7255a | ||
|
|
44b32ca6f4 | ||
|
|
7c32587fbf | ||
|
|
021f4ee4e8 | ||
|
|
6d42d62ae5 | ||
|
|
58c4a474da | ||
|
|
d303868738 | ||
|
|
500a09486f | ||
|
|
493228944f | ||
|
|
b466b55a14 | ||
|
|
60b3b3c049 | ||
|
|
b17d5744ff | ||
|
|
de335d544b | ||
|
|
62110d8297 | ||
|
|
358ae990ef | ||
|
|
0249402d99 | ||
|
|
69429eec13 | ||
|
|
0631696d1e | ||
|
|
335216afa8 | ||
|
|
a7d7414faf | ||
|
|
afe8c349de | ||
|
|
69b263e693 | ||
|
|
db2ab7e334 | ||
|
|
59216cee4b | ||
|
|
9106dd2968 | ||
|
|
48e741dbdf | ||
|
|
10333b362b | ||
|
|
a4a3d5c5e9 | ||
|
|
1166c99e06 | ||
|
|
50bf4b4797 | ||
|
|
3d13c548d8 | ||
|
|
c397230784 | ||
|
|
47a05e7afc | ||
|
|
449432ab5e | ||
|
|
b1f84a518a | ||
|
|
888e98bb82 | ||
|
|
55e8d9fe73 | ||
|
|
5cec32213c | ||
|
|
5fd2b136bf | ||
|
|
6a1d7702da | ||
|
|
6fea64e409 | ||
|
|
39e59b5b8b | ||
|
|
73e1915d7c | ||
|
|
b5b5ac9edf | ||
|
|
c57e0d3528 | ||
|
|
9cf6749a38 | ||
|
|
d7cd77ceb2 | ||
|
|
2dbdaba4d5 | ||
|
|
16bc0ba7af | ||
|
|
689a401527 | ||
|
|
418456d7e5 | ||
|
|
be62236ebf | ||
|
|
8b677cc9ec | ||
|
|
56907edd29 | ||
|
|
9b8f2df735 | ||
|
|
2a5ca4ac29 | ||
|
|
83dd930019 | ||
|
|
a1f7112a5c | ||
|
|
47ac0d6681 | ||
|
|
cd0fb2445e | ||
|
|
45d0bc41e7 | ||
|
|
7b30a3f2e1 | ||
|
|
3cbe744843 | ||
|
|
ab10a29588 | ||
|
|
0f303c45b4 | ||
|
|
7b9799de93 | ||
|
|
ba03d63cf5 | ||
|
|
c950842ec2 | ||
|
|
77c26d6ab9 | ||
|
|
8feefe364c | ||
|
|
86f21eba3e | ||
|
|
8432e31ff8 | ||
|
|
f6b470089d | ||
|
|
fb4719a1c9 | ||
|
|
26c519a5c8 | ||
|
|
1e7a58a2e7 | ||
|
|
d3ce74361e | ||
|
|
6bf582e92d | ||
|
|
f1af90bdee | ||
|
|
65b5dbe70c | ||
|
|
311dcbd59f | ||
|
|
2cfe840c30 | ||
|
|
5383f53024 | ||
|
|
25817da862 | ||
|
|
e2690b1889 | ||
|
|
b41f3fa30e | ||
|
|
6a6bb6466b | ||
|
|
3c5660e0c6 | ||
|
|
43cabfc1bb | ||
|
|
914b9672a9 | ||
|
|
c72b629e45 | ||
|
|
b3fcae2543 | ||
|
|
e45bd026b8 | ||
|
|
f6f47e0a41 | ||
|
|
38b97371bb | ||
|
|
7b6cc1376d | ||
|
|
d011bcc972 | ||
|
|
14be840c31 | ||
|
|
82e7e5bb99 | ||
|
|
52086817ce | ||
|
|
6b27b55a02 | ||
|
|
0c3b1698d6 | ||
|
|
d499cd4cfc | ||
|
|
f1007b5b32 | ||
|
|
62d61f8472 | ||
|
|
29426ba37a | ||
|
|
ede46accad | ||
|
|
1fc3540d15 | ||
|
|
26c7b44618 | ||
|
|
4cb9b2f954 | ||
|
|
c5d82e771a | ||
|
|
e2e9c7e803 | ||
|
|
74666bdb71 | ||
|
|
198c316a65 | ||
|
|
3e23705cee | ||
|
|
5ed836eb64 | ||
|
|
30cf47ab7e |
No files matched your search
@@ -1,3 +1,42 @@
|
||||
2004-07-23 Dick Porter <[email protected]>
|
||||
|
||||
* configure.in: Changes for FreeBSD thread support by John
|
||||
Merryweather Cooper <[email protected]>.
|
||||
|
||||
2004-07-15 Jackson Harper <[email protected]>
|
||||
|
||||
* man/gacutil.1: MONO_GAC_PREFIX not MONO_GAC_PATH
|
||||
|
||||
2004-07-12 Massimiliano Mantione <[email protected]>
|
||||
|
||||
* docs/abc-removal.txt: Updated documentation for ABC removal.
|
||||
|
||||
2004-07-12 Massimiliano Mantione <[email protected]>
|
||||
|
||||
* mono/mini/abcremoval.c: Rewritten most of ABC removal.
|
||||
* mono/mini/abcremoval.h: Rewritten most of ABC removal.
|
||||
* mono/mini/build_relations_propagation_table.pl: Deleted (unneeded after the rewrite).
|
||||
* mono/mini/propagated_relations_table.def: Deleted (unneeded after the rewrite).
|
||||
|
||||
2004-07-03 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Add --with-tls option to replace the misnamed
|
||||
--with-nptl option.
|
||||
|
||||
2004-07-02 Raja R Harinath <[email protected]>
|
||||
|
||||
* Makefile.am (mcs-do-basic-build, mcs-do-short-build):
|
||||
Pass NO_SIGN_ASSEMBLY=yes to sub-make.
|
||||
($(tmpinst)/bin/mono) [PLATFORM_WIN32]: Make it work.
|
||||
|
||||
2004-07-02 Zoltan Varga <[email protected]>
|
||||
|
||||
* man/mono.1: Added 'aot' to trace options.
|
||||
|
||||
2004-06-30 Zoltan Varga <[email protected]>
|
||||
|
||||
* configure.in: Fix trunc check + add SPARC64 defines.
|
||||
|
||||
2004-06-29 Jackson Harper <[email protected]>
|
||||
|
||||
* man/gacutil.1: Update man with new command line options.
|
||||
|
||||
+3
-3
@@ -118,14 +118,14 @@ mono-do-runtime-only: $(CONFIG_HEADER)
|
||||
mcs-do-basic-build:
|
||||
rm -f $(MCS_FILES)
|
||||
for dir in $(MCS_BASIC_DIRS); do \
|
||||
(cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default USE_BOOT_COMPILE=yes BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB") || exit 1 ; \
|
||||
(cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default NO_SIGN_ASSEMBLY=yes USE_BOOT_COMPILE=yes BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB") || exit 1 ; \
|
||||
done
|
||||
|
||||
mcs-do-short-build:
|
||||
tmpinst=`cd $(tmpinst) && pwd` ; \
|
||||
PATH=$$tmpinst/bin:$$PATH; export PATH ; \
|
||||
for dir in $(MCS_DIRS); do \
|
||||
(cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default) || exit 1 ; \
|
||||
(cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default NO_SIGN_ASSEMBLY=yes) || exit 1 ; \
|
||||
done
|
||||
|
||||
mcs-do-full-build:
|
||||
@@ -170,7 +170,7 @@ $(tmpinst)/bin/mono: $(srcdir)/Makefile.am
|
||||
echo 'if test -z "$$MONO_PATH" ; then MONO_PATH="$$tmpinst\\lib"; else MONO_PATH="$${MONO_PATH};$$tmpinst\\lib" ; fi' >> $@
|
||||
echo 'MONO_CFG_DIR="$$tmpinst\\etc"' >> $@
|
||||
echo 'export MONO_PATH MONO_CFG_DIR' >> $@
|
||||
echo 'exec "$$builddir/libtool" --mode=execute "$$builddir/mono.exe" "$$@"' >> $@
|
||||
echo 'exec "$$builddir/libtool" --mode=execute "$$builddir/$(mono_runtime).exe" "$$@"' >> $@
|
||||
chmod +x $@
|
||||
|
||||
else
|
||||
|
||||
+79
-8
@@ -67,7 +67,60 @@ case "$host" in
|
||||
libdl=
|
||||
libgc_threads=no
|
||||
;;
|
||||
*-*-*freebsd*|*-*-*openbsd*)
|
||||
# these flags will work for all versions of -STABLE
|
||||
#
|
||||
*-*-*freebsd4)
|
||||
platform_win32=no
|
||||
if test "x$PTHREAD_CFLAGS" = "x"; then
|
||||
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
|
||||
libmono_cflags="-D_THREAD_SAFE"
|
||||
else
|
||||
CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS"
|
||||
libmono_cflags="$PTHREAD_CFLAGS"
|
||||
fi
|
||||
if test "x$PTHREAD_LIBS" = "x"; then
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
libmono_ldflags="-pthread"
|
||||
else
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
|
||||
libmono_ldflags="$PTHREAD_LIBS"
|
||||
fi
|
||||
need_link_unlink=yes
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
libgc_threads=pthreads
|
||||
# TLS isn't implemented at all on -STABLE
|
||||
with_nptl=no
|
||||
;;
|
||||
# older versions of -CURRENT will break with these flags but testing
|
||||
# indicates these older versions won't run Mono anyway
|
||||
#
|
||||
*-*-*freebsd5)
|
||||
platform_win32=no
|
||||
if test "x$PTHREAD_CFLAGS" = "x"; then
|
||||
CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS"
|
||||
libmono_cflags=
|
||||
else
|
||||
CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS"
|
||||
libmono_cflags="$PTHREAD_CFLAGS"
|
||||
fi
|
||||
if test "x$PTHREAD_LIBS" = "x"; then
|
||||
LDFLAGS="$LDFLAGS -lpthread"
|
||||
libmono_ldflags="-lpthread"
|
||||
else
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
|
||||
libmono_ldflags="$PTHREAD_LIBS"
|
||||
fi
|
||||
need_link_unlink=yes
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
libgc_threads=pthreads
|
||||
# TLS is only partially implemented on -CURRENT (compiler support
|
||||
# but NOT library support)
|
||||
#
|
||||
with_nptl=no
|
||||
;;
|
||||
*-*-*openbsd*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
|
||||
libmono_cflags="-D_THREAD_SAFE"
|
||||
@@ -248,9 +301,21 @@ AC_ARG_WITH(gc, [ --with-gc=boehm,included,none],[gc=$with_gc],[gc=$gc_default]
|
||||
|
||||
# Enable support for fast thread-local storage
|
||||
# Some systems have broken support, so we allow to disable it.
|
||||
# This is misnamed: __thread support has no relation to NPTL,
|
||||
# but people already use it...
|
||||
AC_ARG_WITH(nptl, [ --with-nptl=yes,no enable/disable support for __thread support],[],[with_nptl=yes])
|
||||
AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storage implementation],[],[with_tls=__thread])
|
||||
|
||||
# Kept for compatibility
|
||||
AC_ARG_WITH(nptl, [ --with-nptl=yes,no deprecated, use --with-tls instead],[],[with_nptl=default])
|
||||
|
||||
if test "x$with_nptl" != "xdefault"; then
|
||||
if test "x$with_nptl" = "xyes"; then
|
||||
AC_MSG_WARN([--with-nptl=yes is deprecated, use --with-tls=__thread option instead.])
|
||||
with_tls=__thread
|
||||
fi
|
||||
if test "x$with_nptl" = "xno"; then
|
||||
AC_MSG_WARN([--with-nptl=no is deprecated, use --with-tls=pthread option instead.])
|
||||
with_tls=pthread
|
||||
fi
|
||||
fi
|
||||
|
||||
# Enable support for using sigaltstack for SIGSEGV and stack overflow handling
|
||||
# This does not work on some platforms (bug #55253)
|
||||
@@ -662,7 +727,7 @@ if test x$platform_win32 = xno; then
|
||||
dnl *** Checks for working __thread ***
|
||||
dnl ***********************************
|
||||
AC_MSG_CHECKING(for working __thread)
|
||||
if test "x$with_nptl" != "xyes"; then
|
||||
if test "x$with_tls" != "x__thread"; then
|
||||
AC_MSG_RESULT(disabled)
|
||||
else
|
||||
AC_TRY_RUN([
|
||||
@@ -954,8 +1019,9 @@ ac_cv_c_socklen_t=yes
|
||||
])
|
||||
|
||||
AC_CHECK_FUNCS(trunc, , AC_MSG_CHECKING(for trunc in math.h)
|
||||
# Simply calling trunc (0.0) is no good since gcc will optimize the call away
|
||||
AC_TRY_LINK([#include <math.h>],
|
||||
[ trunc(0.0); ],
|
||||
[ static void *p = &trunc; ],
|
||||
[
|
||||
AC_DEFINE(HAVE_TRUNC)
|
||||
AC_MSG_RESULT(yes)
|
||||
@@ -1096,7 +1162,11 @@ case "$host" in
|
||||
JIT_SUPPORTED=no
|
||||
;;
|
||||
sparc*-*-*)
|
||||
TARGET=SPARC;
|
||||
if test "x$ac_cv_sizeof_void_p" = "x8"; then
|
||||
TARGET=SPARC64
|
||||
else
|
||||
TARGET=SPARC
|
||||
fi
|
||||
arch_target=sparc;
|
||||
JIT_SUPPORTED=yes
|
||||
ACCESS_UNALIGNED="no"
|
||||
@@ -1227,6 +1297,7 @@ AM_CONDITIONAL(INSTALL_2_0, test x$PREVIEW = xyes)
|
||||
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
|
||||
AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
|
||||
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
|
||||
AM_CONDITIONAL(SPARC64, test x$TARGET = xSPARC64)
|
||||
AM_CONDITIONAL(X86, test x$TARGET = xX86)
|
||||
AM_CONDITIONAL(AMD64, test x$TARGET = xAMD64)
|
||||
AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
|
||||
@@ -1299,7 +1370,7 @@ echo "
|
||||
|
||||
GC: $gc
|
||||
ICU: $enable_icu
|
||||
__thread: $with_nptl
|
||||
TLS: $with_tls
|
||||
SIGALTSTACK: $with_sigaltstack
|
||||
Engine: $jit_status
|
||||
2.0 Alpha: $PREVIEW
|
||||
|
||||
@@ -1,246 +0,0 @@
|
||||
System.Object
|
||||
System.Exception
|
||||
System.ValueType
|
||||
System.Delegate
|
||||
System.MulticastDelegate
|
||||
System.Enum
|
||||
System.Activator
|
||||
System.ArgIterator
|
||||
System.__ComObject
|
||||
System.TypedReference
|
||||
System.Security.AllowPartiallyTrustedCallersAttribute
|
||||
System.Runtime.Serialization.Formatter
|
||||
System.Runtime.Serialization.FormatterConverter
|
||||
System.Runtime.Serialization.FormatterServices
|
||||
System.Runtime.Serialization.ObjectIDGenerator
|
||||
System.Runtime.Serialization.ObjectManager
|
||||
System.Reflection.ModuleResolveEventHandler
|
||||
System.Reflection.Pointer
|
||||
System.Globalization.CompareInfo
|
||||
System.Globalization.HebrewCalendar
|
||||
System.Globalization.HijriCalendar
|
||||
System.Globalization.JapaneseCalendar
|
||||
System.Globalization.KoreanCalendar
|
||||
System.Globalization.SortKey
|
||||
System.Globalization.StringInfo
|
||||
System.Globalization.TaiwanCalendar
|
||||
System.Globalization.TextElementEnumerator
|
||||
System.Globalization.TextInfo
|
||||
System.Globalization.ThaiBuddhistCalendar
|
||||
System.IO.IsolatedStorage.IsolatedStorageFile
|
||||
System.Reflection.Emit.MethodRental
|
||||
System.Runtime.CompilerServices.AccessedThroughPropertyAttribute
|
||||
System.Runtime.CompilerServices.CallConvCdecl
|
||||
System.Runtime.CompilerServices.CallConvStdcall
|
||||
System.Runtime.CompilerServices.CallConvThiscall
|
||||
System.Runtime.CompilerServices.CallConvFastcall
|
||||
System.Runtime.CompilerServices.CustomConstantAttribute
|
||||
System.Runtime.CompilerServices.DateTimeConstantAttribute
|
||||
System.Runtime.CompilerServices.DiscardableAttribute
|
||||
System.Runtime.CompilerServices.DecimalConstantAttribute
|
||||
System.Runtime.CompilerServices.CompilationRelaxationsAttribute
|
||||
System.Runtime.CompilerServices.CompilerGlobalScopeAttribute
|
||||
System.Runtime.CompilerServices.IDispatchConstantAttribute
|
||||
System.Runtime.CompilerServices.IsVolatile
|
||||
System.Runtime.CompilerServices.IUnknownConstantAttribute
|
||||
System.Runtime.CompilerServices.RequiredAttributeAttribute
|
||||
System.Runtime.InteropServices.ArrayWithOffset
|
||||
System.Runtime.InteropServices.DispIdAttribute
|
||||
System.Runtime.InteropServices.ClassInterfaceType
|
||||
System.Runtime.InteropServices.ClassInterfaceAttribute
|
||||
System.Runtime.InteropServices.ComVisibleAttribute
|
||||
System.Runtime.InteropServices.LCIDConversionAttribute
|
||||
System.Runtime.InteropServices.ComRegisterFunctionAttribute
|
||||
System.Runtime.InteropServices.ComUnregisterFunctionAttribute
|
||||
System.Runtime.InteropServices.ProgIdAttribute
|
||||
System.Runtime.InteropServices.ImportedFromTypeLibAttribute
|
||||
System.Runtime.InteropServices.IDispatchImplType
|
||||
System.Runtime.InteropServices.IDispatchImplAttribute
|
||||
System.Runtime.InteropServices.ComSourceInterfacesAttribute
|
||||
System.Runtime.InteropServices.ComConversionLossAttribute
|
||||
System.Runtime.InteropServices.TypeLibTypeFlags
|
||||
System.Runtime.InteropServices.TypeLibFuncFlags
|
||||
System.Runtime.InteropServices.TypeLibVarFlags
|
||||
System.Runtime.InteropServices.TypeLibTypeAttribute
|
||||
System.Runtime.InteropServices.TypeLibFuncAttribute
|
||||
System.Runtime.InteropServices.TypeLibVarAttribute
|
||||
System.Runtime.InteropServices.ComImportAttribute
|
||||
System.Runtime.InteropServices.PreserveSigAttribute
|
||||
System.Runtime.InteropServices.ComAliasNameAttribute
|
||||
System.Runtime.InteropServices.AutomationProxyAttribute
|
||||
System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute
|
||||
System.Runtime.InteropServices.CoClassAttribute
|
||||
System.Runtime.InteropServices.ComEventInterfaceAttribute
|
||||
System.Runtime.InteropServices.COMException
|
||||
System.Runtime.InteropServices.ComMemberType
|
||||
System.Runtime.InteropServices.CurrencyWrapper
|
||||
System.Runtime.InteropServices.DispatchWrapper
|
||||
System.Runtime.InteropServices.ErrorWrapper
|
||||
System.Runtime.InteropServices.ExtensibleClassFactory
|
||||
System.Runtime.InteropServices.HandleRef
|
||||
System.Runtime.InteropServices.InvalidComObjectException
|
||||
System.Runtime.InteropServices.InvalidOleVariantTypeException
|
||||
System.Runtime.InteropServices.TypeLibImporterFlags
|
||||
System.Runtime.InteropServices.ExporterEventKind
|
||||
System.Runtime.InteropServices.ITypeLibExporterNotifySink
|
||||
System.Runtime.InteropServices.ITypeLibConverter
|
||||
System.Runtime.InteropServices.MarshalDirectiveException
|
||||
System.Runtime.InteropServices.ObjectCreationDelegate
|
||||
System.Runtime.InteropServices.RuntimeEnvironment
|
||||
System.Runtime.InteropServices.RegistrationServices
|
||||
System.Runtime.InteropServices.SafeArrayRankMismatchException
|
||||
System.Runtime.InteropServices.SafeArrayTypeMismatchException
|
||||
System.Runtime.InteropServices.SEHException
|
||||
System.Runtime.InteropServices.TypeLibConverter
|
||||
System.Runtime.InteropServices.BIND_OPTS
|
||||
System.Runtime.InteropServices.UCOMIBindCtx
|
||||
System.Runtime.InteropServices.UCOMIConnectionPointContainer
|
||||
System.Runtime.InteropServices.UCOMIConnectionPoint
|
||||
System.Runtime.InteropServices.UCOMIEnumMoniker
|
||||
System.Runtime.InteropServices.CONNECTDATA
|
||||
System.Runtime.InteropServices.UCOMIEnumConnections
|
||||
System.Runtime.InteropServices.UCOMIEnumConnectionPoints
|
||||
System.Runtime.InteropServices.UCOMIEnumString
|
||||
System.Runtime.InteropServices.UCOMIEnumVARIANT
|
||||
System.Runtime.InteropServices.FILETIME
|
||||
System.Runtime.InteropServices.UCOMIMoniker
|
||||
System.Runtime.InteropServices.UCOMIPersistFile
|
||||
System.Runtime.InteropServices.UCOMIRunningObjectTable
|
||||
System.Runtime.InteropServices.STATSTG
|
||||
System.Runtime.InteropServices.UCOMIStream
|
||||
System.Runtime.InteropServices.DESCKIND
|
||||
System.Runtime.InteropServices.BINDPTR
|
||||
System.Runtime.InteropServices.UCOMITypeComp
|
||||
System.Runtime.InteropServices.TYPEKIND
|
||||
System.Runtime.InteropServices.TYPEFLAGS
|
||||
System.Runtime.InteropServices.IMPLTYPEFLAGS
|
||||
System.Runtime.InteropServices.TYPEATTR
|
||||
System.Runtime.InteropServices.FUNCDESC
|
||||
System.Runtime.InteropServices.IDLFLAG
|
||||
System.Runtime.InteropServices.IDLDESC
|
||||
System.Runtime.InteropServices.PARAMFLAG
|
||||
System.Runtime.InteropServices.PARAMDESC
|
||||
System.Runtime.InteropServices.TYPEDESC
|
||||
System.Runtime.InteropServices.ELEMDESC
|
||||
System.Runtime.InteropServices.VARDESC
|
||||
System.Runtime.InteropServices.DISPPARAMS
|
||||
System.Runtime.InteropServices.EXCEPINFO
|
||||
System.Runtime.InteropServices.FUNCKIND
|
||||
System.Runtime.InteropServices.INVOKEKIND
|
||||
System.Runtime.InteropServices.CALLCONV
|
||||
System.Runtime.InteropServices.FUNCFLAGS
|
||||
System.Runtime.InteropServices.VARFLAGS
|
||||
System.Runtime.InteropServices.UCOMITypeInfo
|
||||
System.Runtime.InteropServices.SYSKIND
|
||||
System.Runtime.InteropServices.LIBFLAGS
|
||||
System.Runtime.InteropServices.TYPELIBATTR
|
||||
System.Runtime.InteropServices.UCOMITypeLib
|
||||
System.Runtime.InteropServices.UnknownWrapper
|
||||
System.Runtime.Remoting.IObjectHandle
|
||||
System.Runtime.Remoting.IRemotingTypeInfo
|
||||
System.Runtime.Remoting.IChannelInfo
|
||||
System.Runtime.Remoting.IEnvoyInfo
|
||||
System.Runtime.Remoting.RemotingConfiguration
|
||||
System.Runtime.Remoting.TypeEntry
|
||||
System.Runtime.Remoting.ActivatedClientTypeEntry
|
||||
System.Runtime.Remoting.ActivatedServiceTypeEntry
|
||||
System.Runtime.Remoting.WellKnownClientTypeEntry
|
||||
System.Runtime.Remoting.WellKnownServiceTypeEntry
|
||||
System.Runtime.Remoting.RemotingException
|
||||
System.Runtime.Remoting.ServerException
|
||||
System.Runtime.Remoting.RemotingTimeoutException
|
||||
System.Runtime.Remoting.RemotingServices
|
||||
System.Runtime.Remoting.InternalRemotingServices
|
||||
System.Runtime.Remoting.SoapServices
|
||||
System.Runtime.Remoting.Activation.UrlAttribute
|
||||
System.Runtime.Remoting.Messaging.IMessageSink
|
||||
System.Runtime.Remoting.Messaging.AsyncResult
|
||||
System.Runtime.Remoting.Messaging.CallContext
|
||||
System.Runtime.Remoting.Messaging.ILogicalThreadAffinative
|
||||
System.Runtime.Remoting.Messaging.InternalMessageWrapper
|
||||
System.Runtime.Remoting.Messaging.IMethodCallMessage
|
||||
System.Runtime.Remoting.Messaging.MethodCallMessageWrapper
|
||||
System.Runtime.Remoting.Messaging.HeaderHandler
|
||||
System.Runtime.Remoting.Messaging.IMessageCtrl
|
||||
System.Runtime.Remoting.Messaging.IRemotingFormatter
|
||||
System.Runtime.Remoting.Messaging.ReturnMessage
|
||||
System.Runtime.Remoting.Messaging.MethodCall
|
||||
System.Runtime.Remoting.Messaging.ConstructionCall
|
||||
System.Runtime.Remoting.Messaging.MethodResponse
|
||||
System.Runtime.Remoting.Messaging.ConstructionResponse
|
||||
System.Runtime.Remoting.Messaging.MethodReturnMessageWrapper
|
||||
System.Runtime.Remoting.Messaging.OneWayAttribute
|
||||
System.Runtime.Remoting.Messaging.MessageSurrogateFilter
|
||||
System.Runtime.Remoting.Messaging.RemotingSurrogateSelector
|
||||
System.Runtime.Remoting.Contexts.CrossContextDelegate
|
||||
System.Runtime.Remoting.Contexts.ContextProperty
|
||||
System.Runtime.Remoting.Contexts.IContextPropertyActivator
|
||||
System.Runtime.Remoting.Contexts.IContributeClientContextSink
|
||||
System.Runtime.Remoting.Contexts.IContributeDynamicSink
|
||||
System.Runtime.Remoting.Contexts.IContributeEnvoySink
|
||||
System.Runtime.Remoting.Contexts.IContributeObjectSink
|
||||
System.Runtime.Remoting.Contexts.IContributeServerContextSink
|
||||
System.Runtime.Serialization.Formatters.InternalRM
|
||||
System.Runtime.Serialization.Formatters.InternalST
|
||||
System.Runtime.Serialization.Formatters.SoapMessage
|
||||
System.Runtime.Serialization.Formatters.SoapFault
|
||||
System.Runtime.Serialization.Formatters.ServerFault
|
||||
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
System.Security.Cryptography.CryptoConfig
|
||||
System.Security.Cryptography.KeyedHashAlgorithm
|
||||
System.Security.Cryptography.HMACSHA1
|
||||
System.Security.Cryptography.MACTripleDES
|
||||
System.Security.Cryptography.MaskGenerationMethod
|
||||
System.Security.Cryptography.PasswordDeriveBytes
|
||||
System.Security.Cryptography.PKCS1MaskGenerationMethod
|
||||
System.Security.Cryptography.RC2
|
||||
System.Security.Cryptography.RC2CryptoServiceProvider
|
||||
System.Security.Cryptography.RSACryptoServiceProvider
|
||||
System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter
|
||||
System.Security.Cryptography.RSAOAEPKeyExchangeFormatter
|
||||
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter
|
||||
System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter
|
||||
System.Security.Cryptography.RSAPKCS1SignatureDeformatter
|
||||
System.Security.Cryptography.RSAPKCS1SignatureFormatter
|
||||
System.Security.Cryptography.SHA1Managed
|
||||
System.Security.Cryptography.TripleDES
|
||||
System.Security.Cryptography.TripleDESCryptoServiceProvider
|
||||
System.Security.Permissions.EnvironmentPermission
|
||||
System.Security.Permissions.FileDialogPermission
|
||||
System.Security.Permissions.IsolatedStorageFilePermission
|
||||
System.Security.Permissions.PrincipalPermissionAttribute
|
||||
System.Security.Permissions.SecurityPermissionAttribute
|
||||
System.Security.Permissions.PublisherIdentityPermissionAttribute
|
||||
System.Security.Permissions.PublisherIdentityPermission
|
||||
System.Security.Permissions.ReflectionPermission
|
||||
System.Security.Permissions.RegistryPermission
|
||||
System.Security.Permissions.PrincipalPermission
|
||||
System.Security.Permissions.SiteIdentityPermission
|
||||
System.Security.Permissions.StrongNameIdentityPermission
|
||||
System.Security.Permissions.StrongNamePublicKeyBlob
|
||||
System.Security.Permissions.UIPermission
|
||||
System.Security.Permissions.UrlIdentityPermission
|
||||
System.Security.Permissions.ZoneIdentityPermission
|
||||
System.Security.Policy.ApplicationDirectory
|
||||
System.Security.Policy.ApplicationDirectoryMembershipCondition
|
||||
System.Security.Policy.FirstMatchCodeGroup
|
||||
System.Security.Policy.Hash
|
||||
System.Security.Policy.HashMembershipCondition
|
||||
System.Security.Policy.NetCodeGroup
|
||||
System.Security.Policy.PermissionRequestEvidence
|
||||
System.Security.Policy.Publisher
|
||||
System.Security.Policy.PublisherMembershipCondition
|
||||
System.Security.Policy.Site
|
||||
System.Security.Policy.SiteMembershipCondition
|
||||
System.Security.Policy.StrongName
|
||||
System.Security.Policy.StrongNameMembershipCondition
|
||||
System.Security.Policy.UnionCodeGroup
|
||||
System.Security.Policy.Url
|
||||
System.Security.Policy.UrlMembershipCondition
|
||||
System.Security.Policy.Zone
|
||||
System.Security.Policy.ZoneMembershipCondition
|
||||
System.Security.Principal.WindowsIdentity
|
||||
System.Security.Principal.WindowsImpersonationContext
|
||||
System.Security.Principal.WindowsPrincipal
|
||||
System.Threading.CompressedStack
|
||||
|
||||
+78
-301
@@ -30,8 +30,10 @@ Unfortunately, analyzing complex expressions is not so easy (see below for
|
||||
details), so the capabilities of this "abc remover" are limited.
|
||||
|
||||
These are simple guidelines:
|
||||
- Only simple comparisons between variables are understood.
|
||||
- Only increment-decrement operations are handled.
|
||||
- Only expressions of the following kinds are handled:
|
||||
- constant
|
||||
- variable [+/- constant]
|
||||
- Only comparisons between "handled" expressions are understood.
|
||||
- "switch" statements are not yet handled.
|
||||
|
||||
This means that code like this will be handled well:
|
||||
@@ -59,16 +61,24 @@ for (int i = l; i > 0; i--) {
|
||||
a [i] = .....
|
||||
}
|
||||
|
||||
The following two examples would work:
|
||||
|
||||
for (int i = 0; i < (a.Length -1); i++) .....
|
||||
for (int i = 0; i < a.Length; i += 2) .....
|
||||
|
||||
But just something like this
|
||||
|
||||
for (int i = 0; i < (a.Length -1); i++) .....
|
||||
int delta = -1;
|
||||
for (int i = 0; i < (a.Length + delta); i++) .....
|
||||
|
||||
or like this
|
||||
|
||||
for (int i = 0; i < a.Length; i += 2) .....
|
||||
int delta = +2;
|
||||
for (int i = 0; i < a.Length; i += delta) .....
|
||||
|
||||
would not work, the check would stay there, sorry :-(
|
||||
(unless a combination of cfold, consprop and copyprop is used, too, which
|
||||
would make the constant value of "delta" explicit).
|
||||
|
||||
Just to make you understand how things are tricky... this would work!
|
||||
|
||||
@@ -81,26 +91,9 @@ for (int i = 0; i < limit; i++) {
|
||||
A detailed explanation of the reason why things are done like this is given
|
||||
below...
|
||||
|
||||
All in all, the compiling phase is generally non so fast, and the abc removed
|
||||
are so few, that there is hardly a performance gain in using the "abcrem"
|
||||
flag in the compiling options for short programs like the ones I tried.
|
||||
|
||||
Anyway, various bound checks *are* removed, and this is good :-)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
THE ALGORITHM
|
||||
|
||||
Unfortunately, this time google has not been my friend, and I did not
|
||||
find an algorithm I could reasonably implement in the time frame I had,
|
||||
so I had to invent one. The two cleasses of algorithms I found were either
|
||||
simply an analisys of variable ranges (which is not very different from
|
||||
what I'm doing), or they were based on type systems richer than the .NET
|
||||
one (particularly, they required integer types to have an explicit range,
|
||||
which could be related to array ranges). By the way, it seems that the
|
||||
gcj people do not have an array bound check removal optimization (they
|
||||
just have a compiler flag that unconditionally removes all the checks,
|
||||
but this is not what we want).
|
||||
|
||||
This array bound check removal (abc removal) algorithm is based on
|
||||
symbolic execution concepts. I handle the removal like an "unreachable
|
||||
code elimination" (and in fact the optimization could be extended to remove
|
||||
@@ -202,9 +195,9 @@ one of the definitions of i is a PHI that can be either 0 or "i + 1".
|
||||
Now, we know that mathematically "i = i + 1" does not make sense, and in
|
||||
fact symbolic values are not "equations", they are "symbolic definitions".
|
||||
|
||||
The symbolic value of i is a generic "n", where "n" is the number of
|
||||
The actual symbolic value of i is a generic "n", where "n" is the number of
|
||||
iterations of the loop, but this is terrible to handle (and in more complex
|
||||
examples the symbolic definition of i simply cannot be written, because i is
|
||||
examples the symbolic value of i simply cannot be written, because i is
|
||||
calculated in an iterative way).
|
||||
|
||||
However, the definition "i = i + 1" tells us something about i: it tells us
|
||||
@@ -227,13 +220,25 @@ conditions that could have caused to the removal of an abc, but will
|
||||
not remove checks "by mistake" (so the resulting code will be in any case
|
||||
correct).
|
||||
|
||||
In a first attempt, we can consider only conditions that have the simple
|
||||
possible form, which is "(compare simpleExpression simpleExpression)",
|
||||
where "simpleExpression" is either "(ldind.* local[*])" or
|
||||
"(ldlen (ldind.ref local[*]))" (or a constant, of course).
|
||||
The expressions we handle are the following (all of integer type):
|
||||
- constant
|
||||
- variable
|
||||
- variable + constant
|
||||
- constant + variable
|
||||
- variable - constant
|
||||
|
||||
We can also "summarize" variable definitions, keeping only what is relevant
|
||||
to know: if they are greater or smaller than zero or other variables.
|
||||
And, of course, PHI definitions.
|
||||
Any other expression causes the introduction of an "any" value in the
|
||||
evaluation, which makes all values that depend from it unknown as well.
|
||||
|
||||
We will call these kind of definitions "summarizable" definitions.
|
||||
|
||||
In a first attempt, we can consider only branch conditions that have the
|
||||
simplest possible form (the comparison of two summarizable expressions).
|
||||
|
||||
We can also simplify the effect of variable definitions, keeping only
|
||||
what is relevant to know: their value range with respect to zero and with
|
||||
respect to the length of the array we are currently handling.
|
||||
|
||||
One particular note on PHI functions: they work (obviously) like the logical
|
||||
"or" of their definitions, and therefore are equivalent to the "logical or"
|
||||
@@ -245,281 +250,53 @@ if the recursive definition (which, as we said above, must happen because
|
||||
of a loop) always "grows" or "gets smaller". In all other cases, we decide
|
||||
we cannot handle it.
|
||||
|
||||
So, the algorithm to optimize one method could be something like:
|
||||
|
||||
[1] Build the SSA representation.
|
||||
[2] Analyze each BB. Particularly, do the following:
|
||||
[2a] summarize its exit conditions
|
||||
[2b] summarize all the variable definitions occurring in the BB
|
||||
[2c] check if it contains array accesses (only as optimization, so that
|
||||
step 3 will be performed only when necessary)
|
||||
[3] Perform the removal. For each BB that contains array accesses, do:
|
||||
[3a] build an evaluation area where for each variable we keep track
|
||||
of its relations with zero and with each other variable.
|
||||
[3b] populate the evaluation area with the initial data (the variable
|
||||
definitions and the complete entry condition of the BB)
|
||||
[3c] propagate the relations between variables (so that from "a<b" and
|
||||
"b<c" we know that "a<c") in the evaluation area
|
||||
[3d] for each array access in the BB, use the evaluation area to "match
|
||||
conditions", to see if the goal functions are satisfied
|
||||
One critical thing, once we have defined all these data structures, is how
|
||||
the evaluation is actually performed.
|
||||
|
||||
In a first attempt I coded a "brute force" approach, which for each BB
|
||||
tried to examine all possible conditions between all variables, filling
|
||||
a sort of "evaluation matrix". The problem was that the complexity of this
|
||||
evaluation was quadratic (or worse) on the number of variables, and that
|
||||
many wariables were examined even if they were not involved in any array
|
||||
access.
|
||||
|
||||
Following the ABCD paper (http://citeseer.ist.psu.edu/bodik00abcd.html),
|
||||
I rewrote the algorithm in a more "sparse" way.
|
||||
Now, the main data structure is a graph of relations between variables, and
|
||||
each attempt to remove a check performs a traversal of the graph, looking
|
||||
for a path from the index to the array length that satisfies the properties
|
||||
"index >= 0" and "index < length". If such a path is found, the check is
|
||||
removed. It is true that in theory *each* traversal has a complexity which
|
||||
is exponential on the number of variables, but in practice the graph is not
|
||||
very connected, so the traversal terminates quickly.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
LOW LEVEL DESIGN DECISIONS
|
||||
Then, the algorithm to optimize one method looks like this:
|
||||
|
||||
One of the problems I had to solve was the representation of the relations
|
||||
between symbolic values.
|
||||
The "canonical" solution would be to have a complex, potentially recursive
|
||||
data structure, somewhat similar to MonoInst, and use it all the time (maybe
|
||||
MonoInst could be used "as is").
|
||||
The problem is that, at this point, the software would have to "play" with
|
||||
these structures, for instance to deduce "b < a-1" from "a > b+1", because we
|
||||
are interested in what value b has, and not a. And maybe the software should
|
||||
be able to do this without modifying the original condition, because it was
|
||||
used elsewhere (or could be reused).
|
||||
Then, the software should also be able to apply logical relations to
|
||||
conditions (like "(a>0)||(c<1)"), and manipulate them, too.
|
||||
|
||||
In my opinion, an optimizer written in this way risks to be too complex, and
|
||||
its performance not acceptable in a JIT compiler.
|
||||
Therefore, I decided to represent values in a "summarized" way.
|
||||
For instance, "x = a + 1" becomes "x > a" (and, by the way, "x = x + 1"
|
||||
would look like "x > x", which means that "x grows").
|
||||
So, each variable value is simply a "relation" of the variable with other
|
||||
variables or constants. Anything more complex is ignored.
|
||||
Relations are represented with flags (EQ, LT and GT), so that it is easy
|
||||
to combine them logically (it is enough to perform the bitwise operations
|
||||
on the flags). The condition (EQ|LT|GT) means we know nothing special, any
|
||||
value is possible. The empty condition would mean an unreachable statement
|
||||
(because no value is acceptable).
|
||||
|
||||
There is still the problem of identifying variables, and where to store all
|
||||
these relations. After some thinking, I decided that a "brute force" approach
|
||||
is the easier, and probably also the fastest. In practice, I keep in memory
|
||||
an array of "variable relations", where for each variable I record its
|
||||
relation with the constants 0 and 1 and an array of its relations with all
|
||||
other variables. The evaluation area, therefore, looks like a square matrix
|
||||
as large as the number of variables. I *know* that the matrix is rather sparse
|
||||
(in the sense that only few of its cells are significant), but I decided that
|
||||
this data structure was the simplest and more efficient anyway. After all,
|
||||
each cell takes just one byte, and any other data structure must be some
|
||||
kind of associative array (like a g_hash_table). Such a data structue is
|
||||
difficult to use with a MonoMemPool, and in the end is slower than a plain
|
||||
array, and has the storage overhead of all the pointers... in the end, maybe
|
||||
the full matrix is not a waste at all.
|
||||
<note>
|
||||
After a few benchmarks, I clearly see that the matrix works well if the
|
||||
variables are not too much, otherwise it gets "too sparse", and much time
|
||||
is wasted in the propagation phase. Maybe the data structure could be changed
|
||||
after a more careful evaluation of the problem...
|
||||
</note>
|
||||
|
||||
With these assumptions, all the memory used to represent values, conditions
|
||||
and the evaluation area can be allocated in advance (from a MonoMemPool), and
|
||||
used for all the analysis of one method. Moreover, the performance of logical
|
||||
operations is high (they are simple bitwise operations on bytes).
|
||||
<note>
|
||||
For the propagation phase, there was a function I could not easily code
|
||||
with bitwise operations. As that phase is a real pain for the performance
|
||||
(the complexity is quadratic, and it must be executed iteratively until
|
||||
nothing changes), I decided to code it in perl, and generate a precomputed
|
||||
table then used by the C code (just 64 bytes). I think this is faster than
|
||||
all those branches... Really, I could think again to phases 3c and 3d (see
|
||||
above), maybe there is a better way to do them.
|
||||
</note>
|
||||
|
||||
Of course not all expressions can be handled by the summarization, so the
|
||||
optimizer is not as effective as a full blown theorem prover...
|
||||
|
||||
Another thing related to design... the implementation is as less intrusive
|
||||
as possible.
|
||||
I "patched" the main files to add an option for abc removal, and handle it
|
||||
just like any other option, and then wrote all the relevant code in two
|
||||
separated files (one header for data structures, and a C file for the code).
|
||||
If the patch turns out to be useful also for other pourposes (like a more
|
||||
generic "unreachable code elimination", that detects branches that will never
|
||||
be taken using the analysis of variable values), it will not be difficult
|
||||
to integrate the branch summarizations into the BasicBlock data structures,
|
||||
and so on.
|
||||
|
||||
One last thing... in some places, I knowingly coded in an inefficient way.
|
||||
For instance, "remove_abc_from_block" does something only if the flag
|
||||
"has_array_access_instructions" is true, but I call it anyway, letting it
|
||||
do nothing (calling it conditionally would be better). There are several
|
||||
things like this in the code, but I was in a hurry, and preferred to make
|
||||
the code more readable (it is already difficult to understand as it is).
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
WHEN IS ABC REMOVAL POSSIBLE? WHEN IS IT USEFUL?
|
||||
|
||||
Warning! Random ideas ahead!
|
||||
|
||||
In general, managed code should be safe, so abc removal is possible only if
|
||||
there already is some branch in the method that does the check.
|
||||
So, one check on the index is "mandatory", the abc removal can only avoid a
|
||||
second one (which is useless *because* of the first one).
|
||||
If in the code there is not a conditional branch that "avoids" to access
|
||||
an array out of its bounds, in general the abc removal cannot occur.
|
||||
|
||||
It could happen, however, that one method is called from another one, and
|
||||
the check on the index is performed in the caller.
|
||||
|
||||
For instance:
|
||||
|
||||
void
|
||||
caller( int[] a, int n ) {
|
||||
if ( n <= a.Length ) {
|
||||
for ( int i = 0; i < n; i++ ) {
|
||||
callee( a, i );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void callee( int[] a, int i ) {
|
||||
Console.WriteLine( "a [i] = " + a [i] );
|
||||
}
|
||||
[1] Preparation:
|
||||
[1a] Build the SSA representation.
|
||||
[1b] Prepare the evaluation graph (empty)
|
||||
[1b] Summarize each varible definition, and put the resulting relations
|
||||
in the evaluation graph
|
||||
[2] Analyze each BB, starting from the entry point and following the
|
||||
dominator tree:
|
||||
[2a] Summarize its entry condition, and put the resulting relations
|
||||
in the evaluation graph (this is the reason why the BBs are examined
|
||||
following the dominator tree, so that conditions are added to the
|
||||
graph in a "cumulative" way)
|
||||
[2b] Scan the BB instructions, and for each array access perform step [3]
|
||||
[2c] Process children BBs following the dominator tree (step [2])
|
||||
[2d] Remove from the evaluation area the conditions added at step [2a]
|
||||
(so that backtracking along the tree the area is properly cleared)
|
||||
[3] Attempt the removal:
|
||||
[3a] Summarize the index expression, to see if we can handle it; there
|
||||
are three cases: the index is either a constant, or a variable (with
|
||||
an optional delta) or cannot be handled (is a "any")
|
||||
[3b] If the index can be handled, traverse the evaluation area searching
|
||||
a path from the index variable to the array length (if the index is
|
||||
a constant, just examine the array length to see if it has some
|
||||
relation with this constant)
|
||||
[3c] Use the results of step [3b] to decide if the check is redundant
|
||||
|
||||
|
||||
In this case, it should be possible to have two versions of the callee, one
|
||||
without checks, to be called from methods that do the check themselves, and
|
||||
another to be called otherwise.
|
||||
This kind of optimization could be profile driven: if one method is executed
|
||||
several times, wastes CPU time for bound checks, and is mostly called from
|
||||
another one, it could make sense to analyze the situation in detail.
|
||||
|
||||
However, one simple way to perform this optimization would be to inline
|
||||
the callee (so that the abc removal algorithm can see both methods at once).
|
||||
|
||||
The biggest benefits of abc removal can be seen for array accesses that
|
||||
occur "often", like the ones inside inner loops. This is why I tried to
|
||||
handle "recursive" variable definitions, because without them you cannot
|
||||
optimize inside loops, which is also where you need it most.
|
||||
|
||||
Another possible optimization (alwais related to loops) is the following:
|
||||
|
||||
void method( int[] a, int n ) {
|
||||
for ( int i = 0; i < n; i++ ) {
|
||||
Console.WriteLine( "a [i] = " + a [i] );
|
||||
}
|
||||
}
|
||||
|
||||
In this case, the check on n is missing, so the abc could not be removed.
|
||||
However, this would mean that i will be checked twice at each loop iteration,
|
||||
one against n, and the other against a.Length. The code could be transformed
|
||||
like this:
|
||||
|
||||
void method( int[] a, int n ) {
|
||||
if ( n < a.Length ) {
|
||||
for ( int i = 0; i < n; i++ ) {
|
||||
Console.WriteLine( "a [i] = " + a [i] ); // Remove abc
|
||||
}
|
||||
} else {
|
||||
for ( int i = 0; i < n; i++ ) {
|
||||
Console.WriteLine( "a [i] = " + a [i] ); // Leave abc
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
This could result in performance improvements (again, probably this
|
||||
optimization should be profile driven).
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
OPEN ISSUES
|
||||
|
||||
There are several issues that should still be addressed...
|
||||
|
||||
One is related to aliasing. For now, I decided to operate only on local
|
||||
variables, and ignore aliasing problems (and alias analisys has not yet
|
||||
been implemented anyway).
|
||||
Actually, I identified the local arrays with their length, because I
|
||||
totally ignore the contents of arrays (and objects in general).
|
||||
|
||||
Also, in several places in the code I only handle some cases, and ignore
|
||||
other more complex ones, which could anyway work (there are comments where
|
||||
this happens). Anyway, this is not harmful (the code is not as effective
|
||||
as it could be).
|
||||
|
||||
Another possible improvement is the explicit handling of all constants.
|
||||
For now, code like
|
||||
|
||||
void
|
||||
method () {
|
||||
int[] a = new int [16];
|
||||
for ( int i = 0; i < 16; i++ ) {
|
||||
a [i] = i;
|
||||
}
|
||||
}
|
||||
|
||||
is not handled, because the two constants "16" are lost when variable
|
||||
relations are summarized (actually they are not lost, they are stored in the
|
||||
summarized values, but they are not yet used correctly).
|
||||
|
||||
The worst thing, anyway, is that for now I fail completely in distinguishing
|
||||
between signed and unsigned variables/operations/conditions, and between
|
||||
different integer sizes (in bytes). I did this on pourpose, just for lack of
|
||||
time, but this can turn out to be terribly wrong.
|
||||
The problem is caused by the fact that I handle arithmetical operations and
|
||||
conditions as "ideal" operations, but actually they can overflow and/or
|
||||
underflow, giving "surprising" results.
|
||||
|
||||
For instance, look at the following two methods:
|
||||
|
||||
public static void testSignedOverflow()
|
||||
{
|
||||
Console.WriteLine( "Testing signed overflow..." );
|
||||
int[] ia = new int[70000];
|
||||
int i = 1;
|
||||
while ( i <ia.Length )
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.WriteLine( " i = " + i );
|
||||
ia[i] = i;
|
||||
}
|
||||
catch ( IndexOutOfRangeException e )
|
||||
{
|
||||
Console.WriteLine( "Yes, we had an overflow (i = " + i + ")" );
|
||||
}
|
||||
i *= 60000;
|
||||
}
|
||||
Console.WriteLine( "Testing signed overflow done." );
|
||||
}
|
||||
|
||||
public static void testUnsignedOverflow()
|
||||
{
|
||||
Console.WriteLine( "Testing unsigned overflow..." );
|
||||
int[] ia = new int[70000];
|
||||
uint i = 1;
|
||||
while ( i <ia.Length )
|
||||
{
|
||||
try
|
||||
{
|
||||
Console.WriteLine( " i = " + i );
|
||||
ia[i] = (int) i;
|
||||
}
|
||||
catch ( IndexOutOfRangeException e )
|
||||
{
|
||||
Console.WriteLine( "Yes, we had an overflow (i = " + i + ")" );
|
||||
}
|
||||
i *= 60000;
|
||||
}
|
||||
Console.WriteLine( "Testing unsigned overflow done." );
|
||||
}
|
||||
|
||||
In the "testSignedOverflow" method, the exception will be thrown, while
|
||||
in the "testUnsignedOverflow" everything will go on smoothly.
|
||||
The problem is that the test "i <ia.Length" is a signed comparison in the
|
||||
first case, and will not exit from the loop if the index is negative.
|
||||
Therefore, in the first method, the abc should not be removed.
|
||||
|
||||
In practice, the abc removal code should try to predict if any given
|
||||
expression could over/under-flow, and act accordingly.
|
||||
For now, I made so that the only accepted expressions are plain increments
|
||||
and decrements of variables (which cannot over/under-flow without being
|
||||
trapped by the existing conditions). Anyway, this issue should be analyzed
|
||||
better.
|
||||
By the way, in summarizations there is a field that keeps track of the
|
||||
relation with "1", which I planned to use exactly to summarize products and
|
||||
quotients, but it is never used (as I said, only increment and decrement
|
||||
operations are properly summarized).
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
Handling GC allocated objects in C
|
||||
|
||||
As part of an effort to improve our GC, we need to keep track
|
||||
precisely of where objects are stored, so we can incrementally move
|
||||
from the current conservative GC to a more advanced precise and moving GC.
|
||||
Previously, all global C variables were considered GC roots, but this makes
|
||||
the GC less efficient and increases the chances false references are found
|
||||
to GC memory, hence retaining more memory than needed.
|
||||
We need to tell the GC that some object is supposed to be kept alive
|
||||
as if it was referenced in a global variable.
|
||||
|
||||
For Mono embedders
|
||||
------------------
|
||||
|
||||
In C#, if you say:
|
||||
class T {
|
||||
static object o;
|
||||
}
|
||||
|
||||
Any object which is stored in `o' is considered to be alive -- it will
|
||||
not be collected. `o' is a member of the root set for the GC.
|
||||
|
||||
However, in C code, this is not the case. If you have:
|
||||
|
||||
static MonoObject* o = NULL;
|
||||
|
||||
The object in `o' will *NOT* be scanned.
|
||||
|
||||
If you need to store an object in a C variable and prevent it from being
|
||||
collected, you need to acquire a GC handle for it.
|
||||
|
||||
guint32 handle = mono_gchandle_new (my_object, TRUE);
|
||||
|
||||
TRUE means the object will be pinned, so it won't move in memory
|
||||
when we'll use a moving GC. You can access the MonoObject* referenced by
|
||||
a handle with:
|
||||
|
||||
MonoObject* obj = mono_gchandle_get_target (handle);
|
||||
|
||||
When you don't need the handle anymore you need to call:
|
||||
|
||||
mono_gchandle_free (handle);
|
||||
|
||||
Note that if you assign a new object to the C var, you need to get a new
|
||||
handle, it's not enough to store a new object in the C var.
|
||||
|
||||
So code that looked like this:
|
||||
|
||||
static MonoObject* o = NULL;
|
||||
...
|
||||
o = mono_object_new (...);
|
||||
/* use o */
|
||||
...
|
||||
/* when done to allow the GC to collect o */
|
||||
o = NULL;
|
||||
|
||||
should now be changed to:
|
||||
|
||||
static guint32 o_handle;
|
||||
...
|
||||
MonoObject *o = mono_object_new (...);
|
||||
o_handle = mono_gchandle_new (o, TRUE);
|
||||
/* use o or mono_gchandle_get_target (o_handle) */
|
||||
...
|
||||
/* when done to allow the GC to collect o */
|
||||
mono_gchandle_free (o_handle);
|
||||
|
||||
|
||||
For Mono runtime developers
|
||||
---------------------------
|
||||
|
||||
There are two kinds of static vars used to store pointers to GC memory
|
||||
that we need to consider:
|
||||
*) objects
|
||||
*) other memory chunks allocated with GC_MALLOC().
|
||||
|
||||
Objects should be dealt with the GC handle support as detailed above.
|
||||
Other items should register the static pointer as an area to be considered
|
||||
part of the root set with the following:
|
||||
|
||||
static gpointer my_gc_data = NULL;
|
||||
...
|
||||
MONO_GC_REGISTER_ROOT (my_gc_data);
|
||||
my_gc_data = GC_MALLOC (...);
|
||||
|
||||
Note that this registration is not necessary for *LOCAL* variables,
|
||||
as they are stored on the stack. It is only necessary for global variables,
|
||||
as they are not a part of the GC's root set.
|
||||
|
||||
Once you have done the MONO_GC_REGISTER_ROOT, the variable is just like
|
||||
a static variable in C#. To keep an object alive, you have the variable reference
|
||||
the GC memory, to remove the reference, set the variable to NULL.
|
||||
|
||||
As we prepare the code for a precise GC, GC_MALLOC () will not be used anymore
|
||||
in this way in most cases: we'll have a mechanism to specify exactly where
|
||||
references to GC memory is stored.
|
||||
@@ -0,0 +1,68 @@
|
||||
We need to switch to a new register allocator.
|
||||
The current one is split in a global and a local register allocator.
|
||||
The global one can assign only callee-saves registers and happens
|
||||
on the tree-based internal representation: it assigns local variables
|
||||
to hardware registers.
|
||||
The local one happens on the linear representation on a per basic
|
||||
block basis and assigns hard registers to virtual registers (which
|
||||
hold temporary values during expression executions) and it deals also
|
||||
with the platform-specific issues (fixed registers, call conventions).
|
||||
|
||||
Moving to a different register will help solve some of the performance
|
||||
issues introduced by the above split, make the register more easily
|
||||
portable and solve some of the issues generated by dealing with trees.
|
||||
|
||||
The general design ideas are below.
|
||||
|
||||
The new allocator should have a global view of all the method, so it can be
|
||||
able to assign variables also to some of the volatile registers if possible,
|
||||
even across basic blocks (this would improve performance).
|
||||
|
||||
The allocator would be driven by per-arch declarative data, so porting
|
||||
should be easier: an architecture needs to specify register classes,
|
||||
call convention and instructions requirements (similar to the gcc code).
|
||||
|
||||
The allocator should operate on the linear representation, this way it's
|
||||
easier and faster to track usages more correctly. We need to assign virtual
|
||||
registers on a per-method basis instead of per basic block. We can assign
|
||||
virtual registers to variables, too. Note that since we fix the stack offset
|
||||
of local vars only after this step (which happens after the burg rules are run),
|
||||
some of the burg rules that try to optimize the code won't apply anymore:
|
||||
the peephole code may need to be enhanced to do the optimizations instead.
|
||||
|
||||
We need to handle floating point registers in the global allocator, too.
|
||||
|
||||
The new allocator also needs to keep track precisely of which registers
|
||||
contain references or managed pointers to allow us to move to a precise GC.
|
||||
|
||||
It may be worth to use a single increasing set of integers for the virtual
|
||||
registers, with the class of the register stored separately (unless the
|
||||
current local allocator which keeps interger and fp registers separate).
|
||||
|
||||
Since this is a large task, we need to do it in steps as much as possible.
|
||||
The first is to run the register allocator _after_ the burg rules: this
|
||||
requires a rewrite of the liveness code, too, to use linear indexes instead
|
||||
of basic-block/tree number combinations. This can be done by:
|
||||
*) allocating virtual regs to all the locals that can be register allocated
|
||||
*) running the burg rules (some may require adjustments): the local virtual
|
||||
registers are assigned starting from global-virt-regs+1, instead of the current
|
||||
hardware-regs+1, so we can tell apart global and local virt regs.
|
||||
*) running the liveness/whatever code is needed to allocate the global registers
|
||||
*) allocate the rest of the local variables to stack slots
|
||||
*) continue with the current local allocator
|
||||
|
||||
This work could take 2-3 weeks.
|
||||
|
||||
The next step is to define the kind of declarative data an architecture needs
|
||||
and assigning virtual regs to all the registers and making the allocator
|
||||
assign from the volatile registers, too.
|
||||
Note that some of the code that is currently emitted in the arch-specific
|
||||
code, will need to be emitted as instructions that the reg allocator
|
||||
can inspect: think of a method that returns the first argument which is
|
||||
received in a register: the current code copies it to either a local slot or
|
||||
to a global reg in the prolog an copies it back to the return register
|
||||
int he basic block, but since neither the regallocator nor the peephole code
|
||||
knows about the prolog code, the first store cannot be optimized away.
|
||||
The gcc code has some example of how to specify register classes in a
|
||||
declarative way.
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
While the Boehm GC is quite good, we need to move to a
|
||||
precise, generational GC for better performance and smaller
|
||||
memory usage (no false-positives memory retentions with big
|
||||
allocations).
|
||||
|
||||
This is a large task, but it can be done in steps.
|
||||
|
||||
1) use the GCJ support to mark reference fields in objects, so
|
||||
scanning the heap is faster. This is mostly done already, needs
|
||||
checking that it is always used correctly (big objects, arrays).
|
||||
There are also some data structures we use in the runtime that are
|
||||
currently untyped that are allocated in the Gc heap and used to
|
||||
keep references to GC objects. We need to make them typed as to
|
||||
precisely track GC references or make them non-GC memory,
|
||||
by using more the GC hnadle support code (MonoGHashTable, MonoDomain,
|
||||
etc).
|
||||
|
||||
2) don't include in the static roots the .bss and .data segments
|
||||
to save in scanning time and limit false-positives. This is mostly
|
||||
done already.
|
||||
|
||||
3) keep track precisely of stack locations and registers in native
|
||||
code generation. This basically requires the regalloc rewrite code
|
||||
first, if we don't want to duplicate much of it. This is the hardest
|
||||
task of all, since proving it's correctness is very hard. Some tricks,
|
||||
like having a build that injects GC.Collect() after every few simple
|
||||
operations may help. We also need to decide if we want to handle safe
|
||||
points at calls and back jumps only or at every instruction. The latter
|
||||
case is harder to implement and requires we keep around much more data
|
||||
(it potentially makes for faster stop-the-world phases).
|
||||
The first case requires us to be able to advance a thread until it
|
||||
reaches the next safe point: this can be done with the same techniques
|
||||
used by a debugger. We already need something like this to handle
|
||||
safely aborts happening in the middle of a prolog in managed code,
|
||||
for example, so this could be an additional sub-task that can be done
|
||||
separately from the GC work.
|
||||
Note that we can adapt the libgc code to use the info we collect
|
||||
when scanning the stack in managed methods and still use the conservative
|
||||
approach for the unmanaged stack, until we have our own collector,
|
||||
which requires we define a proper icall interface to switch from managed
|
||||
to unmanaged code (hwo to we handle object references in the icall
|
||||
implementations, for example).
|
||||
|
||||
4) we could make use of the generational capabilities of the
|
||||
Boehm GC, but not with the current method involving signals which
|
||||
may create incompatibilities and is not supported on all platforms.
|
||||
We need to start using write barriers: they will be required anyway
|
||||
for the generational GC we'll use. When a field holding a reference
|
||||
is changed in an object (or an item in an array), we mark the card
|
||||
or page where the field is stored as dirty. Later, when a collection
|
||||
is run, only objects in pages marked as dirty are scanned for
|
||||
references instead of the whole heap. This could take a few days to
|
||||
implement and probably much more time to debug if all the cases were
|
||||
not catched:-)
|
||||
|
||||
5) actually write the new generational and precise collector. There are
|
||||
several examples out there as open source projects, though the CLR
|
||||
needs some specific semantics so the code needs to be written from
|
||||
scratch anyway. Compared to item 3 this is relatively easer and it can
|
||||
be tested outside of mono, too, until mono is ready to use it.
|
||||
The important features needed:
|
||||
*) precise, so there is no false positive memory retention
|
||||
*) generational to reduce collection times
|
||||
*) pointer-hopping allocation to reduce alloc time
|
||||
*) possibly per-thread lock-free allocation
|
||||
*) handle weakrefs and finalizers with the CLR semantics
|
||||
|
||||
Note: some GC engines use a single mmap area, because it makes
|
||||
handling generations and the implementation much easier, but this also
|
||||
limits the expension of the heap, so people may need to use a command-line
|
||||
option to set the max heap size etc. It would be better to have a design
|
||||
that allows mmapping a few megabytes chunks at a time.
|
||||
|
||||
The different tasks can be done in parallel. 1, 2 and 4 can be done in time
|
||||
for the mono 1.2 release. Parts of 3 and 5 could be done as well.
|
||||
The complete switch is supposed to happen with the mono 2.0 release.
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ specified. The root represents the "libdir" component of a prefix
|
||||
(typically prefix/lib).
|
||||
.Sp
|
||||
The -gacdir option is used to specify the GACs base directory. Once an
|
||||
assembly has been installed to a non standard gacdir the MONO_GAC_PATH
|
||||
assembly has been installed to a non standard gacdir the MONO_GAC_PREFIX
|
||||
environment variable must be used to access the assembly.
|
||||
.Sp
|
||||
The -check_refs option is used to ensure that the assembly being
|
||||
|
||||
+4
-4
@@ -261,10 +261,10 @@ or equal to the log level will be printed to stdout/stderr.
|
||||
.I "MONO_LOG_MASK"
|
||||
If set, the log mask is changed to the set value. Possible values are
|
||||
"asm" (assembly loader), "type", "dll" (native library loader), "gc"
|
||||
(garbage collector), "cfg" (config file loader), "all". The default value is
|
||||
"all". Changing the mask value allows you to display only messages for
|
||||
a certain component. You can use multiple masks by comma separating
|
||||
them. For example to see config file messages and assembly loader
|
||||
(garbage collector), "cfg" (config file loader), "aot" (precompiler), "all".
|
||||
The default value is "all". Changing the mask value allows you to display only
|
||||
messages for a certain component. You can use multiple masks by comma
|
||||
separating them. For example to see config file messages and assembly loader
|
||||
messages set you mask to "asm,cfg".
|
||||
.TP
|
||||
.I "MONO_DEBUG"
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
2004-07-02 Raja R Harinath <[email protected]>
|
||||
|
||||
* Makefile (OVERRIDE_BARE_TARGETS): Remove.
|
||||
(OVERRIDE_TARGET_ALL): Define.
|
||||
(all-recursive,$(STD_TARGETS:=-recursive)): Depend on
|
||||
'platform-check' and 'profile-check'.
|
||||
(all.override): New. Run two passes: once to build, and once to
|
||||
sign libraries.
|
||||
|
||||
2004-06-22 Todd Berman <[email protected]>
|
||||
|
||||
* configure: Patch from Mariano Suárez-Alvarez
|
||||
|
||||
+7
-18
@@ -1,27 +1,16 @@
|
||||
thisdir := .
|
||||
SUBDIRS := build jay mcs monoresgen class mbas nunit20 ilasm tools tests errors docs
|
||||
OVERRIDE_BARE_TARGETS = hells yeah
|
||||
OVERRIDE_TARGET_ALL = yes
|
||||
include build/rules.make
|
||||
|
||||
# Define these ourselves to that the platform checks come first
|
||||
all-recursive $(STD_TARGETS:=-recursive): platform-check profile-check
|
||||
|
||||
#all: platform-check profile-check all-recursive #all-local
|
||||
all.override:
|
||||
$(MAKE) NO_SIGN_ASSEMBLY=yes all.real
|
||||
$(MAKE) all.real
|
||||
|
||||
.PHONY: all clean all-profiles clean-profiles install uninstall test run-test testcorlib
|
||||
|
||||
all: platform-check profile-check all-recursive
|
||||
|
||||
install: platform-check profile-check install-recursive #install-local
|
||||
|
||||
uninstall: platform-check profile-check uninstall-recursive #uninstall-local
|
||||
|
||||
test: platform-check profile-check test-recursive #test-local
|
||||
|
||||
run-test: run-test-recursive #run-test-local
|
||||
|
||||
run-test-ondotnet: run-test-ondotnet-recursive # run-test-ondotnet-local
|
||||
|
||||
clean: clean-recursive #clean-local
|
||||
all-local $(STD_TARGETS:=-local):
|
||||
@:
|
||||
|
||||
# fun specialty targets
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
2004-07-18 Anirban Bhattacharjee <[email protected]>
|
||||
* DelegateA.vb: The test for passing AddressOf operator in method parameter is added.
|
||||
|
||||
2004-06-11 Anirban Bhattacharjee <[email protected]>
|
||||
* Makefile: Removed inclusion of rules.make from Makefile for two reasons :
|
||||
- This Makefile as of now has no dependency on rules.make what so ever
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
2004-07-18 Anirban Bhattacharjee <[email protected]>
|
||||
* DelegateA.vb: The test for passing AddressOf operator in method parameter is added.
|
||||
|
||||
2004-06-11 Anirban Bhattacharjee <[email protected]>
|
||||
* Makefile: Removed inclusion of rules.make from Makefile for two reasons :
|
||||
- This Makefile as of now has no dependency on rules.make what so ever
|
||||
|
||||
@@ -3,13 +3,19 @@ Imports System
|
||||
Module M
|
||||
Delegate Sub SD()
|
||||
sub f()
|
||||
System.Console.WriteLine("s called")
|
||||
End sub
|
||||
|
||||
Public Delegate Function SF(a as integer) as Integer
|
||||
Public Function f1(a as integer) as Integer
|
||||
System.Console.WriteLine("f1 called")
|
||||
return a
|
||||
End Function
|
||||
|
||||
Public Function TD(d as SD) as Integer
|
||||
d.Invoke()
|
||||
End Function
|
||||
|
||||
Sub Main()
|
||||
dim d1 as SD
|
||||
d1 = new SD(AddressOf f)
|
||||
@@ -29,6 +35,7 @@ Module M
|
||||
Throw new System.Exception ("#A1, Unexpected result")
|
||||
end if
|
||||
|
||||
TD(AddressOf f)
|
||||
|
||||
End Sub
|
||||
End Module
|
||||
@@ -1,3 +1,38 @@
|
||||
2004-07-02 Raja R Harinath <[email protected]>
|
||||
|
||||
Support for avoiding "sharing violations" while compiling core
|
||||
libraries with an in-tree compiler.
|
||||
* library.make (LIBRARY_USE_INTERMEDIATE_FILE): New toggle.
|
||||
($(the_lib)): Use it.
|
||||
|
||||
2004-07-02 Raja R Harinath <[email protected]>
|
||||
|
||||
* rules.make (OVERRIDE_BARE_TARGETS): Remove.
|
||||
(OVERRIDE_TARGET_ALL): New control for overriding the default all:
|
||||
rule. If set, 'make all' will run 'all.override' from the client
|
||||
Makefile.
|
||||
(all): Move commands ...
|
||||
(all.real): ... here. Make ordering assumptions explicit, and
|
||||
parallel-safe.
|
||||
(test,run-test,run-test-ondotnet,clean,install,uninstall):
|
||||
Consolidate into ...
|
||||
(STD_TARGETS): ... this new variable. Make ordering assumption
|
||||
between -recursive and -local targets explicit.
|
||||
(%-recursive): Handle W32 GNU make that has --unix as the first
|
||||
argument in $(MAKE).
|
||||
* README.makefiles (Special recursion needs): Update to reflect
|
||||
changes.
|
||||
* library.make (all-local): Build $(the_lib_signature_stamp) when
|
||||
NO_SIGN_ASSEMBLY is defined.
|
||||
($(gacutil),$(sn)): Consolidate rules.
|
||||
(test-local,run-test-local,run-test-ondotnet-local): Likewise.
|
||||
|
||||
2004-07-02 Raja R Harinath <[email protected]>
|
||||
|
||||
* config-default.make (TEST_RUNTIME): Use 'mono' by default.
|
||||
* platforms/win32.make (TEST_RUNTIME): Remove.
|
||||
* profiles/default.make (TEST_RUNTIME): Remove.
|
||||
|
||||
2004-06-28 Raja R Harinath <[email protected]>
|
||||
|
||||
* platforms/linux.make (RESGEN): Define using $(INTERNAL_RESGEN).
|
||||
|
||||
+14
-16
@@ -587,12 +587,13 @@ include ../../../build/executable.make
|
||||
|
||||
|
||||
|
||||
* Special recursion needs? Use OVERRIDE_BARE_TARGETS
|
||||
* Special recursion needs?
|
||||
|
||||
By default, rules.make defines the all, install, clean, etc. targets
|
||||
to look something like this:
|
||||
|
||||
all: all-recursive all-local
|
||||
all: all-recursive
|
||||
$(MAKE) all-local
|
||||
|
||||
Sometimes that doesn't cut it; say for example you want to check for
|
||||
something before doing a lengthy recursive build (see
|
||||
@@ -611,15 +612,15 @@ strongly discouraged.)
|
||||
Anyway, to solve this problem you can do
|
||||
|
||||
========================================
|
||||
OVERRIDE_BARE_TARGETS = yes
|
||||
thisdir = class/MyLibrary
|
||||
SUBDIRS = Test
|
||||
include ../../build/rules.make
|
||||
|
||||
# This is normally "all-recursive all-local"
|
||||
all: all-local all-recursive
|
||||
# Normally, make runs 'all-recursive' first, and then 'all-local'
|
||||
# With this, we ensure that 'all-local' is executed first.
|
||||
all-recursive: all-local
|
||||
|
||||
test: test-local test-recursive
|
||||
test-recursive: test-local
|
||||
...
|
||||
========================================
|
||||
|
||||
@@ -630,16 +631,13 @@ test: test-local test-recursive
|
||||
** A few implementation details
|
||||
|
||||
The way rules.make does its recursion is very standard; it maps
|
||||
{all,install,clean, dist,test} to $@-recursive, which executes that
|
||||
rule in each directory in $(SUBDIRS), and then calls $@-local in the
|
||||
current directory. So something that gets built in a subdirectory
|
||||
cannot rely on something that gets built in its parent directory. If
|
||||
this is a problem, see the bit about using OVERRIDE_BARE_TARGETS;
|
||||
since the recursive rules do $(MAKE) $* in their subdirectories,
|
||||
changing the 'all' target will do the right thing in a recursive
|
||||
build. Note that the recursive rule for 'dist' is different; it makes
|
||||
dist-recursive in subdirectories, so you at least have to define that
|
||||
rule, even if you use OVERRIDE_BARE_TARGETS.
|
||||
{all,install,clean, dist,test} to $@-recursive, which executes that rule
|
||||
in each directory in $(SUBDIRS), and then calls $@-local in the current
|
||||
directory. So something that gets built in a subdirectory cannot rely on
|
||||
something that gets built in its parent directory. If this is a problem,
|
||||
see the previous section. Note that the recursive rule for 'dist' is
|
||||
different; it makes dist-recursive in subdirectories, so you at least
|
||||
have to define that rule.
|
||||
|
||||
Note that even a directory that doesn't, for example, have any tests
|
||||
must still define test-local; otherwise 'make test' run from the
|
||||
|
||||
@@ -13,9 +13,9 @@ MBAS_FLAGS = $(PLATFORM_DEBUG_FLAGS)
|
||||
LIBRARY_FLAGS = /noconfig
|
||||
CFLAGS = -g -O2
|
||||
INSTALL = /usr/bin/install
|
||||
RUNTIME = mono $(RUNTIME_FLAGS)
|
||||
TEST_RUNTIME=$(PLATFORM_RUNTIME)
|
||||
prefix = /usr/local
|
||||
RUNTIME = mono $(RUNTIME_FLAGS)
|
||||
TEST_RUNTIME = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug
|
||||
|
||||
# In case you want to add MCS_FLAGS, this lets you not have to
|
||||
# keep track of the default value
|
||||
|
||||
+12
-16
@@ -87,9 +87,7 @@ else
|
||||
GACDIR = $(DESTDIR)$(prefix)/lib
|
||||
endif
|
||||
|
||||
all-local: $(the_lib)
|
||||
|
||||
install-local: $(the_lib)
|
||||
all-local install-local test-local: $(the_lib)
|
||||
|
||||
ifdef LIBRARY_INSTALL_DIR
|
||||
install-local:
|
||||
@@ -107,13 +105,10 @@ install-local: $(gacutil)
|
||||
uninstall-local: $(gacutil)
|
||||
MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(RUNTIME) $(gacutil) /u $(LIBRARY_NAME:.dll=)
|
||||
|
||||
$(gacutil):
|
||||
cd $(topdir)/tools/gacutil && $(MAKE)
|
||||
|
||||
endif
|
||||
|
||||
ifndef NO_SIGN_ASSEMBLY
|
||||
install-local: $(the_lib_signature_stamp)
|
||||
all-local install-local: $(the_lib_signature_stamp)
|
||||
|
||||
ifndef LIBRARY_SNK
|
||||
LIBRARY_SNK = $(topdir)/class/mono.snk
|
||||
@@ -124,17 +119,10 @@ $(the_lib_signature_stamp): $(the_lib) $(sn)
|
||||
echo stamp > $@
|
||||
endif
|
||||
|
||||
$(sn):
|
||||
cd $(topdir)/tools/security && $(MAKE) sn.exe
|
||||
|
||||
clean-local:
|
||||
-rm -f $(library_CLEAN_FILES) $(CLEAN_FILES)
|
||||
|
||||
test-local: $(the_lib)
|
||||
@:
|
||||
run-test-local:
|
||||
@:
|
||||
run-test-ondotnet-local:
|
||||
test-local run-test-local run-test-ondotnet-local:
|
||||
@:
|
||||
|
||||
ifndef NO_TEST
|
||||
@@ -205,10 +193,18 @@ ifndef BTEST_COMPILE
|
||||
BTEST_COMPILE = $(BASCOMPILE)
|
||||
endif
|
||||
|
||||
# Fun with dependency tracking
|
||||
$(gacutil) $(sn):
|
||||
cd $(@D) && $(MAKE) $(@F)
|
||||
|
||||
# The library
|
||||
|
||||
$(the_lib): $(response)
|
||||
ifdef LIBRARY_USE_INTERMEDIATE_FILE
|
||||
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) /target:library /out:$(@F) @$(response)
|
||||
mv $(@F) $@
|
||||
else
|
||||
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) /target:library /out:$@ @$(response)
|
||||
endif
|
||||
|
||||
$(makefrag): $(sourcefile)
|
||||
@echo Creating $@ ...
|
||||
|
||||
@@ -16,8 +16,6 @@ PLATFORM_MAKE_CORLIB_CMP = yes
|
||||
PLATFORM_CHANGE_SEPARATOR_CMD=tr '/' '\\\\'
|
||||
PLATFORM_PATH_SEPARATOR = ;
|
||||
|
||||
TEST_RUNTIME = mono
|
||||
|
||||
hidden_prefix =
|
||||
hidden_suffix = .tmp
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
ifdef PLATFORM_MONO_NATIVE
|
||||
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(INTERNAL_MCS)
|
||||
MBAS = MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(INTERNAL_MBAS)
|
||||
TEST_RUNTIME = MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(RUNTIME) --debug
|
||||
else
|
||||
MCS = $(PLATFORM_RUNTIME) $(BOOTSTRAP_MCS) /lib:$(topdir)/class/lib/$(PROFILE)
|
||||
MBAS = $(PLATFORM_RUNTIME) $(BOOTSTRAP_MBAS) /lib:$(topdir)/class/lib/$(PROFILE)
|
||||
|
||||
+16
-28
@@ -54,6 +54,7 @@ export RESGEN
|
||||
# Get this so the platform.make platform-check rule doesn't become the
|
||||
# default target
|
||||
|
||||
.DEFAULT: all
|
||||
default: all
|
||||
|
||||
# Get initial configuration. pre-config is so that the builder can
|
||||
@@ -94,47 +95,34 @@ endif
|
||||
include $(topdir)/build/profiles/$(PROFILE).make
|
||||
-include $(topdir)/build/config.make
|
||||
|
||||
# Simple rules
|
||||
ifdef OVERRIDE_TARGET_ALL
|
||||
all: all.override
|
||||
else
|
||||
all: all.real
|
||||
endif
|
||||
|
||||
all.real: all-recursive
|
||||
$(MAKE) all-local
|
||||
|
||||
STD_TARGETS = test run-test run-test-ondotnet clean install uninstall
|
||||
|
||||
$(STD_TARGETS): %: %-recursive
|
||||
$(MAKE) $@-local
|
||||
|
||||
%-recursive:
|
||||
@set . $$MAKEFLAGS; \
|
||||
case $$2 in --unix) shift ;; esac; \
|
||||
case $$2 in *=*) dk="exit 1" ;; *k*) dk=: ;; *) dk="exit 1" ;; esac; \
|
||||
list='$(SUBDIRS)'; for d in $$list ; do \
|
||||
(cd $$d && $(MAKE) $*) || $$dk ; \
|
||||
done
|
||||
|
||||
# note: dist-local dep, extra subdirs, $* has become $@
|
||||
|
||||
# note: dist-local dep, extra subdirs, we invoke dist-recursive in the subdir too
|
||||
dist-recursive: dist-local
|
||||
@list='$(SUBDIRS) $(DIST_ONLY_SUBDIRS)'; for d in $$list ; do \
|
||||
(cd $$d && $(MAKE) $@) || exit 1 ; \
|
||||
done
|
||||
|
||||
# We do this manually to not have a make[1]: blah message (That is,
|
||||
# instead of using a '%: %-recursive %-local' construct.)
|
||||
#
|
||||
# Let the makefile override these for special situations (running checks
|
||||
# in the toplevel makefile, or a directory that needs to be built before
|
||||
# its subdirectories).
|
||||
|
||||
ifndef OVERRIDE_BARE_TARGETS
|
||||
|
||||
all: all-recursive all-local
|
||||
|
||||
install: install-recursive install-local
|
||||
|
||||
test: test-recursive test-local
|
||||
|
||||
run-test: run-test-recursive test-local run-test-local
|
||||
|
||||
run-test-ondotnet: run-test-ondotnet-recursive test-local run-test-ondotnet-local
|
||||
|
||||
clean: clean-recursive clean-local
|
||||
|
||||
uninstall: uninstall-recursive uninstall-local
|
||||
|
||||
endif
|
||||
|
||||
# Can only do this from the top dir
|
||||
# ## dist: dist-recursive dist-local
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2004-07-02 Raja R Harinath <[email protected]>
|
||||
|
||||
* IBM.Data.DB2/Makefile (all-local $(STD_TARGETS:=-local)):
|
||||
Simplify dummy rule somewhat.
|
||||
|
||||
2004-06-24 Raja R Harinath <[email protected]>
|
||||
|
||||
* IBM.Data.DB2/Makefile: Disable for 'net_2_0'.
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2004-07-14 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* RelaxngGrammar.cs : When definition is missing, the error message
|
||||
should show what definition is missing.
|
||||
|
||||
2004-06-25 Atsushi Enomoto <[email protected]>
|
||||
|
||||
* Misc.cs, RelaxngDatatype.cs, RelaxngDatatypeProvider.cs,
|
||||
|
||||
@@ -371,7 +371,7 @@ namespace Commons.Xml.Relaxng
|
||||
foreach (RdpUnresolvedRef pref in this.unresolvedPatterns) {
|
||||
RdpPattern defP = assembledDefs [pref.Name] as RdpPattern;
|
||||
if (defP == null)
|
||||
throw new RelaxngException ("Target definition was not found.");
|
||||
throw new RelaxngException (String.Format ("Target definition was not found: {0}", pref.Name));
|
||||
ArrayList al = refPatterns [defP] as ArrayList;
|
||||
if (al == null) {
|
||||
al = new ArrayList ();
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2004-07-02 Jackson Harper <[email protected]>
|
||||
|
||||
* Compiler.cs:
|
||||
* CompilerError.cs:
|
||||
* ErrorLevel.cs: Make obsolete in 2.0
|
||||
|
||||
2004-05-11 Gert Driesen ([email protected])
|
||||
* Compiler.cs: marked ctor private to match MS.NET
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@ using System.Text.RegularExpressions;
|
||||
|
||||
namespace Microsoft.CSharp {
|
||||
|
||||
#if NET_2_0
|
||||
[System.Obsolete]
|
||||
#endif
|
||||
public class Compiler {
|
||||
|
||||
private Compiler()
|
||||
|
||||
@@ -32,6 +32,9 @@ using System.Text;
|
||||
|
||||
namespace Microsoft.CSharp {
|
||||
|
||||
#if NET_2_0
|
||||
[System.Obsolete]
|
||||
#endif
|
||||
public class CompilerError {
|
||||
|
||||
public ErrorLevel ErrorLevel;
|
||||
|
||||
@@ -29,10 +29,14 @@
|
||||
|
||||
namespace Microsoft.CSharp {
|
||||
|
||||
#if NET_2_0
|
||||
[System.Obsolete]
|
||||
[System.Serializable]
|
||||
#endif
|
||||
public enum ErrorLevel {
|
||||
None,
|
||||
Warning,
|
||||
Error,
|
||||
FatalError,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,8 @@ LIB_MCS_FLAGS = /unsafe /r:$(corlib) /r:System.dll \
|
||||
NO_TEST = yes
|
||||
|
||||
ifeq (net_2_0, $(PROFILE))
|
||||
all-local install-local test-local run-test-local clean-local dist-local uninstall-local:
|
||||
all-local $(STD_TARGETS:=-local):
|
||||
@:
|
||||
else
|
||||
include ../../build/library.make
|
||||
endif
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// AssemblyInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Andreas Nahr ([email protected])
|
||||
//
|
||||
// (C) 2003 Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Security;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about the System.Windows.Forms assembly
|
||||
|
||||
#if (NET_1_0)
|
||||
[assembly: AssemblyVersion("1.0.3300.0")]
|
||||
[assembly: SatelliteContractVersion("1.0.3300.0")]
|
||||
#elif (NET_2_0)
|
||||
[assembly: AssemblyVersion ("2.0.3600.0")]
|
||||
[assembly: SatelliteContractVersion ("2.0.3600.0")]
|
||||
#elif (NET_1_1)
|
||||
[assembly: AssemblyVersion("1.0.5000.0")]
|
||||
[assembly: SatelliteContractVersion("1.0.5000.0")]
|
||||
[assembly: ComCompatibleVersion(1, 0, 3300, 0)]
|
||||
[assembly: TypeLibVersion(1, 10)]
|
||||
#endif
|
||||
|
||||
[assembly: AssemblyTitle("System.Windows.Forms.dll")]
|
||||
[assembly: AssemblyDescription("System.Windows.Forms.dll")]
|
||||
[assembly: AssemblyConfiguration("Development version")]
|
||||
[assembly: AssemblyCompany("MONO development team")]
|
||||
[assembly: AssemblyProduct("MONO CLI")]
|
||||
[assembly: AssemblyCopyright("(c) 2003 Various Authors")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
|
||||
[assembly: CLSCompliant(true)]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: AssemblyDefaultAlias("System.Windows.Forms.dll")]
|
||||
[assembly: AssemblyInformationalVersion("0.0.0.1")]
|
||||
[assembly: NeutralResourcesLanguage("en-US")]
|
||||
|
||||
[assembly: AllowPartiallyTrustedCallers()]
|
||||
|
||||
[assembly: AssemblyDelaySign(true)]
|
||||
[assembly: AssemblyKeyFile("../ecma.pub")]
|
||||
@@ -0,0 +1,13 @@
|
||||
2004-04-13 Andreas Nahr <[email protected]>
|
||||
|
||||
* Consts.cs: Added
|
||||
|
||||
2004-04-08 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* AssemblyInfo.cs: patch by Gert Driesen that makes SWF CLS compliant.
|
||||
|
||||
2004-03-15 Andreas Nahr <[email protected]>
|
||||
|
||||
* AssemblyInfo.cs: Added
|
||||
* Locale.cs: Added
|
||||
* ChangeLog: Added
|
||||
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// Consts.cs
|
||||
//
|
||||
// Author:
|
||||
// Andreas Nahr ([email protected])
|
||||
//
|
||||
// (C) 2003 Andreas Nahr
|
||||
//
|
||||
// NOTE:
|
||||
// Ensure that every constant is defined for every version symbol!
|
||||
//
|
||||
|
||||
// This class contains constants that are dependent on the defined symbols
|
||||
// Use it to shorten and make code more maintainable in situations like:
|
||||
//
|
||||
//#if (NET_1_0)
|
||||
// [Designer ("System.Diagnostics.Design.ProcessDesigner, System.Design, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof (IDesigner))]
|
||||
//#endif
|
||||
//#if (NET_1_1)
|
||||
// [Designer ("System.Diagnostics.Design.ProcessDesigner, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof (IDesigner))]
|
||||
//#endif
|
||||
//
|
||||
// by changing them into:
|
||||
//
|
||||
// [Designer ("System.Diagnostics.Design.ProcessDesigner, " + Consts.AssemblySystem_Design, typeof (IDesigner))]
|
||||
//
|
||||
|
||||
internal sealed class Consts
|
||||
{
|
||||
|
||||
private Consts ()
|
||||
{
|
||||
}
|
||||
|
||||
#if (NET_1_0)
|
||||
|
||||
public const string AssemblySystem_Design = "System.Design, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
|
||||
//#elif (NET_1_1)
|
||||
#else
|
||||
// NET_1_1 is seen as default if somebody 'forgets' to specify any of the symbols
|
||||
// to ensure we are not breaking the build in this case
|
||||
|
||||
public const string AssemblySystem_Design = "System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// Locale.cs
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
// Andreas Nahr ([email protected])
|
||||
//
|
||||
// (C) 2001 - 2003 Ximian, Inc (http://www.ximian.com)
|
||||
//
|
||||
|
||||
internal sealed class Locale {
|
||||
|
||||
private Locale ()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the translated message for the current locale
|
||||
/// </summary>
|
||||
public static string GetText (string msg)
|
||||
{
|
||||
return msg;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
thisdir = class/System.Windows.Forms
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = System.Windows.Forms.dll
|
||||
LIB_MCS_FLAGS = /unsafe \
|
||||
/r:$(corlib) /r:System.dll /r:System.Xml.dll \
|
||||
/r:System.Drawing.dll /r:Accessibility.dll \
|
||||
/nowarn:649 /nowarn:169 /nowarn:67 /nowarn:108 /nowarn:114
|
||||
|
||||
EXTRA_DISTFILES = \
|
||||
README
|
||||
|
||||
NO_TEST = yes
|
||||
|
||||
include ../../build/library.make
|
||||
@@ -0,0 +1,44 @@
|
||||
Managed.Windows.Forms README
|
||||
$Revision: 1.1 $
|
||||
|
||||
* Introduction
|
||||
|
||||
Managed.Windows.Forms is a managed implementation of System.Windows.Forms.
|
||||
It implements a driver interface to allow running on multiple windowing systems,
|
||||
for example X11 or Windows. All controls are implemented in managed code,
|
||||
using System.Drawing to draw them.
|
||||
|
||||
|
||||
* Status
|
||||
|
||||
This library is in pre-alpha state. Development is still in the very early
|
||||
stages. Bug reports are welcome, provided they don't just point out missing
|
||||
classes. Please use http://bugzilla.ximian.com/
|
||||
|
||||
|
||||
* Contributions
|
||||
|
||||
No contributions providing only stubs will be accepted at this time. We ask
|
||||
that you submit contributions for review before committing them, our goal is
|
||||
to have a consistent and complete implementation, ideally having most or all
|
||||
methods and properties of a class written by the same author. This will ensure
|
||||
a certain degree of consistency in the code.
|
||||
|
||||
The core team for Managed.Windows.Forms currently are:
|
||||
Jordi Mas i Hernandez ([email protected])
|
||||
Jackson Harper ([email protected])
|
||||
Ravindra Kumar ([email protected])
|
||||
Peter Bartok ([email protected])
|
||||
|
||||
|
||||
* Mailing List
|
||||
|
||||
There is a mailing list dedicated to Mono's System.Windows.Forms
|
||||
implementation, mono-winforms-list, see
|
||||
http://lists.ximian.com/mailman/listinfo/mono-winforms-list
|
||||
|
||||
|
||||
* To run System.Windows.Forms Applications
|
||||
|
||||
You should use the old Wine-based implementation until this library is
|
||||
more functional and reaches beta-stage.
|
||||
@@ -0,0 +1,115 @@
|
||||
Assembly/AssemblyInfo.cs
|
||||
Assembly/Consts.cs
|
||||
Assembly/Locale.cs
|
||||
System.Windows.Forms/AccessibleObject.cs
|
||||
System.Windows.Forms/AccessibleRole.cs
|
||||
System.Windows.Forms/AccessibleStates.cs
|
||||
System.Windows.Forms/AnchorStyles.cs
|
||||
System.Windows.Forms/Application.cs
|
||||
System.Windows.Forms/ApplicationContext.cs
|
||||
System.Windows.Forms/BaseCollection.cs
|
||||
System.Windows.Forms/Binding.cs
|
||||
System.Windows.Forms/BindingContext.cs
|
||||
System.Windows.Forms/BindingMemberInfo.cs
|
||||
System.Windows.Forms/BindingsCollection.cs
|
||||
System.Windows.Forms/BindingsManagerBase.cs
|
||||
System.Windows.Forms/Border3DSide.cs
|
||||
System.Windows.Forms/Border3DStyle.cs
|
||||
System.Windows.Forms/BorderStyle.cs
|
||||
System.Windows.Forms/BoundsSpecified.cs
|
||||
System.Windows.Forms/ButtonBorderStyle.cs
|
||||
System.Windows.Forms/ButtonState.cs
|
||||
System.Windows.Forms/CaptionButton.cs
|
||||
System.Windows.Forms/ContainerControl.cs
|
||||
System.Windows.Forms/Control.cs
|
||||
System.Windows.Forms/ControlEventArgs.cs
|
||||
System.Windows.Forms/ControlEventHandler.cs
|
||||
System.Windows.Forms/ControlPaint.cs
|
||||
System.Windows.Forms/ControlStyles.cs
|
||||
System.Windows.Forms/ConvertEventArgs.cs
|
||||
System.Windows.Forms/ConvertEventHandler.cs
|
||||
System.Windows.Forms/CreateParams.cs
|
||||
System.Windows.Forms/DockStyle.cs
|
||||
System.Windows.Forms/DragAction.cs
|
||||
System.Windows.Forms/DragDropEffects.cs
|
||||
System.Windows.Forms/DragEventArgs.cs
|
||||
System.Windows.Forms/DragEventHandler.cs
|
||||
System.Windows.Forms/FlatStyle.cs
|
||||
System.Windows.Forms/Form.cs
|
||||
System.Windows.Forms/FrameStyle.cs
|
||||
System.Windows.Forms/GiveFeedbackEventArgs.cs
|
||||
System.Windows.Forms/GiveFeedbackEventHandler.cs
|
||||
System.Windows.Forms/HelpEventArgs.cs
|
||||
System.Windows.Forms/HelpEventHandler.cs
|
||||
System.Windows.Forms/IContainerControl.cs
|
||||
System.Windows.Forms/IDataObject.cs
|
||||
System.Windows.Forms/ImeMode.cs
|
||||
System.Windows.Forms/IMessageFilter.cs
|
||||
System.Windows.Forms/InputLanguage.cs
|
||||
System.Windows.Forms/InputLanguageChangedEventArgs.cs
|
||||
System.Windows.Forms/InputLanguageChangedEventHandler.cs
|
||||
System.Windows.Forms/InputLanguageChangingEventArgs.cs
|
||||
System.Windows.Forms/InputLanguageChangingEventHandler.cs
|
||||
System.Windows.Forms/InputLanguageCollection.cs
|
||||
System.Windows.Forms/InvalidateEventArgs.cs
|
||||
System.Windows.Forms/InvalidateEventHandler.cs
|
||||
System.Windows.Forms/IWin32Window.cs
|
||||
System.Windows.Forms/KeyEventArgs.cs
|
||||
System.Windows.Forms/KeyEventHandler.cs
|
||||
System.Windows.Forms/KeyPressEventArgs.cs
|
||||
System.Windows.Forms/KeyPressEventHandler.cs
|
||||
System.Windows.Forms/Keys.cs
|
||||
System.Windows.Forms/Label.cs
|
||||
System.Windows.Forms/LayoutEventArgs.cs
|
||||
System.Windows.Forms/LayoutEventHandler.cs
|
||||
System.Windows.Forms/MenuGlyph.cs
|
||||
System.Windows.Forms/Message.cs
|
||||
System.Windows.Forms/MouseButtons.cs
|
||||
System.Windows.Forms/MouseEventArgs.cs
|
||||
System.Windows.Forms/MouseEventHandler.cs
|
||||
System.Windows.Forms/NativeWindow.cs
|
||||
System.Windows.Forms/PaintEventArgs.cs
|
||||
System.Windows.Forms/PaintEventHandler.cs
|
||||
System.Windows.Forms/ProgressBar.cs
|
||||
System.Windows.Forms/RightToLeft.cs
|
||||
System.Windows.Forms/QueryAccessibilityHelpEventArgs.cs
|
||||
System.Windows.Forms/QueryAccessibilityHelpEventHandler.cs
|
||||
System.Windows.Forms/QueryContinueDragEventArgs.cs
|
||||
System.Windows.Forms/QueryContinueDragEventHandler.cs
|
||||
System.Windows.Forms/ScrollableControl.cs
|
||||
System.Windows.Forms/ScrollEventArgs.cs
|
||||
System.Windows.Forms/ScrollEventHandler.cs
|
||||
System.Windows.Forms/ScrollEventType.cs
|
||||
System.Windows.Forms/ScrollBar.cs
|
||||
System.Windows.Forms/ScrollBars.cs
|
||||
System.Windows.Forms/ScrollButton.cs
|
||||
System.Windows.Forms/TODOAttribute.cs
|
||||
System.Windows.Forms/UICues.cs
|
||||
System.Windows.Forms/UICuesEventArgs.cs
|
||||
System.Windows.Forms/UICuesEventHandler.cs
|
||||
System.Windows.Forms/X11Structs.cs
|
||||
System.Windows.Forms/XplatUI.cs
|
||||
System.Windows.Forms/XplatUIDriver.cs
|
||||
System.Windows.Forms/XplatUIStructs.cs
|
||||
System.Windows.Forms/XplatUIWin32.cs
|
||||
System.Windows.Forms/XplatUIX11.cs
|
||||
System.Windows.Forms/VScrollBar.cs
|
||||
System.Windows.Forms/HScrollBar.cs
|
||||
System.Windows.Forms/TrackBar.cs
|
||||
System.Windows.Forms/Orientation.cs
|
||||
System.Windows.Forms/TickStyle.cs
|
||||
System.Windows.Forms/ImageList.cs
|
||||
System.Windows.Forms/ImageListStreamer.cs
|
||||
System.Windows.Forms/ColorDepth.cs
|
||||
System.Windows.Forms/LinkState.cs
|
||||
System.Windows.Forms/LinkBehavior.cs
|
||||
System.Windows.Forms/LinkClickedEventArgs.cs
|
||||
System.Windows.Forms/LinkClickedEventHandler.cs
|
||||
System.Windows.Forms/LinkLabelLinkClickedEventArgs.cs
|
||||
System.Windows.Forms/LinkLabelLinkClickedEventHandler.cs
|
||||
System.Windows.Forms/LinkArea.cs
|
||||
System.Windows.Forms/LinkLabel.cs
|
||||
System.Windows.Forms/IButtonControl.cs
|
||||
System.Windows.Forms/DialogResult.cs
|
||||
|
||||
|
||||
@@ -0,0 +1,327 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: AccessibleObject.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// NOT COMPLETE
|
||||
|
||||
using Accessibility;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class AccessibleObject : MarshalByRefObject, IReflect, IAccessible {
|
||||
#region Private Variables
|
||||
private string name;
|
||||
private string value;
|
||||
private Control owner;
|
||||
internal AccessibleRole role;
|
||||
internal string default_action;
|
||||
internal string description;
|
||||
internal string help;
|
||||
internal string keyboard_shortcut;
|
||||
#endregion // Private Variables
|
||||
|
||||
#region Public Constructors
|
||||
public AccessibleObject() {
|
||||
this.owner=null;
|
||||
this.value=null;
|
||||
this.name=null;
|
||||
this.role=AccessibleRole.Default;
|
||||
this.default_action=null;
|
||||
this.description=null;
|
||||
this.help=null;
|
||||
this.keyboard_shortcut=null;
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Private Constructors
|
||||
internal AccessibleObject(Control owner) : this () {
|
||||
this.owner=owner;
|
||||
}
|
||||
#endregion // Private Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public virtual Rectangle Bounds {
|
||||
get {
|
||||
return Rectangle.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string DefaultAction {
|
||||
get {
|
||||
return default_action;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string Description {
|
||||
get {
|
||||
return description;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string Help {
|
||||
get {
|
||||
return help;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string KeyboardShortcut {
|
||||
get {
|
||||
return keyboard_shortcut;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string Name {
|
||||
get {
|
||||
return name;
|
||||
}
|
||||
|
||||
set {
|
||||
name=value;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual AccessibleObject Parent {
|
||||
get {
|
||||
if ((owner!=null) && (owner.Parent!=null)) {
|
||||
return owner.Parent.AccessibilityObject;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual AccessibleRole Role {
|
||||
get {
|
||||
return role;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual AccessibleStates State {
|
||||
get {
|
||||
AccessibleStates state=AccessibleStates.None;
|
||||
|
||||
if (owner!=null) {
|
||||
if (owner.Focused) {
|
||||
state |= AccessibleStates.Focused;
|
||||
}
|
||||
|
||||
if (!owner.Visible) {
|
||||
state |= AccessibleStates.Invisible;
|
||||
}
|
||||
}
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string Value {
|
||||
get {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
set {
|
||||
this.value=value;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Public Instance Methods
|
||||
public virtual void DoDefaultAction() {
|
||||
if (owner!=null) {
|
||||
owner.DoDefaultAction();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual AccessibleObject GetChild(int index) {
|
||||
if (owner!=null) {
|
||||
if (index<owner.num_of_children) {
|
||||
return owner.children[index].AccessibilityObject;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual int GetChildCount() {
|
||||
if (owner!=null) {
|
||||
return owner.num_of_children;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
|
||||
#region IReflection Methods and Properties
|
||||
FieldInfo IReflect.GetField(String name, BindingFlags bindingAttr) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
FieldInfo[] IReflect.GetFields(BindingFlags bindingAttr) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
MemberInfo[] IReflect.GetMember(String name, BindingFlags bindingAttr) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
MemberInfo[] IReflect.GetMembers(BindingFlags bindingAttr) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
MethodInfo IReflect.GetMethod(String name, BindingFlags bindingAttr) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
MethodInfo IReflect.GetMethod(String name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
MethodInfo[] IReflect.GetMethods(BindingFlags bindingAttr) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
PropertyInfo IReflect.GetProperty(String name, BindingFlags bindingAttr) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
PropertyInfo IReflect.GetProperty(String name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
PropertyInfo[] IReflect.GetProperties(BindingFlags bindingAttr) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
Object IReflect.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
Type IReflect.UnderlyingSystemType {
|
||||
get {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
#endregion // IReflection Methods and Properties
|
||||
|
||||
#region IAccessible Methods and Properties
|
||||
void IAccessible.accDoDefaultAction(object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
int IAccessible.accChildCount {
|
||||
get {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
object IAccessible.accFocus {
|
||||
get {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
object IAccessible.accHitTest(int xLeft, int yTop) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
void IAccessible.accLocation(out int pxLeft, out int pyTop, out int pcxWidth, out int pcyHeight, object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
object IAccessible.accNavigate(int navDir, object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
object IAccessible.accParent {
|
||||
get {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
void IAccessible.accSelect(int flagsSelect, object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
object IAccessible.accSelection {
|
||||
get {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
object IAccessible.get_accChild(object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
string IAccessible.get_accDefaultAction(object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
string IAccessible.get_accDescription(object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
string IAccessible.get_accHelp(object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
int IAccessible.get_accHelpTopic(out string pszHelpFile,object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
string IAccessible.get_accKeyboardShortcut(object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
string IAccessible.get_accName(object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
object IAccessible.get_accRole(object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
object IAccessible.get_accState(object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
string IAccessible.get_accValue(object childID) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
void IAccessible.set_accName(object childID, string newName) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
void IAccessible.set_accValue(object childID, string newValue) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#endregion // IAccessible Methods and Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: AccessibleRole.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum AccessibleRole {
|
||||
None = 0,
|
||||
TitleBar = 1,
|
||||
MenuBar = 2,
|
||||
ScrollBar = 3,
|
||||
Grip = 4,
|
||||
Sound = 5,
|
||||
Cursor = 6,
|
||||
Caret = 7,
|
||||
Alert = 8,
|
||||
Window = 9,
|
||||
Client = 10,
|
||||
MenuPopup = 11,
|
||||
MenuItem = 12,
|
||||
ToolTip = 13,
|
||||
Application = 14,
|
||||
Document = 15,
|
||||
Pane = 16,
|
||||
Chart = 17,
|
||||
Dialog = 18,
|
||||
Border = 19,
|
||||
Grouping = 20,
|
||||
Separator = 21,
|
||||
ToolBar = 22,
|
||||
StatusBar = 23,
|
||||
Table = 24,
|
||||
ColumnHeader = 25,
|
||||
RowHeader = 26,
|
||||
Column = 27,
|
||||
Row = 28,
|
||||
Cell = 29,
|
||||
Link = 30,
|
||||
HelpBalloon = 31,
|
||||
Character = 32,
|
||||
List = 33,
|
||||
ListItem = 34,
|
||||
Outline = 35,
|
||||
OutlineItem = 36,
|
||||
PageTab = 37,
|
||||
PropertyPage = 38,
|
||||
Indicator = 39,
|
||||
Graphic = 40,
|
||||
StaticText = 41,
|
||||
Text = 42,
|
||||
PushButton = 43,
|
||||
CheckButton = 44,
|
||||
RadioButton = 45,
|
||||
ComboBox = 46,
|
||||
DropList = 47,
|
||||
ProgressBar = 48,
|
||||
Dial = 49,
|
||||
HotkeyField = 50,
|
||||
Slider = 51,
|
||||
SpinButton = 52,
|
||||
Diagram = 53,
|
||||
Animation = 54,
|
||||
Equation = 55,
|
||||
ButtonDropDown = 56,
|
||||
ButtonMenu = 57,
|
||||
ButtonDropDownGrid= 58,
|
||||
WhiteSpace = 59,
|
||||
PageTabList = 60,
|
||||
Clock = 61,
|
||||
Default = -1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: AccessibleStates.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum AccessibleStates {
|
||||
None = 0x00000000,
|
||||
Unavailable = 0x00000001,
|
||||
Selected = 0x00000002,
|
||||
Focused = 0x00000004,
|
||||
Pressed = 0x00000008,
|
||||
Checked = 0x00000010,
|
||||
Mixed = 0x00000020,
|
||||
Indeterminate = 0x00000020,
|
||||
ReadOnly = 0x00000040,
|
||||
HotTracked = 0x00000080,
|
||||
Default = 0x00000100,
|
||||
Expanded = 0x00000200,
|
||||
Collapsed = 0x00000400,
|
||||
Busy = 0x00000800,
|
||||
Floating = 0x00001000,
|
||||
Marqueed = 0x00002000,
|
||||
Animated = 0x00004000,
|
||||
Invisible = 0x00008000,
|
||||
Offscreen = 0x00010000,
|
||||
Sizeable = 0x00020000,
|
||||
Moveable = 0x00040000,
|
||||
SelfVoicing = 0x00080000,
|
||||
Focusable = 0x00100000,
|
||||
Selectable = 0x00200000,
|
||||
Linked = 0x00400000,
|
||||
Traversed = 0x00800000,
|
||||
MultiSelectable = 0x01000000,
|
||||
ExtSelectable = 0x02000000,
|
||||
AlertLow = 0x04000000,
|
||||
AlertMedium = 0x08000000,
|
||||
AlertHigh = 0x10000000,
|
||||
Protected = 0x20000000,
|
||||
Valid = 0x3FFFFFFF
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: AnchorStyles.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum AnchorStyles {
|
||||
None = 0x00000000,
|
||||
Top = 0x00000001,
|
||||
Bottom = 0x00000002,
|
||||
Left = 0x00000004,
|
||||
Right = 0x00000008
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,293 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: Application.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.ComponentModel;
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public sealed class Application : ContainerControl {
|
||||
private static bool browser_embedded;
|
||||
private static bool exiting;
|
||||
private static InputLanguage input_language;
|
||||
private static bool messageloop_started;
|
||||
private static string safe_caption_format;
|
||||
private static ArrayList message_filters;
|
||||
private static ApplicationContext app_context;
|
||||
|
||||
private Application () {
|
||||
input_language = InputLanguage.CurrentInputLanguage;
|
||||
message_filters = new ArrayList();
|
||||
app_context = null;
|
||||
browser_embedded= false;
|
||||
exiting = false;
|
||||
messageloop_started = false;
|
||||
safe_caption_format = "{1} - {0} - {2}";
|
||||
}
|
||||
|
||||
#region Public Static Properties
|
||||
public static bool AllowQuit {
|
||||
get {
|
||||
return browser_embedded;
|
||||
}
|
||||
}
|
||||
|
||||
public static string CommonAppDataPath {
|
||||
get {
|
||||
return Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
|
||||
}
|
||||
}
|
||||
|
||||
public static RegistryKey CommonAppDataRegistry {
|
||||
get {
|
||||
RegistryKey key;
|
||||
|
||||
key = Registry.LocalMachine.OpenSubKey("Software\\" + Application.CompanyName + "\\" + Application.ProductName + "\\" + Application.ProductVersion, true);
|
||||
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
public static string CompanyName {
|
||||
get {
|
||||
StackTrace st;
|
||||
|
||||
if (Environment.OSVersion.Platform != (PlatformID)128) {
|
||||
RegistryKey key;
|
||||
String ret;
|
||||
|
||||
key=Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion", false);
|
||||
ret=(String)key.GetValue("RegisteredOrganization");
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
st=new StackTrace();
|
||||
return st.GetFrame(st.FrameCount-1).GetMethod().DeclaringType.Namespace;
|
||||
}
|
||||
}
|
||||
|
||||
public static CultureInfo CurrentCulture {
|
||||
get {
|
||||
return Thread.CurrentThread.CurrentUICulture;
|
||||
}
|
||||
|
||||
set {
|
||||
|
||||
Thread.CurrentThread.CurrentUICulture=value;
|
||||
}
|
||||
}
|
||||
|
||||
public static InputLanguage CurrentInputLanguage {
|
||||
get {
|
||||
return input_language;
|
||||
}
|
||||
|
||||
set {
|
||||
input_language=value;
|
||||
}
|
||||
}
|
||||
|
||||
public static string ExecutablePath {
|
||||
get {
|
||||
return Assembly.GetEntryAssembly().Location;
|
||||
}
|
||||
}
|
||||
|
||||
public static string LocalUserAppDataPath {
|
||||
get {
|
||||
return Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool MessageLoop {
|
||||
get {
|
||||
return messageloop_started;
|
||||
}
|
||||
}
|
||||
|
||||
public static string ProductName {
|
||||
get {
|
||||
AssemblyProductAttribute[] attrs = (AssemblyProductAttribute[]) Assembly.GetEntryAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), true);
|
||||
|
||||
if ((attrs != null) && attrs.Length>0) {
|
||||
return attrs[0].Product;
|
||||
}
|
||||
|
||||
return Assembly.GetEntryAssembly().GetName().Name;
|
||||
}
|
||||
}
|
||||
|
||||
public static string ProductVersion {
|
||||
get {
|
||||
String version;
|
||||
|
||||
version = Assembly.GetEntryAssembly().GetName().Version.ToString();
|
||||
|
||||
if (version.StartsWith("0.")) {
|
||||
version="1." + version.Substring(2);
|
||||
}
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
public static string SafeTopLevelCaptionFormat {
|
||||
get {
|
||||
return safe_caption_format;
|
||||
}
|
||||
|
||||
set {
|
||||
safe_caption_format=value;
|
||||
}
|
||||
}
|
||||
|
||||
public static string StartupPath {
|
||||
get {
|
||||
return Path.GetDirectoryName(Application.ExecutablePath);
|
||||
}
|
||||
}
|
||||
|
||||
public static string UserAppDataPath {
|
||||
get {
|
||||
return Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
}
|
||||
}
|
||||
|
||||
public static RegistryKey UserAppDataRegistry {
|
||||
get {
|
||||
RegistryKey key;
|
||||
|
||||
key = Registry.CurrentUser.OpenSubKey("Software\\" + Application.CompanyName + "\\" + Application.ProductName + "\\" + Application.ProductVersion, true);
|
||||
|
||||
return key;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Public Static Methods
|
||||
public static void AddMessageFilter(IMessageFilter value) {
|
||||
message_filters.Add(value);
|
||||
}
|
||||
|
||||
public static void DoEvents() {
|
||||
XplatUI.DoEvents();
|
||||
}
|
||||
|
||||
public static void Exit() {
|
||||
XplatUI.Exit();
|
||||
}
|
||||
|
||||
public static void ExitThread() {
|
||||
exiting=true;
|
||||
}
|
||||
|
||||
private static void InternalExit(object sender, EventArgs e) {
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
public static ApartmentState OleRequired() {
|
||||
//throw new NotImplementedException("OLE Not supported by this System.Windows.Forms implementation");
|
||||
return ApartmentState.Unknown;
|
||||
}
|
||||
|
||||
public static void OnThreadException(Exception t) {
|
||||
if (Application.ThreadException != null) {
|
||||
Application.ThreadException(null, new ThreadExceptionEventArgs(t));
|
||||
} else {
|
||||
XplatUI.HandleException(t);
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveMessageFilter(IMessageFilter filter) {
|
||||
message_filters.Remove(filter);
|
||||
}
|
||||
|
||||
public static void Run() {
|
||||
MSG msg = new MSG();
|
||||
|
||||
while (!exiting && XplatUI.GetMessage(ref msg, IntPtr.Zero, 0, 0)) {
|
||||
Message message;
|
||||
|
||||
message = new Message();
|
||||
message.Hwnd=msg.hwnd;
|
||||
message.Msg=(int)msg.message;
|
||||
message.LParam=msg.lParam;
|
||||
message.WParam=msg.wParam;
|
||||
|
||||
XplatUI.TranslateMessage(ref msg);
|
||||
XplatUI.DispatchMessage(ref msg);
|
||||
}
|
||||
|
||||
if (ApplicationExit != null) {
|
||||
ApplicationExit(null, EventArgs.Empty);
|
||||
}
|
||||
Console.WriteLine("Application.Run(): returning");
|
||||
}
|
||||
|
||||
public static void Run(Form mainForm) {
|
||||
mainForm.CreateControl();
|
||||
Run(new ApplicationContext(mainForm));
|
||||
|
||||
Console.WriteLine("Application.Run(Form): returning");
|
||||
}
|
||||
|
||||
public static void Run(ApplicationContext context) {
|
||||
app_context=context;
|
||||
if (app_context.MainForm!=null) {
|
||||
app_context.MainForm.Show();
|
||||
app_context.ThreadExit += new EventHandler(InternalExit);
|
||||
}
|
||||
Run();
|
||||
Console.WriteLine("Application.Run(Context): returning");
|
||||
}
|
||||
#endregion // Public Static Methods
|
||||
|
||||
#region Events
|
||||
public static event EventHandler ApplicationExit;
|
||||
public static event EventHandler Idle;
|
||||
public static event EventHandler ThreadExit;
|
||||
public static event ThreadExceptionEventHandler ThreadException;
|
||||
#endregion // Events
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ApplicationContext.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class ApplicationContext {
|
||||
#region Local Variables
|
||||
Form main_form;
|
||||
#endregion // Local Variables
|
||||
|
||||
#region Public Constructors & Destructors
|
||||
public ApplicationContext() : this(null) {
|
||||
}
|
||||
|
||||
public ApplicationContext(Form mainForm) {
|
||||
main_form=mainForm;
|
||||
}
|
||||
|
||||
~ApplicationContext() {
|
||||
this.Dispose(false);
|
||||
}
|
||||
#endregion // Public Constructors & Destructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public Form MainForm {
|
||||
get {
|
||||
return main_form;
|
||||
}
|
||||
|
||||
set {
|
||||
if (main_form!=value) {
|
||||
main_form=value;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Public Instance Methods
|
||||
public void Dispose() {
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
public void ExitThread() {
|
||||
ExitThreadCore();
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
|
||||
#region Protected Instance Methods
|
||||
protected virtual void Dispose(bool disposing) {
|
||||
main_form=null;
|
||||
}
|
||||
|
||||
protected virtual void ExitThreadCore() {
|
||||
if (ThreadExit!=null) {
|
||||
ThreadExit(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnMainFormClosed(object sender, EventArgs e) {
|
||||
ExitThreadCore();
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
|
||||
#region Events
|
||||
public event EventHandler ThreadExit;
|
||||
#endregion // Events
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: BaseCollection.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class BaseCollection : MarshalByRefObject, ICollection, IEnumerable {
|
||||
internal ArrayList list;
|
||||
|
||||
#region Public Constructors
|
||||
public BaseCollection() {
|
||||
this.list=null;
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public virtual int Count {
|
||||
get {
|
||||
return this.list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSynchronized {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public object SyncRoot {
|
||||
get {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Protected Instance Properties
|
||||
protected virtual ArrayList List {
|
||||
get {
|
||||
return this.list;
|
||||
}
|
||||
}
|
||||
#endregion // Protected Instance Properties
|
||||
|
||||
#region Public Instance Methods
|
||||
public void CopyTo(Array ar, int index) {
|
||||
this.list.CopyTo(ar, index);
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator() {
|
||||
return this.list.GetEnumerator();
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: Binding.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class Binding {
|
||||
internal string property_name;
|
||||
internal object data_source;
|
||||
internal BindingManagerBase binding_manager_base;
|
||||
internal BindingMemberInfo binding_member_info;
|
||||
internal Control control;
|
||||
internal bool is_binding;
|
||||
|
||||
#region Public Constructors
|
||||
public Binding(string propertyName, object dataSource, string dataMember) {
|
||||
this.property_name=propertyName;
|
||||
this.data_source=dataSource;
|
||||
this.binding_member_info=new BindingMemberInfo(dataMember);
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public BindingManagerBase BindingManagerBase {
|
||||
get {
|
||||
return this.binding_manager_base;
|
||||
}
|
||||
}
|
||||
|
||||
public BindingMemberInfo BindingMemberInfo {
|
||||
get {
|
||||
return this.binding_member_info;
|
||||
}
|
||||
}
|
||||
|
||||
public Control Control {
|
||||
get {
|
||||
return this.control;
|
||||
}
|
||||
}
|
||||
|
||||
public object DataSource {
|
||||
get {
|
||||
return this.data_source;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsBinding {
|
||||
get {
|
||||
return this.is_binding;
|
||||
}
|
||||
}
|
||||
|
||||
public string PropertyName {
|
||||
get {
|
||||
return this.property_name;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Protected Instance Methods
|
||||
protected virtual void OnFormat(ConvertEventArgs cevent) {
|
||||
if (Format!=null) Format(this, cevent);
|
||||
}
|
||||
|
||||
protected virtual void OnParse(ConvertEventArgs cevent) {
|
||||
if (Parse!=null) Parse(this, cevent);
|
||||
}
|
||||
#endregion // Protected Instance Methods
|
||||
|
||||
#region Events
|
||||
public event ConvertEventHandler Format;
|
||||
public event ConvertEventHandler Parse;
|
||||
#endregion // Events
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: BindingContext.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// NOT COMPLETE
|
||||
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class BindingContext : ICollection, IEnumerable {
|
||||
#region Public Constructors
|
||||
public BindingContext() {
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
[MonoTODO]
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public BindingManagerBase this[object dataSource] {
|
||||
get {
|
||||
return this[dataSource, String.Empty];
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public BindingManagerBase this[object dataSource, string dataMember] {
|
||||
get {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Public Instance Methods
|
||||
public bool Contains(object dataSource) {
|
||||
return Contains(dataSource, String.Empty);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool Contains(object dataSource, string dataMember) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
|
||||
#region Protected Instance Methods
|
||||
protected internal void Add(object dataSource, BindingManagerBase listManager) {
|
||||
AddCore(dataSource, listManager);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual void AddCore(object dataSource, BindingManagerBase listManager) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected internal void Clear() {
|
||||
ClearCore();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual void ClearCore() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected virtual void OnCollectionChanged(System.ComponentModel.CollectionChangeEventArgs ccevent) {
|
||||
if (CollectionChanged!=null) CollectionChanged(this, ccevent);
|
||||
}
|
||||
|
||||
protected internal void Remove(object dataSource) {
|
||||
RemoveCore(dataSource);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual void RemoveCore(object dataSource) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#endregion // Protected Instance Methods
|
||||
|
||||
#region Events
|
||||
public event CollectionChangeEventHandler CollectionChanged;
|
||||
#endregion // Events
|
||||
|
||||
#region ICollection Interfaces
|
||||
[MonoTODO]
|
||||
void ICollection.CopyTo(Array array, int index) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
int ICollection.Count {
|
||||
get {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
bool ICollection.IsSynchronized {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
object ICollection.SyncRoot {
|
||||
get {
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // ICollection Interfaces
|
||||
|
||||
#region IEnumerable Interfaces
|
||||
[MonoTODO]
|
||||
IEnumerator IEnumerable.GetEnumerator() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#endregion // IEnumerable Interfaces
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: BindingMemberInfo.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class BindingMemberInfo {
|
||||
private string data_member;
|
||||
private string data_field;
|
||||
private string data_path;
|
||||
|
||||
#region Public Constructors
|
||||
public BindingMemberInfo(string dataMember) {
|
||||
int i;
|
||||
|
||||
if (dataMember!=null) {
|
||||
this.data_member=dataMember;
|
||||
} else {
|
||||
this.data_member=String.Empty;
|
||||
}
|
||||
|
||||
// Break out our components
|
||||
i=data_member.LastIndexOf('.');
|
||||
if (i!=-1) {
|
||||
data_field=data_member.Substring(i+1);
|
||||
data_path=data_member.Substring(0, i);
|
||||
} else {
|
||||
data_field=data_member;
|
||||
data_path=String.Empty;
|
||||
}
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public string BindingField {
|
||||
get {
|
||||
return this.data_field;
|
||||
}
|
||||
}
|
||||
|
||||
public string BindingMember {
|
||||
get {
|
||||
return this.data_member;
|
||||
}
|
||||
}
|
||||
|
||||
public string BindingPath {
|
||||
get {
|
||||
return this.data_path;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Public Instance Methods
|
||||
public override bool Equals(object otherObject) {
|
||||
if (otherObject is BindingMemberInfo) {
|
||||
return (this == (BindingMemberInfo)otherObject);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
return this.data_member.GetHashCode();
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: BindingsCollection.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class BindingsCollection : BaseCollection {
|
||||
#region Public Constructors
|
||||
internal BindingsCollection () {
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public override int Count {
|
||||
get {
|
||||
return base.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public Binding this[int index] {
|
||||
get {
|
||||
return (Binding)(base.List[index]);
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Protected Instance Properties
|
||||
protected override ArrayList List {
|
||||
get {
|
||||
return base.List;
|
||||
}
|
||||
}
|
||||
#endregion // Protected Instance Properties
|
||||
|
||||
#region Protected Instance Methods
|
||||
protected internal void Add(Binding binding) {
|
||||
AddCore(binding);
|
||||
}
|
||||
|
||||
protected virtual void AddCore(Binding dataBinding) {
|
||||
base.List.Add(dataBinding);
|
||||
OnCollectionChanged(new CollectionChangeEventArgs(CollectionChangeAction.Add, base.List));
|
||||
}
|
||||
|
||||
protected internal void Clear() {
|
||||
ClearCore();
|
||||
}
|
||||
|
||||
protected virtual void ClearCore() {
|
||||
base.List.Clear();
|
||||
OnCollectionChanged(new CollectionChangeEventArgs(CollectionChangeAction.Refresh, base.List));
|
||||
}
|
||||
|
||||
protected virtual void OnCollectionChanged(System.ComponentModel.CollectionChangeEventArgs ccevent) {
|
||||
if (CollectionChanged!=null) CollectionChanged(this, ccevent);
|
||||
}
|
||||
|
||||
protected internal void Remove(Binding binding) {
|
||||
RemoveCore(binding);
|
||||
}
|
||||
|
||||
protected internal void RemoveAt(int index) {
|
||||
base.List.RemoveAt(index);
|
||||
OnCollectionChanged(new CollectionChangeEventArgs(CollectionChangeAction.Remove, base.List));
|
||||
}
|
||||
|
||||
protected virtual void RemoveCore(Binding dataBinding) {
|
||||
base.List.Remove(dataBinding);
|
||||
OnCollectionChanged(new CollectionChangeEventArgs(CollectionChangeAction.Remove, base.List));
|
||||
}
|
||||
|
||||
protected internal bool ShouldSerializeMyAll() {
|
||||
if (this.Count>0) {
|
||||
return(true);
|
||||
} else {
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
|
||||
#region Events
|
||||
public event CollectionChangeEventHandler CollectionChanged;
|
||||
#endregion // Events
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: BindingsManagerBase.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// NOT COMPLETE
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public abstract class BindingManagerBase {
|
||||
private BindingsCollection bindings;
|
||||
|
||||
#region Public Constructors
|
||||
public BindingManagerBase() {
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Protected Instance Fields
|
||||
protected EventHandler onCurrentChangedHandler;
|
||||
protected EventHandler onPositionChangedHandler;
|
||||
#endregion // Protected Instance Fields
|
||||
|
||||
#region Public Instance Properties
|
||||
public BindingsCollection Bindings {
|
||||
get {
|
||||
if (this.bindings==null) {
|
||||
this.bindings=new BindingsCollection();
|
||||
}
|
||||
return this.bindings;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract int Count {
|
||||
get;
|
||||
}
|
||||
|
||||
public abstract object Current {
|
||||
get;
|
||||
}
|
||||
|
||||
public abstract int Position {
|
||||
get; set;
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Public Instance Methods
|
||||
public abstract void AddNew();
|
||||
|
||||
public abstract void CancelCurrentEdit();
|
||||
|
||||
public abstract void EndCurrentEdit();
|
||||
|
||||
public abstract PropertyDescriptorCollection GetItemProperties();
|
||||
|
||||
public abstract void RemoveAt(int index);
|
||||
|
||||
public abstract void ResumeBinding();
|
||||
|
||||
public abstract void SuspendBinding();
|
||||
#endregion // Public Instance Methods
|
||||
|
||||
#region Protected Instance Methods
|
||||
[MonoTODO]
|
||||
protected internal virtual PropertyDescriptorCollection GetItemProperties(System.Collections.ArrayList dataSources, System.Collections.ArrayList listAccessors) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual PropertyDescriptorCollection GetItemProperties(Type lisType, int offset, System.Collections.ArrayList dataSources, System.Collections.ArrayList listAccessors) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected internal abstract string GetListName(System.Collections.ArrayList listAccessors);
|
||||
|
||||
protected internal abstract void OnCurrentChanged(EventArgs e);
|
||||
|
||||
[MonoTODO]
|
||||
protected void PullData() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected void PushData() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected abstract void UpdateIsBinding();
|
||||
#endregion // Protected Instance Methods
|
||||
|
||||
#region Events
|
||||
public EventHandler CurrentChanged;
|
||||
public EventHandler PositionChanged;
|
||||
#endregion // Events
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: Border3DSide.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum Border3DSide {
|
||||
Left = 0x00000001,
|
||||
Top = 0x00000002,
|
||||
Right = 0x00000004,
|
||||
Bottom = 0x00000008,
|
||||
Middle = 0x00000800,
|
||||
All = 0x0000080F
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: Border3DStyle.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum Border3DStyle {
|
||||
RaisedOuter = 1,
|
||||
SunkenOuter = 2,
|
||||
RaisedInner = 4,
|
||||
Raised = 5,
|
||||
Etched = 6,
|
||||
SunkenInner = 8,
|
||||
Bump = 9,
|
||||
Sunken = 10,
|
||||
Adjust = 8192,
|
||||
Flat = 16384
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: BorderStyle.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum BorderStyle {
|
||||
None = 0,
|
||||
FixedSingle = 1,
|
||||
Fixed3D = 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: BoundsSpecified.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms
|
||||
{
|
||||
[Flags]
|
||||
public enum BoundsSpecified
|
||||
{
|
||||
None = 0x00000000,
|
||||
X = 0x00000001,
|
||||
Y = 0x00000002,
|
||||
Location = 0x00000003,
|
||||
Width = 0x00000004,
|
||||
Height = 0x00000008,
|
||||
Size = 0x0000000c,
|
||||
All = 0x0000000f
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ButtonBorderStyle.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum ButtonBorderStyle {
|
||||
None = 0,
|
||||
Dotted = 1,
|
||||
Dashed = 2,
|
||||
Solid = 3,
|
||||
Inset = 4,
|
||||
Outset = 5
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ButtonState.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum ButtonState {
|
||||
Normal = 0x00000000,
|
||||
Inactive = 0x00000100,
|
||||
Pushed = 0x00000200,
|
||||
Checked = 0x00000400,
|
||||
Flat = 0x00004000,
|
||||
All = 0x00004700
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: CaptionButton.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum CaptionButton {
|
||||
Close = 0,
|
||||
Minimize = 1,
|
||||
Maximize = 2,
|
||||
Restore = 3,
|
||||
Help = 4
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
$Log: ChangeLog,v $
|
||||
Revision 1.3 2004/07/09 17:25:23 pbartok
|
||||
- Removed usage of Rectangle for drawing. Miguel pointed out it's faster
|
||||
|
||||
Revision 1.2 2004/07/09 17:17:46 miguel
|
||||
2004-07-09 Miguel de Icaza <[email protected]>
|
||||
|
||||
* ProgressBar.cs: Fixed spelling for `block'
|
||||
|
||||
drawProgressBar: renamed to `DrawProgressBar' to follow the coding
|
||||
style guidelines.
|
||||
|
||||
Avoid using the += on rect.X, that exposed a bug in the compiler.
|
||||
|
||||
Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
- Initial check-in
|
||||
|
||||
@@ -0,0 +1,559 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Dennis Hayes [email protected]
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: CheckBox.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// NOT COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class CreateParams {
|
||||
#region Public Constructors
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Public Instance Methods
|
||||
#endregion // Public Instance Methods
|
||||
}
|
||||
}
|
||||
//
|
||||
// System.Windows.Forms.CheckBox.cs
|
||||
//
|
||||
// Author:
|
||||
// stubbed out by Jaak Simm ([email protected])
|
||||
// Dennis Hayes ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc., 2002
|
||||
//
|
||||
|
||||
using System.Drawing;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
|
||||
/// <summary>
|
||||
/// Represents a Windows check box.
|
||||
/// </summary>
|
||||
|
||||
[MonoTODO]
|
||||
public class CheckBox : ButtonBase {
|
||||
|
||||
// private fields
|
||||
Appearance appearance;
|
||||
bool autoCheck;
|
||||
ContentAlignment checkAlign;
|
||||
bool _checked;
|
||||
CheckState checkState;
|
||||
bool threeState;
|
||||
ContentAlignment textAlign;
|
||||
Rectangle textRect;
|
||||
Rectangle checkRect;
|
||||
StringFormat textFormat;
|
||||
int checkMarkSize=13; // Keep it configurable for accessability
|
||||
Graphics canvasDC;
|
||||
Bitmap canvasBmp;
|
||||
|
||||
// --- Constructor ---
|
||||
public CheckBox() : base()
|
||||
{
|
||||
|
||||
appearance = Appearance.Normal;
|
||||
autoCheck = true;
|
||||
checkAlign = ContentAlignment.MiddleLeft;
|
||||
_checked = false;
|
||||
checkState = CheckState.Unchecked;
|
||||
threeState = false;
|
||||
|
||||
canvasBmp = new Bitmap(ClientRectangle.Width, ClientRectangle.Height);
|
||||
canvasDC = Graphics.FromImage(canvasBmp);
|
||||
|
||||
/* Set defaults for drawing text... */
|
||||
textAlign = ContentAlignment.MiddleLeft;
|
||||
textFormat = new StringFormat();
|
||||
textFormat.Alignment=StringAlignment.Near;
|
||||
textFormat.LineAlignment=StringAlignment.Center;
|
||||
textRect = ClientRectangle;
|
||||
textRect.X+=checkMarkSize;
|
||||
textRect.Width-=checkMarkSize;
|
||||
|
||||
/* ... and for drawing our checkbox */
|
||||
checkRect.X=ClientRectangle.Left;
|
||||
checkRect.Y=(ClientRectangle.Bottom-ClientRectangle.Top)/2-checkMarkSize/2;
|
||||
checkRect.Width=checkMarkSize;
|
||||
checkRect.Height=checkMarkSize;
|
||||
|
||||
SizeChanged+=new System.EventHandler(CheckboxSizeChanged);
|
||||
GotFocus+=new System.EventHandler(CheckboxUpdate);
|
||||
LostFocus+=new System.EventHandler(CheckboxUpdate);
|
||||
TextChanged+=new System.EventHandler(CheckboxUpdate);
|
||||
|
||||
SubClassWndProc_ = true;
|
||||
SetStyle (ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
|
||||
callWinControlProcMask &= ~(CallWinControlProcMask.MOUSE_MESSAGES | CallWinControlProcMask.KEYBOARD_MESSAGES);
|
||||
}
|
||||
|
||||
// --- CheckBox Properties ---
|
||||
public Appearance Appearance {
|
||||
get { return appearance; }
|
||||
set { appearance=value; }
|
||||
}
|
||||
|
||||
public bool AutoCheck {
|
||||
get { return autoCheck; }
|
||||
set { autoCheck = value; }
|
||||
}
|
||||
|
||||
public ContentAlignment CheckAlign {
|
||||
get { return checkAlign; }
|
||||
set {
|
||||
checkAlign=value;
|
||||
UpdateCheckbox();
|
||||
}
|
||||
}
|
||||
|
||||
public bool Checked {
|
||||
get { return _checked; }
|
||||
set {
|
||||
if( _checked != value) {
|
||||
CheckState = (value) ? CheckState.Checked : CheckState.Unchecked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CheckState CheckState {
|
||||
get { return checkState; }
|
||||
set {
|
||||
if( checkState != value) {
|
||||
|
||||
checkState = value;
|
||||
bool oldChecked = _checked;
|
||||
|
||||
if( checkState == CheckState.Unchecked) {
|
||||
_checked = false;
|
||||
}
|
||||
else {
|
||||
_checked = true;
|
||||
}
|
||||
|
||||
if( oldChecked != _checked) {
|
||||
OnCheckedChanged(new EventArgs());
|
||||
}
|
||||
|
||||
OnCheckStateChanged(new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected override CreateParams CreateParams {
|
||||
get {
|
||||
CreateParams createParams = base.CreateParams;
|
||||
|
||||
createParams.ClassName = "BUTTON";
|
||||
|
||||
createParams.Style = (int) (
|
||||
(int)WindowStyles.WS_CHILD |
|
||||
(int)WindowStyles.WS_VISIBLE |
|
||||
(int)ButtonStyles.BS_CHECKBOX |
|
||||
(int)ButtonStyles.BS_NOTIFY |
|
||||
(int)WindowStyles.WS_CLIPSIBLINGS |
|
||||
(int)WindowStyles.WS_CLIPCHILDREN |
|
||||
(int)WindowStyles.WS_TABSTOP |
|
||||
(int)SS_Static_Control_Types.SS_LEFT );
|
||||
|
||||
if (autoCheck) {
|
||||
createParams.Style |= (int)ButtonStyles.BS_AUTOCHECKBOX;
|
||||
}
|
||||
|
||||
/* We need this, we draw ourselves */
|
||||
createParams.Style |= (int) ButtonStyles.BS_OWNERDRAW;
|
||||
|
||||
return createParams;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected override Size DefaultSize {
|
||||
get { return new Size(100,checkMarkSize); }
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public override ContentAlignment TextAlign {
|
||||
get {
|
||||
return textAlign;
|
||||
}
|
||||
set {
|
||||
textAlign = value;
|
||||
UpdateCheckbox();
|
||||
}
|
||||
}
|
||||
|
||||
public bool ThreeState {
|
||||
get {
|
||||
return threeState;
|
||||
}
|
||||
|
||||
set {
|
||||
threeState = value;
|
||||
}
|
||||
}
|
||||
|
||||
// --- CheckBox methods ---
|
||||
|
||||
protected override AccessibleObject CreateAccessibilityInstance()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
|
||||
// [event methods]
|
||||
[MonoTODO]
|
||||
protected virtual void OnAppearanceChanged(EventArgs e)
|
||||
{
|
||||
if (AppearanceChanged != null) {
|
||||
AppearanceChanged(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual void OnCheckedChanged(EventArgs e)
|
||||
{
|
||||
//FIXME:
|
||||
if(CheckedChanged != null) {
|
||||
CheckedChanged( this, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected virtual void OnCheckStateChanged(EventArgs e)
|
||||
{
|
||||
//FIXME:
|
||||
if(CheckStateChanged != null) {
|
||||
CheckStateChanged( this, e);
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected override void OnClick(EventArgs e)
|
||||
{
|
||||
CheckState = (CheckState)Win32.SendMessage(Handle, (int)ButtonMessages.BM_GETCHECK, 0, 0);
|
||||
base.OnClick(e);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
protected override void OnHandleCreated(EventArgs e)
|
||||
{
|
||||
//FIXME:
|
||||
base.OnHandleCreated(e);
|
||||
Win32.SendMessage(Handle, (int)ButtonMessages.BM_SETCHECK, (int)checkState, 0);
|
||||
}
|
||||
|
||||
// protected override void OnMouseDown (MouseEventArgs e)
|
||||
// {
|
||||
// base.OnMouseDown (e);
|
||||
// }
|
||||
|
||||
[MonoTODO]
|
||||
protected override void OnMouseUp(MouseEventArgs mevent)
|
||||
{
|
||||
if (ThreeState) {
|
||||
switch (CheckState) {
|
||||
case CheckState.Unchecked: {
|
||||
CheckState = CheckState.Checked;
|
||||
break;
|
||||
}
|
||||
|
||||
case CheckState.Indeterminate: {
|
||||
CheckState = CheckState.Unchecked;
|
||||
break;
|
||||
}
|
||||
|
||||
case CheckState.Checked: {
|
||||
CheckState = CheckState.Indeterminate;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Checked = Checked ? false : true;
|
||||
}
|
||||
CheckboxRedraw();
|
||||
Invalidate();
|
||||
base.OnMouseUp(mevent);
|
||||
}
|
||||
// end of [event methods]
|
||||
|
||||
|
||||
[MonoTODO]
|
||||
protected override bool ProcessMnemonic(char charCode)
|
||||
{
|
||||
//FIXME:
|
||||
return base.ProcessMnemonic(charCode);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
//FIXME: do a better tostring
|
||||
public override string ToString()
|
||||
{
|
||||
if (Checked) {
|
||||
return "CheckBox" + " Checked";
|
||||
} else {
|
||||
return "CheckBox" + " Unchecked";
|
||||
}
|
||||
}
|
||||
|
||||
internal override void ButtonPaint (PaintEventArgs e)
|
||||
{
|
||||
if (canvasBmp!=null) {
|
||||
e.Graphics.DrawImage(canvasBmp, e.ClipRectangle, e.ClipRectangle, GraphicsUnit.Pixel);
|
||||
}
|
||||
}
|
||||
|
||||
/// --- CheckBox events ---
|
||||
public event EventHandler AppearanceChanged;
|
||||
public event EventHandler CheckedChanged;
|
||||
public event EventHandler CheckStateChanged;
|
||||
|
||||
/// --- public class CheckBox.CheckBoxAccessibleObject : AccessibleObject ---
|
||||
/// the class is only used for .NET framework
|
||||
///
|
||||
public class CheckBoxAccessibleObject : AccessibleObject {
|
||||
}
|
||||
|
||||
private void UpdateCheckbox() {
|
||||
/* Calculate the position of text and checkbox rectangle */
|
||||
if (appearance!=Appearance.Button) {
|
||||
switch(checkAlign) {
|
||||
case ContentAlignment.BottomCenter: {
|
||||
if (ClientRectangle.Height<checkMarkSize*2) {
|
||||
ClientSize=new Size(ClientRectangle.Width, checkMarkSize*2);
|
||||
}
|
||||
checkRect.X=(ClientRectangle.Right-ClientRectangle.Left)/2-checkMarkSize/2;
|
||||
checkRect.Y=ClientRectangle.Bottom-checkMarkSize;
|
||||
textRect.X=ClientRectangle.X;
|
||||
textRect.Width=ClientRectangle.Width;
|
||||
break;
|
||||
}
|
||||
|
||||
case ContentAlignment.BottomLeft: {
|
||||
checkRect.X=ClientRectangle.Left;
|
||||
checkRect.Y=ClientRectangle.Bottom-checkMarkSize;
|
||||
textRect.X=ClientRectangle.X+checkMarkSize;
|
||||
textRect.Width=ClientRectangle.Width-checkMarkSize;
|
||||
break;
|
||||
}
|
||||
|
||||
case ContentAlignment.BottomRight: {
|
||||
checkRect.X=ClientRectangle.Right-checkMarkSize;
|
||||
checkRect.Y=ClientRectangle.Bottom-checkMarkSize;
|
||||
textRect.X=ClientRectangle.X;
|
||||
textRect.Width=ClientRectangle.Width-checkMarkSize;
|
||||
break;
|
||||
}
|
||||
|
||||
case ContentAlignment.MiddleCenter: {
|
||||
checkRect.X=(ClientRectangle.Right-ClientRectangle.Left)/2-checkMarkSize/2;
|
||||
checkRect.Y=(ClientRectangle.Bottom-ClientRectangle.Top)/2-checkMarkSize/2;
|
||||
textRect.X=ClientRectangle.X;
|
||||
textRect.Width=ClientRectangle.Width;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
case ContentAlignment.MiddleLeft: {
|
||||
checkRect.X=ClientRectangle.Left;
|
||||
checkRect.Y=(ClientRectangle.Bottom-ClientRectangle.Top)/2-checkMarkSize/2;
|
||||
textRect.X=ClientRectangle.X+checkMarkSize;
|
||||
textRect.Width=ClientRectangle.Width-checkMarkSize;
|
||||
break;
|
||||
}
|
||||
|
||||
case ContentAlignment.MiddleRight: {
|
||||
checkRect.X=ClientRectangle.Right-checkMarkSize;
|
||||
checkRect.Y=(ClientRectangle.Bottom-ClientRectangle.Top)/2-checkMarkSize/2;
|
||||
textRect.X=ClientRectangle.X;
|
||||
textRect.Width=ClientRectangle.Width-checkMarkSize;
|
||||
break;
|
||||
}
|
||||
|
||||
case ContentAlignment.TopCenter: {
|
||||
if (ClientRectangle.Height<checkMarkSize*2) {
|
||||
ClientSize=new Size(ClientRectangle.Width, checkMarkSize*2);
|
||||
}
|
||||
checkRect.X=(ClientRectangle.Right-ClientRectangle.Left)/2-checkMarkSize/2;
|
||||
checkRect.Y=ClientRectangle.Top;
|
||||
textRect.X=ClientRectangle.X;
|
||||
textRect.Y=checkMarkSize;
|
||||
textRect.Width=ClientRectangle.Width;
|
||||
textRect.Height=ClientRectangle.Height-checkMarkSize;
|
||||
break;
|
||||
}
|
||||
|
||||
case ContentAlignment.TopLeft: {
|
||||
checkRect.X=ClientRectangle.Left;
|
||||
checkRect.Y=ClientRectangle.Top;
|
||||
textRect.X=ClientRectangle.X+checkMarkSize;
|
||||
textRect.Width=ClientRectangle.Width-checkMarkSize;
|
||||
break;
|
||||
}
|
||||
|
||||
case ContentAlignment.TopRight: {
|
||||
checkRect.X=ClientRectangle.Right-checkMarkSize;
|
||||
checkRect.Y=ClientRectangle.Top;
|
||||
textRect.X=ClientRectangle.X;
|
||||
textRect.Width=ClientRectangle.Width-checkMarkSize;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
textRect.X=ClientRectangle.X;
|
||||
textRect.Width=ClientRectangle.Width;
|
||||
}
|
||||
|
||||
/* Set the horizontal alignment of our text */
|
||||
switch(textAlign) {
|
||||
case ContentAlignment.BottomLeft:
|
||||
case ContentAlignment.MiddleLeft:
|
||||
case ContentAlignment.TopLeft: {
|
||||
textFormat.Alignment=StringAlignment.Near;
|
||||
break;
|
||||
}
|
||||
|
||||
case ContentAlignment.BottomCenter:
|
||||
case ContentAlignment.MiddleCenter:
|
||||
case ContentAlignment.TopCenter: {
|
||||
textFormat.Alignment=StringAlignment.Center;
|
||||
break;
|
||||
}
|
||||
|
||||
case ContentAlignment.BottomRight:
|
||||
case ContentAlignment.MiddleRight:
|
||||
case ContentAlignment.TopRight: {
|
||||
textFormat.Alignment=StringAlignment.Far;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set the vertical alignment of our text */
|
||||
switch(textAlign) {
|
||||
case ContentAlignment.TopLeft:
|
||||
case ContentAlignment.TopCenter:
|
||||
case ContentAlignment.TopRight: {
|
||||
textFormat.LineAlignment=StringAlignment.Near;
|
||||
break;
|
||||
}
|
||||
|
||||
case ContentAlignment.BottomLeft:
|
||||
case ContentAlignment.BottomCenter:
|
||||
case ContentAlignment.BottomRight: {
|
||||
textFormat.LineAlignment=StringAlignment.Far;
|
||||
break;
|
||||
}
|
||||
|
||||
case ContentAlignment.MiddleLeft:
|
||||
case ContentAlignment.MiddleCenter:
|
||||
case ContentAlignment.MiddleRight: {
|
||||
textFormat.LineAlignment=StringAlignment.Center;
|
||||
break;
|
||||
}
|
||||
}
|
||||
CheckboxRedraw();
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
private void CheckboxRedraw() {
|
||||
SolidBrush sb;
|
||||
|
||||
/* Build the image representing the control */
|
||||
|
||||
if (canvasDC!=null) {
|
||||
canvasDC.Dispose();
|
||||
}
|
||||
if (canvasBmp!=null) {
|
||||
canvasBmp.Dispose();
|
||||
}
|
||||
|
||||
if (ClientRectangle.Width<1 || ClientRectangle.Height<1) {
|
||||
return;
|
||||
}
|
||||
canvasBmp = new Bitmap(ClientRectangle.Width, ClientRectangle.Height);
|
||||
canvasDC = Graphics.FromImage(canvasBmp);
|
||||
|
||||
sb=new SolidBrush(BackColor);
|
||||
canvasDC.FillRectangle(sb, ClientRectangle);
|
||||
sb.Dispose();
|
||||
|
||||
ButtonState state = ButtonState.Normal;
|
||||
if (FlatStyle == FlatStyle.Flat) {
|
||||
state |= ButtonState.Flat;
|
||||
}
|
||||
|
||||
if (Checked) {
|
||||
state |= ButtonState.Checked;
|
||||
}
|
||||
|
||||
if (ThreeState && (CheckState == CheckState.Indeterminate)) {
|
||||
state |= ButtonState.Checked;
|
||||
state |= ButtonState.Pushed;
|
||||
}
|
||||
|
||||
if (appearance!=Appearance.Button) {
|
||||
ControlPaint.DrawCheckBox(canvasDC, checkRect, state);
|
||||
} else {
|
||||
ControlPaint.DrawButton(canvasDC, textRect, state);
|
||||
}
|
||||
|
||||
/* Place the text; to be compatible with Windows place it after the checkbox has been drawn */
|
||||
sb=new SolidBrush(base.foreColor);
|
||||
canvasDC.DrawString(Text, Font, sb, textRect, textFormat);
|
||||
sb.Dispose();
|
||||
|
||||
if (Focused) {
|
||||
ControlPaint.DrawFocusRectangle(canvasDC, textRect);
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckboxUpdate(object sender, System.EventArgs e) {
|
||||
/* Force recalculation of text & checkbox rectangles */
|
||||
UpdateCheckbox();
|
||||
}
|
||||
|
||||
private void CheckboxSizeChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
/* Force recalculation of text & checkbox rectangles */
|
||||
textRect.Y=ClientRectangle.Y;
|
||||
textRect.Height=ClientRectangle.Height;
|
||||
UpdateCheckbox();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok ([email protected])
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ColorDepth.cs,v $
|
||||
// Revision 1.1 2004/07/15 20:05:28 pbartok
|
||||
// - Implemented ImageList and ImageList.ImageCollection classes
|
||||
// - Added ColorDepth enumeration
|
||||
// - Updated SWF VS.Net project
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum ColorDepth {
|
||||
Depth4Bit = 4,
|
||||
Depth8Bit = 8,
|
||||
Depth16Bit = 16,
|
||||
Depth24Bit = 24,
|
||||
Depth32Bit = 32
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ContainerControl.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// NOT COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class ContainerControl : ScrollableControl, IContainerControl {
|
||||
private Control active_control;
|
||||
private Control focused_control;
|
||||
|
||||
#region Public Constructors
|
||||
public ContainerControl() {
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public Control ActiveControl {
|
||||
get {
|
||||
return active_control;
|
||||
}
|
||||
|
||||
set {
|
||||
if ((active_control==value) || (value==null)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Contains(value)) {
|
||||
throw new ArgumentException("Not a child control");
|
||||
}
|
||||
|
||||
XplatUI.Activate(active_control.window.Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public override BindingContext BindingContext {
|
||||
get {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
set {
|
||||
}
|
||||
}
|
||||
|
||||
public Form ParentForm {
|
||||
get {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Protected Instance Methods
|
||||
protected override CreateParams CreateParams {
|
||||
get {
|
||||
return base.CreateParams;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
|
||||
#region Public Instance Methods
|
||||
public bool Validate() {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool ActivateControl(Control control) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
|
||||
#region Protected Instance Methods
|
||||
protected override void AdjustFormScrollbars(bool displayScrollbars) {
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing) {
|
||||
}
|
||||
|
||||
protected override void OnControlRemoved(ControlEventArgs e) {
|
||||
}
|
||||
|
||||
protected override void OnCreateControl() {
|
||||
}
|
||||
|
||||
protected override bool ProcessDialogChar(char charCode) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override bool ProcessDialogKey(Keys keyData) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override bool ProcessMnemonic(char charCode) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected virtual bool ProcessTabKey(bool forward) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
protected override void Select(bool directed, bool forward) {
|
||||
}
|
||||
|
||||
protected virtual void UpdateDefaultButton() {
|
||||
}
|
||||
|
||||
protected override void WndProc(ref Message m) {
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
#endregion // Protected Instance Methods
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,54 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ControlEventArgs.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class ControlEventArgs {
|
||||
private Control control;
|
||||
|
||||
#region Public Constructors
|
||||
public ControlEventArgs(Control control) {
|
||||
this.control=control;
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public Control Control {
|
||||
get {
|
||||
return this.control;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ControlEventHandler.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public delegate void ControlEventHandler (object sender, ControlEventArgs e);
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,54 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ControlStyles.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum ControlStyles {
|
||||
ContainerControl = 0x00000001,
|
||||
UserPaint = 0x00000002,
|
||||
Opaque = 0x00000004,
|
||||
ResizeRedraw = 0x00000010,
|
||||
FixedWidth = 0x00000020,
|
||||
FixedHeight = 0x00000040,
|
||||
StandardClick = 0x00000100,
|
||||
Selectable = 0x00000200,
|
||||
UserMouse = 0x00000400,
|
||||
SupportsTransparentBackColor = 0x00000800,
|
||||
StandardDoubleClick = 0x00001000,
|
||||
AllPaintingInWmPaint = 0x00002000,
|
||||
CacheText = 0x00004000,
|
||||
EnableNotifyMessage = 0x00008000,
|
||||
DoubleBuffer = 0x00010000
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ConvertEventArgs.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class ConvertEventArgs : EventArgs {
|
||||
private object object_value;
|
||||
private Type desired_type;
|
||||
|
||||
#region Public Constructors
|
||||
public ConvertEventArgs(object value, Type desiredType) {
|
||||
this.object_value=value;
|
||||
this.desired_type=desiredType;
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public Type DesiredType {
|
||||
get {
|
||||
return this.desired_type;
|
||||
}
|
||||
}
|
||||
|
||||
public object Value {
|
||||
get {
|
||||
return this.object_value;
|
||||
}
|
||||
|
||||
set {
|
||||
this.object_value=value;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ConvertEventHandler.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public delegate void ConvertEventHandler (object sender, ConvertEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: Copyright,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class CreateParams {
|
||||
#region Public Constructors
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Public Instance Methods
|
||||
#endregion // Public Instance Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: CreateParams.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class CreateParams {
|
||||
#region Local Variables
|
||||
private string caption;
|
||||
private string class_name;
|
||||
private int class_style;
|
||||
private int ex_style;
|
||||
private int x;
|
||||
private int y;
|
||||
private int height;
|
||||
private int width;
|
||||
private int style;
|
||||
private object param;
|
||||
private IntPtr parent;
|
||||
#endregion // Local variables
|
||||
|
||||
#region Public Constructors
|
||||
public CreateParams() {
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public string Caption {
|
||||
get { return caption; }
|
||||
set { caption = value; }
|
||||
}
|
||||
|
||||
public string ClassName {
|
||||
get { return class_name; }
|
||||
set { class_name = value; }
|
||||
}
|
||||
|
||||
public int ClassStyle {
|
||||
get { return class_style; }
|
||||
set { class_style = value; }
|
||||
}
|
||||
|
||||
public int ExStyle {
|
||||
get { return ex_style; }
|
||||
set { ex_style = value; }
|
||||
}
|
||||
|
||||
public int X {
|
||||
get { return x; }
|
||||
set { x = value; }
|
||||
}
|
||||
|
||||
public int Y {
|
||||
get { return y; }
|
||||
set { y = value; }
|
||||
}
|
||||
|
||||
public int Width {
|
||||
get { return width; }
|
||||
set { width = value; }
|
||||
}
|
||||
|
||||
public int Height {
|
||||
get { return height; }
|
||||
set { height = value; }
|
||||
}
|
||||
|
||||
public int Style {
|
||||
get { return style; }
|
||||
set { style = value; }
|
||||
}
|
||||
|
||||
public object Param {
|
||||
get { return param; }
|
||||
set { param = value; }
|
||||
}
|
||||
|
||||
public IntPtr Parent {
|
||||
get { return parent; }
|
||||
set { parent = value; }
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Public Instance Methods
|
||||
public override string ToString() {
|
||||
return "CreateParams; X=" + X.ToString() +
|
||||
", Y=" + Y.ToString() +
|
||||
", Width=" + Width.ToString() +
|
||||
", Height=" + Height.ToString() +
|
||||
", Style=" + Style.ToString() +
|
||||
", Parent=" + Parent.ToString();
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// System.Windows.Forms.DialogResult.cs
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Autors:
|
||||
// Jordi Mas i Hernandez, [email protected]
|
||||
//
|
||||
//
|
||||
//
|
||||
// $Revision: 1.2 $
|
||||
// $Modtime: $
|
||||
// $Log: DialogResult.cs,v $
|
||||
// Revision 1.2 2004/07/21 16:28:05 jordi
|
||||
// fixes comments filenames
|
||||
//
|
||||
// Revision 1.1 2004/07/21 16:19:17 jordi
|
||||
// LinkLabel control implementation
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
|
||||
[ComVisible(true)]
|
||||
public enum DialogResult
|
||||
{
|
||||
None = 0,
|
||||
OK = 1,
|
||||
Cancel = 2,
|
||||
Abort = 3,
|
||||
Retry = 4,
|
||||
Ignore = 5,
|
||||
Yes = 6,
|
||||
No = 7
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: DockStyle.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum DockStyle {
|
||||
None = 0,
|
||||
Top = 1,
|
||||
Bottom = 2,
|
||||
Left = 3,
|
||||
Right = 4,
|
||||
Fill = 5
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: DragAction.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum DragAction {
|
||||
Continue = 0,
|
||||
Drop = 1,
|
||||
Cancel = 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: DragDropEffects.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum DragDropEffects {
|
||||
None = 0x00000000,
|
||||
Copy = 0x00000001,
|
||||
Move = 0x00000002,
|
||||
Link = 0x00000004,
|
||||
Scroll = unchecked((int)0x80000000),
|
||||
All = unchecked((int)0x80000003)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: DragEventArgs.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class DragEventArgs : EventArgs {
|
||||
private int x;
|
||||
private int y;
|
||||
private int keystate;
|
||||
private DragDropEffects allowed_effect;
|
||||
private DragDropEffects current_effect;
|
||||
private IDataObject data_object;
|
||||
|
||||
#region Public Constructors
|
||||
public DragEventArgs(IDataObject data, int keyState, int x, int y, DragDropEffects allowedEffect, DragDropEffects effect) {
|
||||
this.x=x;
|
||||
this.y=y;
|
||||
this.keystate=keyState;
|
||||
this.allowed_effect=allowedEffect;
|
||||
this.current_effect=effect;
|
||||
this.data_object=data;
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public DragDropEffects AllowedEffect {
|
||||
get {
|
||||
return this.allowed_effect;
|
||||
}
|
||||
}
|
||||
|
||||
public IDataObject Data {
|
||||
get {
|
||||
return this.data_object;
|
||||
}
|
||||
}
|
||||
|
||||
public DragDropEffects Effect {
|
||||
get {
|
||||
return this.current_effect;
|
||||
}
|
||||
|
||||
set {
|
||||
if ((value & this.allowed_effect)!=0) {
|
||||
this.current_effect=value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int KeyState {
|
||||
get {
|
||||
return this.keystate;
|
||||
}
|
||||
}
|
||||
|
||||
public int X {
|
||||
get {
|
||||
return this.x;
|
||||
}
|
||||
}
|
||||
|
||||
public int Y {
|
||||
get {
|
||||
return this.y;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: DragEventHandler.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public delegate void DragEventHandler (object sender, DragEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: FlatStyle.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum FlatStyle {
|
||||
Flat = 0,
|
||||
Popup = 1,
|
||||
Standard = 2,
|
||||
System = 3
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.2 $
|
||||
// $Modtime: $
|
||||
// $Log: Form.cs,v $
|
||||
// Revision 1.2 2004/07/13 15:31:45 jordi
|
||||
// commit: new properties and fixes form size problems
|
||||
//
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// NOT COMPLETE
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.ComponentModel;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class Form : ContainerControl {
|
||||
#region Local Variables
|
||||
//private static bool
|
||||
#endregion // Local Variables
|
||||
|
||||
#region Public Constructor & Destructor
|
||||
public Form() {
|
||||
Console.WriteLine("Form Constructor called");
|
||||
//XplatUI.Version();
|
||||
}
|
||||
#endregion // Public Constructor & Destructor
|
||||
|
||||
#region Public Static Properties
|
||||
#endregion // Public Static Properties
|
||||
|
||||
#region Public Instance Properties
|
||||
protected override Size DefaultSize {
|
||||
get {
|
||||
return new Size (300, 300);
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Protected Instance Properties
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Public Static Methods
|
||||
#endregion // Public Static Methods
|
||||
|
||||
#region Public Instance Methods
|
||||
[MonoTODO("Need to add MDI support")]
|
||||
protected override CreateParams CreateParams {
|
||||
get {
|
||||
CreateParams create_params = new CreateParams();
|
||||
|
||||
create_params.Caption = "";
|
||||
|
||||
create_params.ClassName=XplatUI.DefaultClassName;
|
||||
create_params.ClassStyle = 0;
|
||||
create_params.ExStyle=0;
|
||||
create_params.Parent=IntPtr.Zero;
|
||||
create_params.Param=0;
|
||||
create_params.X = Left;
|
||||
create_params.Y = Top;
|
||||
create_params.Width = Width;
|
||||
create_params.Height = Height;
|
||||
|
||||
create_params.Style |= (int)WindowStyles.WS_OVERLAPPEDWINDOW;
|
||||
create_params.Style |= (int)WindowStyles.WS_VISIBLE;
|
||||
|
||||
return create_params;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
|
||||
#region Protected Instance Methods
|
||||
#endregion // Protected Instance Methods
|
||||
|
||||
#region Events
|
||||
|
||||
protected virtual void OnActivated(EventArgs e) {
|
||||
if (Activated != null) {
|
||||
Activated(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnClosed(EventArgs e) {
|
||||
if (Closed != null) {
|
||||
Closed(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnClosed(System.ComponentModel.CancelEventArgs e) {
|
||||
if (Closing != null) {
|
||||
Closing(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnDeactivate(EventArgs e) {
|
||||
if (Deactivate != null) {
|
||||
Deactivate(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnInputLanguageChanged(InputLanguageChangedEventArgs e) {
|
||||
if (InputLanguageChanged!=null) {
|
||||
InputLanguageChanged(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnInputLanguageChanging(InputLanguageChangingEventArgs e) {
|
||||
if (InputLanguageChanging!=null) {
|
||||
InputLanguageChanging(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnLoad(EventArgs e) {
|
||||
if (Load != null) {
|
||||
Load(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnMaximizedBoundsChanged(EventArgs e) {
|
||||
if (MaximizedBoundsChanged != null) {
|
||||
MaximizedBoundsChanged(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnMaximumSizeChanged(EventArgs e) {
|
||||
if (MaximumSizeChanged != null) {
|
||||
MaximumSizeChanged(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnMdiChildActivate(EventArgs e) {
|
||||
if (MdiChildActivate != null) {
|
||||
MdiChildActivate(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnMenuComplete(EventArgs e) {
|
||||
if (MenuComplete != null) {
|
||||
MenuComplete(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnMenuStart(EventArgs e) {
|
||||
if (MenuStart != null) {
|
||||
MenuStart(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void OnMinimumSizeChanged(EventArgs e) {
|
||||
if (MinimumSizeChanged != null) {
|
||||
MinimumSizeChanged(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
public event EventHandler Activated;
|
||||
public event EventHandler Closed;
|
||||
public event CancelEventHandler Closing;
|
||||
public event EventHandler Deactivate;
|
||||
public event InputLanguageChangedEventHandler InputLanguageChanged;
|
||||
public event InputLanguageChangingEventHandler InputLanguageChanging;
|
||||
public event EventHandler Load;
|
||||
public event EventHandler MaximizedBoundsChanged;
|
||||
public event EventHandler MaximumSizeChanged;
|
||||
public event EventHandler MdiChildActivate;
|
||||
public event EventHandler MenuComplete;
|
||||
public event EventHandler MenuStart;
|
||||
public event EventHandler MinimumSizeChanged;
|
||||
#endregion // Events
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: FrameStyle.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum FrameStyle {
|
||||
Dashed = 0,
|
||||
Thick = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: GiveFeedbackEventArgs.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class GiveFeedbackEventArgs : EventArgs {
|
||||
private DragDropEffects effect;
|
||||
private bool use_default_cursors;
|
||||
|
||||
#region Public Constructors
|
||||
public GiveFeedbackEventArgs(DragDropEffects effect, bool useDefaultCursors) {
|
||||
this.effect=effect;
|
||||
this.use_default_cursors=useDefaultCursors;
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public DragDropEffects Effect {
|
||||
get {
|
||||
return this.effect;
|
||||
}
|
||||
}
|
||||
|
||||
public bool UseDefaultCursors {
|
||||
get {
|
||||
return this.use_default_cursors;
|
||||
}
|
||||
|
||||
set {
|
||||
this.use_default_cursors=value;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: GiveFeedbackEventHandler.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public delegate void GiveFeedbackEventHandler (object sender, GiveFeedbackEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// System.Windows.Forms.HScrollBar.cs
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (C) 2004, Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Jordi Mas i Hernandez [email protected]
|
||||
//
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: HScrollBar.cs,v $
|
||||
// Revision 1.1 2004/07/13 15:33:46 jordi
|
||||
// vertical and hort. classes commit
|
||||
//
|
||||
//
|
||||
|
||||
using System.Drawing;
|
||||
|
||||
namespace System.Windows.Forms
|
||||
{
|
||||
|
||||
public class HScrollBar : ScrollBar
|
||||
{
|
||||
|
||||
public HScrollBar()
|
||||
{
|
||||
vert = false;
|
||||
}
|
||||
|
||||
protected override Size DefaultSize {
|
||||
get { return new Size (80,13); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: HelpEventArgs.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
using System.Drawing;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class HelpEventArgs : EventArgs {
|
||||
private Point mouse_position;
|
||||
private bool event_handled;
|
||||
|
||||
#region Public Constructors
|
||||
public HelpEventArgs(System.Drawing.Point mousePos) {
|
||||
this.mouse_position=mousePos;
|
||||
this.event_handled=false;
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public bool Handled {
|
||||
get {
|
||||
return this.event_handled;
|
||||
}
|
||||
|
||||
set {
|
||||
this.event_handled=value;
|
||||
}
|
||||
}
|
||||
|
||||
public Point MousePos {
|
||||
get {
|
||||
return this.mouse_position;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: HelpEventHandler.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public delegate void HelpEventHandler (object sender, HelpEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// System.Windows.Forms.IButtonControl.cs
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Autors:
|
||||
// Jordi Mas i Hernandez, [email protected]
|
||||
//
|
||||
//
|
||||
//
|
||||
// $Revision: 1.2 $
|
||||
// $Modtime: $
|
||||
// $Log: IButtonControl.cs,v $
|
||||
// Revision 1.2 2004/07/21 16:28:05 jordi
|
||||
// fixes comments filenames
|
||||
//
|
||||
// Revision 1.1 2004/07/21 16:19:17 jordi
|
||||
// LinkLabel control implementation
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms
|
||||
{
|
||||
|
||||
public interface IButtonControl
|
||||
{
|
||||
DialogResult DialogResult {get; set;}
|
||||
void NotifyDefault (bool value);
|
||||
void PerformClick ();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: IContainerControl.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public interface IContainerControl {
|
||||
#region Public Instance Properties
|
||||
Control ActiveControl {get; set;}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Public Instance Methods
|
||||
bool ActivateControl(Control active);
|
||||
#endregion // Public Instance Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: IDataObject.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public interface IDataObject {
|
||||
#region Public Instance Methods
|
||||
object GetData(string format);
|
||||
object GetData(string format, bool autoConvert);
|
||||
object GetData(Type format);
|
||||
|
||||
bool GetDataPresent(string format);
|
||||
bool GetDataPresent(string format, bool autoConvert);
|
||||
bool GetDataPresent(Type format);
|
||||
|
||||
string[] GetFormats();
|
||||
string[] GetFormats(bool autoConvert);
|
||||
|
||||
void SetData(object data);
|
||||
void SetData(string format, bool autoConvert, object data);
|
||||
void SetData(string format, object data);
|
||||
void SetData(Type format, object data);
|
||||
#endregion // Public Instance Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: IMessageFilter.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public interface IMessageFilter {
|
||||
bool PreFilterMessage(ref Message m);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: IWin32Window.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public interface IWin32Window {
|
||||
#region Public Instance Properties
|
||||
IntPtr Handle {
|
||||
get;
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,439 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ImageList.cs,v $
|
||||
// Revision 1.1 2004/07/15 20:05:28 pbartok
|
||||
// - Implemented ImageList and ImageList.ImageCollection classes
|
||||
// - Added ColorDepth enumeration
|
||||
// - Updated SWF VS.Net project
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public sealed class ImageList : System.ComponentModel.Component {
|
||||
#region Local Variables
|
||||
private ColorDepth color_depth;
|
||||
private ImageCollection image_collection;
|
||||
private Size size;
|
||||
private Color transparency_color;
|
||||
private Delegate handler;
|
||||
private ImageListStreamer image_stream;
|
||||
#endregion // Local Variables
|
||||
|
||||
#region Sub-classes
|
||||
public sealed class ImageCollection : IList, ICollection, IEnumerable {
|
||||
#region ImageCollection Local Variables
|
||||
private ImageList owner;
|
||||
private ArrayList list;
|
||||
#endregion // ImageCollection Local Variables
|
||||
|
||||
#region ImageCollection Private Constructors
|
||||
internal ImageCollection(ImageList owner) {
|
||||
this.owner=owner;
|
||||
}
|
||||
#endregion // ImageCollection Private Constructor
|
||||
|
||||
#region ImageCollection Public Instance Properties
|
||||
public int Count {
|
||||
get {
|
||||
return list.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Empty {
|
||||
get {
|
||||
return list.Count==0;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
return list.IsReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
public Image this[int index] {
|
||||
get {
|
||||
if (index<0 || index>=list.Count) {
|
||||
throw new ArgumentOutOfRangeException("index", index, "ImageCollection does not have that many images");
|
||||
}
|
||||
return (Image)list[index];
|
||||
}
|
||||
|
||||
set {
|
||||
if (index<0 || index>=list.Count) {
|
||||
throw new ArgumentOutOfRangeException("index", index, "ImageCollection does not have that many images");
|
||||
}
|
||||
|
||||
if (value==null) {
|
||||
throw new ArgumentOutOfRangeException("value", value, "Image cannot be null");
|
||||
}
|
||||
|
||||
list[index]=value;
|
||||
// What happens if the bitmap had a previous 'MakeTransparent' done to it?
|
||||
((Bitmap)list[index]).MakeTransparent(owner.transparency_color);
|
||||
}
|
||||
}
|
||||
#endregion // ImageCollection Public Instance Properties
|
||||
|
||||
#region ImageCollection Private Instance Methods
|
||||
private int AddInternal(Image image) {
|
||||
int width;
|
||||
int height;
|
||||
PixelFormat format;
|
||||
|
||||
width=owner.ImageSize.Width;
|
||||
height=owner.ImageSize.Height;
|
||||
switch(owner.color_depth) {
|
||||
case ColorDepth.Depth4Bit: format=PixelFormat.Format4bppIndexed; break;
|
||||
case ColorDepth.Depth8Bit: format=PixelFormat.Format8bppIndexed; break;
|
||||
case ColorDepth.Depth16Bit: format=PixelFormat.Format16bppRgb555; break;
|
||||
case ColorDepth.Depth24Bit: format=PixelFormat.Format24bppRgb; break;
|
||||
case ColorDepth.Depth32Bit: format=PixelFormat.Format32bppRgb; break;
|
||||
default: format=PixelFormat.Format32bppRgb; break;
|
||||
}
|
||||
|
||||
// Check if we can add straight or if we have to resize
|
||||
if (image.Width!=width || image.Height!=height || image.PixelFormat!=format) {
|
||||
Graphics g;
|
||||
Bitmap reformatted_image;
|
||||
|
||||
reformatted_image = new Bitmap(width, height, format);
|
||||
g=Graphics.FromImage(reformatted_image);
|
||||
|
||||
g.DrawImage(image, new Rectangle(0, 0, width, height), 0, 0, width, height, GraphicsUnit.Pixel);
|
||||
g.Dispose();
|
||||
|
||||
return list.Add(reformatted_image);
|
||||
} else {
|
||||
return list.Add(image);
|
||||
}
|
||||
}
|
||||
|
||||
internal void Dispose() {
|
||||
if (list!=null) {
|
||||
for (int i=0; i<list.Count; i++) {
|
||||
((Image)list[i]).Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion // ImageCollection Private Instance Methods
|
||||
|
||||
#region ImageCollection Public Instance Methods
|
||||
public int Add(Image value, Color transparentColor) {
|
||||
if (value==null) {
|
||||
throw new ArgumentNullException("value", "Cannot add null image");
|
||||
}
|
||||
|
||||
((Bitmap)value).MakeTransparent(owner.transparency_color);
|
||||
return AddInternal(value);
|
||||
|
||||
}
|
||||
|
||||
public void Add(Icon value) {
|
||||
Image image;
|
||||
|
||||
image = value.ToBitmap();
|
||||
|
||||
if (value==null || image==null) {
|
||||
throw new ArgumentNullException("value", "Cannot add null icon");
|
||||
}
|
||||
|
||||
((Bitmap)image).MakeTransparent(owner.transparency_color);
|
||||
AddInternal(image);
|
||||
}
|
||||
|
||||
public void Add(Image value) {
|
||||
if (value==null) {
|
||||
throw new ArgumentNullException("value", "Cannot add null image");
|
||||
}
|
||||
((Bitmap)value).MakeTransparent(owner.transparency_color);
|
||||
AddInternal(value);
|
||||
}
|
||||
|
||||
public int AddStrip(Image value) {
|
||||
int image_count;
|
||||
int width;
|
||||
int height;
|
||||
Bitmap image;
|
||||
Graphics g;
|
||||
|
||||
if (value==null) {
|
||||
throw new ArgumentNullException("value", "Cannot add null images");
|
||||
}
|
||||
|
||||
if ((value.Width % owner.ImageSize.Width) != 0) {
|
||||
throw new ArgumentException("Strip is not a multiple of the ImageList with", "value");
|
||||
}
|
||||
|
||||
// MSDN: The number of images is inferred from the width. A strip is multiple images side-by-side
|
||||
width=owner.ImageSize.Width;
|
||||
height=owner.ImageSize.Height;
|
||||
image_count=value.Width/width;
|
||||
for (int i=0; i<image_count; i++) {
|
||||
image = new Bitmap(value, width, height);
|
||||
g = Graphics.FromImage(image);
|
||||
|
||||
g.DrawImage(value, new Rectangle(0, 0, width, height), i*width, 0, width, height, GraphicsUnit.Pixel);
|
||||
AddInternal(image);
|
||||
|
||||
g.Dispose();
|
||||
image.Dispose();
|
||||
}
|
||||
|
||||
// FIXME - is this right? MSDN says to return the index, but we might have multiple...
|
||||
return image_count;
|
||||
}
|
||||
|
||||
public void Clear() {
|
||||
list.Clear();
|
||||
}
|
||||
|
||||
public bool Contains(Image image) {
|
||||
return list.Contains(image);
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator() {
|
||||
return list.GetEnumerator();
|
||||
}
|
||||
|
||||
public int IndexOf(Image image) {
|
||||
return list.IndexOf(image);
|
||||
}
|
||||
|
||||
public void Remove(Image image) {
|
||||
list.Remove(image);
|
||||
}
|
||||
|
||||
public void RemoveAt(int index) {
|
||||
if (index<0 || index>=list.Count) {
|
||||
throw new ArgumentOutOfRangeException("index", index, "ImageCollection does not have that many images");
|
||||
}
|
||||
|
||||
list.RemoveAt(index);
|
||||
}
|
||||
#endregion // ImageCollection Public Instance Methods
|
||||
|
||||
#region ImageCollection Interface Properties
|
||||
object IList.this[int index] {
|
||||
get {
|
||||
if (index<0 || index>=list.Count) {
|
||||
throw new ArgumentOutOfRangeException("index", index, "ImageCollection does not have that many images");
|
||||
}
|
||||
return this[index];
|
||||
}
|
||||
|
||||
set {
|
||||
if (!(value is Bitmap)) {
|
||||
throw new ArgumentException("Object of type Image required", "value");
|
||||
}
|
||||
|
||||
this[index]=(Image)value;
|
||||
}
|
||||
}
|
||||
|
||||
bool IList.IsFixedSize {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool IList.IsReadOnly {
|
||||
get {
|
||||
return list.IsReadOnly;
|
||||
}
|
||||
}
|
||||
|
||||
bool ICollection.IsSynchronized {
|
||||
get {
|
||||
return list.IsSynchronized;
|
||||
}
|
||||
}
|
||||
|
||||
object ICollection.SyncRoot {
|
||||
get {
|
||||
return list.SyncRoot;
|
||||
}
|
||||
}
|
||||
#endregion // ImageCollection Interface Properties
|
||||
|
||||
#region ImageCollection Interface Methods
|
||||
int IList.Add(object value) {
|
||||
if (value == null) {
|
||||
throw new ArgumentNullException("value", "Cannot add null images");
|
||||
}
|
||||
|
||||
if (!(value is Bitmap)) {
|
||||
throw new ArgumentException("Object of type Image required", "value");
|
||||
}
|
||||
|
||||
return list.Add(value);
|
||||
}
|
||||
|
||||
bool IList.Contains(object value) {
|
||||
if (!(value is Bitmap)) {
|
||||
throw new ArgumentException("Object of type Image required", "value");
|
||||
}
|
||||
|
||||
return this.Contains((Image) value);
|
||||
}
|
||||
|
||||
int IList.IndexOf(object value) {
|
||||
if (!(value is Bitmap)) {
|
||||
throw new ArgumentException("Object of type Image required", "value");
|
||||
}
|
||||
|
||||
return this.IndexOf((Image) value);
|
||||
}
|
||||
|
||||
void IList.Insert(int index, object value) {
|
||||
if (!(value is Bitmap)) {
|
||||
throw new ArgumentException("Object of type Image required", "value");
|
||||
}
|
||||
list.Insert(index, value);
|
||||
}
|
||||
|
||||
void IList.Remove(object value) {
|
||||
if (!(value is Bitmap)) {
|
||||
throw new ArgumentException("Object of type Image required", "value");
|
||||
}
|
||||
list.Remove(value);
|
||||
}
|
||||
|
||||
void ICollection.CopyTo(Array array, int index) {
|
||||
if (list.Count>0) {
|
||||
list.CopyTo(array, index);
|
||||
}
|
||||
}
|
||||
#endregion // ImageCollection Interface Methods
|
||||
}
|
||||
#endregion // Sub-classes
|
||||
|
||||
#region Public Constructors
|
||||
public ImageList() {
|
||||
color_depth = ColorDepth.Depth8Bit;
|
||||
transparency_color = Color.Transparent;
|
||||
|
||||
image_collection = new ImageCollection(this);
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public ColorDepth ColorDepth {
|
||||
get {
|
||||
return this.color_depth;
|
||||
}
|
||||
|
||||
set {
|
||||
this.color_depth=value;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO("Determine if we support HBITMAP handles, this would involve XplatUI")]
|
||||
public IntPtr Handle {
|
||||
get {
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO("Determine if we support HBITMAP handles, this would involve XplatUI")]
|
||||
public bool HandleCreated {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public ImageCollection Images {
|
||||
get {
|
||||
return this.image_collection;
|
||||
}
|
||||
}
|
||||
|
||||
public Size ImageSize {
|
||||
get {
|
||||
return this.size;
|
||||
}
|
||||
|
||||
set {
|
||||
if (value.Width<1 || value.Width>255 || value.Height<1 || value.Height>255) {
|
||||
throw new ArgumentException("ImageSize width and height must be between 1 and 255", "value");
|
||||
}
|
||||
this.size=value;
|
||||
}
|
||||
}
|
||||
|
||||
public ImageListStreamer ImageStream {
|
||||
get {
|
||||
return image_stream;
|
||||
}
|
||||
|
||||
set {
|
||||
image_stream = value;
|
||||
}
|
||||
}
|
||||
|
||||
public Color TransparentColor {
|
||||
get {
|
||||
return this.transparency_color;
|
||||
}
|
||||
|
||||
set {
|
||||
this.transparency_color=value;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Public Instance Methods
|
||||
public void Draw(Graphics g, Point pt, int index) {
|
||||
this.Draw(g, pt.X, pt.Y, this.size.Width, this.size.Height, index);
|
||||
}
|
||||
|
||||
public void Draw(Graphics g, int x, int y, int width, int height, int index) {
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
return "ImageList Size "+this.size.Width.ToString()+"x"+this.size.Height.ToString()+", Depth "+this.color_depth.ToString()+", Transparency color "+this.transparency_color.ToString();
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
|
||||
#region Protected Instance Methods
|
||||
protected override void Dispose(bool disposing) {
|
||||
if (image_collection!=null) {
|
||||
image_collection.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion // Protected Instance Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok ([email protected])
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ImageListStreamer.cs,v $
|
||||
// Revision 1.1 2004/07/15 20:05:28 pbartok
|
||||
// - Implemented ImageList and ImageList.ImageCollection classes
|
||||
// - Added ColorDepth enumeration
|
||||
// - Updated SWF VS.Net project
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
// NOT COMPLETE
|
||||
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public sealed class ImageListStreamer : ISerializable {
|
||||
#region Public Instance Methods
|
||||
[MonoTODO("Need to learn about streaming first - Peter")]
|
||||
public void GetObjectData(SerializationInfo si, StreamingContext context) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: ImeMode.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public enum ImeMode {
|
||||
NoControl = 0,
|
||||
On = 1,
|
||||
Off = 2,
|
||||
Disable = 3,
|
||||
Hiragana = 4,
|
||||
Katakana = 5,
|
||||
KatakanaHalf = 6,
|
||||
AlphaFull = 7,
|
||||
Alpha = 8,
|
||||
HangulFull = 9,
|
||||
Hangul = 10,
|
||||
Inherit = -1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: InputLanguage.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// NOT COMPLETE
|
||||
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public sealed class InputLanguage {
|
||||
internal static InputLanguageCollection all;
|
||||
private IntPtr handle;
|
||||
private CultureInfo culture;
|
||||
private string layout_name;
|
||||
private static InputLanguage current_input;
|
||||
private static InputLanguage default_input;
|
||||
|
||||
#region Private Constructor
|
||||
[MonoTODO("Pull Microsofts InputLanguages and enter them here")]
|
||||
internal InputLanguage() {
|
||||
if (all == null) {
|
||||
all = new InputLanguageCollection();
|
||||
|
||||
all.Add(new InputLanguage(IntPtr.Zero, new CultureInfo(""), "US"));
|
||||
}
|
||||
if (default_input == null) {
|
||||
default_input=InputLanguage.FromCulture(CultureInfo.CurrentUICulture);
|
||||
}
|
||||
|
||||
if (current_input == null) {
|
||||
current_input=InputLanguage.FromCulture(CultureInfo.CurrentUICulture);
|
||||
}
|
||||
}
|
||||
|
||||
internal InputLanguage(IntPtr handle, CultureInfo culture, string layout_name) : this() {
|
||||
this.handle=handle;
|
||||
this.culture=culture;
|
||||
this.layout_name=layout_name;
|
||||
}
|
||||
#endregion // Private Constructor
|
||||
|
||||
#region Public Static Properties
|
||||
public static InputLanguage CurrentInputLanguage {
|
||||
get {
|
||||
return current_input;
|
||||
}
|
||||
|
||||
set {
|
||||
if (all.Contains(value)) {
|
||||
current_input=value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static InputLanguage DefaultInputLanguage {
|
||||
get {
|
||||
return default_input;
|
||||
}
|
||||
}
|
||||
|
||||
public static InputLanguageCollection InstalledInputLanguage {
|
||||
get {
|
||||
return all;
|
||||
}
|
||||
}
|
||||
#endregion // Public Static Properties
|
||||
|
||||
#region Public Instance Properties
|
||||
public CultureInfo Culture {
|
||||
get {
|
||||
return this.culture;
|
||||
}
|
||||
}
|
||||
|
||||
public IntPtr Handle {
|
||||
get {
|
||||
return this.handle;
|
||||
}
|
||||
}
|
||||
|
||||
public string LayoutName {
|
||||
get {
|
||||
return this.layout_name;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
|
||||
#region Public Static Methods
|
||||
public static InputLanguage FromCulture(System.Globalization.CultureInfo culture) {
|
||||
foreach (InputLanguage c in all) {
|
||||
if (culture.EnglishName==c.culture.EnglishName) {
|
||||
return new InputLanguage(c.handle, c.culture, c.layout_name);
|
||||
}
|
||||
}
|
||||
|
||||
return new InputLanguage(all[0].handle, all[0].culture, all[0].layout_name);
|
||||
}
|
||||
#endregion // Public Static Methods
|
||||
|
||||
#region Public Instance Methods
|
||||
public override bool Equals(object value) {
|
||||
if (value is InputLanguage) {
|
||||
if ((((InputLanguage)value).culture==this.culture) && (((InputLanguage)value).handle==this.handle) && (((InputLanguage)value).layout_name==this.layout_name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
return base.GetHashCode();
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: InputLanguageChangedEventArgs.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class InputLanguageChangedEventArgs {
|
||||
private CultureInfo culture;
|
||||
private byte charset;
|
||||
private InputLanguage input_language;
|
||||
|
||||
#region Public Constructors
|
||||
public InputLanguageChangedEventArgs(System.Globalization.CultureInfo culture, byte charSet) {
|
||||
this.culture = culture;
|
||||
this.charset = charSet;
|
||||
this.input_language = InputLanguage.FromCulture(culture);
|
||||
}
|
||||
|
||||
public InputLanguageChangedEventArgs(InputLanguage inputLanguage, byte charSet) {
|
||||
this.culture = inputLanguage.Culture;
|
||||
this.charset = charSet;
|
||||
this.input_language = inputLanguage;
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public byte CharSet {
|
||||
get {
|
||||
return this.charset;
|
||||
}
|
||||
}
|
||||
|
||||
public CultureInfo Culture {
|
||||
get {
|
||||
return this.culture;
|
||||
}
|
||||
}
|
||||
|
||||
public InputLanguage InputLanguage {
|
||||
get {
|
||||
return this.input_language;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: InputLanguageChangedEventHandler.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public delegate void InputLanguageChangedEventHandler(object sender, InputLanguageChangedEventArgs e);
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: InputLanguageChangingEventArgs.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class InputLanguageChangingEventArgs {
|
||||
private CultureInfo culture;
|
||||
private bool system_charset;
|
||||
private InputLanguage input_language;
|
||||
|
||||
#region Public Constructors
|
||||
public InputLanguageChangingEventArgs (System.Globalization.CultureInfo culture, bool sysCharSet) {
|
||||
this.culture = culture;
|
||||
this.system_charset = sysCharSet;
|
||||
this.input_language = InputLanguage.FromCulture(culture);
|
||||
}
|
||||
|
||||
public InputLanguageChangingEventArgs (InputLanguage inputLanguage, bool sysCharSet) {
|
||||
this.culture = inputLanguage.Culture;
|
||||
this.system_charset = sysCharSet;
|
||||
this.input_language = inputLanguage;
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public bool SysCharSet {
|
||||
get {
|
||||
return this.system_charset;
|
||||
}
|
||||
}
|
||||
|
||||
public CultureInfo Culture {
|
||||
get {
|
||||
return this.culture;
|
||||
}
|
||||
}
|
||||
|
||||
public InputLanguage InputLanguage {
|
||||
get {
|
||||
return this.input_language;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: InputLanguageChangingEventHandler.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public delegate void InputLanguageChangingEventHandler(object sender, InputLanguageChangingEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: InputLanguageCollection.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class InputLanguageCollection : ReadOnlyCollectionBase {
|
||||
#region Local Variables
|
||||
internal InputLanguage[] list;
|
||||
#endregion // Local Variables
|
||||
|
||||
#region Private Constructor
|
||||
internal InputLanguageCollection() {
|
||||
}
|
||||
#endregion // Private Constructor
|
||||
|
||||
#region Internal Instance Methods
|
||||
internal void Add(InputLanguage value) {
|
||||
list[list.Length]=value;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Public Instance Methods
|
||||
public InputLanguage this [int index] {
|
||||
get {
|
||||
if (index>=list.Length) {
|
||||
throw new ArgumentOutOfRangeException("index");
|
||||
}
|
||||
return list[index];
|
||||
}
|
||||
}
|
||||
|
||||
public bool Contains(InputLanguage value) {
|
||||
for (int i=0; i<list.Length; i++) {
|
||||
if ((list[i].Culture==value.Culture) && (list[i].LayoutName==value.LayoutName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void CopyTo(InputLanguage[] dest, int index) {
|
||||
if (list.Length>0) {
|
||||
Array.Copy(list, 0, dest, index, list.Length);
|
||||
}
|
||||
}
|
||||
|
||||
public int IndexOf(InputLanguage value) {
|
||||
for (int i=0; i<list.Length; i++) {
|
||||
if ((list[i].Culture==value.Culture) && (list[i].LayoutName==value.LayoutName)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
#endregion // Public Instance Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: InvalidateEventArgs.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
using System.Drawing;
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class InvalidateEventArgs : EventArgs {
|
||||
private Rectangle invalidated_rectangle;
|
||||
|
||||
#region Public Constructors
|
||||
public InvalidateEventArgs(System.Drawing.Rectangle invalidRect) {
|
||||
this.invalidated_rectangle=invalidRect;
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public Rectangle InvalidRect {
|
||||
get {
|
||||
return this.invalidated_rectangle;
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: InvalidateEventHandler.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public delegate void InvalidateEventHandler (object sender, InvalidateEventArgs e);
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// Copyright (c) 2004 Novell, Inc.
|
||||
//
|
||||
// Authors:
|
||||
// Peter Bartok [email protected]
|
||||
//
|
||||
//
|
||||
// $Revision: 1.1 $
|
||||
// $Modtime: $
|
||||
// $Log: KeyEventArgs.cs,v $
|
||||
// Revision 1.1 2004/07/09 05:21:25 pbartok
|
||||
// - Initial check-in
|
||||
//
|
||||
//
|
||||
|
||||
// COMPLETE
|
||||
|
||||
namespace System.Windows.Forms {
|
||||
public class KeyEventArgs : EventArgs {
|
||||
private Keys key_data;
|
||||
private bool event_handled;
|
||||
|
||||
#region Public Constructors
|
||||
public KeyEventArgs(Keys keyData) {
|
||||
this.key_data=keyData;
|
||||
this.event_handled=false;
|
||||
}
|
||||
#endregion // Public Constructors
|
||||
|
||||
#region Public Instance Properties
|
||||
public virtual bool Alt {
|
||||
get {
|
||||
if ((this.key_data & Keys.Alt)==0) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool Control {
|
||||
get {
|
||||
if ((this.key_data & Keys.Control)==0) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool Handled {
|
||||
get {
|
||||
return this.event_handled;
|
||||
}
|
||||
|
||||
set {
|
||||
this.event_handled=value;
|
||||
}
|
||||
}
|
||||
|
||||
public Keys KeyCode {
|
||||
get {
|
||||
return (this.key_data & Keys.KeyCode);
|
||||
}
|
||||
}
|
||||
|
||||
public Keys KeyData {
|
||||
get {
|
||||
return this.key_data;
|
||||
}
|
||||
}
|
||||
|
||||
public int KeyValue {
|
||||
get {
|
||||
return Convert.ToInt32(this.key_data);
|
||||
}
|
||||
}
|
||||
|
||||
public Keys Modifiers {
|
||||
get {
|
||||
return (this.key_data & Keys.Modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool Shift {
|
||||
get {
|
||||
if ((this.key_data & Keys.Shift)==0) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion // Public Instance Properties
|
||||
}
|
||||
}
|
||||
Loaded 100 of 2069 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user