Compare commits

...

1253 Commits
0.0.3 ... main

Author SHA1 Message Date
30fb41bb62 [RELEASE] Release v1.0.0 2021-02-16 21:46:54 +01:00
f808211bd3 [DEBUG] update new API of lutin log 2019-05-03 10:18:22 +02:00
bfedb5336e [DEV] update label widget 2019-04-01 22:04:10 +02:00
1cfa68a23f [DEBUG] correct basic font folder 2019-04-01 22:03:49 +02:00
5c2ba27cc5 [DEV] reduce some log level 2018-10-30 22:05:39 +01:00
160a7dec30 [DEV] update of new etk Uri API 2018-10-23 22:17:53 +02:00
efd3b160ad [DEBUG] correct distance field 2018-10-23 22:17:20 +02:00
844aaa90dd [DEV] update new URI and treeview 2018-10-09 23:03:07 +02:00
dbe995abd8 [DEV] update for build URI 2018-09-29 21:58:25 +02:00
532b64a1f0 [DEV] integrate the new interface of URI and file 2018-09-24 23:26:07 +02:00
63ac2d7e07 [DEBUG] some big correction on the treeview... 2018-08-29 21:15:05 +02:00
6454bf59c4 [DEV] reduce size of display 2018-08-27 22:56:19 +02:00
f522c759d6 [DEV] remove log 2018-08-24 21:54:22 +02:00
6ea7014244 [DEV] tree view start to be funny ==> now I can thing to to a browser 2018-08-21 23:29:23 +02:00
0d0cb02b85 [DEV] add subElement 2018-08-20 22:25:50 +02:00
0b2e9d4129 [DEV] add treeView fist element Draw 2018-08-20 22:46:06 +02:00
ba31625447 [DEV] add sample treeview 2018-08-19 22:53:47 +02:00
84769bc26e [DEV] correct the scrolling and remove display of hiden element in the list 2018-08-18 08:49:29 +02:00
dd373e1d2d [DEV] check backgroud exist to apply an action of draw 2018-08-18 08:48:38 +02:00
4dee6004c3 [DEV] remove get title in the list ==> never used 2018-08-18 08:47:49 +02:00
3da1b84016 [DEV] remove deprecated function in list 2018-08-18 08:46:57 +02:00
44130c4cd7 [DEV] set fill in X and Y 2018-08-18 08:46:13 +02:00
e0bcf4f84c [DEV] force le X max scroll to 1 2018-08-18 08:44:02 +02:00
5d53bed86b [DEV] list start to be correct 2018-08-17 21:52:33 +02:00
7bab80da4f [DEV] start chage the API of the ListView to be ready to do a treeView 2018-08-16 22:08:49 +02:00
7e9d2e5f74 [DEV] update etk null 2018-06-19 22:13:48 +02:00
678fe13631 [DEV] update typo toUpper toLower 2018-04-05 21:34:07 +02:00
07e00cc906 [DEBUG] remove filter in the Entry due to the etk::regex capabilities (add regression in functionnality) 2017-11-23 23:23:12 +01:00
7eb68dfa72 [DEBUG] build back tools & sample 2017-11-07 10:19:06 +01:00
dd8daa7e3d [DEV] update to the new ETK allocator wrapper 2017-10-21 19:05:21 +02:00
b8a2210d0d [DEV] rename Image.cpp in TextureFile.cpp and better image widget 2017-10-09 23:49:32 +02:00
50f0f350ed [DEV] try correct image compositing 2017-10-09 10:11:39 +02:00
d2ce3d279c [DEBUG] correct image sizing 2017-10-03 10:24:00 +02:00
94e69dbdec [DEBUG] add missing stream header 2017-09-26 15:49:27 +02:00
7958673b8d [DEBUG] continue removing STL 2017-09-17 15:23:44 +02:00
4885d7c685 [DEV/DEBUG] No stl start to work (add manual type declaration (NO RTTI)) 2017-09-17 00:12:49 +02:00
b66827c6de [DEV] continue removing STL 2017-09-14 00:59:21 +02:00
4aada212ac [DEV] remove STL 2017-09-07 23:38:26 +02:00
5d31353f69 [DEBUG] correct build 2017-08-30 22:35:58 +02:00
6493e83dbe [DEV] continue removing stl 2017-08-28 00:05:43 +02:00
c76ce3b339 [DEBUG] update new API of Gale left-right shift ... 2017-08-10 21:02:25 +02:00
3ea06311df [DEBUG] correct run on MAcOs 2017-08-04 22:15:15 +02:00
faacdc3b0e [DEBUG] wrong #endif 2017-06-28 23:10:58 +02:00
e789c16872 [DEV] update triangle draw 2017-06-28 21:56:26 +02:00
9f4250cbdc [DEV] Add capability to use FBO (Frame Buffer Object) 2017-06-28 08:29:17 +02:00
bd0c899654 [DEV] add an api to set texture in compsiting::Image ==> need to rework this API 2017-06-25 15:01:32 +02:00
eac0a5828c [DEV] faster push of texture 2017-06-18 14:01:02 +02:00
d9c11ad667 [DEV] update basic form axis 2017-06-01 22:24:17 +02:00
48efe503a7 [DEV] AABB draw lines 2017-05-22 23:34:05 +00:00
1ac5daa456 [DEV] add some cone, sphere, capsule and cylinder at the 3d object element 2017-05-22 21:36:58 +02:00
dbe62ed3d5 [DEBUG] compile without linear lib 2017-05-17 23:11:13 +00:00
307d620d45 [DEV] update new API etk 2017-05-16 21:06:21 +02:00
9020e4c188 [DEV] add log info in release 2017-05-05 22:22:30 +02:00
0a12e94847 [DEV] add support of scolling selection on X and Y and not a single value 2017-04-28 21:33:51 +02:00
254f2d0137 [DEV] add suport oh hidding pasword in entry 2017-04-28 21:33:10 +02:00
225633ffeb [DEV] set ewol::Widget::markToRedraw() in public 2017-04-27 22:31:57 +02:00
0275a524b2 [DEBUG] try a better bug management of no font 2017-04-25 23:36:08 +02:00
0b0cbfc30d [DEV] Remove API of the the annimation (bad designed) 2017-04-18 22:35:46 +02:00
d552f2baa2 [DEV] add reset scroll origin 2017-04-17 22:23:17 +02:00
fea01d57c3 [DEV/DEBUG] move basic images & add ewol-data & update property menu & debug display error of images 2017-03-07 22:06:36 +01:00
f9de81b2fb [DEBUG] add init of etranslate to remove error 2017-03-06 22:43:08 +01:00
e61234d586 [DEBUG/DEV] correct the loading of the composer and add the spacer in menu 2017-02-21 23:41:52 +01:00
1a930f5886 [DEV] add menu loading with xml data 2017-02-07 21:28:54 +01:00
3acf0bd148 [DEV] better integration of the file chooser 2017-02-03 22:26:32 +01:00
9c8a3513a6 [DEBUG] opengl es 2 on PC not work identicaly as embended board 2017-01-30 23:32:10 +01:00
487d265b66 [DEBUG] remove openGL call not existing in openGL-ES2 2017-01-18 22:02:36 +01:00
111b3bf587 Change licence APACHE-2 to MPL-2 ==> force source redistribution and permit static link 2017-01-05 21:28:23 +01:00
6e7af3cbb4 [DEV] not set the image in compositing if it does not change 2017-01-03 21:06:50 +01:00
54f4040a8d [DEBUG] many correction on image display ==> need to work again on it 2016-12-20 21:45:47 +01:00
c3a5f9ae64 [DEV] better integration of shortcut 2016-11-10 21:04:26 +01:00
00a7134a89 [DEV] continue integration of Web interface 2016-11-09 21:48:06 +01:00
6b859a45a1 [DEBUG] correct the VBO FULL implement 2016-11-08 22:17:47 +01:00
95bff828d8 [DEBUG] correct seg fault 2016-11-06 21:19:08 +01:00
2ad64a73fb [DEV] update to Web build mode (not finish) 2016-11-04 22:54:25 +01:00
c7f95a96c7 [DOC] add a framework overview 2016-10-27 23:45:30 +02:00
fc5c63d53d [DEV] update dev tag version 2016-10-25 21:56:55 +02:00
cfc2428268 [RELEASE] new version 0.10.0 2016-10-25 21:56:55 +02:00
f6f440efc6 [DEBUG] correct ewol depreacation of periodicCall 2016-10-25 21:56:55 +02:00
a3bf31527e [DEBUG] correct ewol depreacation of ewol::getBoardType and ewol::getCompilationMode 2016-10-25 21:56:55 +02:00
94a1e77ee7 [CI] update CI 2016-10-24 22:57:45 +02:00
6778140a1d [DEV] remove periodic call 2016-10-22 23:07:52 +02:00
3cc6e1577e [DEV] update to echrono 2016-10-14 21:13:39 +02:00
b451e97293 [DEBUG] correct throw of the Windows port of get language 2016-10-13 22:04:31 +02:00
9e9b8e0e02 [DEV] remove dependency of unistd.h 2016-10-13 21:29:18 +02:00
adbc99df96 [DEBUG] correct the language translation error 2016-10-13 21:08:15 +02:00
ccaf9e4bba [DEV] update platform test 2016-10-12 21:53:48 +02:00
43db52473e [DEV] continue integration of gale test 2016-10-10 23:18:07 +02:00
f39f7b69a8 [DEV] start a dev tool toi tes gale platform API 2016-10-06 23:58:56 +02:00
4632a3b939 [DEV] downgrade some logs 2016-10-06 22:31:25 +02:00
0cf4e92bc9 [DEBUG] correct version number 2016-10-06 21:42:40 +02:00
b3cad882f8 [DEV] Update new lutin 2.2.0 (no legacy support) 2016-10-04 23:41:29 +02:00
891117fcfc [DEBUG] correct .hpp port + clean libC include 2016-10-02 23:49:03 +02:00
4064951d55 [DEV/API] change .h in .hpp 2016-10-02 22:25:42 +02:00
f91a2f6009 [DEV] set object manager thread safe, set MacOs texture correct size and remove store of all texture 2016-09-21 21:35:13 +02:00
e6cab1e0cb [DOC] update done for doxygen over doxy 2016-09-16 22:35:06 +02:00
980220eb8c [DOC] continue rework 2016-09-15 22:43:04 +02:00
3e89966314 [DEV] update dev tag version 2016-09-12 21:07:12 +02:00
f70ef06c34 [RELEASE] create release 0.9.9 2016-09-12 21:06:37 +02:00
1b6bff8f52 [DEV] update to future lutin 2.0 2016-09-08 21:35:02 +02:00
1317156b5d [DEV] update dev tag version 2016-08-30 22:54:57 +02:00
5e42876e0b [RELEASE] create release 0.9.8 2016-08-30 22:54:57 +02:00
ce98d39d34 [DEV/DEBUG] update esignal removing ISignal and correct pop-up auto exit and widget slider callback 2016-08-11 23:34:43 +02:00
ca1b8144b5 [DEV] remove unnedded log 2016-08-01 00:28:57 +02:00
bc36856032 [DEV] correct image init 2016-07-25 22:33:45 +02:00
3424a52ea0 [DEV] init at the god way by default 2016-07-25 21:42:00 +02:00
6e93c37f87 [DEBUG] update egami image loader 2016-07-24 14:23:00 +02:00
2b4a68652e [DEBUG] build back of visual test 2016-07-19 22:31:27 +02:00
ad554b54ed [DEV] update sharedPtr 2016-07-19 21:43:58 +02:00
0d94650b4b [DEV] update new ememory::SharedPtr 2016-07-15 21:22:11 +02:00
88382c2564 [DEV] Update change of egami new API 2016-07-13 22:27:54 +02:00
21581a6ce0 [DEV] update the change on 'enum' to 'enum class' 2016-04-29 23:16:07 +02:00
a9ca1f12f8 [DEV] remove interline in header 2016-04-29 22:33:47 +02:00
33992063e6 [DEV] update to ne new ejson API (remove helper) 2016-04-28 23:46:12 +02:00
be029b9103 [DEV] butter interface on the texture push 2016-04-24 16:26:40 +02:00
f471429ac3 [DEBUG] try to find the problem of opening png file 2016-04-22 23:46:19 +02:00
06842eeafb [DEV] update new ejson interface 2016-04-20 21:19:11 +02:00
f5a50d26a6 [DEV] some custum code fix (rm __class__ and add @file 2016-04-19 22:46:06 +02:00
43c46cddd5 [DEBUG] correct segfault after updating for exml 2016-04-19 21:46:51 +02:00
faad7fcd41 [DEV] Update with the new exml API 2016-04-18 21:01:17 +02:00
75e42b9bfe [DEV/DOC] update doxy and new eproperty and new etk::FSNode 2016-04-08 22:55:16 +02:00
bcbafc57d9 [DOC] @not-in-doc ==> @not_in_docand better display of documentation 2016-04-01 21:17:25 +02:00
a062b31ff7 [DEV] use doxygen documentation and update doc to markdown 2016-03-30 21:40:01 +02:00
a1e59a95e3 [DOC] better compleate doc 2016-03-24 21:54:13 +01:00
d82ea4335e [DOC] update documentation 2016-03-23 21:44:32 +01:00
2cc41d2152 [DEV] better interface of the properties tools 2016-03-22 22:18:16 +01:00
6c3a78560a [DEV] correct tool and add Scroll property 2016-03-20 22:46:10 +01:00
d01d270135 [DEV] some correction 2016-03-18 21:26:39 +01:00
fe3242a16f [DEV] update the test software 2016-03-17 23:41:10 +01:00
6f46902445 [DEV] add signal declaration 2016-03-17 21:18:57 +01:00
6f68563d50 [DEV] review interface (step 1) 2016-03-16 21:42:49 +01:00
2e4e1545ad [DEBUG] can not create a widget with name 2016-03-15 21:11:08 +01:00
34357ed6eb [DEV] add doc and better code 2016-03-15 22:01:19 +01:00
7bddada9b8 [DEBUG] when remove a pop up composer, the composer widget is not removed ... add property to do it 2016-03-15 21:38:55 +01:00
c2b77dea53 [DEV] Set label directly on the property 2016-03-15 21:35:12 +01:00
5ebfea1c27 [DEBUG] correct the set of a label in the create factory 2016-03-15 21:34:54 +01:00
229f45d158 [DEV] add override attribute 2016-03-10 23:48:55 +01:00
f1a0b784f6 [DEV] review translation methodologe and position 2016-03-10 22:15:55 +01:00
2abb546c5e [DEV] update of external of elog and ethread 2016-03-08 21:29:34 +01:00
9e7d41f266 [DEV] start abstraction of using shared_ptr and weak_ptr to bench some other implementation thread safe ... 2016-03-07 23:32:59 +01:00
9371f59962 [DEV] simplify factory 2016-03-07 21:50:25 +01:00
d1caa7cb3b [DEV] try variant implementation 2016-03-04 22:20:28 +01:00
c2bc4c553c [DEV] update new property interface 2016-03-02 21:51:44 +01:00
11577515ff [DEV] update new e-property 2016-02-24 22:29:01 +01:00
b6fa9c95e0 [DEV] update new interface of esignal 2016-02-22 22:33:51 +01:00
b22014b3f6 [DEV] update new esignal (not build) 2016-02-19 23:33:00 +01:00
1bbc8c08cc [DEBUG] add missing declaration and corect segfault 2016-02-15 22:10:33 +01:00
e6e817bfcd [DEV] continue integration of property (build but seg fault) 2016-02-14 15:04:44 +01:00
1a3bbc297c [DEV] start think of new simplest API for properties (not build and not work) 2016-02-12 23:48:35 +01:00
86f537913b [DEV] update travis.yml to checkout dev branch 2016-02-12 21:07:58 +01:00
5138c91756 [DEV] update to the specialisation of the signal hide implementation 2016-02-11 22:39:40 +01:00
ea4cc45ac5 [DEV] update externalisation of signal and property 2016-02-11 21:45:21 +01:00
287815eaa6 [DEV] add widget Spin (not finished) 2016-02-10 21:12:48 +01:00
7f3e0735f6 [DEV] A basic version of the Select widget (need to be finished)' 2016-02-09 22:47:30 +01:00
3aece8d7b8 [DEV] first idea of the select and spin element 2016-02-08 21:15:02 +01:00
0bbbb59a81 [DEV] more diplay in tools 2016-02-07 21:57:36 +01:00
298bd2d106 [DEBUG] correct gravity of the checkbox when not filling the area 2016-02-06 23:03:03 +01:00
1490c4324a [DEVÂ] add parameter at color test border 2016-02-06 22:39:38 +01:00
6e2fdccb98 [DEV] extract the coloring of the sizer widget 2016-02-06 00:45:09 +01:00
19989a475a [DEBUG] correct the horizontal widget gravity anagement 2016-02-06 00:17:13 +01:00
1d281a1db4 [DEV] Finish color display of the sizer ==> nned extract color syntax ... 2016-02-06 00:16:44 +01:00
f5dfead63c [DEV] better display of the sizer color ==> need to create sub widget for test 2016-02-05 21:09:25 +01:00
3c9851ecf5 [DEV] extract gravity from widget 2016-02-04 23:12:36 +01:00
2e1644be3e [DEV] API change: change gravity methodologie 2016-02-04 22:55:43 +01:00
77bc863ab9 [DEBUG] Correct sizer min size with border 2016-02-04 22:42:38 +01:00
42d9505335 [DEBUG] correct the sizer expand in X 2016-02-04 22:29:41 +01:00
77d3bb2b99 [DEV] reduce indentation 2016-02-04 22:27:13 +01:00
b45799c532 [DEV] update context menu 2016-02-04 22:25:26 +01:00
fa0ef8e26c [DEV] try to correct sizer error 2016-02-03 21:15:07 +01:00
75e120ceb3 [DEV] replace 'include guard' with 'pragma once' 2016-02-02 21:18:54 +01:00
5ee58f3540 [DEV] rework all the API of the sizing 2016-02-01 23:50:01 +01:00
5b93b312f3 [DEV] continue good integration of gravity in sizer ... 2016-02-01 21:26:21 +01:00
46699c20b6 [DEV] try to correct the expand error... (START) 2016-01-31 22:28:58 +01:00
44749e4a6f [DEV] add tool a better display of the widgets 2016-01-29 23:57:29 +01:00
8ccb93508d [DEBUG] correct the checkbox missing check (base) 2016-01-29 23:56:50 +01:00
e20efd56e2 [DEV] add the state in the shaper (need validate) 2016-01-29 23:55:36 +01:00
01a9d6b1c5 [DEV] better test tools for widget 2016-01-29 22:20:06 +01:00
990894af6f [DEV] add sizer color for border (for debugging it is cool) 2016-01-29 21:25:31 +01:00
b595794a0d [DEV] add an API to create widget with XML 2016-01-29 21:24:02 +01:00
7273b617ff [DEV] add an API to create widget with XML 2016-01-29 21:23:12 +01:00
632fafaa3d [DEV] continue integration af an introspection of the widget parameter 2016-01-28 22:47:03 +01:00
293cce1fd0 [DEBUG] correct checkbox size 2016-01-28 22:47:03 +01:00
03232752f1 [DEV] add debug in shaper 2016-01-28 22:47:03 +01:00
01ca0392fe [DEV] Add a function to specify the type of the parameter 2016-01-28 22:47:03 +01:00
e91da861a6 [DEV] add signal capability of direct function callback 2016-01-28 22:47:03 +01:00
ab22c78237 [DEV] add bach the simple valider of system (visual) 2016-01-22 22:24:38 +01:00
7be7a16357 [DEBUG] coorect the tag version 2015-12-03 21:47:54 +01:00
5f38706175 [DEV][CI] update to remove agg library and travis build env 2015-12-03 21:32:51 +01:00
94f6d4f48a [DEV] some typo correction 2015-11-20 22:26:40 +01:00
f33428c251 [DEV] change default opening of image 2015-11-06 22:31:08 +01:00
92eec7385d [DEV] add api to set size of sprite image file 2015-11-05 21:48:18 +01:00
d84f9f7df8 [CI] update config (build windows and android 2015-11-02 22:19:47 +01:00
04d60a7200 [CI] test Ios 2015-10-22 08:38:15 +02:00
cd2f2599b8 [CI] Continue build integratuion to work better 2015-10-19 21:33:12 +02:00
1ecaee5fd5 [DEV] Update tag 0.9.8-dev 2015-10-19 21:26:56 +02:00
7f6acfc024 Merge branch 'dev' 2015-10-19 21:21:39 +02:00
542c858831 [DEV] update granch without submodule 2015-10-19 21:21:39 +02:00
04756d72ea [DEV] add basis of test for ewol 2015-10-19 21:12:04 +02:00
000644204a [CI] Integrate new MacOs on Travis 2015-10-16 21:00:37 +02:00
82996f07b8 [DEV] update new lutin 0.8.0 2015-10-14 21:21:03 +02:00
6d8c375365 [DEV] update signal interface to remove periodic signal in debug log level 2015-09-29 21:12:20 +02:00
0abe3cfdfc [DOC] update readme 2015-09-28 21:51:37 +02:00
23350d196c [DEBUG] Correct the loading of the font 2015-09-25 21:12:02 +02:00
0e2fbeffce [DEV] update next lutin version 2015-09-24 21:44:04 +02:00
9bba7de644 [DEV] update new FN Node file interface 2015-09-18 22:00:53 +02:00
77dc891394 [DEV] update Build interface 2015-09-14 21:11:04 +02:00
40a671c077 [DEV] update new lutin 2015-09-10 21:32:50 +02:00
acba455634 [DEBUG] correct constness and add logs ... 2015-09-07 21:51:55 +02:00
bb92817774 [DEV] integrate corect image rendering with dynamic event 2015-09-02 22:55:42 +02:00
ea4515f63c [DEV] update some interface 2015-09-02 21:11:02 +02:00
ad0018be8d [DEV] add some mutex to protect multithread access 2015-09-01 23:50:34 +02:00
5789abf09b [DEV] change process on initialisation and application interface 2015-09-01 22:32:42 +02:00
fe8c7a712e [CI] update travis with new interface (no sudo) 2015-08-24 23:55:27 +02:00
552d6cb05f [DEV] update example 2015-08-24 22:50:24 +02:00
9a844b0315 [DEV] missing interface 2015-08-23 21:41:37 +02:00
0cab58d32f [DEV] correct shaper error in button and add checker of peridic call 2015-08-22 11:01:48 +02:00
3fc18f8e1d [DEV] some corretion with gale 2015-08-21 23:35:35 +02:00
6560b59eab [DEV] update ewol to gale (basic work step 2) 2015-08-11 22:38:34 +02:00
4325aaecf2 [DEV] UPDATE at gale architecture (BAD display) 2015-08-04 23:24:28 +02:00
b569e69297 [DEV] start gale integration 2015-07-21 21:00:40 +02:00
210d090e23 [DEV]@ update naming of android interface 2015-07-01 21:30:27 +02:00
471d51eddb [DEV] correct all android errors 2015-06-26 22:07:50 +02:00
c2733cadb6 [DEV] remove audio interface from java framework 2015-06-23 22:10:34 +02:00
da1d33b783 [DEV] some dev for audio 2015-06-22 21:03:57 +02:00
83746c58de [DEV] continue dev of audio correct wrapping 2015-06-21 21:56:07 +02:00
702bd32dc3 [DEV] correct android interface 2015-06-18 23:49:54 +02:00
1e46295288 [DEV] add genberator of dynamic android file 2015-06-19 23:32:46 +02:00
a7fcfccada [DEV] try add generator of the header from java class 2015-06-18 23:49:54 +02:00
1baca41edd [DEV] start to create a proper java compilation ... 2015-06-18 21:43:18 +02:00
80fbc8f639 [DEV] update travis file 2015-06-17 21:25:57 +02:00
f0a236997f Update README.md 2015-06-03 15:10:28 +02:00
1b72284d26 [DEBUG] correct the help tag in cmdline 2015-06-01 21:48:34 +02:00
049a853387 [DEV] poc perfo CPU MacOS 2015-05-22 22:05:05 +02:00
e83bae08cb [DEV] udpate for android build 2015-05-20 22:51:59 +02:00
8a073acf76 [DEV] Add copy and past interface 2015-05-19 22:19:28 +02:00
21ad90fd15 [DEV] correct the interface of the MacOs context 2015-05-18 21:15:50 +02:00
935d9cd4a6 Update travis lutin interface 2015-05-17 11:32:25 +02:00
6bcb491f0a [DEV] correct kaybord and mose input for MacOs ==> pb on close Windows 2015-05-15 23:43:33 +02:00
bec114d53d [DEV] better keyboard input 2015-05-12 21:12:22 +02:00
9d07ec9eb6 [BUILD] update new lutin 0.5.3 2015-05-08 22:40:53 +02:00
dc8e1741c7 [DEV] update travis build system 2015-05-07 23:40:38 +02:00
39c7d777ce Merge branch 'origin/dev' 2015-05-07 23:20:13 +02:00
1ee607d444 [DEV] Remove external libs 2015-05-07 23:02:33 +02:00
8a1bdcd6a1 [DOC] undate doc 2015-05-04 22:51:50 +02:00
a22695aa6a [DEV] add zlib wrapper 2015-05-04 22:38:01 +02:00
adf42abe46 [DEV] remove zlib 2015-05-04 22:28:52 +02:00
840bca43d6 [DEV] rename audio-algo-river 2015-04-23 22:06:47 +02:00
8b3556882a [DEV] correct submodule error 2015-04-23 21:44:22 +02:00
a5e7cd5209 [DEV] update zlib repo 2015-04-23 21:07:20 +02:00
be69fc5594 [DEV] add speex algo wrapper 2015-04-22 00:21:44 +02:00
832b8cde5e [TAG] update TAG (developement) 2015-04-21 23:44:21 +02:00
769127e9da [TAG] update TAG 2015-04-21 23:40:16 +02:00
db4fa5147e Merge remote-tracking branch 'origin/dev'
Conflicts:
	README.md
	sources/tag
2015-04-21 23:38:08 +02:00
d00ec173af [DEV] update library dependency repository 2015-04-21 23:02:49 +02:00
af4410a16a [DEV] workspace is back correct 2015-04-11 13:22:12 +02:00
1b441ad65d [DEV] rework tree and submodules 2015-04-10 22:49:38 +02:00
915c4088e7 [DEV] remove build system and add audioAlgo 2015-04-02 22:00:29 +02:00
bf8a93d1ea [DEV] update init 2015-03-26 22:12:55 +01:00
ce00a23475 [DEV] update the etk init 2015-03-26 21:21:38 +01:00
9bd62966ca [DEV] update Log interafce 2015-03-25 21:14:12 +01:00
66364ff4ea [DOC] add worddown in the software list that use EWOL 2015-03-22 20:45:50 +01:00
551846181c [DEV] remove LUA and compilation update 2015-03-20 23:18:16 +01:00
cdcfc201d4 [DEV] update libs and tools for thread 2015-03-20 22:18:52 +01:00
b94e674a8f [DEBUG] edtaa3 build error 2015-03-11 21:26:07 +01:00
032c9a5e91 [DEV] add C compilation of the Z interface on C99 2015-02-26 21:44:16 +01:00
ef1eb80553 [TRAVIS] update g++ version 2015-02-17 22:04:40 +01:00
af24b335ac [DEBUG] correct android build 2015-02-16 21:40:51 +01:00
7e2cae472e [DEV] set it work on MacOs & IOs again 2015-02-15 21:52:20 +01:00
15c1764854 [DEV] change basic thread name 2015-02-13 22:25:55 +01:00
865851578d [DEV] update sub libs 2015-02-12 23:23:32 +01:00
8add5d9f1b [DEV] update new sub libs 2015-02-07 00:08:03 +01:00
8addc1a84e [DEV] update new LOW level audio config for andoid 2015-02-05 23:34:39 +01:00
8a2211e5f6 [DEV] add subLibrary and update others 2015-02-05 22:23:15 +01:00
6caf433936 [DEV] update new exml interface 2015-01-14 21:10:23 +01:00
832d73d4da [DEV] update the ejson interface 2015-01-12 22:14:36 +01:00
673ccb3726 [DEV] update context code style 2015-01-08 22:38:34 +01:00
df2fbc04b9 [DEV] add speex enc/dec and speex DSP and some change 2015-01-06 22:28:26 +01:00
5a98b86dea [DEV] add luaWrapper 2014-12-19 23:51:41 +01:00
03fb0c4f8c Merge branch 'dev' of https://github.com/HeeroYui/ewol into dev 2014-12-17 22:12:32 +01:00
db62bf6714 [DEV] add lua wrapper 2014-12-17 22:12:32 +01:00
429c0ae82f Update README.md 2014-12-13 19:00:36 +01:00
3332777cf9 Update README.md 2014-12-13 18:56:28 +01:00
c4379885b3 [REMOVE] blender export-import of emf file (move in ege) 2014-12-08 22:37:20 +01:00
c750b5fd53 [DEV] add some debug in program for openGL and add object parameter set 2014-12-05 22:02:05 +01:00
6e6a9575bf [SAMPLE] add basic sample in the repo 2014-12-04 23:30:36 +01:00
6e571ae742 [DEV] add tools function for resource colored 3d object 2014-12-01 22:03:39 +01:00
d0e8e519a8 [DEV] travis update 2014-11-28 21:04:16 +01:00
28b3d075f4 [EXTERNAL] add gtest 2014-11-25 22:07:48 +01:00
3d0e63f5a6 [DEV] remove some logs 2014-11-24 23:47:42 +01:00
b9433d2cb7 [DEBUG] correst VBO offset error 2014-11-24 22:30:12 +01:00
412cf41cef [DEV] start rework interface OpenGl ==> all must be called by ewol::openGL namespace 2014-11-24 22:09:20 +01:00
0d23654379 [DEBUG] add resource::Program id checker 2014-11-21 21:46:19 +01:00
865305ac0b Update codingStyle.txt 2014-11-20 17:01:47 +01:00
86fa583a55 [DEV] normalize openGL interface for matrix 2014-11-13 21:11:53 +01:00
4e88d081d8 [DEBUG] missing translation matrix 2014-11-13 00:05:20 +01:00
e912cd44e3 [DEV] remove an unneeded widget update 2014-11-11 23:12:08 +01:00
1713685108 [DEBUG] update area 2014-11-09 22:56:47 +01:00
627584f13d [DEV] update open GL interface 2014-11-07 23:35:16 +01:00
8ff2bfc20f [DEV] simplify VBO & program API 2014-11-06 21:54:27 +01:00
ec3c7b2902 [DEV] change ewol::signal::List in ewol::signal::Interface 2014-10-30 21:12:15 +01:00
61afe48646 [DEV] set Parameter agnostic from Object 2014-10-29 22:34:06 +01:00
656fe783d4 [DEV] set signal agnostic from other API just depend on shared_ptr<void> 2014-10-29 21:05:49 +01:00
00b385f433 [DEV] remove specificity of signal to Object to shared_ptr<void> 2014-10-28 23:13:38 +01:00
dbecf900be [DEBUG] gcc build error 2014-10-28 22:04:32 +01:00
9cc1b47a2a [DEV] change periodic call ==> remove from widget manager to Object manager and set signal instead of virtual function 2014-10-28 21:01:44 +01:00
5024c51379 [DEBUG] signal error when removing signal in signal calling 2014-10-23 22:17:39 +02:00
21435b9961 [DEV] add subElement bind with multiple argument (TODO: better with template) 2014-10-20 21:28:23 +02:00
499806edc5 [DEV] remove compilation warning 2014-10-19 23:05:24 +02:00
d8d02254ca [DEV] remove deprecated API 2014-10-19 23:04:54 +02:00
36495518ac [DEV] change slider signal value type int32_t ==> float 2014-10-19 23:04:27 +02:00
06521163f6 [STYLE] some style 2014-10-19 23:03:08 +02:00
4fde0a8462 [DEV] add bind1 (not work) 2014-10-19 23:02:44 +02:00
03213d9f04 [TAG] Update version tag : 0.9.4-dev 2014-10-18 08:30:32 +02:00
8bdb599f06 Update version tag : 0.9.4 2014-10-18 08:28:38 +02:00
3830ced287 [SUB] update submodule 2014-10-18 08:19:33 +02:00
e3a1b37130 [DEV] set ButtonColor support parameters instead of direct set & get 2014-10-18 08:18:13 +02:00
e858cf8a74 [DEV] set slider support parameters instead of direct set & get 2014-10-18 08:17:52 +02:00
a41605b9b3 [DEBUG] change visibility of the Context menu constructor 2014-10-18 08:17:11 +02:00
293a68a083 [DEBUG] Remove unneeded variable 2014-10-18 08:16:25 +02:00
4063a6178c [DEV] change application URL loader 2014-10-18 08:15:34 +02:00
2ff07a736e [DEV] add subWidget search with there name 2014-10-18 08:14:44 +02:00
5309ac7550 [INTEGRATION] update travis test path and remove clang update (might be unneeded 2014-10-17 22:09:59 +02:00
66e61d6d45 [INTEGRATION] update etk 2014-10-17 22:06:03 +02:00
3eb0e63a80 [INTEGRATION] update test 2014-10-17 22:02:12 +02:00
8ceaf407b3 [INTEGRATION] update travis.xml 2014-10-17 21:56:43 +02:00
c62c666fe1 [DEV] update exml 2014-10-17 21:52:23 +02:00
70ff8fa6f7 [DEV] update travis.yml 2014-10-17 21:18:43 +02:00
7645341f35 [DEV] remove etk::mutex and etk::semaphore for stl inmplementation 2014-10-08 22:30:30 +02:00
b5b460440b [DEV] Correction of Resource unamed creation 2014-10-01 23:33:07 +02:00
cb2e34cbb4 [DEV] change level of signel log 2014-09-22 22:16:11 +02:00
8b5f3e1eea [DEBUG] Update glew for windows 64 bits 2014-09-17 00:30:14 +02:00
eaa3e40ef0 [DEV] update submodule 2014-09-16 22:32:57 +02:00
bcd6b8230b [DEV] update Readme 2014-09-15 22:22:41 +02:00
4d54a562fc [DEBUG] windows compialtion is back (not tested) 2014-09-15 21:58:34 +02:00
942b3a155d [DEV] add a worker interface 2014-09-12 21:22:18 +02:00
7c4d4ff1dc [DEV] add test 2014-09-11 21:25:06 +02:00
e5cf76c49c [TAG] Update version tag : 0.9.3-dev 2014-09-11 07:14:25 +02:00
be0b31f905 Update version tag : 0.9.3 2014-09-11 07:08:30 +02:00
6c92b70642 [DEV] update doc 2014-09-09 21:15:50 +02:00
d3eae268d9 [DEBUG] link gcc to gcc-4.8 2014-09-09 20:48:19 +02:00
cc5e966ba4 [DEV] Update travis file 2014-09-09 20:48:19 +02:00
6249f2b59b [DEBUG] remove gcc-4.6 2014-09-09 20:43:16 +02:00
790f8528e4 [DEBUG] change gcc version in script 2014-09-09 08:23:37 +02:00
35aa535a6d [DEBUG] missing then in travis file 2014-09-09 08:16:34 +02:00
9e2099b870 [DEV] add travis upgratde for gcc 2014-09-09 07:40:12 +02:00
1616d833e8 [DEV] add dependency of CPPX11 2014-09-09 07:35:26 +02:00
9c5031a6ee [DEV] add trevis separate compilator 2014-09-09 07:28:21 +02:00
cce65ddccd [DEV] add travis emailing when finished 2014-09-09 07:23:31 +02:00
5109b7b1d9 [DEV] update travis file 2014-09-09 07:16:35 +02:00
30fe9db11e [DEV] update release version 2014-09-09 07:05:05 +02:00
d9c3ead221 Create .travis.yml 2014-09-09 06:10:01 +02:00
f49bc5f50c [DEV] add trvis base file 2014-09-08 23:09:34 +02:00
6ad49453ba [DOC] add documentations 2014-09-05 21:42:04 +02:00
886f4ddc76 [DOC] update doc titles system 2014-09-03 22:02:02 +02:00
d5bd35d0a4 [DOC] update documentation 2014-09-02 21:26:15 +02:00
87f4aedb95 [DEV] start updating documentation 2014-09-01 22:54:02 +02:00
331acf2303 [DEV] remove empty files 2014-08-30 09:15:26 +02:00
3f7cf66e99 [DEV] add remove link with a shortcut 2014-08-29 23:30:41 +02:00
d8ddb85a82 [DEV] update menu interface 2014-08-28 21:51:55 +02:00
6bf0c0f0cd [DEV] remove onReceiveMessage fucntion (deprecated) and set work again Entry, SelectColor, List ... 2014-08-27 22:56:57 +02:00
29910b5cef [DEV] Add log when macri binding not work 2014-08-27 06:04:31 +02:00
6e39002da5 [DEV] some rework on ewol... 2014-08-25 21:08:13 +02:00
367831116f [DEV] change some Object interface (try to simplify object interface 2014-08-25 05:56:03 +02:00
7edbc3a0cf [DEV] update new signal system 2014-08-22 22:21:23 +02:00
e3f71e5201 [DEV] remove caller in signal emit 2014-08-22 05:20:27 +02:00
12c4a88c88 [DEV] rework Signal implementation callback ==> must update all soft 2014-08-21 21:22:51 +02:00
153774177e [DEBUG] gcc compilation warning 2014-08-21 21:00:13 +02:00
3175657fed [DEV] rework signal interface (step 1 normalisation) 2014-08-20 22:34:31 +02:00
600d5b2ffe Update version tag : 0.9.2 2014-08-19 23:57:31 +02:00
006ed42f38 [DEV] signal is better 2014-08-19 22:57:39 +02:00
749b7a09c0 [DEV] Start dev of the signal system (nearly compatible with old system) 2014-08-19 23:26:51 +02:00
e1a0b972cd Update version tag : 0.9.2-dev 2014-08-19 23:57:31 +02:00
1a1dceb43a [DEV] merge dev 2014-08-19 21:47:33 +02:00
fe9649193b [CLEAN] remove unneeded code 2014-08-19 21:47:33 +02:00
baa00d0e71 [DEBUG] missing init in colored3DObject 2014-08-18 22:57:06 +02:00
132024a988 [DEV] remove unneeded files 2014-08-18 23:27:13 +02:00
b478b3e862 [DEV] remove onObjectRemove... 2014-08-17 23:36:53 +02:00
bee8936d54 [DEBUG] correct the menu not hide error 2014-08-15 22:49:34 +02:00
71f656fb41 [DEV] change the parameter Updating 2014-08-14 22:11:42 +02:00
43505fcc37 [DEV] WORK 2014-08-14 07:34:43 +02:00
9cb928b973 [DEV] change default Instance 2014-08-13 22:30:47 +02:00
5c7fe3bda5 [DEV] try to set work of the parameters 2014-08-13 07:50:00 +02:00
91091b7ccb [DEV] change the parameter object system (NOT work) 2014-08-12 22:08:24 +02:00
0eb9d5c322 [DEV] start rework for parameters 2014-08-11 22:43:05 +02:00
70487330ce [DEV] add basic parameter structure 2014-08-11 07:08:34 +02:00
eaefe65322 [DEBUG] correct samsung galaxie S3 shader error :
Error 0:4: P0007: Extension directive must occur before any non-preprocessor tokens
an error for android device that need to invert some preprocessor lines
2014-08-09 23:43:18 +02:00
babbf2bcd1 [LICENCE] change BSD v3 to APACHE v2.0
this is for prevent some patent errors
2014-08-08 23:19:08 +02:00
4b8c98c110 [DEV] run with no error ==> have many small error that thing not work compleately 2014-08-08 21:39:25 +02:00
e3305c3757 [DEV] start long rework to have a geneic std::shared_ptr instead of internal ewol::object::Shared ==> need to have only factory 2014-08-07 22:54:13 +02:00
de19f0de61 [DEV] color coorection new error 2014-07-10 22:33:49 +02:00
2196919531 [DEV] remove etk_min and etk_max & etk::Color<> interface 2014-07-03 21:03:26 +02:00
ed8626e6a7 [DEV] add composer in the xml widget list creatable 2014-06-22 19:07:07 +02:00
beaf2179c6 [DEBUG] add some object functionnality and remove some button error 2014-06-21 20:46:41 +02:00
0b9d3e38c4 Update version tag : 0.9.1 2014-06-18 13:03:19 +02:00
d51301924a [DEBUG] android set title error 2014-06-18 11:59:46 +02:00
8afd56e77e [DEV] update documentation 2014-06-16 22:34:44 +02:00
21c2bcfd39 [DEBUG] missing make shared of the std pop-up 2014-06-16 20:44:32 +02:00
fa6116fb7a [DEBUG] error build android 2014-06-16 07:51:24 +02:00
76e20869b5 [DEV] add main start for Other platform (not tested) 2014-06-05 22:05:32 +02:00
e7cc0e7100 [DEV] Change main application start (done only for X11) 2014-06-05 21:40:07 +02:00
46b5eca2cb change version 0.9.0 2014-06-03 21:42:17 +02:00
9ae39eda36 [DEBUG] pb on focus for the fileChooser pop-up 2014-06-03 21:24:32 +02:00
abdf5ca6f3 [TAG] Last version with no control of the pointer 2014-06-01 12:46:34 +02:00
7a1293c541 [DEV] android remove warning 2014-05-28 22:15:32 +02:00
8b4ea6f0cf [DEBUG] update program shared VBO and bullet new file 2014-05-30 23:22:17 +02:00
da12244f16 [DEBUG] Correct the resource update properties 2014-05-30 18:59:50 +02:00
a771457d89 [DEBUG] need to have a reverse drawing on layer 2014-05-28 22:15:32 +02:00
7ee8ff29bd [DEV] correct assert 2014-05-28 21:56:22 +02:00
d88028a7dc [DEBUG] remove memory leek 2014-05-27 21:35:34 +02:00
3237d26474 [DEV] correction of virtual and refcounter of objects 2014-05-27 21:26:40 +02:00
c2eb3c1467 [DEV] seem to work, but the result is really bad ... 2014-05-26 21:33:17 +02:00
3c52398511 [DEV] remove errors 2014-05-25 21:21:00 +02:00
a1d0185f19 [DEV] shared system work corectly with simple example 2014-05-25 16:15:26 +02:00
49c3036080 [DEV] WSlider list correction ==> might be rewrite with correct refs 2014-05-23 21:35:37 +02:00
e6a5c9c85f [DEV] add owner to auto remove an object 2014-05-23 12:33:49 +02:00
699935e482 [DEV] Better shared pointer management (nearly work) 2014-05-22 21:44:15 +02:00
5e861e002c [DEV] remove owner interface to simplify 2014-05-20 23:24:51 +02:00
87c622ddc0 [DEV] update windows shared pointer in context 2014-05-20 23:13:55 +02:00
f72b15664d [DEV] change resource in shgared pointer 2014-05-20 21:33:04 +02:00
63f50b54d4 [DEV] update some API 2014-05-19 21:25:07 +02:00
03336135d6 [DEV] start rework remove object 2014-05-19 07:41:52 +02:00
4c68791bdd [DEV] remove some unneded copy 2014-05-17 21:09:15 +02:00
357371847b [STYLE] change NULL in nullptr 2014-05-17 21:04:14 +02:00
b5b5785d04 [DEV] stabilize shared object interface 2014-05-17 21:01:06 +02:00
23eb78c7f9 [DEV] Better interface 2014-05-17 20:47:45 +02:00
7aa87e0fcc [DEV] it compile but it can not work now ... 2014-05-17 20:24:11 +02:00
227a08be18 [DEV] step one to build 2014-05-16 21:52:10 +02:00
8740595b17 [DEV] start big rework of the shared pointer on objects 2014-05-15 23:43:03 +02:00
cfbdc0e84e [DEV] start dev of smart pointer implementation 2014-05-15 22:25:06 +02:00
2e98c66894 [STYLE] remove (void) in () to be c++ coherent 2014-05-15 21:37:39 +02:00
7567856323 [DEBUG] correction diplay of entry first view 2014-05-14 21:47:26 +02:00
836172f749 [DEBUG] remove segfault when set /.. path 2014-05-14 21:14:36 +02:00
9682de59e2 [DEV] update file chooser with FSNode 2014-05-13 21:32:02 +02:00
96719f3dcc [DEV] add opening URL for Linux, IOs & MacOs 2014-05-11 13:09:36 +02:00
cb5582c54a [DEV] add translation module that work 2014-05-11 12:08:09 +02:00
54cd4828df [DEV] correct start and stop application for IOS 2014-05-10 19:08:39 +02:00
a0f6e268af [DEV] update display errors 2014-05-10 12:30:03 +02:00
bc29612e37 [DEV] Add basic translation interface 2014-05-07 23:30:15 +02:00
e3f6831dfa [DEV] add enet submodule 2014-05-02 21:29:44 +02:00
281f3dfc84 [DEV] change log system
Conflicts:
	external/ewolsa
2014-04-30 22:18:00 +02:00
b3602ceb14 [DEV] add jump url for Android (only)
Conflicts:
	external/ewolsa
2014-04-29 22:16:57 +02:00
78d729e033 [DEBUG] IOS/MacOs zlib compilation error 2014-04-22 23:49:45 +02:00
8f03df3af2 [DEV] Clean IOs wrapper 2014-04-22 23:41:10 +02:00
26b3f52d3f [DEV] First good version for IOs 2014-04-22 21:24:37 +02:00
66b53f30f4 [DEV] add touch event on the IOs port 2014-04-19 09:25:07 +02:00
bec800d4f9 [DEBUG] MacOs erorr compilation 2014-04-19 00:41:42 +02:00
3ab9b3e91e [DEV] IOs simulator first display with annimation
Conflicts:
	external/ewolsa
2014-04-19 00:31:36 +02:00
9dd0e26158 [DEV] add findger single touche move for scrooled widget 2014-04-18 23:30:45 +02:00
624d28af36 [DEBUG] correction of the scrool widget 2014-04-18 21:21:46 +02:00
ab770771cc [DEV] correction of the atom get property at null 2014-04-17 21:17:19 +02:00
852543d957 [DEV] Ios port 2014-04-17 01:25:28 +02:00
628d593326 [DEV] integration IOS first step 2014-04-13 13:47:50 +02:00
8589d9b747 Update version tag : 0.8.3 2014-04-06 18:51:52 +02:00
62fc7b9809 [DEV] add ewolSA, simple Audio interface for game 2014-04-06 18:48:31 +02:00
32d55bcdc6 [DEV] add correct version for Admods and back button and image part display 2014-04-06 18:45:45 +02:00
6a36013460 [DEBUG] correct scroll touch event 2014-04-01 12:44:29 +02:00
eff87a7f06 [DEV] update comment 2014-03-31 20:34:28 +02:00
189665162e [DEV] correction of the scroll widget and add distance field load precompiled basic file 2014-03-30 12:37:10 +02:00
6be6a33789 [DEBUG] correction of the shaper internal draw 2014-03-25 19:45:42 +01:00
e47d5a8f07 [DEV] modufiy shape system to be more flexible 2014-03-23 08:33:04 +01:00
4be5c84b9c [DEV] add basic AIRTAUDIO interface for android sound 2014-03-20 10:27:58 +01:00
9f4bd697e8 [DEV] add basic airtaudio 2014-03-13 22:31:30 +01:00
1b94a81174 [SUBMODULE] add airtaudio (fork of rtaudio) 2014-03-12 21:04:06 +01:00
592ed524f1 [SUBMODULE] remove RTAUDIO 2014-03-12 21:02:48 +01:00
f9e4250a09 [DEV] add rtAudio instead of portaudio 2014-03-05 21:43:00 +01:00
f79b8b5ffd [DEV] cmake file update and documentation update 2014-03-04 21:18:41 +01:00
a4e60d20c5 [DEV] add basic think of multi shaper type 2014-02-28 22:11:10 +01:00
cbbc3bea27 [DEV] add capacity of setting the force orientation (can greate exeption ==> seem to generate exeption 2014-02-26 21:00:06 +01:00
5644e5f987 [DEV] set dista,ce field at the 30 pixel size 2014-02-25 21:17:34 +01:00
69ef5682fe [DEV] add CMake instance 2014-02-24 21:50:50 +01:00
b055156aa6 [DEV] add basic cmake generator (not work) 2014-02-21 21:21:41 +01:00
0b3f7b2124 [DEBUG] comment and coding rules 2014-02-20 21:00:36 +01:00
b20f6db4ea [DEV] init random and set public the setter of text program on text 2014-02-19 21:10:53 +01:00
0cf3f29466 Update version tag : 0.8.2 2014-02-12 21:02:58 +01:00
973b6fdec7 [DEBUG edn#2] find focus error 2014-02-12 09:34:15 +01:00
4ec5216da1 [DEV] FOCUS error ==> might be ok 2014-02-11 09:48:48 +01:00
f9a5796a0a [DEV] correct checkbox, pop-up and fileChooser 2014-01-27 21:03:38 +01:00
5606728ae4 [DEV] update conf in json file 2014-01-24 21:44:38 +01:00
0a441228f1 [DEV] first step of the checkbox ==> TODO : use an herited button... 2014-01-24 20:10:02 +01:00
dbe7585f8b [DEBUG] correct label display bug and new Container2 widget 2014-01-24 00:55:12 +01:00
726135ff8c [DEV] try factorise Button code 2014-01-23 21:12:54 +01:00
dbd7e1a401 [DEV] fragment shader error 2014-01-22 23:15:10 +01:00
5e3974f59d [DEV] add reverse height to size for font height 2014-01-22 23:15:10 +01:00
a2a70607c3 [DEV] change scrool in scroll 2014-01-22 21:29:24 +01:00
c50abe2032 [DEV] correction of resource error when remove 2014-01-22 21:20:39 +01:00
8a48e529d4 [DEV] normalize scrolledWidget shaper 2014-01-20 21:26:00 +01:00
50c9be054d [DEV] add distance field for theme image just a big test 2014-01-19 19:16:51 +01:00
10f9e7c60f [DEV] end of first step of the color management 2014-01-18 14:33:36 +01:00
961415a05d [DEV] Review THEME management to support sepatrated color from shader 2014-01-17 22:49:11 +01:00
c2a6833037 [DEV] better distance-field and normal font display 2014-01-14 23:56:17 +01:00
6fcff69f11 [DEV] distance field developement 2014-01-14 21:50:21 +01:00
cdb945c2f1 [DEV] add ios board 2014-01-14 07:41:39 +01:00
c4479fa4cb [DEV] add distance field compisiting (not work) 2014-01-09 21:40:39 +01:00
fbca6c4491 [DEV] better distance field display 2014-01-08 22:15:01 +01:00
d144c0a65f [DEV] use normal distance field methode 2014-01-08 21:15:01 +01:00
9c6fe98018 [DEV] Test distance field developpement 2014-01-07 21:33:46 +01:00
3e617536af [DEV] better work on MacOS 2014-01-06 21:38:49 +01:00
546c90d972 [DEV] add log interface (step 1) 2014-01-05 23:04:43 +01:00
622ef88fea [DEV] update for Mac port
Conflicts:
	sources/lutin_ewol.py
2014-01-05 18:31:58 +01:00
80f623bb72 [DEV] try add android clipboard but break tabletgit status! can not test 2014-01-05 12:30:06 +01:00
ae53ab3d79 [DEV] add special char interface on android 2014-01-04 20:25:54 +01:00
8fc8738c0f [DEV] Change scrool interface of the finger interface (2 finger instead of 1) 2014-01-04 20:24:07 +01:00
b6feeb382f [DEV] add interface to update the special char with input chars 2014-01-04 20:23:22 +01:00
0f6ed06350 [DEV] rework ListFileSystem widget 2014-01-04 17:20:46 +01:00
ab979adf2a [DEV] add value set config in entry element 2014-01-04 17:20:01 +01:00
f3d7d3a6e6 [DEV] remove dead code 2014-01-03 22:07:05 +01:00
b8e3ffcf0b [DEBUG] JNI error corection of multiple threading interface 2014-01-03 22:04:37 +01:00
cb6d3f0cb9 [DEV] try to find keyboard error 2014-01-03 21:30:51 +01:00
bd184d4f8f [DEV] sizer parameter normalisation 2013-12-31 22:19:51 +01:00
428111b1d9 [DEV] Enable real utf-8 label display 2013-12-31 22:05:01 +01:00
7bf47a6c12 [DEBUG] remove some basic bug 2013-12-29 20:56:44 +01:00
f9ec8d0f12 [DOC] add monk website 2013-12-28 16:08:13 +01:00
278ecbd12d [DEV] normalize event in the access methosde 2013-12-28 15:14:36 +01:00
bcfd9a54c3 [DEV] update to the etk normalisation 2013-12-28 14:23:08 +01:00
f7f0c7e636 [DEV] add basic doc element unavaillabe 2013-12-27 21:55:28 +01:00
9cc41e0dad [DEV] update lutin naming 2013-12-23 22:38:46 +01:00
25b0914786 [DEV] add monk documentation 2013-12-22 19:05:43 +01:00
08e35f60d7 [DEV] change uneeded comments 2013-12-20 22:53:14 +01:00
a19458b26e [DEBUG] remove log 2013-12-20 00:37:05 +01:00
28bf683bbf [DEBUG] track an android access memory error 2013-12-20 00:34:00 +01:00
504dc26fa6 Update version tag : 0.8.1 2013-12-17 22:57:37 +01:00
e131fcaf09 [DEV] correction of event ID 2013-12-17 22:57:16 +01:00
6d0c5989cc [DEV] rework android 2013-12-16 18:49:42 +01:00
48e53b0bf2 [DEV] corection widget slider 2013-12-16 21:10:12 +01:00
5fae28a6ed [DEV] MacOs build 2013-12-15 14:09:30 +01:00
916c7f31a3 [DEV] new archi main part ended 2013-12-13 21:58:20 +01:00
01f409de3a [DEV] update new archi 2013-12-12 22:59:31 +01:00
3e8b6d8b91 [DEV] rework the internal arch eneded (not work) 2013-12-12 22:18:56 +01:00
dad1b90812 [DEV] change namespacing to clarify the API ==> (not work) 2013-12-11 01:19:33 +01:00
5c295fcca9 [DEV] update documantation 2013-12-10 21:40:43 +01:00
74554809c9 [DEV] add some tutorial 2013-12-09 21:39:29 +01:00
20b7e084da [DEV] remove doc/doc/ path 2013-12-08 23:18:01 +01:00
38f2087629 [DEV] add basic doc 2013-12-06 09:58:00 +01:00
2ab8690def [DEV] add documentation generation 2013-12-04 23:47:06 +01:00
b76e5b1d30 [DEV] remove unneeded mesh compositing 2013-12-04 21:21:25 +01:00
b7108874dd [DEV] Add some meta key event 2013-11-28 23:59:34 +01:00
b63f91d544 Update version tag : 0.8.0 2013-11-28 22:42:25 +01:00
c6215bf676 [DEBUG] update tag system 2013-11-28 22:26:11 +01:00
e24a3f0d8f [DEV] set a real Tag Version 2013-11-28 22:06:53 +01:00
42984619d7 [DEV] update cursor dusplay function 2013-11-28 21:24:20 +01:00
971acf0036 [DEV] update MacOs onput mouse to be compatible wit Linux 2013-11-28 21:13:40 +01:00
c6928fa591 [DEBUG] Remove some unused element of c++11 in MacOs and set it work again 2013-11-28 00:55:19 +01:00
c89f157d1a [DEV] add extra compilation flags & correct warning 2013-11-27 21:33:34 +01:00
e975c52b6e [DEV] basic think of annimation widget properties 2013-11-26 21:55:39 +01:00
d6a26db4a5 [DEBUG][X11] repeate key correction 2013-11-25 21:14:45 +01:00
073e03aa42 [DEV] change name of message on entry and button ==> TODO: Think of naming 2013-11-23 18:29:56 +01:00
f5650f16f6 [DEBUG] widget scrolling correction 2013-11-21 21:49:43 +01:00
03d797a133 [DEBUG] remove multiple request update of display 2013-11-20 21:17:06 +01:00
09b7f9a749 [DEV] update the main structure of the application 2013-11-19 22:21:42 +01:00
f3b3967b1e [DEV] android compilation correction 2013-11-17 20:35:46 +01:00
079a376acf [DEV] add basic windows message API 2013-11-14 23:43:55 +01:00
971905b0d5 [DEBUG work again 2013-11-14 21:40:30 +01:00
905091d3fd [DEBUG] correction of text size 2013-11-14 07:49:09 +01:00
9a9293a3fc [DEV] correction of stl-port 2013-11-13 21:52:12 +01:00
aff6c5fd38 [DEV] change idea std::u32string to std::string 2013-11-12 21:58:13 +01:00
410db2d5e0 [DEV] integarate std x11 2013-11-11 20:20:05 +01:00
ff1f2692de [DEV] change enum naming 2013-11-10 14:47:53 +01:00
fa21a34b0a [DEV] work on DOC and remove deprecated widget::Drawable 2013-11-09 10:14:07 +01:00
2235522951 [DEV] add correct stdPopUp and start integration of documantation 2013-11-08 22:31:45 +01:00
f73a5b80c4 [DEV] add capability of pop-up 2013-11-07 21:29:51 +01:00
149405880d [DEV] update progressBar 2013-11-06 21:26:37 +01:00
adc4ad0c45 [DEV] add property on progress bar 2013-11-05 21:01:02 +01:00
3af8ef44cc [DEV] small change 2013-11-04 22:34:40 +01:00
5f7e692fa4 [DEV] correction of the fond selection 2013-11-04 21:00:46 +01:00
1d58222faa [DEV] corection of multiple font loading and EObject remove events 2013-10-30 21:12:26 +01:00
0dcc4005a4 [DEV] herited resouce from EObject 2013-10-28 21:03:30 +01:00
1fdee93ba0 [DEV] resource return error 2013-10-27 22:15:06 +01:00
54c65f4b0c [DEV] update Debug in debug 2013-10-25 20:48:54 +02:00
96b0b68ac8 [DEV] some coding style update 2013-10-24 21:16:28 +02:00
1127ed0543 [DEV] UniChar ==> UChar & Hach ==> Hash 2013-10-18 21:15:02 +02:00
739082cf36 [DEV] text code style corection 2013-10-16 21:53:17 +02:00
a05707e55a [DEV] correction of andoid port and remove some log 2013-10-10 21:56:48 +02:00
aee421c216 [DEBUG] stop correction 2013-10-10 07:52:41 +02:00
90eb3d1ae3 [DEV] end coding style 2013-10-09 22:27:38 +02:00
b63e6d33b2 [DEV] code style '_' & '{' at end of line 2013-10-08 22:32:40 +02:00
7254b172e8 Merge branch 'master' of https://github.com/HeeroYui/ewol 2013-10-08 09:32:49 +02:00
9e540f286e [DEV] coding style step 1 2013-10-07 22:09:13 +02:00
21441ab5aa [DEV] coding style in progress 2013-10-03 23:56:01 +02:00
d9177e4565 [DEV] coding style add 2013-10-02 21:28:16 +02:00
6ca87b6a79 [DEV] sent the keyboard status with the event keyboard 2013-09-30 22:26:50 +02:00
fa2ecb4237 [DEV] Correction of compilation error on 32 bits 2013-09-30 21:55:07 +02:00
e434ab4f8a [DEV] add dynamic enable of the fps view 2013-09-30 21:26:58 +02:00
7a8cabb625 [DEV] dynamic font add elements and support multyple language 2013-09-30 00:06:39 +02:00
a1e89a83a1 [DEV] corect the intut of the keyboard in utf8 2013-09-29 13:55:46 +02:00
b7dc1089ee [DEV] some corection of the compilation 2013-09-26 22:49:37 +02:00
5ca92a90cb [DEV] mac work again but not ended anymore 2013-09-25 15:25:47 +02:00
21f0a6856a [DEBUG] retrive clipboard 2013-09-19 09:20:26 +02:00
a5f08902cf [DEV] change mesh private in protected 2013-09-15 22:47:49 +02:00
4fc426c414 [DEV] add some optionnel parameter to display 2013-09-13 21:52:18 +02:00
318e44f571 [DEV] corection of mesh contructor 2013-09-09 06:33:35 +02:00
a131e75b28 [DEV] change resource property 2013-09-06 21:51:24 +02:00
0d4cd4749b [DEV] add at the impage compositing the Z position 2013-09-05 21:21:17 +02:00
d010c5ec2d [DEV] enable suspend mode in periodic call 2013-09-04 22:04:31 +02:00
be8264edf9 [DEV] multiple instance work on android 2013-09-04 21:02:55 +02:00
547c9c4d65 [DEV] android multiple instance testing 2013-09-03 22:56:05 +02:00
8fd060fd03 [DEV] rework android Context 2013-09-03 21:46:15 +02:00
d5d2297e7f [DEBUG] set the system rework corectly (step 5) 2013-09-02 21:49:30 +02:00
f52a6919e3 [DEV] rework some global elements (step 5) 2013-09-02 06:46:49 +02:00
3b874d3786 [DEV] change all directory and rework some names (step 4) 2013-08-30 22:33:05 +02:00
f89d88e62a [DEV] rework (step 3) 2013-08-30 07:46:21 +02:00
4a8aa9f7b0 [DEV] Rework the library to support multiple instance (step 2) 2013-08-29 21:50:41 +02:00
1fd451961e [DEV] start a compleate rework of the lib to support the multiple instance in one binary ==> not win at all (BREAK) 2013-08-28 21:35:24 +02:00
8668ac9dd0 [DEV] correction of error of openGl error when lose context 2013-08-27 23:52:39 +02:00
371a3cb599 [DEV] add Windows background color and image rotation 2013-08-27 21:36:49 +02:00
7cb1648d6e [DEV] basic wallpaper will work 2013-08-26 22:07:12 +02:00
010586a0fa [DEV] first java files for android liveWallpapers 2013-08-26 21:28:04 +02:00
bffa93d136 [DEV] update submodule 2013-08-24 22:04:53 +02:00
0be9626063 [DEV] update mesh properties to had extern shape 2013-08-21 22:10:03 +02:00
2b946f19d0 [DEV] better mesh display and other 2013-08-20 22:33:30 +02:00
8aa072783d [DEV] displa only the face visible 2013-08-20 21:01:19 +02:00
9e908e992d [DEV] try to display only the triangle visible 2013-08-19 21:57:42 +02:00
d4dfe30d23 [DEV] add convex hull parsing 2013-08-18 20:51:17 +02:00
e95323e974 [DEV] corection of the Android compilation 2013-08-14 23:43:35 +02:00
eb5c43c836 [DEV] Add ege in submodules 2013-08-13 21:53:21 +02:00
088198ad5b [DEV] init the physcs shape 2013-08-12 22:51:24 +02:00
5279f00379 [DEV] better physic properties management 2013-08-12 21:55:05 +02:00
3f2ba7907f [DEV] add physics parsing 2013-08-11 22:32:33 +02:00
937a6e5e9d [DEV mesh parser OK 2013-08-09 21:00:35 +02:00
d1dbab0c94 [DEV] start new methode of parsing mesh file 2013-08-09 09:10:13 +02:00
9b5d1fa4f2 [DEV] change mesh exporter (add stupid collision model 2013-08-08 22:39:30 +02:00
6e718229b8 [DEV] work on the blender exporter 2013-08-07 23:52:07 +02:00
297d836d18 [DEV] start adding collision shape support 2013-08-07 21:22:13 +02:00
a58bd9f6c4 [DEV] Remove optimisation of VBO internal data 2013-08-06 21:20:35 +02:00
f2c08210a2 [DEV] add debug cycle count for mesh generation 2013-08-06 21:15:22 +02:00
aea2495886 [DEV] mesh can be redisplayed (for .emf) 2013-08-06 21:08:30 +02:00
a70ca277e0 [DEV] start integration of the emf file ==> has more capabilities than obj (emf is specific ewol mesh file) 2013-08-05 20:49:58 +02:00
7fecf6cd89 [DEV] add json dependency 2013-08-01 22:37:02 +02:00
70036262be [SUB] add ejson 2013-07-31 20:50:56 +02:00
6ea4035942 [DEV] shader loading corection and touch scrooling corection 2013-07-25 22:04:02 +02:00
d535450eb5 [DEV] correction of the multiple load of the images 2013-07-24 23:25:01 +02:00
1682a44288 [DEV] Remove dependency with external zip archive system 2013-07-24 22:30:18 +02:00
587aad91dc [DEV] remove support of the 64 bit zip file 2013-07-24 22:30:18 +02:00
Keidan (K. Billonneau)
82c876fa9c Merge branch 'master' of github.com:HeeroYui/ewol 2013-07-24 07:49:19 +02:00
Keidan (K. Billonneau)
d073a04e29 [DEV] Fix reference to java object + Fix memory leak in setTitle 2013-07-24 07:46:36 +02:00
f6fc204114 [DEV] add minizip at the zlib tools 2013-07-24 07:43:48 +02:00
Keidan (K. Billonneau)
ced259175f [DEV] oups... 2013-07-24 06:22:42 +02:00
Keidan (K. Billonneau)
3091c8d8d9 [DEV] fix log type 2013-07-24 06:19:32 +02:00
af9749013a [DEBUG] overwrite error corection for android java 2013-07-23 21:38:05 +02:00
3b23c15a91 [DEV] android is back
Update header licence of the java files
Update font search
Corection of the dimention system ==> might be tested again
2013-07-13 22:20:46 +02:00
Keidan (K. Billonneau)
d92b24b89d [DEV] remove useless file 2013-07-12 06:50:02 +02:00
Keidan (K. Billonneau)
40c95e1f92 [DEV] add abstraction file... 2013-07-12 06:49:21 +02:00
Keidan (K. Billonneau)
eb8660b8ea [DEV] limit visibility 2013-07-12 06:48:38 +02:00
8fdd1f0a45 [DEV] try correct some bugs 2013-07-11 15:06:29 +02:00
Keidan (K. Billonneau)
a47d58c35f [DEV] Fix static 2013-07-11 14:02:48 +02:00
Keidan (K. Billonneau)
fcde1ff26f [DEV] add setTitle from C to Android + some improvements 2013-07-11 07:01:49 +02:00
Keidan (K. Billonneau)
0df2c89ed0 [DEV] fixes the compatibility with the java code... not tested... 2013-07-10 19:07:03 +02:00
Keidan (K. Billonneau)
59483ab23b [DEV] remove... 2013-07-10 19:02:20 +02:00
Keidan (K. Billonneau)
c3027c2313 [DEV] do not commit the generated header file 2013-07-10 18:53:12 +02:00
Keidan (K. Billonneau)
315cc9faf9 [DEV] add generation of the EwolConstants header (org_ewol_EwolConstants.h) 2013-07-10 18:49:18 +02:00
Keidan (K. Billonneau)
0a0eae8262 [DEV] rename PROJECT_NAME.java to EwolActivity.java; add the method initApkPath; change the activity type to abstract 2013-07-10 18:47:43 +02:00
Keidan (K. Billonneau)
0c78b84728 [DEV] move SDK_VERSION from EwolConstants into EwolSurfaceViewGL 2013-07-10 18:43:33 +02:00
Keidan (K. Billonneau)
dcf8549f5e [DOC] update file description 2013-07-10 18:41:34 +02:00
c00e4d3e33 [DEV] correction for windows compilations 2013-07-10 16:56:38 +02:00
74c9974693 [DEV] remove deprecated files 2013-07-09 15:18:04 +02:00
595495b8bd [DEV] Update of the choice of standardize the Color class 2013-07-09 15:15:51 +02:00
d2a0e5005b [DEV] add ogre wrap file 2013-07-05 22:28:42 +02:00
efe8524fa0 [DEV] add ogre basic compiler 2013-07-04 21:50:52 +02:00
fa22a42572 [DEV] better pop-up 2013-07-03 22:25:54 +02:00
Kevin BILLONNEAU
532812d50c Force extends Activity and EwolCallback implementation
The JNI code, coming soon
2013-07-02 22:14:44 +02:00
dee4851a45 [DEV] update sub libs 2013-07-02 22:06:23 +02:00
efe7224f69 [DEV] update at the last exml 2013-06-30 17:05:01 +02:00
774e743271 [DEV] update to the nex exml API 2013-06-28 22:27:29 +02:00
cad47bd419 [DEV] add font multiple 2013-06-27 22:45:26 +02:00
b7196e577c [DEV] update the modules list 2013-06-27 07:40:07 +02:00
da97bea5df [DEV] exml update and tested 2013-06-26 23:20:24 +02:00
8a159b8ca3 [DEV] port for exml 2013-06-24 21:53:27 +02:00
12c2831a20 [DEV] popup add fill state 2013-06-18 21:33:28 +02:00
K. Billonneau
0397c2ec98 Fix class name 2013-06-14 22:22:06 +02:00
f6713ef18a [DEV] better pop-up shaper and list 2013-06-12 22:38:54 +02:00
c2cdab446f [DEV] add capabilities at the pop-up system 2013-06-11 21:47:23 +02:00
0b3fe6d74a [DEV] correct the id of the WSlider ==> unique even if whe change the order of the widget (remove... 2013-06-07 21:50:24 +02:00
d2d8b6fca1 [DEV] add sprite correct diaplsy and input maximum number segfault error 2013-06-03 22:35:05 +02:00
47ea209279 [DEV] add sprite properties 2013-06-03 08:03:42 +02:00
e12bea33e3 [DEV] change the periodic system (better model) 2013-06-01 21:43:20 +02:00
d3ee207699 [DEV] rewrite the _ at the compositing element 2013-05-31 23:19:03 +02:00
426403da3b [DEV] rework some _ at function parameter 2013-05-31 09:03:13 +02:00
6ff6693871 [DEV] MAC : mouse event availlable and periodic display (limited at 30 fps???) 2013-05-29 23:31:38 +02:00
b4940a4bc3 [DEV] update Android interface 2013-05-29 21:47:05 +02:00
d7ffe6af4d Merge remote-tracking branch 'origin/android-rework' 2013-05-29 21:06:38 +02:00
0bb1a97ff3 [DEV] add the linker on MACOS API event handler 2013-05-29 21:06:38 +02:00
2ac2b5057e [DEV] add mac basic event 2013-05-29 07:23:22 +02:00
c2b7cedb8c [DEV] add a system for stadard user global config saving 2013-05-28 21:18:45 +02:00
3f74842f8e [DEV] remove deprecated interface of C interface for mm files 2013-05-27 21:30:22 +02:00
0883358f83 [DEV] add capabilities at the WSlider widget' 2013-05-27 21:12:55 +02:00
f39ee975d6 [DEV] add api at WSlider 2013-05-26 21:58:15 +02:00
Keidan
faa2c07d07 Fix @file 2013-05-25 18:46:26 +02:00
Keidan
1022f2d86a Rework java structure 2013-05-25 18:42:36 +02:00
e2eef30159 [DEBUG] remove assertion when update context openGl ==> get wrong table 2013-05-25 11:43:08 +02:00
bcd42f4fc6 [DEV] add date library that will be the only one eleement to rebuild in case of date change (will be rebuild every second , like this we did not have to rebuild all the library that will have the build time 2013-05-25 10:58:47 +02:00
b35988ef89 [DEV] better display of the rounded theme 2013-05-25 10:56:57 +02:00
31b6134640 [DEV] add an api to add event of other widget than the composer itself 2013-05-25 10:56:21 +02:00
e0cd309140 [DEV] add shader display for the pop-up element and dynamic event on the button rounded 2013-05-23 21:50:52 +02:00
a6b7e7b132 [DEV] better context menu display and some small corection 2013-05-23 05:07:53 +02:00
485aca72bc [DEV] add capabilities at the context menu 2013-05-22 22:16:40 +02:00
a453644324 [DEV] remove unneded openGl mode 2013-05-22 22:13:46 +02:00
9b025cee66 [DEBUG correction of the half pixel display on the widget 2013-05-22 21:28:45 +02:00
81458d0523 [DEV] correct layer getWidgetAtPos and remove temporary debug to fing string error, and add functotion to remove sub element in delayed 2013-05-20 22:09:16 +02:00
0c36f880db [DEV] add the possibility to draw triangle with negative size 2013-05-20 22:07:20 +02:00
90ca5367e8 [DEV] remove unneded debug log 2013-05-17 21:00:37 +02:00
13802b799c [DEV] add debug 2013-05-17 07:40:20 +02:00
11515a82f5 [DEV] add debug on dimention 2013-05-16 22:03:45 +02:00
810abe02bc [DEV] try to find a display error due to a minimal size who is wrong 2013-05-16 21:58:02 +02:00
a8dae7592c [DEV] base update of the unichar rework 2013-05-15 21:11:16 +02:00
3b5943c1b2 [DEV] add button keep under element name, composer add register sub event with widget name, scroll add limit parameter 2013-05-15 00:05:58 +02:00
5c1fe0db5b [DEV] add a system of message configuration toolbox ==> permit to configure a EObject expecting his type without arbitrary castin widget 2013-05-14 22:35:33 +02:00
1fd5b53688 [DEV] corection of the Display widget clipping and add some capabilities 2013-05-12 21:02:30 +02:00
66924458eb [DEV] change the keyboard and mouse event function 2013-05-08 12:20:47 +02:00
5d7152f572 [DEV] compile on windows platform 2013-05-01 16:19:01 +02:00
637d972f7e [DEV] update sub module' 2013-04-26 23:48:51 +02:00
b2f2255532 [DEV] remove old build system (replace by lutin) 2013-04-25 22:53:51 +02:00
7afec192d1 [DEV] correct the pop-up error size and parameter tool exit button 2013-04-25 22:53:51 +02:00
a7d4bf13fa [DEV] correction of the clipboard copy and middle to export 2013-04-25 21:25:05 +02:00
f71053f2f6 [DEV] MacOS support work again 2013-04-25 00:57:47 +02:00
150df589e6 [DEV] segfault correction and dynamic management of the font position 2013-04-24 12:53:32 +02:00
6533b8af29 [DEV] add the windows correct compilation 2013-04-23 22:52:06 +02:00
2751698679 [DEV] corection of the lutin makefile for ewol 2013-04-22 21:21:36 +02:00
63d20a72e1 [DEV] update 'lutin' build system 2013-04-21 22:29:27 +02:00
3c84f23849 [DEV] update the maker 2013-04-19 22:31:55 +02:00
c288f87914 [DEV] correct build with new methode of the edn soft ==> no dependence and no clean 2013-04-18 22:51:51 +02:00
9e4b987ffa [BUILD] basic makefile for python maker 2013-04-18 01:55:05 +02:00
291e18e294 [DEV] start work pyton maker 2013-04-17 21:40:23 +02:00
a415669c60 [DEV] correct android set of the wondows size ratio 2013-04-17 21:19:46 +02:00
80dfa5fdbf [DEV] mac first openGL view of the exol real display 2013-04-16 22:44:36 +02:00
a5451a9f7f [DEBUG] correction of debug and expand of sizer 2013-04-16 21:12:20 +02:00
87676f657a [DEV] generate warning when delete in an error state and rework pop-up and contextmenu 2013-04-15 21:18:54 +02:00
3e29816651 [DEV] image rework base ok 2013-04-14 14:07:14 +02:00
b46542ca8d [DEV] rework of the ContainerN ended start rework of image widget 2013-04-12 22:24:04 +02:00
3ff3c38710 [DEV] end composer and add a container obstraction 2013-04-11 21:24:22 +02:00
3bb4c6a700 [DEV] end of rework the main widget class ** it will be finish now 2013-04-10 22:26:28 +02:00
2d209cd37e [DEV] widget back to work on test woft ==> not ended (some mistake to correct) 2013-04-10 21:05:45 +02:00
36dbd60e19 [DEV] new Dimension management 2013-04-09 23:30:14 +02:00
100fbd43e2 [DEV] start to reworks the widget class to simplify and normalize it (last rework) 2013-04-09 21:17:47 +02:00
56eafd762f [DEV] Start rework of the button 2013-04-08 21:30:25 +02:00
b3465bcf44 [DEV] first open GL display on MACOSX ==> simple triangle... 2013-04-07 23:42:23 +02:00
09ef9c8a19 [DEV] first windows display ==> nothing else pn MAC 2013-04-07 13:15:48 +02:00
7e48ed5172 [DEV] update SEEK in bmp images 2013-04-05 22:14:45 +02:00
ac36b0b6a5 [DEV] better maagement of the Program shader and add converter of the screen size 2013-04-04 21:27:23 +02:00
c4d156d462 [DEV] try a basic windows on cocoa 2013-04-04 01:54:38 +02:00
ca352c94d9 [DEV] start dev on MACOS interface 2013-04-04 00:47:42 +02:00
feb1ed56af [DEV] add a basic gird on the widget to display subWidget 2013-04-03 22:32:35 +02:00
27a6281357 [DEBUG] try to find remove error 2013-04-02 21:32:46 +02:00
f892d5981e [DEV] correction of the home folder of the Meta widget open 2013-04-02 21:00:40 +02:00
d5f406db8f [DEV] add mesh basic display 2013-03-28 21:46:48 +01:00
7df6071476 [DEV] add some capacity at the 3d direct draw 2013-03-27 21:21:24 +01:00
0de61c3dc1 [DEV] add the management of the screen display size 2013-03-26 22:26:44 +01:00
b83589e174 [DEV] create a unique sizer for vert and hori ==> this is simple to manage 2013-03-22 20:57:42 +01:00
9a18f605d9 [DEV] change the message data between widget to the const data 2013-03-22 23:06:41 +01:00
1c5b6159cc [DEV] add update on agg lib 2013-03-21 00:07:57 +01:00
9dccd96fde [DEV] something has been done 2013-03-15 23:26:16 +01:00
9a84c63701 [DEV] set text testing depth 2013-03-15 07:35:05 +01:00
90bb349138 [DEV] better mesh display using indec istead of direct drawing all point 2013-03-14 21:50:17 +01:00
c870d2471e [DEV] display optimesation next step done 2013-03-13 21:29:51 +01:00
75df3e4b8b [DEV] start OpenGl abstraction ==> for faster display 2013-03-12 21:51:02 +01:00
09103e3073 [DEV] correct some error in the display of the Button Image 2013-03-11 23:29:40 +01:00
d84e4b8d53 [DEV] Remove some dependency of the sub library 2013-03-11 22:55:34 +01:00
228999d144 (DEV) first compilation on MacOsX ==> not work due to the X11 interoperability error 2013-03-09 17:45:51 +01:00
19c162eff2 [DEV] better management of light and material for 3D mesh 2013-03-07 21:37:14 +01:00
1c8ce9488c [DEV] add light management with simple add of Material and Light classes==> can be better, but a good start 2013-03-06 21:53:47 +01:00
a602665e10 [DEV] multiple texture availlable and better mesh 2013-03-05 21:11:33 +01:00
c56289dbfd [DEV] Add calculation of the normal and the vertex normal for mesh 2013-03-04 21:53:43 +01:00
71af7fe7d2 [DEBUG] corect windws compilation and missed init in the shaper tool 2013-03-03 20:59:47 +01:00
2794b6e18f [DEV] implement catmul-clak algorithm 2013-03-03 16:00:59 +01:00
71aefe981c [DEV] change the mesh properties and add a basic subdivider 2013-03-02 12:02:15 +01:00
c53664d973 [DEV] try to have better mesh management and subdivision try 2013-03-01 22:28:14 +01:00
4872bfcbf9 [DEV] better init in some widget 2013-03-01 09:14:12 +01:00
8b8f48b654 [DEV] add the basic compositing on image 2013-02-28 21:21:17 +01:00
b9bedb8b36 [DEV] set the correct sens of the texture (reverted) 2013-02-20 21:01:04 +01:00
01e5b2dc2a [DEV] missing somme element 2013-02-18 17:25:45 +01:00
1598324f57 [DEV] add etk properties 2013-02-16 15:52:59 +01:00
872d353e3b [DEV] have a correct display xith forcing X11 interface 2013-02-08 21:20:03 +01:00
da0642e4cb [DEV] direct FB basic implementation (does not work on PC) 2013-02-07 23:23:47 +01:00
4127dfbfdf [DEV] Android update the vec3 new access 2013-02-05 23:05:07 +01:00
f4e056348a [DEBUG] log wrong extention error print 2013-01-30 22:31:31 +01:00
a05a5adccb [DEV] change the multiple event on keyboard 2013-01-29 22:20:32 +01:00
e7503c8824 [DEV] update display to the nec vector3D 2013-01-28 22:17:43 +01:00
aa17623425 [DEV] try to set the system back to work 2013-01-28 08:10:10 +01:00
73a42f4e17 [DEV] update all the element at the new etk vectir nomage (like bullet) 2013-01-25 23:53:27 +01:00
bb3307f736 [DEV] set bulit linearMath in a sub librairy 2013-01-23 22:01:41 +01:00
0004c7710f [DEV] remove call of java when system is not autorised of turn screen 2013-01-18 22:14:04 +01:00
53a678cdd1 [DEV] VBO work correctly on computer 2013-01-16 23:42:34 +01:00
857d475d23 [DEV] first display with VBO ... just vertex... 2013-01-16 23:12:07 +01:00
ba5bbea967 [DEV] start to work on VBO integration 2013-01-15 22:35:52 +01:00
5592c02b28 [DEV] remove multiple acess load of mesh object element 2013-01-14 21:59:56 +01:00
24e562454c [TEST] basic real display 2013-01-14 23:27:10 +01:00
38932b616b [DEV] remove old game engine ==> deprecated ... 2013-01-11 23:18:05 +01:00
d021b82631 [BUILD] Windows compile correctly 2013-01-11 07:30:30 +01:00
0dffbae44d [DEV] Better shader debugLog, and bullet compatibility with Android 2013-01-10 22:02:13 +01:00
e79a88c7f1 [DEV] better display on the Shapes 2013-01-10 07:29:32 +01:00
47e254d812 [DEV] display corectly the world with internal openGLES2 2013-01-09 22:35:16 +01:00
db90b5a629 [DEV] try to display the basic exemple with ewol generic display 2013-01-08 22:39:27 +01:00
c4548c5241 [DEV] base of the scene working with bullet 2013-01-08 07:13:41 +01:00
a781cf4c26 [DEV] Basic integration of the bullet librairy 2013-01-07 22:36:22 +01:00
896cdf4891 [DEV] force respond on collision detection (error) 2013-01-07 07:04:14 +01:00
a8b350ea5a [DEV] tunel detection correct, slow, but correct ... 2013-01-06 15:13:15 +01:00
a468a3424a [DEV] Change the bounding to the old AABB methode and start the catching of the tunel effects 2013-01-04 22:52:56 +01:00
93d3e62b8e [DEV] Simplify the Game engine 2013-01-03 21:03:23 +01:00
549ac760d7 [DEV] detect bounding and display bounding simplify 2013-01-01 21:56:39 +01:00
d1e48b5d0d [DEV] add AABB bounding alculation and display of it 2012-12-30 21:11:38 +01:00
d9317dc227 [DEV] change the fragment shader to be compatible with openGL ES2 and some other corrections 2012-12-28 23:17:50 +01:00
dcdd44aa54 [DEBUG] compilation is back for windows platform 2012-12-27 22:29:28 +01:00
37626d9350 [DEV] compilation is back on android ==> system not work 2012-12-27 22:29:28 +01:00
59aeef49a0 [DEV] Icon correct creation 2012-12-27 21:57:47 +01:00
e3c04a3345 [TAG] new tag 2012-12-26 22:12:50 +01:00
3d576e3a1d [DEV] Add Cursor types and display on x11 and capacity to force the cursor in ofset mode for games 2012-12-26 21:16:26 +01:00
a35c4def77 [TREE] remove the test software 2012-12-23 19:51:06 +01:00
426faa2012 [DEV] grep the mouse events 2012-12-20 22:09:45 +01:00
95c94a9c9e [DEV] Remove automatic key respown on X11 2012-12-19 23:28:27 +01:00
57c22f93ef [DEV] basic FPS view with so beautifull grass 2012-12-19 21:57:40 +01:00
cc07a77377 [DEV] real display of a scene with real perspective 2012-12-19 00:47:02 +01:00
10f7131b62 [DEV] add camera system on the game engine 2012-12-18 23:16:40 +01:00
326dccb94d [DEV] create the basic gravity equations 2012-12-18 22:09:27 +01:00
4b4758bc7f [DEV] import engine instead of creating an extern 2012-12-17 22:21:54 +01:00
03876b5a71 [DEV] display scene is back 2012-12-17 07:56:33 +01:00
c84caed8ba [DEV] start basic test of the scene 2012-12-14 22:30:27 +01:00
b6d11d78e2 [DEV] Start dev of the physic engine 2012-12-13 22:50:30 +01:00
28a044fb00 [DEV] compilation error 2012-12-13 22:30:57 +01:00
d56017aacf [DEV] First rework of the scene system 2012-12-11 22:08:53 +01:00
160fd67d03 [DEV] better dynamic position of widget::Label 2012-12-06 21:46:18 +01:00
9b9b2b9956 [DEV] Add basic test of label 2012-12-05 22:58:21 +01:00
3629dd679d [DOC] change the dependency package to compile 2012-12-05 20:11:25 +01:00
6de53cf3f2 [DEBUG] corection of some error in the X11 abstraction and key event french name 2012-12-04 23:27:08 +01:00
ae29b34eab [DEV] adapt vector 2D, 3D and 4D wrapper with statdard glsl vec[2-4] ivec[2-4] and std mat4 2012-11-30 22:45:55 +01:00
d61e67773c [DEV] color button and corection of the unsupressed widgets 2012-12-02 20:34:44 +01:00
426cbbfa78 [DEV] back working of ButtonColor and colorBar 2012-12-01 21:33:05 +01:00
dc6e4eeb49 [DEV] End of simple button developement start of buttonColor rework 2012-11-30 22:45:55 +01:00
22e5c62c42 [DEV] Better button event 2012-11-30 08:56:46 +01:00
fbcb6148ad [DEV] Multiline button is OK ==> gui display is not compleately ended 2012-11-29 22:13:54 +01:00
d69a964459 [DEV] create a better button with test application for it 2012-11-28 22:51:29 +01:00
67e4d5363c [DEV] add test software to show wat is possible and test every mode of the widget system 2012-11-28 22:39:43 +01:00
acd70a322c [DEBUG] corection of the broadcast message of shortcut 2012-11-27 23:02:48 +01:00
e0bdd48984 [DEV] corection of the scrollbar 2012-11-27 23:02:01 +01:00
6727919ee9 [DEV] set the entry box working with the shaper system 2012-11-27 22:08:25 +01:00
fb3973915f [DEV] create shaper to simplify widget theme creation 2012-11-27 21:27:47 +01:00
4f296ba2b9 [DEV] start clean eSystem 2012-11-26 21:53:04 +01:00
50db842954 [DEV] working not so bag, but rework not ended 2012-11-25 11:54:17 +01:00
d045b4bd14 [DEV] Compilation of ewol is back ==> not working 2012-11-23 23:55:21 +01:00
7cb9eb91d6 [DEV] compile the first widget 2012-11-23 07:46:20 +01:00
f45c7a6743 [DEV] Rework of the internal tree and system 2012-11-22 22:28:05 +01:00
6921fd4467 [DEV] a little step 2012-11-21 22:48:50 +01:00
15c71ebe1a [DEV] Rework compleately EWOL to simplify and set it more user-frendly NO-MORE-COMPILE 2012-11-21 21:56:37 +01:00
c3dde8d2ac [DEV] Parse decorated text like a html page 2012-11-20 21:56:12 +01:00
f848ee4ce0 [DEV] change etk version 2012-11-20 07:33:17 +01:00
6356d8b1d5 [DEV] Text compisiting element is now OK 2012-11-19 21:16:14 +01:00
3a41e938a6 [DEV] Text compositing is now able to display background color 2012-11-19 10:02:00 +01:00
cfa965269d [DEV] compositing in progress : starting Draw and Text (nearly ended) component 2012-11-19 07:58:25 +01:00
640810ee8d [DEV] Basic display of the compositing font (justify availlable) 2012-11-16 23:37:21 +01:00
303b08da9d [DEV] Start the writing of the Text compositing 2012-11-16 09:29:14 +01:00
a04e79f0c7 [DEV] Search of the new user API for creating Widget and other things as simply as possible 2012-11-15 21:11:38 +01:00
1a4e18c7c5 [DOC] add the comment on the OpenGL access 2012-11-15 10:02:55 +01:00
d1615e3a77 [DEV] compilation selection of the embended fonts 2012-11-15 07:42:16 +01:00
de752fb642 [DEV] Rework Font : Add the kerning on the No-Monospace font ==> pretty good 2012-11-14 21:19:57 +01:00
7aeb65a0aa [DEV] Load the font with bold italic mode and load it in the basic folder of the file system 2012-11-13 22:55:02 +01:00
08e97b1fba [DEV] open the good file for 3d textured 2012-11-12 17:15:35 +01:00
17dfbc7cb1 [DEV] add the zlib submodule in the correct position 2012-11-12 09:24:09 +01:00
141e3b98b0 [DEV] change the android directory 2012-11-12 01:40:30 +01:00
63b742b737 [DEV] first read of the png file ==> ok / no write function 2012-11-11 20:38:20 +01:00
59e59142ed [DEV] rework of the external lib tree ended 2012-11-10 16:23:44 +01:00
e81fa93885 [TREE] this might be correct for all the sub lib 2012-11-10 15:19:37 +01:00
fa25024b32 [TREE] try to rework the tree of the librairie 2012-11-10 14:43:01 +01:00
2dcce5ea5a [TREE] remove deprecated file 2012-11-09 21:47:54 +01:00
d290405cfa [DEV] change all the header file and remove comment in the cpp file when comment is in the .h file 2012-11-09 21:38:58 +01:00
094ea2de4e [DEV] set icon in the Automatic Theme folder 2012-11-09 10:00:23 +01:00
9cf545c434 [DEV] change getting tag policy and remove choice of openGL-ES1 2012-11-09 01:47:10 +01:00
14f878bdd2 [DEV] reorder the list of files 2012-11-08 22:40:17 +01:00
f2b754ddb7 [DEV] Basic dynamic widget (button) 2012-11-07 22:42:53 +01:00
efe4386c3a [DEV] add a basic theme changer and the config file for the button parameter ==> must work on it 2012-11-06 22:35:00 +01:00
1b7163e79c [DEV] new button shader system ==> must be reworked 2012-11-04 19:04:59 +01:00
b0b619da82 [DEV] new button shader system ==> must be reworked 2012-11-04 19:04:12 +01:00
d3eed67f00 [DEV] compilation back on Android/windows 2012-11-04 15:44:26 +01:00
508162dfc8 [DEBUG] scrolling bar display again ==> bad color definition 2012-11-03 17:06:36 +01:00
e6e6b4c89f [DEV] set the file access back with the new file system mode 2012-11-03 17:05:51 +01:00
575ef0de03 [DEV] Add capacity to the etk::FSNode ==> all is not good, but it is a good start 2012-11-02 18:11:38 +01:00
40dc60eb8a [DEV] update etk::FSNode for Android ==> not tested 2012-11-02 07:40:12 +01:00
b03d4c0047 [DEV] Change the etk::File in etk::FSNode to have a compleate abstraction of the file system 2012-11-01 10:48:01 +01:00
b039a0fb29 [DEV] change the idea of file obstraction now it is folder/file/link see has FSNode 2012-10-31 22:18:45 +01:00
431e5e8886 [DEV] Rounded corner and add theme folder ant rework File/Folder IO access... 2012-10-31 18:05:54 +01:00
e1d99c0646 [DEV] Add resource loading .obj files 2012-10-30 18:20:47 +01:00
ad78c67548 [DEV] Add capability of the mathematic element of etk system 2012-10-29 18:06:40 +01:00
98f1efe59f [DEV] Update build lib 2012-10-28 20:32:37 +01:00
eb2a46e0c1 [DEV] add files in the copy system 2012-10-27 17:46:34 +02:00
cb854ca972 [DEV] copy files in the staging directly 2012-10-27 01:30:59 +02:00
89fee7fab5 [DEV] copy file directly in the staging directory 2012-10-26 17:46:25 +02:00
37bd7b152a [DEV] set etk::Vector2D and new Matrix(n,m) 2012-10-26 17:00:22 +02:00
d57ac3b94f [DEBUG] correction of the none display of the cursor 2012-10-25 18:11:21 +02:00
215ee55c77 [DEV] Entry: First test of the Entry box directly generate with shader 2012-10-25 17:53:29 +02:00
6bfcd0513a [DEV] Entry: Set the text moving left to right 2012-10-25 10:32:49 +02:00
5b0807d3dd [DEV] change color of the selection of the Entry widget 2012-10-24 17:08:06 +02:00
eccc2d69d7 [DEV] adding capacity of copy/paste/selection at the entry widget 2012-10-24 14:23:24 +02:00
d71bbfea08 [DEBUG] correction of the vector displying error 2012-10-24 14:22:19 +02:00
e795911933 [DOC] add dependence of the packages 2012-10-24 14:21:48 +02:00
95a7ecb29f [DEV] Better Entry widget & change the short-cut system to permit to have multiple shortcut depending of the widget 2012-10-23 17:48:59 +02:00
809c8a3d5c [DEBUG] pb in the font display condition 2012-10-23 10:14:51 +02:00
ba0b1256d6 [DEV] display font with clipping availlable 2012-10-19 15:20:10 +02:00
ace466b7bd [DEV] support multiple android version 2012-10-18 18:17:14 +02:00
f9f619b90d [DEBUG] correct the get of resource size in power of 2 2012-10-18 18:16:43 +02:00
2730fd9bb6 [DEBUG] remove the grepping of hardware button of android 2012-10-17 17:30:23 +02:00
18087d132a [DEBUG] reset zoom in scrolled windows when ctrl+middle button 2012-10-17 17:29:39 +02:00
ff84a9ea20 [DEV] a little better list display ==> multiple colomn 2012-10-17 13:30:15 +02:00
051624b12e [DEBUG] missing virtual in the destructor 2012-10-16 18:33:10 +02:00
cd39ae1512 [DEV] display an image background on the scene 2012-10-12 18:14:50 +02:00
f5c65e0fb6 [DEV] change the policy of the background of the scene and set the shortcut on Fxx key 2012-10-11 18:08:30 +02:00
a70c2055b9 [DEV] add VBO for openGL (not tested) and set code to reload shaders 2012-10-10 18:09:54 +02:00
e3a379dd62 [BUGFIX] update the selection of a new file in the file selection 2012-10-09 13:56:19 +02:00
db7b31dc61 Upgrade display distance fiead 2012-09-14 17:22:39 +02:00
236784a6d3 new compilation mode for android system 2012-09-12 18:18:38 +02:00
1b51dc051e Generation of the Manifest and better configuration file 2012-09-11 18:21:00 +02:00
ce198cd01d build for android in stand-alone 2012-09-10 16:46:59 +02:00
cdfe6ef57b change some configuratuion 2012-09-09 23:41:36 +02:00
e610df1f12 new distance fieald display work corectly, need to work on the values 2012-09-07 16:32:54 +02:00
0a8b887984 Distance field display work corectly (generation is slow but it work) 2012-09-06 18:42:06 +02:00
022055b86e add a distance field display for the fonts ==> needed openGL ES 2 2012-09-06 02:54:32 +02:00
6b98ad543c decide to add a return at message system, and corection of the position event for the scean 2012-09-05 17:59:38 +02:00
527ff05b2c change the scene management system 2012-09-04 18:23:40 +02:00
5ea6564840 change android specific file methode 2012-09-04 10:15:45 +02:00
42e822a241 add configuration file for generating the project 2012-08-31 16:50:36 +02:00
d0c95c91ed rework the list event to be supported directly on the openGL system 2012-08-31 16:49:55 +02:00
4f598b362d corection of the list raw element error with the size text parsing 2012-08-31 09:35:22 +02:00
c44642ba10 work on the Windows fileSystem abstraction, file shoser corection of init and Windows gui is cut corectly 2012-08-31 01:29:30 +02:00
6c15f2b86c error in glew inclusion when normal openGL mode 2012-08-30 22:18:52 +02:00
936e10adac compilation for windows done corectly with glew ==> need to be tested on a real windows to test it 2012-08-30 18:32:31 +02:00
6d488cb802 Corection of the texture 3D and update windows makefile who does not support shader directly 2012-08-30 16:58:54 +02:00
cc6d40f9d6 Android OpenGl-ES2 work corectly ==> many check is done ==> we can do it only one time by cycle 2012-08-30 13:38:39 +02:00
085b7cb9cd build is now ok for android with openGL ES 2.0 ==> not work : use unimplement fuction??? 2012-08-30 01:29:28 +02:00
2eaed4f16e Compleate abstraction of the standard openGl system to to compatible with openGL-ES-2 ==> must be tested 2012-08-29 18:25:24 +02:00
ed0b62b13f Set double compilation mode 2012-08-29 10:15:03 +02:00
68a53a7068 shader work on PC for OObject textured and colored 2012-08-28 18:16:09 +02:00
fd86f42454 correction of the segFault bug with Resources 2012-08-28 10:31:19 +02:00
5d2000e952 try to find the manager error 2012-08-27 23:26:59 +02:00
e9a3efba18 change the position of the shader : now in file, and create she shader and program loader 2012-08-27 12:25:30 +02:00
1d5be4e953 compilation back but the system does not work at all 2012-08-26 22:45:24 +02:00
6ac6bc50d0 first new api of openGl working and create a resourceManager => this one will be used 2012-08-24 18:05:11 +02:00
fc30b0bb21 test openGL with shader 2012-08-23 18:00:35 +02:00
d14e684954 compilation for windows is back and remove some unusefull warning 2012-08-23 14:21:38 +02:00
a6b807d75e andoid comilation in error 2012-08-23 14:11:30 +02:00
ff8f70d181 the freType texture generation is obstract in the textured text (maybe need to create the imageFont) 2012-08-23 13:54:31 +02:00
3608a8f4df system start to work 2012-08-22 21:40:51 +02:00
229b1de48d management of the font is now better, but it did not work corectly for now ... 2012-08-22 18:22:29 +02:00
b780f22d2c add basic think of resources 2012-08-21 23:27:17 +02:00
a89f8c09f5 Remove color management and start rework of texture system management ==> not tested 2012-08-21 18:14:58 +02:00
99b30494dd BUGFIX : error when opening a file, sometime we have a segFault 2012-08-21 12:40:10 +02:00
b4c0735990 Add a fifo messaging template and simplify the main event system 2012-08-20 18:10:52 +02:00
536c62c0fc Re-ordonate the internal ewol arbo to increase lisibility 2012-08-20 16:50:29 +02:00
58295c552b end of the simplification of the Gui abstraction interface 2012-08-19 18:04:05 +02:00
e177dd4db3 change the interface of OS abstractions 2012-08-19 16:56:31 +02:00
3b645645cb change the clipboard system (normalisation and standardisation 2012-08-18 21:06:42 +02:00
236d450bd5 a real simple vector system 2012-08-18 18:22:26 +02:00
b59ce366e7 try a new generic vector principe 2012-08-18 17:37:36 +02:00
ea7846f4ff change the basic makefile 2012-08-17 18:34:37 +02:00
af8c2a8313 Windows abstarction run now nearly corectly 2012-08-16 18:21:04 +02:00
69993f8c59 grep mouse event in the Windows platform 2012-08-15 23:51:08 +02:00
d75f9e97a1 Build for windows ==> work with wine
Add mutex and semaphore abstraction
Add basic windows gui starting ==> no input ... as bad as a first think
use generic makefile
add a basic entry point for the zlib
2012-08-15 20:56:16 +02:00
14e7b44650 think at a new interface 2012-08-15 09:54:48 +02:00
596ace81fb Add color capacity 2012-08-14 17:33:17 +02:00
dadd22bfe1 change the color_ts in a better class anc rename VectorType in Vector 2012-08-14 16:12:03 +02:00
ea19353387 orthograph correction of redraw 2012-08-14 08:58:43 +02:00
c91eb1bece draw on PC only when needed 2012-08-14 08:56:17 +02:00
24cb070116 Remove compleately the multiple thread and some amelioration of the deletion on the widget 2012-08-13 18:02:46 +02:00
57480937b7 Andoid might work corectly 2012-08-10 17:26:46 +02:00
665a350fa1 Remove the double buffering system ... 2012-08-10 16:26:48 +02:00
de3cff6ad5 begin of the remove of the multiple thread in the openGl display system 2012-08-10 14:11:00 +02:00
74a4ca9e84 simplify makefiles 2012-08-10 12:18:24 +02:00
e121fcc096 compilation back to the std etk Vector Type && android compilation inside the makefile 2012-08-09 18:39:40 +02:00
d2701548d5 Revert "STANDARD ==> remove vector type and replace with std::vector (done but sone assertion)" ==> this was a really bad Idea
This reverts commit 274e9d7ef7fd032b091403b4647ed9031ccb02ea.

Conflicts:

	Sources/libetk/etk/RegExp.h
	Sources/libparsersvg
2012-08-09 14:32:13 +02:00
3842609b16 DEV : try to compile Android directly 2012-08-08 18:19:31 +02:00
274e9d7ef7 STANDARD ==> remove vector type and replace with std::vector (done but sone assertion) 2012-08-07 18:04:34 +02:00
3b60ac1214 Correction of the fileChooser 2012-08-06 15:17:33 +02:00
3d849ed96f some scene change 2012-07-26 18:11:12 +02:00
7e0a2c9fc3 Change the scene display methode 2012-07-25 18:03:30 +02:00
c824f361c2 simplify the EObject class 2012-07-24 17:51:25 +02:00
5677af8e69 add version number 2012-07-24 13:02:19 +02:00
f088c1667a Update the read-me file 2012-07-23 14:44:31 +02:00
63ce214094 update build system 2012-07-23 14:39:43 +02:00
eb5ed16eb4 texture error position ==> need horizontal miror 2012-07-21 09:41:11 +02:00
771ab20f62 Corection of some bug due to the inversion ==> just patch, some code might be rewrited 2012-07-20 14:38:31 +02:00
a97df32a66 image back in the corect sens and context menu in the good orientation 2012-07-19 22:32:21 +02:00
b8dcbd57a7 migration to the open-GL orientation for the display ==> this force to thing from the bottum (step 1) 2012-07-19 18:14:26 +02:00
8305cde419 change the methode to display elements and some corection for the WSlider 2012-07-19 16:56:19 +02:00
8ef890bfae first interface availlable for the parameter widget system 2012-07-18 18:22:28 +02:00
9cad5a5a9b basic parameters API 2012-07-17 22:21:40 +02:00
a1e7193af1 update subLibrairies 2012-07-17 17:59:15 +02:00
4224c8699a change the keep focus position 2012-07-17 13:29:39 +02:00
4991925e8d missing sub module freetype 2012-07-17 12:17:11 +02:00
4900ae89ec Set librairy to the external element subModule for git 2012-07-17 12:10:33 +02:00
8c9455a2a5 Externalise build system 2012-07-17 10:08:01 +02:00
e0bed8b1c9 New compilation suite for automatic makefile 2012-07-16 18:01:14 +02:00
7bce71d2db Change the open file system with a simplest system 2012-07-13 18:12:59 +02:00
03972e6d7a Select file upgraded and entry upgraded 2012-07-10 12:27:57 +02:00
ed50654058 Change the management of the enter and leave element for the mouce event 0 2012-07-10 10:17:40 +02:00
2c8cc56816 add texture color and set widget hideable 2012-07-03 17:00:12 +02:00
67c039f8d6 change capacities of the button image && simplify java 2012-07-02 17:41:51 +02:00
8fcd8369cd change properties of the sending message between objects 2012-07-01 17:55:46 +02:00
efc628af0f compilationerror 2012-06-29 18:12:07 +02:00
99d026f367 Add audio on android platform ==> first release, can only open one channel 2012-06-29 17:56:15 +02:00
c6610b12af bugfix wav & one instance of audio element 2012-06-28 22:02:59 +02:00
f17a2bb6dc Add wav decoder file (simple and not compleate)==> but it work for basic test 2012-06-28 18:28:53 +02:00
ed5c0cb5c5 Implementation of the portaudio playback for Linux 2012-06-28 10:08:07 +02:00
e188f085f6 add portAudio missing legal files 2012-06-27 21:04:24 +02:00
a503fa8098 add portaudio librairie 2012-06-27 21:00:09 +02:00
3290652dcd audio configuration of alsa to slow to play audio elements 2012-06-27 18:18:24 +02:00
d41a83a7c6 add basic audio playing on linux 2012-06-26 18:59:29 +02:00
569b191389 simplify the sprite loading 2012-06-26 10:16:11 +02:00
7ed04e5ec6 Remove log of the anomynous send event 2012-06-22 17:09:26 +02:00
969c36f27a add color at the sprite 2012-06-21 18:31:39 +02:00
4e271d2dcb remove log of parser SVG and change comportment of image button 2012-06-20 18:17:01 +02:00
e9165ce89a Change color_ts structure un a class vertion of it 2012-06-19 16:55:09 +02:00
99caa2a353 Compilation android jave software abstraction is back 2012-06-19 16:54:26 +02:00
1d84f2ae0c Remove warning with CLANG 2012-06-19 16:53:52 +02:00
4cc605a701 Correction of the compilation inside android 2012-06-19 16:53:17 +02:00
e97e33890b Manage scene background inside derived class ==> no need in the basic scene ... 2012-06-18 22:26:03 +02:00
8f8aaef01e clang compilation and test bg 2012-06-18 18:02:16 +02:00
4f62af618d CLANG test 1 ==> compilation error 2012-06-18 07:50:54 +02:00
681f5a529d normalize 2012-06-14 18:33:51 +02:00
b499575b61 GAME : Add having impact 2012-06-12 18:27:31 +02:00
343c92c115 Remove dependency with wxWidget in the compilation tool 2012-06-12 09:36:45 +02:00
1c583aafdd simplify scene sprite management 2012-06-11 16:47:02 +02:00
d797d61c10 Bug-fix : display of the string correction ==> remove overlap between glyph 2012-06-11 11:12:00 +02:00
261d88ff37 Move to standard type :float, Vector2D<float> ... 2012-06-11 10:53:39 +02:00
ba09b090a9 vendredi soir 2012-06-08 18:24:11 +02:00
914df932d9 Basic working for the ogl fixpoint abstraction 2012-06-07 18:24:40 +02:00
da291e0f22 add imaged button not manage with Drawer widget 2012-06-06 18:20:37 +02:00
ccc443c4cf Add a widget slider.
Have some problem like : change the destination when processing generate errors in the diplay, and the element is not clipped in the upper widget ==> think about it
2012-06-05 18:09:23 +02:00
117ec06757 better scene management 2012-06-03 17:28:34 +02:00
62a8fddb53 remove scene in the process call 2012-06-03 10:31:14 +02:00
0c1b391b19 Better management of the lua element and other ==> garbage collector to down the number of malloc and free 2012-06-03 10:28:49 +02:00
43ce5cf436 Android file access error 2012-06-01 17:54:34 +02:00
b6e02cc049 lua:Change the print destination. game: all basics access between elements 2012-06-01 17:47:43 +02:00
37a562812f add somme controle for lua element 2012-06-01 00:46:04 +02:00
f434da041a Lua script working correctly ==> might test efficiency 2012-05-31 18:28:32 +02:00
196cfef334 basic nearly working lua game element 2012-05-30 22:57:49 +02:00
81ad7792e0 First step for an element lua exemple 2012-05-30 18:16:46 +02:00
49e62a10d1 First functionnal lua test with internal lib 2012-05-30 10:23:14 +02:00
038be3ef3e start integration of the module ewolGameElement 2012-05-29 22:54:55 +02:00
8a6f8b3877 Add Lua sub librairy 2012-05-29 15:24:34 +02:00
f11fa06e7f add the link for explanation of the path elliptical 2012-05-29 13:00:26 +02:00
f3db4e949e Abstraction of the set Title in the main X11 thread 2012-05-28 08:45:03 +02:00
2ee4d9f071 set back a safe copy/past and middle button 2012-05-27 10:59:08 +02:00
be4a593346 set internal mutex for the display 2012-05-27 10:50:17 +02:00
18099cf376 Find the error of the X11 stop ==> basic corection but it is now more longer than predicted 2012-05-23 10:58:30 +02:00
7afeb4aa80 Debug state of the X11 tread problem 2012-05-22 18:10:02 +02:00
bf41251241 Correction of the middle button grepping data in the scrolled windows 2012-05-22 10:09:53 +02:00
12584daa63 Remove internal keyboard and e2d 2012-05-22 10:04:37 +02:00
0f56843aa6 remove last touch specific code ==> compile on PC too 2012-05-22 09:54:01 +02:00
2f34ae3f87 [BREAK compatibility] Change the input event call function and manage touch without flag 2012-05-22 09:49:55 +02:00
a89e656309 Management of the Multiple type of event (mouse & finger) to manage better in Android 2012-05-21 18:10:00 +02:00
4383fab72d Modification of the Java abstraction to manage the difference between Mouse and touch event ==> Not compiled and tested... 2012-05-21 13:53:33 +02:00
0ce79b8b15 Better scrolling bar management 2012-05-21 13:27:42 +02:00
4311fe4e9e scrolled bar step 1 2012-05-15 13:02:43 +02:00
dca276e2d5 Tabulation correction input 2012-05-13 21:31:08 +02:00
43793efc7c Dynamic debug step 1 2012-05-13 19:04:57 +02:00
4cba690678 Add image widget and better system o the basic folder mecanism 2012-05-13 09:45:58 +02:00
d9e6126ff6 Add OGG and TREMOR libs for audio system 2012-05-11 17:46:00 +02:00
975591c6a4 correction of the bug in the display when setting the data the first time, and move in the entry 2012-05-11 17:46:00 +02:00
d529f48e1c File chooser: back to the start of the list when having a new folder 2012-05-11 17:46:00 +02:00
a5893dae56 remove the warning when parsing meta-data 2012-05-11 17:46:00 +02:00
16136c4b30 add a insertor of Unicode single element 2012-05-11 17:46:00 +02:00
ee8530decd basic namespace audio writing ... 2012-05-02 21:54:06 +02:00
ff3d6eb741 Add Audio architecture for next version 2012-05-02 18:20:50 +02:00
0b7d2d0c1f Remove log and update todo 2012-05-01 19:27:14 +02:00
f1a10c62c1 bugfix: correction of the upper folder in the selection of files 2012-04-29 15:32:52 +02:00
bf681fece3 set internal clipboard availlable 2012-04-29 15:21:51 +02:00
7b02875a83 Remove X11 clipbord ==> error while using it (X11 like assert) 2012-04-28 10:21:01 +02:00
bf10f40b3e correction of the compilation error 2012-04-28 10:20:13 +02:00
9f258dcf7e change philosiphy of the scene manager 2012-04-27 18:22:20 +02:00
d489e1df83 Maybe a not good modif ... 2012-04-26 18:18:06 +02:00
7b94a21fca corection of the filling and stroking at none error 2012-04-25 21:57:55 +02:00
423fa82e2f Remove some error in the svg parser 2012-04-25 18:48:04 +02:00
ded1d04f55 Set the setter of the maxSize for the scolling widget 2012-04-24 13:35:55 +02:00
affff567bf Request the moving element in the scrolling windows 2012-04-24 13:17:30 +02:00
9d60aa1a55 Remove old theme manager and change the color system (add basic abstraction and default color definition) 2012-04-23 17:07:49 +02:00
e0416fc774 basic error return for etk 2012-04-23 10:37:41 +02:00
7cc9076ab8 Add Soft keyboard and wrapper of the key event (first step ==> can really be better) 2012-04-20 17:56:23 +02:00
751a0712d8 better calling of the JAVA (step 2) 2012-04-19 18:11:19 +02:00
cda5d8cd40 Start of calling the jvm from the C code 2012-04-18 18:14:13 +02:00
7ad9bce29c change the scene mmechanism and corection of a bug in the VectorType template 2012-04-18 00:34:02 +02:00
02c92b3e2e Update scene element class 2012-04-17 18:25:37 +02:00
56b749b3ed minor change 2012-04-17 11:01:47 +02:00
09f8b5edd2 correction of the high-speed scrolling up and down limit 2012-04-16 09:15:56 +02:00
f445dbd524 add progress bar, and change scene 2012-04-15 21:36:07 +02:00
185e85293d Change the policy to get widget at position and add stop/resume in the scene 2012-04-13 18:45:18 +02:00
afae43697d add layer widget 2012-04-11 22:11:25 +02:00
17974d4c98 Force power 2 texture, and update the scene system 2012-04-11 18:51:46 +02:00
59b78d1c00 Basic dynaic game is OK 2012-04-11 01:33:24 +02:00
b7362f524a Basic scene, correct sprite display, basic game element, some SVG parser error correction 2012-04-10 18:37:03 +02:00
f2b777f3c0 Some widget corection and correct the multiple event when a new layer arrive in a pop-up apear 2012-04-05 18:31:16 +02:00
af4d77e5bb Implementation of the copy/Paste on X11 2012-04-05 18:31:16 +02:00
7642565b03 basic scene and sprite element 2012-04-04 23:29:05 +02:00
ee1e9a5834 Set the basics of the copy/cut/paste on X11 ==> not ended 2012-04-04 18:17:18 +02:00
ce89a71068 work on creating a scene ... not good now... 2012-04-01 16:08:23 +02:00
0a5ee4e3f1 Display the specified backgreound end foreground for the joystick 2012-04-01 15:15:59 +02:00
2315b6f11f basic property of the joystick 2012-04-01 13:39:07 +02:00
6cd8f3fa2a Add joystick and remove e2d element (deprecated since SVG coded) 2012-03-30 18:11:39 +02:00
979c103743 Update the basic Makefile 2012-03-29 17:48:59 +02:00
011dd96f77 work fine is back on android 2012-03-29 10:01:50 +02:00
9282ee6915 Add texture loader of the SVG files 2012-03-28 18:13:49 +02:00
dcd2bdb833 Basic SVG parser missing some element like eliptical arc, gradient, effect and defs 2012-03-27 18:32:44 +02:00
1fd0741c21 Parse and renderer better SVG images 2012-03-26 18:18:52 +02:00
062b67e1b7 start abstraction of the AGG lib 2012-03-23 17:57:27 +01:00
7e984ca41f Start think at a AGG renderer abstraction 2012-03-22 18:10:44 +01:00
7598763314 Parsig of a basic svg is nowOK ==> many function is not OK ... 2012-03-22 17:45:05 +01:00
08289ff4fd Parsing basic SVG, and try to generate PPM file to test result with the librairy agg 2012-03-21 18:01:50 +01:00
4446e2f750 Add AGG librairy v2.4 in BSD like license, add start a svg parser 2012-03-20 22:41:35 +01:00
89d1cf95ff Set the scaling in the OObject 2012-03-14 23:29:44 +01:00
9d793d6d29 Remove and add log messages 2012-03-14 18:31:26 +01:00
b67efa06c6 add reader of e2d files and associated widget 2012-03-13 18:21:21 +01:00
3e8b03ebf9 Add the type of the EObject to permit the debug of the static cast of the classe 2012-03-13 14:36:28 +01:00
0ff213243f Correction of filename when abstraction used 2012-03-12 17:59:13 +01:00
f0ac6bb64c event of button color 2012-03-11 20:48:06 +01:00
f1cdfdc811 better shift and special keybord management 2012-03-11 13:53:11 +01:00
64a079f615 amelioration of the color system 2012-03-10 21:46:43 +01:00
1dfac7819a ewol normalisation and comment. ==> try to have a stable version 2012-03-09 18:12:42 +01:00
c4b70a4bdc Some clean and normalisation 2012-03-08 18:08:25 +01:00
6d221b4de1 Remove deprecated code 2012-03-07 18:06:15 +01:00
0296151234 Change the management of the event 2012-03-07 17:59:33 +01:00
500e0d929a Add really basic sliders 2012-03-06 18:33:42 +01:00
19ead2de2c Start coding of the color selector 2012-03-05 18:02:34 +01:00
81075dff9c add button color (not ended) 2012-03-05 00:07:43 +01:00
8326ac2dfc Rework of EWOL (Step 3) 2012-02-29 18:06:22 +01:00
187aaa2101 Rework of EWOL (Step 2) 2012-02-28 18:23:11 +01:00
87f4cb08e6 Rework of EWOL (Step 1) 2012-02-27 18:17:05 +01:00
a35b65f4c1 First step for the EObject 2012-02-24 17:26:15 +01:00
3bb73288c6 Manage shortcut is correct and the keyboard all time generate the good key event... 2012-02-24 12:58:02 +01:00
6cbe46a105 change oobject properties 2012-02-23 22:29:51 +01:00
514f666a15 keyboard correction, change clipping methode of the oobject 2012-02-23 18:07:01 +01:00
551684fe8e change the clipping with the viewport of openGL 2012-02-23 13:44:22 +01:00
11d9925409 start of the shortcut coding 2012-02-22 18:18:29 +01:00
8989a3dea0 Add the double-buffering in all needed classes that is already missing 2012-02-22 13:40:21 +01:00
0e651c71ae Remove old coord type 2012-02-21 13:54:55 +01:00
8e85f28fc8 remove deprecated classes : singleton 2012-02-20 20:32:06 +01:00
1c0c59b0ca missing shortCut 2012-02-20 10:19:17 +01:00
36534c0882 set the OpenGl clipping instead of using internal clipping 2012-02-19 18:52:56 +01:00
ac952176f2 change open Gl working 2012-02-19 15:48:33 +01:00
227c141993 Remove all the capabilities at the Widget main classes 2012-02-18 22:21:29 +01:00
bd8b05eaf2 display optimisation 2012-02-18 15:56:41 +01:00
62852ff7c9 correction of the scrooling problems==> message to the thread is bad 2012-02-18 11:51:18 +01:00
f5147fa4a5 Better close 2012-02-18 00:35:50 +01:00
645c3b6855 display the rectangle with clipping error corrected 2012-02-17 23:43:01 +01:00
74a1a39d8c Menu dev OK and change the thread system. add the safe remove of the widgets 2012-02-17 18:26:47 +01:00
3ad5f9ff83 Menu midget generation 2012-02-16 23:30:37 +01:00
b4dba28f15 Rewark button, add context menu management 2012-02-16 18:19:24 +01:00
199d24a3a4 Correction of the Unicode transcription and simplify the UString class 2012-02-16 14:02:36 +01:00
23ca4b1821 Remove xf86vmode dependency 2012-02-16 12:22:05 +01:00
ed7eff92f8 Correction of the sorting list in the file Chooser and compare unicode String with no A < a < B < b ... 2012-02-16 10:07:47 +01:00
be4970ecc6 add comparing on the UString 2012-02-15 23:08:34 +01:00
ce3c976f02 Change all in Unicode string for system normalisation 2012-02-15 16:24:06 +01:00
ef639438cb Change the FileChooser comportement, and Create the Unicode string ==> etk::UString (must be used in all the Gui application) 2012-02-14 19:31:25 +01:00
b3bff900d7 compilation error in 64 bit... 2012-02-13 21:06:06 +01:00
61f296a246 Uniformisation of the UNICODE in the soft 2012-02-13 18:03:28 +01:00
d1677a10ba bug correction 2012-02-12 22:38:07 +01:00
c15c4fa9d2 correction of the scrooling on touch system 2012-02-12 12:08:11 +01:00
df8c5b3f34 manage the tablette scrolling 2012-02-11 11:18:53 +01:00
64a5571451 add scrolling on the list 2012-02-10 18:23:34 +01:00
6446535f31 upgrade the windows display and the file chooser system 2012-02-09 17:22:52 +01:00
1ba8901f74 Correction of the windows resize 2012-02-08 18:06:28 +01:00
3c468e612c change the event management 2012-02-07 23:03:51 +01:00
165b3da4d3 Better font stop, jet texture internal Id and not OpenGl ID, Correction of multiCast RM, wcrolling widget is good 2012-02-07 18:07:06 +01:00
5447f326c6 Create the scolled widget abstraction 2012-02-06 18:00:45 +01:00
78bada11a7 list size on android 2012-02-05 22:04:54 +01:00
182879be3e add a specific font color managed for the font display 2012-02-03 18:15:43 +01:00
5968cad883 Correction of the event on android 2012-02-02 23:33:27 +01:00
67ebc4b017 Android texture reloading after suspending 2012-02-02 23:22:41 +01:00
a4c8558ab7 correction of the singleton system 2012-02-02 18:20:40 +01:00
ff3e92fd01 Optimize the X11 display to only generate the display when something change, optimise x11 main thread 2012-02-02 14:04:42 +01:00
87380eff95 Add double buffering acces to the display system of all the widgets 2012-02-01 18:25:48 +01:00
7704b49594 Work on android 2012-01-31 22:35:40 +01:00
a3b404ec4d Add message broadcast system and test the thread system of display 2012-01-31 18:27:35 +01:00
d5e64688c7 Start of merging the display system between Android and X11 2012-01-27 12:43:36 +01:00
ebac712147 Abstraction thread nearly ended ==> work on android, but texture are not correct 2012-01-27 02:05:26 +01:00
37098ebad7 Start to add the thread between the interface and the system 2012-01-26 18:13:15 +01:00
4b3456b28c new event and try to find the tablette error 2012-01-25 23:30:59 +01:00
d0f57d33a7 Add freetype librairy on the project ...
Remove internal data in memory ==> deprecated with assets
Set an abstraction of the loading of the freetype texture ==> must be done to be supported in Android
Correction of the stream error that generate a segmentaion fault in the Android system
2012-01-25 18:36:51 +01:00
d8b9535016 Add clipping methode for the Rectangle diaplay 2012-01-24 23:51:21 +01:00
2650ff1e5a manage better display of unicode ==> need to menage multiple type of charset 2012-01-24 17:55:17 +01:00
f8ebfb3622 Bad Day 2012-01-23 12:42:04 +01:00
fed2eda030 Add special key remembering in the ewol external access 2012-01-19 18:15:57 +01:00
8fdb228ce9 correction of the X11 CR error 2012-01-18 22:57:13 +01:00
780fe1bcf6 Change Unicode convertion and change keypad error 2012-01-18 18:52:48 +01:00
6ab23a4982 Better true-type display of the none-mono-space font 2012-01-18 14:34:57 +01:00
b21e1a74f8 Better true-type display of the none-mono-space font 2012-01-18 14:32:08 +01:00
83c7165c53 Optimise true type texture size and temporary memory management 2012-01-18 09:38:35 +01:00
5c68e20a7e Change the input event to support special key of the keyboard, and add shortcut on the widget 2012-01-17 17:13:46 +01:00
3204e48c80 Add colored Text for every character 2012-01-16 14:38:07 +01:00
50ebb501c8 File direction error 2012-01-15 14:15:57 +01:00
5f63c38eb8 Add text in a specific text system 2012-01-13 13:07:15 +01:00
bc0afc31f8 Remove windows internal decoration ==> think at it later ... and first compilation of edn with it 2012-01-11 15:30:34 +01:00
fcefec4958 missing files 2012-01-09 20:53:59 +01:00
c55dd4b4d9 keyboard 2012-01-08 22:07:39 +01:00
ac54987af9 Update the File chooser widget 2012-01-05 18:36:01 +01:00
56926c5f96 Double click error on android and get a better files chooser 2011-12-30 17:59:52 +01:00
5b0170582c Spacer: add config size; Sizer: add contamination expend restriction(vert); debug:add the time; Pop-up:add the %of use 2011-12-30 14:16:57 +01:00
4d06072529 Update Makefile suite AND add text clipping in X at end (first step) 2011-12-30 10:44:44 +01:00
61932a171f pop-up/Spacer/ FileChooser
Add the pop-up entity to the windows system
Add the spacer widget
Permit Sizer to not herited of expend
Add the widget ID more efficient
Add the call of output event in all the widget
Add the Meta-Widget of file chooser ==> not ready at all
2011-12-29 18:37:28 +01:00
9bfc6c4e50 First display of a simple list and generation of the event needed at this one 2011-12-28 11:32:21 +01:00
1daa4b8ee0 First step to the List Display 2011-12-27 18:04:38 +01:00
abec5813db Change the Folder of the vompilation of Linux platform 2011-12-27 09:23:04 +01:00
583688c3b7 End of the first dev of the Entry 2011-12-23 18:02:33 +01:00
663a6dfe46 Add the Entry widget ==> first step ... 2011-12-22 18:25:07 +01:00
9e5e81f690 Add the Label widget 2011-12-22 10:38:02 +01:00
2e50ce7690 Rework the button system to work with the fill system in X and Y 2011-12-21 18:04:07 +01:00
7150727dd5 add the todoList file 2011-12-21 11:43:03 +01:00
b180bd648f Order the Code 2011-12-21 11:35:21 +01:00
c49ee5e819 Remove unneeded files 2011-12-21 09:13:47 +01:00
5c27afd74e Linux comilation is OK with the YM makefile system 2011-12-20 23:42:19 +01:00
0296014be1 Add the YM makefile base on Android makefile 2011-12-20 18:29:52 +01:00
8d2df70cfe plop 2011-12-19 16:47:57 +01:00
ff5c5a2bc5 Rework the ewol architecture for common building tool 2011-12-17 08:30:52 +01:00
e9c47ba8a7 Comipation work on Linux and Android 2011-12-16 17:29:24 +01:00
9c939d2d0a Test non probant... 2011-12-15 21:56:49 +01:00
5d6f5cfb29 add platform specific makefile 2011-12-15 18:17:18 +01:00
bd5d268630 Update the checkbox size when changing the size of the font 2011-12-14 15:35:49 +01:00
3c7b70f901 abstraction step 4 2011-12-14 14:17:31 +01:00
591f26cb90 abstraction step 3 2011-12-14 14:10:02 +01:00
62a4079957 abstraction step 2 2011-12-14 13:57:46 +01:00
87759817ab abstraction step 1 2011-12-14 10:19:40 +01:00
4b380780e7 externalisation of build 2011-12-13 14:35:00 +01:00
4b38c0f201 Load file in the assets directory 2011-12-11 16:10:25 +01:00
dc102185db Correction of the input event coming fro android ==> event generation work coreectly ... 2011-12-10 11:02:00 +01:00
fb6f1e0703 rework x11 envent when move : generate event with the ID of input .... 2011-12-09 14:59:22 +01:00
0dc3241a72 Android first application working... 2011-12-09 13:14:30 +01:00
8d7a9bedfa access to the file is OK in the memory 2011-12-08 22:44:18 +01:00
ac984dac7a Internal data Fist step : Generate an arbo inside the binary and get data with abstraction of the arboressance od the software 2011-12-08 18:23:30 +01:00
fbb244b398 Je ne sais pas trop... 2011-12-07 09:41:36 +01:00
0879f1db9c Try android assets and diplay font in bmp 2011-12-05 18:14:43 +01:00
eb20828922 regenerate the bitmap Font 2011-12-05 10:12:08 +01:00
7595fbf424 Android: init work corectly but not really well written 2011-12-04 22:34:44 +01:00
278fc2712f Android first version is now ok ==> must review event and insit uninit system for android 2011-12-04 13:34:24 +01:00
aa3e79f8d1 android: link with the jni is now ok 2011-12-04 10:36:37 +01:00
0a479ca7ff Android: add making system
Etk : remove the dependency with std::ostream and std::cout that are not present on Android OS
2011-12-02 17:23:45 +01:00
2ea7bc27d2 Correction of the trueType FONT display and add circle display of EOL files 2011-11-29 14:27:17 +01:00
eddb65de56 First dusplay EOL element with basic form ... 2011-11-29 10:12:14 +01:00
9458f41709 basic drawing not compleate ... 2011-11-28 18:12:04 +01:00
763ad9654f Add tinyXML and start parsing file of object ==> faster than previous version 2011-11-25 17:46:14 +01:00
bbef8c86d5 Change optic ... uns XML files ==> more portable 2011-11-25 14:47:09 +01:00
6137705009 First parsing of the theme File 2011-11-23 18:26:25 +01:00
5308da4fc2 Basic theme adding ==> did not work at all 2011-11-23 14:12:02 +01:00
55c7b47553 compilation Ok with moving the files 2011-11-23 11:37:38 +01:00
4fed0912ac Change All file structure 2011-11-23 10:34:27 +01:00
430e6a90d3 Remove Warning 2011-11-22 21:17:38 +01:00
6e92491a9f First step to generate the keyboard event directly on the correct widget 2011-11-22 17:56:04 +01:00
e438b70f0e Some recommandation of namespacing change 2011-11-22 14:07:50 +01:00
80f4796eec Focus: added it at the widget manager, but no change ewpected with the windows for now 2011-11-22 14:02:58 +01:00
5a5b358a46 Widget manager added, and rework .eol file to simplify it 2011-11-22 10:42:43 +01:00
f0ce27e8d7 Update display console 2011-11-21 18:20:30 +01:00
14f3adcadd oublie de fichier 2011-11-21 07:34:05 +01:00
202fa2ed5e commit du lundi matin ... 2011-11-21 07:33:30 +01:00
4a4c8fcbac Add drawing part of circle and change button display 2011-11-13 14:36:26 +01:00
1aa8310c45 Change double and float in etkFloat_t to abstarct the precision of the display 2011-11-10 18:23:19 +01:00
1cabc7310b Clipping algo is now OK ==> I will create a generic code and optimise it... 2011-11-10 17:54:28 +01:00
40f82d2f77 First step for the algorithm of clipping... 2011-11-10 15:51:20 +01:00
ffcaa34037 Create a better inteface for gnenerating triangle in the colored OObject system 2011-11-09 22:17:02 +01:00
38ef1f5d9f Think at new drawing API 2011-11-09 18:14:43 +01:00
061037ab67 Draw now a simple circle 2011-11-09 18:06:40 +01:00
76ceb4a67d Draw : draw simple element: line and disc 2011-11-09 17:48:07 +01:00
172c5d31ec A little clean in font system 2011-11-09 10:02:00 +01:00
06f6cf283e Update basic object file 2011-11-09 09:50:05 +01:00
484 changed files with 36845 additions and 19463 deletions

4
.gitignore vendored
View File

@ -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
View 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

View File

@ -1,235 +0,0 @@
-*- mode:text; coding:utf-8; -*-
GNU FreeFont Authors
====================
The FreeFont collection is being maintained by
Steve White <stevan.white AT googlemail.com>
The folowing list cites the other contributors that contributed to
particular ISO 10646 blocks.
* URW++ Design & Development GmbH <http://www.urwpp.de/>
Basic Latin (U+0041-U+007A)
Latin-1 Supplement (U+00C0-U+00FF) (most)
Latin Extended-A (U+0100-U+017F)
Spacing Modifier Letters (U+02B0-U+02FF)
Mathematical Operators (U+2200-U+22FF) (parts)
Block Elements (U+2580-U+259F)
Dingbats (U+2700-U+27BF)
* Yannis Haralambous <yannis.haralambous AT enst-bretagne.fr> and John
Plaice <plaice AT omega.cse.unsw.edu.au>
Latin Extended-B (U+0180-U+024F)
IPA Extensions (U+0250-U+02AF)
Greek (U+0370-U+03FF)
Armenian (U+0530-U+058F)
Hebrew (U+0590-U+05FF)
Arabic (U+0600-U+06FF)
Currency Symbols (U+20A0-U+20CF)
Arabic Presentation Forms-A (U+FB50-U+FDFF)
Arabic Presentation Forms-B (U+FE70-U+FEFF)
* Yannis Haralambous and Wellcome Institute
Sinhala (U+0D80-U+0DFF)
* Young U. Ryu <ryoung AT utdallas.edu>
Arrows (U+2190-U+21FF)
Mathematical Symbols (U+2200-U+22FF)
Mathematical Alphanumeric Symbols (U+1D400-U+1D7FF)
* Valek Filippov <frob AT df.ru>
Cyrillic (U+0400-U+04FF)
* Wadalab Kanji Comittee
Hiragana (U+3040-U+309F)
Katakana (U+30A0-U+30FF)
* Angelo Haritsis <ah AT computer.org>
Greek (U+0370-U+03FF)
* Yannis Haralambous and Virach Sornlertlamvanich
Thai (U+0E00-U+0E7F)
* Shaheed R. Haque <srhaque AT iee.org>
Bengali (U+0980-U+09FF)
* Sam Stepanyan <sam AT arminco.com>
Armenian (U+0530-U+058F)
* Mohamed Ishan <ishan AT mitf.f2s.com>
Thaana (U+0780-U+07BF)
* Sushant Kumar Dash <sushant AT writeme.com>
Oriya (U+0B00-U+0B7F)
* Harsh Kumar <harshkumar AT vsnl.com>
Devanagari (U+0900-U+097F)
Bengali (U+0980-U+09FF)
Gurmukhi (U+0A00-U+0A7F)
Gujarati (U+0A80-U+0AFF)
* Prasad A. Chodavarapu <chprasad AT hotmail.com>
Telugu (U+0C00-U+0C7F)
* Frans Velthuis <velthuis AT rc.rug.nl> and Anshuman Pandey
<apandey AT u.washington.edu>
Devanagari (U+0900-U+097F)
* Hardip Singh Pannu <HSPannu AT aol.com>
Gurmukhi (U+0A00-U+0A7F)
* Jeroen Hellingman <jehe AT kabelfoon.nl>
Oriya (U+0B00-U+0B7F)
Malayalam (U+0D00-U+0D7F)
* Thomas Ridgeway <email needed>
Tamil (U+0B80-U+0BFF)
* Berhanu Beyene <1beyene AT informatik.uni-hamburg.de>,
Prof. Dr. Manfred Kudlek <kudlek AT informatik.uni-hamburg.de>, Olaf
Kummer <kummer AT informatik.uni-hamburg.de>, and Jochen Metzinger <?>
Ethiopic (U+1200-U+137F)
* Maxim Iorsh <iorsh AT users.sourceforge.net>
Hebrew (U+0590-U+05FF)
* Vyacheslav Dikonov <sdiconov AT mail.ru>
Syriac (U+0700-U+074A)
Braille (U+2800-U+28FF)
* Panayotis Katsaloulis <panayotis AT panayotis.com>
Greek Extended (U+1F00-U+1FFF)
* M.S. Sridhar <mssridhar AT vsnl.com>
Devanagari (U+0900-U+097F)
Bengali (U+0980-U+09FF)
Gurmukhi (U+0A00-U+0A7F)
Gujarati (U+0A80-U+0AFF)
Oriya (U+0B00-U+0B7F)
Tamil (U+0B80-U+0BFF)
Telugu (U+0C00-U+0C7F)
Kannada (U+0C80-U+0CFF)
Malayalam (U+0D00-U+0D7F)
* DMS Electronics, The Sri Lanka Tipitaka Project, and Noah Levitt
<nlevitt AT columbia.edu>
Sinhala (U+0D80-U+0DFF)
* Dan Shurovich Chirkov <dansh AT chirkov.com>
Cyrillic (U+0400-U+04FF)
* Abbas Izad <abbasizad AT hotmail.com>
Arabic (U+0600-U+06FF)
Arabic Presentation Forms-A (U+FB50-U+FDFF)
Arabic Presentation Forms-B (U+FE70-U+FEFF)
* Denis Jacquerye <moyogo AT gmail.com>
Latin Extended-B (U+0180-U+024F)
IPA Extensions (U+0250-U+02AF)
* K.H. Hussain <hussain AT kfri.org> and R. Chitrajan
Malayalam (U+0D00-U+0D7F)
* Solaiman Karim <solaiman AT ekushey.org> and Omi Azad <omi AT ekushey.org>
Bengali (U+0980-U+09FF)
* Sonali Sonania <sonalisonania AT gmail.com> and Monika Shah
<monikapatira AT gmail.com>
Devanagari (U+0900-U+097F)
Gujarati (U+0A80-U+0AFF)
* Pravin Satpute <pravin_ind21 AT hotmail.com>, Bageshri Salvi
<sbagrshri AT yahoo.co.in>, Rahul Bhalerao <rahul_pb_india AT
yahoo.com> and Sandeep Shedmake <surgs2k47 AT yahoo.co.in>
Devanagari (U+0900-U+097F)
Gujarati (U+0A80-U+0AFF)
Oriya (U+0B00-U+0B7F)
Malayalam (U+0D00-U+0D7F)
Tamil (U+0B80-U+0BFF)
* Kulbir Singh Thind
Gurmukhi (U+0A00-U+0A7F)
* Gia Shervashidze <giasher AT telenet.ge>
Georgian (U+10A0-U+10FF)
* Daniel Johnson
Armenian (serif) (U+0530-U+058F)
Cherokee (U+13A0-U+13FF)
Unified Canadian Aboriginal Syllabics (U+1400-U+167F)
UCAS Extended (U+18B0-U+18F5)
Tifinagh (U+2D30-U+2D7F)
Vai (U+A500-U+A62B)
Latin Extended-D (Mayanist letters) (U+A720-U+A7FF)
Kayah Li (U+A900-U+A92F)
Osmanya (U+10480-U+104a7)
* George Douros
Gothic (U+10330-U+1034F)
Phoenecian (U+10900-U+1091F)
Byzantine Musical Symbols (U+1D000-U+1D0FF)
Western Musical Symbols (U+1D100-U+1D1DF)
Mathematical Alphanumeric Symbols (U+1D400-U+1D7FF)
Mah Jong Tiles (U+1F000-U+1F02B)
Dominoes (U+1F030-U+1F093)
* Steve White <stevan_white AT gmail.com>
Glagolitic (U+2C00-U+2C5F)
Coptic (U+2C80-U+2CFF)
* Pavel Skrylev is responsible for
Cyrillic Extended-A (U+2DEO-U+2DFF)
as well as many of the additions to
Cyrillic Extended-B (U+A640-U+A65F)
* Mark Williamson
Made the MPH 2 Damase font, from which
Hanunóo (U+1720-U+173F)
Buginese (U+1A00-U+1A1F)
Tai Le (U+1950-U+197F)
Ugaritic (U+10380-U+1039F)
Old Persian (U+103A0-U+103DF)
* Primož Peterlin <primoz.peterlin AT biofiz.mf.uni-lj.si>
maintained FreeFont for several years, and is thanked for all his work.
Please see the CREDITS file for details on who contributed particular
subsets of the glyphs in font files.
--------------------------------------------------------------------------
$Id: AUTHORS,v 1.23 2010/09/11 13:24:11 Stevan_White Exp $

View File

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -1,581 +0,0 @@
-*- mode:text; coding:utf-8; -*-
GNU FreeFont Credits
====================
This file lists contributors and contributions to the GNU FreeFont project.
* URW++ Design & Development GmbH <http://www.urwpp.de/>
URW++ donated a set of 35 core PostScript Type 1 fonts to the
Ghostscript project <http://www.cs.wisc.edu/~ghost/>, to be available
under the terms of GNU General Public License (GPL).
Basic Latin (U+0041-U+007A)
Latin-1 Supplement (U+00C0-U+00FF)
Latin Extended-A (U+0100-U+017F)
Spacing Modifier Letters (U+02B0-U+02FF)
Mathematical Operators (U+2200-U+22FF)
Block Elements (U+2580-U+259F)
Dingbats (U+2700-U+27BF)
* Yannis Haralambous <yannis.haralambous AT enst-bretagne.fr> and John
Plaice <plaice AT omega.cse.unsw.edu.au>
Yannis Haralambous and John Plaice are the authors of Omega typesetting
system, <http://omega.enstb.org/>. Omega is an extension of TeX.
Its first release, aims primarily at improving TeX's multilingual abilities.
In Omega all characters and pointers into data-structures are 16-bit wide,
instead of 8-bit, thereby eliminating many of the trivial limitations of TeX.
Omega also allows multiple input and output character sets, and uses
programmable filters to translate from one encoding to another, to perform
contextual analysis, etc. Internally, Omega uses the universal 16-bit Unicode
standard character set, based on ISO-10646. These improvements not only make
it a lot easier for TeX users to cope with multiple or complex languages,
like Arabic, Indic, Khmer, Chinese, Japanese or Korean, in one document, but
will also form the basis for future developments in other areas, such as
native color support and hypertext features. ... Fonts for UT1 (omlgc family)
and UT2 (omah family) are under development: these fonts are in PostScript
format and visually close to Times and Helvetica font families.
Omega fonts are available subject to GPL
Latin Extended-B (U+0180-U+024F)
IPA Extensions (U+0250-U+02AF)
Greek (U+0370-U+03FF)
Armenian (U+0530-U+058F)
Hebrew (U+0590-U+05FF)
Arabic (U+0600-U+06FF)
Currency Symbols (U+20A0-U+20CF)
Arabic Presentation Forms-A (U+FB50-U+FDFF)
Arabic Presentation Forms-B (U+FE70-U+FEFF)
Current info: <http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=omega>
* Valek Filippov <frob AT df.ru>
Valek Filippov added Cyrillic glyphs and composite Latin Extended A to
the whole set of the abovementioned URW set of 35 PostScript core fonts,
<ftp://ftp.gnome.ru/fonts/urw/>. The fonts are available under GPL.
Latin Extended-A (U+0100-U+017F)
Cyrillic (U+0400-U+04FF)
* Wadalab Kanji Comittee
Between April 1990 and March 1992, Wadalab Kanji Comittee put together
a series of scalable font files with Japanese scripts, in four forms:
Sai Micho, Chu Mincho, Cho Kaku and Saimaru. The font files are
written in custom file format, while tools for conversion into
Metafont and PostScript Type 1 are also supplied. The Wadalab Kanji
Comittee has later been dismissed, and the resulting files can be now
found on the FTP server of the Depertment of Mathematical Engineering
and Information Physics, Faculty of Engineering, University of Tokyo
<ftp://ftp.ipl.t.u-tokyo.ac.jp/Font/>.
Hiragana (U+3040-U+309F)
Katakana (U+30A0-U+30FF)
* Young U. Ryu <ryoung AT utdallas.edu>
Young Ryu is the author of Txfonts, a set of mathematical symbols
designed to accompany text typeset in Times or its variants. In the
documentation, Young adresses the design of mathematical symbols: "The
Adobe Times fonts are thicker than the CM fonts. Designing math fonts
for Times based on the rule thickness of Times = , , + , / , < ,
etc. would result in too thick math symbols, in my opinion. In the TX
fonts, these glyphs are thinner than those of original Times
fonts. That is, the rule thickness of these glyphs is around 85% of
that of the Times fonts, but still thicker than that of the CM fonts."
TX fonts are are distributed under the GNU public license (GPL).
<http://www.ctan.org/tex-archive/fonts/txfonts/>.
Arrows (U+2190-U+21FF)
Mathematical Symbols (U+2200-U+22FF)
* Angelo Haritsis <ah AT computer.org>
Angelo Haritsis has compiled a set of Greek Type 1 fonts, available on
<ftp://ftp.hellug.gr/pub/unix/linux/GREEK/fonts/greekXfonts-Type1-1.1.tgz>.
The glyphs from this source has been used to compose Greek glyphs in
FreeSans and FreeMono.
Angelo's licence says: "You can enjoy free use of these fonts for
educational or commercial purposes. All derived works should include
this paragraph. If you want to change something please let me have
your changes (via email) so that they can go into the next
version. You can also send comments etc to the above address."
Greek (U+0370-U+03FF)
* Yannis Haralambous and Virach Sornlertlamvanich
In 1999, Yannis Haralambous and Virach Sornlertlamvanich made a set of
glyphs covering the Thai national standard Nf3, in both upright and
slanted shape. The collection of glyphs have been made part of GNU
intlfonts 1.2 package and is available under the GPL at
<ftp://ftp.gnu.org/pub/gnu/intlfonts/>.
Thai (U+0E00-U+0E7F)
* Shaheed R. Haque <srhaque AT iee.org>
Shaheed Haque has developed a basic set of basic Bengali glyphs
(without ligatures), using ISO10646 encoding. They are available under
the XFree86 license at <http://www.btinternet.com/~shaheedhaque/>.
Copyright (C) 2001 S.R.Haque <srhaque AT iee.org>. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL S.R.HAQUE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of S.R.Haque shall not be
used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from
S.R.Haque.
Bengali (U+0980-U+09FF)
* Sam Stepanyan <sam AT arminco.com>
Sam Stepanyan created a set of Armenian sans serif glyphs visually
compatible with Helvetica or Arial. Available on
<http://www.editum.com.ar/mashtots/html/fonts/ara.tar.gz>. On
2002-01-24, Sam writes: "Arial Armenian font is free for
non-commercial use, so it is OK to use under GPL license."
Armenian (U+0530-U+058F)
* Mohamed Ishan <ishan AT mitf.f2s.com>
Mohamed Ishan has started a Thaana Unicode Project
<http://thaana.sourceforge.net/> and among other things created a
couple of Thaana fonts, available under FDL or BDF license.
Thaana (U+0780-U+07BF)
* Sushant Kumar Dash <sushant AT writeme.com> (*)
Sushant Dash has created a font in his mother tongue, Oriya. As he
states on his web page <http://members.tripod.com/~sushantdash/>:
"Please feel free to foreword this mail to your Oriya friends. No
copyright law is applied for this font. It is totally free!!! Feel
free to modify this using any font editing tools. This is designed for
people like me, who are away from Orissa and want to write letters
home using Computers, but suffer due to unavailability of Oriya
fonts.(Or the cost of the available packages are too much)."
Oriya (U+0B00-U+0B7F)
* Harsh Kumar <harshkumar AT vsnl.com>
Harsh Kumar has started BharatBhasha <http://www.bharatbhasha.net/> -
an effort to provide "FREE software, Tutorial, Source Codes
etc. available for working in Hindi, Marathi, Gujarati, Gurmukhi and
Bangla. You can type text, write Web pages or develop Indian Languages
Applications on Windows and on Linux. We also offer FREE help to
users, enthusiasts and software developers for their work in Indian
languages."
Devanagari (U+0900-U+097F)
Bengali (U+0980-U+09FF)
Gurmukhi (U+0A00-U+0A7F)
Gujarati (U+0A80-U+0AFF)
* Prasad A. Chodavarapu <chprasad AT hotmail.com>
Prasad A. Chodavarapu created Tikkana, a Telugu font available in Type
1 and TrueType format on <http://chaitanya.bhaavana.net/fonts/>.
Tikkana exceeds the Unicode Telugu range with some composite glyphs.
Available under the GNU General Public License.
Telugu (U+0C00-U+0C7F)
* Frans Velthuis <velthuis AT rc.rug.nl> and Anshuman Pandey
<apandey AT u.washington.edu>
In 1991, Frans Velthuis from the Groningen University, The
Netherlands, released a Devanagari font as Metafont source, available
under the terms of GNU GPL. Later, Anshuman Pandey from the Washington
University, Seattle, USA, took over the maintenance of font. Fonts can
be found on CTAN, <ftp://ftp.dante.de/tex-archive/language/devanagari/>. I
converted the font to Type 1 format using Péter Szabó's TeXtrace
program <http://www.inf.bme.hu/~pts/textrace/> and removed some
redundant control points with PfaEdit.
Devanagari (U+0900-U+097F)
* Hardip Singh Pannu <HSPannu AT aol.com>
In 1991, Hardip Singh Pannu has created a free Gurmukhi TrueType font,
available as regular, bold, oblique and bold oblique form. Its license
says "Please remember that these fonts are copyrighted (by me) and are
for non-profit use only."
Gurmukhi (U+0A00-U+0A7F)
* Jeroen Hellingman <jehe AT kabelfoon.nl>
Jeroen Hellingman created a set of Malayalam metafonts in 1994, and a
set of Oriya metafonts in 1996. Malayalam fonts were created as
uniform stroke only, while Oriya metafonts exist in both uniform and
modulated stroke. From private communication: "It is my intention to
release the fonts under GPL, but not all copies around have this
notice on them." Metafonts can be found on CTAN,
<ftp://ftp.dante.de/tex-archive/language/oriya/> and
<ftp://ftp.dante.de/tex-archive/language/malayalam/>.
Oriya (U+0B00-U+0B7F)
Malayalam (U+0D00-U+0D7F)
* Thomas Ridgeway <> (*)
Thomas Ridgeway, then at the Humanities And Arts Computing Center,
Washington University, Seattle, USA, (now defunct), created a Tamil
metafont in 1990. Anshuman Pandey from the same university took over
the maintenance of font. Fonts can be found at CTAN,
<ftp://ftp.dante.de/tex-archive/language/tamil/wntamil/>.
Tamil (U+0B80-U+0BFF)
* Berhanu Beyene <1beyene AT informatik.uni-hamburg.de>,
Prof. Dr. Manfred Kudlek <kudlek AT informatik.uni-hamburg.de>, Olaf
Kummer <kummer AT informatik.uni-hamburg.de>, and Jochen Metzinger <?>
Beyene, Kudlek, Kummer and Metzinger from the Theoretical Foundations
of Computer Science, University of Hamburg, prepared a set of Ethiopic
metafonts, found on
<ftp://ftp.dante.de/tex-archive/language/ethiopia/ethiop/>. They also
maintain home page on the Ethiopic font project,
<http://www.informatik.uni-hamburg.de/TGI/mitarbeiter/wimis/kummer/ethiop_eng.html>,
and can be reached at <ethiop AT informatik.uni-hamburg.de>. The current
version of fonts is 0.7 (1998), and they are released under GNU GPL. I
converted the fonts to Type 1 format using Péter Szabó's TeXtrace-A
program <http://www.inf.bme.hu/~pts/textrace/> and removed some
redundant control points with PfaEdit.
Ethiopic (U+1200-U+137F)
* Maxim Iorsh <iorsh AT users.sourceforge.net>
In 2002, Maxim Iorsh started the Culmus project, aiming at providing
Hebrew-speaking Linux and Unix community with a basic collection of
Hebrew fonts for X Windows. The fonts are visually compatible with
URW++ Century Schoolbook L, URW++ Nimbus Sans L and URW++ Nimbus Mono
L families, respectively, and are released under GNU GPL license. See
also <http://culmus.sourceforge.net/>.
Hebrew (U+0590-U+05FF)
* Panayotis Katsaloulis <panayotis AT panayotis.com>
Panayotis Katsaloulis helped fixing Greek accents in the Greek
Extended area.
Greek Extended (U+1F00-U+1FFF)
* Vyacheslav Dikonov <sdiconov AT mail.ru>
Vyacheslav Dikonov made a Braille unicode font that could be merged
with the UCS fonts to fill the 2800-28FF range completely. (uniform
scaling is possible to adapt it to any cell size). He also contributed
a free syriac font, whose glyphs (about half of them) are borrowed
from the "Carlo Ator" font freely downloadable from
<http://www.aacf.asso.fr/>. Vyacheslav also filled in a few missing
spots in the U+2000-U+27FF area, e.g. the box drawing section, sets of
subscript and superscript digits and capital Roman numbers.
Syriac (U+0700-U+074A)
Box Drawing (U+2500-U+257F)
Braille (U+2800-U+28FF)
* M.S. Sridhar <mssridhar AT vsnl.com>
M/S Cyberscape Multimedia Limited, Mumbai, developers of Akruti
Software for Indian Languages (http://www.akruti.com/), have released
a set of TTF fonts for nine Indian scripts (Devanagari, Gujarati,
Telugu, Tamil, Malayalam, Kannada, Bengali, Oriya, and Gurumukhi)
under the GNU General Public License (GPL). You can download the fonts
from the Free Software Foundation of India WWW site
(http://www.gnu.org.in/akruti-fonts/) or from the Akruti website.
For any further information or assistance regarding these fonts,
please contact mssridhar AT vsnl.com.
Devanagari (U+0900-U+097F)
Bengali (U+0980-U+09FF)
Gurmukhi (U+0A00-U+0A7F)
Gujarati (U+0A80-U+0AFF)
Oriya (U+0B00-U+0B7F)
Tamil (U+0B80-U+0BFF)
Telugu (U+0C00-U+0C7F)
Kannada (U+0C80-U+0CFF)
Malayalam (U+0D00-U+0D7F)
* DMS Electronics, The Sri Lanka Tipitaka Project, and Noah Levitt
<nlevitt AT columbia.edu>
Noah Levitt found out that the Sinhalese fonts available on the site
<http://www.metta.lk/fonts/> are released under GNU GPL, or,
precisely, "Public Domain under GNU Licence Produced by DMS
Electronics for The Sri Lanka Tipitaka Project" (taken from the font
comment), and took the effort of recoding the font to Unicode.
These glyphs were later replaced by those from the LKLUG font
<http://www.lug.lk/fonts/lklug>
Finally the range was completely replaced by glyphs from the sinh TeX
font, with much help and advice from Harshula Jayasuriya.
Sinhala (U+0D80-U+0DFF)
* Daniel Shurovich Chirkov <dansh AT chirkov.com>
Dan Chirkov updated the FreeSerif font with the missing Cyrillic
glyphs needed for conformance to Unicode 3.2. The effort is part of
the Slavjanskij package for Mac OS X,
<http://www.versiontracker.com/dyn/moreinfo/macosx/18680>.
Cyrillic (U+0400-U+04FF)
* Denis Jacquerye <moyogo AT gmail.com>
Denis Jacquerye added new glyphs and corrected existing ones in the
Latin Extended-B and IPA Extensions ranges.
Latin Extended-B (U+0180-U+024F)
IPA Extensions (U+0250-U+02AF)
* K.H. Hussain <hussain AT kfri.org> and R. Chitrajan
`Rachana' in Malayalam means `to write', `to create'. Rachana Akshara Vedi,
a team of socially committed information technology professionals and
philologists, has applied developments in computer technology and desktop
publishing to resurrect the Malayalam language from the disorder,
fragmentation and degeneration it had suffered since the attempt to adapt
the Malayalam script for using with a regular mechanical typewriter, which
took place in 1967-69. K.H. Hussein at the Kerala Forest Research Institute
has released "Rachana Normal" fonts with approximately 900 glyphs required
to typeset traditional Malayalam. R. Chitrajan apparently encoded the
glyphs in the OpenType table.
In 2008, the Malayalam ranges in FreeSerif were updated under the advise
and supervision of Hiran Venugopalan of Swathanthra Malayalam Computing,
to reflect the revised edition Rachana_04.
Malayalam (U+0D00-U+0D7F)
* Solaiman Karim <solaiman AT ekushey.org>
Bengali (U+0980-U+09FF)
Solaiman Karim has developed several OpenType Bangla fonts and
released them under GNU GPL on <http://www.ekushey.org>.
* Sonali Sonania <sonalisonania AT gmail.com> and Monika Shah
<monikapatira AT gmail.com>
Devanagari (U+0900-U+097F)
Gujarati (U+0A80-U+0AFF)
Glyphs were drawn by Cyberscape Multimedia Ltd., #101,Mahalakshmi
Mansion 21st Main 22nd "A" Cross Banashankari 2nd stage Banglore
560070, India. Converted to OTF by IndicTrans Team, Powai, Mumbai,
lead by Prof. Jitendra Shah. Maintained by Monika Shah and Sonali
Sonania of janabhaaratii Team, C-DAC, Mumbai. This font is released
under GPL by Dr. Alka Irani and Prof Jitendra Shah, janabhaaratii
Team, C-DAC, Mumabi. janabhaaratii is localisation project at C-DAC
Mumbai (formerly National Centre for Software Technology); funded by
TDIL, Govt. of India. Contact:monika_shah AT lycos.com,
sonalisonania AT yahoo.com, jitendras AT vsnl.com, alka AT ncst.ernet.in.
website: www.janabhaaratii.org.in.
* Pravin Satpute <pravin_ind21 AT hotmail.com>, Bageshri Salvi
<sbagrshri AT yahoo.co.in>, Rahul Bhalerao <rahul_pb_india AT
yahoo.com> and Sandeep Shedmake <surgs2k47 AT yahoo.co.in>
Devanagari (U+0900-U+097F)
Gujarati (U+0A80-U+0AFF)
Oriya (U+0B00-U+0B7F)
Malayalam (U+0D00-U+0D7F)
Tamil (U+0B80-U+0BFF)
In December 2005 the team at www.gnowledge.org released a set of two
Unicode pan-Indic fonts: "Samyak" and "Samyak Sans". "Samyak" font
belongs to serif style and is an original work of the team; "Samyak
Sans" font belongs to sans serif style and is actually a compilation
of already released Indic fonts (Gargi, Padma, Mukti, Utkal, Akruti
and ThendralUni). Both fonts are based on Unicode standard. You can
download the font files (released under GNU/GPL License) from
http://www.gnowledge.org/Gnoware/localization/font.htm
* Kulbir Singh Thind
Gurmukhi (U+0A00-U+0A7F)
Dr. Kulbir Singh Thind designed a set of Gurmukhi Unicode fonts,
AnmolUni and AnmolUni-Bold, which are available under the terms of GNU
Generel Public Licens from the Punjabu Computing Resource Center,
http://guca.sourceforge.net/typography/fonts/anmoluni/.
* Gia Shervashidze <giasher AT telenet.ge>
Georgian (U+10A0-U+10FF)
Starting in mid-1990s, Gia Shervashidze designed many
Unicode-compliant Georgian fonts: Times New Roman Georgian, Arial
Georgian, Courier New Georgian. His work on Georgian localization can
be reached at http://www.gia.ge/.
* Primož Peterlin <primoz.peterlin AT biofiz.mf.uni-lj.si>
Primož Peterlin filled in missing glyphs here and there (e.g. Latin
Extended-B and IPA Extensions ranges in the FreeMono familiy), and
created the following UCS blocks:
Latin Extended-B (U+0180-U+024F)
IPA Extensions (U+0250-U+02AF)
Arrows (U+2190-U+21FF)
Box Drawing (U+2500-U+257F)
Block Elements (U+2580-U+259F)
Geometrical Shapes (U+25A0-U+25FF)
* Mark Williamson
Made the MPH 2 Damase font, from which
Hanunóo (U+1720-U+173F)
Buginese (U+1A00-U+1A1F)
Tai Le (U+1950-U+197F)
Ugaritic (U+10380-U+1039F)
Old Persian (U+103A0-U+103DF)
* Jacob Poon
Submitted a very thorough survey of glyph problems and other suggestions.
* Alexey Kryukov
Made the TemporaLCGUni fonts, based on the URW++ fonts, from which at one
point FreeSerif Cyrillic, and some of the Greek, was drawn. He also provided
valuable direction about Cyrillic and Greek typesetting.
* George Douros
The creator of several fonts focusing on ancient scripts and symbols.
Many of the glyphs are created by making outlines from scanned images
of ancient sources.
Aegean: Phoenecian
Analecta: Gothic (U+10330-U+1034F)
Musical: Byzantine & Western
Unicode: many Miscellaneous Symbols, Miscellaneous Technical,
supplemental Symbols, and Mathematical Alphanumeric symbols,
Mah Jong, and the outline of the Domino.
* Daniel Johnson
Created by hand a Cherokee range specially for FreeFont to be "in line with
the classic Cherokee typefaces used in 19th century printing", but also to
fit well with ranges previously in FreeFont. Then he made Unified Canadian
Syllabics in Sans, and a Cherokee and Kayah Li in Mono! And never to be
outdone by himself, then did UCAS Extended and Osmanya.... What next?
Armenian (serif) (U+0530-U+058F)
Cherokee (U+13A0-U+13FF)
Unified Canadian Aboriginal Syllabics (U+1400-U+167F)
UCAS Extended (U+18B0-U+18F5)
Kayah Li (U+A900-U+A92F)
Tifinagh (U+2D30-U+2D7F)
Vai (U+A500-U+A62B)
Latin Extended-D (Mayanist letters) (U+A720-U+A7FF)
Osmanya (U+10480-U+104a7)
* Yannis Haralambous and Wellcome Institute
In 1994, The Wellcome Library
The Wellcome Institute for the History of Medicine
183 Euston Road, London NW1 2BE, England.
commissioned Mr. Haralambous to produce a Sinhalese font for them.
We have received 03/09 official notice from Robert Kiley, Head of e-Strategy
for the Wellcome Library, that Yannis' font could be included in GNU
FreeFont under its GNU license.
Thanks to Dominik Wujastyk, for providing us with feedback and contacts
to repsonsible people at the Trust.
Sinhala (U+0D80-U+0DFF)
* The Sinhala font project http://sinhala.sourceforge.net/
The Sinhala font project has taken the glyphs from Yannis Haralambous'
Sinhala font, to produce a Unicode TrueType font, LKLUG. These glyphs
were for a while included in FreeFont.
Sinhala (U+0D80-U+0DFF)
* Steve White <stevan_white AT googlemail.com>
Filled in a lot of missing characters, got some font features working,
left fingerprints almost everywhere, and is responsible for these blocks:
Glagolitic (U+2C00-U+2C5F)
Coptic (U+2C80-U+2CFF)
* Pavel Skrylev is responsible for
Cyrillic Extended-A (U+2DEO-U+2DFF)
as well as many of the additions to
Cyrillic Extended-B (U+A640-U+A65F)
Notes:
*: The glyph collection looks license-compatible, but its author has
not yet replied and agreed on their work being used in part of
this glyph collection.
--------------------------------------------------------------------------
$Id: CREDITS,v 1.28 2010/09/11 13:24:11 Stevan_White Exp $

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,86 +0,0 @@
Installing GNU FreeFont
=======================
GNU FreeFont can be used in any modern operating system.
This document explains how to install FreeFont on some common systems.
UNIX/GNU/Linux/BSD Systems
--------------------------
FreeFont works with any system using the free font rasterizer FreeType
<http://www.freetype.org/>.
* Debian GNU/Linux
Users of Debian GNU/Linux system will probably want to use the Debian package,
available from the Debian site,
<http://packages.debian.org/unstable/x11/ttf-freefont.html>,
or any of its mirrors.
Install them by issuing the command
apt-get install ttf-freefont
* KDE local installation
Users of KDE can install .ttf files on a per-user basis using the KDE
Control Center module "kcmfontinst", which may appear in the menu as
Settings -> System Administration -> Font Installer
This is especially helpful for developers and testers.
* Generic X-windows
1) Fetch the freefont-ttf.tar.gz package with Free UCS outline fonts
in the TrueType format.
2) Unpack TrueType fonts into a suitable directory,
e.g. /usr/local/share/fonts/default/TrueType/
3) If you have chosen any other directory, make sure the directory you
used to install the fonts is listed in the path searched by the X
Font Server by editing the config file in /etc/X11/.
In some systems, you list the directory in the item "catalogue="
in the file /etc/X11/fs/config.
4) Run ttmkfdir in the directory where you unpacked the fonts.
Windows 95/98/NT/2000/XP; Vista
-------------------------------
Note that in at least Vista, XP and 2000, the OpenType versions perform much
better than, and are recommended over, the TrueType ones.
* Vista:
1) From the Start menu, open Control Panels
2) Drag-n-drop font files onto Fonts control panel
You may get a dialog saying
"Windows needs your permission to continue"
a) Click Continue
* 95/98/NT:
The font installation is similar to Vista.
In order to use OpenType, users of Windows 95, 98 and NT 4.0 can
install Adobe's 'Type Manager Light'. It is available for download
without cost from Adobe's web site.
Otherwise, use the TrueType versions.
Mac OS X
--------
Installing on Mac OS X consists of moving the .ttf files to either
/Library/Fonts/ or ~/Library/Fonts/
depending on whether they should be available to all users on your system
or just to yourself.
--------------------------------------------------------------------------
$Id: INSTALL,v 1.7 2008/12/26 12:33:31 Stevan_White Exp $

View File

@ -1,108 +0,0 @@
-*-text-*-
GNU FreeFont
The GNU FreeFont project aims to provide a useful set of free scalable
(i.e., OpenType) fonts covering as much as possible of the ISO 10646/Unicode
UCS (Universal Character Set).
Statement of Purpose
--------------------
The practical reason for putting glyphs together in a single font face is
to conveniently mix symbols and characters from different writing systems,
without having to switch fonts.
Coverage
--------
FreeFont covers the following character sets
* ISO 8859 parts 1-15
* CEN MES-3 European Unicode Subset
http://www.evertype.com/standards/iso10646/pdf/cwa13873.pdf
* IBM/Microsoft code pages 437, 850, 852, 1250, 1252 and more
* Microsoft/Adobe Windows Glyph List 4 (WGL4)
http://www.microsoft.com/typography/otspec/WGL4.htm
* KOI8-R and KOI8-RU
* DEC VT100 graphics symbols
* International Phonetic Alphabet
* Arabic, Hebrew, Armenian, Georgian, Ethiopian and Thai alphabets,
including Arabic presentation forms A/B
* mathematical symbols, including the whole TeX repertoire of symbols
* APL symbols
etc.
Editing
-------
The free outline font editor, George Williams's FontForge
<http://fontforge.sourceforge.net/> is used for editing the fonts.
Design Issues
-------------
Which font shapes should be made? Historical style terms like Renaissance
or Baroque letterforms cannot be applied beyond Latin/Cyrillic/Greek
scripts to any greater extent than Kufi or Nashki can be applied beyond
Arabic script; "italic" is really only meaningful for Latin letters.
However, most modern writing systems have typographic formulations for
contrasting uniform and modulated character stroke widths, and have some
history with "oblique", faces. Since the advent of the typewriter, most
have developed a typographic style with uniform-width characters.
Accordingly, the FreeFont family has one monospaced - FreeMono - and two
proportional faces (one with uniform stroke - FreeSans - and one with
modulated stroke - FreeSerif).
To make text from different writing systems look good side-by-side, each
FreeFont face is meant to contain characters of similar style and weight.
Licensing
---------
Free UCS scalable fonts is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
The fonts are distributed in the hope that they will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, if you create a document which uses this font, and
embed this font or unaltered portions of this font into the document, this
font does not by itself cause the resulting document to be covered by the
GNU General Public License. This exception does not however invalidate any
other reasons why the document might be covered by the GNU General Public
License. If you modify this font, you may extend this exception to your
version of the font, but you are not obligated to do so. If you do not
wish to do so, delete this exception statement from your version.
Files and their suffixes
------------------------
The files with .sfd (Spline Font Database) are in FontForge's native format.
Please use these if you plan to modify the font files.
TrueType fonts for immediate consumption are the files with the .ttf
(TrueType Font) suffix. These are ready to use in Xwindows based
systems using FreeType, on Mac OS, and on older Windows systems.
OpenType fonts (with suffix .otf) are for use in Windows Vista.
Note that although they can be installed on Linux, but many applications
in Linux still don't support them.
--------------------------------------------------------------------------
Primoz Peterlin, <primoz.peterlin@biofiz.mf.uni-lj.si>
Steve White <stevan.white@googlemail.com>
Free UCS scalable fonts: http://savannah.gnu.org/projects/freefont/
$Id: README,v 1.7 2009/01/13 08:43:23 Stevan_White Exp $

View File

@ -1 +0,0 @@
http://ftp.gnu.org/gnu/freefont/

373
LICENSE Normal file
View 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.

328
Makefile
View File

@ -1,328 +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=
export F_INVERSER=
export F_SOUSLIGNER=
export F_NORMALE=
export F_NOIR=
export F_ROUGE=
export F_VERT=
export F_MARRON=
export F_BLUE=
export F_VIOLET=
export F_CYAN=
export F_GRIS=
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
# some X11 mode availlable :
X11FLAGS+= -DEWOL_X11_MODE__XF86V -lXxf86vm
#X11FLAGS+= -DEWOL_X11_MODE__XRENDER -lXrandr
ifeq ($(shell if `pkg-config --exists freetype2` ; then echo "yes"; else echo "no"; fi), yes)
FREETYPE_CFLAGS= `pkg-config --cflags freetype2` -DEWOL_USE_FREE_TYPE
FREETYPE_LDFLAGS= `pkg-config --libs freetype2` -DEWOL_USE_FREE_TYPE
else
FREETYPE_CFLAGS=
FREETYPE_LDFLAGS=
$(Info libFreeType-dev is not installed)
endif
###############################################################################
### Basic C flags ###
###############################################################################
# basic X11 librairy ==> show if we can une under lib ...
CXXFLAGS= $(X11FLAGS) $(FREETYPE_CFLAGS) -D__PLATFORM__=$(PLATFORM)
ifeq ("$(DEBUG)", "0")
CXXFLAGS+= -O2
else
# Enable debug (cgdb ***)
CXXFLAGS+= -g -O0
endif
# display all flags
CXXFLAGS+= -Wall
# ...
CXXFLAGS+= -D_REENTRANT
# internal defines
CXXFLAGS+= $(DEFINE)
CFLAGS= $(CXXFLAGS) -std=c99
# basic extern librairy
LDFLAGS= $(X11FLAGS) $(FREETYPE_LDFLAGS)
# 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 \
ewolTexture.cpp
ifeq ("$(FREETYPE_CFLAGS)", "")
CXXFILES += ewolFontBitmap.cpp
else
CXXFILES += ewolFontFreeType.cpp
endif
CXXFILES += ewolWidget.cpp \
ewolWindows.cpp
# list of widgets :
CXXFILES += widget/ewolButton.cpp \
widget/ewolCheckBox.cpp \
widget/ewolEntry.cpp \
widget/ewolList.cpp \
widget/ewolSizerHori.cpp \
widget/ewolSizerVert.cpp
# Ewol Test Software :
CXXFILES += Main.cpp
###############################################################################
### Liste of folder where .h can be ###
###############################################################################
LISTE_MODULES = $(sort $(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))
.versionFile:
@rm -f $(OBJECT_DIRECTORY)/ewol.o
# 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
View File

@ -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)
----------------
[![Build Status](https://travis-ci.org/atria-soft/ewol.svg?branch=master)](https://travis-ci.org/atria-soft/ewol)
[![Coverage Status](http://atria-soft.com/ci/coverage/atria-soft/ewol.svg?branch=master)](http://atria-soft.com/ci/atria-soft/ewol)
[![Test Status](http://atria-soft.com/ci/test/atria-soft/ewol.svg?branch=master)](http://atria-soft.com/ci/atria-soft/ewol)
[![Warning Status](http://atria-soft.com/ci/warning/atria-soft/ewol.svg?branch=master)](http://atria-soft.com/ci/atria-soft/ewol)
[![Build Status](http://atria-soft.com/ci/build/atria-soft/ewol.svg?branch=master&tag=Linux)](http://atria-soft.com/ci/atria-soft/ewol)
[![Build Status](http://atria-soft.com/ci/build/atria-soft/ewol.svg?branch=master&tag=MacOs)](http://atria-soft.com/ci/atria-soft/ewol)
[![Build Status](http://atria-soft.com/ci/build/atria-soft/ewol.svg?branch=master&tag=Mingw)](http://atria-soft.com/ci/atria-soft/ewol)
[![Build Status](http://atria-soft.com/ci/build/atria-soft/ewol.svg?branch=master&tag=Android)](http://atria-soft.com/ci/atria-soft/ewol)
[![Build Status](http://atria-soft.com/ci/build/atria-soft/ewol.svg?branch=master&tag=IOs)](http://atria-soft.com/ci/atria-soft/ewol)
Developement (dev)
------------------
[![Build Status](https://travis-ci.org/atria-soft/ewol.svg?branch=dev)](https://travis-ci.org/atria-soft/ewol)
[![Coverage Status](http://atria-soft.com/ci/coverage/atria-soft/ewol.svg?branch=dev)](http://atria-soft.com/ci/atria-soft/ewol)
[![Test Status](http://atria-soft.com/ci/test/atria-soft/ewol.svg?branch=dev)](http://atria-soft.com/ci/atria-soft/ewol)
[![Warning Status](http://atria-soft.com/ci/warning/atria-soft/ewol.svg?branch=dev)](http://atria-soft.com/ci/atria-soft/ewol)
[![Build Status](http://atria-soft.com/ci/build/atria-soft/ewol.svg?branch=dev&tag=Linux)](http://atria-soft.com/ci/atria-soft/ewol)
[![Build Status](http://atria-soft.com/ci/build/atria-soft/ewol.svg?branch=dev&tag=MacOs)](http://atria-soft.com/ci/atria-soft/ewol)
[![Build Status](http://atria-soft.com/ci/build/atria-soft/ewol.svg?branch=dev&tag=Mingw)](http://atria-soft.com/ci/atria-soft/ewol)
[![Build Status](http://atria-soft.com/ci/build/atria-soft/ewol.svg?branch=dev&tag=Android)](http://atria-soft.com/ci/atria-soft/ewol)
[![Build Status](http://atria-soft.com/ci/build/atria-soft/ewol.svg?branch=dev&tag=IOs)](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
=========================
![overview](overview.svg)
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.

View File

@ -1,105 +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 <ewolFont.h>
#include <widget/ewolButton.h>
#include <widget/ewolSizerHori.h>
#include <widget/ewolSizerVert.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)
{
// generate the display :
ewol::SizerHori * mySizer = new ewol::SizerHori();
SetSubWidget(mySizer);
ewol::Button * myButton = new ewol::Button("Mon Labell 1");
mySizer->SubWidgetAdd(myButton);
ewol::SizerVert * mySizerVert = new ewol::SizerVert();
mySizer->SubWidgetAdd(mySizerVert);
myButton = new ewol::Button("BT 3");
myButton->SetExpendX(true);
//myButton->SetExpendY(true);
mySizerVert->SubWidgetAdd(myButton);
myButton = new ewol::Button(" 4 4 BT");
//myButton->SetExpendY(true);
mySizerVert->SubWidgetAdd(myButton);
myButton = new ewol::Button("Exemple 2");
myButton->SetExpendX(true);
mySizer->SubWidgetAdd(myButton);
};
~Plop(void)
{
};
};
/**
* @brief main input fonction
*/
int main(int argc, char *argv[])
{
ewol::Init(argc, argv);
/*
if (true == ewol::AddFont("dataTest/TextMonospace.ebt", true, true, true) ) {
//fontID = GetFontIdWithFileName("dataTest/TextMonospace.ebt");
}
*/
ewol::SetFontFolder("Font");
ewol::SetDefaultFont("freefont/FreeMono", 14);
Plop * myWindowsExample = new Plop();
// create the specific windows
ewol::DisplayWindows(myWindowsExample);
ewol::Run();
ewol::DisplayWindows(NULL);
delete(myWindowsExample);
ewol::UnInit();
return 0;
}

View File

@ -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");
}

View File

@ -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

View File

@ -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");
}

View File

@ -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

View File

@ -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");
}

View File

@ -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

View File

@ -1,866 +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>
#if defined(EWOL_X11_MODE__XF86V)
# include <X11/extensions/xf86vmode.h>
#elif defined(EWOL_X11_MODE__XRENDER)
# include <X11/extensions/Xrender.h>
#else
# error you might define an EWOL_X11_MODE in EWOL_X11_XF86V / EWOL_X11_XRENDER
#endif
#include <sys/times.h>
#undef __class__
#define __class__ "guiAbstraction"
#if defined(EWOL_X11_MODE__XF86V)
// attributes for a single buffered visual in RGBA format with at least 4 bits per color and a 16 bit depth buffer
static int attrListSgl[] = {
GLX_RGBA,
GLX_RED_SIZE, 4,
GLX_GREEN_SIZE, 4,
GLX_BLUE_SIZE, 4,
GLX_DEPTH_SIZE, 16,
None
};
// attributes for a double buffered visual in RGBA format with at least 4 bits per color and a 16 bit depth buffer
static int attrListDbl[] = {
GLX_RGBA,
GLX_DOUBLEBUFFER,
GLX_RED_SIZE, 4,
GLX_GREEN_SIZE, 4,
GLX_BLUE_SIZE, 4,
GLX_DEPTH_SIZE, 16,
None
};
#elif defined(EWOL_X11_MODE__XRENDER)
static 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
};
#endif
#define NB_MAX_INPUT (20)
#define SEPARATED_CLICK_TIME (30)
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:
// for double and triple click selection, we need to save the previous click up and down position , and the previous time ...
int32_t m_previousBouttonId;
int32_t m_previousDown_x;
int32_t m_previousDown_y;
int32_t m_previous_x;
int32_t m_previous_y;
int64_t m_previousTime;
bool m_previousDouble;
private:
Atom m_delAtom;
Display * m_display;
Window WindowHandle;
#if defined(EWOL_X11_MODE__XRENDER)
GLXFBConfig m_fbConfig;
Window m_GLXWindowHandle;
#endif
int32_t m_width;
int32_t m_height;
int32_t m_originX;
int32_t m_originY;
int32_t m_cursorEventX;
int32_t m_cursorEventY;
XVisualInfo * m_visual;
bool m_doubleBuffered;
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)";
#if defined(EWOL_X11_MODE__XF86V)
EWOL_INFO("X11 Mode XF86 Video");
#elif defined(EWOL_X11_MODE__XRENDER)
EWOL_INFO("X11 Mode XRendrer Video");
#endif
// 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);
#if defined(EWOL_X11_MODE__XF86V)
{
int32_t vmMajor, vmMinor;
XF86VidModeQueryVersion(m_display, &vmMajor, &vmMinor);
EWOL_INFO("XF86 VideoMode extension version " << vmMajor << "." << vmMinor);
}
// get an appropriate visual
m_visual = glXChooseVisual(m_display, Xscreen, attrListDbl);
if (NULL == m_visual) {
m_visual = glXChooseVisual(m_display, Xscreen, attrListSgl);
m_doubleBuffered = false;
EWOL_INFO("XF86 singlebuffered rendering will be used, no doublebuffering available");
} else {
m_doubleBuffered = true;
EWOL_INFO("XF86 doublebuffered rendering available");
}
#elif defined(EWOL_X11_MODE__XRENDER)
int numfbconfigs;
m_doubleBuffered = true;
GLXFBConfig *fbconfigs = glXChooseFBConfig(m_display, Xscreen, VisualData, &numfbconfigs);
EWOL_DEBUG("get glx format config =" << numfbconfigs);
for(int i = 0; i<numfbconfigs; i++) {
m_visual = glXGetVisualFromFBConfig(m_display, fbconfigs[i]);
if(!m_visual) {
continue;
}
XRenderPictFormat * pictFormat = XRenderFindVisualFormat(m_display, m_visual->visual);
if(!pictFormat) {
continue;
}
if(pictFormat->direct.alphaMask > 0) {
m_fbConfig = fbconfigs[i];
EWOL_DEBUG("SELECT fbconfig id=" << i);
break;
}
}
#endif
{
int32_t glxMajor, glxMinor;
glXQueryVersion(m_display, &glxMajor, &glxMinor);
EWOL_INFO("GLX-Version " << glxMajor << "." << glxMinor);
}
// Create a colormap - only needed on some X clients, eg. IRIX
Window Xroot = RootWindow(m_display, Xscreen);
attr.colormap = XCreateColormap(m_display, Xroot, m_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
m_width = DisplayWidth(m_display, DefaultScreen(m_display))/2;
m_height = DisplayHeight(m_display, DefaultScreen(m_display))/2;
x=m_width/2;
y=m_height/4;
// Real create of the window
WindowHandle = XCreateWindow(m_display,
Xroot,
x, y, m_width, m_height,
1,
m_visual->depth,
InputOutput,
m_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 = m_width;
hints.height = m_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 ((m_delAtom = XInternAtom(m_display, "WM_DELETE_WINDOW", 0)) != None) {
XSetWMProtocols(m_display, WindowHandle, &m_delAtom, 1);
}
return true;
}
void RemoveDecoration(void)
{
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 ....");
}
}
void AddDecoration(void)
{
Hints hints;
Atom property;
hints.flags = 2;// Specify that we're changing the window decorations.
hints.decorations = 1;// 1 (true) means that window decorations should enable
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 ....");
}
}
bool CreateOGlContext(void)
{
#if defined(EWOL_X11_MODE__XRENDER)
/* 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, m_fbConfig, GLX_RGBA_TYPE, 0, GL_TRUE);
if (!RenderContext) {
EWOL_CRITICAL("Failed to create a GL context");
exit(-1);
}
m_GLXWindowHandle = glXCreateWindow(m_display, m_fbConfig, WindowHandle, NULL);
/* Make it current */
if (!glXMakeContextCurrent(m_display, m_GLXWindowHandle, m_GLXWindowHandle, RenderContext)) {
EWOL_CRITICAL("glXMakeCurrent failed for window");
exit(-1);
}
#elif defined(EWOL_X11_MODE__XF86V)
/* create a GLX context */
GLXContext RenderContext = glXCreateContext(m_display, m_visual, 0, GL_TRUE);
/* connect the glx-context to the window */
glXMakeCurrent(m_display, WindowHandle, RenderContext);
if (glXIsDirect(m_display, RenderContext)) {
EWOL_INFO("XF86 DRI enabled\n");
} else {
EWOL_INFO("XF86 DRI NOT available\n");
}
#endif
return true;
}
void Draw(void)
{
//EWOL_DEBUG("redraw (" << m_width << "," << m_height << ")");
if(NULL == m_uniqueWindows) {
//EWOL_DEBUG("Has No Windows set...");
// set the size of the open GL system
glViewport(0,0,m_width,m_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)m_width, 0., (float)m_height, 1., 20.);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0, 0, -5);
glBegin(GL_QUADS);
glColor3f(1., 0., 0.); glVertex3f( .25*(float)m_width, .25*(float)m_height, 0.);
glColor3f(0., 1., 0.); glVertex3f( .75*(float)m_width, .25*(float)m_height, 0.);
glColor3f(0., 0., 1.); glVertex3f( .75*(float)m_width, .75*(float)m_height, 0.);
glColor3f(1., 1., 0.); glVertex3f( .25*(float)m_width, .75*(float)m_height, 0.);
glEnd();
} else {
m_uniqueWindows->SysDraw();
}
// swap the buffers if we have doublebuffered
#if defined(EWOL_X11_MODE__XRENDER)
glXSwapBuffers(m_display, m_GLXWindowHandle);
#elif defined(EWOL_X11_MODE__XF86V)
glFlush();
if (m_doubleBuffered) {
glXSwapBuffers(m_display, WindowHandle);
}
#endif
}
public:
X11systemInterface(void)
{
m_visual = NULL;
m_previousBouttonId = 0;
m_previousDown_x = -1;
m_previousDown_y = -1;
m_previous_x = -1;
m_previous_y = -1;
m_previousTime = 0;
m_previousDouble = false;
m_resizeMode=false;
m_moveMode=false;
m_originX = 0;
m_originY = 0;
m_cursorEventX = 0;
m_cursorEventY = 0;
for (int32_t iii=0; iii<NB_MAX_INPUT; iii++) {
inputIsPressed[iii] = false;
}
CreateX11Context();
CreateOGlContext();
m_run = true;
}
~X11systemInterface(void)
{
Stop();
}
void Setwindow(ewol::Windows* newWindows)
{
m_uniqueWindows = newWindows;
if (NULL != m_uniqueWindows) {
m_uniqueWindows->CalculateSize((double)m_width, (double)m_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:
m_width = event.xconfigure.width;
m_height = event.xconfigure.height;
m_originX = event.xconfigure.x;
m_originY = event.xconfigure.y;
break;
case ButtonPress:
m_cursorEventX = event.xbutton.x;
m_cursorEventY = event.xbutton.y;
if (event.xbutton.button < NB_MAX_INPUT) {
inputIsPressed[event.xbutton.button] = true;
}
break;
case ButtonRelease:
m_cursorEventX = event.xbutton.x;
m_cursorEventY = event.xbutton.y;
if (event.xbutton.button < NB_MAX_INPUT) {
inputIsPressed[event.xbutton.button] = false;
}
break;
case EnterNotify:
case LeaveNotify:
m_cursorEventX = event.xcrossing.x;
m_cursorEventY = event.xcrossing.y;
break;
case MotionNotify:
m_cursorEventX = event.xmotion.x;
m_cursorEventY = event.xmotion.y;
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);
m_uniqueWindows->SetOrigin(event.xconfigure.x, event.xconfigure.y);
break;
case Expose:
EWOL_DEBUG("X11 event : " << event.type << " = \"Expose\"");
m_uniqueWindows->SysOnExpose();
break;
case ButtonPress:
{
m_moveMode = false;
m_resizeMode = false;
int32_t btId = event.xbutton.button;
//EWOL_DEBUG("X11 bt=" << btId << " event : " << event.type << "=\"ButtonPress\" (" << (double)event.xbutton.x << "," << (double)event.xbutton.y << ")");
// Send Down message
m_uniqueWindows->GenEventInput(btId, ewol::EVENT_INPUT_TYPE_DOWN, (double)event.xbutton.x, (double)event.xbutton.y);
// Check double or triple click event ...
m_previousDown_x = event.xbutton.x;
m_previousDown_y = event.xbutton.y;
if (m_previousBouttonId != btId) {
m_previousBouttonId = btId;
m_previous_x = -1;
m_previous_y = -1;
m_previousTime = 0;
m_previousDouble = false;
} else {
if( abs(m_previous_x - event.xbutton.x) < 5
&& abs(m_previous_y - event.xbutton.y) < 5 )
{
// nothink to do ... wait up ...
} else {
m_previous_x = -1;
m_previous_y = -1;
m_previousTime = 0;
m_previousDouble = false;
}
}
}
break;
case ButtonRelease:
{
m_moveMode = false;
m_resizeMode = false;
int32_t btId = event.xbutton.button;
//EWOL_DEBUG("X11 bt=" << btId << " event : " << event.type << "=\"ButtonRelease\" (" << (double)event.xbutton.x << "," << (double)event.xbutton.y << ")");
// send Up event ...
m_uniqueWindows->GenEventInput(btId, ewol::EVENT_INPUT_TYPE_UP, (double)event.xbutton.x, (double)event.xbutton.y);
if (m_previousBouttonId != btId) {
m_previousDown_x = -1;
m_previousDown_y = -1;
m_previousBouttonId = 0;
m_previous_x = -1;
m_previous_y = -1;
m_previousTime = 0;
m_previousDouble = false;
} else {
int64_t currentTime = times(NULL); // return the tic in 10ms
//EWOL_DEBUG("time is : " << currentTime << " "<< currentTime/100 <<"s " << (currentTime%100)*10 << "ms");
if (currentTime - m_previousTime >= SEPARATED_CLICK_TIME) {
//check if the same area click :
if( abs(m_previousDown_x - event.xbutton.x) < 5
&& abs(m_previousDown_y - event.xbutton.y) < 5 )
{
// might generate an sigle event :
//EWOL_DEBUG("X11 event : " << event.type << " = \"ButtonClockedSingle\" (" << (double)event.xbutton.x << "," << (double)event.xbutton.y << ")");
m_uniqueWindows->GenEventInput(btId, ewol::EVENT_INPUT_TYPE_SINGLE, (double)event.xbutton.x, (double)event.xbutton.y);
m_previous_x = m_previousDown_x;
m_previous_y = m_previousDown_y;
m_previousTime = currentTime;
} else {
// reset values ...
m_previousDown_x = -1;
m_previousDown_y = -1;
m_previousBouttonId = 0;
m_previous_x = -1;
m_previous_y = -1;
m_previousTime = 0;
}
m_previousDouble = false;
} else {
//check if the same area click :
if( abs(m_previous_x - event.xbutton.x) < 5
&& abs(m_previous_y - event.xbutton.y) < 5 )
{
// might generate an sigle event :
if (false == m_previousDouble) {
//EWOL_DEBUG("X11 event : " << event.type << " = \"ButtonClockedDouble\" (" << (double)event.xbutton.x << "," << (double)event.xbutton.y << ")");
m_uniqueWindows->GenEventInput(btId, ewol::EVENT_INPUT_TYPE_DOUBLE, (double)event.xbutton.x, (double)event.xbutton.y);
m_previousTime = currentTime;
m_previousDouble = true;
} else {
//EWOL_DEBUG("X11 event : " << event.type << " = \"ButtonClockedTriple\" (" << (double)event.xbutton.x << "," << (double)event.xbutton.y << ")");
m_uniqueWindows->GenEventInput(btId, ewol::EVENT_INPUT_TYPE_TRIPLE, (double)event.xbutton.x, (double)event.xbutton.y);
// reset values ...
m_previousDown_x = -1;
m_previousDown_y = -1;
m_previousBouttonId = 0;
m_previous_x = -1;
m_previous_y = -1;
m_previousTime = 0;
m_previousDouble = false;
}
} else {
// reset values ...
m_previousDown_x = -1;
m_previousDown_y = -1;
m_previousBouttonId = 0;
m_previous_x = -1;
m_previous_y = -1;
m_previousTime = 0;
m_previousDouble = false;
}
}
//int64_t currentTime =
}
}
break;
case EnterNotify:
m_resizeMode = false;
m_moveMode = false;
//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:
if (true == m_resizeMode) {
if (m_cursorEventX >=50 && m_cursorEventY >=50) {
ChangeSize(m_cursorEventX, m_cursorEventY);
}
} else if (true == m_moveMode) {
int32_t tmpX, tmpY;
this->GetAbsPos(tmpX, tmpY);
//EWOL_DEBUG("Current absolute position : " << tmpX << "x" << tmpY);
int32_t newPosX = (m_startX - m_screenOffsetX) - (m_startX - tmpX);
int32_t newPosY = (m_startY - m_screenOffsetY) - (m_startY - tmpY);
//EWOL_DEBUG("Change POS : (" << (m_startY - m_screenOffsetX) << "," << (m_startY - m_screenOffsetY) << ") ==> (" << newPosX << "," << newPosY << ")");
this->ChangePos(newPosX, newPosY);
} else {
//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:
m_resizeMode = false;
m_moveMode = false;
//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:
m_resizeMode = false;
m_moveMode = false;
EWOL_DEBUG("X11 event : " << event.type << " = \"FocusIn\"");
m_uniqueWindows->SetFocus();
break;
case FocusOut:
m_resizeMode = false;
m_moveMode = false;
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;
};
void ChangeSize(int32_t w, int32_t h)
{
XResizeWindow(m_display, WindowHandle, w, h);
};
void ChangePos(int32_t x, int32_t y)
{
XMoveWindow(m_display, WindowHandle, x, y);
};
void GetAbsPos(int32_t & x, int32_t & y)
{
int tmp;
unsigned int tmp2;
Window fromroot, tmpwin;
XQueryPointer(m_display, WindowHandle, &fromroot, &tmpwin, &x, &y, &tmp, &tmp, &tmp2);
};
private:
bool m_resizeMode;
bool m_moveMode;
int32_t m_startX;
int32_t m_startY;
int32_t m_screenOffsetX;
int32_t m_screenOffsetY;
public:
void StartResizeSystem(void)
{
EWOL_INFO("Start Resizing the windows");
m_resizeMode = true;
this->GetAbsPos(m_startX, m_startY);
m_screenOffsetX = m_cursorEventX;
m_screenOffsetY = m_cursorEventY;
};
public:
// TODO : need to Check all of this... to write a better code... if needed...
void StartMoveSystem(void)
{
EWOL_INFO("Start Moving the windows");
m_moveMode=true;
this->GetAbsPos(m_startX, m_startY);
EWOL_DEBUG("ref pos : (" << m_startX << "," << m_startY << ") (" << m_cursorEventX << "," << m_cursorEventY << ")");
m_screenOffsetX = m_cursorEventX;
m_screenOffsetY = m_cursorEventY;
};
private:
bool inputIsPressed[20];
public:
bool IsPressedInput(int32_t inputID)
{
if( NB_MAX_INPUT > inputID
&& 0 <= inputID)
{
return inputIsPressed[inputID];
} else {
EWOL_WARNING("Wrong input ID : " << inputID);
return false;
}
}
};
};
#undef __class__
#define __class__ "guiAbstraction"
static bool guiAbstractionIsInit = false;
static guiAbstraction::X11systemInterface * myX11Access = NULL;
void guiAbstraction::Init(int32_t argc, char *argv[])
{
if (false == guiAbstractionIsInit) {
// set the gui is init :
guiAbstractionIsInit = true;
EWOL_INFO("INIT for X11 environement");
myX11Access = new guiAbstraction::X11systemInterface();
} else {
EWOL_CRITICAL("Can not INIT X11 ==> already init before");
}
}
void guiAbstraction::Run(void)
{
if (true == guiAbstractionIsInit) {
EWOL_INFO("Start Running");
myX11Access->Run();
EWOL_INFO("Stop Running");
} else {
EWOL_CRITICAL("Can not Run X11 ==> not init ... ");
}
}
void guiAbstraction::Stop(void)
{
if (true == guiAbstractionIsInit) {
myX11Access->Stop();
} else {
EWOL_CRITICAL("Can not Stop X11 ==> not init ... ");
}
}
void guiAbstraction::SetDisplayOnWindows(ewol::Windows * newOne)
{
if (true == guiAbstractionIsInit) {
myX11Access->Setwindow(newOne);
} else {
EWOL_CRITICAL("Can not set Windows X11 ==> not init ... ");
}
}
void guiAbstraction::UnInit(void)
{
if (true == guiAbstractionIsInit) {
EWOL_INFO("UN-INIT for X11 environement");
if (NULL != myX11Access) {
delete(myX11Access);
}
guiAbstractionIsInit = false;
} else {
EWOL_CRITICAL("Can not Un-Init X11 ==> not init ... ");
}
}
void guiAbstraction::ChangeSize(int32_t w, int32_t h)
{
if (true == guiAbstractionIsInit) {
myX11Access->ChangeSize(w, h);
} else {
EWOL_CRITICAL("X11 ==> not init ... ");
}
}
void guiAbstraction::ChangePos(int32_t x, int32_t y)
{
if (true == guiAbstractionIsInit) {
myX11Access->ChangePos(x, y);
} else {
EWOL_CRITICAL("X11 ==> not init ... ");
}
}
void guiAbstraction::GetAbsPos(int32_t & x, int32_t & y)
{
if (true == guiAbstractionIsInit) {
myX11Access->GetAbsPos(x, y);
} else {
EWOL_CRITICAL("X11 ==> not init ... ");
}
}
void guiAbstraction::StartResizeSystem(void)
{
if (true == guiAbstractionIsInit) {
myX11Access->StartResizeSystem();
} else {
EWOL_CRITICAL("X11 ==> not init ... ");
}
}
void guiAbstraction::StartMoveSystem(void)
{
if (true == guiAbstractionIsInit) {
myX11Access->StartMoveSystem();
} else {
EWOL_CRITICAL("X11 ==> not init ... ");
}
}
bool guiAbstraction::IsPressedInput(int32_t inputID)
{
if (true == guiAbstractionIsInit) {
return myX11Access->IsPressedInput(inputID);
} else {
EWOL_CRITICAL("X11 ==> not init ... ");
return false;
}
}

View File

@ -1,49 +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);
void ChangeSize(int32_t w, int32_t h);
void ChangePos(int32_t x, int32_t y);
void GetAbsPos(int32_t & x, int32_t & y);
void StartResizeSystem(void);
void StartMoveSystem(void);
bool IsPressedInput(int32_t inputID);
};
#endif

View File

@ -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 (70)
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 ;
}

View File

@ -1,97 +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, 'C', data)
#define ETK_WARNING(libName, data) ETK_DBG_COMMON(libName, ETK_BASH_COLOR_MAGENTA, 'W', data)
#define ETK_ERROR(libName, data) ETK_DBG_COMMON(libName, ETK_BASH_COLOR_BOLD_RED, 'E', data)
#define ETK_INFO(libName, data) ETK_DBG_COMMON(libName, ETK_BASH_COLOR_CYAN, 'I', data)
#define ETK_DEBUG(libName, data) ETK_DBG_COMMON(libName, ETK_BASH_COLOR_YELLOW, 'D', data)
#define ETK_VERBOSE(libName, data) ETK_DBG_COMMON(libName, ETK_BASH_COLOR_WHITE, 'V', 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

View File

@ -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 ";

View File

@ -1,71 +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
#if ETK_DEBUG_LEVEL > 3
# define TK_VERBOSE(data) ETK_VERBOSE(etkLibName, data)
#else
# define TK_VERBOSE(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

View File

@ -1,277 +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 <etkDebugInternal.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_VERBOSE("1 :Set Name : " << newFilename );
etk::String destFilename;
if (newFilename.Size() == 0) {
destFilename = "no-name";
} else {
destFilename = newFilename;
}
TK_VERBOSE("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_VERBOSE("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_VERBOSE("try to find :\"" << destFilename << "\" / \"" << tmpFilename << "\" ");
ok = realpath(destFilename.c_str(), buf);
if (!ok) {
TK_VERBOSE("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_VERBOSE("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;
}
int32_t etk::File::Size(void)
{
FILE *myFile=NULL;
etk::String myCompleateName = GetCompleateName();
myFile=fopen(myCompleateName.c_str(),"rb");
if(NULL == myFile) {
//EWOL_ERROR("Can not find the file name=\"" << m_folder << "\" / \"" << m_shortFilename << "\"");
return -1;
}
int32_t size = 0;
fseek(myFile, 0, SEEK_END);
size = ftell(myFile);
fseek(myFile, 0, SEEK_SET);
fclose(myFile);
return size;
}
bool etk::File::Exist(void)
{
FILE *myFile=NULL;
etk::String myCompleateName = GetCompleateName();
myFile=fopen(myCompleateName.c_str(),"rb");
if(NULL == myFile) {
return false;
}
fclose(myFile);
return true;
}

View File

@ -1,69 +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 Size(void);
bool Exist(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

View File

@ -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

View File

@ -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

View File

@ -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;
}

File diff suppressed because it is too large Load Diff

View File

@ -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

View File

@ -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("*********************************************************");
}

View File

@ -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

View File

@ -1,107 +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;
# if __WORDSIZE == 64
typedef unsigned long int uint64_t;
# else
typedef unsigned long long int uint64_t;
# endif
#endif
typedef int32_t uniChar_t;
#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 etkPointAndPositionDouble{
double x;
double y;
};
struct etkPointAndPositionInt{
int32_t x;
int32_t y;
};
typedef etkPointAndPositionDouble point_ts;
typedef etkPointAndPositionDouble position_ts;
typedef etkPointAndPositionDouble size_ts;
typedef etkPointAndPositionInt intSize_ts;
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;
}
#endif

View File

@ -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

View File

@ -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

View File

@ -1,115 +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"
#include "ewolFont.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
#undef __class__
#define __class__ "ewol"
void ewol::Init(int argc, char *argv[])
{
EWOL_INFO("v" EWOL_VERSION_TAG_NAME);
EWOL_INFO("Build Date: " VERSION_BUILD_TIME);
guiAbstraction::Init(argc, argv);
ewol::InitFont();
}
void ewol::Run(void)
{
guiAbstraction::Run();
}
void ewol::UnInit(void)
{
guiAbstraction::UnInit();
ewol::UnInitFont();
}
void ewol::DisplayWindows(ewol::Windows * windows)
{
guiAbstraction::SetDisplayOnWindows(windows);
}
void ewol::Stop(void)
{
guiAbstraction::Stop();
}
void ewol::ChangeSize(int32_t w, int32_t h)
{
guiAbstraction::ChangeSize(w, h);
}
void ewol::ChangePos(int32_t x, int32_t y)
{
guiAbstraction::ChangePos(x, y);
}
void ewol::GetAbsPos(int32_t & x, int32_t & y)
{
guiAbstraction::GetAbsPos(x, y);
}
void ewol::StartResizeSystem(void)
{
#if __PLATFORM__ == X11
guiAbstraction::StartResizeSystem();
#endif
}
void ewol::StartMoveSystem(void)
{
#if __PLATFORM__ == X11
guiAbstraction::StartMoveSystem();
#endif
}
bool ewol::IsPressedInput(int32_t inputID)
{
return guiAbstraction::IsPressedInput(inputID);
}

View File

@ -1,50 +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);
void ChangeSize(int32_t w, int32_t h);
void ChangePos(int32_t x, int32_t y);
void GetAbsPos(int32_t & x, int32_t & y);
void StartResizeSystem(void);
void StartMoveSystem(void);
bool IsPressedInput(int32_t inputID);
};
#endif

View File

@ -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 ";

View File

@ -1,68 +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_TODO(data) EWOL_WARNING("TODO : " << data)
#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

View File

@ -1,83 +0,0 @@
/**
*******************************************************************************
* @file ewolFont.h
* @brief ewol Font system (header)
* @author Edouard DUPIN
* @date 29/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_FONT_H__
#define __EWOL_FONT_H__
#include <etkTypes.h>
#include <ewolDebug.h>
#include <etkFile.h>
namespace ewol
{
// deprecated...
typedef enum {
FONT_MODE_NORMAL=0,
FONT_MODE_BOLD,
FONT_MODE_ITALIC,
FONT_MODE_BOLD_ITALIC,
FONT_MODE_NUMBER,
}fontMode_te;
//typedef char* Utf8Char_t;
// set default folder name of the font :
void SetFontFolder(etk::String folderName);
void SetDefaultFont(etk::String fontName, int32_t size);
// unload all font loaded
void InitFont(void);
void UnInitFont(void);
// load the fonts...
int32_t LoadFont(etk::String fontName, int32_t size); // return ID of font
int32_t GetDefaultFontId(void);
void UnloadFont(int32_t id);
// get the size of a long string in UTF8 (note that \n and \r represent unknown char...)
int32_t GetWidth(int32_t fontID, const uniChar_t * unicodeString);
int32_t GetWidth(int32_t fontID, const char * utf8String);
int32_t GetHeight(int32_t fontID);
void DrawText(int32_t fontID,
coord2D_ts & drawPosition,
const char * utf8String,
uint32_t & fontTextureId,
etk::VectorType<coord2D_ts> & coord,
etk::VectorType<texCoord_ts> & coordTex);
void DrawText(int32_t fontID,
coord2D_ts & drawPosition,
const uniChar_t * unicodeString,
uint32_t & fontTextureId,
etk::VectorType<coord2D_ts> & coord,
etk::VectorType<texCoord_ts> & coordTex);
int32_t LoadFont(etk::File fontFileName);
void DrawText(double x, double y, const char * myString);
};
#endif

View File

@ -1,442 +0,0 @@
/**
*******************************************************************************
* @file ewolFontBitmap.cpp
* @brief ewol Font system (sources)
* @author Edouard DUPIN
* @date 29/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 <ewolFont.h>
#include <ewolTexture.h>
#include <etkVectorType.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
#include <GL/glut.h>
#if defined(EWOL_X11_MODE__XF86V)
# include <X11/extensions/xf86vmode.h>
#elif defined(EWOL_X11_MODE__XRENDER)
# include <X11/extensions/Xrender.h>
#endif
#undef __class__
#define __class__ "ewol::FontBitmap"
extern "C"
{
typedef struct {
texCoord_ts posStart;
texCoord_ts posStop;
float ratio;
}UTF8Element_ts;
}
namespace ewol
{
class Font
{
public:
Font(etk::File newFile)
{
m_loadedOK = false;
m_filename = newFile;
for (int32_t iii=0; iii<FONT_MODE_NUMBER; iii++) {
m_textureId[iii] = 0;
m_textureLoaded[iii] = false;
}
if (m_filename.GetExtention() != "ebt") {
EWOL_ERROR("Not the coorect extention of the file" << m_filename);
return;
}
if (false == m_filename.Exist()) {
EWOL_ERROR("File does not Exist ... " << m_filename);
return;
}
FILE* File=fopen(m_filename.GetCompleateName().c_str(),"r");
if(NULL == File) {
EWOL_ERROR("Can not find the file name=\"" << m_filename << "\"");
return;
}
// load all element of the file ...
char elementLine[2048];
int32_t lineID=1;
while (NULL != fgets(elementLine, 2048, File) )
{
if ( '\n' != elementLine[0] // EOL
&& '\0' != elementLine[0] // EOF
&& '#' != elementLine[0] // Comment line
)
{
if (0 == strncmp("name:", elementLine, 5)) {
char extractString[256] = "";
sscanf(elementLine, "name:%s", extractString);
m_fontName = extractString;
EWOL_INFO("Find font named : \"" << m_fontName << "\"");
} else if (0 == strncmp("normal:", elementLine, 7)) {
char extractString[256] = "";
sscanf(elementLine, "normal:%s", extractString);
SetModeFile(FONT_MODE_NORMAL, extractString);
LoadMode(FONT_MODE_NORMAL);
} else if (0 == strncmp("bold-italic:", elementLine, 12)) {
char extractString[256] = "";
sscanf(elementLine, "bold-italic:%s", extractString);
SetModeFile(FONT_MODE_BOLD_ITALIC, extractString);
} else if (0 == strncmp("bold:", elementLine, 5)) {
char extractString[256] = "";
sscanf(elementLine, "bold:%s", extractString);
SetModeFile(FONT_MODE_BOLD, extractString);
} else if (0 == strncmp("italic:", elementLine, 7)) {
char extractString[256] = "";
sscanf(elementLine, "italic:%s", extractString);
SetModeFile(FONT_MODE_ITALIC, extractString);
} else if (0 == strncmp("0x00", elementLine, 4)) {
int32_t GlyphPositionX;
int32_t GlyphPositionY;
int32_t GlyphSizeX;
int32_t GlyphSizeY;
sscanf(elementLine, "0x00 (%d,%d) (%d,%d)", &GlyphPositionX, &GlyphPositionY, &GlyphSizeX, &GlyphSizeY);
ClearAll(GlyphPositionX, GlyphPositionY, GlyphSizeX, GlyphSizeY);
} else if (0 == strncmp("0x", elementLine, 2)) {
uint32_t utf8Value;
int32_t GlyphPositionX;
int32_t GlyphPositionY;
int32_t GlyphSizeX;
int32_t GlyphSizeY;
sscanf(elementLine, "0x%x (%d,%d) (%d,%d)", &utf8Value, &GlyphPositionX, &GlyphPositionY, &GlyphSizeX, &GlyphSizeY);
SetGlyphID(utf8Value, lineID, GlyphPositionX, GlyphPositionY, GlyphSizeX, GlyphSizeY);
} else {
EWOL_ERROR("error when parsing the line : " << lineID << "\"" << elementLine << "\"");
}
}
lineID++;
}
// close the file at end of reading...
fclose(File);
m_loadedOK = true;
};
~Font(void)
{
for(int32_t iii=0; iii<FONT_MODE_NUMBER; iii++) {
if (true == m_textureLoaded[iii]) {
ewol::UnLoadTexture(m_textureId[iii]);
}
}
};
bool loadedOK(void) { return m_loadedOK; };
private:
void ClearAll(int32_t x, int32_t y, int32_t w, int32_t h)
{
//EWOL_DEBUG("Find default font glyph : (" << x << "," << y << ") (" << w << "," << h << ") ");
for (int32_t iii=0; iii< 0x80; iii++) {
m_listOfElement[iii].posStart.u = (double)x / 512.0;
m_listOfElement[iii].posStart.v = (double)y / 512.0;
m_listOfElement[iii].posStop.u = (double)(x+w) / 512.0;
m_listOfElement[iii].posStop.v = (double)(y+h) / 512.0;
m_listOfElement[iii].ratio = (float)w/(float)h;
}
};
void SetGlyphID(int32_t utf8Value, int32_t lineID, int32_t x, int32_t y, int32_t w, int32_t h)
{
//EWOL_DEBUG("Add font glyph : "<< utf8Value << " (" << x << "," << y << ") (" << w << "," << h << ") ");
if (utf8Value < 0x80) {
m_listOfElement[utf8Value].posStart.u = (double)x / 512.0;
m_listOfElement[utf8Value].posStart.v = (double)y / 512.0;
m_listOfElement[utf8Value].posStop.u = (double)(x+w) / 512.0;
m_listOfElement[utf8Value].posStop.v = (double)(y+h) / 512.0;
m_listOfElement[utf8Value].ratio = (float)w/(float)h;
} else {
EWOL_ERROR("not manage glyph with ID > 0x7F line : " << lineID);
}
};
public:
void SetModeFile(ewol::fontMode_te displayMode, etk::String newFile)
{
if (displayMode < FONT_MODE_NUMBER) {
m_bitmapName[displayMode] = newFile;
}
};
void LoadMode(ewol::fontMode_te displayMode)
{
if (displayMode < FONT_MODE_NUMBER) {
if (m_bitmapName[displayMode] == "") {
EWOL_ERROR("Can not load en empty file for the Font : " << m_filename );
return;
}
if (m_textureLoaded[displayMode] == true) {
EWOL_WARNING("Mode of font is alredy loaded : " << m_filename );
return;
}
etk::String elementName = m_filename.GetFolder();
elementName += '/';
elementName += m_bitmapName[displayMode];
EWOL_INFO("load text font image : \"" << elementName << "\"");
m_textureId[displayMode] = ewol::LoadTexture(elementName);
m_textureLoaded[displayMode] = true;
}
};
etk::File GetFileName(void)
{
return m_filename;
};
etk::String GetName(void)
{
return m_fontName;
};
bool IsLoaded(ewol::fontMode_te displayMode)
{
return m_textureLoaded[displayMode];
};
private:
etk::File m_filename;
bool m_loadedOK;
etk::String m_fontName;
uint32_t m_textureId[FONT_MODE_NUMBER];
bool m_textureLoaded[FONT_MODE_NUMBER];
etk::String m_bitmapName[FONT_MODE_NUMBER];
UTF8Element_ts m_listOfElement[0x80];
public:
UTF8Element_ts * GetPointerOnElement(void)
{
return m_listOfElement;
};
uint32_t GetOglId(ewol::fontMode_te displayMode)
{
return m_textureId[displayMode];
};
};
};
static etk::VectorType<ewol::Font*> listLoadedFonts;
void ewol::UnInitFont(void)
{
for (int32_t iii=0; iii<listLoadedFonts.Size(); iii++) {
delete(listLoadedFonts[iii]);
listLoadedFonts[iii] = NULL;
}
listLoadedFonts.Clear();
}
// load a font in momory, can be done many time for a specific fontname, if you specify true the font will be loaded in memory, otherwise, font is loaded only when needed the first time
bool ewol::AddFont(etk::File fontFileName, bool bold, bool italic, bool boldItalic)
{
for (int32_t iii=0; iii<listLoadedFonts.Size(); iii++) {
if (listLoadedFonts[iii]->GetFileName() == fontFileName) {
if (true == bold) {
listLoadedFonts[iii]->LoadMode(FONT_MODE_BOLD);
}
if (true == italic) {
listLoadedFonts[iii]->LoadMode(FONT_MODE_ITALIC);
}
if (true == boldItalic) {
listLoadedFonts[iii]->LoadMode(FONT_MODE_BOLD_ITALIC);
}
return true;
}
}
if (fontFileName.GetExtention() != "ebt") {
EWOL_ERROR("Not the correct extention of the file" << fontFileName << "supported only *.ebt" );
return false;
}
ewol::Font * tmpFont = new ewol::Font(fontFileName);
if (false == tmpFont->loadedOK()) {
EWOL_ERROR("An error apear when loading Font file : " << fontFileName);
return false;
}
if (true == bold) {
tmpFont->LoadMode(FONT_MODE_BOLD);
}
if (true == italic) {
tmpFont->LoadMode(FONT_MODE_ITALIC);
}
if (true == boldItalic) {
tmpFont->LoadMode(FONT_MODE_BOLD_ITALIC);
}
listLoadedFonts.PushBack(tmpFont);
return true;
}
// get the name of the font
etk::String ewol::GetFontName(int32_t Id)
{
if(Id<listLoadedFonts.Size() && Id>=0) {
return listLoadedFonts[Id]->GetName();
}
return "No-Name";
}
int32_t ewol::GetFontIdWithFileName(etk::File fontFileName)
{
for (int32_t iii=0; iii<listLoadedFonts.Size(); iii++) {
if (listLoadedFonts[iii]->GetFileName() == fontFileName) {
return iii;
}
}
return -1;
}
int32_t ewol::GetFontIdWithName(etk::String fontName)
{
for (int32_t iii=0; iii<listLoadedFonts.Size(); iii++) {
if (listLoadedFonts[iii]->GetName() == fontName) {
return iii;
}
}
return -1;
}
// get the size of a long string in UTF8 (note that \n and \r represent unknown char...)
int32_t ewol::GetStringWidth(int32_t fontID, ewol::fontMode_te displayMode, int32_t size, const char * utf8String)
{
return 0;
}
// get the size of a specific char in UTF8
int32_t ewol::GetCharWidth(int32_t fontID, ewol::fontMode_te displayMode, int32_t size, const char * utf8String)
{
return 0;
}
// draw the text without background
void ewol::DrawText(int32_t fontID,
ewol::fontMode_te displayMode,
int32_t size,
coord3D_ts & drawPosition,
color_ts textColorFg,
const char * utf8String)
{
if(fontID>=listLoadedFonts.Size() || fontID < 0) {
EWOL_WARNING("try to display text with an fontID that does not existed " << fontID);
return;
}
if (false == listLoadedFonts[fontID]->IsLoaded(displayMode)) {
listLoadedFonts[fontID]->LoadMode(displayMode);
if (false == listLoadedFonts[fontID]->IsLoaded(displayMode)) {
EWOL_ERROR("Can not load Font mode : " << displayMode << "of font " << listLoadedFonts[fontID]->GetName() );
return;
}
}
UTF8Element_ts * listOfElement = listLoadedFonts[fontID]->GetPointerOnElement();
char * tmpVal = (char*)utf8String;
glColor4f(textColorFg.red, textColorFg.green, textColorFg.blue, textColorFg.alpha);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, listLoadedFonts[fontID]->GetOglId(displayMode));
float posDrawX = drawPosition.x;
while(*tmpVal != '\0') {
int32_t tmpChar = (int32_t)*tmpVal;
if (tmpChar >= 0x80) {
tmpChar = 0;
}
float sizeWidth = size * listOfElement[tmpChar].ratio;
if (tmpChar != 0x20) {
// TODO : this is really not availlable in the OpenGL ES ==> make with vertex system ...
glBegin(GL_QUADS);
//m_listOfElement[utf8Value].ratio = (float)w/(float)h;
glTexCoord2f(listOfElement[tmpChar].posStart.u, listOfElement[tmpChar].posStart.v); glVertex3f(posDrawX, drawPosition.y, 0.0);
glTexCoord2f(listOfElement[tmpChar].posStop.u, listOfElement[tmpChar].posStart.v); glVertex3f(posDrawX + sizeWidth, drawPosition.y, 0.0);
glTexCoord2f(listOfElement[tmpChar].posStop.u, listOfElement[tmpChar].posStop.v); glVertex3f(posDrawX + sizeWidth, drawPosition.y + size, 0.0);
glTexCoord2f(listOfElement[tmpChar].posStart.u, listOfElement[tmpChar].posStop.v); glVertex3f(posDrawX, drawPosition.y + size, 0.0);
glEnd();
}
tmpVal++;
posDrawX += sizeWidth;
}
drawPosition.x = posDrawX;
glDisable(GL_TEXTURE_2D);
}
void ewol::DrawText(int32_t fontID,
ewol::fontMode_te displayMode,
int32_t size,
coord2D_ts & drawPosition,
const char * utf8String,
uint32_t & fontTextureId,
etk::VectorType<coord2D_ts> & coord,
etk::VectorType<texCoord_ts> & coordTex)
{
if(fontID>=listLoadedFonts.Size() || fontID < 0) {
EWOL_WARNING("try to display text with an fontID that does not existed " << fontID);
return;
}
if (false == listLoadedFonts[fontID]->IsLoaded(displayMode)) {
listLoadedFonts[fontID]->LoadMode(displayMode);
if (false == listLoadedFonts[fontID]->IsLoaded(displayMode)) {
EWOL_ERROR("Can not load Font mode : " << displayMode << "of font " << listLoadedFonts[fontID]->GetName() );
return;
}
}
UTF8Element_ts * listOfElement = listLoadedFonts[fontID]->GetPointerOnElement();
char * tmpVal = (char*)utf8String;
// set id of texture ... (i kwnow it was a little dangerous, but this ID is never remove while the program is running...
fontTextureId = listLoadedFonts[fontID]->GetOglId(displayMode);
float posDrawX = drawPosition.x;
while(*tmpVal != '\0') {
int32_t tmpChar = (int32_t)*tmpVal;
if (tmpChar >= 0x80) {
tmpChar = 0;
}
float sizeWidth = size * listOfElement[tmpChar].ratio;
if (tmpChar != 0x20) {
coordTex.PushBack(listOfElement[tmpChar].posStart);
texCoord_ts tmpTex;
tmpTex.u = listOfElement[tmpChar].posStop.u;
tmpTex.v = listOfElement[tmpChar].posStart.v;
coordTex.PushBack(tmpTex);
coordTex.PushBack(listOfElement[tmpChar].posStop);
tmpTex.u = listOfElement[tmpChar].posStart.u;
tmpTex.v = listOfElement[tmpChar].posStop.v;
coordTex.PushBack(tmpTex);
coord2D_ts tmpCoord;
tmpCoord.x = posDrawX;
tmpCoord.y = drawPosition.y;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX + sizeWidth;
coord.PushBack(tmpCoord);
tmpCoord.y = drawPosition.y + size;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX;
coord.PushBack(tmpCoord);
}
tmpVal++;
posDrawX += sizeWidth;
}
drawPosition.x = posDrawX;
}

View File

@ -1,658 +0,0 @@
/**
*******************************************************************************
* @file ewolFontFreeType.cpp
* @brief ewol Font system wrapper on freetype(sources)
* @author Edouard DUPIN
* @date 05/11/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 <ewolFont.h>
#include <ewolTexture.h>
#include <etkVectorType.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
#include <GL/glut.h>
#if defined(EWOL_X11_MODE__XF86V)
# include <X11/extensions/xf86vmode.h>
#elif defined(EWOL_X11_MODE__XRENDER)
# include <X11/extensions/Xrender.h>
#endif
#include <ft2build.h>
#include FT_FREETYPE_H
#undef __class__
#define __class__ "ewol::FontFreeType"
extern "C"
{
typedef struct {
uniChar_t unicodeCharVal;
int32_t width;
texCoord_ts posStart;
texCoord_ts posStop;
float ratio;
}freeTypeFontElement_ts;
};
// free Font hnadle of librairies ... entry for acces ...
static FT_Library library;
static int32_t nextP2(int32_t value)
{
int32_t val=1;
for (int32_t iii=1; iii<31; iii++) {
if (value <= val) {
return val;
}
val *=2;
}
EWOL_CRITICAL("impossible CASE....");
return val;
}
static int32_t simpleSQRT(int32_t value)
{
int32_t val=1;
for (int32_t iii=1; iii<1000; iii++) {
val =iii*iii;
if (value <= val) {
return iii;
}
}
EWOL_CRITICAL("impossible CASE....");
return val;
}
void ewol::InitFont(void)
{
int32_t error = FT_Init_FreeType( &library );
if(0 != error) {
EWOL_CRITICAL(" when loading FreeType Librairy ...");
}
}
// keep only one instance of every font in freetype
class FTFontInternal
{
private:
void Display(void)
{
EWOL_INFO(" nuber of glyph = " << m_fftFace->num_glyphs);
if ((FT_FACE_FLAG_SCALABLE & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_SCALABLE (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_SCALABLE (disable)");
}
if ((FT_FACE_FLAG_FIXED_SIZES & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_FIXED_SIZES (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_FIXED_SIZES (disable)");
}
if ((FT_FACE_FLAG_FIXED_WIDTH & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_FIXED_WIDTH (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_FIXED_WIDTH (disable)");
}
if ((FT_FACE_FLAG_SFNT & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_SFNT (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_SFNT (disable)");
}
if ((FT_FACE_FLAG_HORIZONTAL & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_HORIZONTAL (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_HORIZONTAL (disable)");
}
if ((FT_FACE_FLAG_VERTICAL & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_VERTICAL (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_VERTICAL (disable)");
}
if ((FT_FACE_FLAG_KERNING & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_KERNING (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_KERNING (disable)");
}
/* Deprecated flag
if ((FT_FACE_FLAG_FAST_GLYPHS & face->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_FAST_GLYPHS (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_FAST_GLYPHS (disable)");
}
*/
if ((FT_FACE_FLAG_MULTIPLE_MASTERS & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_MULTIPLE_MASTERS (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_MULTIPLE_MASTERS (disable)");
}
if ((FT_FACE_FLAG_GLYPH_NAMES & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_GLYPH_NAMES (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_GLYPH_NAMES (disable)");
}
if ((FT_FACE_FLAG_EXTERNAL_STREAM & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_EXTERNAL_STREAM (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_EXTERNAL_STREAM (disable)");
}
if ((FT_FACE_FLAG_HINTER & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_HINTER (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_HINTER (disable)");
}
if ((FT_FACE_FLAG_CID_KEYED & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_CID_KEYED (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_CID_KEYED (disable)");
}
if ((FT_FACE_FLAG_TRICKY & m_fftFace->face_flags) != 0) {
EWOL_INFO(" flags = FT_FACE_FLAG_TRICKY (enable)");
} else {
EWOL_DEBUG(" flags = FT_FACE_FLAG_TRICKY (disable)");
}
EWOL_INFO(" unit per EM = " << m_fftFace->units_per_EM);
EWOL_INFO(" num of fixed sizes = " << m_fftFace->num_fixed_sizes);
EWOL_INFO(" Availlable sizes = " << m_fftFace->available_sizes);
EWOL_INFO(" Current size = " << m_fftFace->size);
}
public:
FTFontInternal(etk::File fontFileName, etk::String fontName)
{
m_fontName = fontName;
m_fileName = fontFileName;
int32_t error = FT_New_Face( library, m_fileName.GetCompleateName().c_str(), 0, &m_fftFace );
if( FT_Err_Unknown_File_Format == error) {
EWOL_ERROR("... the font file could be opened and read, but it appears ... that its font format is unsupported");
} else if (0 != error) {
EWOL_ERROR("... another error code means that the font file could not ... be opened or read, or simply that it is broken...");
} else {
// all OK
EWOL_INFO("load font : \"" << m_fileName << "\" ");
Display();
}
}
~FTFontInternal(void)
{
}
public:
etk::String GetFontName(void) {return m_fontName;};
bool GenerateBitmapFont(int32_t size, int32_t &height, int32_t textureId, etk::VectorType<freeTypeFontElement_ts> & listElement)
{
// 300dpi (hight quality) 96 dpi (normal quality)
int32_t fontQuality = 96;
//int32_t fontQuality = 300;
// Select Size ...
// note tha <<6==*64 corespond with the 1/64th of points calculation of freetype
int32_t error = FT_Set_Char_Size(m_fftFace, size<<6, size<<6, fontQuality, fontQuality);
// the line height to have a correct display
height = size*1.43f;
// a small shortcut
FT_GlyphSlot slot = m_fftFace->glyph;
EWOL_DEBUG("Max size for ths glyph size=" << size << " is (" << m_fftFace->max_advance_width << "," << m_fftFace->max_advance_height << ")");
// retrieve glyph index from character code
int32_t glyph_index = FT_Get_Char_Index(m_fftFace, 'A' );
// load glyph image into the slot (erase previous one)
error = FT_Load_Glyph(m_fftFace, // handle to face object
glyph_index, // glyph index
FT_LOAD_DEFAULT );
if ( error ) {
EWOL_ERROR("FT_Load_Glyph");
}
EWOL_DEBUG("linearHoriAdvance=" << (slot->linearHoriAdvance >> 6));
EWOL_DEBUG("linearVertAdvance=" << (slot->linearVertAdvance >> 6));
EWOL_DEBUG("metrics.horiAdvance=" << (slot->metrics.horiAdvance >> 6));
EWOL_DEBUG("metrics.vertAdvance=" << (slot->metrics.vertAdvance >> 6));
int32_t nbElement = listElement.Size();
int32_t coter = simpleSQRT(nbElement);
int32_t glyphMaxWidth = slot->metrics.horiAdvance>>6;
int32_t glyphMaxHeight = slot->metrics.vertAdvance>>6;
int32_t textureWidth = nextP2(coter*glyphMaxWidth);
int32_t nbRaws = textureWidth / glyphMaxWidth;
int32_t nbLine = (nbElement / nbRaws) + 1;
int32_t textureHeight = nextP2(nbLine*glyphMaxHeight);
EWOL_DEBUG("Generate a text texture for char(" << nbRaws << "," << nbLine << ") with size=(" << textureWidth << "," << textureHeight << ")");
// Allocate Memory For The Texture Data.
GLubyte* expanded_data = new GLubyte[ 2 * textureWidth * textureHeight];
// clean the data :
for(int j=0; j <textureHeight;j++) {
for(int i=0; i < textureWidth; i++){
expanded_data[2*(i+j*textureWidth)+0] = 0;
expanded_data[2*(i+j*textureWidth)+1] = 0;
}
}
int32_t tmpRowId = 0;
int32_t tmpLineId = 0;
// Generate for All Elements :
for (int32_t iii=0; iii<listElement.Size(); iii++) {
// increment the position of the texture
if (iii!=0) {
tmpRowId++;
if (tmpRowId>=nbRaws) {
tmpRowId = 0;
tmpLineId++;
}
}
// retrieve glyph index from character code
glyph_index = FT_Get_Char_Index(m_fftFace, listElement[iii].unicodeCharVal );
// load glyph image into the slot (erase previous one)
error = FT_Load_Glyph(m_fftFace, // handle to face object
glyph_index, // glyph index
FT_LOAD_DEFAULT );
if ( error ) {
EWOL_ERROR("FT_Load_Glyph");
}
// convert to an anti-aliased bitmap
error = FT_Render_Glyph(slot, FT_RENDER_MODE_NORMAL );
if ( error ) {
EWOL_ERROR("FT_Render_Glyph");
}
int32_t tmpWidth=slot->bitmap.width;
int32_t tmpHeight=slot->bitmap.rows;
/*
EWOL_DEBUG("elem=" << listElement[iii].unicodeCharVal
<<" size=(" << tmpWidth << "," << tmpHeight << ")"
<< " for bitmap (left=" << slot->bitmap_left << ",top=" << slot->bitmap_top << ")");
EWOL_DEBUG(" BEARING=(" << (slot->metrics.horiBearingX>>6) << "," << (slot->metrics.vertBearingY>>6) << ")" );
*/
for(int32_t j=0; j < tmpHeight;j++) {
for(int32_t i=0; i < tmpWidth; i++){
int32_t position = 2*( (tmpRowId *glyphMaxWidth + i /*+ (slot->metrics.horiBearingX>>6)*/ )
+ (tmpLineId*glyphMaxHeight + j + (size-(slot->metrics.horiBearingY>>6)) ) * textureWidth);
expanded_data[position+0] = slot->bitmap.buffer[i + tmpWidth*j];
expanded_data[position+1] = slot->bitmap.buffer[i + tmpWidth*j];
}
}
listElement[iii].width = glyphMaxWidth;
listElement[iii].posStart.u = (double)(tmpRowId *glyphMaxWidth) / (double)textureWidth;
listElement[iii].posStart.v = (double)(tmpLineId*glyphMaxHeight) / (double)textureHeight;
listElement[iii].posStop.u = (double)(tmpRowId *glyphMaxWidth + glyphMaxWidth) / (double)textureWidth;;
listElement[iii].posStop.v = (double)(tmpLineId*glyphMaxHeight + glyphMaxHeight) / (double)textureHeight;
}
// Now We Just Setup Some Texture Parameters.
glBindTexture( GL_TEXTURE_2D, textureId);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
// Here We Actually Create The Texture Itself, Notice That We Are Using GL_LUMINANCE_ALPHA To Indicate That we Are Using 2 Channel Data.
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, textureWidth, textureHeight, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, expanded_data );
// With The Texture Created, We Don't Need The Expanded Data Anymore.
delete [] expanded_data;
return false;
}
private:
etk::String m_fontName;
etk::File m_fileName;
FT_Face m_fftFace;
};
static etk::VectorType<FTFontInternal*> m_listLoadedTTFont;
static etk::String s_currentFolderName = "";
static etk::String s_currentDefaultFontName = "";
static int32_t s_currentDefaultFontId = -1;
class FTFont{
public:
FTFont(etk::File fontfileName, etk::String fontName, int32_t size)
{
m_trueTypeFontId = -1;
for (int32_t iii=0; iii < m_listLoadedTTFont.Size(); iii++) {
if (m_listLoadedTTFont[iii]->GetFontName() == fontName) {
m_trueTypeFontId = iii;
}
}
if (-1==m_trueTypeFontId) {
// load a new one ...
FTFontInternal * tmpElement = new FTFontInternal(fontfileName, fontName);
m_listLoadedTTFont.PushBack(tmpElement);
m_trueTypeFontId = m_listLoadedTTFont.Size() -1;
}
// set the bassic charset:
m_elements.Clear();
freeTypeFontElement_ts tmpchar1;
tmpchar1.unicodeCharVal = 0;
m_elements.PushBack(tmpchar1);
for (int32_t iii=0x20; iii<127; iii++) {
freeTypeFontElement_ts tmpchar;
tmpchar.unicodeCharVal = iii;
m_elements.PushBack(tmpchar);
}
m_size = size;
//generate font
glGenTextures(1, &m_textureId);
m_listLoadedTTFont[m_trueTypeFontId]->GenerateBitmapFont(m_size, m_lineHeight, m_textureId, m_elements);
}
~FTFont(void)
{
}
bool Check(etk::String fontName, int32_t size)
{
if (m_trueTypeFontId == -1) {
return false;
}
if( m_listLoadedTTFont[m_trueTypeFontId]->GetFontName() == fontName
&& m_size == size)
{
return true;
}
return false;
};
etk::VectorType<freeTypeFontElement_ts> & GetRefOnElement(void)
{
return m_elements;
};
uint32_t GetOglId(void)
{
return m_textureId;
};
int32_t GetSize(void)
{
return m_size;
};
int32_t GetHeight(void)
{
return m_lineHeight;
};
private:
int32_t m_trueTypeFontId;
uint32_t m_textureId; // internal texture ID
int32_t m_size; // nb pixel height
int32_t m_lineHeight; // nb pixel height
int32_t m_interline; // nb pixel between 2 lines
etk::VectorType<freeTypeFontElement_ts> m_elements; //
};
static etk::VectorType<FTFont*> m_listLoadedFont;
#undef __class__
#define __class__ "ewol::FontFreeType"
void ewol::SetFontFolder(etk::String folderName)
{
if (s_currentFolderName != "") {
EWOL_WARNING("Change the FontFolder, old=\"" << s_currentFolderName << "\"");
}
EWOL_TODO("Check if folder exist");
s_currentFolderName = folderName;
EWOL_INFO("New default font folder name=\"" << s_currentFolderName << "\"");
}
void ewol::UnInitFont(void)
{
EWOL_TODO("later");
}
void ewol::SetDefaultFont(etk::String fontName, int32_t size)
{
if (s_currentDefaultFontName != "") {
EWOL_WARNING("Change the default Ewol Font, old=\"" << s_currentDefaultFontName << "\"");
}
EWOL_INFO("New default Font Name=\"" << fontName << "\"");
int32_t tmpId = ewol::LoadFont(fontName, size);
if (-1 == tmpId) {
if (s_currentDefaultFontName == "") {
EWOL_ASSERT(-1 != tmpId, "Error to load the default Font\"" << fontName << "\"");
} else {
EWOL_CRITICAL("Unable to load the new default font:\"" << fontName << "\"");
}
return;
}
// save the default font parameters ...
s_currentDefaultFontName = fontName;
s_currentDefaultFontId = tmpId;
}
int32_t ewol::GetDefaultFontId(void)
{
return s_currentDefaultFontId;
}
int32_t ewol::LoadFont(etk::String fontName, int32_t size)
{
// check if folder file
etk::String tmpFileName = s_currentFolderName + "/" + fontName + ".ttf";
etk::File fileName(tmpFileName);
if (false == fileName.Exist()) {
EWOL_ERROR("Font does not exist: \"" << fileName.GetCompleateName() << "\"");
return -1;
}
for (int32_t iii=0; iii < m_listLoadedFont.Size(); iii++) {
if (true == m_listLoadedFont[iii]->Check(fontName, size)) {
return iii;
}
}
FTFont * tmpFont = new FTFont(fileName, fontName, size);
m_listLoadedFont.PushBack(tmpFont);
return m_listLoadedFont.Size()-1;
}
void ewol::UnloadFont(int32_t id)
{
EWOL_TODO("I do not think it was a good idea... will be done later");
}
void ewol::DrawText(int32_t fontID,
coord2D_ts & drawPosition,
const uniChar_t * unicodeString,
uint32_t & fontTextureId,
etk::VectorType<coord2D_ts> & coord,
etk::VectorType<texCoord_ts> & coordTex)
{
if(fontID>=m_listLoadedFont.Size() || fontID < 0) {
EWOL_WARNING("try to display text with an fontID that does not existed " << fontID);
return;
}
etk::VectorType<freeTypeFontElement_ts> & listOfElement = m_listLoadedFont[fontID]->GetRefOnElement();
fontTextureId = m_listLoadedFont[fontID]->GetOglId();
int32_t size = m_listLoadedFont[fontID]->GetSize();
float posDrawX = drawPosition.x;
while(*unicodeString != 0) {
int32_t tmpChar = *unicodeString++;
if (tmpChar >= 0x80) {
tmpChar = 0;
}
float sizeWidth = listOfElement[tmpChar].width;
if (tmpChar != 0x20) {
// set texture coordonates :
coordTex.PushBack(listOfElement[tmpChar].posStart);
texCoord_ts tmpTex;
tmpTex.u = listOfElement[tmpChar].posStop.u;
tmpTex.v = listOfElement[tmpChar].posStart.v;
coordTex.PushBack(tmpTex);
coordTex.PushBack(listOfElement[tmpChar].posStop);
tmpTex.u = listOfElement[tmpChar].posStart.u;
tmpTex.v = listOfElement[tmpChar].posStop.v;
coordTex.PushBack(tmpTex);
// set display positions :
coord2D_ts tmpCoord;
tmpCoord.x = posDrawX;
tmpCoord.y = drawPosition.y;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX + sizeWidth;
coord.PushBack(tmpCoord);
tmpCoord.y = drawPosition.y + size;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX;
coord.PushBack(tmpCoord);
}
posDrawX += sizeWidth;
}
drawPosition.x = posDrawX;
}
void ewol::DrawText(int32_t fontID,
coord2D_ts & drawPosition,
const char * utf8String,
uint32_t & fontTextureId,
etk::VectorType<coord2D_ts> & coord,
etk::VectorType<texCoord_ts> & coordTex)
{
// TODO : This code des not work, why ????
/*
int32_t tmpstringLen = strlen(utf8String);
int32_t * tmpUnicodeString = new int32_t(tmpstringLen+1);
// TODO : generate a better convertor...
for (int32_t iii=0; iii<tmpstringLen; iii++) {
tmpUnicodeString[iii] = utf8String[iii];
}
tmpUnicodeString[tmpstringLen] = 0;
// unicode display ...
//DrawText(fontID, drawPosition, tmpUnicodeString, fontTextureId, coord, coordTex);
// clean temporary data ..
delete [] tmpUnicodeString;
*/
if(fontID>=m_listLoadedFont.Size() || fontID < 0) {
EWOL_WARNING("try to display text with an fontID that does not existed " << fontID);
return;
}
etk::VectorType<freeTypeFontElement_ts> & listOfElement = m_listLoadedFont[fontID]->GetRefOnElement();
char * tmpVal = (char*)utf8String;
fontTextureId = m_listLoadedFont[fontID]->GetOglId();
int32_t size = m_listLoadedFont[fontID]->GetSize();
float posDrawX = drawPosition.x;
while(*tmpVal != 0) {
int32_t tmpChar = *tmpVal++;
int32_t charIndex;
if (tmpChar >= 0x80) {
charIndex = 0;
} else if (tmpChar < 0x20) {
charIndex = 0;
} else if (tmpChar < 0x80) {
charIndex = tmpChar - 0x1F;
} else {
for (int32_t iii=0x80-0x20; iii < listOfElement.Size(); iii++) {
if (listOfElement[iii].unicodeCharVal == tmpChar) {
charIndex = iii;
break;
}
}
// TODO : Update if possible the mapping
charIndex = 0;
}
float sizeWidth = listOfElement[charIndex].width;
// 0x01 == 0x20 == ' ';
if (tmpChar != 0x01) {
// set texture coordonates :
coordTex.PushBack(listOfElement[charIndex].posStart);
texCoord_ts tmpTex;
tmpTex.u = listOfElement[charIndex].posStop.u;
tmpTex.v = listOfElement[charIndex].posStart.v;
coordTex.PushBack(tmpTex);
coordTex.PushBack(listOfElement[charIndex].posStop);
tmpTex.u = listOfElement[charIndex].posStart.u;
tmpTex.v = listOfElement[charIndex].posStop.v;
coordTex.PushBack(tmpTex);
// set display positions :
coord2D_ts tmpCoord;
tmpCoord.x = posDrawX;
tmpCoord.y = drawPosition.y;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX + sizeWidth;
coord.PushBack(tmpCoord);
tmpCoord.y = drawPosition.y + size;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX;
coord.PushBack(tmpCoord);
}
posDrawX += sizeWidth;
}
drawPosition.x = posDrawX;
}
int32_t ewol::GetWidth(int32_t fontID, const char * utf8String)
{
if(fontID>=m_listLoadedFont.Size() || fontID < 0) {
EWOL_WARNING("try to display text with an fontID that does not existed " << fontID);
return 0;
}
etk::VectorType<freeTypeFontElement_ts> & listOfElement = m_listLoadedFont[fontID]->GetRefOnElement();
char * tmpVal = (char*)utf8String;
float posDrawX = 0.0;
while(*tmpVal != 0) {
int32_t tmpChar = *tmpVal++;
int32_t charIndex;
if (tmpChar >= 0x80) {
charIndex = 0;
} else if (tmpChar < 0x20) {
charIndex = 0;
} else if (tmpChar < 0x80) {
charIndex = tmpChar - 0x1F;
} else {
for (int32_t iii=0x80-0x20; iii < listOfElement.Size(); iii++) {
if (listOfElement[iii].unicodeCharVal == tmpChar) {
charIndex = iii;
break;
}
}
// TODO : Update if possible the mapping
charIndex = 0;
}
posDrawX += listOfElement[charIndex].width;
}
return posDrawX;
}
int32_t ewol::GetHeight(int32_t fontID)
{
if(fontID>=m_listLoadedFont.Size() || fontID < 0) {
EWOL_WARNING("try to display text with an fontID that does not existed " << fontID);
return 10;
}
return m_listLoadedFont[fontID]->GetHeight();
}

View File

@ -1,285 +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 <ewolTexture.h>
#include <GL/gl.h>
#undef __class__
#define __class__ "ewol::OObject2DColored"
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_COLOR_ARRAY );
glDisableClientState( GL_VERTEX_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);
}
void ewol::OObject2DColored::UpdateOrigin(float x, float y)
{
for (int32_t iii=0; iii<m_coord.Size(); iii++) {
m_coord[iii].x += x;
m_coord[iii].y += y;
}
}
#undef __class__
#define __class__ "ewol::OObject2DTextured"
ewol::OObject2DTextured::OObject2DTextured(etk::File textureName)
{
EWOL_DEBUG("Create OObject textured : \"" << textureName << "\"");
m_textureId = ewol::LoadTexture(textureName);
}
ewol::OObject2DTextured::~OObject2DTextured(void)
{
ewol::UnLoadTexture(m_textureId);
}
void ewol::OObject2DTextured::Draw(void)
{
if (m_coord.Size()<=0) {
EWOL_WARNING("Nothink to draw...");
return;
}
glColor4f(1.0, 1.0, 1.0, 1.0);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, m_textureId);
glEnableClientState( GL_VERTEX_ARRAY ); // Enable Vertex Arrays
glEnableClientState( GL_TEXTURE_COORD_ARRAY ); // Enable Texture Coord Arrays
glVertexPointer( 2, GL_FLOAT, 0, &m_coord[0] );
glTexCoordPointer( 2, GL_FLOAT, 0, &m_coordTex[0] );
glDrawArrays( GL_TRIANGLES, 0, m_coord.Size());
//EWOL_DEBUG("request draw of " << m_coord.Size() << " elements");
glDisableClientState( GL_VERTEX_ARRAY ); // Disable Vertex Arrays
glDisableClientState( GL_TEXTURE_COORD_ARRAY ); // Disable Texture Coord Arrays
glDisable(GL_TEXTURE_2D);
}
void ewol::OObject2DTextured::Rectangle(float x, float y, float w, float h, float texX, float texY, float texSX, float texSY)
{
//EWOL_DEBUG("Add rectangle : ...");
coord2D_ts point;
texCoord_ts tex;
tex.u = texX;
tex.v = texY;
point.x = x;
point.y = y;
m_coord.PushBack(point);
m_coordTex.PushBack(tex);
tex.u = texSX;
tex.v = texY;
point.x = x + w;
point.y = y;
m_coord.PushBack(point);
m_coordTex.PushBack(tex);
tex.u = texSX;
tex.v = texSY;
point.x = x + w;
point.y = y + h;
m_coord.PushBack(point);
m_coordTex.PushBack(tex);
m_coord.PushBack(point);
m_coordTex.PushBack(tex);
tex.u = texX;
tex.v = texSY;
point.x = x;
point.y = y + h;
m_coord.PushBack(point);
m_coordTex.PushBack(tex);
tex.u = texX;
tex.v = texY;
point.x = x;
point.y = y;
m_coord.PushBack(point);
m_coordTex.PushBack(tex);
}
void ewol::OObject2DTextured::UpdateOrigin(float x, float y)
{
for (int32_t iii=0; iii<m_coord.Size(); iii++) {
m_coord[iii].x += x;
m_coord[iii].y += y;
}
}
#undef __class__
#define __class__ "ewol::OObject2DText"
ewol::OObject2DText::OObject2DText(float x, float y, etk::String FontName, int32_t size, fontMode_te mode, color_ts textColorFg, const char* utf8String)
{
Text(x, y, FontName, size, mode, textColorFg, utf8String);
}
ewol::OObject2DText::~OObject2DText(void)
{
}
void ewol::OObject2DText::Draw(void)
{
if (m_coord.Size()<=0) {
EWOL_WARNING("Nothink to draw...");
return;
}
glColor4f(m_textColorFg.red, m_textColorFg.green, m_textColorFg.blue, m_textColorFg.alpha);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, m_FontTextureId);
glEnableClientState( GL_VERTEX_ARRAY ); // Enable Vertex Arrays
glEnableClientState( GL_TEXTURE_COORD_ARRAY ); // Enable Texture Coord Arrays
glVertexPointer( 2, GL_FLOAT, 0, &m_coord[0] );
glTexCoordPointer( 2, GL_FLOAT, 0, &m_coordTex[0] );
glDrawArrays( GL_QUADS, 0, m_coord.Size());
//EWOL_DEBUG("request draw of " << m_coord.Size() << " elements");
glDisableClientState( GL_VERTEX_ARRAY ); // Disable Vertex Arrays
glDisableClientState( GL_TEXTURE_COORD_ARRAY ); // Disable Texture Coord Arrays
glDisable(GL_TEXTURE_2D);
}
void ewol::OObject2DText::Text(float x, float y, etk::String FontName, int32_t size, fontMode_te mode, color_ts textColorFg, const char* utf8String)
{
m_FontTextureId = 0;
m_coord.Clear();
m_coordTex.Clear();
// get font Name :
if (FontName == "") {
m_FontId = GetDefaultFontId();
} else {
EWOL_TODO("pas encore fait...");
//m_FontId = GetFontIdWithName(FontName);
return;
}
if (m_FontId == -1) {
EWOL_ERROR("Can not find the font with the name : " << FontName);
}
EWOL_DEBUG("Font name : " << FontName << " id=" << m_FontId);
m_textColorFg = textColorFg;
coord2D_ts drawPosition;
drawPosition.x = x;
drawPosition.y = y;
ewol::DrawText(m_FontId, drawPosition, utf8String, m_FontTextureId, m_coord, m_coordTex);
}
void ewol::OObject2DText::UpdateOrigin(float x, float y)
{
for (int32_t iii=0; iii<m_coord.Size(); iii++) {
m_coord[iii].x += x;
m_coord[iii].y += y;
}
}
/*
uint32_t m_FontId; //!< font internal ID
uint32_t m_FontTextureId; //!< font internal Texture ID
etk::VectorType<coord2D_ts> m_coord; //!< internal coord of the object
etk::VectorType<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
*/

View File

@ -1,158 +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 <etkFile.h>
#include <ewolDebug.h>
#include <ewolFont.h>
#include <etkVectorType.h>
namespace ewol {
extern "C" {
typedef struct {
int32_t f;
int32_t s;
int32_t t;
}linkCoord_ts;
};
class OObject
{
public:
OObject(void) { m_name=""; };
virtual ~OObject(void) {};
public:
virtual void Draw(void) = 0;
void SetName(etk::String & name)
{
m_name = name;
}
void SetName(const char * name)
{
if (NULL != name) {
m_name = name;
}
}
etk::String GetName(void)
{
return m_name;
}
public:
virtual void UpdateOrigin(float x, float y) {};
private:
etk::String m_name;
};
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);
public:
virtual void UpdateOrigin(float x, float y);
};
/*
class OObjectFile :public ewol::OObject
{
public:
OObjectFile(etk::File fileName) {};
virtual ~OObject2DColored(void) {};
public:
void Draw(void);
bool Save(etk::File fileName) { return false; };
protected:
etk::VectorType<OObject*> m_listsubObject; //!< an object file contain more than one object...
bool m_isBinaryFile; //!< to know th mode of saving the file
};
*/
class OObject2DTextured :public ewol::OObject
{
public:
OObject2DTextured(etk::File textureName);
virtual ~OObject2DTextured(void);
public:
virtual void Draw(void);
void Rectangle(float x, float y, float w, float h, float texX=0.0, float texY=0.0, float texSX=1.0, float texSY=1.0);
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
public:
virtual void UpdateOrigin(float x, float y);
};
class OObject2DText :public ewol::OObject
{
public:
OObject2DText(float x, float y, etk::String FontName, int32_t size, fontMode_te mode, color_ts textColorFg, const char* utf8String);
virtual ~OObject2DText(void);
public:
virtual void Draw(void);
// set a specific text
void Text(float x, float y, etk::String FontName, int32_t size, fontMode_te mode, color_ts textColorFg, const char* utf8String);
protected:
int32_t m_FontId; //!< font internal ID
color_ts m_textColorFg; //!< text color ...
uint32_t m_FontTextureId; //!< font internal Texture ID
etk::VectorType<coord2D_ts> m_coord; //!< internal coord of the object
etk::VectorType<texCoord_ts> m_coordTex; //!< internal texture coordinate for every point
public:
virtual void UpdateOrigin(float x, float y);
};
/*
class OObject2DTextMultiple :public ewol::OObject
{
public:
OObject2DText(etk::String FontName);
virtual ~OObject2DText(void);
public:
virtual void Draw(void);
// set a specific text
void TextAdd(float x, float y, int32_t size, fontMode_te mode, const char* utf8String);
void Clear(void);
protected:
int32_t m_FontId; //!< font internal ID
uint32_t m_FontTextureId[FONT_MODE_NUMBER]; //!< font internal Texture ID
etk::VectorType<coord2D_ts> m_coord[FONT_MODE_NUMBER]; //!< internal coord of the object
etk::VectorType<texCoord_ts> m_coordTex[FONT_MODE_NUMBER]; //!< internal texture coordinate for every point
};
*/
};
#endif

View File

@ -1,412 +0,0 @@
/**
*******************************************************************************
* @file ewolTexture.cpp
* @brief ewol Texture loading system (sources)
* @author Edouard DUPIN
* @date 28/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 <ewolTexture.h>
extern "C"
{
#pragma pack(push,1)
typedef struct
{
int16_t bfType;
int32_t bfSize;
int32_t bfReserved;
int32_t bfOffBits;
} bitmapFileHeader_ts;
typedef struct
{
int32_t biSize;
int32_t biWidth;
int32_t biHeight;
int16_t biPlanes;
int16_t biBitCount;
int32_t biCompression;
int32_t biSizeImage;
int32_t biXPelsPerMeter;
int32_t biYPelsPerMeter;
int32_t biClrUsed;
int32_t biClrImportant;
} bitmapInfoHeader_ts;
#pragma pack(pop)
typedef enum {
BITS_16_R5G6B5,
BITS_16_X1R5G5B5,
BITS_24_R8G8B8,
BITS_32_X8R8G8B8,
BITS_32_A8R8G8B8
} modeBitmap_te;
};
#undef __class__
#define __class__ "ewol::Bitmap"
class Bitmap
{
private:
modeBitmap_te m_dataMode;
int32_t m_width;
int32_t m_height;
int32_t m_size;
uint8_t * m_data;
uint8_t * m_dataGenerate;
bitmapFileHeader_ts m_FileHeader;
bitmapInfoHeader_ts m_InfoHeader;
public:
Bitmap(etk::File & fileName) : m_data(NULL), m_dataGenerate(NULL)
{
m_dataMode = BITS_16_R5G6B5;
m_width = 0;
m_height = 0;
m_size = 0;
FILE *File=NULL;
// Get the fileSize ...
if (fileName.Size() < (int32_t)(sizeof(bitmapFileHeader_ts) + sizeof(bitmapInfoHeader_ts) ) ) {
EWOL_ERROR("not enought data in the file named=\"" << fileName << "\"");
return;
}
File=fopen(fileName.GetCompleateName().c_str(),"rb");
if(NULL == File) {
EWOL_ERROR("Can not find the file name=\"" << fileName << "\"");
return;
}
// get the data :
if (fread(&m_FileHeader,sizeof(bitmapFileHeader_ts),1,File) != 1) {
EWOL_ERROR("error loading file header");
fclose(File);
return;
}
if (fread(&m_InfoHeader,sizeof(bitmapInfoHeader_ts),1,File) != 1) {
EWOL_ERROR("error loading file header");
fclose(File);
return;
}
// TODO : do otherwise ...
fseek(File,m_FileHeader.bfOffBits,SEEK_SET);
if(ferror(File)) {
EWOL_ERROR("error with the 'bfOffBits' in the file named=\"" << fileName << "\"");
fclose(File);
return;
}
// Check the header error :
if (m_FileHeader.bfType != 0x4D42) {
EWOL_ERROR("the file=\"" << fileName << "\" is not a bitmap file ...");
fclose(File);
return;
}
if (m_FileHeader.bfReserved != 0x00000000) {
EWOL_ERROR("the bfReserved feald is not at 0 ==> not supported format ...");
fclose(File);
return;
}
if( m_InfoHeader.biBitCount == 16
&& m_InfoHeader.biCompression == 0)
{
m_dataMode = BITS_16_X1R5G5B5;
} else if( m_InfoHeader.biBitCount == 16
&& m_InfoHeader.biCompression == 3)
{
m_dataMode = BITS_16_R5G6B5;
} else if( m_InfoHeader.biBitCount == 24
&& m_InfoHeader.biCompression == 0)
{
m_dataMode = BITS_24_R8G8B8;
} else if( m_InfoHeader.biBitCount == 32
&& m_InfoHeader.biCompression == 3)
{
m_dataMode = BITS_32_X8R8G8B8;
} else if( m_InfoHeader.biBitCount == 32
&& m_InfoHeader.biCompression == 0)
{
m_dataMode = BITS_32_A8R8G8B8;
} else {
EWOL_ERROR("the biBitCount & biCompression fealds are unknow ==> not supported format ...");
fclose(File);
return;
}
m_width = m_InfoHeader.biWidth;
m_height = m_InfoHeader.biHeight;
if(0 != m_InfoHeader.biSizeImage)
{
m_data=new uint8_t[m_InfoHeader.biSizeImage];
if (fread(m_data,m_InfoHeader.biSizeImage,1,File) != 1){
EWOL_CRITICAL("Can not read the file with the good size...");
}
// allocate the destination data ...
m_dataGenerate=new uint8_t[m_width*m_height*4];
}
fclose(File);
// need now to generate RGBA data ...
switch(m_dataMode)
{
case BITS_16_R5G6B5:
{
uint16_t * pointer = (uint16_t*)m_data;
for(int32_t yyy=0; yyy<m_height; yyy++) {
for(int32_t xxx=0; xxx<m_width; xxx++) {
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 0] = (int8_t)((*pointer & 0xF800) >> 8);
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 1] = (int8_t)((*pointer & 0x07E0) >> 3);
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 2] = (int8_t)(*pointer << 3);
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 3] = 0xFF;
pointer++;
}
}
}
break;
case BITS_16_X1R5G5B5:
{
uint16_t * pointer = (uint16_t*)m_data;
for(int32_t yyy=0; yyy<m_height; yyy++) {
for(int32_t xxx=0; xxx<m_width; xxx++) {
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 0] = (int8_t)((*pointer & 0x7C00) >> 7);
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 1] = (int8_t)((*pointer & 0x03E0) >> 2);
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 2] = (int8_t)(*pointer << 3);
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 3] = 0xFF;
pointer++;
}
}
}
break;
case BITS_24_R8G8B8:
{
uint8_t * pointer = m_data;
for(int32_t yyy=0; yyy<m_height; yyy++) {
for(int32_t xxx=0; xxx<m_width; xxx++) {
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 0] = *pointer++;
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 1] = *pointer++;
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 2] = *pointer++;
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 3] = 0xFF;
}
}
}
break;
case BITS_32_X8R8G8B8:
{
uint8_t * pointer = m_data;
for(int32_t yyy=0; yyy<m_height; yyy++) {
for(int32_t xxx=0; xxx<m_width; xxx++) {
pointer++;
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 0] = *pointer++;
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 1] = *pointer++;
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 2] = *pointer++;
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 3] = 0xFF;
}
}
}
break;
case BITS_32_A8R8G8B8:
{
uint8_t * pointer = m_data;
for(int32_t yyy=0; yyy<m_height; yyy++) {
for(int32_t xxx=0; xxx<m_width; xxx++) {
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 0] = *pointer++;
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 1] = *pointer++;
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 2] = *pointer++;
m_dataGenerate[4*((m_height-yyy-1) * m_width + xxx ) + 3] = *pointer++;
}
}
}
break;
default:
EWOL_DEBUG(" mode = ERROR");
break;
}
}
~Bitmap(void)
{
if (NULL != m_data) {
delete(m_data);
}
if (NULL != m_dataGenerate) {
delete(m_dataGenerate);
}
}
bool LoadOK(void) { if (NULL != m_dataGenerate) { return true; } else { return false; } };
int32_t Width(void) { return m_width; };
int32_t Height(void) { return m_height; };
uint8_t * Data(void) { return m_dataGenerate; };
void Display(void)
{
if (NULL == m_data) {
EWOL_ERROR("Might loading error of this Bitmap ...");
return;
}
EWOL_DEBUG(" -----------------------------------------------------------");
if (false) {
EWOL_DEBUG("Display caracteristic of the bitmap : ");
EWOL_DEBUG(" Header of file :");
EWOL_DEBUG(" bfType =" << m_FileHeader.bfType << " 19778 : must always be set to 'BM' to declare that this is a .bmp-file.");
EWOL_DEBUG(" bfSize =" << m_FileHeader.bfSize << " specifies the size of the file in bytes.");
EWOL_DEBUG(" bfReserved=" << m_FileHeader.bfReserved << " must always be set to zero.");
EWOL_DEBUG(" bfOffBits =" << m_FileHeader.bfOffBits << " 1078 : specifies the offset from the beginning of the file to the bitmap data.");
EWOL_DEBUG(" info header of file :");
EWOL_DEBUG(" biSize =" << m_InfoHeader.biSize << " specifies the size of the BITMAPINFOHEADER structure, in bytes.");
EWOL_DEBUG(" biWidth =" << m_InfoHeader.biWidth << " specifies the width of the image, in pixels.");
EWOL_DEBUG(" biHeight =" << m_InfoHeader.biHeight << " specifies the height of the image, in pixels.");
EWOL_DEBUG(" biPlanes =" << m_InfoHeader.biPlanes << " specifies the number of planes of the target device, must be set to zero.");
EWOL_DEBUG(" biBitCount =" << m_InfoHeader.biBitCount << " specifies the number of bits per pixel.");
EWOL_DEBUG(" biCompression =" << m_InfoHeader.biCompression << " Specifies the type of compression, usually set to zero (no compression).");
EWOL_DEBUG(" biSizeImage =" << m_InfoHeader.biSizeImage << " specifies the size of the image data, in bytes. If there is no compression, it is valid to set this member to zero.");
EWOL_DEBUG(" biXPelsPerMeter=" << m_InfoHeader.biXPelsPerMeter << " specifies the the horizontal pixels per meter on the designated targer device, usually set to zero.");
EWOL_DEBUG(" biYPelsPerMeter=" << m_InfoHeader.biYPelsPerMeter << " specifies the the vertical pixels per meter on the designated targer device, usually set to zero.");
EWOL_DEBUG(" biClrUsed =" << m_InfoHeader.biClrUsed << " speglTexImage2Dcifies the number of colors used in the bitmap, if set to zero the number of colors is calculated using the biBitCount member.");
EWOL_DEBUG(" biClrImportant =" << m_InfoHeader.biClrImportant << " specifies the number of color that are 'important' for the bitmap, if set to zero, all colors are important.");
}
EWOL_DEBUG("Bitmap : " << m_width << "x" << m_height);
switch(m_dataMode)
{
case BITS_16_R5G6B5:
EWOL_DEBUG(" mode = 16 bits R5G6B5");
break;
case BITS_16_X1R5G5B5:
EWOL_DEBUG(" mode = 16 bits X1R5G5B5");
break;
case BITS_24_R8G8B8:
EWOL_DEBUG(" mode = 24 bits R8G8B8");
break;
case BITS_32_X8R8G8B8:
EWOL_DEBUG(" mode = 32 bits X8R8G8B8");
break;
case BITS_32_A8R8G8B8:
EWOL_DEBUG(" mode = 32 bits A8R8G8B8");
break;
default:
EWOL_DEBUG(" mode = ERROR");
break;
}
}
};
#include <GL/gl.h>
#include <GL/glu.h>
class LoadedTexture
{
public:
etk::File m_filename;
int32_t m_nbTimeLoaded;
int32_t m_imageSize; // must be x=y ...
uint32_t m_openGlTextureID;
};
etk::VectorType<LoadedTexture*> listLoadedTexture;
#undef __class__
#define __class__ "ewol"
int32_t ewol::LoadTexture(etk::File fileName)
{
if (listLoadedTexture.Size()!=0) {
for (int32_t iii=0; iii<listLoadedTexture.Size(); iii++) {
if (listLoadedTexture[iii]->m_filename == fileName) {
listLoadedTexture[iii]->m_nbTimeLoaded++;
return listLoadedTexture[iii]->m_openGlTextureID;
}
}
}
etk::String fileExtention = fileName.GetExtention();
if (fileExtention == "bmp") {
if (false == fileName.Exist()) {
EWOL_ERROR("File does not Exist ... " << fileName);
return -1;
}
Bitmap myBitmap(fileName);
myBitmap.Display();
if (myBitmap.LoadOK() == true) {
if (myBitmap.Width()!= myBitmap.Height()) {
EWOL_ERROR("Texture can not have Width=" << myBitmap.Width() << "px different of height=" << myBitmap.Height() << "px in file:" << fileName);
return -1;
}
GLuint textureid;
glGenTextures(1, &textureid);
glBindTexture(GL_TEXTURE_2D, textureid);
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
//--- mode nearest
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
//--- Mode linear
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, myBitmap.Width(), myBitmap.Height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, myBitmap.Data());
LoadedTexture *tmpTex = new LoadedTexture();
if (NULL != tmpTex) {
tmpTex->m_filename = fileName;
tmpTex->m_nbTimeLoaded = 1;
tmpTex->m_imageSize = myBitmap.Width();
tmpTex->m_openGlTextureID = textureid;
listLoadedTexture.PushBack(tmpTex);
} else {
EWOL_ERROR("Allocation ERROR... ");
}
return textureid;
} else {
return -1;
}
} else {
EWOL_ERROR("Extention not managed " << fileName << " Sopported extention : .bmp");
return -1;
}
}
void ewol::UnLoadTexture(uint32_t textureID)
{
for (int32_t iii=0; iii<listLoadedTexture.Size(); iii++) {
if (listLoadedTexture[iii]->m_openGlTextureID == textureID) {
listLoadedTexture[iii]->m_nbTimeLoaded--;
if (0 == listLoadedTexture[iii]->m_nbTimeLoaded) {
EWOL_DEBUG("Remove openGL texture ID=" << textureID << " file:" << listLoadedTexture[iii]->m_filename);
glDeleteTextures(1,&listLoadedTexture[iii]->m_openGlTextureID);
delete(listLoadedTexture[iii]);
listLoadedTexture[iii] = NULL;
listLoadedTexture.Erase(iii);
}
return;
}
}
EWOL_CRITICAL("Can not find TextureId=" << textureID << " in the list of texture loaded...==> to remove it ...");
}
int32_t ewol::GetTextureSize(uint32_t textureID)
{
for (int32_t iii=0; iii<listLoadedTexture.Size(); iii++) {
if (listLoadedTexture[iii]->m_openGlTextureID == textureID) {
return listLoadedTexture[iii]->m_imageSize;
}
}
EWOL_ERROR("Can not find TextureId=" << textureID << " in the list of texture loaded...");
return -1;
}

View File

@ -1,40 +0,0 @@
/**
*******************************************************************************
* @file ewolTexture.h
* @brief ewol Texture loading system (header)
* @author Edouard DUPIN
* @date 28/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_TEXTURE_H__
#define __EWOL_TEXTURE_H__
#include <etkTypes.h>
#include <ewolDebug.h>
#include <etkFile.h>
namespace ewol
{
int32_t LoadTexture(etk::File fileName);
void UnLoadTexture(uint32_t textureID);
int32_t GetTextureSize(uint32_t textureID);
};
#endif

View File

@ -1,233 +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>
#undef __class__
#define __class__ "ewol::Widget"
ewol::Widget::Widget(void)
{
m_origin.x = 0.0;
m_origin.y = 0.0;
m_size.x = 10.0;
m_size.y = 10.0;
m_minSize.x = -1.0;
m_minSize.y = -1.0;
// user settings :
m_userMinSize.x = -1.0;
m_userMinSize.y = -1.0;
m_userExpendX = false;
m_userExpendY = false;
m_genericDraw = true;
m_specificDraw = false;
}
ewol::Widget::~Widget(void)
{
}
bool ewol::Widget::CalculateSize(double availlableX, double availlableY)
{
m_size.x = availlableX;
m_size.y = availlableY;
return true;
}
bool ewol::Widget::GenEventInput(int32_t IdInput, eventInputType_te typeEvent, double x, double y)
{
bool ended = false;
for(int32_t iii=m_inputEvent.Size()-1; iii>=0; iii--) {
if (EWOL_EVENT_AREA == m_inputEvent[iii].mode) {
if( m_inputEvent[iii].area.origin.x <= x
&& m_inputEvent[iii].area.origin.y <= y
&& m_inputEvent[iii].area.origin.x + m_inputEvent[iii].area.size.x > x
&& m_inputEvent[iii].area.origin.y + m_inputEvent[iii].area.size.y > y )
{
if( (m_inputEvent[iii].area.flags & (1<<(IdInput-1)) )
&& ( ( (FLAG_EVENT_INPUT_MOTION & m_inputEvent[iii].area.flags) && EVENT_INPUT_TYPE_MOVE == typeEvent)
|| ( (FLAG_EVENT_INPUT_ENTER & m_inputEvent[iii].area.flags) && EVENT_INPUT_TYPE_ENTER == typeEvent)
|| ( (FLAG_EVENT_INPUT_LEAVE & m_inputEvent[iii].area.flags) && EVENT_INPUT_TYPE_LEAVE == typeEvent)
|| ( (FLAG_EVENT_INPUT_DOWN & m_inputEvent[iii].area.flags) && EVENT_INPUT_TYPE_DOWN == typeEvent)
|| ( (FLAG_EVENT_INPUT_UP & m_inputEvent[iii].area.flags) && EVENT_INPUT_TYPE_UP == typeEvent)
|| ( (FLAG_EVENT_INPUT_CLICKED & m_inputEvent[iii].area.flags) && EVENT_INPUT_TYPE_SINGLE == typeEvent)
|| ( (FLAG_EVENT_INPUT_CLICKED_DOUBLE & m_inputEvent[iii].area.flags) && EVENT_INPUT_TYPE_DOUBLE == typeEvent)
|| ( (FLAG_EVENT_INPUT_CLICKED_TRIPLE & m_inputEvent[iii].area.flags) && EVENT_INPUT_TYPE_TRIPLE == typeEvent)
)
)
{
ended = OnEventArea(m_inputEvent[iii].generateEventId, x, y);
if (true == ended) {
break;
}
// todo : call other link widget :
if (-1 != m_inputEvent[iii].widgetCall) {
ewol::Widget * tmpWidget = NULL;
//tmpWidget = ewol::GetWidgetWithID(newEvent.widgetCall);
ended = tmpWidget->OnEventAreaExternal(m_uniqueId, m_inputEvent[iii].generateEventId, x, y);
if (true == ended) {
break;
}
}
}
}
}
}
if (false == ended) {
return OnEventInput(IdInput, typeEvent, x, y);
}
return ended;
}
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, uint64_t flags, const char * generateEventId)
{
/*
if( origin.x < 0.0
|| origin.y < 0.0)
{
EWOL_WARNING("origin under 0.0 ... out of range");
return false;
}
if( size.x < 0.0
|| size.y < 0.0)
{
EWOL_WARNING("size under 0.0 ... out of range");
return false;
}
if( origin.x > m_size.x
|| origin.y > m_size.y)
{
EWOL_WARNING("origin out of range");
return false;
}
if( origin.x + size.x > m_size.x
|| origin.y + size.y > m_size.y)
{
EWOL_WARNING("end area out of size");
return false;
}
*/
event_ts newEvent;
newEvent.generateEventId = generateEventId;
newEvent.widgetCall = -1; // by default no widget is called
newEvent.mode = EWOL_EVENT_AREA;
newEvent.area.origin.x = origin.x + m_origin.x;
newEvent.area.origin.y = origin.y + m_origin.y;
newEvent.area.size = size;
newEvent.area.flags = flags;
m_inputEvent.PushBack(newEvent);
EWOL_DEBUG("Add an area event...");
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;
}
void ewol::Widget::AddOObject(ewol::OObject* newObject, etk::String name)
{
if (NULL == newObject) {
EWOL_ERROR("Try to add an empty object in the Widget generic display system : name=\"" << name << "\"");
return;
}
newObject->SetName(name);
//EWOL_INFO("UPDATE AT origin : (" << m_origin.x << "," << m_origin.y << ")");
newObject->UpdateOrigin(m_origin.x, m_origin.y);
m_listOObject.PushBack(newObject);
}
ewol::OObject* ewol::Widget::GetOObject(etk::String name)
{
for (int32_t iii=0; iii<m_listOObject.Size(); iii++) {
if (m_listOObject[iii]->GetName() == name) {
return m_listOObject[iii];
}
}
return NULL;
}
void ewol::Widget::RmOObjectElem(etk::String name)
{
for (int32_t iii=0; iii<m_listOObject.Size(); iii++) {
if (m_listOObject[iii]->GetName() == name) {
delete(m_listOObject[iii]);
m_listOObject[iii] = NULL;
m_listOObject.Erase(iii);
return;
}
}
}
void ewol::Widget::ClearOObjectList(void)
{
for (int32_t iii=0; iii<m_listOObject.Size(); iii++) {
delete(m_listOObject[iii]);
m_listOObject[iii] = NULL;
}
m_listOObject.Clear();
}
bool ewol::Widget::GenericDraw(void)
{
for (int32_t iii=0; iii<m_listOObject.Size(); iii++) {
if (NULL != m_listOObject[iii]) {
m_listOObject[iii]->Draw();
}
}
return true;
}
//} // ???

View File

@ -1,279 +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 <ewolOObject.h>
#include <etkVectorType.h>
namespace ewol {
extern "C" {
typedef struct {
double x;
double y;
} coord;
}
typedef enum {
EVENT_INPUT_TYPE_DOWN,
EVENT_INPUT_TYPE_MOVE,
EVENT_INPUT_TYPE_SINGLE,
EVENT_INPUT_TYPE_DOUBLE,
EVENT_INPUT_TYPE_TRIPLE,
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;
enum {
FLAG_EVENT_INPUT_1 = 1 << 0,
FLAG_EVENT_INPUT_2 = 1 << 1,
FLAG_EVENT_INPUT_3 = 1 << 2,
FLAG_EVENT_INPUT_4 = 1 << 3,
FLAG_EVENT_INPUT_5 = 1 << 4,
FLAG_EVENT_INPUT_6 = 1 << 5,
FLAG_EVENT_INPUT_7 = 1 << 6,
FLAG_EVENT_INPUT_8 = 1 << 7,
FLAG_EVENT_INPUT_9 = 1 << 8,
FLAG_EVENT_INPUT_10 = 1 << 9,
FLAG_EVENT_INPUT_11 = 1 << 10,
FLAG_EVENT_INPUT_12 = 1 << 11,
FLAG_EVENT_INPUT_13 = 1 << 12,
FLAG_EVENT_INPUT_14 = 1 << 13,
FLAG_EVENT_INPUT_15 = 1 << 14,
FLAG_EVENT_INPUT_16 = 1 << 15,
FLAG_EVENT_INPUT_17 = 1 << 16,
FLAG_EVENT_INPUT_MOTION = 1 << 20,
FLAG_EVENT_INPUT_ENTER = 1 << 21,
FLAG_EVENT_INPUT_LEAVE = 1 << 21,
FLAG_EVENT_INPUT_DOWN = 1 << 23,
FLAG_EVENT_INPUT_UP = 1 << 24,
FLAG_EVENT_INPUT_CLICKED = 1 << 25,
FLAG_EVENT_INPUT_CLICKED_DOUBLE = 1 << 26,
FLAG_EVENT_INPUT_CLICKED_TRIPLE = 1 << 27,
FLAG_EVENT_INPUT_CLICKED_ALL = FLAG_EVENT_INPUT_CLICKED + FLAG_EVENT_INPUT_CLICKED_DOUBLE + FLAG_EVENT_INPUT_CLICKED_TRIPLE,
};
#define FLAG_EVENT_INPUT_BT_LEFT (FLAG_EVENT_INPUT_1)
#define FLAG_EVENT_INPUT_BT_CENTER (FLAG_EVENT_INPUT_2)
#define FLAG_EVENT_INPUT_BT_RIGHT (FLAG_EVENT_INPUT_3)
#define FLAG_EVENT_INPUT_BT_SCROOL_UP (FLAG_EVENT_INPUT_4)
#define FLAG_EVENT_INPUT_BT_SCROOL_DOWN (FLAG_EVENT_INPUT_5)
#define UTF8_MAX_SIZE (8)
#define EWOL_EVENT_AREA (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
uint64_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:
// internal element calculated by the system
coord m_origin; //!< internal ... I do not really known how i can use it ...
coord m_size; //!< internal : current size of the widget
coord m_minSize; //!< user define the minimum size of the widget
// user configuaration
coord m_userMinSize; //!< user define the minimum size of the widget
bool m_userExpendX;
bool m_userExpendY;
public:
void SetOrigin(double x, double y) { m_origin.x=x; m_origin.y=y; };
coord GetOrigin(void) { return m_origin; };
virtual bool CalculateSize(double availlableX, double availlableY); // this generate the current size ...
virtual bool CalculateMinSize(void) {m_minSize.x = m_userMinSize.x; m_minSize.y = m_userMinSize.y; return true; }; //update the min Size ... and the expend parameters for the sizer
virtual void SetMinSise(double x=-1, double y=-1) { m_userMinSize.x = x; m_userMinSize.y = y; };
coord GetMinSize(void) { return m_minSize; };
coord GetSize(void) { return m_size; };
void SetCurrentSise(double x=-1, double y=-1) { m_size.x = x; m_size.y = y; };
coord GetCurrentSize(void) { return m_size; };
virtual void SetExpendX(bool newExpend=false) { m_userExpendX = newExpend; };
bool CanExpentX(void) { return m_userExpendX; };
virtual void SetExpendY(bool newExpend=false) { m_userExpendY = newExpend; };
bool CanExpentY(void) { return m_userExpendY; };
// ----------------------------------------------------------------------------------------------------------------
// -- 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:
void EventAreaRemoveAll(void) { m_inputEvent.Clear(); };
bool AddEventArea(coord origin, coord size, uint64_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, double x, double y) { return false; };
// when an event arrive from an other widget, it will arrive here:
virtual bool OnEventAreaExternal(int32_t widgetID, const char * generateEventId, double x, double y) { 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:
bool m_genericDraw;
bool m_specificDraw;
etk::VectorType<ewol::OObject*> m_listOObject; //!< generic element to display...
bool GenericDraw(void);
protected:
void AddOObject(ewol::OObject* newObject, etk::String name = "");
ewol::OObject* GetOObject(etk::String name);
void RmOObjectElem(etk::String name);
void ClearOObjectList(void);
void GenericDrawDisable(void) { m_genericDraw = false; };
void GenericDrawEnable(void) { m_genericDraw = true; };
void SpecificDrawDisable(void) { m_specificDraw = false; };
void SpecificDrawEnable(void) { m_specificDraw = true; };
virtual bool OnDraw(void) { /*EWOL_ERROR("plop");*/ return true; };
public:
virtual void OnRegenerateDisplay(void) { };
bool GenDraw(void)
{
if (true == m_genericDraw) {
//EWOL_DEBUG("Draw generic...");
GenericDraw();
}
if (true == m_specificDraw) {
//EWOL_DEBUG("Draw Custum...");
OnDraw();
}
return true;
};
}; // end of the class Widget declaration
};// end of nameSpace
#endif

View File

@ -1,222 +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 <ewolTexture.h>
#include <ewolFont.h>
#include <ewol.h>
#include <GL/gl.h>
#undef __class__
#define __class__ "ewol::Windows"
//list of local events :
const char * ewolEventWindowsClose = "ewol Windows close";
const char * ewolEventWindowsMinimize = "ewol Windows minimize";
const char * ewolEventWindowsExpend = "ewol Windows expend/unExpend";
ewol::Windows::Windows(void)
{
m_subWidget = NULL;
// enable specific drawing system ...
SpecificDrawEnable();
SetDecorationDisable();
if (true == m_hasDecoration) {
ewol::OObject2DColored * myOObject = new ewol::OObject2DColored();
myOObject->Rectangle( 0, 0, 20, 20, 1.0, 0.0, 0.0, 1.0); // Close
myOObject->Rectangle(20, 0, 20, 20, 0.0, 1.0, 0.0, 1.0); // Reduce
myOObject->Rectangle(40, 0, 20, 20, 0.0, 0.0, 1.0, 1.0); // Expend - Un-expend
coord origin;
coord size;
origin.x = 0.0;
origin.y = 0.0;
size.x = 20;
size.y = 20;
AddEventArea(origin, size, FLAG_EVENT_INPUT_1 | FLAG_EVENT_INPUT_CLICKED_ALL, ewolEventWindowsClose);
origin.x = 20.0;
AddEventArea(origin, size, FLAG_EVENT_INPUT_1 | FLAG_EVENT_INPUT_CLICKED_ALL, ewolEventWindowsMinimize);
origin.x = 40.0;
AddEventArea(origin, size, FLAG_EVENT_INPUT_1 | FLAG_EVENT_INPUT_CLICKED_ALL, ewolEventWindowsExpend);
AddOObject(myOObject, "leftBoutton");
color_ts textColorFg;
textColorFg.red = .0;
textColorFg.green = .0;
textColorFg.blue = .0;
textColorFg.alpha = 1.0;
ewol::OObject2DText * myOObjectText = new ewol::OObject2DText(62, 2, "Monospace", 17 , FONT_MODE_BOLD, textColorFg, "My Title ...");
AddOObject(myOObjectText, "Title");
}
}
ewol::Windows::~Windows(void)
{
if (NULL != m_subWidget) {
delete(m_subWidget);
m_subWidget=NULL;
}
}
bool ewol::Windows::CalculateSize(double availlableX, double availlableY)
{
m_size.x = availlableX;
m_size.y = availlableY;
if (NULL != m_subWidget) {
m_subWidget->CalculateMinSize();
// TODO : Check if min Size is possible ...
// TODO : Herited from MinSize .. and expand ???
m_subWidget->CalculateSize(m_size.x, m_size.y);
}
// regenerate all the display ...
OnRegenerateDisplay();
return true;
}
bool ewol::Windows::OnEventInput(int32_t IdInput, eventInputType_te typeEvent, double x, double y)
{
if (true == m_hasDecoration) {
if( x >= 60
&& y <=20)
{
if(EVENT_INPUT_TYPE_MOVE == typeEvent && true == ewol::IsPressedInput(1) ) {
ewol::StartMoveSystem();
}
}
if( x >= m_size.x - 20
&& y >= m_size.y - 20)
{
if(EVENT_INPUT_TYPE_MOVE == typeEvent && true == ewol::IsPressedInput(1) ) {
ewol::StartResizeSystem();
}
}
}
if (NULL != m_subWidget) {
m_subWidget->GenEventInput(IdInput, typeEvent, x, y);
}
return true;
}
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>
#include <GL/glut.h>
#if defined(EWOL_X11_MODE__XF86V)
# include <X11/extensions/xf86vmode.h>
#elif defined(EWOL_X11_MODE__XRENDER)
# include <X11/extensions/Xrender.h>
#endif
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);
GenDraw();
glDisable(GL_BLEND);
return;
}
void ewol::Windows::OnRegenerateDisplay(void)
{
if (NULL != m_subWidget) {
m_subWidget->OnRegenerateDisplay();
}
}
bool ewol::Windows::OnDraw(void)
{
if (NULL != m_subWidget) {
m_subWidget->GenDraw();
}
return true;
}
bool ewol::Windows::OnEventArea(const char * generateEventId, double x, double y)
{
bool eventIsOK = false;
//EWOL_DEBUG("Receive event : \"" << generateEventId << "\"");
if(ewolEventWindowsClose == generateEventId) {
EWOL_INFO("Request close of the windows");
ewol::Stop();
eventIsOK = true;
} else if(ewolEventWindowsMinimize == generateEventId) {
EWOL_INFO("Request Minimize of the windows");
eventIsOK = true;
} else if(ewolEventWindowsExpend == generateEventId) {
EWOL_INFO("Request Expend of the windows");
eventIsOK = true;
}
return eventIsOK;
}
void ewol::Windows::SetSubWidget(ewol::Widget * widget)
{
if (NULL != m_subWidget) {
EWOL_INFO("Remove current main windows Widget...");
delete(m_subWidget);
m_subWidget = NULL;
}
m_subWidget = widget;
// Regenerate the size calculation :
CalculateSize(m_size.x, m_size.y);
}

View File

@ -1,83 +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);
virtual bool OnEventArea(const char * generateEventId, double x, double y);
// Widget overwrite function
public:
virtual bool OnEventInput(int32_t IdInput, eventInputType_te typeEvent, double x, double y);
private:
bool m_hasDecoration;
public:
void SetDecorationDisable(void)
{
m_hasDecoration = false;
}
void SetDecorationEnable(void)
{
m_hasDecoration = true;
}
private:
ewol::Widget * m_subWidget;
public:
void SetSubWidget(ewol::Widget * widget);
protected:
virtual bool OnDraw(void);
public:
virtual void OnRegenerateDisplay(void);
};
};
#endif

View File

@ -1,137 +0,0 @@
/**
*******************************************************************************
* @file ewolButton.cpp
* @brief ewol Button widget system (Sources)
* @author Edouard DUPIN
* @date 07/11/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 <widget/ewolButton.h>
#include <ewolOObject.h>
const char * ewolEventButtonPressed = "ewol Button Pressed";
#undef __class__
#define __class__ "ewol::Button"
ewol::Button::Button(void)
{
m_label = "No Label";
}
ewol::Button::Button(etk::String newLabel)
{
m_label = newLabel;
}
ewol::Button::~Button(void)
{
}
bool ewol::Button::CalculateMinSize(void)
{
//SetMinSise(55, 24);
int32_t fontId = GetDefaultFontId();
int32_t minWidth = ewol::GetWidth(fontId, m_label.c_str());
int32_t minHeight = ewol::GetHeight(fontId);
m_minSize.x = 10+minWidth;
m_minSize.y = 10+minHeight;
return true;
}
void ewol::Button::SetLabel(etk::String newLabel)
{
m_label = newLabel;
}
void ewol::Button::SetValue(bool val)
{
}
bool ewol::Button::GetValue(void)
{
return false;
}
void ewol::Button::OnRegenerateDisplay(void)
{
// clean the object list ...
ClearOObjectList();
ewol::OObject2DColored * tmpOObjects = new ewol::OObject2DColored;
tmpOObjects->Rectangle( 2, 2, m_size.x-4, m_size.y-4, 0.0, 0.0, 0.0, 1.0);
tmpOObjects->Rectangle( 3, 3, m_size.x-6, m_size.y-6, 1.0, 1.0, 1.0, 1.0);
AddOObject(tmpOObjects, "BouttonDecoration");
color_ts textColorFg;
textColorFg.red = 0.0;
textColorFg.green = 0.0;
textColorFg.blue = 0.0;
textColorFg.alpha = 1.0;
int32_t fontId = GetDefaultFontId();
int32_t fontHeight = ewol::GetHeight(fontId);
int32_t fontWidth = ewol::GetWidth(fontId, m_label.c_str());
int32_t posy = (m_size.y - fontHeight - 6)/2 + 3;
int32_t posx = (m_size.x - fontWidth - 6)/2 + 3;
ewol::OObject2DText * tmpText = new ewol::OObject2DText(posx, posy, "", -1, FONT_MODE_BOLD, textColorFg, m_label.c_str());
AddOObject(tmpText, "BouttonText");
// Regenerate the event Area:
EventAreaRemoveAll();
coord origin;
coord size;
origin.x = 3.0;
origin.y = 3.0;
size.x = m_size.x-6;
size.y = m_size.y-6;
AddEventArea(origin, size, FLAG_EVENT_INPUT_1 | FLAG_EVENT_INPUT_CLICKED_ALL, ewolEventButtonPressed);
}
/*
bool ewol::Button::OnEventInput(int32_t IdInput, eventInputType_te typeEvent, double x, double y)
{
EWOL_DEBUG("Event on BT ...");
return true;
}
*/
bool ewol::Button::OnEventArea(const char * generateEventId, double x, double y)
{
bool eventIsOK = false;
//EWOL_DEBUG("Receive event : \"" << generateEventId << "\"");
if(ewolEventButtonPressed == generateEventId) {
EWOL_INFO("BT pressed ... " << m_label);
eventIsOK = true;
}
return eventIsOK;
}

View File

@ -1,57 +0,0 @@
/**
*******************************************************************************
* @file ewolButton.h
* @brief ewol Button widget system (header)
* @author Edouard DUPIN
* @date 07/11/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_BUTTON_H__
#define __EWOL_BUTTON_H__
#include <etkTypes.h>
#include <ewolDebug.h>
#include <ewolWidget.h>
namespace ewol {
class Button :public ewol::Widget
{
public:
Button(void);
Button(etk::String newLabel);
virtual ~Button(void);
virtual bool CalculateMinSize(void);
void SetLabel(etk::String newLabel);
// TODO :
//void SetSize(int32_t size);
//void SetFont(etk::String fontName);
//void ResetDefaultParameters(void);
void SetValue(bool val);
bool GetValue(void);
private:
etk::String m_label;
public:
virtual void OnRegenerateDisplay(void);
public:
//virtual bool OnEventInput(int32_t IdInput, eventInputType_te typeEvent, double x, double y);
virtual bool OnEventArea(const char * generateEventId, double x, double y);
};
};
#endif

View File

@ -1,29 +0,0 @@
/**
*******************************************************************************
* @file ewolCheckBox.cpp
* @brief ewol check-box widget system (Sources)
* @author Edouard DUPIN
* @date 07/11/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 <widget/ewolCheckBox.h>
#undef __class__
#define __class__ "ewol::CheckBox"

View File

@ -1,41 +0,0 @@
/**
*******************************************************************************
* @file ewolCheckBox.h
* @brief ewol check-box widget system (header)
* @author Edouard DUPIN
* @date 07/11/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_CHECK_BOX_H__
#define __EWOL_CHECK_BOX_H__
#include <etkTypes.h>
#include <ewolDebug.h>
#include <ewolWidget.h>
namespace ewol {
class CheckBox :public ewol::Widget
{
public:
CheckBox(void) { };
virtual ~CheckBox(void) { };
};
};
#endif

View File

@ -1,29 +0,0 @@
/**
*******************************************************************************
* @file ewolEntry.cpp
* @brief ewol entry widget system (Sources)
* @author Edouard DUPIN
* @date 07/11/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 <widget/ewolEntry.h>
#undef __class__
#define __class__ "ewol::Entry"

View File

@ -1,41 +0,0 @@
/**
*******************************************************************************
* @file ewolEntry.h
* @brief ewol entry widget system (header)
* @author Edouard DUPIN
* @date 07/11/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_ENTRY_H__
#define __EWOL_ENTRY_H__
#include <etkTypes.h>
#include <ewolDebug.h>
#include <ewolWidget.h>
namespace ewol {
class Entry :public ewol::Widget
{
public:
Entry(void) { };
virtual ~Entry(void) { };
};
};
#endif

View File

@ -1,30 +0,0 @@
/**
*******************************************************************************
* @file ewolList.cpp
* @brief ewol list widget system (Sources)
* @author Edouard DUPIN
* @date 07/11/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 <widget/ewolList.h>
#undef __class__
#define __class__ "ewol::List"

View File

@ -1,41 +0,0 @@
/**
*******************************************************************************
* @file ewolList.h
* @brief ewol list widget system (header)
* @author Edouard DUPIN
* @date 07/11/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_LIST_H__
#define __EWOL_LIST_H__
#include <etkTypes.h>
#include <ewolDebug.h>
#include <ewolWidget.h>
namespace ewol {
class List :public ewol::Widget
{
public:
List(void) { };
virtual ~List(void) { };
};
};
#endif

View File

@ -1,232 +0,0 @@
/**
*******************************************************************************
* @file ewolSizerHori.cpp
* @brief ewol hirisantal sizer widget system (Sources)
* @author Edouard DUPIN
* @date 07/11/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 <widget/ewolSizerHori.h>
#undef __class__
#define __class__ "ewol::SizerHori"
ewol::SizerHori::SizerHori(void)
{
GenericDrawDisable();
SpecificDrawEnable();
}
ewol::SizerHori::~SizerHori(void)
{
SubWidgetRemoveAll();
}
bool ewol::SizerHori::CalculateSize(double availlableX, double availlableY)
{
EWOL_DEBUG("Update Size");
m_size.x = availlableX;
m_size.y = availlableY;
// calculate unExpendable Size :
double unexpendableSize=0.0;
int32_t nbWidgetFixedSize=0;
int32_t nbWidgetNotFixedSize=0;
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
coord tmpSize = m_subWidget[iii]->GetMinSize();
unexpendableSize += tmpSize.x;
if (false == m_subWidget[iii]->CanExpentX()) {
nbWidgetFixedSize++;
} else {
nbWidgetNotFixedSize++;
}
}
}
double sizeToAddAtEveryOne = 0;
// 2 cases : 1 or more can Expend, or all is done ...
if (0 != nbWidgetNotFixedSize) {
sizeToAddAtEveryOne = (m_size.x - unexpendableSize) / nbWidgetNotFixedSize;
if (sizeToAddAtEveryOne<0.0) {
sizeToAddAtEveryOne=0;
}
}
coord tmpOrigin;
tmpOrigin.x = m_origin.x;
tmpOrigin.y = m_origin.y;
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
coord tmpSize = m_subWidget[iii]->GetMinSize();
// Set the origin :
EWOL_DEBUG("Set ORIGIN : " << tmpOrigin.x << "," << tmpOrigin.y << ")");
m_subWidget[iii]->SetOrigin(tmpOrigin.x, tmpOrigin.y);
// Now Update his Size his size in X and the curent sizer size in Y:
if (true == m_subWidget[iii]->CanExpentX()) {
m_subWidget[iii]->CalculateSize(tmpSize.x+sizeToAddAtEveryOne, m_size.y);
tmpOrigin.x += tmpSize.x+sizeToAddAtEveryOne;
} else {
m_subWidget[iii]->CalculateSize(tmpSize.x, m_size.y);
tmpOrigin.x += tmpSize.x;
}
}
}
return true;
}
bool ewol::SizerHori::CalculateMinSize(void)
{
EWOL_DEBUG("Update minimum Size");
m_userExpendX=false;
m_userExpendY=false;
m_minSize.x = 0.0;
m_minSize.y = 0.0;
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
m_subWidget[iii]->CalculateMinSize();
if (true == m_subWidget[iii]->CanExpentX()) {
m_userExpendX = true;
}
if (true == m_subWidget[iii]->CanExpentY()) {
m_userExpendY = true;
}
coord tmpSize = m_subWidget[iii]->GetMinSize();
m_minSize.x += tmpSize.x;
if (tmpSize.y>m_minSize.y) {
m_minSize.y = tmpSize.y;
}
}
}
EWOL_DEBUG("Result : expend X="<< m_userExpendX << " Y=" << m_userExpendY);
EWOL_DEBUG(" minSize ("<< m_minSize.x << "," << m_minSize.y << ")");
return true;
}
void ewol::SizerHori::SetMinSise(double x, double y)
{
EWOL_ERROR("Sizer can not have a user Minimum size (herited from under elements)");
}
void ewol::SizerHori::SetExpendX(bool newExpend)
{
EWOL_ERROR("Sizer can not have a user expend settings X (herited from under elements)");
}
void ewol::SizerHori::SetExpendY(bool newExpend)
{
EWOL_ERROR("Sizer can not have a user expend settings Y (herited from under elements)");
}
//etk::VectorType<ewol::Widget*> m_SubWidget;
void ewol::SizerHori::SubWidgetRemoveAll(void)
{
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
delete(m_subWidget[iii]);
m_subWidget[iii] = NULL;
}
}
m_subWidget.Clear();
}
void ewol::SizerHori::SubWidgetAdd(ewol::Widget* newWidget)
{
if (NULL == newWidget) {
return;
}
m_subWidget.PushBack(newWidget);
newWidget->SetParrent(this);
}
void ewol::SizerHori::SubWidgetRemove(ewol::Widget* newWidget)
{
if (NULL == newWidget) {
return;
}
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (newWidget == m_subWidget[iii]) {
if (NULL != m_subWidget[iii]) {
delete(m_subWidget[iii]);
m_subWidget[iii] = NULL;
}
m_subWidget.Erase(iii);
return;
}
}
}
void ewol::SizerHori::SubWidgetUnLink(ewol::Widget* newWidget)
{
if (NULL == newWidget) {
return;
}
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (newWidget == m_subWidget[iii]) {
m_subWidget[iii] = NULL;
m_subWidget.Erase(iii);
return;
}
}
}
bool ewol::SizerHori::OnDraw(void)
{
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
m_subWidget[iii]->GenDraw();
}
}
return true;
}
void ewol::SizerHori::OnRegenerateDisplay(void)
{
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
m_subWidget[iii]->OnRegenerateDisplay();
}
}
}
bool ewol::SizerHori::OnEventInput(int32_t IdInput, eventInputType_te typeEvent, double x, double y)
{
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
coord tmpSize = m_subWidget[iii]->GetSize();
coord tmpOrigin = m_subWidget[iii]->GetOrigin();
if( (tmpOrigin.x <= x && tmpOrigin.x + tmpSize.x >= x)
&& (tmpOrigin.y <= y && tmpOrigin.y + tmpSize.y >= y) )
{
return m_subWidget[iii]->GenEventInput(IdInput, typeEvent, x, y);
}
}
}
return true;
}

View File

@ -1,60 +0,0 @@
/**
*******************************************************************************
* @file ewolSizerHori.h
* @brief ewol hirisantal sizer widget system (header)
* @author Edouard DUPIN
* @date 07/11/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_SIZER_HORI_H__
#define __EWOL_SIZER_HORI_H__
#include <etkTypes.h>
#include <ewolDebug.h>
#include <ewolWidget.h>
namespace ewol {
class SizerHori :public ewol::Widget
{
public:
SizerHori(void);
virtual ~SizerHori(void);
public:
virtual bool CalculateSize(double availlableX, double availlableY); // this generate the current size ...
virtual bool CalculateMinSize(void); //update the min Size ... and the expend parameters for the sizer
virtual void SetMinSise(double x=-1, double y=-1);
virtual void SetExpendX(bool newExpend=false);
virtual void SetExpendY(bool newExpend=false);
private:
etk::VectorType<ewol::Widget*> m_subWidget;
public:
void SubWidgetRemoveAll(void);
void SubWidgetAdd(ewol::Widget* newWidget);
void SubWidgetRemove(ewol::Widget* newWidget);
void SubWidgetUnLink(ewol::Widget* newWidget);
protected:
virtual bool OnDraw(void);
public:
virtual void OnRegenerateDisplay(void);
public:
virtual bool OnEventInput(int32_t IdInput, eventInputType_te typeEvent, double x, double y);
};
};
#endif

View File

@ -1,230 +0,0 @@
/**
*******************************************************************************
* @file ewolSizerVert.cpp
* @brief ewol vertical sizer widget system (Sources)
* @author Edouard DUPIN
* @date 07/11/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 <widget/ewolSizerVert.h>
#undef __class__
#define __class__ "ewol::SizerVert"
ewol::SizerVert::SizerVert(void)
{
GenericDrawDisable();
SpecificDrawEnable();
}
ewol::SizerVert::~SizerVert(void)
{
SubWidgetRemoveAll();
}
bool ewol::SizerVert::CalculateSize(double availlableX, double availlableY)
{
EWOL_DEBUG("Update Size");
m_size.x = availlableX;
m_size.y = availlableY;
// calculate unExpendable Size :
double unexpendableSize=0.0;
int32_t nbWidgetFixedSize=0;
int32_t nbWidgetNotFixedSize=0;
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
coord tmpSize = m_subWidget[iii]->GetMinSize();
unexpendableSize += tmpSize.y;
if (false == m_subWidget[iii]->CanExpentY()) {
nbWidgetFixedSize++;
} else {
nbWidgetNotFixedSize++;
}
}
}
// 2 cases : 1 or more can Expend, or all is done ...
double sizeToAddAtEveryOne = 0;
// 2 cases : 1 or more can Expend, or all is done ...
if (0 != nbWidgetNotFixedSize) {
sizeToAddAtEveryOne = (m_size.y - unexpendableSize) / nbWidgetNotFixedSize;
if (sizeToAddAtEveryOne<0.0) {
sizeToAddAtEveryOne=0;
}
}
coord tmpOrigin;
tmpOrigin.x = m_origin.x;
tmpOrigin.y = m_origin.y;
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
coord tmpSize = m_subWidget[iii]->GetMinSize();
// Set the origin :
EWOL_DEBUG("Set ORIGIN : " << tmpOrigin.x << "," << tmpOrigin.y << ")");
m_subWidget[iii]->SetOrigin(tmpOrigin.x, tmpOrigin.y);
// Now Update his Size his size in X and the curent sizer size in Y:
if (true == m_subWidget[iii]->CanExpentY()) {
m_subWidget[iii]->CalculateSize(m_size.x, tmpSize.y+sizeToAddAtEveryOne);
tmpOrigin.y += tmpSize.y+sizeToAddAtEveryOne;
} else {
m_subWidget[iii]->CalculateSize(m_size.x, tmpSize.y);
tmpOrigin.y += tmpSize.y;
}
}
}
return true;
}
bool ewol::SizerVert::CalculateMinSize(void)
{
EWOL_DEBUG("Update minimum Size");
m_userExpendX=false;
m_userExpendY=false;
m_minSize.x = 0.0;
m_minSize.y = 0.0;
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
m_subWidget[iii]->CalculateMinSize();
if (true == m_subWidget[iii]->CanExpentX()) {
m_userExpendX = true;
}
if (true == m_subWidget[iii]->CanExpentY()) {
m_userExpendY = true;
}
coord tmpSize = m_subWidget[iii]->GetMinSize();
m_minSize.y += tmpSize.y;
if (tmpSize.x>m_minSize.x) {
m_minSize.x = tmpSize.x;
}
}
}
EWOL_DEBUG("Result : expend X="<< m_userExpendX << " Y=" << m_userExpendY);
EWOL_DEBUG(" minSize ("<< m_minSize.x << "," << m_minSize.y << ")");
return true;
}
void ewol::SizerVert::SetMinSise(double x, double y)
{
EWOL_ERROR("Sizer can not have a user Minimum size (herited from under elements)");
}
void ewol::SizerVert::SetExpendX(bool newExpend)
{
EWOL_ERROR("Sizer can not have a user expend settings X (herited from under elements)");
}
void ewol::SizerVert::SetExpendY(bool newExpend)
{
EWOL_ERROR("Sizer can not have a user expend settings Y (herited from under elements)");
}
//etk::VectorType<ewol::Widget*> m_SubWidget;
void ewol::SizerVert::SubWidgetRemoveAll(void)
{
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
delete(m_subWidget[iii]);
m_subWidget[iii] = NULL;
}
m_subWidget.Clear();
}
void ewol::SizerVert::SubWidgetAdd(ewol::Widget* newWidget)
{
if (NULL == newWidget) {
return;
}
m_subWidget.PushBack(newWidget);
newWidget->SetParrent(this);
}
void ewol::SizerVert::SubWidgetRemove(ewol::Widget* newWidget)
{
if (NULL == newWidget) {
return;
}
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (newWidget == m_subWidget[iii]) {
delete(m_subWidget[iii]);
m_subWidget[iii] = NULL;
m_subWidget.Erase(iii);
return;
}
}
}
void ewol::SizerVert::SubWidgetUnLink(ewol::Widget* newWidget)
{
if (NULL == newWidget) {
return;
}
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (newWidget == m_subWidget[iii]) {
m_subWidget[iii] = NULL;
m_subWidget.Erase(iii);
return;
}
}
}
bool ewol::SizerVert::OnDraw(void)
{
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
m_subWidget[iii]->GenDraw();
}
}
return true;
}
void ewol::SizerVert::OnRegenerateDisplay(void)
{
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
m_subWidget[iii]->OnRegenerateDisplay();
}
}
}
bool ewol::SizerVert::OnEventInput(int32_t IdInput, eventInputType_te typeEvent, double x, double y)
{
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
if (NULL != m_subWidget[iii]) {
coord tmpSize = m_subWidget[iii]->GetSize();
coord tmpOrigin = m_subWidget[iii]->GetOrigin();
if( (tmpOrigin.x <= x && tmpOrigin.x + tmpSize.x >= x)
&& (tmpOrigin.y <= y && tmpOrigin.y + tmpSize.y >= y) )
{
return m_subWidget[iii]->GenEventInput(IdInput, typeEvent, x, y);
}
}
}
return true;
}

View File

@ -1,60 +0,0 @@
/**
*******************************************************************************
* @file ewolSizerVert.h
* @brief ewol vertical sizer widget system (header)
* @author Edouard DUPIN
* @date 07/11/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_SIZER_VERT_H__
#define __EWOL_SIZER_VERT_H__
#include <etkTypes.h>
#include <ewolDebug.h>
#include <ewolWidget.h>
namespace ewol {
class SizerVert :public ewol::Widget
{
public:
SizerVert(void);
virtual ~SizerVert(void);
public:
virtual bool CalculateSize(double availlableX, double availlableY); // this generate the current size ...
virtual bool CalculateMinSize(void); //update the min Size ... and the expend parameters for the sizer
virtual void SetMinSise(double x=-1, double y=-1);
virtual void SetExpendX(bool newExpend=false);
virtual void SetExpendY(bool newExpend=false);
private:
etk::VectorType<ewol::Widget*> m_subWidget;
public:
void SubWidgetRemoveAll(void);
void SubWidgetAdd(ewol::Widget* newWidget);
void SubWidgetRemove(ewol::Widget* newWidget);
void SubWidgetUnLink(ewol::Widget* newWidget);
protected:
virtual bool OnDraw(void);
public:
virtual void OnRegenerateDisplay(void);
public:
virtual bool OnEventInput(int32_t IdInput, eventInputType_te typeEvent, double x, double y);
};
};
#endif

1
authors.txt Normal file
View File

@ -0,0 +1 @@
MR Edouard DUPIN <yui.heero@gmail.com>

10
data/color.frag Normal file
View 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
View File

@ -0,0 +1,2 @@
color.vert
color.frag

18
data/color.vert Normal file
View 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
View 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
View File

@ -0,0 +1,2 @@
color3.vert
color3.frag

18
data/color3.vert Normal file
View 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;
}

View 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>

View 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));
*/
}

View File

@ -0,0 +1,2 @@
font1.vert
font1.frag

View 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;
}
*/

View 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
View 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
View 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
View File

@ -0,0 +1,2 @@
simple3D.vert
simple3D.frag

18
data/simple3D.vert Normal file
View 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
View 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
View File

@ -0,0 +1,2 @@
text.vert
text.frag

47
data/text.vert Normal file
View 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
View 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
View File

@ -0,0 +1,2 @@
textured.vert
textured.frag

22
data/textured.vert Normal file
View 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
View 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
View File

@ -0,0 +1,2 @@
textured3D.vert
textured3D.frag

21
data/textured3D.vert Normal file
View 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
View 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
View File

@ -0,0 +1,2 @@
textured3D2.vert
textured3D2.frag

25
data/textured3D2.vert Normal file
View 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) );
}

Some files were not shown because too many files have changed in this diff Show More