Compare commits
1276 Commits
Author | SHA1 | Date | |
---|---|---|---|
30fb41bb62 | |||
f808211bd3 | |||
bfedb5336e | |||
1cfa68a23f | |||
5c2ba27cc5 | |||
160a7dec30 | |||
efd3b160ad | |||
844aaa90dd | |||
dbe995abd8 | |||
532b64a1f0 | |||
63ac2d7e07 | |||
6454bf59c4 | |||
f522c759d6 | |||
6ea7014244 | |||
0d0cb02b85 | |||
0b2e9d4129 | |||
ba31625447 | |||
84769bc26e | |||
dd373e1d2d | |||
4dee6004c3 | |||
3da1b84016 | |||
44130c4cd7 | |||
e0bcf4f84c | |||
5d53bed86b | |||
7bab80da4f | |||
7e9d2e5f74 | |||
678fe13631 | |||
07e00cc906 | |||
7eb68dfa72 | |||
dd8daa7e3d | |||
b8a2210d0d | |||
50f0f350ed | |||
d2ce3d279c | |||
94e69dbdec | |||
7958673b8d | |||
4885d7c685 | |||
b66827c6de | |||
4aada212ac | |||
5d31353f69 | |||
6493e83dbe | |||
c76ce3b339 | |||
3ea06311df | |||
faacdc3b0e | |||
e789c16872 | |||
9f4250cbdc | |||
bd0c899654 | |||
eac0a5828c | |||
d9c11ad667 | |||
48efe503a7 | |||
1ac5daa456 | |||
dbe62ed3d5 | |||
307d620d45 | |||
9020e4c188 | |||
0a12e94847 | |||
254f2d0137 | |||
225633ffeb | |||
0275a524b2 | |||
0b0cbfc30d | |||
d552f2baa2 | |||
fea01d57c3 | |||
f9de81b2fb | |||
e61234d586 | |||
1a930f5886 | |||
3acf0bd148 | |||
9c8a3513a6 | |||
487d265b66 | |||
111b3bf587 | |||
6e7af3cbb4 | |||
54f4040a8d | |||
c3a5f9ae64 | |||
00a7134a89 | |||
6b859a45a1 | |||
95bff828d8 | |||
2ad64a73fb | |||
c7f95a96c7 | |||
fc5c63d53d | |||
cfc2428268 | |||
f6f440efc6 | |||
a3bf31527e | |||
94a1e77ee7 | |||
6778140a1d | |||
3cc6e1577e | |||
b451e97293 | |||
9e9b8e0e02 | |||
adbc99df96 | |||
ccaf9e4bba | |||
43db52473e | |||
f39f7b69a8 | |||
4632a3b939 | |||
0cf4e92bc9 | |||
b3cad882f8 | |||
891117fcfc | |||
4064951d55 | |||
f91a2f6009 | |||
e6cab1e0cb | |||
980220eb8c | |||
3e89966314 | |||
f70ef06c34 | |||
1b6bff8f52 | |||
1317156b5d | |||
5e42876e0b | |||
ce98d39d34 | |||
ca1b8144b5 | |||
bc36856032 | |||
3424a52ea0 | |||
6e93c37f87 | |||
2b4a68652e | |||
ad554b54ed | |||
0d94650b4b | |||
88382c2564 | |||
21581a6ce0 | |||
a9ca1f12f8 | |||
33992063e6 | |||
be029b9103 | |||
f471429ac3 | |||
06842eeafb | |||
f5a50d26a6 | |||
43c46cddd5 | |||
faad7fcd41 | |||
75e42b9bfe | |||
bcbafc57d9 | |||
a062b31ff7 | |||
a1e59a95e3 | |||
d82ea4335e | |||
2cc41d2152 | |||
6c3a78560a | |||
d01d270135 | |||
fe3242a16f | |||
6f46902445 | |||
6f68563d50 | |||
2e4e1545ad | |||
34357ed6eb | |||
7bddada9b8 | |||
c2b77dea53 | |||
5ebfea1c27 | |||
229f45d158 | |||
f1a0b784f6 | |||
2abb546c5e | |||
9e7d41f266 | |||
9371f59962 | |||
d1caa7cb3b | |||
c2bc4c553c | |||
11577515ff | |||
b6fa9c95e0 | |||
b22014b3f6 | |||
1bbc8c08cc | |||
e6e817bfcd | |||
1a3bbc297c | |||
86f537913b | |||
5138c91756 | |||
ea4cc45ac5 | |||
287815eaa6 | |||
7f3e0735f6 | |||
3aece8d7b8 | |||
0bbbb59a81 | |||
298bd2d106 | |||
1490c4324a | |||
6e2fdccb98 | |||
19989a475a | |||
1d281a1db4 | |||
f5dfead63c | |||
3c9851ecf5 | |||
2e1644be3e | |||
77bc863ab9 | |||
42d9505335 | |||
77d3bb2b99 | |||
b45799c532 | |||
fa0ef8e26c | |||
75e120ceb3 | |||
5ee58f3540 | |||
5b93b312f3 | |||
46699c20b6 | |||
44749e4a6f | |||
8ccb93508d | |||
e20efd56e2 | |||
01a9d6b1c5 | |||
990894af6f | |||
b595794a0d | |||
7273b617ff | |||
632fafaa3d | |||
293cce1fd0 | |||
03232752f1 | |||
01ca0392fe | |||
e91da861a6 | |||
ab22c78237 | |||
7be7a16357 | |||
5f38706175 | |||
94f6d4f48a | |||
f33428c251 | |||
92eec7385d | |||
d84f9f7df8 | |||
04d60a7200 | |||
cd2f2599b8 | |||
1ecaee5fd5 | |||
7f6acfc024 | |||
542c858831 | |||
04756d72ea | |||
000644204a | |||
82996f07b8 | |||
6d8c375365 | |||
0abe3cfdfc | |||
23350d196c | |||
0e2fbeffce | |||
9bba7de644 | |||
77dc891394 | |||
40a671c077 | |||
acba455634 | |||
bb92817774 | |||
ea4515f63c | |||
ad0018be8d | |||
5789abf09b | |||
fe8c7a712e | |||
552d6cb05f | |||
9a844b0315 | |||
0cab58d32f | |||
3fc18f8e1d | |||
6560b59eab | |||
4325aaecf2 | |||
b569e69297 | |||
210d090e23 | |||
471d51eddb | |||
c2733cadb6 | |||
da1d33b783 | |||
83746c58de | |||
702bd32dc3 | |||
1e46295288 | |||
a7fcfccada | |||
1baca41edd | |||
80fbc8f639 | |||
f0a236997f | |||
1b72284d26 | |||
049a853387 | |||
e83bae08cb | |||
8a073acf76 | |||
21ad90fd15 | |||
935d9cd4a6 | |||
6bcb491f0a | |||
bec114d53d | |||
9d07ec9eb6 | |||
dc8e1741c7 | |||
39c7d777ce | |||
1ee607d444 | |||
8a1bdcd6a1 | |||
a22695aa6a | |||
adf42abe46 | |||
840bca43d6 | |||
8b3556882a | |||
a5e7cd5209 | |||
be69fc5594 | |||
832b8cde5e | |||
769127e9da | |||
db4fa5147e | |||
d00ec173af | |||
af4410a16a | |||
1b441ad65d | |||
915c4088e7 | |||
bf8a93d1ea | |||
ce00a23475 | |||
9bd62966ca | |||
66364ff4ea | |||
551846181c | |||
cdcfc201d4 | |||
b94e674a8f | |||
032c9a5e91 | |||
ef1eb80553 | |||
af24b335ac | |||
7e2cae472e | |||
15c1764854 | |||
865851578d | |||
8add5d9f1b | |||
8addc1a84e | |||
8a2211e5f6 | |||
6caf433936 | |||
832d73d4da | |||
673ccb3726 | |||
df2fbc04b9 | |||
5a98b86dea | |||
03fb0c4f8c | |||
db62bf6714 | |||
429c0ae82f | |||
3332777cf9 | |||
c4379885b3 | |||
c750b5fd53 | |||
6e6a9575bf | |||
6e571ae742 | |||
d0e8e519a8 | |||
28b3d075f4 | |||
3d0e63f5a6 | |||
b9433d2cb7 | |||
412cf41cef | |||
0d23654379 | |||
865305ac0b | |||
86fa583a55 | |||
4e88d081d8 | |||
e912cd44e3 | |||
1713685108 | |||
627584f13d | |||
8ff2bfc20f | |||
ec3c7b2902 | |||
61afe48646 | |||
656fe783d4 | |||
00b385f433 | |||
dbecf900be | |||
9cc1b47a2a | |||
5024c51379 | |||
21435b9961 | |||
499806edc5 | |||
d8d02254ca | |||
36495518ac | |||
06521163f6 | |||
4fde0a8462 | |||
03213d9f04 | |||
8bdb599f06 | |||
3830ced287 | |||
e3a1b37130 | |||
e858cf8a74 | |||
a41605b9b3 | |||
293a68a083 | |||
4063a6178c | |||
2ff07a736e | |||
5309ac7550 | |||
66e61d6d45 | |||
3eb0e63a80 | |||
8ceaf407b3 | |||
c62c666fe1 | |||
70ff8fa6f7 | |||
7645341f35 | |||
b5b460440b | |||
cb2e34cbb4 | |||
8b5f3e1eea | |||
eaa3e40ef0 | |||
bcd6b8230b | |||
4d54a562fc | |||
942b3a155d | |||
7c4d4ff1dc | |||
e5cf76c49c | |||
be0b31f905 | |||
6c92b70642 | |||
d3eae268d9 | |||
cc5e966ba4 | |||
6249f2b59b | |||
790f8528e4 | |||
35aa535a6d | |||
9e2099b870 | |||
1616d833e8 | |||
9c5031a6ee | |||
cce65ddccd | |||
5109b7b1d9 | |||
30fe9db11e | |||
d9c3ead221 | |||
f49bc5f50c | |||
6ad49453ba | |||
886f4ddc76 | |||
d5bd35d0a4 | |||
87f4aedb95 | |||
331acf2303 | |||
3f7cf66e99 | |||
d8ddb85a82 | |||
6bf0c0f0cd | |||
29910b5cef | |||
6e39002da5 | |||
367831116f | |||
7edbc3a0cf | |||
e3f71e5201 | |||
12c4a88c88 | |||
153774177e | |||
3175657fed | |||
600d5b2ffe | |||
006ed42f38 | |||
749b7a09c0 | |||
e1a0b972cd | |||
1a1dceb43a | |||
fe9649193b | |||
baa00d0e71 | |||
132024a988 | |||
b478b3e862 | |||
bee8936d54 | |||
71f656fb41 | |||
43505fcc37 | |||
9cb928b973 | |||
5c7fe3bda5 | |||
91091b7ccb | |||
0eb9d5c322 | |||
70487330ce | |||
eaefe65322 | |||
babbf2bcd1 | |||
4b8c98c110 | |||
e3305c3757 | |||
de19f0de61 | |||
2196919531 | |||
ed8626e6a7 | |||
beaf2179c6 | |||
0b9d3e38c4 | |||
d51301924a | |||
8afd56e77e | |||
21c2bcfd39 | |||
fa6116fb7a | |||
76e20869b5 | |||
e7cc0e7100 | |||
46b5eca2cb | |||
9ae39eda36 | |||
abdf5ca6f3 | |||
7a1293c541 | |||
8b4ea6f0cf | |||
da12244f16 | |||
a771457d89 | |||
7ee8ff29bd | |||
d88028a7dc | |||
3237d26474 | |||
c2eb3c1467 | |||
3c52398511 | |||
a1d0185f19 | |||
49c3036080 | |||
e6a5c9c85f | |||
699935e482 | |||
5e861e002c | |||
87c622ddc0 | |||
f72b15664d | |||
63f50b54d4 | |||
03336135d6 | |||
4c68791bdd | |||
357371847b | |||
b5b5785d04 | |||
23eb78c7f9 | |||
7aa87e0fcc | |||
227a08be18 | |||
8740595b17 | |||
cfbdc0e84e | |||
2e98c66894 | |||
7567856323 | |||
836172f749 | |||
9682de59e2 | |||
96719f3dcc | |||
cb5582c54a | |||
54cd4828df | |||
a0f6e268af | |||
bc29612e37 | |||
e3f6831dfa | |||
281f3dfc84 | |||
b3602ceb14 | |||
78d729e033 | |||
8f03df3af2 | |||
26b3f52d3f | |||
66b53f30f4 | |||
bec800d4f9 | |||
3ab9b3e91e | |||
9dd0e26158 | |||
624d28af36 | |||
ab770771cc | |||
852543d957 | |||
628d593326 | |||
8589d9b747 | |||
62fc7b9809 | |||
32d55bcdc6 | |||
6a36013460 | |||
eff87a7f06 | |||
189665162e | |||
6be6a33789 | |||
e47d5a8f07 | |||
4be5c84b9c | |||
9f4bd697e8 | |||
1b94a81174 | |||
592ed524f1 | |||
f9e4250a09 | |||
f79b8b5ffd | |||
a4e60d20c5 | |||
cbbc3bea27 | |||
5644e5f987 | |||
69ef5682fe | |||
b055156aa6 | |||
0b3f7b2124 | |||
b20f6db4ea | |||
0cf3f29466 | |||
973b6fdec7 | |||
4ec5216da1 | |||
f9a5796a0a | |||
5606728ae4 | |||
0a441228f1 | |||
dbe7585f8b | |||
726135ff8c | |||
dbd7e1a401 | |||
5e3974f59d | |||
a2a70607c3 | |||
c50abe2032 | |||
8a48e529d4 | |||
50c9be054d | |||
10f9e7c60f | |||
961415a05d | |||
c2a6833037 | |||
6fcff69f11 | |||
cdb945c2f1 | |||
c4479fa4cb | |||
fbca6c4491 | |||
d144c0a65f | |||
9c6fe98018 | |||
3e617536af | |||
546c90d972 | |||
622ef88fea | |||
80f623bb72 | |||
ae53ab3d79 | |||
8fc8738c0f | |||
b6feeb382f | |||
0f6ed06350 | |||
ab979adf2a | |||
f3d7d3a6e6 | |||
b8e3ffcf0b | |||
cb6d3f0cb9 | |||
bd184d4f8f | |||
428111b1d9 | |||
7bf47a6c12 | |||
f9ec8d0f12 | |||
278ecbd12d | |||
bcfd9a54c3 | |||
f7f0c7e636 | |||
9cc41e0dad | |||
25b0914786 | |||
08e35f60d7 | |||
a19458b26e | |||
28bf683bbf | |||
504dc26fa6 | |||
e131fcaf09 | |||
6d0c5989cc | |||
48e53b0bf2 | |||
5fae28a6ed | |||
916c7f31a3 | |||
01f409de3a | |||
3e8b6d8b91 | |||
dad1b90812 | |||
5c295fcca9 | |||
74554809c9 | |||
20b7e084da | |||
38f2087629 | |||
2ab8690def | |||
b76e5b1d30 | |||
b7108874dd | |||
b63f91d544 | |||
c6215bf676 | |||
e24a3f0d8f | |||
42984619d7 | |||
971acf0036 | |||
c6928fa591 | |||
c89f157d1a | |||
e975c52b6e | |||
d6a26db4a5 | |||
073e03aa42 | |||
f5650f16f6 | |||
03d797a133 | |||
09b7f9a749 | |||
f3b3967b1e | |||
079a376acf | |||
971905b0d5 | |||
905091d3fd | |||
9a9293a3fc | |||
aff6c5fd38 | |||
410db2d5e0 | |||
ff1f2692de | |||
fa21a34b0a | |||
2235522951 | |||
f73a5b80c4 | |||
149405880d | |||
adc4ad0c45 | |||
3af8ef44cc | |||
5f7e692fa4 | |||
1d58222faa | |||
0dcc4005a4 | |||
1fdee93ba0 | |||
54c65f4b0c | |||
96b0b68ac8 | |||
1127ed0543 | |||
739082cf36 | |||
a05707e55a | |||
aee421c216 | |||
90eb3d1ae3 | |||
b63e6d33b2 | |||
7254b172e8 | |||
9e540f286e | |||
21441ab5aa | |||
d9177e4565 | |||
6ca87b6a79 | |||
fa2ecb4237 | |||
e434ab4f8a | |||
7a8cabb625 | |||
a1e89a83a1 | |||
b7dc1089ee | |||
5ca92a90cb | |||
21f0a6856a | |||
a5f08902cf | |||
4fc426c414 | |||
318e44f571 | |||
a131e75b28 | |||
0d4cd4749b | |||
d010c5ec2d | |||
be8264edf9 | |||
547c9c4d65 | |||
8fd060fd03 | |||
d5d2297e7f | |||
f52a6919e3 | |||
3b874d3786 | |||
f89d88e62a | |||
4a8aa9f7b0 | |||
1fd451961e | |||
8668ac9dd0 | |||
371a3cb599 | |||
7cb1648d6e | |||
010586a0fa | |||
bffa93d136 | |||
0be9626063 | |||
2b946f19d0 | |||
8aa072783d | |||
9e908e992d | |||
d4dfe30d23 | |||
e95323e974 | |||
eb5c43c836 | |||
088198ad5b | |||
5279f00379 | |||
3f2ba7907f | |||
937a6e5e9d | |||
d1dbab0c94 | |||
9b5d1fa4f2 | |||
6e718229b8 | |||
297d836d18 | |||
a58bd9f6c4 | |||
f2c08210a2 | |||
aea2495886 | |||
a70ca277e0 | |||
7fecf6cd89 | |||
70036262be | |||
6ea4035942 | |||
d535450eb5 | |||
1682a44288 | |||
587aad91dc | |||
![]() |
82c876fa9c | ||
![]() |
d073a04e29 | ||
f6fc204114 | |||
![]() |
ced259175f | ||
![]() |
3091c8d8d9 | ||
af9749013a | |||
3b23c15a91 | |||
![]() |
d92b24b89d | ||
![]() |
40c95e1f92 | ||
![]() |
eb8660b8ea | ||
8fdd1f0a45 | |||
![]() |
a47d58c35f | ||
![]() |
fcde1ff26f | ||
![]() |
0df2c89ed0 | ||
![]() |
59483ab23b | ||
![]() |
c3027c2313 | ||
![]() |
315cc9faf9 | ||
![]() |
0a0eae8262 | ||
![]() |
0c78b84728 | ||
![]() |
dcf8549f5e | ||
c00e4d3e33 | |||
74c9974693 | |||
595495b8bd | |||
d2a0e5005b | |||
efe8524fa0 | |||
fa22a42572 | |||
![]() |
532812d50c | ||
dee4851a45 | |||
efe7224f69 | |||
774e743271 | |||
cad47bd419 | |||
b7196e577c | |||
da97bea5df | |||
8a159b8ca3 | |||
12c2831a20 | |||
![]() |
0397c2ec98 | ||
f6713ef18a | |||
c2cdab446f | |||
0b3fe6d74a | |||
d2d8b6fca1 | |||
47ea209279 | |||
e12bea33e3 | |||
d3ee207699 | |||
426403da3b | |||
6ff6693871 | |||
b4940a4bc3 | |||
d7ffe6af4d | |||
0bb1a97ff3 | |||
2ac2b5057e | |||
c2b7cedb8c | |||
3f74842f8e | |||
0883358f83 | |||
f39ee975d6 | |||
![]() |
faa2c07d07 | ||
![]() |
1022f2d86a | ||
e2eef30159 | |||
bcd42f4fc6 | |||
b35988ef89 | |||
31b6134640 | |||
e0cd309140 | |||
a6b7e7b132 | |||
485aca72bc | |||
a453644324 | |||
9b025cee66 | |||
81458d0523 | |||
0c36f880db | |||
90ca5367e8 | |||
13802b799c | |||
11515a82f5 | |||
810abe02bc | |||
a8dae7592c | |||
3b5943c1b2 | |||
5c1fe0db5b | |||
1fd5b53688 | |||
66924458eb | |||
5d7152f572 | |||
637d972f7e | |||
b2f2255532 | |||
7afec192d1 | |||
a7d4bf13fa | |||
f71053f2f6 | |||
150df589e6 | |||
6533b8af29 | |||
2751698679 | |||
63d20a72e1 | |||
3c84f23849 | |||
c288f87914 | |||
9e4b987ffa | |||
291e18e294 | |||
a415669c60 | |||
80dfa5fdbf | |||
a5451a9f7f | |||
87676f657a | |||
3e29816651 | |||
b46542ca8d | |||
3ff3c38710 | |||
3bb4c6a700 | |||
2d209cd37e | |||
36dbd60e19 | |||
100fbd43e2 | |||
56eafd762f | |||
b3465bcf44 | |||
09ef9c8a19 | |||
7e48ed5172 | |||
ac36b0b6a5 | |||
c4d156d462 | |||
ca352c94d9 | |||
feb1ed56af | |||
27a6281357 | |||
f892d5981e | |||
d5f406db8f | |||
7df6071476 | |||
0de61c3dc1 | |||
b83589e174 | |||
9a18f605d9 | |||
1c5b6159cc | |||
9dccd96fde | |||
9a84c63701 | |||
90bb349138 | |||
c870d2471e | |||
75df3e4b8b | |||
09103e3073 | |||
d84e4b8d53 | |||
228999d144 | |||
19c162eff2 | |||
1c8ce9488c | |||
a602665e10 | |||
c56289dbfd | |||
71af7fe7d2 | |||
2794b6e18f | |||
71aefe981c | |||
c53664d973 | |||
4872bfcbf9 | |||
8b8f48b654 | |||
b9bedb8b36 | |||
01e5b2dc2a | |||
1598324f57 | |||
872d353e3b | |||
da0642e4cb | |||
4127dfbfdf | |||
f4e056348a | |||
a05a5adccb | |||
e7503c8824 | |||
aa17623425 | |||
73a42f4e17 | |||
bb3307f736 | |||
0004c7710f | |||
53a678cdd1 | |||
857d475d23 | |||
ba5bbea967 | |||
5592c02b28 | |||
24e562454c | |||
38932b616b | |||
d021b82631 | |||
0dffbae44d | |||
e79a88c7f1 | |||
47e254d812 | |||
db90b5a629 | |||
c4548c5241 | |||
a781cf4c26 | |||
896cdf4891 | |||
a8b350ea5a | |||
a468a3424a | |||
93d3e62b8e | |||
549ac760d7 | |||
d1e48b5d0d | |||
d9317dc227 | |||
dcdd44aa54 | |||
37626d9350 | |||
59aeef49a0 | |||
e3c04a3345 | |||
3d576e3a1d | |||
a35c4def77 | |||
426faa2012 | |||
95c94a9c9e | |||
57c22f93ef | |||
cc07a77377 | |||
10f7131b62 | |||
326dccb94d | |||
4b4758bc7f | |||
03876b5a71 | |||
c84caed8ba | |||
b6d11d78e2 | |||
28a044fb00 | |||
d56017aacf | |||
160fd67d03 | |||
9b9b2b9956 | |||
3629dd679d | |||
6de53cf3f2 | |||
ae29b34eab | |||
d61e67773c | |||
426cbbfa78 | |||
dc6e4eeb49 | |||
22e5c62c42 | |||
fbcb6148ad | |||
d69a964459 | |||
67e4d5363c | |||
acd70a322c | |||
e0bdd48984 | |||
6727919ee9 | |||
fb3973915f | |||
4f296ba2b9 | |||
50db842954 | |||
d045b4bd14 | |||
7cb9eb91d6 | |||
f45c7a6743 | |||
6921fd4467 | |||
15c71ebe1a | |||
c3dde8d2ac | |||
f848ee4ce0 | |||
6356d8b1d5 | |||
3a41e938a6 | |||
cfa965269d | |||
640810ee8d | |||
303b08da9d | |||
a04e79f0c7 | |||
1a4e18c7c5 | |||
d1615e3a77 | |||
de752fb642 | |||
7aeb65a0aa | |||
08e97b1fba | |||
17dfbc7cb1 | |||
141e3b98b0 | |||
63b742b737 | |||
59e59142ed | |||
e81fa93885 | |||
fa25024b32 | |||
2dcce5ea5a | |||
d290405cfa | |||
094ea2de4e | |||
9cf545c434 | |||
14f878bdd2 | |||
f2b754ddb7 | |||
efe4386c3a | |||
1b7163e79c | |||
b0b619da82 | |||
d3eed67f00 | |||
508162dfc8 | |||
e6e6b4c89f | |||
575ef0de03 | |||
40dc60eb8a | |||
b03d4c0047 | |||
b039a0fb29 | |||
431e5e8886 | |||
e1d99c0646 | |||
ad78c67548 | |||
98f1efe59f | |||
eb2a46e0c1 | |||
cb854ca972 | |||
89fee7fab5 | |||
37bd7b152a | |||
d57ac3b94f | |||
215ee55c77 | |||
6bfcd0513a | |||
5b0807d3dd | |||
eccc2d69d7 | |||
d71bbfea08 | |||
e795911933 | |||
95a7ecb29f | |||
809c8a3d5c | |||
ba0b1256d6 | |||
ace466b7bd | |||
f9f619b90d | |||
2730fd9bb6 | |||
18087d132a | |||
ff84a9ea20 | |||
051624b12e | |||
cd39ae1512 | |||
f5c65e0fb6 | |||
a70c2055b9 | |||
e3a379dd62 | |||
db7b31dc61 | |||
236784a6d3 | |||
1b51dc051e | |||
ce198cd01d | |||
cdfe6ef57b | |||
e610df1f12 | |||
0a8b887984 | |||
022055b86e | |||
6b98ad543c | |||
527ff05b2c | |||
5ea6564840 | |||
42e822a241 | |||
d0c95c91ed | |||
4f598b362d | |||
c44642ba10 | |||
6c15f2b86c | |||
936e10adac | |||
6d488cb802 | |||
cc6d40f9d6 | |||
085b7cb9cd | |||
2eaed4f16e | |||
ed0b62b13f | |||
68a53a7068 | |||
fd86f42454 | |||
5d2000e952 | |||
e9a3efba18 | |||
1d5be4e953 | |||
6ac6bc50d0 | |||
fc30b0bb21 | |||
d14e684954 | |||
a6b807d75e | |||
ff8f70d181 | |||
3608a8f4df | |||
229b1de48d | |||
b780f22d2c | |||
a89f8c09f5 | |||
99b30494dd | |||
b4c0735990 | |||
536c62c0fc | |||
58295c552b | |||
e177dd4db3 | |||
3b645645cb | |||
236d450bd5 | |||
b59ce366e7 | |||
ea7846f4ff | |||
af8c2a8313 | |||
69993f8c59 | |||
d75f9e97a1 | |||
14e7b44650 | |||
596ace81fb | |||
dadd22bfe1 | |||
ea19353387 | |||
c91eb1bece | |||
24cb070116 | |||
57480937b7 | |||
665a350fa1 | |||
de3cff6ad5 | |||
74a4ca9e84 | |||
e121fcc096 | |||
d2701548d5 | |||
3842609b16 | |||
274e9d7ef7 | |||
3b60ac1214 | |||
3d849ed96f | |||
7e0a2c9fc3 | |||
c824f361c2 | |||
5677af8e69 | |||
f088c1667a | |||
63ce214094 | |||
eb5ed16eb4 | |||
771ab20f62 | |||
a97df32a66 | |||
b8dcbd57a7 | |||
8305cde419 | |||
8ef890bfae | |||
9cad5a5a9b | |||
a1e7193af1 | |||
4224c8699a | |||
4991925e8d | |||
4900ae89ec | |||
8c9455a2a5 | |||
e0bed8b1c9 | |||
7bce71d2db | |||
03972e6d7a | |||
ed50654058 | |||
2c8cc56816 | |||
67c039f8d6 | |||
8fcd8369cd | |||
efc628af0f | |||
99d026f367 | |||
c6610b12af | |||
f17a2bb6dc | |||
ed5c0cb5c5 | |||
e188f085f6 | |||
a503fa8098 | |||
3290652dcd | |||
d41a83a7c6 | |||
569b191389 | |||
7ed04e5ec6 | |||
969c36f27a | |||
4e271d2dcb | |||
e9165ce89a | |||
99caa2a353 | |||
1d84f2ae0c | |||
4cc605a701 | |||
e97e33890b | |||
8f8aaef01e | |||
4f62af618d | |||
681f5a529d | |||
b499575b61 | |||
343c92c115 | |||
1c583aafdd | |||
d797d61c10 | |||
261d88ff37 | |||
ba09b090a9 | |||
914df932d9 | |||
da291e0f22 | |||
ccc443c4cf | |||
117ec06757 | |||
62a8fddb53 | |||
0c1b391b19 | |||
43ce5cf436 | |||
b6e02cc049 | |||
37a562812f | |||
f434da041a | |||
196cfef334 | |||
81ad7792e0 | |||
49e62a10d1 | |||
038be3ef3e | |||
8a6f8b3877 | |||
f11fa06e7f | |||
f3db4e949e | |||
2ee4d9f071 | |||
be4a593346 | |||
18099cf376 | |||
7afeb4aa80 | |||
bf41251241 | |||
12584daa63 | |||
0f56843aa6 | |||
2f34ae3f87 | |||
a89e656309 | |||
4383fab72d | |||
0ce79b8b15 | |||
4311fe4e9e | |||
dca276e2d5 | |||
43793efc7c | |||
4cba690678 | |||
d9e6126ff6 | |||
975591c6a4 | |||
d529f48e1c | |||
a5893dae56 | |||
16136c4b30 | |||
ee8530decd | |||
ff3d6eb741 | |||
0b7d2d0c1f | |||
f1a10c62c1 | |||
bf681fece3 | |||
7b02875a83 | |||
bf10f40b3e | |||
9f258dcf7e | |||
d489e1df83 | |||
7b94a21fca | |||
423fa82e2f | |||
ded1d04f55 | |||
affff567bf | |||
9d60aa1a55 | |||
e0416fc774 | |||
7cc9076ab8 | |||
751a0712d8 | |||
cda5d8cd40 | |||
7ad9bce29c | |||
02c92b3e2e | |||
56b749b3ed | |||
09f8b5edd2 | |||
f445dbd524 | |||
185e85293d | |||
afae43697d | |||
17974d4c98 | |||
59b78d1c00 | |||
b7362f524a | |||
f2b777f3c0 | |||
af4d77e5bb | |||
7642565b03 | |||
ee1e9a5834 | |||
ce89a71068 | |||
0a5ee4e3f1 | |||
2315b6f11f | |||
6cd8f3fa2a | |||
979c103743 | |||
011dd96f77 | |||
9282ee6915 | |||
dcd2bdb833 | |||
1fd0741c21 | |||
062b67e1b7 | |||
7e984ca41f | |||
7598763314 | |||
08289ff4fd | |||
4446e2f750 | |||
89d1cf95ff | |||
9d793d6d29 | |||
b67efa06c6 | |||
3e8b03ebf9 | |||
0ff213243f | |||
f0ac6bb64c | |||
f1cdfdc811 | |||
64a079f615 | |||
1dfac7819a | |||
c4b70a4bdc | |||
6d221b4de1 | |||
0296151234 | |||
500e0d929a | |||
19ead2de2c | |||
81075dff9c | |||
8326ac2dfc | |||
187aaa2101 | |||
87f4cb08e6 | |||
a35b65f4c1 | |||
3bb73288c6 | |||
6cbe46a105 | |||
514f666a15 | |||
551684fe8e | |||
11d9925409 | |||
8989a3dea0 | |||
0e651c71ae | |||
8e85f28fc8 | |||
1c0c59b0ca | |||
36534c0882 | |||
ac952176f2 | |||
227c141993 | |||
bd8b05eaf2 | |||
62852ff7c9 | |||
f5147fa4a5 | |||
645c3b6855 | |||
74a1a39d8c | |||
3ad5f9ff83 | |||
b4dba28f15 | |||
199d24a3a4 | |||
23ca4b1821 | |||
ed7eff92f8 | |||
be4970ecc6 | |||
ce3c976f02 | |||
ef639438cb | |||
b3bff900d7 | |||
61f296a246 | |||
d1677a10ba | |||
c15c4fa9d2 | |||
df8c5b3f34 | |||
64a5571451 | |||
6446535f31 | |||
1ba8901f74 | |||
3c468e612c | |||
165b3da4d3 | |||
5447f326c6 | |||
78bada11a7 | |||
182879be3e | |||
5968cad883 | |||
67ebc4b017 | |||
a4c8558ab7 | |||
ff3e92fd01 | |||
87380eff95 | |||
7704b49594 | |||
a3b404ec4d | |||
d5e64688c7 | |||
ebac712147 | |||
37098ebad7 | |||
4b3456b28c | |||
d0f57d33a7 | |||
d8b9535016 | |||
2650ff1e5a | |||
f8ebfb3622 | |||
fed2eda030 | |||
8fdb228ce9 | |||
780fe1bcf6 | |||
6ab23a4982 | |||
b21e1a74f8 | |||
83c7165c53 | |||
5c68e20a7e | |||
3204e48c80 | |||
50ebb501c8 | |||
5f63c38eb8 | |||
bc0afc31f8 | |||
fcefec4958 | |||
c55dd4b4d9 | |||
ac54987af9 | |||
56926c5f96 | |||
5b0170582c | |||
4d06072529 | |||
61932a171f | |||
9bfc6c4e50 | |||
1daa4b8ee0 | |||
abec5813db | |||
583688c3b7 | |||
663a6dfe46 | |||
9e5e81f690 | |||
2e50ce7690 | |||
7150727dd5 | |||
b180bd648f | |||
c49ee5e819 | |||
5c27afd74e | |||
0296014be1 | |||
8d2df70cfe | |||
ff5c5a2bc5 | |||
e9c47ba8a7 | |||
9c939d2d0a | |||
5d6f5cfb29 | |||
bd5d268630 | |||
3c7b70f901 | |||
591f26cb90 | |||
62a4079957 | |||
87759817ab | |||
4b380780e7 | |||
4b38c0f201 | |||
dc102185db | |||
fb6f1e0703 | |||
0dc3241a72 | |||
8d7a9bedfa | |||
ac984dac7a | |||
fbb244b398 | |||
0879f1db9c | |||
eb20828922 | |||
7595fbf424 | |||
278fc2712f | |||
aa3e79f8d1 | |||
0a479ca7ff | |||
2ea7bc27d2 | |||
eddb65de56 | |||
9458f41709 | |||
763ad9654f | |||
bbef8c86d5 | |||
6137705009 | |||
5308da4fc2 | |||
55c7b47553 | |||
4fed0912ac | |||
430e6a90d3 | |||
6e92491a9f | |||
e438b70f0e | |||
80f4796eec | |||
5a5b358a46 | |||
f0ce27e8d7 | |||
14f3adcadd | |||
202fa2ed5e | |||
4a4c8fcbac | |||
1aa8310c45 | |||
1cabc7310b | |||
40f82d2f77 | |||
ffcaa34037 | |||
38ef1f5d9f | |||
061037ab67 | |||
76ceb4a67d | |||
172c5d31ec | |||
06f6cf283e | |||
e8bd90cb48 | |||
e3668827e6 | |||
6d28038192 | |||
7f64c17034 | |||
ebd9868153 | |||
b1b8cae9cf | |||
406b6afdf3 | |||
922e9cf485 | |||
0265f54413 | |||
109c363c84 | |||
8bf5263e22 | |||
c2615456a0 | |||
fcaf61d537 | |||
5b22516856 | |||
6548898cf1 | |||
5e03ebf95b | |||
e6848d2d39 | |||
bcfffb599f | |||
9b5d0d336c | |||
ad8d730a28 | |||
2042faeedb | |||
991985635d | |||
723f1a3c3c |
4
.gitignore
vendored
@ -27,7 +27,7 @@ doxygen/ALL/
|
||||
*.so
|
||||
*.pyc
|
||||
tags
|
||||
ewol
|
||||
#ewol
|
||||
out
|
||||
ewol_debug
|
||||
ewol_release
|
||||
@ -60,3 +60,5 @@ ewol_release
|
||||
ehthumbs.db
|
||||
Icon?
|
||||
Thumbs.db
|
||||
Sources/libewol/ewol/os/AndroidAbstraction.cpp
|
||||
org_ewol_EwolConstants.h
|
||||
|
95
.travis.yml
Normal file
@ -0,0 +1,95 @@
|
||||
language: cpp
|
||||
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- dev
|
||||
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.9
|
||||
- expect
|
||||
- binutils-mingw-w64-x86-64 # 64bit MinGW
|
||||
- gcc-mingw-w64-x86-64
|
||||
- g++-mingw-w64-x86-64
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: CONF=release BUILDER=gcc TARGET=Linux TAG=Linux COMPILATOR_OPTION="--compilator-version=4.9"
|
||||
compiler: gcc
|
||||
- os: linux
|
||||
env: CONF=debug BUILDER=clang TARGET=Linux
|
||||
compiler: clang
|
||||
- os: linux
|
||||
env: CONF=release BUILDER=gcc TARGET=Windows TAG=Mingw
|
||||
compiler: x86_64-w64-mingw32-gcc
|
||||
- os: linux
|
||||
env: CONF=release BUILDER=gcc TARGET=Android TAG=Android DISABLE_PACKAGE=-p
|
||||
compiler: gcc
|
||||
- os: osx
|
||||
env: CONF=release BUILDER=clang TARGET=MacOs TAG=MacOs
|
||||
compiler: clang
|
||||
- os: osx
|
||||
env: CONF=release BUILDER=clang TARGET=IOs TAG=IOs
|
||||
compiler: clang
|
||||
|
||||
|
||||
install:
|
||||
- cd ..
|
||||
- pip install --user lutin
|
||||
- if [ "$TAG" == "Android" ]; then
|
||||
git clone --depth 1 --branch master https://github.com/HeeroYui/android-download-tool;
|
||||
./android-download-tool/dl-android.sh;
|
||||
fi
|
||||
- git clone --depth 1 --branch master https://github.com/atria-soft/ci.git
|
||||
- cd -
|
||||
|
||||
before_script:
|
||||
- cd ..
|
||||
- mkdir bin
|
||||
- curl https://storage.googleapis.com/git-repo-downloads/repo > bin/repo
|
||||
- chmod a+x bin/repo
|
||||
- git config --global user.email "travis@travis.com"
|
||||
- git config --global user.name "Travis"
|
||||
- git config --global color.ui "auto"
|
||||
- git config --global core.editor "vi"
|
||||
- mkdir WORKING_DIRECTORY
|
||||
- cd WORKING_DIRECTORY
|
||||
- ../bin/repo init -u https://github.com/atria-soft/manifest.git
|
||||
- ../bin/repo sync -j4
|
||||
- ../bin/repo forall -c git checkout master
|
||||
- ../bin/repo forall -c git checkout $TRAVIS_BRANCH; STATUS=$?
|
||||
- rm -rf atria-soft/ewol
|
||||
- cd ..
|
||||
- pwd
|
||||
- ls -l
|
||||
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
export PATH=$PATH:/Users/travis/Library/Python/2.7/bin/;
|
||||
fi
|
||||
- ./ci/build_send.py --tag=$TAG --status=START;
|
||||
|
||||
script:
|
||||
- lutin -w -j4 -C -P -t$TARGET -c $BUILDER $COMPILATOR_OPTION $BUS -m $CONF $GCOV $DISABLE_PACKAGE ewol-test ewol-sample-*; STATUS=$?
|
||||
- ./ci/build_send.py --tag=$TAG --status="$STATUS";
|
||||
|
||||
after_script:
|
||||
- if [ "$GCOV" != "" ]; then
|
||||
./ci/warning_send.py --find-path ./out/Linux_x86_64/$CONF/build/$BUILDER/ewol/;
|
||||
fi
|
||||
- ./out/Linux_x86_64/$CONF/staging/$BUILDER/ewol-test/ewol-test.app/bin/ewol-test --elog-level=6 | tee out_test.txt
|
||||
- if [ "$GCOV" != "" ]; then
|
||||
./ci/test_send.py --file=out_test.txt;
|
||||
lutin -C -P -t $TARGET -c $BUILDER $COMPILATOR_OPTION $BUS -m $CONF -p ewol?gcov;
|
||||
./ci/coverage_send.py --json=out/Linux_x86_64/$CONF/build/$BUILDER/ewol/ewol_coverage.json;
|
||||
fi
|
||||
|
||||
notifications:
|
||||
email:
|
||||
- yui.heero@gmail.com
|
373
LICENSE
Normal file
@ -0,0 +1,373 @@
|
||||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
320
Makefile
@ -1,320 +0,0 @@
|
||||
##################################################################################################################
|
||||
# #
|
||||
# Fichier : Makefile #
|
||||
# #
|
||||
# Type : Makefile d'un programme complet #
|
||||
# #
|
||||
# Auteur : Heero Yui #
|
||||
# #
|
||||
# Evolutions : Date Auteur Raison #
|
||||
# 2010-01-29 Heero Yui Mise en place d'un makefile ultra simple #
|
||||
# 2011-07-14 Heero Yui Rework the current dorder includion (simplification) #
|
||||
# #
|
||||
# Notes : This makefile might be edited with an editor compatible with escape char and carrer return #
|
||||
# char #
|
||||
# #
|
||||
# Concu Pour le projet ewol #
|
||||
# #
|
||||
##################################################################################################################
|
||||
export F_GRAS=[1m
|
||||
export F_INVERSER=[7m
|
||||
export F_SOUSLIGNER=[4m
|
||||
export F_NORMALE=[m
|
||||
export F_NOIR=[31m
|
||||
export F_ROUGE=[31m
|
||||
export F_VERT=[32m
|
||||
export F_MARRON=[33m
|
||||
export F_BLUE=[34m
|
||||
export F_VIOLET=[35m
|
||||
export F_CYAN=[36m
|
||||
export F_GRIS=[37m
|
||||
export CADRE_HAUT_BAS=' $(F_INVERSER) $(F_NORMALE)'
|
||||
export CADRE_COTERS='
$(F_INVERSER) $(F_NORMALE) $(F_INVERSER) $(F_NORMALE)'
|
||||
|
||||
VERSION_TAG=$(shell git describe --tags)
|
||||
#$(info $(VERSION_TAG))
|
||||
|
||||
VERSION_TAG_SHORT=$(shell git describe --tags --abbrev=0)
|
||||
#$(info $(VERSION_TAG_SHORT))
|
||||
|
||||
VERSION_BUILD_TIME=$(shell date)
|
||||
#$(info $(VERSION_BUILD_TIME))
|
||||
|
||||
###############################################################################
|
||||
### Platform specificity : ###
|
||||
###############################################################################
|
||||
SUPPORTED_PLATFORM=X11 DoubleBuffer IPhone IPad Android AndroidTablet
|
||||
DEFAULT_PLATFORM=X11
|
||||
|
||||
# default platform can be overridden
|
||||
PLATFORM?=$(DEFAULT_PLATFORM)
|
||||
|
||||
ifeq ($(PLATFORM), X11)
|
||||
CXXFILES += base/guiX11.cpp
|
||||
else ifeq ($(PLATFORM), DoubleBuffer)
|
||||
CXXFILES += base/guiDoubleBuffer.cpp
|
||||
else ifeq ($(PLATFORM), IPhone)
|
||||
CXXFILES += base/guiIPhone.cpp
|
||||
else ifeq ($(PLATFORM), IPad)
|
||||
CXXFILES += base/guiIPad.cpp
|
||||
else ifeq ($(PLATFORM), Android)
|
||||
CXXFILES += base/guiAndroid.cpp
|
||||
else ifeq ($(PLATFORM), AndroidTablet)
|
||||
CXXFILES += base/guiAndroidTablet.cpp
|
||||
else
|
||||
$(error you must specify a corect platform : make PLATFORM=$(SUPPORTED_PLATFORM))
|
||||
endif
|
||||
|
||||
$(info Build for $(PLATFORM))
|
||||
|
||||
###############################################################################
|
||||
### Compilateur base system ###
|
||||
###############################################################################
|
||||
CXX=g++
|
||||
CC=gcc
|
||||
AR=ar
|
||||
|
||||
DEBUG:=1
|
||||
|
||||
###############################################################################
|
||||
### Compilation Define ###
|
||||
###############################################################################
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
DEFINE = -DETK_DEBUG_LEVEL=1
|
||||
DEFINE+= -DEWOL_DEBUG_LEVEL=1
|
||||
DEFINE+= -DNDEBUG
|
||||
DEFINE+= -DEWOL_VERSION_TAG_NAME="\"$(VERSION_TAG)-release\""
|
||||
else
|
||||
DEFINE = -DETK_DEBUG_LEVEL=3
|
||||
DEFINE+= -DEWOL_DEBUG_LEVEL=3
|
||||
DEFINE+= -DEWOL_VERSION_TAG_NAME="\"$(VERSION_TAG)-debug\""
|
||||
endif
|
||||
DEFINE+= -DVERSION_BUILD_TIME="\"$(VERSION_BUILD_TIME)\""
|
||||
|
||||
X11FLAGS= -lX11 -lGL -lGLU -lXrandr
|
||||
|
||||
###############################################################################
|
||||
### Basic C flags ###
|
||||
###############################################################################
|
||||
|
||||
# basic X11 librairy ==> show if we can une under lib ...
|
||||
CXXFLAGS= $(X11FLAGS) -D__PLATFORM__=$(PLATFORM)
|
||||
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
# Enable debug (cgdb ***)
|
||||
CXXFLAGS+= -g -O0
|
||||
else
|
||||
CXXFLAGS+= -O2
|
||||
endif
|
||||
# display all flags
|
||||
CXXFLAGS+= -Wall
|
||||
# ...
|
||||
CXXFLAGS+= -D_REENTRANT
|
||||
# internal defines
|
||||
CXXFLAGS+= $(DEFINE)
|
||||
|
||||
CFLAGS= $(CXXFLAGS) -std=c99
|
||||
|
||||
# basic X11 librairy
|
||||
LDFLAGS= $(X11FLAGS)
|
||||
|
||||
# Dynamic connection of the CALLBACK of the GUI
|
||||
LDFLAGS+= -Wl,--export-dynamic
|
||||
|
||||
###############################################################################
|
||||
### Project Name ###
|
||||
###############################################################################
|
||||
PROG_NAME=ewol
|
||||
|
||||
###############################################################################
|
||||
### Basic Project description Files ###
|
||||
###############################################################################
|
||||
FILE_DIRECTORY=Sources
|
||||
OUTPUT_NAME_RELEASE=$(PROG_NAME)_release
|
||||
OUTPUT_NAME_DEBUG=$(PROG_NAME)_debug
|
||||
OBJECT_DIR=Object_$(PLATFORM)
|
||||
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
OBJECT_DIRECTORY=$(OBJECT_DIR)/release
|
||||
OUTPUT_NAME = $(OUTPUT_NAME_RELEASE)
|
||||
else
|
||||
OBJECT_DIRECTORY=$(OBJECT_DIR)/debug
|
||||
OUTPUT_NAME = $(OUTPUT_NAME_DEBUG)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Generique dependency ###
|
||||
###############################################################################
|
||||
MAKE_DEPENDENCE=Makefile
|
||||
|
||||
###############################################################################
|
||||
### Files Listes ###
|
||||
###############################################################################
|
||||
|
||||
# Ewol Tool Kit :
|
||||
CXXFILES += etk/etkDebug.cpp \
|
||||
etk/etkDebugInternal.cpp \
|
||||
etk/etkMemory.cpp \
|
||||
etk/etkString.cpp \
|
||||
etk/etkFile.cpp \
|
||||
etk/etkRegExp.cpp
|
||||
|
||||
# Ewol Sources :
|
||||
CXXFILES += ewol.cpp \
|
||||
ewolDebug.cpp \
|
||||
ewolOObject.cpp \
|
||||
ewolWidget.cpp \
|
||||
ewolWindows.cpp
|
||||
|
||||
|
||||
# Ewol Test Software :
|
||||
CXXFILES += Main.cpp
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Liste of folder where .h can be ###
|
||||
###############################################################################
|
||||
LISTE_MODULES = $(dir $(CXXFILES))
|
||||
$(info listeModule=$(LISTE_MODULES))
|
||||
INCLUDE_DIRECTORY = $(addprefix -I$(FILE_DIRECTORY)/, $(LISTE_MODULES))
|
||||
|
||||
###############################################################################
|
||||
### Build Object Files List ###
|
||||
###############################################################################
|
||||
OBJ = $(addprefix $(OBJECT_DIRECTORY)/, $(CXXFILES:.cpp=.o))
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Main Part of Makefile ###
|
||||
###############################################################################
|
||||
all: build
|
||||
|
||||
-include $(OBJ:.o=.d)
|
||||
|
||||
build: .encadrer .versionFile $(OUTPUT_NAME)
|
||||
|
||||
|
||||
.encadrer:
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo $(CADRE_COTERS)
|
||||
@echo '
DEBUT DE COMPILATION DU PROGRAMME :'$(CADRE_COTERS)
|
||||
@echo '
Repertoire Sources : $(FILE_DIRECTORY)/'$(CADRE_COTERS)
|
||||
@echo '
Repertoire object : $(OBJECT_DIRECTORY)/'$(CADRE_COTERS)
|
||||
@echo '
Binaire de sortie : $(F_VIOLET)$(OUTPUT_NAME) $(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@mkdir -p $(addprefix $(OBJECT_DIRECTORY)/, $(LISTE_MODULES))
|
||||
|
||||
|
||||
FILE_IMAGES= data/imagesSources/*.png
|
||||
|
||||
|
||||
.versionFile :
|
||||
@rm -f $(OBJECT_DIRECTORY)/GuiTools/WindowsManager/WindowsManager.o
|
||||
|
||||
|
||||
# Tool used to create a binary version of every element png or other needed by the application
|
||||
pngToCpp: tools/pngToCpp/pngToCpp.c
|
||||
@echo $(F_ROUGE)"
(bin) $@"$(F_NORMALE)
|
||||
@$(CXX) $< -o $@
|
||||
@strip -s $@
|
||||
|
||||
# Generate basic
|
||||
$(FILE_DIRECTORY)/GuiTools/myImage.cpp: $(FILE_IMAGES) $(MAKE_DEPENDENCE) pngToCpp
|
||||
@echo $(F_BLUE)"
(.cpp) *.png ==> $@"$(F_NORMALE)
|
||||
@./pngToCpp $@ $(FILE_IMAGES)
|
||||
|
||||
|
||||
# build C++
|
||||
$(OBJECT_DIRECTORY)/%.o: $(FILE_DIRECTORY)/%.cpp $(MAKE_DEPENDENCE)
|
||||
@echo $(F_VERT)"
(.o) $<"$(F_NORMALE)
|
||||
@$(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD
|
||||
|
||||
# build binary Release Mode
|
||||
$(OUTPUT_NAME_RELEASE): $(OBJ) $(MAKE_DEPENDENCE)
|
||||
@echo $(F_ROUGE)"
(bin) $@ "$(F_NORMALE)
|
||||
@$(CXX) $(OBJ) $(LDFLAGS) -o $@
|
||||
@cp $@ $(PROG_NAME)
|
||||
|
||||
# build binary Debug Mode
|
||||
$(OUTPUT_NAME_DEBUG): $(OBJ) $(MAKE_DEPENDENCE)
|
||||
@echo $(F_ROUGE)"
(bin) $@ "$(F_NORMALE)
|
||||
@$(CXX) $(OBJ) $(LDFLAGS) -o $@
|
||||
@cp $@ $(PROG_NAME)
|
||||
|
||||
clean:
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo ' CLEANING : $(F_VIOLET)$(OUTPUT_NAME)$(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo Remove Folder : $(OBJECT_DIR)
|
||||
@rm -rf $(OBJECT_DIR)
|
||||
@echo Remove File : $(PROG_NAME) $(OUTPUT_NAME_DEBUG) $(OUTPUT_NAME_RELEASE)
|
||||
@rm -f $(PROG_NAME) $(OUTPUT_NAME_DEBUG) $(OUTPUT_NAME_RELEASE)
|
||||
@echo Remove File : pngToCpp
|
||||
@rm -f pngToCpp
|
||||
@echo Remove File : $(FILE_DIRECTORY)/GuiTools/myImage.*
|
||||
@rm -f $(FILE_DIRECTORY)/GuiTools/myImage.*
|
||||
@echo Remove doxygen files : doxygen/*
|
||||
@rm -rf doxygen
|
||||
@rm -f doxygen.log
|
||||
@echo Remove temporary files *.bck
|
||||
@rm -f `find . -name "*.bck"`
|
||||
|
||||
count:
|
||||
wc -l Makefile `find $(FILE_DIRECTORY)/ -name "*.cpp"` `find $(FILE_DIRECTORY)/ -name "*.h"`
|
||||
|
||||
install: .encadrer .versionFile $(OUTPUT_NAME_RELEASE)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo ' INSTALL : $(F_VIOLET)$(OUTPUT_NAME_RELEASE)=>$(PROG_NAME)$(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo $(F_ROUGE)"
(stripped) $(OUTPUT_NAME_RELEASE) => $(PROG_NAME) "$(F_NORMALE)
|
||||
@cp $(OUTPUT_NAME_RELEASE) $(PROG_NAME)
|
||||
@strip -s $(PROG_NAME)
|
||||
@echo $(F_VERT)"
(copy) $(PROG_NAME) /usr/bin/ "$(F_NORMALE)
|
||||
@cp -vf $(PROG_NAME) /usr/bin/
|
||||
@echo $(F_VERT)"
(data) data/* ==> /usr/share/edn/ "$(F_NORMALE)
|
||||
@mkdir -p /usr/share/edn/
|
||||
@rm -rf /usr/share/edn/*
|
||||
@cp -vf data/*.xml /usr/share/edn/
|
||||
@mkdir -p /usr/share/edn/images/
|
||||
@cp -vf data/imagesSources/icone.png /usr/share/edn/images/
|
||||
@cp -vf data/imagesSources/delete-24px.png /usr/share/edn/images/
|
||||
|
||||
|
||||
# http://alp.developpez.com/tutoriels/debian/creer-paquet/
|
||||
package: .encadrer
|
||||
@echo 'Create Folders ...'
|
||||
@mkdir -p package/$(PROG_NAME)/DEBIAN/
|
||||
@mkdir -p package/$(PROG_NAME)/usr/bin/
|
||||
@mkdir -p package/$(PROG_NAME)/usr/share/doc/
|
||||
@mkdir -p package/$(PROG_NAME)/usr/share/edn/
|
||||
# Create the control file
|
||||
@echo "Package: "$(PROG_NAME) > package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Version: "$(VERSION_TAG_SHORT) >> package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Section: Development,Editors" >> package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Priority: optional" >>package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Architecture: all" >> package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Depends: bash" >> package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Maintainer: Mr DUPIN Edouard <yui.heero@gmail.com>" >> package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Description: Text editor for sources code with ctags management" >> package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "" >> package/$(PROG_NAME)/DEBIAN/control
|
||||
# Create the PostRm
|
||||
@echo "#!/bin/bash" > package/$(PROG_NAME)/DEBIAN/postrm
|
||||
@echo "rm ~/."$(PROG_NAME) >> package/$(PROG_NAME)/DEBIAN/postrm
|
||||
@echo "" >> package/$(PROG_NAME)/DEBIAN/postrm
|
||||
# Enable Execution in script
|
||||
@chmod 755 package/$(PROG_NAME)/DEBIAN/post*
|
||||
@#chmod 755 package/$(PROG_NAME)/DEBIAN/pre*
|
||||
# copy licence and information :
|
||||
@cp README package/$(PROG_NAME)/usr/share/doc/README
|
||||
@cp licence.txt package/$(PROG_NAME)/usr/share/doc/copyright
|
||||
@echo "First generation in progress" >> package/$(PROG_NAME)/usr/share/doc/changelog
|
||||
@cp -vf $(PROG_NAME) package/$(PROG_NAME)/usr/bin/
|
||||
@cp -vf data/*.xml package/$(PROG_NAME)/usr/share/edn/
|
||||
@cd package; dpkg-deb --build $(PROG_NAME)
|
||||
|
||||
|
137
README.md
@ -1,41 +1,128 @@
|
||||
Edn
|
||||
Ewol
|
||||
====
|
||||
|
||||
`Ewol` (Edn Widget OpenGl Layer) is a FREE software.
|
||||
|
||||
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
|
||||
Release (master)
|
||||
----------------
|
||||
|
||||
[](https://travis-ci.org/atria-soft/ewol)
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
|
||||
Developement (dev)
|
||||
------------------
|
||||
|
||||
[](https://travis-ci.org/atria-soft/ewol)
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
[](http://atria-soft.com/ci/atria-soft/ewol)
|
||||
|
||||
Instructions
|
||||
============
|
||||
|
||||
download the software :
|
||||
download Build system:
|
||||
----------------------
|
||||
|
||||
git clone git://github.com/HeeroYui/ewol.git
|
||||
cd edn
|
||||
sudo pip install lutin
|
||||
sudo pip install pillow
|
||||
|
||||
Compile software and install :
|
||||
need google repo:
|
||||
-----------------
|
||||
|
||||
sudo make DEBUG=0 install
|
||||
see: http://source.android.com/source/downloading.html#installing-repo
|
||||
|
||||
Run Software :
|
||||
mkdir ~/.bin
|
||||
PATH=~/.bin:$PATH
|
||||
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
|
||||
chmod a+x ~/.bin/repo
|
||||
|
||||
???
|
||||
|
||||
License
|
||||
=======
|
||||
download the software:
|
||||
----------------------
|
||||
|
||||
You can:
|
||||
- Redistribute the sources code and binaries.
|
||||
- Modify the Sources code.
|
||||
- Use a part of the sources (less than 50%) in an other software, just write somewhere "Edn is great" visible by the user (on your product or on your website with a link to my page).
|
||||
- Redistribute the modification only if you want.
|
||||
- Send me the bug-fix (it could be great).
|
||||
- Pay me a beer or some other things.
|
||||
- Print the source code on WC paper ...
|
||||
You can NOT:
|
||||
- Earn money with this Software (But I can).
|
||||
- Add malware in the Sources.
|
||||
- Do something bad with the sources.
|
||||
- Use it to travel in the space with a toaster.
|
||||
mkdir WORKING_DIRECTORY
|
||||
cd WORKING_DIRECTORY
|
||||
repo init -u git://github.com/atria-soft/manifest.git
|
||||
repo sync -j8
|
||||
|
||||
|
||||
Compile software and test:
|
||||
--------------------------
|
||||
|
||||
lutin ewol-*
|
||||
|
||||
Dependency packages
|
||||
===================
|
||||
|
||||
Ubuntu Or Debian:
|
||||
|
||||
sudo apt-get install g++ libgl1-mesa-dev zlib1g-dev libasound2-dev
|
||||
# Compile with Clang:
|
||||
sudo apt-get install clang
|
||||
# For andoid compilation (jdk 7 does not work...):
|
||||
sudo apt-get install javacc openjdk-6-jdk
|
||||
# Cross compile for windows:
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-mingw-w64
|
||||
# On 64 bits processor for compatibility:
|
||||
sudo apt-get install ia32-libs
|
||||
sudo apt-get install g++-multilib libc6-dev-i386
|
||||
|
||||
Arch-linux:
|
||||
|
||||
# Cross compile for windows:
|
||||
pacman -S mingw-w64-gcc
|
||||
|
||||
I reserve the right to change this licence. If it change the version of the copy you have keep its own license
|
||||
# Cross compile for Android:
|
||||
in /etc/pacman.conf file uncomment:
|
||||
[multilib]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
# update the system:
|
||||
Pacman -Syu
|
||||
# install lib C:
|
||||
pacman -S lib32-glibc lib32-zlib lib32-gcc-libs
|
||||
# install open-jdk 7.0
|
||||
pacman -S jdk7-openjdk
|
||||
# connect adb: (and you can do a "android/sdk/platform-tools/adb shell" to enable computer key on device)
|
||||
pacman -S android-udev
|
||||
|
||||
|
||||
Simple framework overview
|
||||
=========================
|
||||
|
||||

|
||||
|
||||
License (MPL v2.0)
|
||||
==================
|
||||
|
||||
Copyright ewol Edouard DUPIN
|
||||
|
||||
Licensed under the Mozilla Public License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.mozilla.org/MPL/2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
@ -1,71 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Main.cpp
|
||||
* @brief main fonction
|
||||
* @author Edouard DUPIN
|
||||
* @date 13/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include <ewol.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
// need to run xcompmgr to have transparency
|
||||
|
||||
class Plop :public ewol::Windows
|
||||
{
|
||||
public:
|
||||
Plop(void)
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
~Plop(void)
|
||||
{
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief main input fonction
|
||||
*/
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
Plop * myWindowsExample = new Plop();
|
||||
|
||||
ewol::Init(argc, argv);
|
||||
|
||||
// create the specific windows
|
||||
ewol::DisplayWindows(myWindowsExample);
|
||||
|
||||
ewol::Run();
|
||||
|
||||
ewol::DisplayWindows(NULL);
|
||||
|
||||
delete(myWindowsExample);
|
||||
|
||||
ewol::UnInit();
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file guiAndroid.cpp
|
||||
* @brief Gui abstraction layer (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 20/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
#include <ewolDebug.h>
|
||||
#include <guiAndroid.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "guiAbstraction"
|
||||
|
||||
void guiAbstraction::Init(int32_t argc, char *argv[])
|
||||
{
|
||||
EWOL_INFO("INIT for Android environement");
|
||||
}
|
||||
|
||||
void guiAbstraction::Run(void)
|
||||
{
|
||||
EWOL_INFO("Start Running");
|
||||
EWOL_INFO("Stop Running");
|
||||
}
|
||||
|
||||
void guiAbstraction::UnInit(void)
|
||||
{
|
||||
EWOL_INFO("UN-INIT for Android environement");
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file guiAndroid.h
|
||||
* @brief Gui abstraction layer (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 20/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GUI_ABSTRACTION_H__
|
||||
#define __GUI_ABSTRACTION_H__
|
||||
|
||||
#include <etkTypes.h>
|
||||
|
||||
namespace guiAbstraction
|
||||
{
|
||||
void Init(int32_t argc, char *argv[]);
|
||||
void Run(void);
|
||||
void UnInit(void);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
@ -1,46 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file guiDoubleBuffer.cpp
|
||||
* @brief Gui abstraction layer (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 20/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include <ewolDebug.h>
|
||||
#include <guiDoubleBuffer.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "guiAbstraction"
|
||||
|
||||
void guiAbstraction::Init(int32_t argc, char *argv[])
|
||||
{
|
||||
EWOL_INFO("INIT for DoubleBuffer environement");
|
||||
}
|
||||
|
||||
void guiAbstraction::Run(void)
|
||||
{
|
||||
EWOL_INFO("Start Running");
|
||||
EWOL_INFO("Stop Running");
|
||||
}
|
||||
|
||||
void guiAbstraction::UnInit(void)
|
||||
{
|
||||
EWOL_INFO("UN-INIT for DoubleBuffer environement");
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file guiDoubleBuffer.h
|
||||
* @brief Gui abstraction layer (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 20/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GUI_ABSTRACTION_H__
|
||||
#define __GUI_ABSTRACTION_H__
|
||||
|
||||
#include <etkTypes.h>
|
||||
|
||||
namespace guiAbstraction
|
||||
{
|
||||
void Init(int32_t argc, char *argv[]);
|
||||
void Run(void);
|
||||
void UnInit(void);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
@ -1,46 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file guiIPhone.cpp
|
||||
* @brief Gui abstraction layer (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 20/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include <ewolDebug.h>
|
||||
#include <guiIPhone.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "guiAbstraction"
|
||||
|
||||
void guiAbstraction::Init(int32_t argc, char *argv[])
|
||||
{
|
||||
EWOL_INFO("INIT for IPhone environement");
|
||||
}
|
||||
|
||||
void guiAbstraction::Run(void)
|
||||
{
|
||||
EWOL_INFO("Start Running");
|
||||
EWOL_INFO("Stop Running");
|
||||
}
|
||||
|
||||
void guiAbstraction::UnInit(void)
|
||||
{
|
||||
EWOL_INFO("UN-INIT for IPhone environement");
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file guiIPhone.h
|
||||
* @brief Gui abstraction layer (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 20/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GUI_ABSTRACTION_H__
|
||||
#define __GUI_ABSTRACTION_H__
|
||||
|
||||
#include <etkTypes.h>
|
||||
|
||||
namespace guiAbstraction
|
||||
{
|
||||
void Init(int32_t argc, char *argv[]);
|
||||
void Run(void);
|
||||
void UnInit(void);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -1,509 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file guiX11.cpp
|
||||
* @brief Gui abstraction layer (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 20/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include <ewolDebug.h>
|
||||
#include <etkString.h>
|
||||
#include <guiX11.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <GL/glut.h>
|
||||
#include <GL/glx.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/extensions/Xrender.h>
|
||||
|
||||
//#define TEST_MODE_1
|
||||
|
||||
namespace guiAbstraction {
|
||||
|
||||
extern "C" {
|
||||
typedef struct Hints
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long functions;
|
||||
unsigned long decorations;
|
||||
long inputMode;
|
||||
unsigned long status;
|
||||
} Hints;
|
||||
}
|
||||
class X11systemInterface
|
||||
{
|
||||
private:
|
||||
Atom del_atom;
|
||||
Display *m_display;
|
||||
GLXFBConfig fbconfig;
|
||||
Window WindowHandle, GLXWindowHandle;
|
||||
int width, height;
|
||||
|
||||
bool m_run;
|
||||
ewol::Windows* m_uniqueWindows;
|
||||
|
||||
bool CreateX11Context(void)
|
||||
{
|
||||
int x,y, attr_mask;
|
||||
XSizeHints hints;
|
||||
XWMHints *StartupState;
|
||||
XTextProperty textprop;
|
||||
XSetWindowAttributes attr;
|
||||
static char *title = (char*)"APPLICATION Title ... (todo)";
|
||||
|
||||
// Connect to the X server
|
||||
m_display = XOpenDisplay(NULL);
|
||||
if(NULL == m_display) {
|
||||
EWOL_CRITICAL("Could not open display X.");
|
||||
exit(-1);
|
||||
} else {
|
||||
EWOL_INFO("Display opened.");
|
||||
}
|
||||
int Xscreen = DefaultScreen(m_display);
|
||||
Window Xroot = RootWindow(m_display, Xscreen);
|
||||
|
||||
int numfbconfigs;
|
||||
int VisualData[] = {
|
||||
GLX_RENDER_TYPE, GLX_RGBA_BIT,
|
||||
GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
|
||||
GLX_DOUBLEBUFFER, True,
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1,
|
||||
GLX_ALPHA_SIZE, 1,
|
||||
GLX_DEPTH_SIZE, 1,
|
||||
None
|
||||
};
|
||||
XVisualInfo *visual = NULL;
|
||||
GLXFBConfig *fbconfigs = glXChooseFBConfig(m_display, Xscreen, VisualData, &numfbconfigs);
|
||||
for(int i = 0; i<numfbconfigs; i++) {
|
||||
visual = glXGetVisualFromFBConfig(m_display, fbconfigs[i]);
|
||||
if(!visual) {
|
||||
continue;
|
||||
}
|
||||
|
||||
XRenderPictFormat * pictFormat = XRenderFindVisualFormat(m_display, visual->visual);
|
||||
if(!pictFormat) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(pictFormat->direct.alphaMask > 0) {
|
||||
fbconfig = fbconfigs[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Create a colormap - only needed on some X clients, eg. IRIX
|
||||
attr.colormap = XCreateColormap(m_display, Xroot, visual->visual, AllocNone);
|
||||
|
||||
|
||||
attr.border_pixel = 0;
|
||||
attr.event_mask = StructureNotifyMask
|
||||
| SubstructureNotifyMask
|
||||
| EnterWindowMask
|
||||
| LeaveWindowMask
|
||||
| ExposureMask
|
||||
| ButtonPressMask
|
||||
| ButtonReleaseMask
|
||||
| OwnerGrabButtonMask
|
||||
| KeyPressMask
|
||||
| KeyReleaseMask
|
||||
| PointerMotionMask
|
||||
| FocusChangeMask
|
||||
| SubstructureRedirectMask;
|
||||
|
||||
// set no background at the gui
|
||||
attr.background_pixmap = None;
|
||||
|
||||
// select internal attribute
|
||||
attr_mask = CWBackPixmap | CWColormap | CWBorderPixel | CWEventMask;
|
||||
// Create the window
|
||||
width = DisplayWidth(m_display, DefaultScreen(m_display))/2;
|
||||
height = DisplayHeight(m_display, DefaultScreen(m_display))/2;
|
||||
x=width/2;
|
||||
y=height/4;
|
||||
|
||||
// Real create of the window
|
||||
WindowHandle = XCreateWindow(m_display,
|
||||
Xroot,
|
||||
x, y, width, height,
|
||||
1,
|
||||
visual->depth,
|
||||
InputOutput,
|
||||
visual->visual,
|
||||
attr_mask, &attr);
|
||||
|
||||
if( !WindowHandle ) {
|
||||
EWOL_CRITICAL("Couldn't create the window");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
/* Configure it... (ok, ok, this next bit isn't "minimal") */
|
||||
textprop.value = (unsigned char*)title;
|
||||
textprop.encoding = XA_STRING;
|
||||
textprop.format = 8;
|
||||
textprop.nitems = strlen(title);
|
||||
|
||||
hints.x = x;
|
||||
hints.y = y;
|
||||
hints.width = width;
|
||||
hints.height = height;
|
||||
hints.flags = USPosition|USSize;
|
||||
|
||||
StartupState = XAllocWMHints();
|
||||
StartupState->initial_state = NormalState;
|
||||
StartupState->flags = StateHint;
|
||||
|
||||
XSetWMProperties(m_display, WindowHandle,&textprop, &textprop,/* Window title/icon title*/
|
||||
NULL, 0,/* Argv[], argc for program*/
|
||||
&hints, /* Start position/size*/
|
||||
StartupState,/* Iconised/not flag */
|
||||
NULL);
|
||||
|
||||
XFree(StartupState);
|
||||
|
||||
/* Open it, wait for it to appear */
|
||||
XMapWindow(m_display, WindowHandle);
|
||||
//XIfEvent(m_display, &event, WaitForMapNotify, (char*)&WindowHandle);
|
||||
|
||||
// Set the kill atom so we get a message when the user tries to close the window
|
||||
if ((del_atom = XInternAtom(m_display, "WM_DELETE_WINDOW", 0)) != None) {
|
||||
XSetWMProtocols(m_display, WindowHandle, &del_atom, 1);
|
||||
}
|
||||
|
||||
//code to remove decoration
|
||||
/*
|
||||
{
|
||||
|
||||
Hints hints;
|
||||
Atom property;
|
||||
hints.flags = 2;// Specify that we're changing the window decorations.
|
||||
hints.decorations = 0;// 0 (false) means that window decorations should go bye-bye
|
||||
property = XInternAtom(m_display, "_MOTIF_WM_HINTS", true);
|
||||
if (0 != property) {
|
||||
XChangeProperty(m_display,WindowHandle,property,property,32,PropModeReplace,(unsigned char *)&hints,5);
|
||||
XMapWindow(m_display, WindowHandle);
|
||||
} else {
|
||||
EWOL_ERROR("Can not get the property for the rmoving decoration of the X11 system ....");
|
||||
}
|
||||
}
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CreateOGlContext(void)
|
||||
{
|
||||
/* See if we can do OpenGL on this visual */
|
||||
int dummy;
|
||||
if (!glXQueryExtension(m_display, &dummy, &dummy)) {
|
||||
EWOL_CRITICAL("OpenGL not supported by X server");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
/* Create the OpenGL rendering context */
|
||||
GLXContext RenderContext = glXCreateNewContext(m_display, fbconfig, GLX_RGBA_TYPE, 0, True);
|
||||
if (!RenderContext) {
|
||||
EWOL_CRITICAL("Failed to create a GL context");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
GLXWindowHandle = glXCreateWindow(m_display, fbconfig, WindowHandle, NULL);
|
||||
|
||||
/* Make it current */
|
||||
if (!glXMakeContextCurrent(m_display, GLXWindowHandle, GLXWindowHandle, RenderContext)) {
|
||||
EWOL_CRITICAL("glXMakeCurrent failed for window");
|
||||
exit(-1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Draw(void)
|
||||
{
|
||||
//EWOL_DEBUG("redraw (" << width << "," << height << ")");
|
||||
if(NULL == m_uniqueWindows) {
|
||||
//EWOL_DEBUG("Has No Windows set...");
|
||||
|
||||
// set the size of the open GL system
|
||||
glViewport(0,0,width,height);
|
||||
|
||||
// Clear the screen with transparency ...
|
||||
glClearColor(0.750, 0.750, 0.750, 0.5);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(0., (float)width, 0., (float)height, 1., 20.);
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
glTranslatef(0, 0, -5);
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
glColor3f(1., 0., 0.); glVertex3f( .25*(float)width, .25*(float)height, 0.);
|
||||
glColor3f(0., 1., 0.); glVertex3f( .75*(float)width, .25*(float)height, 0.);
|
||||
glColor3f(0., 0., 1.); glVertex3f( .75*(float)width, .75*(float)height, 0.);
|
||||
glColor3f(1., 1., 0.); glVertex3f( .25*(float)width, .75*(float)height, 0.);
|
||||
glEnd();
|
||||
} else {
|
||||
m_uniqueWindows->SysDraw();
|
||||
}
|
||||
/* Swapbuffers */
|
||||
glXSwapBuffers(m_display, GLXWindowHandle);
|
||||
}
|
||||
|
||||
public:
|
||||
X11systemInterface(void)
|
||||
{
|
||||
CreateX11Context();
|
||||
CreateOGlContext();
|
||||
m_run = true;
|
||||
}
|
||||
|
||||
~X11systemInterface(void)
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
|
||||
void Setwindow(ewol::Windows* newWindows)
|
||||
{
|
||||
m_uniqueWindows = newWindows;
|
||||
if (NULL != m_uniqueWindows) {
|
||||
m_uniqueWindows->CalculateSize((double)width, (double)height);
|
||||
}
|
||||
}
|
||||
|
||||
void Run(void)
|
||||
{
|
||||
// main cycle
|
||||
while(true == m_run) {
|
||||
XEvent event;
|
||||
// main X boucle :
|
||||
while (XPending(m_display)) {
|
||||
XNextEvent(m_display, &event);
|
||||
|
||||
switch (event.type)
|
||||
{
|
||||
case ClientMessage:
|
||||
{
|
||||
Atom atom = XInternAtom(m_display, "WM_DELETE_WINDOW", false);
|
||||
if((int64_t)atom == (int64_t)event.xclient.data.l[0]) {
|
||||
if (NULL != m_uniqueWindows) {
|
||||
m_uniqueWindows->SysOnKill();
|
||||
}
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ConfigureNotify:
|
||||
width = event.xconfigure.width;
|
||||
height = event.xconfigure.height;
|
||||
break;
|
||||
}
|
||||
// parse event
|
||||
if(NULL == m_uniqueWindows) {
|
||||
EWOL_DEBUG("Has No Windows set...");
|
||||
} else {
|
||||
switch (event.type)
|
||||
{
|
||||
case ConfigureNotify:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"ConfigureNotify\" Origin(" << event.xconfigure.x << "," << event.xconfigure.y << ") Size(" << event.xconfigure.width << "," << event.xconfigure.height << ")");
|
||||
m_uniqueWindows->CalculateSize((double)event.xconfigure.width, (double)event.xconfigure.height);
|
||||
break;
|
||||
case Expose:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"Expose\"");
|
||||
m_uniqueWindows->SysOnExpose();
|
||||
break;
|
||||
case ButtonPress:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"ButtonPress\" (" << (double)event.xbutton.x << "," << (double)event.xbutton.y << ")");
|
||||
if ( event.xbutton.button & Button2 ) {
|
||||
m_uniqueWindows->GenEventInput(2, ewol::EVENT_INPUT_TYPE_DOWN, (double)event.xbutton.x, (double)event.xbutton.y);
|
||||
} else if (event.xbutton.button & Button1) {
|
||||
m_uniqueWindows->GenEventInput(1, ewol::EVENT_INPUT_TYPE_DOWN, (double)event.xbutton.x, (double)event.xbutton.y);
|
||||
}
|
||||
break;
|
||||
case ButtonRelease:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"ButtonRelease\" (" << (double)event.xbutton.x << "," << (double)event.xbutton.y << ")");
|
||||
if(event.xbutton.button & Button2) {
|
||||
m_uniqueWindows->GenEventInput(2, ewol::EVENT_INPUT_TYPE_UP, (double)event.xbutton.x, (double)event.xbutton.y);
|
||||
} else if (event.xbutton.button & Button1) {
|
||||
m_uniqueWindows->GenEventInput(1, ewol::EVENT_INPUT_TYPE_UP, (double)event.xbutton.x, (double)event.xbutton.y);
|
||||
}
|
||||
break;
|
||||
case EnterNotify:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"EnterNotify\" (" << (double)event.xcrossing.x << "," << (double)event.xcrossing.y << ")");
|
||||
m_uniqueWindows->GenEventInput(0, ewol::EVENT_INPUT_TYPE_ENTER, (double)event.xcrossing.x, (double)event.xcrossing.y);
|
||||
break;
|
||||
case MotionNotify:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"MotionNotify\" (" << (double)event.xmotion.x << "," << (double)event.xmotion.y << ")");
|
||||
m_uniqueWindows->GenEventInput(0, ewol::EVENT_INPUT_TYPE_MOVE, (double)event.xmotion.x, (double)event.xmotion.y);
|
||||
break;
|
||||
case LeaveNotify:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"LeaveNotify\" (" << (double)event.xcrossing.x << "," << (double)event.xcrossing.y << ")");
|
||||
m_uniqueWindows->GenEventInput(0, ewol::EVENT_INPUT_TYPE_LEAVE, (double)event.xcrossing.x, (double)event.xcrossing.y);
|
||||
break;
|
||||
case FocusIn:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"FocusIn\"");
|
||||
m_uniqueWindows->SetFocus();
|
||||
break;
|
||||
case FocusOut:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"FocusOut\"");
|
||||
m_uniqueWindows->RmFocus();
|
||||
break;
|
||||
case KeyPress:
|
||||
case KeyRelease:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"KeyPress/KeyRelease\" ");
|
||||
{
|
||||
char buf[11];
|
||||
KeySym keysym;
|
||||
XComposeStatus status;
|
||||
int count = XLookupString(&event.xkey, buf, 10, &keysym, &status);
|
||||
buf[count] = '\0';
|
||||
if(event.type == KeyPress) {
|
||||
// TODO : set the char here...
|
||||
} else {
|
||||
// TODO : set the char here...
|
||||
}
|
||||
break;
|
||||
}
|
||||
//case DestroyNotify:
|
||||
// break;
|
||||
case MapNotify:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"MapNotify\"");
|
||||
m_uniqueWindows->SysOnShow();
|
||||
break;
|
||||
case UnmapNotify:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"UnmapNotify\"");
|
||||
m_uniqueWindows->SysOnHide();
|
||||
break;
|
||||
default:
|
||||
EWOL_DEBUG("X11 event : " << event.type << " = \"???\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
Draw();
|
||||
usleep( 100000 );
|
||||
}
|
||||
}
|
||||
|
||||
void Stop(void)
|
||||
{
|
||||
m_run = false;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "guiAbstraction"
|
||||
|
||||
static bool guiAbstractionIsInit = false;
|
||||
#ifdef TEST_MODE_1
|
||||
static guiAbstraction::X11display * myDisplay = NULL;
|
||||
static guiAbstraction::X11eventMng * myEventManager = NULL;
|
||||
#else
|
||||
static guiAbstraction::X11systemInterface * myX11Access = NULL;
|
||||
#endif
|
||||
void guiAbstraction::Init(int32_t argc, char *argv[])
|
||||
{
|
||||
if (false == guiAbstractionIsInit) {
|
||||
// set the gui is init :
|
||||
guiAbstractionIsInit = true;
|
||||
EWOL_INFO("INIT for X11 environement");
|
||||
#ifdef TEST_MODE_1
|
||||
myDisplay = new guiAbstraction::X11display("");
|
||||
myEventManager = new guiAbstraction::X11eventMng(*myDisplay);
|
||||
#else
|
||||
myX11Access = new guiAbstraction::X11systemInterface();
|
||||
#endif
|
||||
} else {
|
||||
EWOL_CRITICAL("Can not INIT X11 ==> already init before");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void guiAbstraction::Run(void)
|
||||
{
|
||||
if (true == guiAbstractionIsInit) {
|
||||
EWOL_INFO("Start Running");
|
||||
#ifdef TEST_MODE_1
|
||||
myEventManager->Run();
|
||||
#else
|
||||
myX11Access->Run();
|
||||
#endif
|
||||
EWOL_INFO("Stop Running");
|
||||
} else {
|
||||
EWOL_CRITICAL("Can not Run X11 ==> not init ... ");
|
||||
}
|
||||
}
|
||||
|
||||
void guiAbstraction::Stop(void)
|
||||
{
|
||||
if (true == guiAbstractionIsInit) {
|
||||
#ifdef TEST_MODE_1
|
||||
myEventManager->Stop();
|
||||
#else
|
||||
myX11Access->Stop();
|
||||
#endif
|
||||
} else {
|
||||
EWOL_CRITICAL("Can not Stop X11 ==> not init ... ");
|
||||
}
|
||||
}
|
||||
|
||||
void guiAbstraction::SetDisplayOnWindows(ewol::Windows * newOne)
|
||||
{
|
||||
if (true == guiAbstractionIsInit) {
|
||||
#ifdef TEST_MODE_1
|
||||
myEventManager->Setwindow(newOne);
|
||||
#else
|
||||
myX11Access->Setwindow(newOne);
|
||||
#endif
|
||||
} else {
|
||||
EWOL_CRITICAL("Can not set Windows X11 ==> not init ... ");
|
||||
}
|
||||
}
|
||||
|
||||
void guiAbstraction::UnInit(void)
|
||||
{
|
||||
if (true == guiAbstractionIsInit) {
|
||||
EWOL_INFO("UN-INIT for X11 environement");
|
||||
#ifdef TEST_MODE_1
|
||||
if (NULL != myEventManager) {
|
||||
delete(myEventManager);
|
||||
}
|
||||
if (NULL != myDisplay) {
|
||||
delete(myDisplay);
|
||||
}
|
||||
#else
|
||||
if (NULL != myX11Access) {
|
||||
delete(myX11Access);
|
||||
}
|
||||
#endif
|
||||
guiAbstractionIsInit = false;
|
||||
} else {
|
||||
EWOL_CRITICAL("Can not Un-Init X11 ==> not init ... ");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file guiX11.h
|
||||
* @brief Gui abstraction layer (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 20/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __GUI_ABSTRACTION_H__
|
||||
#define __GUI_ABSTRACTION_H__
|
||||
|
||||
#include <etkTypes.h>
|
||||
#include <ewolWindows.h>
|
||||
|
||||
namespace guiAbstraction
|
||||
{
|
||||
void Init(int32_t argc, char *argv[]);
|
||||
void Run(void);
|
||||
void Stop(void);
|
||||
void UnInit(void);
|
||||
void SetDisplayOnWindows(ewol::Windows * newOne);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
@ -1,71 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkDebug.h
|
||||
* @brief Ewol Tool Kit : log implementation
|
||||
* @author Edouard DUPIN
|
||||
* @date 08/06/2010
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <etkDebug.h>
|
||||
#include <time.h>
|
||||
|
||||
// Max string size : (wide screan console nb caractere)
|
||||
#define EDN_LOG_MAX_LENGTH 250
|
||||
|
||||
|
||||
#define FUNCTION_NAME_SIZE (50)
|
||||
|
||||
void TOOLS_DisplayFuncName(int32_t ligne, const char* className, const char* funcName, const char* libName)
|
||||
{
|
||||
char tmpName[FUNCTION_NAME_SIZE] = "";
|
||||
|
||||
if (NULL == className) {
|
||||
if (NULL == libName) {
|
||||
snprintf(tmpName, FUNCTION_NAME_SIZE, "???????? | (l=%5d) %s ",ligne, funcName);
|
||||
} else {
|
||||
snprintf(tmpName, FUNCTION_NAME_SIZE, "%s | (l=%5d) %s ",libName, ligne, funcName);
|
||||
}
|
||||
} else {
|
||||
if (NULL == libName) {
|
||||
snprintf(tmpName, FUNCTION_NAME_SIZE, "???????? | (l=%5d) %s::%s ",ligne, className, funcName);
|
||||
} else {
|
||||
snprintf(tmpName, FUNCTION_NAME_SIZE, "%s | (l=%5d) %s::%s ", libName, ligne, className, funcName);
|
||||
}
|
||||
|
||||
}
|
||||
tmpName[FUNCTION_NAME_SIZE-4] = ' ';
|
||||
tmpName[FUNCTION_NAME_SIZE-3] = '|';
|
||||
tmpName[FUNCTION_NAME_SIZE-2] = ' ';
|
||||
tmpName[FUNCTION_NAME_SIZE-1] = '\0';
|
||||
std::cout << tmpName;
|
||||
}
|
||||
|
||||
|
||||
void TOOLS_DisplayTime(void)
|
||||
{
|
||||
time_t rawtime;
|
||||
struct tm * timeinfo;
|
||||
char tmpdata[50];
|
||||
|
||||
time ( &rawtime );
|
||||
timeinfo = localtime ( &rawtime );
|
||||
sprintf(tmpdata, " %2dh %2dmin %2ds | ", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec);
|
||||
std::cout << tmpdata ;
|
||||
}
|
||||
|
@ -1,96 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkDebug.h
|
||||
* @brief Ewol Tool Kit : log implementation
|
||||
* @author Edouard DUPIN
|
||||
* @date 08/06/2010
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __ETK_DEBUG_H__
|
||||
#define __ETK_DEBUG_H__
|
||||
|
||||
#include <iostream>
|
||||
#include <etkTypes.h>
|
||||
|
||||
// Log Message System For EDN
|
||||
void TOOLS_DisplayFuncName(int32_t ligne, const char* className, const char* funcName, const char* libName);
|
||||
void TOOLS_DisplayTime(void);
|
||||
|
||||
//regular colors
|
||||
#define ETK_BASH_COLOR_BLACK "\e[0;30m"
|
||||
#define ETK_BASH_COLOR_RED "\e[0;31m"
|
||||
#define ETK_BASH_COLOR_GREEN "\e[0;32m"
|
||||
#define ETK_BASH_COLOR_YELLOW "\e[0;33m"
|
||||
#define ETK_BASH_COLOR_BLUE "\e[0;34m"
|
||||
#define ETK_BASH_COLOR_MAGENTA "\e[0;35m"
|
||||
#define ETK_BASH_COLOR_CYAN "\e[0;36m"
|
||||
#define ETK_BASH_COLOR_WHITE "\e[0;37m"
|
||||
//emphasized (bolded) colors
|
||||
#define ETK_BASH_COLOR_BOLD_BLACK "\e[1;30m"
|
||||
#define ETK_BASH_COLOR_BOLD_RED "\e[1;31m"
|
||||
#define ETK_BASH_COLOR_BOLD_GREEN "\e[1;32m"
|
||||
#define ETK_BASH_COLOR_BOLD_YELLOW "\e[1;33m"
|
||||
#define ETK_BASH_COLOR_BOLD_BLUE "\e[1;34m"
|
||||
#define ETK_BASH_COLOR_BOLD_MAGENTA "\e[1;35m"
|
||||
#define ETK_BASH_COLOR_BOLD_CYAN "\e[1;36m"
|
||||
#define ETK_BASH_COLOR_BOLD_WHITE "\e[1;37m"
|
||||
//background colors
|
||||
#define ETK_BASH_COLOR_BG_BLACK "\e[40m"
|
||||
#define ETK_BASH_COLOR_BG_RED "\e[41m"
|
||||
#define ETK_BASH_COLOR_BG_GREEN "\e[42m"
|
||||
#define ETK_BASH_COLOR_BG_YELLOW "\e[43m"
|
||||
#define ETK_BASH_COLOR_BG_BLUE "\e[44m"
|
||||
#define ETK_BASH_COLOR_BG_MAGENTA "\e[45m"
|
||||
#define ETK_BASH_COLOR_BG_CYAN "\e[46m"
|
||||
#define ETK_BASH_COLOR_BG_WHITE "\e[47m"
|
||||
// Return to the normal color setings
|
||||
#define ETK_BASH_COLOR_NORMAL "\e[0m"
|
||||
//go to the Top of bash
|
||||
#define ETK_BASH_GO_TOP "\e[0;0f"
|
||||
|
||||
#undef __class__
|
||||
#define __class__ (NULL)
|
||||
|
||||
#define ETK_DBG_COMMON(libName, color, info, data) do { \
|
||||
std::cout << color; \
|
||||
TOOLS_DisplayTime(); \
|
||||
TOOLS_DisplayFuncName(__LINE__, __class__, __func__, libName); \
|
||||
std::cout << "[" << info << "] " << data; \
|
||||
std::cout << ETK_BASH_COLOR_NORMAL <<std::endl; \
|
||||
}while(0)
|
||||
#define ETK_CRITICAL(libName, data) ETK_DBG_COMMON(libName, ETK_BASH_COLOR_BOLD_RED, "CC", data)
|
||||
#define ETK_WARNING(libName, data) ETK_DBG_COMMON(libName, ETK_BASH_COLOR_MAGENTA, "WW", data)
|
||||
#define ETK_ERROR(libName, data) ETK_DBG_COMMON(libName, ETK_BASH_COLOR_BOLD_RED, "EE", data)
|
||||
#define ETK_INFO(libName, data) ETK_DBG_COMMON(libName, ETK_BASH_COLOR_CYAN, "II", data)
|
||||
#define ETK_DEBUG(libName, data) ETK_DBG_COMMON(libName, ETK_BASH_COLOR_YELLOW, "DD", data)
|
||||
#define ETK_ASSERT(libName, cond, data) do { \
|
||||
if (!(cond)) { \
|
||||
ETK_CRITICAL(libName, data); \
|
||||
assert(!#cond); \
|
||||
} \
|
||||
} while (0)
|
||||
#define ETK_CHECK_INOUT_ASSERT(libName, cond) ETK_ASSERT(libName, (cond), "Internal input error : "#cond)
|
||||
#define ETK_CHECK_INOUT_WARNING(libName, cond) do { \
|
||||
if (!(cond)) { \
|
||||
ETK_CRITICAL(libName, "Internal input error : "#cond); \
|
||||
} \
|
||||
} while (0)
|
||||
#define ETK_CHECK_MAGIC(libName, cond) ETK_ASSERT(libName, (cond), "MAGIC check error : "#cond)
|
||||
|
||||
#endif
|
@ -1,25 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkDebugInternal.cpp
|
||||
* @brief Ewol Tool Kit : log wrapper (sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 19/10/2011
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
const char * etkLibName = "Etk ";
|
@ -1,65 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkDebugInternal.h
|
||||
* @brief Ewol Tool Kit : log wrapper (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 19/10/2011
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __ETK_DEBUG_INTERNAL_H__
|
||||
#define __ETK_DEBUG_INTERNAL_H__
|
||||
|
||||
#include "etkDebug.h"
|
||||
|
||||
extern const char * etkLibName;
|
||||
|
||||
#define TK_CRITICAL(data) ETK_CRITICAL(etkLibName, data)
|
||||
// General
|
||||
#if ETK_DEBUG_LEVEL > 0
|
||||
# define TK_WARNING(data) ETK_WARNING(etkLibName, data)
|
||||
# define TK_ERROR(data) ETK_ERROR(etkLibName, data)
|
||||
#else
|
||||
# define TK_WARNING(data) do {}while(0)
|
||||
# define TK_ERROR(data) do {}while(0)
|
||||
#endif
|
||||
|
||||
#if ETK_DEBUG_LEVEL > 1
|
||||
# define TK_INFO(data) ETK_INFO(etkLibName, data)
|
||||
#else
|
||||
# define TK_INFO(data) do {}while(0)
|
||||
#endif
|
||||
|
||||
#if ETK_DEBUG_LEVEL > 2
|
||||
# define TK_DEBUG(data) ETK_DEBUG(etkLibName, data)
|
||||
#else
|
||||
# define TK_DEBUG(data) do {}while(0)
|
||||
#endif
|
||||
|
||||
#define TK_ASSERT(cond, data) ETK_ASSERT(etkLibName, cond, data)
|
||||
|
||||
#if ETK_DEBUG_LEVEL > 1
|
||||
# define TK_CHECK_INOUT(cond) ETK_CHECK_INOUT_ASSERT(etkLibName, cond)
|
||||
#elif ETK_DEBUG_LEVEL > 0
|
||||
# define TK_CHECK_INOUT(cond) ETK_CHECK_INOUT_WARNING(etkLibName, cond)
|
||||
#else
|
||||
# define TK_CHECK_INOUT(cond) do { } while (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,244 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkFile.cpp
|
||||
* @brief Ewol Tool Kit : File folder and name abstraction (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 16/07/2011
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include <etkTypes.h>
|
||||
#include <etkFile.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "etk::File"
|
||||
|
||||
|
||||
std::ostream& etk::operator <<(std::ostream &os, const etk::File &obj)
|
||||
{
|
||||
os << obj.m_folder;
|
||||
os << "/";
|
||||
os << obj.m_shortFilename;
|
||||
return os;
|
||||
}
|
||||
|
||||
etk::File::File(etk::String &filename, int32_t LineNumber)
|
||||
{
|
||||
m_lineNumberOpen = LineNumber;
|
||||
SetCompleateName(filename);
|
||||
}
|
||||
|
||||
|
||||
etk::File::File(const char *filename, int32_t LineNumber)
|
||||
{
|
||||
etk::String tmpString = filename;
|
||||
m_lineNumberOpen = LineNumber;
|
||||
SetCompleateName(tmpString);
|
||||
}
|
||||
|
||||
|
||||
etk::File::File(etk::String &filename, etk::String &folder, int32_t lineNumber)
|
||||
{
|
||||
etk::String tmpString = folder;
|
||||
tmpString += '/';
|
||||
tmpString += filename;
|
||||
SetCompleateName(tmpString);
|
||||
m_lineNumberOpen = lineNumber;
|
||||
}
|
||||
|
||||
etk::File::~File(void)
|
||||
{
|
||||
// nothing to do ...
|
||||
}
|
||||
|
||||
|
||||
etk::String etk::File::GetFolder(void) const
|
||||
{
|
||||
return m_folder;
|
||||
}
|
||||
|
||||
etk::String etk::File::GetShortFilename(void) const
|
||||
{
|
||||
return m_shortFilename;
|
||||
}
|
||||
|
||||
etk::String etk::File::GetCompleateName(void) const
|
||||
{
|
||||
etk::String out;
|
||||
out = m_folder;
|
||||
out += '/';
|
||||
out += m_shortFilename;
|
||||
return out;
|
||||
}
|
||||
|
||||
const etk::File& etk::File::operator= (const etk::File &etkF )
|
||||
{
|
||||
if( this != &etkF ) // avoid copy to itself
|
||||
{
|
||||
m_folder = etkF.m_folder;
|
||||
m_shortFilename = etkF.m_shortFilename;
|
||||
m_lineNumberOpen = etkF.m_lineNumberOpen;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
bool etk::File::operator== (const etk::File &etkF) const
|
||||
{
|
||||
if( this != &etkF ) {
|
||||
if (etkF.GetCompleateName() == GetCompleateName() ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
bool etk::File::operator!= (const etk::File &etkF) const
|
||||
{
|
||||
return !(*this == etkF);
|
||||
}
|
||||
|
||||
|
||||
void etk::File::SetCompleateName(etk::String &newFilename)
|
||||
{
|
||||
char buf[MAX_FILE_NAME];
|
||||
memset(buf, 0, MAX_FILE_NAME);
|
||||
char * ok;
|
||||
// Reset ALL DATA :
|
||||
m_folder = "";
|
||||
m_shortFilename = "";
|
||||
m_lineNumberOpen = 0;
|
||||
TK_DEBUG("1 :Set Name : " << newFilename );
|
||||
etk::String destFilename;
|
||||
if (newFilename.Size() == 0) {
|
||||
destFilename = "no-name";
|
||||
} else {
|
||||
destFilename = newFilename;
|
||||
}
|
||||
TK_DEBUG("2 : Get file Name : " << destFilename );
|
||||
if ('/' != *destFilename.c_str()) {
|
||||
// Get the command came from the running of the program :
|
||||
char cCurrentPath[FILENAME_MAX];
|
||||
if (!getcwd(cCurrentPath, FILENAME_MAX)) {
|
||||
return;
|
||||
}
|
||||
cCurrentPath[FILENAME_MAX - 1] = '\0';
|
||||
etk::String tmpFilename = destFilename;
|
||||
destFilename = cCurrentPath;
|
||||
destFilename += '/';
|
||||
destFilename += tmpFilename;
|
||||
}
|
||||
TK_DEBUG("3 : Get file Name : " << destFilename );
|
||||
|
||||
// Get the real Path of the current File
|
||||
ok = realpath(destFilename.c_str(), buf);
|
||||
if (!ok) {
|
||||
int32_t lastPos = destFilename.FindBack('/');
|
||||
if (-1 != lastPos) {
|
||||
// Get the FileName
|
||||
etk::String tmpFilename = destFilename.Extract(lastPos+1);
|
||||
destFilename.Remove(lastPos, destFilename.Size() - lastPos);
|
||||
TK_DEBUG("try to find :\"" << destFilename << "\" / \"" << tmpFilename << "\" ");
|
||||
ok = realpath(destFilename.c_str(), buf);
|
||||
if (!ok) {
|
||||
TK_ERROR("Can not find real Path name of \"" << destFilename << "\"");
|
||||
m_shortFilename = tmpFilename;
|
||||
m_folder = destFilename;
|
||||
} else {
|
||||
// ALL is OK ...
|
||||
m_shortFilename = tmpFilename;
|
||||
m_folder = destFilename;
|
||||
}
|
||||
} else {
|
||||
TK_WARNING("file : \"" << destFilename << "\" ==> No data???");
|
||||
// Basic ERROR ...
|
||||
m_shortFilename = destFilename;
|
||||
}
|
||||
} else {
|
||||
destFilename = buf;
|
||||
int32_t lastPos = destFilename.FindBack('/');
|
||||
if (-1 != lastPos) {
|
||||
m_shortFilename = destFilename.Extract(lastPos+1);
|
||||
m_folder = destFilename.Extract(0, lastPos);
|
||||
} else {
|
||||
// Basic ERROR ...
|
||||
TK_WARNING("file : \"" << destFilename << "\" ==> No data???");
|
||||
m_shortFilename = destFilename;
|
||||
}
|
||||
}
|
||||
TK_DEBUG("Set FileName :\"" << m_folder << "\" / \"" << m_shortFilename << "\" ");
|
||||
}
|
||||
|
||||
int32_t etk::File::GetLineNumber(void)
|
||||
{
|
||||
return m_lineNumberOpen;
|
||||
}
|
||||
|
||||
void etk::File::SetLineNumber(int32_t newline)
|
||||
{
|
||||
m_lineNumberOpen = newline;
|
||||
}
|
||||
|
||||
bool etk::File::HasExtention(void)
|
||||
{
|
||||
int32_t lastPos = m_shortFilename.FindBack('.');
|
||||
if( -1 != lastPos // not find the .
|
||||
&& 0 != lastPos // Find a . at the fist position .jdlskjdfklj ==> hiden file
|
||||
&& m_shortFilename.Size() != lastPos ) // Remove file ended with .
|
||||
{
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
etk::String etk::File::GetExtention(void)
|
||||
{
|
||||
etk::String tmpExt = "";
|
||||
int32_t lastPos = m_shortFilename.FindBack('.');
|
||||
if( -1 != lastPos // not find the .
|
||||
&& 0 != lastPos // Find a . at the fist position .jdlskjdfklj ==> hiden file
|
||||
&& m_shortFilename.Size() != lastPos ) // Remove file ended with .
|
||||
{
|
||||
// Get the FileName
|
||||
tmpExt = m_shortFilename.Extract(lastPos+1);
|
||||
}
|
||||
return tmpExt;
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkFile.h
|
||||
* @brief Ewol Tool Kit : File folder and name abstraction (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 16/07/2011
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __ETK_FILE_H__
|
||||
#define __ETK_FILE_H__
|
||||
|
||||
#include <etkString.h>
|
||||
|
||||
#define MAX_FILE_NAME (10240)
|
||||
|
||||
namespace etk
|
||||
{
|
||||
class File
|
||||
{
|
||||
public:
|
||||
File(void) { m_lineNumberOpen=0; }
|
||||
File(etk::String &filename, int32_t LineNumber = 0);
|
||||
File(const char *filename, int32_t LineNumber = 0);
|
||||
File(etk::String &filename, etk::String &folder, int32_t lineNumber = 0);
|
||||
~File(void);
|
||||
etk::String GetFolder(void) const;
|
||||
etk::String GetShortFilename(void) const;
|
||||
etk::String GetCompleateName(void) const;
|
||||
bool HasExtention(void);
|
||||
etk::String GetExtention(void);
|
||||
int32_t GetLineNumber(void);
|
||||
void SetLineNumber(int32_t newline);
|
||||
void SetCompleateName(etk::String &newFilename);
|
||||
|
||||
const etk::File& operator= (const etk::File &etkF );
|
||||
bool operator== (const etk::File &etkF ) const;
|
||||
bool operator!= (const etk::File &etkF ) const;
|
||||
friend std::ostream& operator <<( std::ostream &os,const etk::File &obj);
|
||||
|
||||
private :
|
||||
etk::String m_folder;
|
||||
etk::String m_shortFilename;
|
||||
int32_t m_lineNumberOpen;
|
||||
};
|
||||
|
||||
std::ostream& operator <<(std::ostream &os, const etk::File &obj);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,51 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkMemory.cpp
|
||||
* @brief Ewol Tool Kit : Memory implementation (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 19/10/2011
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <etkTypes.h>
|
||||
#include <etkMemory.h>
|
||||
|
||||
// General
|
||||
#if ETK_MEMORY_CHECKER > 0
|
||||
|
||||
void etk::MemFree( void * pointerData, const char * variableName, const char * functionName, int32_t line, const char * fileName )
|
||||
{
|
||||
TK_CRITICAL(" MEM FREE is not written ==> TODO...");
|
||||
if (NULL != pointerData) {
|
||||
free(pointerData);
|
||||
}
|
||||
}
|
||||
|
||||
void * etk::MemMalloc( size_t num, size_t size, uint8_t init, const char * variableName, const char * functionName, int32_t line, const char * fileName )
|
||||
{
|
||||
TK_CRITICAL(" MEM ALLOCATOR is not written ==> TODO...");
|
||||
return calloc(num, size);
|
||||
}
|
||||
|
||||
void etk::MemShowLogs( void )
|
||||
{
|
||||
TK_CRITICAL(" MEM DISPLAY is not written ==> TODO...");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,94 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkMemory.h
|
||||
* @brief Ewol Tool Kit : Memory implementation (headers)
|
||||
* @author Edouard DUPIN
|
||||
* @date 12/01/2011
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __TOOLS_MEMORY_H__
|
||||
#define __TOOLS_MEMORY_H__
|
||||
|
||||
|
||||
|
||||
// General
|
||||
#if ETK_MEMORY_CHECKER > 0
|
||||
namespace etk {
|
||||
void MemFree( void * pointerData, const char * variableName, const char * functionName, int32_t line, const char * fileName );
|
||||
void * MemMalloc( size_t num, size_t size, uint8_t init, const char * variableName, const char * functionName, int32_t line, const char * fileName );
|
||||
void MemShowLogs( void );
|
||||
};
|
||||
# define ETK_MALLOC(pointerData, nbElements, dataType) do { \
|
||||
pointerData = (dataType *)etk::MemMalloc( (nbElements), sizeof(dataType), 0, #pointerData, __func__, __LINE__, __FILE__); \
|
||||
}while(0)
|
||||
# define ETK_MALLOC_CAST(pointerData, nbElements, dataType, cast) do { \
|
||||
pointerData = (cast)etk::MemMalloc( (nbElements), sizeof(dataType), 0, #pointerData, __func__, __LINE__, __FILE__); \
|
||||
}while(0)
|
||||
# define ETK_CALLOC(pointerData, nbElements, dataType) do { \
|
||||
pointerData = (dataType *)etk::MemMalloc( (nbElements), sizeof(dataType), 1, #pointerData, __func__, __LINE__, __FILE__); \
|
||||
}while(0)
|
||||
# define ETK_CALLOC_CAST(pointerData, nbElements, dataType, cast) do { \
|
||||
pointerData = (cast)etk::MemMalloc( (nbElements), sizeof(dataType), 1, #pointerData, __func__, __LINE__, __FILE__); \
|
||||
}while(0)
|
||||
# define ETK_FREE(pointerData) do { \
|
||||
etk::MemFree( (pointerData) , #pointerData, __func__, __LINE__, __FILE__); \
|
||||
(pointerData) = NULL; \
|
||||
}while(0)
|
||||
# define ETK_MEM_SHOW_LOG() do { \
|
||||
etk::MemShowLogs(); \
|
||||
}while(0)
|
||||
#else
|
||||
|
||||
# define ETK_MALLOC(pointerData, nbElements, dataType) do { \
|
||||
(pointerData) = (dataType *)malloc( (nbElements) * sizeof(dataType) ); \
|
||||
}while(0)
|
||||
|
||||
# define ETK_MALLOC_CAST(pointerData, nbElements, dataType, cast) do { \
|
||||
(pointerData) = (cast)malloc( (nbElements) * sizeof(dataType) ); \
|
||||
}while(0)
|
||||
|
||||
# define ETK_CALLOC(pointerData, nbElements, dataType) do { \
|
||||
(pointerData) = (dataType *)calloc( (nbElements), sizeof(dataType) ); \
|
||||
}while(0)
|
||||
|
||||
# define ETK_CALLOC_CAST(pointerData, nbElements, dataType, cast) do { \
|
||||
(pointerData) = (cast)calloc( (nbElements), sizeof(dataType) ); \
|
||||
}while(0)
|
||||
|
||||
# define ETK_REALLOC(pointerData, nbElements, dataType) do { \
|
||||
(pointerData) = (dataType *)realloc( (pointerData), (nbElements)* sizeof(dataType) ); \
|
||||
}while(0)
|
||||
|
||||
# define ETK_REALLOC_CAST(pointerData, nbElements, dataType, cast) do { \
|
||||
(pointerData) = (cast)realloc( (pointerData), (nbElements) * sizeof(dataType) ); \
|
||||
}while(0)
|
||||
|
||||
# define ETK_FREE(pointerData) do { \
|
||||
free( pointerData ); \
|
||||
(pointerData) = NULL; \
|
||||
}while(0)
|
||||
|
||||
# define ETK_MEM_SHOW_LOG() do { \
|
||||
TK_DEBUG("No Memory check availlable"); \
|
||||
}while(0)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,484 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkExp.cpp
|
||||
* @brief Ewol Tool Kit : Regular expression annalyser (sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 04/04/2011
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <etkRegExp.h>
|
||||
|
||||
|
||||
|
||||
const etk::convertionTable_ts etk::constConvertionTable[] = {
|
||||
// haveBackSlash, inputValue, newValue
|
||||
{ false , '(' , REGEXP_OPCODE_PTHESE_IN},
|
||||
{ true , '(' , (int16_t)'('},
|
||||
{ false , ')' , REGEXP_OPCODE_PTHESE_OUT},
|
||||
{ true , ')' , (int16_t)')'},
|
||||
{ false , '[' , REGEXP_OPCODE_BRACKET_IN},
|
||||
{ true , '[' , (int16_t)'['},
|
||||
{ false , ']' , REGEXP_OPCODE_BRACKET_OUT},
|
||||
{ true , ']' , (int16_t)']'},
|
||||
{ false , '{' , REGEXP_OPCODE_BRACE_IN},
|
||||
{ true , '{' , (int16_t)'{'},
|
||||
{ false , '}' , REGEXP_OPCODE_BRACE_OUT},
|
||||
{ true , '}' , (int16_t)'}'},
|
||||
{ false , '-' , REGEXP_OPCODE_TO},
|
||||
{ true , '-' , (int16_t)'-'},
|
||||
{ false , '*' , REGEXP_OPCODE_STAR},
|
||||
{ true , '*' , (int16_t)'*'},
|
||||
{ false , '.' , REGEXP_OPCODE_DOT},
|
||||
{ true , '.' , (int16_t)'.'},
|
||||
{ false , '?' , REGEXP_OPCODE_QUESTION},
|
||||
{ true , '?' , (int16_t)'?'},
|
||||
{ false , '+' , REGEXP_OPCODE_PLUS},
|
||||
{ true , '+' , (int16_t)'+'},
|
||||
{ false , '|' , REGEXP_OPCODE_PIPE},
|
||||
{ true , '|' , (int16_t)'|'},
|
||||
{ false , '^' , REGEXP_OPCODE_START_OF_LINE},
|
||||
{ true , '^' , (int16_t)'^'},
|
||||
{ false , '$' , REGEXP_OPCODE_END_OF_LINE},
|
||||
{ true , '$' , (int16_t)'$'},
|
||||
{ true , 'd' , REGEXP_OPCODE_DIGIT},
|
||||
{ true , 'D' , REGEXP_OPCODE_DIGIT_NOT},
|
||||
{ true , 'l' , REGEXP_OPCODE_LETTER},
|
||||
{ true , 'L' , REGEXP_OPCODE_LETTER_NOT},
|
||||
{ true , 's' , REGEXP_OPCODE_SPACE},
|
||||
{ true , 'S' , REGEXP_OPCODE_SPACE_NOT},
|
||||
{ true , 'w' , REGEXP_OPCODE_WORD},
|
||||
{ true , 'W' , REGEXP_OPCODE_WORD_NOT},
|
||||
{ true , 'a' , (int16_t)'\a'},
|
||||
{ true , 'b' , (int16_t)'\b'},
|
||||
{ true , 'e' , 0x001B}, // Escape character <Esc>
|
||||
{ true , 'f' , (int16_t)'\f'},
|
||||
{ true , 'n' , (int16_t)'\n'},
|
||||
{ true , 'r' , (int16_t)'\r'},
|
||||
{ true , 't' , (int16_t)'\t'},
|
||||
{ true , 'v' , (int16_t)'\v'},
|
||||
{ true , '\\' , (int16_t)'\\'},
|
||||
{ true , '&' , (int16_t)'&'},
|
||||
{ true , '0' , (int16_t)'\0'},
|
||||
{ true , '@' , REGEXP_OPCODE_NO_CHAR},
|
||||
};
|
||||
const int32_t etk::constConvertionTableSize = sizeof(etk::constConvertionTable) / sizeof(etk::convertionTable_ts) ;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Display the internal data of a node
|
||||
*
|
||||
* @param[in] data element do display in the console
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void etk::DisplayData(etk::VectorType<char> &data)
|
||||
{
|
||||
int32_t i;
|
||||
for (i=0; i<(int32_t)data.Size() ; i++) {
|
||||
std::cout<< (char)(data[i]&0x00FF );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Display of a part of the Regexp element
|
||||
*
|
||||
* @param[in] data Vector where data is constain
|
||||
* @param[in] start Position where the display might start
|
||||
* @param[in] stop Position where the display might stop
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void etk::DisplayElem(etk::VectorType<int16_t> &data, int32_t start, int32_t stop)
|
||||
{
|
||||
int32_t i;
|
||||
std::cout<< ETK_BASH_COLOR_NORMAL;
|
||||
for (i=start; i<(int32_t)data.Size() && i<stop ; i++) {
|
||||
switch(data[i])
|
||||
{
|
||||
case REGEXP_OPCODE_PTHESE_IN: std::cout<<ETK_BASH_COLOR_RED << (char*)"(" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_PTHESE_OUT: std::cout<<ETK_BASH_COLOR_RED << (char*)")" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_BRACKET_IN: std::cout<<ETK_BASH_COLOR_YELLOW << (char*)"[" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_BRACKET_OUT: std::cout<<ETK_BASH_COLOR_YELLOW << (char*)"]" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_TO: std::cout<<ETK_BASH_COLOR_YELLOW << (char*)"-" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_BRACE_IN: std::cout<<ETK_BASH_COLOR_GREEN << (char*)"{" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_BRACE_OUT: std::cout<<ETK_BASH_COLOR_GREEN << (char*)"}" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_STAR: std::cout<<ETK_BASH_COLOR_BLUE << (char*)"*" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_DOT: std::cout<<ETK_BASH_COLOR_BLUE << (char*)"." << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_QUESTION: std::cout<<ETK_BASH_COLOR_BLUE << (char*)"?" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_PLUS: std::cout<<ETK_BASH_COLOR_BLUE << (char*)"+" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_PIPE: std::cout<<ETK_BASH_COLOR_BLUE << (char*)"|" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_NO_CHAR: std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"@" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_START_OF_LINE: std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"^" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_END_OF_LINE: std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"$" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_DIGIT: std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"\\d" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_DIGIT_NOT: std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"\\D" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_LETTER: std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"\\l" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_LETTER_NOT: std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"\\L" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_SPACE: std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"\\s" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_SPACE_NOT: std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"\\S" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_WORD: std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"\\w" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case REGEXP_OPCODE_WORD_NOT: std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"\\W" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case '\n': std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"\\n" << ETK_BASH_COLOR_NORMAL; break;
|
||||
case '\t': std::cout<<ETK_BASH_COLOR_MAGENTA << (char*)"\\t" << ETK_BASH_COLOR_NORMAL; break;
|
||||
default: std::cout<< (char)(data[i]&0x00FF ); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
char * etk::levelSpace(int32_t level)
|
||||
{
|
||||
switch(level)
|
||||
{
|
||||
case 0: return (char*)"";
|
||||
case 1: return (char*)" ";
|
||||
case 2: return (char*)" ";
|
||||
case 3: return (char*)" ";
|
||||
case 4: return (char*)" ";
|
||||
case 5: return (char*)" ";
|
||||
case 6: return (char*)" ";
|
||||
case 7: return (char*)" ";
|
||||
case 8: return (char*)" ";
|
||||
case 9: return (char*)" ";
|
||||
case 10: return (char*)" ";
|
||||
case 11: return (char*)" ";
|
||||
case 12: return (char*)" ";
|
||||
case 13: return (char*)" ";
|
||||
case 14: return (char*)" ";
|
||||
case 15: return (char*)" ";
|
||||
case 16: return (char*)" ";
|
||||
default: return (char*)" ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t etk::GetLenOfPTheseElem(etk::VectorType<int16_t> &data, int32_t startPos)
|
||||
{
|
||||
int32_t pos = startPos;
|
||||
int32_t nbOpen = 0;
|
||||
// special case of the (...) or | ==> we search '|' or ')'
|
||||
if( REGEXP_OPCODE_PTHESE_OUT == data[pos]
|
||||
|| REGEXP_OPCODE_PIPE == data[pos]) {
|
||||
return 0;
|
||||
}
|
||||
// find size ...
|
||||
while (pos < (int32_t)data.Size() ) {
|
||||
if(REGEXP_OPCODE_PTHESE_IN == data[pos]) {
|
||||
// find a sub section :
|
||||
nbOpen++;
|
||||
} else if(0 < nbOpen) {
|
||||
if (REGEXP_OPCODE_PTHESE_OUT == data[pos])
|
||||
{
|
||||
nbOpen--;
|
||||
if (0 > nbOpen) {
|
||||
TK_ERROR("Error in the (...) find element at "<< pos);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
} else if( REGEXP_OPCODE_PTHESE_OUT == data[pos]
|
||||
|| REGEXP_OPCODE_PIPE == data[pos])
|
||||
{
|
||||
// Find the end of the (...)
|
||||
// just return the size inside
|
||||
int32_t sizeInside = pos - startPos;
|
||||
if (0 >= sizeInside) {
|
||||
TK_ERROR("Error in the (...) no data at "<< pos-1);
|
||||
return -1;
|
||||
} else {
|
||||
return sizeInside;
|
||||
}
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
return pos - startPos;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t etk::GetLenOfPThese(etk::VectorType<int16_t> &data, int32_t startPos)
|
||||
{
|
||||
int32_t pos = startPos;
|
||||
int32_t nbOpen = 0;
|
||||
// special case of the (...) or | ==> we search '|' or ')'
|
||||
if( REGEXP_OPCODE_PTHESE_OUT == data[pos]) {
|
||||
return 0;
|
||||
} else if( REGEXP_OPCODE_PTHESE_IN == data[pos])
|
||||
{
|
||||
pos++;
|
||||
// find size ...
|
||||
while (pos < (int32_t)data.Size() ) {
|
||||
if(REGEXP_OPCODE_PTHESE_IN == data[pos]) {
|
||||
// find a sub section :
|
||||
nbOpen++;
|
||||
} else if(0 < nbOpen) {
|
||||
if (REGEXP_OPCODE_PTHESE_OUT == data[pos])
|
||||
{
|
||||
nbOpen--;
|
||||
if (0 > nbOpen) {
|
||||
TK_ERROR("Error in the (...) find element at "<< pos);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
} else if( REGEXP_OPCODE_PTHESE_OUT == data[pos])
|
||||
{
|
||||
// Find the end of the (...)
|
||||
// just return the size inside
|
||||
int32_t sizeInside = pos - startPos-1;
|
||||
if (0 >= sizeInside) {
|
||||
TK_ERROR("Error in the (...) no data at "<< pos-1);
|
||||
return -1;
|
||||
} else {
|
||||
return sizeInside;
|
||||
}
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t etk::GetLenOfBracket(etk::VectorType<int16_t> &data, int32_t startPos)
|
||||
{
|
||||
int32_t pos = startPos;
|
||||
// special case of the (...) or | ==> we search '|' or ')'
|
||||
if( REGEXP_OPCODE_BRACKET_OUT == data[pos]) {
|
||||
return 0;
|
||||
} else if( REGEXP_OPCODE_BRACKET_IN == data[pos]) {
|
||||
pos++;
|
||||
// find size ...
|
||||
while (pos < (int32_t)data.Size() ) {
|
||||
if(REGEXP_OPCODE_BRACKET_OUT == data[pos]) {
|
||||
// Find the end of the [...]
|
||||
// just return the size inside
|
||||
int32_t sizeInside = pos - startPos -1 ;
|
||||
if (0 >= sizeInside) {
|
||||
TK_ERROR("Error in the [...] no data at "<< pos-1);
|
||||
return sizeInside;
|
||||
} else {
|
||||
return sizeInside;
|
||||
}
|
||||
} else if( REGEXP_OPCODE_TO != data[pos]
|
||||
&& ( 0 > data[pos]
|
||||
|| 0xFF < data[pos]) )
|
||||
{
|
||||
TK_ERROR("Error in the [...] not permited element at "<< pos << " '" << (char)data[pos] << "'");
|
||||
return false;
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t etk::GetLenOfBrace(etk::VectorType<int16_t> &data, int32_t startPos)
|
||||
{
|
||||
int32_t pos = startPos;
|
||||
// special case of the (...) or | ==> we search '|' or ')'
|
||||
if( REGEXP_OPCODE_BRACE_OUT == data[pos]) {
|
||||
return 0;
|
||||
} else if( REGEXP_OPCODE_BRACE_IN == data[pos]) {
|
||||
pos++;
|
||||
// find size ...
|
||||
while (pos < (int32_t)data.Size() ) {
|
||||
if(REGEXP_OPCODE_BRACE_OUT == data[pos]) {
|
||||
// Find the end of the [...]
|
||||
// just return the size inside
|
||||
int32_t sizeInside = pos - startPos -1 ;
|
||||
if (0 >= sizeInside) {
|
||||
TK_ERROR("Error in the {...} no data at "<< pos-1);
|
||||
return sizeInside;
|
||||
} else {
|
||||
return sizeInside;
|
||||
}
|
||||
} else if( ',' != data[pos]
|
||||
&& ( '0' > data[pos]
|
||||
|| '9' < data[pos]) )
|
||||
{
|
||||
TK_ERROR("Error in the {...} not permited element at "<< pos << " '" << (char)data[pos] << "'");
|
||||
return false;
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t etk::GetLenOfNormal(etk::VectorType<int16_t> &data, int32_t startPos)
|
||||
{
|
||||
int32_t pos = startPos;
|
||||
|
||||
// find size ...
|
||||
while (pos < (int32_t)data.Size() ) {
|
||||
switch(data[pos])
|
||||
{
|
||||
case REGEXP_OPCODE_PTHESE_IN:
|
||||
case REGEXP_OPCODE_PTHESE_OUT:
|
||||
case REGEXP_OPCODE_BRACKET_IN:
|
||||
case REGEXP_OPCODE_BRACKET_OUT:
|
||||
case REGEXP_OPCODE_BRACE_IN:
|
||||
case REGEXP_OPCODE_BRACE_OUT:
|
||||
case REGEXP_OPCODE_TO:
|
||||
case REGEXP_OPCODE_STAR:
|
||||
case REGEXP_OPCODE_DOT:
|
||||
case REGEXP_OPCODE_QUESTION:
|
||||
case REGEXP_OPCODE_PLUS:
|
||||
case REGEXP_OPCODE_PIPE:
|
||||
case REGEXP_OPCODE_START_OF_LINE:
|
||||
case REGEXP_OPCODE_END_OF_LINE:
|
||||
case REGEXP_OPCODE_DIGIT:
|
||||
case REGEXP_OPCODE_DIGIT_NOT:
|
||||
case REGEXP_OPCODE_LETTER:
|
||||
case REGEXP_OPCODE_LETTER_NOT:
|
||||
case REGEXP_OPCODE_SPACE:
|
||||
case REGEXP_OPCODE_SPACE_NOT:
|
||||
case REGEXP_OPCODE_WORD:
|
||||
case REGEXP_OPCODE_WORD_NOT:
|
||||
{
|
||||
// just return the size inside
|
||||
int32_t sizeInside = pos - startPos;
|
||||
if (0 >= sizeInside) {
|
||||
TK_ERROR("Error in the normal data : no data ...");
|
||||
}
|
||||
return sizeInside;
|
||||
}
|
||||
break;
|
||||
default :
|
||||
// nothing to do ...
|
||||
break;
|
||||
}
|
||||
pos++;
|
||||
}
|
||||
return pos - startPos ;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
bool etk::ParseBrace(etk::VectorType<int16_t> &data, int32_t &min, int32_t &max)
|
||||
{
|
||||
//TK_INFO("parse {...} in "; DisplayElem(data); );
|
||||
int32_t k=0;
|
||||
|
||||
int32_t firstElement = 0;
|
||||
int32_t SecondElement = 0;
|
||||
|
||||
while(k<data.Size()) {
|
||||
if (',' == (char)data[k]) {
|
||||
k++;
|
||||
break;
|
||||
} if ('}' == (char)data[k]) {
|
||||
SecondElement = firstElement;
|
||||
goto allIsSet;
|
||||
} else if ('0' <= (char)data[k] && '9' >= (char)data[k]) {
|
||||
firstElement *=10;
|
||||
firstElement += (char)data[k] - '0';
|
||||
} else {
|
||||
TK_ERROR("Can not parse this element " << (char)data[k] << " at pos " << k);
|
||||
return false;
|
||||
}
|
||||
k++;
|
||||
}
|
||||
if (k==data.Size()) {
|
||||
SecondElement = firstElement;
|
||||
}
|
||||
while(k<data.Size()) {
|
||||
if (',' == (char)data[k]) {
|
||||
TK_ERROR("Can not find a second , in {} at pos " << k);
|
||||
return false;
|
||||
} if ('}' == (char)data[k]) {
|
||||
goto allIsSet;
|
||||
} else if ('0' <= (char)data[k] && '9' >= (char)data[k]) {
|
||||
SecondElement *=10;
|
||||
SecondElement += (char)data[k] - '0';
|
||||
} else {
|
||||
TK_ERROR("Can not parse this element " << (char)data[k] << " at pos " << k);
|
||||
return false;
|
||||
}
|
||||
k++;
|
||||
}
|
||||
|
||||
allIsSet:
|
||||
if (SecondElement == 0 && firstElement != 0) {
|
||||
min = 0;
|
||||
max = firstElement;
|
||||
} else {
|
||||
min = firstElement;
|
||||
max = SecondElement;
|
||||
}
|
||||
if (min > max) {
|
||||
TK_ERROR("Minimum=" << min << " can not be < maximum=" << max );
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1,70 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkSingleton.h
|
||||
* @brief ewol : singleton system class
|
||||
* @author Edouard DUPIN
|
||||
* @date 04/12/2010
|
||||
* @par Project
|
||||
* ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __ETK_SINGLETON_H__
|
||||
#define __ETK_SINGLETON_H__
|
||||
|
||||
|
||||
namespace etk {
|
||||
template <typename T>
|
||||
class Singleton
|
||||
{
|
||||
protected:
|
||||
// Constructeur/destructeur
|
||||
Singleton() { }
|
||||
~Singleton() { /*std::cout << "destroying singleton." << std::endl;*/ }
|
||||
|
||||
public:
|
||||
// Interface publique
|
||||
static T *Get()
|
||||
{
|
||||
if (NULL == _singleton)
|
||||
{
|
||||
_singleton = new T;
|
||||
}
|
||||
|
||||
return (static_cast<T*> (_singleton));
|
||||
}
|
||||
|
||||
static void Kill()
|
||||
{
|
||||
if (NULL != _singleton)
|
||||
{
|
||||
delete _singleton;
|
||||
_singleton = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
// Unique instance
|
||||
static T *_singleton;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
T *Singleton<T>::_singleton = NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,717 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkString.cpp
|
||||
* @brief Ewol Tool Kit : normal sting management... (sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 26/01/2011
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <etkString.h>
|
||||
#include <etkMemory.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "etk::String"
|
||||
|
||||
std::ostream& etk::operator <<(std::ostream &os, const etk::String &obj)
|
||||
{
|
||||
os << (char*)&obj.m_data[0];
|
||||
return os;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
etk::String::~String(void)
|
||||
{
|
||||
m_data.Clear();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
etk::String::String(void)
|
||||
{
|
||||
//TK_INFO("new etk::String()");
|
||||
m_data.Clear();
|
||||
m_data.PushBack('\0');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
etk::String::String(const char myInput)
|
||||
{
|
||||
m_data.Clear();
|
||||
m_data.PushBack(myInput);
|
||||
m_data.PushBack('\0');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
etk::String::String(const char* inputData, int32_t len)
|
||||
{
|
||||
m_data.Clear();
|
||||
m_data.PushBack('\0');
|
||||
Set(inputData, len);
|
||||
}
|
||||
|
||||
void etk::String::Set(const char * inputData, int32_t len)
|
||||
{
|
||||
// overwrite the len if needed :
|
||||
if ((-1) == len) {
|
||||
len = strlen(inputData);
|
||||
}
|
||||
|
||||
if (len != 0) {
|
||||
// remove the last '\0'
|
||||
m_data.PopBack();
|
||||
// copy the data ...
|
||||
m_data.PushBack((int8_t*)inputData, len);
|
||||
// add the last '\0'
|
||||
m_data.PushBack('\0');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
etk::String::String(int inputData)
|
||||
{
|
||||
char tmpVal[256];
|
||||
// generate the string :
|
||||
sprintf(tmpVal, "%d", inputData);
|
||||
// set the internal data :
|
||||
m_data.Clear();
|
||||
m_data.PushBack('\0');
|
||||
Set(tmpVal);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
etk::String::String(unsigned int inputData)
|
||||
{
|
||||
char tmpVal[256];
|
||||
// generate the string :
|
||||
sprintf(tmpVal, "%d", inputData);
|
||||
// set the internal data :
|
||||
m_data.Clear();
|
||||
m_data.PushBack('\0');
|
||||
Set(tmpVal);
|
||||
}
|
||||
|
||||
etk::String::String(const etk::String &etkS)
|
||||
{
|
||||
//etk_INFO("Constructeur de recopie");
|
||||
m_data = etkS.m_data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
const etk::String& etk::String::operator= (const etk::String &etkS )
|
||||
{
|
||||
//TK_INFO("OPERATOR de recopie");
|
||||
if( this != &etkS ) // avoid copy to itself
|
||||
{
|
||||
m_data = etkS.m_data;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
const etk::String& etk::String::operator= (const char * inputData)
|
||||
{
|
||||
m_data.Clear();
|
||||
m_data.PushBack('\0');
|
||||
// calculate the size :
|
||||
uint32_t len = strlen(inputData);
|
||||
// check the new size ...
|
||||
if (len > 0 ) {
|
||||
// copy all data :
|
||||
Set(inputData, len);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
const etk::String& etk::String::operator= (etk::VectorType<int8_t> inputData)
|
||||
{
|
||||
m_data = inputData;
|
||||
if (m_data.Size()>0) {
|
||||
if (m_data[m_data.Size()-1] != '\0') {
|
||||
m_data.PushBack('\0');
|
||||
}
|
||||
}
|
||||
//TK_DEBUG("m_dataLen="<<m_dataLen << " m_dataLenUTF8="<<m_dataLenUTF8 << " description=" << m_data);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
bool etk::String::operator== (const etk::String& etkS) const
|
||||
{
|
||||
if( this != &etkS ) {
|
||||
if (etkS.m_data.Size() != m_data.Size()) {
|
||||
//TK_DEBUG(" not the same size : " << etkS.m_data.Size() << "!=" << m_data.Size());
|
||||
return false;
|
||||
}
|
||||
for (int32_t iii= 0; iii<m_data.Size(); iii++) {
|
||||
//TK_DEBUG(" check : " << etkS.m_data[iii] << "!=" << m_data[iii]);
|
||||
if (etkS.m_data[iii]!= m_data[iii]){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
bool etk::String::operator== (const char * inputData) const
|
||||
{
|
||||
|
||||
// calculate the size :
|
||||
int32_t len = strlen(inputData);
|
||||
if (len+1 != m_data.Size()) {
|
||||
return false;
|
||||
}
|
||||
for (int32_t iii= 0; iii<m_data.Size(); iii++) {
|
||||
if (inputData[iii]!= m_data[iii]){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
bool etk::String::operator!= (const etk::String& etkS) const
|
||||
{
|
||||
return !(*this == etkS);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
bool etk::String::operator!= (const char * inputData) const
|
||||
{
|
||||
return !(*this == inputData);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
const etk::String& etk::String::operator+= (const etk::String &etkS)
|
||||
{
|
||||
if (0 < etkS.Size()) {
|
||||
// remove the last '\0'
|
||||
m_data.PopBack();
|
||||
// copy the data ...
|
||||
m_data += etkS.m_data;
|
||||
// This previous include the \0 in case of the 2 string are different...
|
||||
if( this == &etkS ) {
|
||||
// add the removed end string
|
||||
m_data.PushBack('\0');
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
const etk::String& etk::String::operator+= (const char * inputData)
|
||||
{
|
||||
//TK_INFO(" string(arg) : \"" << inputData << "\"");
|
||||
//TK_INFO(" string(direct) : \"" << m_data << "\"");
|
||||
int32_t len = strlen(inputData);
|
||||
|
||||
if (len != 0) {
|
||||
// remove the last '\0'
|
||||
m_data.PopBack();
|
||||
// copy the data ...
|
||||
m_data.PushBack((int8_t*)inputData, len+1 );
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
etk::String etk::String::operator+ (const etk::String &etkS)
|
||||
{
|
||||
etk::String temp;
|
||||
//TK_INFO(" string(arg) : \"" << etkS.m_data << "\"");
|
||||
//TK_INFO(" string(direct) : \"" << m_data << "\"");
|
||||
temp += *this;
|
||||
temp += etkS;
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
etk::String etk::String::operator+ (const char * inputData)
|
||||
{
|
||||
etk::String temp;
|
||||
//TK_INFO(" string(arg) : \"" << inputData << "\"");
|
||||
//TK_INFO(" string(direct) : \"" << m_data << "\"");
|
||||
temp += *this;
|
||||
temp += inputData;
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
bool etk::String::IsEmpty(void) const
|
||||
{
|
||||
if(1 >= m_data.Size() ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
int32_t etk::String::Size(void) const
|
||||
{
|
||||
if (m_data.Size() == 0) {
|
||||
return 0;
|
||||
} else {
|
||||
return m_data.Size() - 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
void etk::String::Add(int32_t currentID, const char* inputData)
|
||||
{
|
||||
// get the input lenght
|
||||
int32_t len = strlen(inputData);
|
||||
if (0 == len) {
|
||||
TK_WARNING("no data to add on the current string");
|
||||
return;
|
||||
} else if (currentID < 0) {
|
||||
TK_WARNING("Curent ID(" << currentID << ") < 0 ==> Add at the start");
|
||||
currentID = 0;
|
||||
} else if (currentID > Size() ) {
|
||||
TK_ERROR("Curent ID(" << currentID << ") > maxSize ... (" << Size() << ") ==> add at the end ...");
|
||||
m_data.PushBack((int8_t*)inputData, len);
|
||||
return;
|
||||
}
|
||||
m_data.Insert(currentID, (int8_t*)inputData, len);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out]
|
||||
*
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
void etk::String::Remove(int32_t currentID, int32_t len)
|
||||
{
|
||||
if (0 >= len) {
|
||||
TK_ERROR("no data to remove on the current string");
|
||||
return;
|
||||
}
|
||||
// TODO : check the size of the data
|
||||
m_data.EraseLen(currentID, len);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Remove all element in the string
|
||||
*
|
||||
* @param ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void etk::String::Clear(void)
|
||||
{
|
||||
m_data.Clear();
|
||||
m_data.PushBack('\0');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief find the first accurence after the position indicated
|
||||
*
|
||||
* @param[in] element Element that might be find in the string
|
||||
* @param[in] startPos Stert position to begin the search
|
||||
*
|
||||
* @return the position of the first occurence or -1 if not find...
|
||||
*
|
||||
*/
|
||||
int32_t etk::String::FindForward(const char element, int32_t startPos)
|
||||
{
|
||||
if (startPos < 0) {
|
||||
startPos = 0;
|
||||
} else if (startPos >= Size() ) {
|
||||
return -1;
|
||||
}
|
||||
for (int32_t iii=startPos; iii< Size(); iii++) {
|
||||
if (m_data[iii] == element) {
|
||||
return iii;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief find the first accurence before the position indicated.
|
||||
*
|
||||
* @param[in] element Element that might be find in the string
|
||||
* @param[in] startPos Stert position to begin the search
|
||||
*
|
||||
* @return the position of the first occurence begining by the end or -1 if not find...
|
||||
*
|
||||
*/
|
||||
int32_t etk::String::FindBack(const char element, int32_t startPos)
|
||||
{
|
||||
if (startPos < 0) {
|
||||
return -1;
|
||||
} else if (startPos >= Size() ) {
|
||||
startPos = Size();
|
||||
}
|
||||
for (int32_t iii=startPos; iii>=0; iii--) {
|
||||
if (m_data[iii] == element) {
|
||||
return iii;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Extract data from the data between two position
|
||||
*
|
||||
* @param[in] posStart Start position where to extract data
|
||||
* @param[in] posEnd End position where to extract data
|
||||
*
|
||||
* @return the extracted string
|
||||
*
|
||||
*/
|
||||
etk::String etk::String::Extract(int32_t posStart, int32_t posEnd)
|
||||
{
|
||||
etk::String out;
|
||||
if (posStart < 0) {
|
||||
posStart = 0;
|
||||
} else if (posStart >= Size() ) {
|
||||
return out;
|
||||
}
|
||||
if (posEnd < 0) {
|
||||
return out;
|
||||
} else if (posEnd >= Size() ) {
|
||||
posEnd = Size();
|
||||
}
|
||||
out.m_data = m_data.Extract(posStart, posEnd);
|
||||
out.m_data.PushBack('\0');
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get a basic vector in int8 data with no \0 at the end of the string
|
||||
*
|
||||
* @param ---
|
||||
*
|
||||
* @return The desired vector with data
|
||||
*
|
||||
*/
|
||||
etk::VectorType<int8_t> etk::String::GetVector(void)
|
||||
{
|
||||
etk::VectorType<int8_t> out = m_data;
|
||||
out.PopBack();
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Unitary test for the string system
|
||||
*
|
||||
* @param ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void etk::TestUntaire_String(void)
|
||||
{
|
||||
TK_WARNING("*********************************************************");
|
||||
TK_WARNING("** Test Unitaire 'etkString' (START)");
|
||||
TK_WARNING("*********************************************************");
|
||||
|
||||
int32_t iddd = 0;
|
||||
etk::String * monString = new etk::String();
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << monString << "\"");
|
||||
delete(monString);
|
||||
|
||||
monString = new etk::String("test de direct data");
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << monString << "\"");
|
||||
delete(monString);
|
||||
|
||||
monString = new etk::String("test de direct data", 7);
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << monString << "\"");
|
||||
delete(monString);
|
||||
|
||||
int32_t testId = -6789;
|
||||
monString = new etk::String(testId);
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << monString << "\"");
|
||||
delete(monString);
|
||||
|
||||
uint32_t testId2 = 12345;
|
||||
monString = new etk::String((unsigned int)testId2);
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << monString << "\"");
|
||||
delete(monString);
|
||||
|
||||
etk::String plop = "otherString";
|
||||
monString = new etk::String(plop);
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << monString << "\"");
|
||||
delete(monString);
|
||||
|
||||
|
||||
etk::String s1 = "test de base ...";
|
||||
s1 += s1;
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << s1 << "\"");
|
||||
s1 += " plop 2 ";
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << s1 << "\"");
|
||||
s1 += plop;
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << s1 << "\"");
|
||||
s1 = plop;
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << s1 << "\"");
|
||||
s1 = "test direct 44";
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << s1 << "\"");
|
||||
etk::VectorType<int8_t> vb1;
|
||||
vb1.PushBack('v');
|
||||
vb1.PushBack('b');
|
||||
vb1.PushBack('1');
|
||||
s1 = vb1;
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << s1 << "\"");
|
||||
vb1.Clear();
|
||||
vb1.PushBack('v');
|
||||
vb1.PushBack('b');
|
||||
vb1.PushBack('2');
|
||||
vb1.PushBack('\0');
|
||||
s1 = vb1;
|
||||
TK_INFO("phase : " << iddd++ << " : \"" << s1 << "\"");
|
||||
|
||||
if (s1 == "vb2") {
|
||||
TK_INFO("phase : " << iddd++ << " : == OK");
|
||||
} else {
|
||||
TK_ERROR("phase : " << iddd++ << " : == ERROR");
|
||||
}
|
||||
|
||||
|
||||
if (s1 == "vb3") {
|
||||
TK_ERROR("phase : " << iddd++ << " : == ERROR");
|
||||
} else {
|
||||
TK_INFO("phase : " << iddd++ << " : == OK");
|
||||
}
|
||||
|
||||
|
||||
if (s1 != "vb3") {
|
||||
TK_INFO("phase : " << iddd++ << " : == OK");
|
||||
} else {
|
||||
TK_ERROR("phase : " << iddd++ << " : == ERROR");
|
||||
}
|
||||
|
||||
|
||||
if (s1 != "vb2") {
|
||||
TK_ERROR("phase : " << iddd++ << " : == ERROR");
|
||||
} else {
|
||||
TK_INFO("phase : " << iddd++ << " : == OK");
|
||||
}
|
||||
|
||||
|
||||
etk::String s2 = "vb2";
|
||||
etk::String s3 = "vb3";
|
||||
|
||||
if (s1 == s2) {
|
||||
TK_INFO("phase : " << iddd++ << " : == OK");
|
||||
} else {
|
||||
TK_ERROR("phase : " << iddd++ << " : == ERROR");
|
||||
}
|
||||
|
||||
|
||||
if (s1 == s3) {
|
||||
TK_ERROR("phase : " << iddd++ << " : == ERROR");
|
||||
} else {
|
||||
TK_INFO("phase : " << iddd++ << " : == OK");
|
||||
}
|
||||
|
||||
|
||||
if (s1 != s3) {
|
||||
TK_INFO("phase : " << iddd++ << " : == OK");
|
||||
} else {
|
||||
TK_ERROR("phase : " << iddd++ << " : == ERROR");
|
||||
}
|
||||
|
||||
|
||||
if (s1 != s2) {
|
||||
TK_ERROR("phase : " << iddd++ << " : == ERROR");
|
||||
} else {
|
||||
TK_INFO("phase : " << iddd++ << " : == OK");
|
||||
}
|
||||
TK_WARNING("*********************************************************");
|
||||
TK_WARNING("** Test Unitaire 'etkString' (STOP)");
|
||||
TK_WARNING("*********************************************************");
|
||||
}
|
||||
|
@ -1,93 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkString.h
|
||||
* @brief Ewol Tool Kit : normal sting management... (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 26/01/2011
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __ETK_STRING_H__
|
||||
#define __ETK_STRING_H__
|
||||
|
||||
#include <iostream>
|
||||
#include <etkVectorType.h>
|
||||
|
||||
namespace etk
|
||||
{
|
||||
class String
|
||||
{
|
||||
public:
|
||||
// Constructeurs
|
||||
String(void);
|
||||
String(const char myInput);
|
||||
String(const char* inputData, int32_t len = -1);//, bool noAllocation=false);
|
||||
void Set(const char* inputData, int32_t len=-1);
|
||||
// basic convertion integer en string
|
||||
String(int inputData);
|
||||
String(unsigned int inputData);
|
||||
//String(const wchar_t *inputData);
|
||||
String(const etk::String &etkS);
|
||||
// destructor :
|
||||
~String(void);
|
||||
|
||||
const etk::String& operator= (const etk::String &etkS ); // assigment
|
||||
const etk::String& operator= (const char * inputData);
|
||||
const etk::String& operator= (etk::VectorType<int8_t> inputData);
|
||||
bool operator== (const etk::String& etkS) const; // == operator
|
||||
bool operator== (const char * inputData) const;
|
||||
bool operator!= (const etk::String& etkS) const; // != operator
|
||||
bool operator!= (const char * inputData) const;
|
||||
const etk::String& operator+= (const etk::String &etkS); // += operator
|
||||
const etk::String& operator+= (const char * inputData);
|
||||
etk::String operator+ (const etk::String &etkS); // + operator
|
||||
etk::String operator+ (const char * inputData);
|
||||
//operator const char *()
|
||||
friend std::ostream& operator <<( std::ostream &os,const etk::String &obj);
|
||||
|
||||
bool IsEmpty(void) const;
|
||||
int32_t Size(void) const;
|
||||
|
||||
void Add(int32_t currentID, const char* inputData);
|
||||
void Remove(int32_t currentID, int32_t len);
|
||||
void Clear(void);
|
||||
|
||||
etk::VectorType<int8_t> GetVector(void);
|
||||
char * c_str(void) { return (char*)&m_data[0]; };
|
||||
|
||||
// Sting operation :
|
||||
int32_t FindForward(const char element, int32_t startPos=0);
|
||||
int32_t FindBack(const char element, int32_t startPos=0x7FFFFFFF);
|
||||
etk::String Extract(int32_t posStart=0, int32_t posEnd=0x7FFFFFFF);
|
||||
|
||||
private :
|
||||
etk::VectorType<int8_t> m_data;
|
||||
};
|
||||
|
||||
void TestUntaire_String(void);
|
||||
|
||||
std::ostream& operator <<(std::ostream &os, const etk::String &obj);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,72 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkTypes.h
|
||||
* @brief Ewol Tool Kit : generique define type
|
||||
* @author Edouard DUPIN
|
||||
* @date 08/06/2010
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __ETK_TYPES_H__
|
||||
#define __ETK_TYPES_H__
|
||||
|
||||
// includes system, malloc, EXIT_SUCCESS
|
||||
#include <stdlib.h>
|
||||
// includes fopen, fwrite, fseek, ftell
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
#ifndef __int8_t_defined
|
||||
# define __int8_t_defined
|
||||
typedef signed char int8_t;
|
||||
typedef signed short int int16_t;
|
||||
typedef int int32_t;
|
||||
typedef signed long long int int64_t;
|
||||
#endif
|
||||
|
||||
#ifndef __uint8_t_defined
|
||||
# define __uint8_t_defined
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short int uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#endif
|
||||
|
||||
#define etk_min(elemA, elemB) ((elemA)<(elemB)) ? (elemA) : (elemB)
|
||||
#define etk_max(elemA, elemB) ((elemA)<(elemB)) ? (elemB) : (elemA)
|
||||
#define etk_avg(minimim, elem, maximum) ((minimim)>(elem)) ? (minimim) : ((maximum)<(elem)) ? (maximum) : (elem)
|
||||
|
||||
extern "C"
|
||||
{
|
||||
struct etkPointAndPosition{
|
||||
double x;
|
||||
double y;
|
||||
};
|
||||
typedef etkPointAndPosition point_ts;
|
||||
typedef etkPointAndPosition position_ts;
|
||||
typedef etkPointAndPosition size_ts;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,509 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkVector.h
|
||||
* @brief Ewol Tool Kit : Basic etk::Vector (template)
|
||||
* @author Edouard DUPIN
|
||||
* @date 07/04/2011
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __ETK_VECTOR_H__
|
||||
#define __ETK_VECTOR_H__
|
||||
|
||||
#include <etkType.h>
|
||||
#include <etkMemory.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "etk::Vector"
|
||||
|
||||
/**
|
||||
* @brief etkVector classes ...
|
||||
*
|
||||
* @tparam[in] T The type of objects to store.
|
||||
* @tparam[in] INC Incrementation mode (0 : Exponential to 200 and increment by stemp of 200)
|
||||
*
|
||||
* @todo : Need to add : popBack / Assign / Insert / Erase / Swap / Clear
|
||||
*
|
||||
* m_data
|
||||
* ---------- |-----------------------|
|
||||
* | 0 |-------->| Class Data |
|
||||
* |--------| |-----------------------|
|
||||
* | 1 |----|
|
||||
* |--------| |
|
||||
* | 2 |====|==============| |-----------------------|
|
||||
* |--------| | --->| Class Data |
|
||||
* m_count | 3 |-| | |-----------------------|
|
||||
* |--------| | |
|
||||
* | x | | | |-----------------------|
|
||||
* |--------| | -------->| Class Data |
|
||||
* | x | | |-----------------------|
|
||||
* |--------| |
|
||||
* | x | |
|
||||
* |--------| | |-----------------------|
|
||||
* | x | --------------------->| Class Data |
|
||||
* |--------| |-----------------------|
|
||||
* | x |
|
||||
* |--------|
|
||||
* | x |
|
||||
* |--------|
|
||||
* m_size | x |
|
||||
* ----------
|
||||
*
|
||||
*/
|
||||
namespace rtk
|
||||
{
|
||||
|
||||
template<class T, int32_t INC=0> class Vector
|
||||
{
|
||||
public:
|
||||
class Iterator
|
||||
{
|
||||
// Private data :
|
||||
private:
|
||||
int32_t m_current; // curent Id on the vector
|
||||
etk::Vector<T> * m_Vector; // Pointer on the curent element of the vector
|
||||
public:
|
||||
/**
|
||||
* @brief Basic itarator constructor with no link with an Vector
|
||||
*/
|
||||
Iterator():
|
||||
m_current(-1),
|
||||
m_Vector(NULL)
|
||||
{
|
||||
// nothing to do ...
|
||||
}
|
||||
/**
|
||||
* @brief Recopy constructor on a specific Vector.
|
||||
* @param[in] otherIterator The Iterator that might be copy
|
||||
*/
|
||||
Iterator(const Iterator & otherIterator):
|
||||
m_current(otherIterator.m_current),
|
||||
m_Vector(otherIterator.m_Vector)
|
||||
{
|
||||
// nothing to do ...
|
||||
}
|
||||
/**
|
||||
* @brief Asignation operator.
|
||||
* @param[in] otherIterator The Iterator that might be copy
|
||||
* @return reference on the curent Iterator
|
||||
*/
|
||||
Iterator& operator=(const Iterator & otherIterator)
|
||||
{
|
||||
m_current = otherIterator.m_current;
|
||||
m_Vector = otherIterator.m_Vector;
|
||||
return *this;
|
||||
}
|
||||
/**
|
||||
* @brief Basic destructor
|
||||
*/
|
||||
~Iterator()
|
||||
{
|
||||
m_current = -1;
|
||||
m_Vector = NULL;
|
||||
}
|
||||
/**
|
||||
* @brief basic boolean cast
|
||||
* @return true if the element is present in the Vector size
|
||||
*/
|
||||
operator bool ()
|
||||
{
|
||||
if( 0 <= m_current
|
||||
&& m_current < m_etkVector->Size() )
|
||||
{
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @brief Incremental operator
|
||||
* @return Reference on the current iterator incremented
|
||||
*/
|
||||
Iterator& operator++ ()
|
||||
{
|
||||
if( NULL != m_etkVector
|
||||
&& m_current < m_etkVector->Size() )
|
||||
{
|
||||
m_current++;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
/**
|
||||
* @brief Decremental operator
|
||||
* @return Reference on the current iterator decremented
|
||||
*/
|
||||
Iterator& operator-- ()
|
||||
{
|
||||
if (m_current >= 0) {
|
||||
m_current--;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
/**
|
||||
* @brief Incremental operator
|
||||
* @return Reference on a new iterator and increment the other one
|
||||
*/
|
||||
Iterator operator++ (int32_t)
|
||||
{
|
||||
Iterator it(*this);
|
||||
++(*this);
|
||||
return it;
|
||||
}
|
||||
/**
|
||||
* @brief Decremental operator
|
||||
* @return Reference on a new iterator and decrement the other one
|
||||
*
|
||||
*/
|
||||
Iterator operator-- (int32_t)
|
||||
{
|
||||
Iterator it(*this);
|
||||
--(*this);
|
||||
return it;
|
||||
}
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
T * operator-> () const
|
||||
{
|
||||
TK_CHECK_INOUT(m_current >= 0 && m_current < m_etkVector->Size());
|
||||
return &m_etkVector->Get(m_current);
|
||||
}
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
T & operator* () const
|
||||
{
|
||||
TK_CHECK_INOUT(m_current >= 0 && m_current < m_etkVector->Size());
|
||||
return m_etkVector->Get(m_current);
|
||||
}
|
||||
private:
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Iterator(etk::Vector<T> * myVector, int pos):
|
||||
m_current(pos),
|
||||
m_Vector(myVector)
|
||||
{
|
||||
// nothing to do ...
|
||||
}
|
||||
friend class etk::Vector<T>;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Vector(int count = 0):
|
||||
m_data(NULL),
|
||||
m_count(0),
|
||||
m_size(0)
|
||||
{
|
||||
Resize(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Vector(const etk::Vector<T> & myVector):
|
||||
m_size(myVector.m_size),
|
||||
m_count(myVector.m_count),
|
||||
m_data(NULL)
|
||||
{
|
||||
int32_t i;
|
||||
ETK_MALLOC_CAST(m_data, m_size, T, reinterpret_cast<T*>);
|
||||
for(i=0; i<m_count; i++) {
|
||||
new (&m_data[i]) T(myVector[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
~Vector()
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Vector& operator=(const etk::Vector<T> & etkVector)
|
||||
{
|
||||
int32_t i;
|
||||
this->~etkVector();
|
||||
m_size = etkVector.m_size;
|
||||
m_count = etkVector.m_count;
|
||||
TK_MALLOC_CAST(m_data, m_size, T, reinterpret_cast<T*>);
|
||||
for(i=0; i<m_count; i++) {
|
||||
new (&m_data[i]) T(etkVector[i]);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t Size()
|
||||
{
|
||||
return m_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
T& Get(int32_t pos)
|
||||
{
|
||||
return m_data[pos];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
T& operator[] (int32_t pos)
|
||||
{
|
||||
return Get(pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
const T& operator[] (int32_t pos) const
|
||||
{
|
||||
return m_data[pos];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int IndexOf(const T * item) const
|
||||
{
|
||||
int32_t res = item - m_data;
|
||||
if( 0 > res
|
||||
|| res >= Size())
|
||||
{
|
||||
return -1
|
||||
} else {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void PushBack(const T& item)
|
||||
{
|
||||
int32_t idx = Size();
|
||||
Resize(idx+1);
|
||||
Get(idx) = item;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Iterator Get(int pos)
|
||||
{
|
||||
return Iterator(this, pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Iterator Begin()
|
||||
{
|
||||
return Get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Iterator End()
|
||||
{
|
||||
return Get( Size()-1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Resize(int32_t count)
|
||||
{
|
||||
int32_t i;
|
||||
// Reallocate memory
|
||||
if (count > m_size) {
|
||||
ChangeAllocation(count);
|
||||
}
|
||||
|
||||
// Remove deprecated element
|
||||
for(i=count; i<m_count; i++) {
|
||||
m_data[i].~T();
|
||||
}
|
||||
|
||||
// Create nex item
|
||||
for(i=m_count;i<count;i++) {
|
||||
new (&m_data[i]) T();
|
||||
}
|
||||
|
||||
m_count = count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void ChangeAllocation(int count)
|
||||
{
|
||||
if (count > m_size) {
|
||||
// generate new size
|
||||
while(count > m_size) {
|
||||
if (INC) {
|
||||
m_size = (m_size + INC)
|
||||
} else if (m_size==0) {
|
||||
m_size = 1;
|
||||
} else {
|
||||
m_size = m_size * 2;
|
||||
}
|
||||
}
|
||||
// Allocate the curent element
|
||||
T * data = NULL;
|
||||
ETK_MALLOC_CAST(data, m_size, T, reinterpret_cast<T*>);
|
||||
for(int i=0; i<m_count; i++) {
|
||||
new (&data[i]) T(m_data[i]);
|
||||
}
|
||||
Destroy();
|
||||
m_data = data;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
T * m_data; //!< pointer on the current Data
|
||||
int32_t m_count; //!< number of element
|
||||
int32_t m_size; //!< current allocated size
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Destroy()
|
||||
{
|
||||
for(int i=0; i<m_count; i++) {
|
||||
m_data[i].~T();
|
||||
}
|
||||
if (m_data) {
|
||||
ETK_FREE(m_data);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#undef __class__
|
||||
#define __class__ NULL
|
||||
|
||||
#endif
|
||||
|
@ -1,672 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file etkVectorType.h
|
||||
* @brief Ewol Tool Kit : Basic VectorType for direct data insertion (template)
|
||||
* @author Edouard DUPIN
|
||||
* @date 07/04/2011
|
||||
* @par Project
|
||||
* Ewol TK
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __ETK_VECTOR_TYPE_H__
|
||||
#define __ETK_VECTOR_TYPE_H__
|
||||
|
||||
#include <etkTypes.h>
|
||||
#include <etkDebugInternal.h>
|
||||
#include <etkMemory.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "etk::VectorType"
|
||||
|
||||
/**
|
||||
* @brief VectorType classes ...
|
||||
*
|
||||
* @tparam[in] SIZE Size of the current element.
|
||||
*
|
||||
* m_data
|
||||
* <------------ m_dataSize ------------>
|
||||
* ----------------------------------------
|
||||
* | 0 |
|
||||
* |--------------------------------------|
|
||||
* | 1 |
|
||||
* |--------------------------------------|
|
||||
* | 2 |
|
||||
* |--------------------------------------|
|
||||
* m_size | 3 |
|
||||
* |--------------------------------------|
|
||||
* | x |
|
||||
* |--------------------------------------|
|
||||
* | x |
|
||||
* |--------------------------------------|
|
||||
* | x |
|
||||
* |--------------------------------------|
|
||||
* | x |
|
||||
* |--------------------------------------|
|
||||
* | x |
|
||||
* |--------------------------------------|
|
||||
* | x |
|
||||
* |--------------------------------------|
|
||||
* m_allocated | x |
|
||||
* ----------------------------------------
|
||||
*
|
||||
*/
|
||||
|
||||
namespace etk
|
||||
{
|
||||
|
||||
template<typename MY_TYPE=int32_t> class VectorType
|
||||
{
|
||||
public:
|
||||
class Iterator
|
||||
{
|
||||
// Private data :
|
||||
private:
|
||||
int32_t m_current; //!< curent Id on the vector
|
||||
VectorType<MY_TYPE> * m_VectorType; //!< Pointer on the curent element of the vectorBin
|
||||
public:
|
||||
/**
|
||||
* @brief Basic itarator constructor with no link with an etkVector
|
||||
*/
|
||||
Iterator():
|
||||
m_current(-1),
|
||||
m_VectorType(NULL)
|
||||
{
|
||||
// nothing to do ...
|
||||
}
|
||||
/**
|
||||
* @brief Recopy constructor on a specific etkVector.
|
||||
* @param[in] otherIterator The Iterator that might be copy
|
||||
*/
|
||||
Iterator(const Iterator & otherIterator):
|
||||
m_current(otherIterator.m_current),
|
||||
m_VectorType(otherIterator.m_VectorType)
|
||||
{
|
||||
// nothing to do ...
|
||||
}
|
||||
/**
|
||||
* @brief Asignation operator.
|
||||
* @param[in] otherIterator The Iterator that might be copy
|
||||
* @return reference on the curent Iterator
|
||||
*/
|
||||
Iterator& operator=(const Iterator & otherIterator)
|
||||
{
|
||||
m_current = otherIterator.m_current;
|
||||
m_VectorType = otherIterator.m_VectorType;
|
||||
return *this;
|
||||
}
|
||||
/**
|
||||
* @brief Basic destructor
|
||||
*/
|
||||
~Iterator()
|
||||
{
|
||||
m_current = -1;
|
||||
m_VectorType = NULL;
|
||||
}
|
||||
/**
|
||||
* @brief basic boolean cast
|
||||
* @return true if the element is present in the etkVector size
|
||||
*/
|
||||
operator bool ()
|
||||
{
|
||||
if( 0 <= m_current
|
||||
&& m_current < m_VectorType->Size() )
|
||||
{
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @brief Incremental operator
|
||||
* @return Reference on the current iterator incremented
|
||||
*/
|
||||
Iterator& operator++ ()
|
||||
{
|
||||
if( NULL != m_VectorType
|
||||
&& m_current < m_VectorType->Size() )
|
||||
{
|
||||
m_current++;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
/**
|
||||
* @brief Decremental operator
|
||||
* @return Reference on the current iterator decremented
|
||||
*/
|
||||
Iterator& operator-- ()
|
||||
{
|
||||
if (m_current >= 0) {
|
||||
m_current--;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
/**
|
||||
* @brief Incremental operator
|
||||
* @return Reference on a new iterator and increment the other one
|
||||
*/
|
||||
Iterator operator++ (int32_t)
|
||||
{
|
||||
Iterator it(*this);
|
||||
++(*this);
|
||||
return it;
|
||||
}
|
||||
/**
|
||||
* @brief Decremental operator
|
||||
* @return Reference on a new iterator and decrement the other one
|
||||
*/
|
||||
Iterator operator-- (int32_t)
|
||||
{
|
||||
Iterator it(*this);
|
||||
--(*this);
|
||||
return it;
|
||||
}
|
||||
/**
|
||||
* @brief Get reference on the current Element
|
||||
* @return the reference on the current Element
|
||||
*/
|
||||
MY_TYPE & operator-> () const
|
||||
{
|
||||
TK_CHECK_INOUT(m_current >= 0 && m_current < m_VectorType->Size());
|
||||
return &m_VectorType->Get(m_current);
|
||||
}
|
||||
/**
|
||||
* @brief Get reference on the current Element
|
||||
* @return the reference on the current Element
|
||||
*/
|
||||
MY_TYPE & operator* () const
|
||||
{
|
||||
TK_CHECK_INOUT(m_current >= 0 && m_current < m_VectorType->Size());
|
||||
return m_VectorType->Get(m_current);
|
||||
}
|
||||
private:
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Iterator(VectorType<MY_TYPE> * Evb, int32_t pos):
|
||||
m_current(pos),
|
||||
m_VectorType(Evb)
|
||||
{
|
||||
// nothing to do ...
|
||||
}
|
||||
friend class VectorType;
|
||||
};
|
||||
|
||||
private:
|
||||
MY_TYPE * m_data; //!< pointer on the curetn table of Data
|
||||
int32_t m_size; //!< nb Element in the buffer
|
||||
int32_t m_allocated; //!< Current allocated size
|
||||
int32_t m_increment; //!< methode of increment
|
||||
public:
|
||||
/**
|
||||
* @brief Create an empty vector
|
||||
* @param[in] count Minimum request size of the Buffer
|
||||
*/
|
||||
VectorType(int32_t count = 0):
|
||||
m_data(NULL),
|
||||
m_size(0),
|
||||
m_allocated(0),
|
||||
m_increment(1)
|
||||
{
|
||||
ChangeAllocation(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Re-copy constructor (copy all needed data)
|
||||
* @param[in] Evb Vector that might be copy
|
||||
*/
|
||||
VectorType(const etk::VectorType<MY_TYPE> & Evb)
|
||||
{
|
||||
m_allocated = Evb.m_allocated;
|
||||
m_size = Evb.m_size;
|
||||
m_increment = Evb.m_increment;
|
||||
m_data = NULL;
|
||||
//TK_DEBUG("USE Specific vector allocator ... Evb.m_size=" << Evb.m_size << " Evb.m_increment=" << Evb.m_increment);
|
||||
// allocate all same data
|
||||
ETK_MALLOC(m_data, m_allocated, MY_TYPE);
|
||||
TK_ASSERT(NULL!=m_data, "Error in data allocation");
|
||||
// Copy all data ...
|
||||
memcpy(m_data, Evb.m_data, m_allocated * sizeof(MY_TYPE) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Destructor of the current Class
|
||||
*/
|
||||
~VectorType()
|
||||
{
|
||||
if (NULL!=m_data) {
|
||||
ETK_FREE(m_data);
|
||||
m_data = NULL;
|
||||
m_allocated = 0;
|
||||
m_size = 0;
|
||||
m_increment = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Re-copy operator
|
||||
* @param[in] Evb Vector that might be copy
|
||||
* @return reference on the curent re-copy vector
|
||||
*/
|
||||
VectorType& operator=(const etk::VectorType<MY_TYPE> & Evb)
|
||||
{
|
||||
//TK_DEBUG("USE RECOPY vector ... Evb.m_size=" << Evb.m_size << " Evb.m_increment=" << Evb.m_increment);
|
||||
if( this != &Evb ) // avoid copy to itself
|
||||
{
|
||||
if (NULL!=m_data) {
|
||||
ETK_FREE(m_data);
|
||||
m_data = NULL;
|
||||
}
|
||||
// Set the new value
|
||||
m_allocated = Evb.m_allocated;
|
||||
m_size = Evb.m_size;
|
||||
m_increment = Evb.m_increment;
|
||||
// allocate all same data
|
||||
ETK_MALLOC(m_data, m_allocated, MY_TYPE);
|
||||
TK_ASSERT(NULL!=m_data, "Error in data allocation");
|
||||
// Copy all data ...
|
||||
memcpy(m_data, Evb.m_data, m_allocated * sizeof(MY_TYPE) );
|
||||
}
|
||||
// Return the curent pointer
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Add at the Last position of the Vector
|
||||
* @param[in] item Element to add at the end of vector
|
||||
*/
|
||||
VectorType& operator+= (const etk::VectorType<MY_TYPE> & Evb) // += operator
|
||||
{
|
||||
int32_t nbElememt = Evb.Size();
|
||||
int32_t idx = m_size;
|
||||
Resize(m_size+nbElememt);
|
||||
memcpy(&m_data[idx], &Evb.m_data[0], nbElememt*sizeof(MY_TYPE) );
|
||||
// Return the curent pointer
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set increment mode of this vector (default it match corectly with the number of element inside)
|
||||
* @param[in] newIncrementNumber methode requested
|
||||
*/
|
||||
void SetIncrement(int32_t newIncrementNumber)
|
||||
{
|
||||
m_increment = newIncrementNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the number of element in the vector
|
||||
* @return The number requested
|
||||
*/
|
||||
int32_t Size() const
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get the Allocated size in the vector
|
||||
* @return The size of allocation
|
||||
*/
|
||||
int32_t AllocatedSize() const
|
||||
{
|
||||
return m_allocated;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get a current element in the vector
|
||||
* @param[in] pos Desired position read
|
||||
* @return Reference on the Element
|
||||
*/
|
||||
MY_TYPE& Get(int32_t pos)
|
||||
{
|
||||
return m_data[pos];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get an copy Element an a special position
|
||||
* @param[in] pos Position in the vector that might be get [0..Size()]
|
||||
* @return An reference on the copy of selected element
|
||||
*/
|
||||
MY_TYPE& operator[] (int32_t pos)
|
||||
{
|
||||
return Get(pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get an Element an a special position
|
||||
* @param[in] pos Position in the vector that might be get [0..Size()]
|
||||
* @return An reference on the selected element
|
||||
*/
|
||||
const MY_TYPE& operator[] (int32_t pos) const
|
||||
{
|
||||
return m_data[pos];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Add at the Last position of the Vector
|
||||
* @param[in] item Element to add at the end of vector
|
||||
*/
|
||||
void PushBack(const MY_TYPE& item)
|
||||
{
|
||||
int32_t idx = m_size;
|
||||
Resize(m_size+1);
|
||||
m_data[idx] = item;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Add at the Last position of the Vector
|
||||
* @param[in] item Element to add at the end of vector
|
||||
*/
|
||||
void PushBack(const MY_TYPE * item, int32_t nbElement)
|
||||
{
|
||||
if (NULL == item) {
|
||||
return;
|
||||
}
|
||||
int32_t idx = m_size;
|
||||
Resize(m_size+nbElement);
|
||||
memcpy(&m_data[idx], item, nbElement*sizeof(MY_TYPE) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Remove the last element of the vector
|
||||
*/
|
||||
void PopBack(void)
|
||||
{
|
||||
if(m_size>0) {
|
||||
Resize(m_size-1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Remove all alement in the current vector
|
||||
*/
|
||||
void Clear(void)
|
||||
{
|
||||
if(m_size>0) {
|
||||
Resize(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Insert(int32_t pos, const MY_TYPE& item)
|
||||
{
|
||||
if (pos>m_size) {
|
||||
TK_ERROR(" can not insert Element at this position : " << pos << " > " << m_size<< " add it at the end ... ");
|
||||
PushBack(item);
|
||||
return;
|
||||
}
|
||||
int32_t tmpSize = m_size;
|
||||
// Request resize of the current buffer
|
||||
Resize(m_size+1);
|
||||
// move curent data
|
||||
memmove((m_data + pos + 1), (m_data + pos), (tmpSize - pos)*sizeof(MY_TYPE) );
|
||||
// affectation of the current element
|
||||
m_data[pos] = item;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Insert(int32_t pos, const MY_TYPE * item, int32_t nbElement)
|
||||
{
|
||||
if (pos>m_size) {
|
||||
TK_WARNING(" can not insert Element at this position : " << pos << " > " << m_size << " add it at the end ... ");
|
||||
PushBack(item, nbElement);
|
||||
return;
|
||||
}
|
||||
int32_t tmpSize = m_size;
|
||||
// Request resize of the current buffer
|
||||
Resize(m_size+nbElement);
|
||||
// move curent data (after the position)
|
||||
memmove((m_data + pos + nbElement), (m_data + pos), (tmpSize - pos)*sizeof(MY_TYPE) );
|
||||
// affectation of all input element
|
||||
memcpy(&m_data[pos], item, nbElement*sizeof(MY_TYPE) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Remove one element
|
||||
*
|
||||
* @param[in] pos Position to remove the data
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Erase(int32_t pos)
|
||||
{
|
||||
if (pos>m_size) {
|
||||
TK_ERROR(" can not Erase Element at this position : " << pos << " > " << m_size);
|
||||
return;
|
||||
}
|
||||
int32_t tmpSize = m_size;
|
||||
// move curent data
|
||||
memmove((m_data + pos), (m_data + pos + 1), (tmpSize - (pos+1))*sizeof(MY_TYPE) );
|
||||
// Request resize of the current buffer
|
||||
Resize(m_size-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Remove N elements
|
||||
*
|
||||
* @param[in] pos Position to remove the data
|
||||
* @param[in] posEnd Last position number
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Erase(int32_t pos, int32_t posEnd)
|
||||
{
|
||||
if (pos>m_size) {
|
||||
TK_ERROR(" can not Erase Element at this position : " << pos << " > " << m_size);
|
||||
return;
|
||||
}
|
||||
if (posEnd>m_size) {
|
||||
posEnd = m_size;
|
||||
}
|
||||
int32_t nbElement = m_size - pos;
|
||||
int32_t tmpSize = m_size;
|
||||
// move curent data
|
||||
memmove((m_data + pos), (m_data + pos + nbElement), (tmpSize - (pos+nbElement))*sizeof(MY_TYPE) );
|
||||
// Request resize of the current buffer
|
||||
Resize(m_size-nbElement);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Remove N element
|
||||
*
|
||||
* @param[in] pos Position to remove the data
|
||||
* @param[in] nbElement number of element to remove
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EraseLen(int32_t pos, int32_t nbElement)
|
||||
{
|
||||
if (pos>m_size) {
|
||||
TK_ERROR(" can not Erase Len Element at this position : " << pos << " > " << m_size);
|
||||
return;
|
||||
}
|
||||
if (pos+nbElement>m_size) {
|
||||
nbElement = m_size - pos;
|
||||
}
|
||||
int32_t tmpSize = m_size;
|
||||
// move curent data
|
||||
memmove((m_data + pos), (m_data + pos + nbElement), (tmpSize - (pos+nbElement))*sizeof(MY_TYPE) );
|
||||
// Request resize of the current buffer
|
||||
Resize(m_size-nbElement);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief extract data between two point :
|
||||
* @param[in] posStart start position to extract data
|
||||
* @param[in] posEnd End position to extract data
|
||||
* @return the extracted vector
|
||||
*/
|
||||
VectorType Extract(int32_t posStart = 0, int32_t posEnd=0x7FFFFFFF)
|
||||
{
|
||||
VectorType<MY_TYPE> out;
|
||||
if (posStart < 0) {
|
||||
posStart = 0;
|
||||
} else if (posStart >= Size() ) {
|
||||
return out;
|
||||
}
|
||||
if (posEnd < 0) {
|
||||
return out;
|
||||
} else if (posEnd >= Size() ) {
|
||||
posEnd = Size();
|
||||
}
|
||||
out.PushBack(&m_data[posStart], posEnd-posStart);
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the minimum allocation in memory for the curent vector ==> reallocate the
|
||||
* buffer to fit exactly the mumber of element needed
|
||||
*/
|
||||
void Fit(void)
|
||||
{
|
||||
if (m_size > m_allocated) {
|
||||
// Reallocate the curent data to the correct size ...
|
||||
ETK_REALLOC(m_data, m_size, MY_TYPE);
|
||||
}
|
||||
// Check result with assert :
|
||||
TK_ASSERT(NULL!=m_data, "Error in data Fitting");
|
||||
m_allocated = m_size;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get an iterator an an specific position
|
||||
* @param[in] pos Requested position of the iterator in the vector
|
||||
* @return The Iterator
|
||||
*/
|
||||
Iterator Position(int32_t pos)
|
||||
{
|
||||
return Iterator(this, pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get an Iterator on the start position of the Vector
|
||||
* @return The Iterator
|
||||
*/
|
||||
Iterator Begin(void)
|
||||
{
|
||||
return Position(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get an Iterator on the end position of the Vector
|
||||
* @return The Iterator
|
||||
*/
|
||||
Iterator End(void)
|
||||
{
|
||||
return Position( Size()-1 );
|
||||
}
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief Change the current size of the vector
|
||||
* @param[in] newSize New requested size of element in the vector
|
||||
*/
|
||||
void Resize(int32_t newSize)
|
||||
{
|
||||
// Reallocate memory
|
||||
if (newSize > m_allocated) {
|
||||
ChangeAllocation(newSize);
|
||||
}
|
||||
m_size = newSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Change the current allocation to the corect one (depend on the current size)
|
||||
* @param[in] newSize Minimum number of element needed
|
||||
*/
|
||||
void ChangeAllocation(int32_t newSize)
|
||||
{
|
||||
// set the minimal size to 1
|
||||
if(newSize <= 0) {
|
||||
newSize = 1;
|
||||
}
|
||||
int32_t requestSize = m_allocated;
|
||||
// set the size with the corect chose type :
|
||||
if (newSize == m_allocated) {
|
||||
return;
|
||||
} else if (newSize < requestSize) {
|
||||
// down the size of the vector:
|
||||
if (0==m_increment) {
|
||||
// never down size...
|
||||
} else {
|
||||
int32_t devide = m_increment;
|
||||
if (devide == 0) {
|
||||
devide = 1;
|
||||
}
|
||||
int32_t numberOfStep = m_allocated / devide;
|
||||
if (newSize< ((numberOfStep-2)*devide + devide/2) ) {
|
||||
//Allow Reallocation of a new size shoerter
|
||||
requestSize = ((newSize / devide)+1) * devide;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
while(newSize > requestSize) {
|
||||
if (0 == requestSize) {
|
||||
requestSize = 1;
|
||||
} else if (0==m_increment) {
|
||||
requestSize = requestSize * 2;
|
||||
} else {
|
||||
requestSize = (requestSize + m_increment);
|
||||
}
|
||||
}
|
||||
}
|
||||
// No reallocation needed :
|
||||
if (requestSize == m_allocated) {
|
||||
return;
|
||||
}
|
||||
// check if something is allocated :
|
||||
if (NULL == m_data) {
|
||||
// no data allocated ==> request an allocation (might be the first)
|
||||
ETK_MALLOC(m_data, requestSize, MY_TYPE);
|
||||
} else {
|
||||
// move datas
|
||||
ETK_REALLOC(m_data, requestSize, MY_TYPE);
|
||||
}
|
||||
// Check result with assert :
|
||||
TK_ASSERT(NULL!=m_data, "Error in data allocation");
|
||||
// set the new allocation size
|
||||
m_allocated = requestSize;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#undef __class__
|
||||
#define __class__ NULL
|
||||
|
||||
#endif
|
||||
|
@ -1,67 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol.cpp
|
||||
* @brief Main code of ewol (sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 17/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include "ewol.h"
|
||||
|
||||
#if __PLATFORM__ == X11
|
||||
#include "guiX11.h"
|
||||
#elif __PLATFORM__ == DoubleBuffer
|
||||
#include "guiDoubleBuffer.h"
|
||||
#elif __PLATFORM__ == Android
|
||||
#include "guiAndroid.h"
|
||||
#elif __PLATFORM__ == AndroidTablet
|
||||
#include "guiAndroidTablet.h"
|
||||
#elif __PLATFORM__ == IPhone
|
||||
#include "guiIPhone.h"
|
||||
#elif __PLATFORM__ == IPad
|
||||
#include "guiIPad.h"
|
||||
#else
|
||||
#error you need to specify a platform ...
|
||||
#endif
|
||||
|
||||
|
||||
void ewol::Init(int argc, char *argv[])
|
||||
{
|
||||
guiAbstraction::Init(argc, argv);
|
||||
}
|
||||
|
||||
void ewol::Run(void)
|
||||
{
|
||||
guiAbstraction::Run();
|
||||
}
|
||||
|
||||
void ewol::UnInit(void)
|
||||
{
|
||||
guiAbstraction::UnInit();
|
||||
}
|
||||
|
||||
|
||||
void ewol::DisplayWindows(ewol::Windows * windows)
|
||||
{
|
||||
guiAbstraction::SetDisplayOnWindows(windows);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,44 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol.h
|
||||
* @brief Main include of ewol (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 17/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __EWOL_H__
|
||||
#define __EWOL_H__
|
||||
|
||||
#include <etkTypes.h>
|
||||
#include <etkString.h>
|
||||
#include <ewolWidget.h>
|
||||
#include <ewolWindows.h>
|
||||
|
||||
namespace ewol {
|
||||
void Init(int32_t argc, char *argv[]);
|
||||
void Run(void);
|
||||
void Stop(void);
|
||||
void UnInit(void);
|
||||
void DisplayWindows(ewol::Windows * windows);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
@ -1,28 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewolDebug.h
|
||||
* @brief Ewol : log wrapper (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 19/10/2010
|
||||
* @par Project
|
||||
* Ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include <ewolDebug.h>
|
||||
|
||||
const char * ewolLibName = "ewol ";
|
@ -1,66 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewolDebug.h
|
||||
* @brief Ewol : log wrapper (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 19/10/2010
|
||||
* @par Project
|
||||
* Ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_DEBUG_H__
|
||||
#define __EWOL_DEBUG_H__
|
||||
|
||||
#include <etkTypes.h>
|
||||
#include <etkDebug.h>
|
||||
|
||||
extern const char * ewolLibName;
|
||||
|
||||
#define EWOL_CRITICAL(data) ETK_CRITICAL(ewolLibName, data)
|
||||
// General
|
||||
#if EWOL_DEBUG_LEVEL > 0
|
||||
# define EWOL_WARNING(data) ETK_WARNING(ewolLibName, data)
|
||||
# define EWOL_ERROR(data) ETK_ERROR(ewolLibName, data)
|
||||
#else
|
||||
# define EWOL_WARNING(data) do {}while(0)
|
||||
# define EWOL_ERROR(data) do {}while(0)
|
||||
#endif
|
||||
|
||||
#if EWOL_DEBUG_LEVEL > 1
|
||||
# define EWOL_INFO(data) ETK_INFO(ewolLibName, data)
|
||||
#else
|
||||
# define EWOL_INFO(data) do {}while(0)
|
||||
#endif
|
||||
|
||||
#if EWOL_DEBUG_LEVEL > 2
|
||||
# define EWOL_DEBUG(data) ETK_DEBUG(ewolLibName, data)
|
||||
#else
|
||||
# define EWOL_DEBUG(data) do {}while(0)
|
||||
#endif
|
||||
|
||||
#define EWOL_ASSERT(cond, data) ETK_ASSERT(ewolLibName, cond, data)
|
||||
|
||||
#if EWOL_DEBUG_LEVEL > 1
|
||||
# define EWOL_CHECK_INOUT(cond) ETK_CHECK_INOUT_ASSERT(ewolLibName, cond)
|
||||
#elif EWOL_DEBUG_LEVEL > 0
|
||||
# define EWOL_CHECK_INOUT(cond) ETK_CHECK_INOUT_WARNING(ewolLibName, cond)
|
||||
#else
|
||||
# define EWOL_CHECK_INOUT(cond) do { } while (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,118 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewolOObject.cpp
|
||||
* @brief ewol OpenGl Object system (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 24/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <etkTypes.h>
|
||||
#include <etkString.h>
|
||||
#include <ewolOObject.h>
|
||||
#include <GL/gl.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void ewol::OObject2DColored::Draw(void)
|
||||
{
|
||||
if (m_coord.Size()<=0) {
|
||||
return;
|
||||
}
|
||||
// Enable Pointers
|
||||
glEnableClientState( GL_VERTEX_ARRAY );
|
||||
glEnableClientState( GL_COLOR_ARRAY );
|
||||
|
||||
|
||||
// Set the vertex pointer to our vertex data
|
||||
glVertexPointer(2, GL_FLOAT, 0, &m_coord[0] );
|
||||
glColorPointer(4, GL_FLOAT, 0, &m_coordColor[0] );
|
||||
// Render : draw all of the triangles at once
|
||||
glDrawArrays( GL_TRIANGLES, 0, m_coord.Size());
|
||||
//glDrawElements( GL_TRIANGLES, 0, m_coord.Size());
|
||||
//EWOL_DEBUG("Draw ..." << m_coord.Size()/3 << " triangle(s)");
|
||||
|
||||
// Disable Pointers
|
||||
glDisableClientState( GL_VERTEX_ARRAY );
|
||||
glDisableClientState( GL_COLOR_ARRAY );
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ewol::OObject2DColored::Rectangle(float x, float y, float w, float h, float red, float green, float blue, float alpha)
|
||||
{
|
||||
//EWOL_DEBUG("Add rectangle : ...");
|
||||
coord2D_ts point;
|
||||
color_ts color;
|
||||
|
||||
color.red = red;
|
||||
color.green = green;
|
||||
color.blue = blue;
|
||||
color.alpha = alpha;
|
||||
|
||||
point.x = x;
|
||||
point.y = y + h;
|
||||
m_coord.PushBack(point);
|
||||
m_coordColor.PushBack(color);
|
||||
|
||||
point.x = x;
|
||||
point.y = y;
|
||||
m_coord.PushBack(point);
|
||||
m_coordColor.PushBack(color);
|
||||
|
||||
point.x = x + w;
|
||||
point.y = y;
|
||||
m_coord.PushBack(point);
|
||||
m_coordColor.PushBack(color);
|
||||
|
||||
m_coord.PushBack(point);
|
||||
m_coordColor.PushBack(color);
|
||||
|
||||
point.x = x + w;
|
||||
point.y = y + h;
|
||||
m_coord.PushBack(point);
|
||||
m_coordColor.PushBack(color);
|
||||
|
||||
point.x = x;
|
||||
point.y = y + h;
|
||||
m_coord.PushBack(point);
|
||||
m_coordColor.PushBack(color);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
OObject2DTextured::Draw(void)
|
||||
{
|
||||
if (m_coord.Size()<=0) {
|
||||
return;
|
||||
}
|
||||
glEnableClientState( GL_VERTEX_ARRAY ); // Enable Vertex Arrays
|
||||
glEnableClientState( GL_TEXTURE_COORD_ARRAY ); // Enable Texture Coord Arrays
|
||||
glVertexPointer( 3, GL_FLOAT, 0, &m_coord[0] );
|
||||
glTexCoordPointer( 2, GL_FLOAT, 0, &m_coordTex[0] );
|
||||
glDrawArrays( GL_TRIANGLES, 0, m_linkCoord.Size());
|
||||
glDisableClientState( GL_VERTEX_ARRAY ); // Disable Vertex Arrays
|
||||
glDisableClientState( GL_TEXTURE_COORD_ARRAY ); // Disable Texture Coord Arrays
|
||||
}
|
||||
*/
|
@ -1,101 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewolOObject.h
|
||||
* @brief ewol OpenGl Object system (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 24/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_O_OBJECT_H__
|
||||
#define __EWOL_O_OBJECT_H__
|
||||
|
||||
#include <etkTypes.h>
|
||||
#include <ewolDebug.h>
|
||||
#include <etkVectorType.h>
|
||||
|
||||
namespace ewol {
|
||||
extern "C" {
|
||||
typedef struct {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
}coord3D_ts;
|
||||
typedef struct {
|
||||
float x;
|
||||
float y;
|
||||
}coord2D_ts;
|
||||
typedef struct {
|
||||
float u;
|
||||
float v;
|
||||
}texCoord_ts;
|
||||
typedef struct {
|
||||
float red;
|
||||
float green;
|
||||
float blue;
|
||||
float alpha;
|
||||
}color_ts;
|
||||
typedef struct {
|
||||
int32_t f;
|
||||
int32_t s;
|
||||
int32_t t;
|
||||
}linkCoord_ts;
|
||||
};
|
||||
|
||||
class OObject
|
||||
{
|
||||
public:
|
||||
OObject(void) {};
|
||||
virtual ~OObject(void) {};
|
||||
public:
|
||||
virtual void Draw(void) = 0;
|
||||
};
|
||||
|
||||
class OObject2DColored :public ewol::OObject
|
||||
{
|
||||
public:
|
||||
OObject2DColored(void) {};
|
||||
virtual ~OObject2DColored(void) {};
|
||||
public:
|
||||
virtual void Draw(void);
|
||||
protected:
|
||||
etk::VectorType<coord2D_ts> m_coord; //!< internal coord of the object
|
||||
etk::VectorType<color_ts> m_coordColor; //!< internal color of the different point
|
||||
//etk::VectorType<linkCoord_ts> m_linkCoord; //!< internal link between point to generate triangle
|
||||
public:
|
||||
void Rectangle(float x, float y, float w, float h, float red, float green, float blue, float alpha);
|
||||
};
|
||||
/*
|
||||
class OObject2DTextured :public ewol::OObject
|
||||
{
|
||||
public:
|
||||
OObject2DTextured(void) {};
|
||||
virtual ~OObject2DTextured(void) {};
|
||||
public:
|
||||
virtual void Draw(void);
|
||||
protected:
|
||||
uint32_t m_textureId; //!< texture internal ID
|
||||
etk::VectorType<coord2D_ts> m_coord; //!< internal coord of the object
|
||||
etk::VectorType<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
|
||||
etk::VectorType<linkCoord_ts> m_linkCoord; //!< internal link between point to generate triangle
|
||||
};
|
||||
*/
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,101 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewolWidget.cpp
|
||||
* @brief basic ewol Widget (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 18/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <ewolWidget.h>
|
||||
|
||||
|
||||
ewol::Widget::Widget(void)
|
||||
{
|
||||
m_origin.x = 0.0;
|
||||
m_origin.y = 0.0;
|
||||
m_minSize.x = -1.0;
|
||||
m_minSize.y = -1.0;
|
||||
m_size.x = 10.0;
|
||||
m_size.y = 10.0;
|
||||
m_maxSize.x = -1.0;
|
||||
m_maxSize.y = -1.0;
|
||||
m_expendX = false;
|
||||
m_expendY = false;
|
||||
}
|
||||
|
||||
ewol::Widget::~Widget(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool ewol::Widget::CalculateSize(double availlableX, double availlableY)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ewol::Widget::GenEventInput(int32_t IdInput, eventInputType_te typeEvent, double X, double Y)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ewol::Widget::GenEventShortCut(bool shift, bool control, bool alt, bool pomme, char UTF8_data[UTF8_MAX_SIZE])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ewol::Widget::AddEventArea(coord origin, coord size, uint32_t flags, const char * generateEventId)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ewol::Widget::AddEventShortCut(bool shift, bool control, bool alt, bool pomme, char UTF8_data[UTF8_MAX_SIZE], const char * generateEventId)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ewol::Widget::AddEventShortCut(char * descriptiveString, const char * generateEventId)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ewol::Widget::ExternLinkOnEvent(const char * eventName, int32_t widgetId)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool ewol::Widget::GenericDraw(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//} // ???
|
||||
|
||||
|
@ -1,224 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewolWidget.h
|
||||
* @brief basic ewol Widget (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 18/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_WIDGET_H__
|
||||
#define __EWOL_WIDGET_H__
|
||||
|
||||
#include <etkTypes.h>
|
||||
#include <ewolDebug.h>
|
||||
#include <etkVectorType.h>
|
||||
|
||||
namespace ewol {
|
||||
extern "C" {
|
||||
typedef struct {
|
||||
double x;
|
||||
double y;
|
||||
} coord;
|
||||
}
|
||||
typedef enum {
|
||||
EVENT_INPUT_TYPE_DOWN,
|
||||
EVENT_INPUT_TYPE_DOUBLE,
|
||||
EVENT_INPUT_TYPE_TRIPLE,
|
||||
EVENT_INPUT_TYPE_MOVE,
|
||||
EVENT_INPUT_TYPE_UP,
|
||||
EVENT_INPUT_TYPE_ENTER,
|
||||
EVENT_INPUT_TYPE_LEAVE,
|
||||
} eventInputType_te;
|
||||
|
||||
typedef enum {
|
||||
EVENT_KB_TYPE_DOWN,
|
||||
EVENT_KB_TYPE_UP,
|
||||
} eventKbType_te;
|
||||
|
||||
typedef enum {
|
||||
EVENT_KB_MOVE_TYPE_LEFT,
|
||||
EVENT_KB_MOVE_TYPE_RIGHT,
|
||||
EVENT_KB_MOVE_TYPE_UP,
|
||||
EVENT_KB_MOVE_TYPE_DOWN,
|
||||
EVENT_KB_MOVE_TYPE_PAGE_UP,
|
||||
EVENT_KB_MOVE_TYPE_PAGE_DOWN,
|
||||
EVENT_KB_MOVE_TYPE_START,
|
||||
EVENT_KB_MOVE_TYPE_END,
|
||||
} eventKbMoveType_te;
|
||||
|
||||
#define UTF8_MAX_SIZE (8)
|
||||
#define EWOL_EVENT_UNION (0)
|
||||
#define EWOL_EVENT_SHORTCUT (1)
|
||||
extern "C" {
|
||||
typedef struct {
|
||||
const char * generateEventId; // event generate ID (to be unique it was pointer on the string name)
|
||||
int32_t widgetCall; //!< unique ID of the widget
|
||||
int32_t mode; //!< EWOL_EVENT_UNION or EWOL_EVENT_SHORTCUT
|
||||
union {
|
||||
struct {
|
||||
bool shift;
|
||||
bool control;
|
||||
bool alt;
|
||||
bool pomme;
|
||||
char UTF8_data[UTF8_MAX_SIZE];
|
||||
} shortCut;
|
||||
struct {
|
||||
coord origin; // widget specific
|
||||
coord size; // widget specific
|
||||
uint32_t flags; // widget specific
|
||||
} area;
|
||||
};
|
||||
} event_ts;
|
||||
};
|
||||
|
||||
class Widget;
|
||||
|
||||
class Widget {
|
||||
public:
|
||||
Widget(void);
|
||||
virtual ~Widget(void);
|
||||
private:
|
||||
int32_t m_uniqueId; //!< UniqueId to identify the widget unicly
|
||||
public:
|
||||
int32_t GetUniqueId(void) { return m_uniqueId; };
|
||||
|
||||
private:
|
||||
ewol::Widget * m_parrent; //!< parrent of the current widget (if NULL ==> this is the main node(root))
|
||||
public:
|
||||
void SetParrent(ewol::Widget * newParrent) { m_parrent = newParrent; };
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
// -- Widget Size:
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
protected:
|
||||
coord m_origin;
|
||||
coord m_minSize;
|
||||
coord m_size;
|
||||
coord m_maxSize;
|
||||
bool m_expendX;
|
||||
bool m_expendY;
|
||||
void SetExpendX(bool newExpend=false) { m_expendX = newExpend; };
|
||||
void SetExpendY(bool newExpend=false) { m_expendY = newExpend; };
|
||||
void SetMinSise(double x=-1, double y=-1) { m_minSize.x = x; m_minSize.y = y; };
|
||||
void SetMaxSise(double x=-1, double y=-1) { m_maxSize.x = x; m_maxSize.y = y; };
|
||||
void SetCurrentSise(double x=-1, double y=-1) { m_size.x = x; m_size.y = y; };
|
||||
public:
|
||||
void SetOrigin(double x, double y) { m_origin.x=x; m_origin.y=y; };
|
||||
virtual bool CalculateSize(double availlableX, double availlableY); // this generate the current size ...
|
||||
coord GetMinSize(void) { return m_minSize; };
|
||||
coord GetMaxSize(void) { return m_maxSize; };
|
||||
coord GetCurrentSize(void) { return m_size; };
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
// -- Focus Area
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
private:
|
||||
bool m_hasFocus; //!< set the focus on this widget
|
||||
bool m_canFocus; //!< the focus can be done on this widget
|
||||
public:
|
||||
bool SetFocus(void)
|
||||
{
|
||||
if (true == m_canFocus) {
|
||||
m_hasFocus = true;
|
||||
OnGetFocus();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool RmFocus(void)
|
||||
{
|
||||
if (true == m_canFocus) {
|
||||
m_hasFocus = false;
|
||||
OnLostFocus();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool GetFocus(void) { return m_hasFocus;};
|
||||
bool CanHaveFocus(void) { return m_canFocus;};
|
||||
void SetCanHaveFocus(bool canFocusState)
|
||||
{
|
||||
m_canFocus = canFocusState;
|
||||
if (true == m_hasFocus) {
|
||||
(void)RmFocus();
|
||||
}
|
||||
}
|
||||
protected:
|
||||
virtual void OnGetFocus(void) {};
|
||||
virtual void OnLostFocus(void) {};
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
// -- Input Event on the widget : The input is the muse for a computer, or the finger for the tablettes
|
||||
// -- Shortcut: (only for computer) ==> must be manage otherwise for tablette pc
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
private:
|
||||
etk::VectorType<event_ts> m_inputEvent; //!< generic area and short-cut event
|
||||
public:
|
||||
// external acces to set an input event on this widget.
|
||||
bool GenEventInput(int32_t IdInput, eventInputType_te typeEvent, double X, double Y); // call when input event arrive and call OnEventInput, if no event detected
|
||||
bool GenEventShortCut(bool shift, bool control, bool alt, bool pomme, char UTF8_data[UTF8_MAX_SIZE]);
|
||||
protected:
|
||||
bool AddEventArea(coord origin, coord size, uint32_t flags, const char * generateEventId);
|
||||
bool AddEventShortCut(bool shift, bool control, bool alt, bool pomme, char UTF8_data[UTF8_MAX_SIZE], const char * generateEventId);
|
||||
bool AddEventShortCut(char * descriptiveString, const char * generateEventId);
|
||||
public:
|
||||
// to link an extern widget at the internal event of this one it will access by here :
|
||||
bool ExternLinkOnEvent(const char * eventName, int32_t widgetId);
|
||||
protected:
|
||||
virtual bool OnEventInput(int32_t IdInput, eventInputType_te typeEvent, double X, double Y) { return false; };
|
||||
virtual bool OnEventArea(const char * generateEventId) { return false; };
|
||||
// when an event arrive from an other widget, it will arrive here:
|
||||
virtual bool OnEventAreaExternal(int32_t widgetID, const char * generateEventId) { return false; };
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
// -- Keboard event (when one is present or when a graphical is present
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
public:
|
||||
virtual bool OnEventKb(eventKbType_te typeEvent, char UTF8_data[UTF8_MAX_SIZE]) { return false; };
|
||||
virtual bool OnEventKbMove(eventKbType_te typeEvent, eventKbMoveType_te moveTypeEvent) { return false; };
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
// -- Drawing : Special case ==> have internal system drawing management to prevent reconstriction of a widget
|
||||
// -- this will automaticly regenerate the same view in openGL
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
private:
|
||||
int32_t MultipleDisplayCurrentId;
|
||||
//estd::VectorType<event_ts> m_inputEvent;
|
||||
bool m_genericDraw;
|
||||
bool GenericDraw(void);
|
||||
protected:
|
||||
void SetNotGenericDraw(void) { m_genericDraw = false; };
|
||||
void SetGenericDraw(void) { m_genericDraw = true; };
|
||||
//void FlipFlopNext(void); //!< jump at the next display registered
|
||||
virtual bool OnDraw(void) { return true; };
|
||||
public:
|
||||
bool GenDraw(void)
|
||||
{
|
||||
if (true == m_genericDraw) {
|
||||
return GenericDraw();
|
||||
} else {
|
||||
return OnDraw();
|
||||
}
|
||||
};
|
||||
|
||||
}; // end of the class Widget declaration
|
||||
};// end of nameSpace
|
||||
|
||||
#endif
|
@ -1,120 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewolWindows.cpp
|
||||
* @brief ewol window system (sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 20/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <etkTypes.h>
|
||||
#include <etkString.h>
|
||||
#include <ewolWidget.h>
|
||||
#include <ewolWindows.h>
|
||||
#include <ewolOObject.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
bool ewol::Windows::CalculateSize(double availlableX, double availlableY)
|
||||
{
|
||||
m_size.x = availlableX;
|
||||
m_size.y = availlableY;
|
||||
return true;
|
||||
}
|
||||
|
||||
void ewol::Windows::SysDraw(void)
|
||||
{
|
||||
|
||||
//EWOL_DEBUG("Drow on (" << m_size.x << "," << m_size.y << ")");
|
||||
// set the size of the open GL system
|
||||
glViewport(0,0,m_size.x,m_size.y);
|
||||
|
||||
// Clear the screen with transparency ...
|
||||
glClearColor(0.750, 0.750, 0.750, 0.5);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(0., m_size.x, 0., -m_size.y, 1., 20.);
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
glTranslatef(0, -m_size.y, -5);
|
||||
|
||||
//http://www.khronos.org/opengles/documentation/opengles1_0/html/glBlendFunc.html
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
//glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_DST_ALPHA);
|
||||
//glBlendFunc(GL_SRC_ALPHA, GL_SRC_COLOR);
|
||||
|
||||
|
||||
|
||||
static bool initDone = false;
|
||||
static GLuint indexListe;
|
||||
if (false == initDone) {
|
||||
initDone = true;
|
||||
// create one display list
|
||||
indexListe = glGenLists(1);
|
||||
// compile the display list, store a triangle in it
|
||||
glNewList(indexListe, GL_COMPILE);
|
||||
glBegin(GL_QUADS);
|
||||
float plop2 = 0.2;
|
||||
//glVertex3fv(v0);
|
||||
glColor3f(1., 0., 0.); glVertex3f( plop2*m_size.x, plop2*m_size.y, 0.);
|
||||
glColor3f(0., 1., 0.); glVertex3f( (1.0-plop2)*m_size.x, plop2*m_size.y, 0.);
|
||||
glColor3f(0., 0., 1.); glVertex3f( (1.0-plop2)*m_size.x, (1.0-plop2)*m_size.y, 0.);
|
||||
glColor3f(1., 1., 0.); glVertex3f( plop2*m_size.x, (1.0-plop2)*m_size.y, 0.);
|
||||
glEnd();
|
||||
glEndList();
|
||||
|
||||
}
|
||||
// destroy : glDeleteLists(indexListe, 1);
|
||||
|
||||
|
||||
// draw the display list
|
||||
glCallList(indexListe);
|
||||
|
||||
static double ploppp = 0.1;
|
||||
|
||||
//EWOL_DEBUG("plop is " << ploppp << " devient " << (1.0-ploppp) );
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
glColor3f(1., 0., 0.); glVertex3f( ploppp*m_size.x, ploppp*m_size.y, 0.);
|
||||
glColor3f(0., 1., 0.); glVertex3f( (1.0-ploppp)*m_size.x, ploppp*m_size.y, 0.);
|
||||
glColor3f(0., 0., 1.); glVertex3f( (1.0-ploppp)*m_size.x, (1.0-ploppp)*m_size.y, 0.);
|
||||
glColor3f(1., 1., 0.); glVertex3f( ploppp*m_size.x, (1.0-ploppp)*m_size.y, 0.);
|
||||
glEnd();
|
||||
ploppp += 0.05;
|
||||
if (ploppp>0.5) {
|
||||
ploppp = 0;
|
||||
}
|
||||
|
||||
ewol::OObject2DColored myOObject;
|
||||
|
||||
myOObject.Rectangle(20, 30, 100, 50, 1.0, 0.0, 0.0, 1.0);
|
||||
myOObject.Rectangle(50, 50, 50, 50, 0.0, 1.0, 0.0, 1.0);
|
||||
myOObject.Rectangle(80, 80, 100, 50, 0.0, 0.0, 1.0, 1.0);
|
||||
myOObject.Rectangle(50, 00, 300, 300, 0.2, 0.2, 0.2, 0.5);
|
||||
|
||||
|
||||
myOObject.Rectangle(-50, -50, 120, 120, 0.0, 1.0, 1.0, 0.5);
|
||||
|
||||
myOObject.Draw();
|
||||
|
||||
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewolWindows.h
|
||||
* @brief ewol window system (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 20/10/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_WINDOWS_H__
|
||||
#define __EWOL_WINDOWS_H__
|
||||
|
||||
#include <etkTypes.h>
|
||||
#include <ewolDebug.h>
|
||||
#include <etkVectorType.h>
|
||||
#include <etkSingleton.h>
|
||||
#include <ewolWidget.h>
|
||||
|
||||
namespace ewol {
|
||||
class Windows :public ewol::Widget
|
||||
{
|
||||
public:
|
||||
Windows(void) {};
|
||||
virtual ~Windows(void) {};
|
||||
// internal event at ewol system :
|
||||
public:
|
||||
void SysDraw(void);
|
||||
void SysOnShow(void) {};
|
||||
void SysOnHide(void) {};
|
||||
void SysOnKill(void) {};
|
||||
void SysOnExpose(void) {};
|
||||
public:
|
||||
virtual void OnShow(void) { };
|
||||
virtual void OnHide(void) { };
|
||||
virtual bool OnKill(void) { return true; };
|
||||
virtual void OnReduce(void) { };
|
||||
virtual void On(void) { };
|
||||
// from Widget management :
|
||||
virtual bool CalculateSize(double availlableX, double availlableY);
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
|
1
authors.txt
Normal file
@ -0,0 +1 @@
|
||||
MR Edouard DUPIN <yui.heero@gmail.com>
|
10
data/color.frag
Normal file
@ -0,0 +1,10 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
varying vec4 f_color;
|
||||
|
||||
void main(void) {
|
||||
gl_FragColor = f_color;
|
||||
}
|
2
data/color.prog
Normal file
@ -0,0 +1,2 @@
|
||||
color.vert
|
||||
color.frag
|
18
data/color.vert
Normal file
@ -0,0 +1,18 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
attribute vec2 EW_coord2d;
|
||||
attribute vec4 EW_color;
|
||||
uniform mat4 EW_MatrixTransformation;
|
||||
|
||||
// output :
|
||||
varying vec4 f_color;
|
||||
|
||||
void main(void) {
|
||||
gl_Position = EW_MatrixTransformation * vec4(EW_coord2d, 0.0, 1.0);
|
||||
//gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * vec4(EW_coord2d, 0.0, 1.0);
|
||||
f_color = EW_color;
|
||||
}
|
10
data/color3.frag
Normal file
@ -0,0 +1,10 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
varying vec4 f_color;
|
||||
|
||||
void main(void) {
|
||||
gl_FragColor = f_color;
|
||||
}
|
2
data/color3.prog
Normal file
@ -0,0 +1,2 @@
|
||||
color3.vert
|
||||
color3.frag
|
18
data/color3.vert
Normal file
@ -0,0 +1,18 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
attribute vec3 EW_coord3d;
|
||||
attribute vec4 EW_color;
|
||||
uniform mat4 EW_MatrixTransformation;
|
||||
uniform mat4 EW_MatrixPosition;
|
||||
|
||||
// output :
|
||||
varying vec4 f_color;
|
||||
|
||||
void main(void) {
|
||||
gl_Position = EW_MatrixTransformation * EW_MatrixPosition * vec4(EW_coord3d, 1.0);
|
||||
f_color = EW_color;
|
||||
}
|
50
data/ewol-gui-file-chooser.xml
Normal file
@ -0,0 +1,50 @@
|
||||
<popup>
|
||||
<sizer mode="vert" lock="true" fill="true" expand="true">
|
||||
<sizer mode="hori">
|
||||
<checkbox name="[{ID}]file-shooser:show-hiden-file">
|
||||
<label>_T{ShowHiddenFiles}</label>
|
||||
</checkbox>
|
||||
<spacer expand="true,false"/>
|
||||
<button name="[{ID}]file-shooser:button-validate">
|
||||
<sizer mode="hori">
|
||||
<image src="THEME_GUI:///Load.svg?lib=ewol" fill="true" size="7,7mm"/>
|
||||
<label name="[{ID}]file-shooser:validate-label">_T{Validate}</label>
|
||||
</sizer>
|
||||
</button>
|
||||
<button name="[{ID}]file-shooser:button-cancel">
|
||||
<sizer mode="hori">
|
||||
<image src="THEME_GUI:///Remove.svg?lib=ewol" fill="true" size="7,7mm"/>
|
||||
<label name="[{ID}]file-shooser:cancel-label">_T{Cancel}</label>
|
||||
</sizer>
|
||||
</button>
|
||||
</sizer>
|
||||
<sizer mode="hori">
|
||||
<spacer min-size="2,2mm"/>
|
||||
<ListFileSystem name="[{ID}]file-shooser:list-folder"
|
||||
min-size="20,0%"
|
||||
expand="false,true"
|
||||
show-hidden="false"
|
||||
show-file="false"
|
||||
show-folder="true"
|
||||
show-temporary="false"/>
|
||||
<spacer min-size="2,2mm"/>
|
||||
<ListFileSystem name="[{ID}]file-shooser:list-files"
|
||||
expand="true,true"
|
||||
show-hidden="false"
|
||||
show-file="true"
|
||||
show-folder="false"
|
||||
show-temporary="false"/>
|
||||
<spacer min-size="2,2mm"/>
|
||||
</sizer>
|
||||
<sizer mode="hori">
|
||||
<image name="[{ID}]file-shooser:img-file" src="THEME_GUI:///File.svg?lib=ewol" expand="false" size="8,8mm"/>
|
||||
<entry name="[{ID}]file-shooser:entry-file" expand="true,false" fill="true,false"/>
|
||||
</sizer>
|
||||
<sizer mode="hori">
|
||||
<image name="[{ID}]file-shooser:img-folder" src="THEME_GUI:///Folder.svg?lib=ewol" expand="false" size="8,8mm"/>
|
||||
<entry name="[{ID}]file-shooser:entry-folder" expand="true,false" fill="true,false"/>
|
||||
<image name="[{ID}]file-shooser:img-home" src="THEME_GUI:///Home.svg?lib=ewol" expand="false" size="8,8mm"/>
|
||||
</sizer>
|
||||
<label name="[{ID}]file-shooser:title-label">_T{Title}</label>
|
||||
</sizer>
|
||||
</popup>
|
56
data/fontDistanceField/font1.frag
Normal file
@ -0,0 +1,56 @@
|
||||
#ifdef GL_ES
|
||||
#extension GL_OES_standard_derivatives : enable
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
uniform sampler2D EW_texID;
|
||||
uniform float EW_SoftEdgeMin;
|
||||
uniform float EW_SoftEdgeMax;
|
||||
uniform int EW_SoftEdge;
|
||||
|
||||
varying vec2 f_texcoord;
|
||||
varying vec4 f_color;
|
||||
varying float f_glyphLevel;
|
||||
|
||||
const float glyph_center = 0.50;
|
||||
const float outline_center = 0.55;
|
||||
const float glow_center = 1.55;
|
||||
|
||||
vec3 glyph_color = vec3(0.0,0.0,0.0);
|
||||
vec3 outline_color = vec3(0.0,0.0,0.0);
|
||||
vec3 glow_color = vec3(0.0,0.0,0.0);
|
||||
|
||||
void main(void) {
|
||||
vec4 color = texture2D(EW_texID, f_texcoord );
|
||||
float dist = color.r;
|
||||
float width = fwidth(dist);
|
||||
float alpha = smoothstep(f_glyphLevel-width, f_glyphLevel+width, dist);
|
||||
|
||||
// Smooth
|
||||
gl_FragColor = vec4(f_color[0], f_color[1], f_color[2], f_color[3]*alpha);
|
||||
//gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
// Outline
|
||||
/*
|
||||
float mu = smoothstep(outline_center-width, outline_center+width, dist);
|
||||
vec3 rgb = mix(outline_color, glyph_color, mu);
|
||||
gl_FragColor = vec4(rgb, max(alpha,mu));
|
||||
*/
|
||||
// Glow
|
||||
/*
|
||||
vec3 rgb = mix(glow_color, glyph_color, alpha);
|
||||
float mu = smoothstep(glyph_center, glow_center, sqrt(dist));
|
||||
gl_FragColor = vec4(rgb, max(alpha,mu));
|
||||
*/
|
||||
|
||||
// Glow + outline
|
||||
/*
|
||||
vec3 rgb = mix(glow_color, glyph_color, alpha);
|
||||
float mu = smoothstep(glyph_center, glow_center, sqrt(dist));
|
||||
color = vec4(rgb, max(alpha,mu));
|
||||
float beta = smoothstep(outline_center-width, outline_center+width, dist);
|
||||
rgb = mix(outline_color, color.rgb, beta);
|
||||
gl_FragColor = vec4(rgb, max(color.a,beta));
|
||||
*/
|
||||
}
|
2
data/fontDistanceField/font1.prog
Normal file
@ -0,0 +1,2 @@
|
||||
font1.vert
|
||||
font1.frag
|
53
data/fontDistanceField/font1.vert
Normal file
@ -0,0 +1,53 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
attribute vec3 EW_coord3d;
|
||||
attribute vec2 EW_texture2d;
|
||||
attribute vec4 EW_color;
|
||||
attribute float EW_glyphLevel;
|
||||
uniform mat4 EW_MatrixTransformation;
|
||||
|
||||
// output :
|
||||
varying vec4 f_color;
|
||||
varying vec2 f_texcoord;
|
||||
varying float f_glyphLevel;
|
||||
|
||||
void main(void) {
|
||||
gl_Position = EW_MatrixTransformation * vec4(EW_coord3d, 1.0);
|
||||
// set texture output coord
|
||||
f_texcoord = EW_texture2d;
|
||||
// set output color :
|
||||
f_color = EW_color;
|
||||
f_glyphLevel = EW_glyphLevel;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
// Input :
|
||||
attribute vec3 EW_coord3d;
|
||||
attribute vec2 EW_texture2d;
|
||||
attribute vec4 EW_color;
|
||||
uniform mat4 EW_MatrixTransformation;
|
||||
uniform int EW_texHeight;
|
||||
uniform int EW_texWidth;
|
||||
|
||||
// output :
|
||||
varying vec4 f_color;
|
||||
varying vec2 f_texcoord;
|
||||
varying float f_onestepu;
|
||||
varying float f_onestepv;
|
||||
|
||||
void main(void) {
|
||||
gl_Position = EW_MatrixTransformation * vec4(EW_coord3d, 1.0);
|
||||
// set texture output coord
|
||||
f_texcoord = EW_texture2d;
|
||||
f_onestepu = 1.0 / float(EW_texWidth);
|
||||
f_onestepv = 1.0 / float(EW_texHeight);
|
||||
// set output color :
|
||||
f_color = EW_color;
|
||||
}
|
||||
|
||||
*/
|
129
data/fontDistanceField/font2.frag
Normal file
@ -0,0 +1,129 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
uniform sampler2D EW_texID;
|
||||
uniform float EW_SoftEdgeMin;
|
||||
uniform float EW_SoftEdgeMax;
|
||||
uniform int EW_SoftEdge;
|
||||
uniform int EW_texHeight;
|
||||
uniform int EW_texWidth;
|
||||
|
||||
varying vec2 f_texcoord;
|
||||
varying vec4 f_color;
|
||||
varying float f_onestepu;
|
||||
varying float f_onestepv;
|
||||
|
||||
const float glyph_center = 0.50;
|
||||
const float outline_center = 0.55;
|
||||
const float glow_center = 1.25;
|
||||
|
||||
vec3 glyph_color = vec3(1.0,1.0,1.0);
|
||||
vec3 outline_color = vec3(0.0,0.0,0.0);
|
||||
vec3 glow_color = vec3(0.0,1.0,0.0);
|
||||
|
||||
void main(void) {
|
||||
|
||||
// Scale texcoords to range ([0,texw], [0,texh])
|
||||
vec2 uv = f_texcoord * vec2(EW_texWidth, EW_texHeight);
|
||||
|
||||
// Compute texel-local (u,v) coordinates for the four closest texels
|
||||
vec2 uv00 = floor(uv - vec2(0.5)); // Lower left corner of lower left texel
|
||||
vec2 uvthis = floor(uv); // Lower left corner of texel containing (u,v)
|
||||
vec2 uvlerp = uv - uv00 - vec2(0.5); // Texel-local lerp blends [0,1]
|
||||
|
||||
// Perform explicit texture interpolation of D coefficient.
|
||||
// This works around the currently very bad texture interpolation
|
||||
// precision in ATI hardware.
|
||||
|
||||
// Center st00 on lower left texel and rescale to [0,1] for texture lookup
|
||||
vec2 st00 = (uv00 + vec2(0.5)) * vec2(f_onestepu, f_onestepv);
|
||||
|
||||
// Compute g_u, g_v, D coefficients from four closest 8-bit RGBA texels
|
||||
vec4 rawtex00 = texture2D(EW_texID, st00);
|
||||
vec4 rawtex10 = texture2D(EW_texID, st00 + vec2(0.5*f_onestepu, 0.0));
|
||||
vec4 rawtex01 = texture2D(EW_texID, st00 + vec2(0.0, 0.5*f_onestepv));
|
||||
vec4 rawtex11 = texture2D(EW_texID, st00 + vec2(0.5*f_onestepu, 0.5*f_onestepv));
|
||||
|
||||
// Restore the value for D from its 8-bit encoding
|
||||
vec2 D00_10 = 16.0*(vec2(rawtex00.r, rawtex10.r)-0.50196);
|
||||
vec2 D01_11 = 16.0*(vec2(rawtex01.r, rawtex11.r)-0.50196);
|
||||
|
||||
// Interpolate D between four closest texels
|
||||
vec2 uvlocal = fract(uv)-0.5; // Texel-local uv coordinates [-0.5,0.5]
|
||||
// Interpolate along v
|
||||
vec2 D0_1 = mix(D00_10, D01_11, uvlerp.y);
|
||||
// Interpolate along u
|
||||
float D = mix(D0_1.x, D0_1.y, uvlerp.x);
|
||||
|
||||
// Perform anisotropic analytic antialiasing (fwidth() is slightly wrong)
|
||||
float aastep = length(vec2(dFdx(D), dFdy(D)));
|
||||
|
||||
// 'pattern' is 1 where D>0, 0 where D<0, with proper AA around D=0.
|
||||
float pattern = smoothstep(-aastep, aastep, D);
|
||||
|
||||
// Final fragment color
|
||||
gl_FragColor = vec4(f_color[0], f_color[1], f_color[2], f_color[3]*pattern);
|
||||
|
||||
}
|
||||
#if 0
|
||||
// Distance map contour texturing, Stefan Gustavson 2009
|
||||
// A re-implementation of Green's method, with an
|
||||
// 8-bit distance map but explicit texel interpolation.
|
||||
// This code is in the public domain.
|
||||
|
||||
uniform sampler2D disttexture, reftexture;
|
||||
uniform float texw, texh;
|
||||
varying float onestepu, onestepv;
|
||||
varying vec2 st;
|
||||
|
||||
void main( void )
|
||||
{
|
||||
// Scale texcoords to range ([0,texw], [0,texh])
|
||||
vec2 uv = st * vec2(texw, texh);
|
||||
|
||||
// Compute texel-local (u,v) coordinates for the four closest texels
|
||||
vec2 uv00 = floor(uv - vec2(0.5)); // Lower left corner of lower left texel
|
||||
vec2 uvthis = floor(uv); // Lower left corner of texel containing (u,v)
|
||||
vec2 uvlerp = uv - uv00 - vec2(0.5); // Texel-local lerp blends [0,1]
|
||||
|
||||
// Perform explicit texture interpolation of D coefficient.
|
||||
// This works around the currently very bad texture interpolation
|
||||
// precision in ATI hardware.
|
||||
|
||||
// Center st00 on lower left texel and rescale to [0,1] for texture lookup
|
||||
vec2 st00 = (uv00 + vec2(0.5)) * vec2(onestepu, onestepv);
|
||||
|
||||
// Compute g_u, g_v, D coefficients from four closest 8-bit RGBA texels
|
||||
vec4 rawtex00 = texture2D(disttexture, st00);
|
||||
vec4 rawtex10 = texture2D(disttexture, st00 + vec2(0.5*onestepu, 0.0));
|
||||
vec4 rawtex01 = texture2D(disttexture, st00 + vec2(0.0, 0.5*onestepv));
|
||||
vec4 rawtex11 = texture2D(disttexture, st00 + vec2(0.5*onestepu, 0.5*onestepv));
|
||||
|
||||
// Restore the value for D from its 8-bit encoding
|
||||
vec2 D00_10 = 16.0*(vec2(rawtex00.r, rawtex10.r)-0.50196);
|
||||
vec2 D01_11 = 16.0*(vec2(rawtex01.r, rawtex11.r)-0.50196);
|
||||
|
||||
// Interpolate D between four closest texels
|
||||
vec2 uvlocal = fract(uv)-0.5; // Texel-local uv coordinates [-0.5,0.5]
|
||||
// Interpolate along v
|
||||
vec2 D0_1 = mix(D00_10, D01_11, uvlerp.y);
|
||||
// Interpolate along u
|
||||
float D = mix(D0_1.x, D0_1.y, uvlerp.x);
|
||||
|
||||
// Perform anisotropic analytic antialiasing (fwidth() is slightly wrong)
|
||||
float aastep = length(vec2(dFdx(D), dFdy(D)));
|
||||
|
||||
// 'pattern' is 1 where D>0, 0 where D<0, with proper AA around D=0.
|
||||
float pattern = smoothstep(-aastep, aastep, D);
|
||||
|
||||
// 'bitmap' is a regular grayscale texture with AA for comparison.
|
||||
vec2 uvoffset = uvthis - uv00; // 0 or 1 depending on (u,v) quadrant
|
||||
float bitmap = texture2D(reftexture, st00+uvoffset*vec2(onestepu, onestepv)).r;
|
||||
|
||||
// Final fragment color
|
||||
gl_FragColor = vec4(bitmap, pattern, bitmap, 1.0);
|
||||
}
|
||||
#endif
|
67
data/icon.svg
Normal file
@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2985"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="icon.png">
|
||||
<defs
|
||||
id="defs2987" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="11"
|
||||
inkscape:cx="30.005485"
|
||||
inkscape:cy="29.382025"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="997"
|
||||
inkscape:window-x="1280"
|
||||
inkscape:window-y="-1"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3017" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata2990">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 5,34 C 3.6124106,13.444964 16.586789,5.3866714 30,4 44.970045,3.7783363 60,15 60,29 58,27 59,28 55,24 53.738505,16.334157 40.286532,8.5752748 30,9 19.754382,8.6725099 9.5334403,18.37792 10,29 c 5,0 15,0 20,0 0,5 0,10 0,15 -5,0 -15,0 -20,0 0,10 11.666667,15 20,15 8.333333,0 24,-6 25,-15 3,-3 1,-1 5,-5 C 60,57 49,63 30,64 18.156114,62.827224 5,59 5,39 c 5,0 15,0 20,0 0,-3 0,-2 0,-5 -5,0 -15,0 -20,0 z"
|
||||
id="path3854"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccccccccc" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
10
data/simple3D.frag
Normal file
@ -0,0 +1,10 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
varying vec4 f_color;
|
||||
|
||||
void main(void) {
|
||||
gl_FragColor = f_color;
|
||||
}
|
2
data/simple3D.prog
Normal file
@ -0,0 +1,2 @@
|
||||
simple3D.vert
|
||||
simple3D.frag
|
18
data/simple3D.vert
Normal file
@ -0,0 +1,18 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
attribute vec3 EW_coord3d;
|
||||
uniform vec4 EW_color;
|
||||
uniform mat4 EW_MatrixTransformation;
|
||||
|
||||
// output :
|
||||
varying vec4 f_color;
|
||||
|
||||
void main(void) {
|
||||
gl_Position = EW_MatrixTransformation * vec4(EW_coord3d, 1.0);
|
||||
//gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * vec4(EW_coord2d, 0.0, 1.0);
|
||||
f_color = EW_color;
|
||||
}
|
41
data/text.frag
Normal file
@ -0,0 +1,41 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
uniform sampler2D EW_texID;
|
||||
|
||||
varying vec2 f_texcoord;
|
||||
varying vec4 f_color;
|
||||
/*
|
||||
void main(void) {
|
||||
gl_FragColor = f_color;
|
||||
vec2 tmpCoord = f_texcoord;
|
||||
tmpCoord = mod(tmpCoord, 1.0);
|
||||
vec4 map = texture2D(EW_texID, tmpCoord);
|
||||
if (f_texcoord.x<1.0) {
|
||||
// normal font :
|
||||
gl_FragColor.a = gl_FragColor.a*map.a;
|
||||
} else if (f_texcoord.x<2.0) {
|
||||
// Italic font :
|
||||
gl_FragColor.a = gl_FragColor.a*map.r;
|
||||
} else if (f_texcoord.x<3.0) {
|
||||
// Bold font :
|
||||
gl_FragColor.a = gl_FragColor.a*map.g;
|
||||
} else {
|
||||
// bold italic font :
|
||||
gl_FragColor.a = gl_FragColor.a*map.b;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
varying vec4 f_patern;
|
||||
|
||||
void main(void) {
|
||||
gl_FragColor = f_color;
|
||||
vec4 map = texture2D(EW_texID, f_texcoord);
|
||||
float alphaCoef = dot(map, f_patern);
|
||||
gl_FragColor.a = gl_FragColor.a*alphaCoef;
|
||||
}
|
||||
|
2
data/text.prog
Normal file
@ -0,0 +1,2 @@
|
||||
text.vert
|
||||
text.frag
|
47
data/text.vert
Normal file
@ -0,0 +1,47 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
attribute vec3 EW_coord3d;
|
||||
attribute vec2 EW_texture2d;
|
||||
attribute vec4 EW_color;
|
||||
uniform mat4 EW_MatrixTransformation;
|
||||
|
||||
// output :
|
||||
varying vec4 f_color;
|
||||
varying vec2 f_texcoord;
|
||||
/*
|
||||
void main(void) {
|
||||
gl_Position = EW_MatrixTransformation * vec4(EW_coord2d, 0.0, 1.0);
|
||||
//gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * vec4(EW_coord2d, 0.0, 1.0);
|
||||
// set texture output coord
|
||||
f_texcoord = EW_texture2d;
|
||||
// set output color :
|
||||
f_color = EW_color;
|
||||
}
|
||||
*/
|
||||
varying vec4 f_patern;
|
||||
void main(void) {
|
||||
gl_Position = EW_MatrixTransformation * vec4(EW_coord3d, 1.0);
|
||||
//gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * vec4(EW_coord2d, 0.0, 1.0);
|
||||
// set output color :
|
||||
f_color = EW_color;
|
||||
if (EW_texture2d.x<1.0) {
|
||||
// normal font :
|
||||
f_patern = vec4 (0.0, 0.0, 0.0, 1.0);
|
||||
} else if (EW_texture2d.x<2.0) {
|
||||
// Italic font :
|
||||
f_patern = vec4 (1.0, 0.0, 0.0, 0.0);
|
||||
} else if (EW_texture2d.x<3.0) {
|
||||
// Bold font :
|
||||
f_patern = vec4 (0.0, 1.0, 0.0, 0.0);
|
||||
} else {
|
||||
// bold italic font :
|
||||
f_patern = vec4 (0.0, 0.0, 1.0, 0.0);
|
||||
}
|
||||
// set texture output coord
|
||||
f_texcoord = mod(EW_texture2d, 1.0);
|
||||
}
|
||||
|
14
data/textured.frag
Normal file
@ -0,0 +1,14 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
uniform sampler2D EW_texID;
|
||||
|
||||
varying vec2 f_texcoord;
|
||||
varying vec4 f_color;
|
||||
|
||||
void main(void) {
|
||||
gl_FragColor = texture2D(EW_texID, f_texcoord) * f_color;
|
||||
}
|
2
data/textured.prog
Normal file
@ -0,0 +1,2 @@
|
||||
textured.vert
|
||||
textured.frag
|
22
data/textured.vert
Normal file
@ -0,0 +1,22 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
attribute vec2 EW_coord2d;
|
||||
attribute vec2 EW_texture2d;
|
||||
attribute vec4 EW_color;
|
||||
uniform mat4 EW_MatrixTransformation;
|
||||
|
||||
// output :
|
||||
varying vec4 f_color;
|
||||
varying vec2 f_texcoord;
|
||||
|
||||
void main(void) {
|
||||
gl_Position = EW_MatrixTransformation * vec4(EW_coord2d, 0.0, 1.0);
|
||||
// set texture output coord
|
||||
f_texcoord = EW_texture2d;
|
||||
// set output color :
|
||||
f_color = EW_color;
|
||||
}
|
15
data/textured3D.frag
Normal file
@ -0,0 +1,15 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
uniform sampler2D EW_texID;
|
||||
|
||||
varying vec2 f_texcoord;
|
||||
varying vec4 f_color;
|
||||
|
||||
void main(void) {
|
||||
gl_FragColor = texture2D(EW_texID, f_texcoord) * f_color;
|
||||
//gl_FragColor = vec4(1.0,1.0,0.2,0.6);
|
||||
}
|
2
data/textured3D.prog
Normal file
@ -0,0 +1,2 @@
|
||||
textured3D.vert
|
||||
textured3D.frag
|
21
data/textured3D.vert
Normal file
@ -0,0 +1,21 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
// Input :
|
||||
attribute vec3 EW_coord3d;
|
||||
attribute vec2 EW_texture2d;
|
||||
attribute vec4 EW_color;
|
||||
uniform mat4 EW_MatrixTransformation;
|
||||
|
||||
// output :
|
||||
varying vec4 f_color;
|
||||
varying vec2 f_texcoord;
|
||||
|
||||
void main(void) {
|
||||
gl_Position = EW_MatrixTransformation * vec4(EW_coord3d, 1.0);
|
||||
// set texture output coord
|
||||
f_texcoord = EW_texture2d;
|
||||
// set output color :
|
||||
f_color = EW_color;
|
||||
}
|
55
data/textured3D2.frag
Normal file
@ -0,0 +1,55 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
struct DirectionalLight {
|
||||
vec3 direction;
|
||||
vec3 halfplane;
|
||||
vec4 ambientColor;
|
||||
vec4 diffuseColor;
|
||||
vec4 specularColor;
|
||||
};
|
||||
|
||||
struct Material {
|
||||
vec4 ambientFactor;
|
||||
vec4 diffuseFactor;
|
||||
vec4 specularFactor;
|
||||
float shininess;
|
||||
};
|
||||
|
||||
// Light
|
||||
uniform DirectionalLight EW_directionalLight;
|
||||
// Material
|
||||
uniform Material EW_material;
|
||||
|
||||
// Input :
|
||||
uniform sampler2D EW_texID;
|
||||
|
||||
varying vec2 f_texcoord;
|
||||
varying vec3 v_ecNormal;
|
||||
|
||||
void main(void) {
|
||||
vec4 tmpElementColor = texture2D(EW_texID, f_texcoord);
|
||||
|
||||
// Normalize v_ecNormal
|
||||
vec3 ecNormal = v_ecNormal / length(v_ecNormal);
|
||||
|
||||
float ecNormalDotLightDirection = max(0.0, dot(ecNormal, EW_directionalLight.direction));
|
||||
float ecNormalDotLightHalfplane = max(0.0, dot(ecNormal, EW_directionalLight.halfplane));
|
||||
|
||||
// Calculate ambient light
|
||||
vec4 ambientLight = EW_directionalLight.ambientColor * EW_material.ambientFactor;
|
||||
|
||||
// Calculate diffuse light
|
||||
vec4 diffuseLight = ecNormalDotLightDirection * EW_directionalLight.diffuseColor * EW_material.diffuseFactor;
|
||||
|
||||
// Calculate specular light
|
||||
vec4 specularLight = vec4(0.0);
|
||||
|
||||
if (ecNormalDotLightHalfplane > 0.0) {
|
||||
specularLight = pow(ecNormalDotLightHalfplane, EW_material.shininess) * EW_directionalLight.specularColor * EW_material.specularFactor;
|
||||
specularLight = EW_directionalLight.specularColor * EW_material.specularFactor;
|
||||
}
|
||||
vec4 light = ambientLight + diffuseLight + specularLight;
|
||||
gl_FragColor = tmpElementColor;// * light;
|
||||
}
|
2
data/textured3D2.prog
Normal file
@ -0,0 +1,2 @@
|
||||
textured3D2.vert
|
||||
textured3D2.frag
|
25
data/textured3D2.vert
Normal file
@ -0,0 +1,25 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
// Input :
|
||||
attribute vec3 EW_coord3d;
|
||||
attribute vec2 EW_texture2d;
|
||||
attribute vec3 EW_normal;
|
||||
uniform mat4 EW_MatrixTransformation;
|
||||
uniform mat4 EW_MatrixPosition;
|
||||
|
||||
// output :
|
||||
varying vec2 f_texcoord;
|
||||
varying vec3 v_ecNormal;
|
||||
|
||||
void main(void) {
|
||||
gl_Position = EW_MatrixTransformation * EW_MatrixPosition * vec4(EW_coord3d, 1.0);
|
||||
// set texture output coord
|
||||
f_texcoord = EW_texture2d;
|
||||
mat4 MatrixPosition = EW_MatrixPosition;
|
||||
MatrixPosition[3][0] = 0.0;
|
||||
MatrixPosition[3][1] = 0.0;
|
||||
MatrixPosition[3][2] = 0.0;
|
||||
v_ecNormal = vec3(MatrixPosition * vec4(EW_normal, 1.0) );
|
||||
}
|
25
data/texturedDF.frag
Normal file
@ -0,0 +1,25 @@
|
||||
#ifdef GL_ES
|
||||
#extension GL_OES_standard_derivatives : enable
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
uniform sampler2D EW_texID;
|
||||
uniform float EW_SoftEdgeMin;
|
||||
uniform float EW_SoftEdgeMax;
|
||||
uniform int EW_SoftEdge;
|
||||
|
||||
varying vec2 f_texcoord;
|
||||
varying vec4 f_color;
|
||||
|
||||
|
||||
void main(void) {
|
||||
vec4 color = texture2D(EW_texID, f_texcoord );
|
||||
float dist = color.r;
|
||||
float width = fwidth(dist);
|
||||
float alpha = smoothstep(0.5-width, 0.5+width, dist);
|
||||
|
||||
// Smooth
|
||||
gl_FragColor = vec4(f_color[0], f_color[1], f_color[2], f_color[3]*alpha);
|
||||
}
|
22
data/texturedDF.vert
Normal file
@ -0,0 +1,22 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input :
|
||||
attribute vec3 EW_coord3d;
|
||||
attribute vec2 EW_texture2d;
|
||||
attribute vec4 EW_color;
|
||||
uniform mat4 EW_MatrixTransformation;
|
||||
|
||||
// output :
|
||||
varying vec4 f_color;
|
||||
varying vec2 f_texcoord;
|
||||
|
||||
void main(void) {
|
||||
gl_Position = EW_MatrixTransformation * vec4(EW_coord3d, 1.0);
|
||||
// set texture output coord
|
||||
f_texcoord = EW_texture2d;
|
||||
// set output color :
|
||||
f_color = EW_color;
|
||||
}
|
13
data/texturedNoMaterial.frag
Normal file
@ -0,0 +1,13 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
|
||||
// Input:
|
||||
uniform sampler2D EW_texID;
|
||||
|
||||
varying vec2 f_texcoord;
|
||||
|
||||
void main(void) {
|
||||
gl_FragColor = texture2D(EW_texID, f_texcoord);
|
||||
}
|
2
data/texturedNoMaterial.prog
Normal file
@ -0,0 +1,2 @@
|
||||
texturedNoMaterial.vert
|
||||
texturedNoMaterial.frag
|
18
data/texturedNoMaterial.vert
Normal file
@ -0,0 +1,18 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
precision mediump int;
|
||||
#endif
|
||||
// Input:
|
||||
attribute vec3 EW_coord3d;
|
||||
attribute vec2 EW_texture2d;
|
||||
uniform mat4 EW_MatrixTransformation;
|
||||
uniform mat4 EW_MatrixPosition;
|
||||
|
||||
// output:
|
||||
varying vec2 f_texcoord;
|
||||
|
||||
void main(void) {
|
||||
// set texture output coord
|
||||
f_texcoord = EW_texture2d;
|
||||
gl_Position = EW_MatrixTransformation * EW_MatrixPosition * vec4(EW_coord3d, 1.0);
|
||||
}
|
10
data/theme/color/black/Button.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"EW_background", color:"#0000" },
|
||||
{ name:"EW_border", color:"#FFF" },
|
||||
{ name:"EW_foreground", color:"#000A" },
|
||||
{ name:"EW_foregroundHover", color:"#0066" },
|
||||
{ name:"EW_foregroundSelected", color:"#060A" },
|
||||
{ name:"EW_foregroundPressed", color:"#6006" },
|
||||
]
|
||||
}
|
10
data/theme/color/black/CheckBox.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"EW_background", color:"#0000" },
|
||||
{ name:"EW_border", color:"#FFF" },
|
||||
{ name:"EW_foreground", color:"#000A" },
|
||||
{ name:"EW_foregroundHover", color:"#0066" },
|
||||
{ name:"EW_foregroundSelected", color:"#FFFA" },
|
||||
{ name:"EW_foregroundPressed", color:"#6006" },
|
||||
]
|
||||
}
|
7
data/theme/color/black/ContextMenu.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"EW_background", color:"#0000" },
|
||||
{ name:"EW_border", color:"#FFFF" },
|
||||
{ name:"EW_foreground", color:"#000A" },
|
||||
]
|
||||
}
|
13
data/theme/color/black/Entry.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"EW_background", color:"#0000" },
|
||||
{ name:"EW_foreground", color:"#000A" },
|
||||
{ name:"EW_foregroundSelected", color:"#FFF3" },
|
||||
{ name:"EW_foregroundHover", color:"#0082" },
|
||||
{ name:"EW_border", color:"#FFFF" },
|
||||
{ name:"text-foreground", color:"#CCCF" },
|
||||
{ name:"text-background", color:"#0000" },
|
||||
{ name:"text-cursor", color:"#00AF" },
|
||||
{ name:"text-selection", color:"#0A0F" },
|
||||
]
|
||||
}
|
5
data/theme/color/black/Image.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"foreground", color:"#FFFF" },
|
||||
]
|
||||
}
|
6
data/theme/color/black/Label.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"background", color:"#0000" },
|
||||
{ name:"foreground", color:"#FFFF" }
|
||||
]
|
||||
}
|
8
data/theme/color/black/ListFileSystem.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"text", color:"#EEEF" },
|
||||
{ name:"background1", color:"#111F" },
|
||||
{ name:"background2", color:"#333F" },
|
||||
{ name:"selected", color:"#338F" },
|
||||
]
|
||||
}
|
7
data/theme/color/black/PopUp.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"EW_background", color:"#000A" },
|
||||
{ name:"EW_foreground", color:"#000000F8" },
|
||||
{ name:"EW_border", color:"#FFFF" },
|
||||
]
|
||||
}
|
8
data/theme/color/black/WidgetScrolled.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"EW_background", color:"#0004" },
|
||||
{ name:"EW_border", color:"#FFF" },
|
||||
{ name:"EW_foreground", color:"#FFF9" },
|
||||
{ name:"EW_foregroundPressed", color:"#6006" },
|
||||
]
|
||||
}
|
5
data/theme/color/black/Windows.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"background", color:"#222F" },
|
||||
]
|
||||
}
|
10
data/theme/color/white/Button.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"EW_background", color:"#0000" },
|
||||
{ name:"EW_border", color:"#000" },
|
||||
{ name:"EW_foreground", color:"#8884" },
|
||||
{ name:"EW_foregroundHover", color:"#00A6" },
|
||||
{ name:"EW_foregroundSelected", color:"#0A0A" },
|
||||
{ name:"EW_foregroundPressed", color:"#A006" },
|
||||
]
|
||||
}
|
10
data/theme/color/white/CheckBox.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"EW_background", color:"#0000" },
|
||||
{ name:"EW_border", color:"#000" },
|
||||
{ name:"EW_foreground", color:"#8884" },
|
||||
{ name:"EW_foregroundHover", color:"#00A6" },
|
||||
{ name:"EW_foregroundSelected", color:"#000A" },
|
||||
{ name:"EW_foregroundPressed", color:"#000A" },
|
||||
]
|
||||
}
|
7
data/theme/color/white/ContextMenu.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"EW_background", color:"#0000" },
|
||||
{ name:"EW_border", color:"#000F" },
|
||||
{ name:"EW_foreground", color:"#FFFA" },
|
||||
]
|
||||
}
|
13
data/theme/color/white/Entry.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"EW_background", color:"#0000" },
|
||||
{ name:"EW_foreground", color:"#FFFA" },
|
||||
{ name:"EW_foregroundSelected", color:"#0005" },
|
||||
{ name:"EW_foregroundHover", color:"#55F5" },
|
||||
{ name:"EW_border", color:"#000F" },
|
||||
{ name:"text-foreground", color:"#222F" },
|
||||
{ name:"text-background", color:"#0000" },
|
||||
{ name:"text-cursor", color:"#00FF" },
|
||||
{ name:"text-selection", color:"#0A0F" },
|
||||
]
|
||||
}
|
5
data/theme/color/white/Image.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"foreground", color:"#000F" },
|
||||
]
|
||||
}
|
6
data/theme/color/white/Label.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"background", color:"#0000" },
|
||||
{ name:"foreground", color:"#000F" }
|
||||
]
|
||||
}
|
8
data/theme/color/white/ListFileSystem.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"text", color:"#111F" },
|
||||
{ name:"background1", color:"#EEEF" },
|
||||
{ name:"background2", color:"#BBBF" },
|
||||
{ name:"selected", color:"#88FF" },
|
||||
]
|
||||
}
|
7
data/theme/color/white/PopUp.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"EW_background", color:"#888A" },
|
||||
{ name:"EW_foreground", color:"#FFFFFFF0" },
|
||||
{ name:"EW_border", color:"#000F" },
|
||||
]
|
||||
}
|
8
data/theme/color/white/WidgetScrolled.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"EW_background", color:"#FFF4" },
|
||||
{ name:"EW_border", color:"#000" },
|
||||
{ name:"EW_foreground", color:"#4449" },
|
||||
{ name:"EW_foregroundPressed", color:"#B006" },
|
||||
]
|
||||
}
|
5
data/theme/color/white/Windows.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"color": [
|
||||
{ name:"background", color:"#888F" },
|
||||
]
|
||||
}
|
7
data/theme/default/Add.svg
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2,0,0,1.2,-579.7336,-567.9832)">
|
||||
<path d="m 509.778,477.486 c -12.426,0 -22.5,10.072 -22.5,22.5 0,12.426 10.074,22.5 22.5,22.5 12.428,0 22.5,-10.074 22.5,-22.5 0,-12.427 -10.072,-22.5 -22.5,-22.5 z m 11.5,25 c 0,0.549 -0.451,1 -1,1 h -6 c -0.551,0 -1.001,0.449 -1.001,1 v 6 c 0,0.549 -0.45,1 -1,1 h -5 c -0.55,0 -1,-0.451 -1,-1 v -6 c 0,-0.551 -0.45,-1 -1,-1 h -6 c -0.55,0 -1,-0.451 -1,-1 v -5 c 0,-0.551 0.45,-1 1,-1 h 6 c 0.55,0 1,-0.451 1,-1 v -6 c 0,-0.551 0.45,-1 1,-1 h 5 c 0.55,0 1,0.449 1,1 v 6 c 0,0.549 0.45,1 1.001,1 h 6 c 0.549,0 1,0.449 1,1 v 5 z"
|
||||
style="fill:#333333;fill-rule:evenodd" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 735 B |
11
data/theme/default/AtoZ.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2,0,0,1.2,-651.9616,-494.5316)">
|
||||
<path d="m 562.663,451.271 -1.24,-3.193 h -0.188 c -0.463,0.631 -0.926,1.174 -1.389,1.629 -0.463,0.457 -0.967,0.832 -1.514,1.125 -0.547,0.295 -1.16,0.512 -1.838,0.65 -0.682,0.143 -1.469,0.211 -2.365,0.211 -0.953,0 -1.836,-0.148 -2.648,-0.455 -0.813,-0.299 -1.516,-0.756 -2.111,-1.361 -0.596,-0.611 -1.061,-1.381 -1.396,-2.314 -0.336,-0.932 -0.506,-2.035 -0.506,-3.311 0,-2.494 0.799,-4.332 2.396,-5.518 1.598,-1.184 3.986,-1.838 7.168,-1.965 l 3.74,-0.125 v -1.766 c 0,-0.967 -0.279,-1.682 -0.842,-2.145 -0.559,-0.461 -1.344,-0.693 -2.354,-0.693 -1.01,0 -1.994,0.146 -2.953,0.441 -0.959,0.295 -1.924,0.688 -2.891,1.178 l -2.08,-4.246 c 1.178,-0.658 2.48,-1.177 3.908,-1.554 1.43,-0.379 2.93,-0.568 4.498,-0.568 2.93,0 5.174,0.688 6.736,2.06 1.563,1.373 2.344,3.461 2.344,6.264 v 15.658 h -4.477 v -0.002 z m -1.891,-10.887 -2.123,0.084 c -0.854,0.027 -1.578,0.141 -2.164,0.336 -0.59,0.195 -1.063,0.457 -1.42,0.787 -0.357,0.33 -0.615,0.721 -0.777,1.178 -0.16,0.455 -0.24,0.963 -0.24,1.523 0,0.98 0.238,1.678 0.713,2.092 0.477,0.412 1.102,0.619 1.871,0.619 0.59,0 1.135,-0.102 1.641,-0.305 0.504,-0.203 0.941,-0.504 1.313,-0.902 0.373,-0.4 0.662,-0.891 0.873,-1.471 0.211,-0.582 0.314,-1.252 0.314,-2.01 v -1.931 l -10e-4,0 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 568.976,440.552 v -4.244 h 9.549 v 4.244 h -9.549 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 592.468,451.241 h -17.279 v -3.785 l 9.607,-14.816 h -8.953 v -4.896 h 16.225 v 4.159 l -9.289,14.441 h 9.689 v 4.897 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
7
data/theme/default/Attache.svg
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.199923,0,0,1.199923,-436.75556,-134.85476)">
|
||||
<path d="m 374.192,161.556 c -1.619,0 -3.152,-0.607 -4.269,-1.707 -1.237,-1.221 -1.877,-2.961 -1.755,-4.776 l 0.501,-7.477 c 0.198,-2.952 1.959,-6.933 4.009,-9.065 l 20.588,-21.415 c 0.854,-0.89 2.268,-0.916 3.154,-0.063 0.886,0.853 0.916,2.266 0.063,3.154 l -20.589,21.416 c -1.347,1.401 -2.644,4.331 -2.772,6.271 l -0.502,7.477 c -0.035,0.526 0.119,0.988 0.436,1.3 0.317,0.312 0.776,0.465 1.306,0.417 l 6.095,-0.496 c 1.936,-0.158 4.842,-1.497 6.219,-2.865 l 21.382,-21.251 c 0.413,-0.411 0.64,-0.957 0.637,-1.537 -0.005,-0.58 -0.236,-1.123 -0.655,-1.529 l -4.043,-3.92 c -0.874,-0.847 -2.334,-0.832 -3.189,0.037 l -16.287,16.555 c -0.512,0.521 -0.809,1.177 -0.794,1.759 0.007,0.303 0.097,0.537 0.268,0.693 0.524,0.485 1.872,0.332 2.826,-0.589 l 12.685,-12.247 c 0.886,-0.856 2.297,-0.831 3.154,0.056 0.855,0.886 0.83,2.298 -0.057,3.153 l -12.684,12.248 c -2.605,2.517 -6.623,2.811 -8.952,0.656 -1.06,-0.979 -1.664,-2.352 -1.7,-3.865 -0.043,-1.788 0.713,-3.608 2.072,-4.992 l 16.289,-16.556 c 2.582,-2.623 6.83,-2.675 9.475,-0.111 l 4.043,3.92 c 1.285,1.246 2,2.917 2.01,4.705 0.012,1.788 -0.682,3.467 -1.952,4.729 l -21.382,21.25 c -2.098,2.086 -6.053,3.907 -9.002,4.148 l -6.094,0.496 c -0.18,0.013 -0.358,0.021 -0.534,0.021 l 0,0 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
13
data/theme/default/CaseSensitive.svg
Normal file
@ -0,0 +1,13 @@
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="64" width="64" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<path d="M57.268,52.064,55.78,48.233h-0.2256c-0.5556,0.7572-1.1112,1.4088-1.6668,1.9548-0.5556,0.5484-1.1604,0.9984-1.8168,1.35-0.6564,0.354-1.392,0.6144-2.2056,0.78-0.8184,0.1716-1.7628,0.2532-2.838,0.2532-1.1436,0-2.2032-0.1776-3.1776-0.546-0.9756-0.3588-1.8192-0.9072-2.5332-1.6332-0.7152-0.7332-1.2732-1.6572-1.6752-2.7768-0.4032-1.1184-0.6072-2.442-0.6072-3.9732,0-2.9928,0.9588-5.1984,2.8752-6.6216,1.9176-1.4208,4.7832-2.2056,8.6016-2.358l4.488-0.15v-2.1192c0-1.1604-0.3348-2.0184-1.0104-2.574-0.6708-0.5532-1.6128-0.8316-2.8248-0.8316s-2.3928,0.1752-3.5436,0.5292-2.3088,0.8256-3.4692,1.4136l-2.496-5.0952c1.4136-0.7896,2.976-1.4124,4.6896-1.8648,1.716-0.4548,3.516-0.6816,5.3976-0.6816,3.516,0,6.2088,0.8256,8.0832,2.472,1.8756,1.6476,2.8128,4.1532,2.8128,7.5168v18.79h-5.3724v-0.0024zm-0.781-9.233-2.548,0.101c-1.0248,0.0324-1.8936,0.1692-2.5968,0.4032-0.708,0.234-1.2756,0.5484-1.704,0.9444s-0.738,0.8652-0.9324,1.4136c-0.192,0.546-0.288,1.1556-0.288,1.8276,0,1.176,0.2856,2.0136,0.8556,2.5104,0.5724,0.4944,1.3224,0.7428,2.2452,0.7428,0.708,0,1.362-0.1224,1.9692-0.366,0.6048-0.2436,1.1292-0.6048,1.5756-1.0824,0.4476-0.48,0.7944-1.0692,1.0476-1.7652,0.252-0.699,0.376-1.503,0.376-2.413v-2.317h-0.0012z" fill="#333"/>
|
||||
<path d="M26,38,14,38,9,54,3,54,17,9h6l8,25h-6l-5-18-5,18h16l6,20h-6z" fill="#333"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
66
data/theme/default/ChevronLeft.svg
Normal file
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="64"
|
||||
height="64"
|
||||
viewBox="0 0 64 64"
|
||||
enable-background="new 0 0 24 24"
|
||||
xml:space="preserve"
|
||||
id="svg8"
|
||||
sodipodi:docname="ChevronLeft.svg"
|
||||
inkscape:version="0.92.2 2405546, 2018-03-11"><metadata
|
||||
id="metadata14"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs12" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1038"
|
||||
id="namedview10"
|
||||
showgrid="true"
|
||||
showguides="true"
|
||||
inkscape:zoom="27.812867"
|
||||
inkscape:cx="35.880854"
|
||||
inkscape:cy="43.550446"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="20"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg8"><inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid821" /></sodipodi:namedview>
|
||||
<g
|
||||
id="Bounding_Boxes"
|
||||
transform="translate(0,40)">
|
||||
<path
|
||||
d="M 0,0 H 24 V 24 H 0 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none" />
|
||||
</g>
|
||||
<g
|
||||
id="Outline_1_"
|
||||
transform="matrix(4.1679329,0,0,4.1679329,-16.912008,-18.015195)">
|
||||
<path
|
||||
d="M 15.41,7.41 14,6 8,12 14,18 15.41,16.59 10.83,12 Z"
|
||||
id="path5"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
66
data/theme/default/ChevronLess.svg
Normal file
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="64"
|
||||
height="64"
|
||||
viewBox="0 0 64 64"
|
||||
enable-background="new 0 0 24 24"
|
||||
xml:space="preserve"
|
||||
id="svg8"
|
||||
sodipodi:docname="ChevronLess.svg"
|
||||
inkscape:version="0.92.2 2405546, 2018-03-11"><metadata
|
||||
id="metadata14"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs12" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1038"
|
||||
id="namedview10"
|
||||
showgrid="true"
|
||||
showguides="true"
|
||||
inkscape:zoom="13.906433"
|
||||
inkscape:cx="45.005732"
|
||||
inkscape:cy="37.911807"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="20"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg8"><inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid821" /></sodipodi:namedview>
|
||||
<g
|
||||
id="Bounding_Boxes"
|
||||
transform="translate(0,40)">
|
||||
<path
|
||||
d="M 0,0 H 24 V 24 H 0 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none" />
|
||||
</g>
|
||||
<g
|
||||
id="Outline_1_"
|
||||
transform="matrix(0,4.1679329,-4.1679329,0,81.888841,-16.785655)">
|
||||
<path
|
||||
d="M 15.41,7.41 14,6 8,12 14,18 15.41,16.59 10.83,12 Z"
|
||||
id="path5"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
66
data/theme/default/ChevronMore.svg
Normal file
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="64"
|
||||
height="64"
|
||||
viewBox="0 0 64 64"
|
||||
enable-background="new 0 0 24 24"
|
||||
xml:space="preserve"
|
||||
id="svg8"
|
||||
sodipodi:docname="ChevronMore.svg"
|
||||
inkscape:version="0.92.2 2405546, 2018-03-11"><metadata
|
||||
id="metadata14"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs12" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1918"
|
||||
inkscape:window-height="1038"
|
||||
id="namedview10"
|
||||
showgrid="true"
|
||||
showguides="true"
|
||||
inkscape:zoom="13.906433"
|
||||
inkscape:cx="45.005732"
|
||||
inkscape:cy="37.911807"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="20"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg8"><inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid821" /></sodipodi:namedview>
|
||||
<g
|
||||
id="Bounding_Boxes"
|
||||
transform="translate(0,40)">
|
||||
<path
|
||||
d="M 0,0 H 24 V 24 H 0 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none" />
|
||||
</g>
|
||||
<g
|
||||
id="Outline_1_"
|
||||
transform="matrix(0,-4.1679329,-4.1679329,0,81.888841,80.785654)">
|
||||
<path
|
||||
d="M 15.41,7.41 14,6 8,12 14,18 15.41,16.59 10.83,12 Z"
|
||||
id="path5"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |