summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVyacheslav Reutskiy <rimmed@yandex.ru>2014-07-18 23:43:37 +0300
committerVyacheslav Reutskiy <rimmed@yandex.ru>2014-07-18 23:43:37 +0300
commita50a532af50872562512461c161e96167f0d8071 (patch)
treecca9fb708cee7ea10bf1aca4b6dbfc542e4e3592
parent59fc6e94253f954f0b4d7a654200bdacb561ae7b (diff)
parentfcaffb05621f05898789fb71d1487ce1bfd8cd20 (diff)
Merge branch 'develop'0.1.3
-rw-r--r--COPYING496
-rw-r--r--NEWS10
-rw-r--r--configure.ac4
-rw-r--r--data/themes/widgets/combobox.edc146
-rw-r--r--data/themes/widgets/ruler.edc188
-rw-r--r--examples/combobox_example.c35
-rw-r--r--examples/ruler_example.c198
-rw-r--r--examples/ruler_example.edc26
-rw-r--r--src/bin/test.c13
-rw-r--r--src/lib/Ewe.h24
-rw-r--r--src/lib/Makefile.am15
-rw-r--r--src/lib/ewe_combobox.c31
-rw-r--r--src/lib/ewe_combobox.eo14
-rw-r--r--src/lib/ewe_combobox.h11
-rw-r--r--src/lib/ewe_combobox_common.h12
-rw-r--r--src/lib/ewe_combobox_eo.h11
-rw-r--r--src/lib/ewe_combobox_legacy.h14
-rw-r--r--src/lib/ewe_main.c (renamed from src/lib/ewe.c)13
-rw-r--r--src/lib/ewe_main.h (renamed from src/lib/ewe.h)17
-rw-r--r--src/lib/ewe_private.h11
-rw-r--r--src/lib/ewe_ruler.c777
-rw-r--r--src/lib/ewe_ruler.eo184
-rw-r--r--src/lib/ewe_ruler.h11
-rw-r--r--src/lib/ewe_ruler_common.h24
-rw-r--r--src/lib/ewe_ruler_eo.h11
-rw-r--r--src/lib/ewe_ruler_legacy.h192
-rw-r--r--src/lib/ewe_statusbar.c11
-rw-r--r--src/lib/ewe_statusbar.h11
-rw-r--r--src/lib/ewe_statusbar_common.h11
-rw-r--r--src/lib/ewe_statusbar_eo.h11
-rw-r--r--src/lib/ewe_statusbar_legacy.h11
-rw-r--r--src/lib/ewe_tabs.c11
-rw-r--r--src/lib/ewe_tabs.h11
-rw-r--r--src/lib/ewe_tabs_common.h11
-rw-r--r--src/lib/ewe_tabs_eo.h11
-rw-r--r--src/lib/ewe_tabs_legacy.h11
-rw-r--r--src/lib/ewe_widget_combobox.h11
-rw-r--r--src/lib/ewe_widget_entry.h2
-rw-r--r--src/lib/ewe_widget_ruler.h18
-rw-r--r--src/lib/ewe_widget_statusbar.h11
-rw-r--r--src/lib/ewe_widget_tabs.h11
-rw-r--r--src/lib/ewe_win.c18
-rw-r--r--src/lib/ewe_win.eo4
-rw-r--r--src/lib/ewe_win.h41
-rw-r--r--src/lib/ewe_win_common.h18
-rw-r--r--src/lib/ewe_win_legacy.h61
-rw-r--r--src/lib/logger/logger.c41
-rw-r--r--src/lib/logger/logger.h31
-rw-r--r--tests/Makefile.am14
-rw-r--r--tests/test_ewe_combobox/ewe_combobox_add.c11
-rw-r--r--tests/test_ewe_combobox/ewe_combobox_item_add.c11
-rw-r--r--tests/test_ewe_combobox/ewe_combobox_item_del.c11
-rw-r--r--tests/test_ewe_combobox/ewe_combobox_item_title_get.c11
-rw-r--r--tests/test_ewe_combobox/ewe_combobox_item_title_set.c11
-rw-r--r--tests/test_ewe_combobox/ewe_combobox_items_list_get.c11
-rw-r--r--tests/test_ewe_combobox/ewe_combobox_select_item_get.c11
-rw-r--r--tests/test_ewe_combobox/ewe_combobox_select_item_set.c11
-rw-r--r--tests/test_ewe_combobox/test_ewe_combobox.c11
-rw-r--r--tests/test_ewe_combobox/test_ewe_combobox.h13
-rw-r--r--tests/test_ewe_entry/ewe_entry_add.c11
-rw-r--r--tests/test_ewe_entry/ewe_entry_regex_autocheck.c11
-rw-r--r--tests/test_ewe_entry/ewe_entry_regex_check.c11
-rw-r--r--tests/test_ewe_entry/ewe_entry_regex_error_get.c11
-rw-r--r--tests/test_ewe_entry/ewe_entry_regex_glow.c11
-rw-r--r--tests/test_ewe_entry/ewe_entry_regex_set.c11
-rw-r--r--tests/test_ewe_entry/ewe_entry_regex_unset.c11
-rw-r--r--tests/test_ewe_entry/test_ewe_entry.c11
-rw-r--r--tests/test_ewe_entry/test_ewe_entry.h13
-rw-r--r--tests/test_ewe_init/ewe_init.c11
-rw-r--r--tests/test_ewe_init/test_ewe_init.c11
-rw-r--r--tests/test_ewe_init/test_ewe_init.h13
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_add.c11
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_format_get.c106
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_format_set.c113
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_orient_get.c11
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_orient_set.c11
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_scale_add.c104
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_scale_del.c106
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_scale_middle_mark_get.c106
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_scale_middle_mark_set.c113
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_scale_visible_get.c106
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_scale_visible_set.c113
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_step_get.c15
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_step_set.c17
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_style_get.c106
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_style_set.c113
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_value_step_get.c106
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_value_step_set.c113
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_zero_offset_get.c15
-rw-r--r--tests/test_ewe_ruler/ewe_ruler_zero_offset_set.c17
-rw-r--r--tests/test_ewe_ruler/test_ewe_ruler.c35
-rw-r--r--tests/test_ewe_ruler/test_ewe_ruler.h37
-rw-r--r--tests/test_ewe_ruler/test_ewe_ruler_add.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_add.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_clear.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_append.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_content_get.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_content_set.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_content_unset.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_id_get.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_insert_after.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_insert_before.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_label_get.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_label_set.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_prepend.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_remove.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_statusbar_get.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_width_get.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_item_width_set.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_items_align_get.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_items_align_set.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_items_list_get.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_items_padding_get.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_items_padding_set.c11
-rw-r--r--tests/test_ewe_statusbar/ewe_statusbar_items_swap.c11
-rw-r--r--tests/test_ewe_statusbar/test_ewe_statusbar.c11
-rw-r--r--tests/test_ewe_statusbar/test_ewe_statusbar.h13
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_active_item_get.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_active_item_set.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_add.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_append.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_button_set.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_button_unset.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_content_get.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_content_set.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_content_unset.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_del.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_disabled_get.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_disabled_set.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_icon_set.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_icon_unset.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_prepend.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_title_get.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_item_title_set.c11
-rw-r--r--tests/test_ewe_tabs/ewe_tabs_items_list_get.c11
-rw-r--r--tests/test_ewe_tabs/test_ewe_tabs.c11
-rw-r--r--tests/test_ewe_tabs/test_ewe_tabs.h13
-rw-r--r--tests/utc_common.h11
138 files changed, 3568 insertions, 1543 deletions
diff --git a/COPYING b/COPYING
index d159169..65c5ca8 100644
--- a/COPYING
+++ b/COPYING
@@ -1,339 +1,165 @@
1 GNU GENERAL PUBLIC LICENSE 1 GNU LESSER GENERAL PUBLIC LICENSE
2 Version 2, June 1991 2 Version 3, 29 June 2007
3 3
4 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 4 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 Everyone is permitted to copy and distribute verbatim copies 5 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed. 6 of this license document, but changing it is not allowed.
8 7
9 Preamble 8
10 9 This version of the GNU Lesser General Public License incorporates
11 The licenses for most software are designed to take away your 10the terms and conditions of version 3 of the GNU General Public
12freedom to share and change it. By contrast, the GNU General Public 11License, supplemented by the additional permissions listed below.
13License is intended to guarantee your freedom to share and change free 12
14software--to make sure the software is free for all its users. This 13 0. Additional Definitions.
15General Public License applies to most of the Free Software 14
16Foundation's software and to any other program whose authors commit to 15 As used herein, "this License" refers to version 3 of the GNU Lesser
17using it. (Some other Free Software Foundation software is covered by 16General Public License, and the "GNU GPL" refers to version 3 of the GNU
18the GNU Lesser General Public License instead.) You can apply it to 17General Public License.
19your programs, too. 18
20 19 "The Library" refers to a covered work governed by this License,
21 When we speak of free software, we are referring to freedom, not 20other than an Application or a Combined Work as defined below.
22price. Our General Public Licenses are designed to make sure that you 21
23have the freedom to distribute copies of free software (and charge for 22 An "Application" is any work that makes use of an interface provided
24this service if you wish), that you receive source code or can get it 23by the Library, but which is not otherwise based on the Library.
25if you want it, that you can change the software or use pieces of it 24Defining a subclass of a class defined by the Library is deemed a mode
26in new free programs; and that you know you can do these things. 25of using an interface provided by the Library.
27 26
28 To protect your rights, we need to make restrictions that forbid 27 A "Combined Work" is a work produced by combining or linking an
29anyone to deny you these rights or to ask you to surrender the rights. 28Application with the Library. The particular version of the Library
30These restrictions translate to certain responsibilities for you if you 29with which the Combined Work was made is also called the "Linked
31distribute copies of the software, or if you modify it. 30Version".
32 31
33 For example, if you distribute copies of such a program, whether 32 The "Minimal Corresponding Source" for a Combined Work means the
34gratis or for a fee, you must give the recipients all the rights that 33Corresponding Source for the Combined Work, excluding any source code
35you have. You must make sure that they, too, receive or can get the 34for portions of the Combined Work that, considered in isolation, are
36source code. And you must show them these terms so they know their 35based on the Application, and not on the Linked Version.
37rights. 36
38 37 The "Corresponding Application Code" for a Combined Work means the
39 We protect your rights with two steps: (1) copyright the software, and 38object code and/or source code for the Application, including any data
40(2) offer you this license which gives you legal permission to copy, 39and utility programs needed for reproducing the Combined Work from the
41distribute and/or modify the software. 40Application, but excluding the System Libraries of the Combined Work.
42 41
43 Also, for each author's protection and ours, we want to make certain 42 1. Exception to Section 3 of the GNU GPL.
44that everyone understands that there is no warranty for this free 43
45software. If the software is modified by someone else and passed on, we 44 You may convey a covered work under sections 3 and 4 of this License
46want its recipients to know that what they have is not the original, so 45without being bound by section 3 of the GNU GPL.
47that any problems introduced by others will not reflect on the original 46
48authors' reputations. 47 2. Conveying Modified Versions.
49 48
50 Finally, any free program is threatened constantly by software 49 If you modify a copy of the Library, and, in your modifications, a
51patents. We wish to avoid the danger that redistributors of a free 50facility refers to a function or data to be supplied by an Application
52program will individually obtain patent licenses, in effect making the 51that uses the facility (other than as an argument passed when the
53program proprietary. To prevent this, we have made it clear that any 52facility is invoked), then you may convey a copy of the modified
54patent must be licensed for everyone's free use or not licensed at all. 53version:
55 54
56 The precise terms and conditions for copying, distribution and 55 a) under this License, provided that you make a good faith effort to
57modification follow. 56 ensure that, in the event an Application does not supply the
58 57 function or data, the facility still operates, and performs
59 GNU GENERAL PUBLIC LICENSE 58 whatever part of its purpose remains meaningful, or
60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 59
61 60 b) under the GNU GPL, with none of the additional permissions of
62 0. This License applies to any program or other work which contains 61 this License applicable to that copy.
63a notice placed by the copyright holder saying it may be distributed 62
64under the terms of this General Public License. The "Program", below, 63 3. Object Code Incorporating Material from Library Header Files.
65refers to any such program or work, and a "work based on the Program" 64
66means either the Program or any derivative work under copyright law: 65 The object code form of an Application may incorporate material from
67that is to say, a work containing the Program or a portion of it, 66a header file that is part of the Library. You may convey such object
68either verbatim or with modifications and/or translated into another 67code under terms of your choice, provided that, if the incorporated
69language. (Hereinafter, translation is included without limitation in 68material is not limited to numerical parameters, data structure
70the term "modification".) Each licensee is addressed as "you". 69layouts and accessors, or small macros, inline functions and templates
71 70(ten or fewer lines in length), you do both of the following:
72Activities other than copying, distribution and modification are not 71
73covered by this License; they are outside its scope. The act of 72 a) Give prominent notice with each copy of the object code that the
74running the Program is not restricted, and the output from the Program 73 Library is used in it and that the Library and its use are
75is covered only if its contents constitute a work based on the 74 covered by this License.
76Program (independent of having been made by running the Program). 75
77Whether that is true depends on what the Program does. 76 b) Accompany the object code with a copy of the GNU GPL and this license
78 77 document.
79 1. You may copy and distribute verbatim copies of the Program's 78
80source code as you receive it, in any medium, provided that you 79 4. Combined Works.
81conspicuously and appropriately publish on each copy an appropriate 80
82copyright notice and disclaimer of warranty; keep intact all the 81 You may convey a Combined Work under terms of your choice that,
83notices that refer to this License and to the absence of any warranty; 82taken together, effectively do not restrict modification of the
84and give any other recipients of the Program a copy of this License 83portions of the Library contained in the Combined Work and reverse
85along with the Program. 84engineering for debugging such modifications, if you also do each of
86 85the following:
87You may charge a fee for the physical act of transferring a copy, and 86
88you may at your option offer warranty protection in exchange for a fee. 87 a) Give prominent notice with each copy of the Combined Work that
89 88 the Library is used in it and that the Library and its use are
90 2. You may modify your copy or copies of the Program or any portion 89 covered by this License.
91of it, thus forming a work based on the Program, and copy and 90
92distribute such modifications or work under the terms of Section 1 91 b) Accompany the Combined Work with a copy of the GNU GPL and this license
93above, provided that you also meet all of these conditions: 92 document.
94 93
95 a) You must cause the modified files to carry prominent notices 94 c) For a Combined Work that displays copyright notices during
96 stating that you changed the files and the date of any change. 95 execution, include the copyright notice for the Library among
97 96 these notices, as well as a reference directing the user to the
98 b) You must cause any work that you distribute or publish, that in 97 copies of the GNU GPL and this license document.
99 whole or in part contains or is derived from the Program or any 98
100 part thereof, to be licensed as a whole at no charge to all third 99 d) Do one of the following:
101 parties under the terms of this License. 100
102 101 0) Convey the Minimal Corresponding Source under the terms of this
103 c) If the modified program normally reads commands interactively 102 License, and the Corresponding Application Code in a form
104 when run, you must cause it, when started running for such 103 suitable for, and under terms that permit, the user to
105 interactive use in the most ordinary way, to print or display an 104 recombine or relink the Application with a modified version of
106 announcement including an appropriate copyright notice and a 105 the Linked Version to produce a modified Combined Work, in the
107 notice that there is no warranty (or else, saying that you provide 106 manner specified by section 6 of the GNU GPL for conveying
108 a warranty) and that users may redistribute the program under 107 Corresponding Source.
109 these conditions, and telling the user how to view a copy of this 108
110 License. (Exception: if the Program itself is interactive but 109 1) Use a suitable shared library mechanism for linking with the
111 does not normally print such an announcement, your work based on 110 Library. A suitable mechanism is one that (a) uses at run time
112 the Program is not required to print an announcement.) 111 a copy of the Library already present on the user's computer
113 112 system, and (b) will operate properly with a modified version
114These requirements apply to the modified work as a whole. If 113 of the Library that is interface-compatible with the Linked
115identifiable sections of that work are not derived from the Program, 114 Version.
116and can be reasonably considered independent and separate works in 115
117themselves, then this License, and its terms, do not apply to those 116 e) Provide Installation Information, but only if you would otherwise
118sections when you distribute them as separate works. But when you 117 be required to provide such information under section 6 of the
119distribute the same sections as part of a whole which is a work based 118 GNU GPL, and only to the extent that such information is
120on the Program, the distribution of the whole must be on the terms of 119 necessary to install and execute a modified version of the
121this License, whose permissions for other licensees extend to the 120 Combined Work produced by recombining or relinking the
122entire whole, and thus to each and every part regardless of who wrote it. 121 Application with a modified version of the Linked Version. (If
123 122 you use option 4d0, the Installation Information must accompany
124Thus, it is not the intent of this section to claim rights or contest 123 the Minimal Corresponding Source and Corresponding Application
125your rights to work written entirely by you; rather, the intent is to 124 Code. If you use option 4d1, you must provide the Installation
126exercise the right to control the distribution of derivative or 125 Information in the manner specified by section 6 of the GNU GPL
127collective works based on the Program. 126 for conveying Corresponding Source.)
128 127
129In addition, mere aggregation of another work not based on the Program 128 5. Combined Libraries.
130with the Program (or with a work based on the Program) on a volume of 129
131a storage or distribution medium does not bring the other work under 130 You may place library facilities that are a work based on the
132the scope of this License. 131Library side by side in a single library together with other library
133 132facilities that are not Applications and are not covered by this
134 3. You may copy and distribute the Program (or a work based on it, 133License, and convey such a combined library under terms of your
135under Section 2) in object code or executable form under the terms of 134choice, if you do both of the following:
136Sections 1 and 2 above provided that you also do one of the following: 135
137 136 a) Accompany the combined library with a copy of the same work based
138 a) Accompany it with the complete corresponding machine-readable 137 on the Library, uncombined with any other library facilities,
139 source code, which must be distributed under the terms of Sections 138 conveyed under the terms of this License.
140 1 and 2 above on a medium customarily used for software interchange; or, 139
141 140 b) Give prominent notice with the combined library that part of it
142 b) Accompany it with a written offer, valid for at least three 141 is a work based on the Library, and explaining where to find the
143 years, to give any third party, for a charge no more than your 142 accompanying uncombined form of the same work.
144 cost of physically performing source distribution, a complete 143
145 machine-readable copy of the corresponding source code, to be 144 6. Revised Versions of the GNU Lesser General Public License.
146 distributed under the terms of Sections 1 and 2 above on a medium 145
147 customarily used for software interchange; or, 146 The Free Software Foundation may publish revised and/or new versions
148 147of the GNU Lesser General Public License from time to time. Such new
149 c) Accompany it with the information you received as to the offer 148versions will be similar in spirit to the present version, but may
150 to distribute corresponding source code. (This alternative is 149differ in detail to address new problems or concerns.
151 allowed only for noncommercial distribution and only if you 150
152 received the program in object code or executable form with such 151 Each version is given a distinguishing version number. If the
153 an offer, in accord with Subsection b above.) 152Library as you received it specifies that a certain numbered version
154 153of the GNU Lesser General Public License "or any later version"
155The source code for a work means the preferred form of the work for 154applies to it, you have the option of following the terms and
156making modifications to it. For an executable work, complete source 155conditions either of that published version or of any later version
157code means all the source code for all modules it contains, plus any 156published by the Free Software Foundation. If the Library as you
158associated interface definition files, plus the scripts used to 157received it does not specify a version number of the GNU Lesser
159control compilation and installation of the executable. However, as a 158General Public License, you may choose any version of the GNU Lesser
160special exception, the source code distributed need not include 159General Public License ever published by the Free Software Foundation.
161anything that is normally distributed (in either source or binary 160
162form) with the major components (compiler, kernel, and so on) of the 161 If the Library as you received it specifies that a proxy can decide
163operating system on which the executable runs, unless that component 162whether future versions of the GNU Lesser General Public License shall
164itself accompanies the executable. 163apply, that proxy's public statement of acceptance of any version is
165 164permanent authorization for you to choose that version for the
166If distribution of executable or object code is made by offering 165Library.
167access to copy from a designated place, then offering equivalent
168access to copy the source code from the same place counts as
169distribution of the source code, even though third parties are not
170compelled to copy the source along with the object code.
171
172 4. You may not copy, modify, sublicense, or distribute the Program
173except as expressly provided under this License. Any attempt
174otherwise to copy, modify, sublicense or distribute the Program is
175void, and will automatically terminate your rights under this License.
176However, parties who have received copies, or rights, from you under
177this License will not have their licenses terminated so long as such
178parties remain in full compliance.
179
180 5. You are not required to accept this License, since you have not
181signed it. However, nothing else grants you permission to modify or
182distribute the Program or its derivative works. These actions are
183prohibited by law if you do not accept this License. Therefore, by
184modifying or distributing the Program (or any work based on the
185Program), you indicate your acceptance of this License to do so, and
186all its terms and conditions for copying, distributing or modifying
187the Program or works based on it.
188
189 6. Each time you redistribute the Program (or any work based on the
190Program), the recipient automatically receives a license from the
191original licensor to copy, distribute or modify the Program subject to
192these terms and conditions. You may not impose any further
193restrictions on the recipients' exercise of the rights granted herein.
194You are not responsible for enforcing compliance by third parties to
195this License.
196
197 7. If, as a consequence of a court judgment or allegation of patent
198infringement or for any other reason (not limited to patent issues),
199conditions are imposed on you (whether by court order, agreement or
200otherwise) that contradict the conditions of this License, they do not
201excuse you from the conditions of this License. If you cannot
202distribute so as to satisfy simultaneously your obligations under this
203License and any other pertinent obligations, then as a consequence you
204may not distribute the Program at all. For example, if a patent
205license would not permit royalty-free redistribution of the Program by
206all those who receive copies directly or indirectly through you, then
207the only way you could satisfy both it and this License would be to
208refrain entirely from distribution of the Program.
209
210If any portion of this section is held invalid or unenforceable under
211any particular circumstance, the balance of the section is intended to
212apply and the section as a whole is intended to apply in other
213circumstances.
214
215It is not the purpose of this section to induce you to infringe any
216patents or other property right claims or to contest validity of any
217such claims; this section has the sole purpose of protecting the
218integrity of the free software distribution system, which is
219implemented by public license practices. Many people have made
220generous contributions to the wide range of software distributed
221through that system in reliance on consistent application of that
222system; it is up to the author/donor to decide if he or she is willing
223to distribute software through any other system and a licensee cannot
224impose that choice.
225
226This section is intended to make thoroughly clear what is believed to
227be a consequence of the rest of this License.
228
229 8. If the distribution and/or use of the Program is restricted in
230certain countries either by patents or by copyrighted interfaces, the
231original copyright holder who places the Program under this License
232may add an explicit geographical distribution limitation excluding
233those countries, so that distribution is permitted only in or among
234countries not thus excluded. In such case, this License incorporates
235the limitation as if written in the body of this License.
236
237 9. The Free Software Foundation may publish revised and/or new versions
238of the General Public License from time to time. Such new versions will
239be similar in spirit to the present version, but may differ in detail to
240address new problems or concerns.
241
242Each version is given a distinguishing version number. If the Program
243specifies a version number of this License which applies to it and "any
244later version", you have the option of following the terms and conditions
245either of that version or of any later version published by the Free
246Software Foundation. If the Program does not specify a version number of
247this License, you may choose any version ever published by the Free Software
248Foundation.
249
250 10. If you wish to incorporate parts of the Program into other free
251programs whose distribution conditions are different, write to the author
252to ask for permission. For software which is copyrighted by the Free
253Software Foundation, write to the Free Software Foundation; we sometimes
254make exceptions for this. Our decision will be guided by the two goals
255of preserving the free status of all derivatives of our free software and
256of promoting the sharing and reuse of software generally.
257
258 NO WARRANTY
259
260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268REPAIR OR CORRECTION.
269
270 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278POSSIBILITY OF SUCH DAMAGES.
279
280 END OF TERMS AND CONDITIONS
281
282 How to Apply These Terms to Your New Programs
283
284 If you develop a new program, and you want it to be of the greatest
285possible use to the public, the best way to achieve this is to make it
286free software which everyone can redistribute and change under these terms.
287
288 To do so, attach the following notices to the program. It is safest
289to attach them to the start of each source file to most effectively
290convey the exclusion of warranty; and each file should have at least
291the "copyright" line and a pointer to where the full notice is found.
292
293 <one line to give the program's name and a brief idea of what it does.>
294 Copyright (C) <year> <name of author>
295
296 This program is free software; you can redistribute it and/or modify
297 it under the terms of the GNU General Public License as published by
298 the Free Software Foundation; either version 2 of the License, or
299 (at your option) any later version.
300
301 This program is distributed in the hope that it will be useful,
302 but WITHOUT ANY WARRANTY; without even the implied warranty of
303 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 GNU General Public License for more details.
305
306 You should have received a copy of the GNU General Public License along
307 with this program; if not, write to the Free Software Foundation, Inc.,
308 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
310Also add information on how to contact you by electronic and paper mail.
311
312If the program is interactive, make it output a short notice like this
313when it starts in an interactive mode:
314
315 Gnomovision version 69, Copyright (C) year name of author
316 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 This is free software, and you are welcome to redistribute it
318 under certain conditions; type `show c' for details.
319
320The hypothetical commands `show w' and `show c' should show the appropriate
321parts of the General Public License. Of course, the commands you use may
322be called something other than `show w' and `show c'; they could even be
323mouse-clicks or menu items--whatever suits your program.
324
325You should also get your employer (if you work as a programmer) or your
326school, if any, to sign a "copyright disclaimer" for the program, if
327necessary. Here is a sample; alter the names:
328
329 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
332 <signature of Ty Coon>, 1 April 1989
333 Ty Coon, President of Vice
334
335This General Public License does not permit incorporating your program into
336proprietary programs. If your program is a subroutine library, you may
337consider it more useful to permit linking proprietary applications with the
338library. If this is what you want to do, use the GNU Lesser General
339Public License instead of this License.
diff --git a/NEWS b/NEWS
index 453f31d..c88eb54 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,14 @@
1========= 1=========
2Ewe 0.1.1 2Ewe 0.1.3
3========= 3=========
4 4
5Changes sinse 0.1.1 5Changes since 0.1.2
6-------------------
7
8Features:
9 * Ruler: add N-scales;
10
11Changes since 0.1.1
6------------------- 12-------------------
7 13
8 * fix Ewe build on elementery 1.10.1, delete extra .eo files 14 * fix Ewe build on elementery 1.10.1, delete extra .eo files
diff --git a/configure.ac b/configure.ac
index 527a7ce..a127874 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1EWE_VERSION([0], [1], [2]) 1EWE_VERSION([0], [1], [3])
2AC_INIT([ewe], [ewe_version], [enlightenment-devel@lists.sourceforge.net]) 2AC_INIT([ewe], [ewe_version], [enlightenment-devel@lists.sourceforge.net])
3AC_PREREQ([2.60]) 3AC_PREREQ([2.60])
4AC_CONFIG_SRCDIR([configure.ac]) 4AC_CONFIG_SRCDIR([configure.ac])
@@ -8,7 +8,7 @@ AC_PROG_CC
8AM_PROG_CC_C_O 8AM_PROG_CC_C_O
9AC_PROG_RANLIB 9AC_PROG_RANLIB
10AM_SILENT_RULES([yes]) 10AM_SILENT_RULES([yes])
11AM_INIT_AUTOMAKE([1.13 dist-bzip2 subdir-objects color-tests]) 11AM_INIT_AUTOMAKE([1.13 dist-bzip2 subdir-objects color-tests foreign])
12 12
13m4_define([package], "Elementary\ Widgets\ Extension") 13m4_define([package], "Elementary\ Widgets\ Extension")
14m4_define([efl_version], [1.10.1]) 14m4_define([efl_version], [1.10.1])
diff --git a/data/themes/widgets/combobox.edc b/data/themes/widgets/combobox.edc
index 8c4f15e..c790510 100644
--- a/data/themes/widgets/combobox.edc
+++ b/data/themes/widgets/combobox.edc
@@ -295,3 +295,149 @@ group {name: "ewe/combobox/item/content/default";
295 } 295 }
296 } 296 }
297} 297}
298
299group { name: "ewe/combobox/item/color_class/default";
300 parts {
301 part { name: "bg";
302 type: RECT;
303 mouse_events: 1;
304 description { state: "default" 0.0;
305 color: TRANSPARENT_COLOR;
306 }
307 description { state: "mousein" 0.0;
308 color: COMBOBOX_ITEM_MOUSEIN_BG;
309 }
310 }
311 part { name: "left.offset";
312 type: SPACER;
313 description { state: "default" 0.0;
314 align: 0.0 0.0;
315 min: COMBOBOX_ITEM_PADDING;
316 max: COMBOBOX_ITEM_PADDING;
317 rel1 {
318 relative: 0.0 0.0;
319 to: "bg";
320 }
321 }
322 }
323 part { name: "ewe.text";
324 type: TEXT;
325 description { state: "default" 0.0;
326 min: 0 20;
327 max: -1 20;
328 color: COMBOBOX_ITEM_TEXT_COLOR;
329 text {
330 font: FN;
331 size: 12;
332 align: 0.0 0.0;
333 }
334 rel1 {
335 to: "left.offset";
336 relative: 1.0 1.0;
337 }
338 rel2 {
339 to_x: "ccr1";
340 to_y: "bg";
341 relative: 0.0 1.0;
342 offset: -4 -1;
343 }
344
345 }
346 }
347 part { name: "ccr1";
348 type: SWALLOW;
349 description { state: "default" 0.0;
350 align: 1.0 0.5;
351 min: 18 18;
352 max: 18 18;
353 rel2 {
354 to_x: "sp1";
355 relative: 0.0 1.0;
356 }
357 }
358 }
359 part { name: "ccr2";
360 type: SWALLOW;
361 description { state: "default" 0.0;
362 align: 1.0 0.5;
363 min: 18 18;
364 max: 18 18;
365 rel2 {
366 relative: 0.0 1.0;
367 to_x: "sp2";
368 }
369 }
370 }
371 part { name: "ccr3";
372 type: SWALLOW;
373 description { state: "default" 0.0;
374 align: 1.0 0.5;
375 min: 18 18;
376 max: 18 18;
377 rel2 {
378 relative: 0.0 1.0;
379 to_x: "sp3";
380 }
381 }
382 }
383 part { name: "sp1";
384 type: SPACER;
385 description { state: "default" 0.0;
386 align: 1.0 0.5;
387 min: 0 20;
388 max: 4 20;
389 rel2 {
390 relative: 0.0 1.0;
391 to_x: "ccr2";
392 }
393 }
394 }
395 part { name: "sp2";
396 type: SPACER;
397 description { state: "default" 0.0;
398 align: 1.0 0.5;
399 min: 0 20;
400 max: 4 20;
401 rel2 {
402 relative: 0.0 1.0;
403 to_x: "ccr3";
404 }
405 }
406 }
407 part { name: "sp3";
408 type: SPACER;
409 description { state: "default" 0.0;
410 align: 1.0 0.5;
411 min: 0 20;
412 max: 4 20;
413 rel1.to: "bg";
414 rel2.to: "bg";
415 }
416 }
417 part { name: "event";
418 type: RECT;
419 description { state: "default" 0.0;
420 color: 0 0 0 0;
421 }
422 }
423 programs {
424 program { name: "mouse.in";
425 signal: "mouse,in";
426 source: "event";
427 action: STATE_SET "mousein" 0.0;
428 target: "bg";
429 }
430 program { name: "mouse.out";
431 signal: "mouse,out";
432 source: "event";
433 action: STATE_SET "default" 0.0;
434 target: "bg";
435 }
436 program { name: "clicked";
437 signal: "mouse,clicked,1";
438 source: "event";
439 action: SIGNAL_EMIT "select" "ewe";
440 }
441 }
442 }
443}
diff --git a/data/themes/widgets/ruler.edc b/data/themes/widgets/ruler.edc
index 204c2b2..2a47218 100644
--- a/data/themes/widgets/ruler.edc
+++ b/data/themes/widgets/ruler.edc
@@ -42,23 +42,13 @@ group { name: "ewe/ruler/horizontal_background/default";
42 } 42 }
43} 43}
44 44
45group { name: "ewe/ruler/horizontal/marks"; 45group { name: "ewe/ruler/horizontal/dashes/default";
46 parts { 46 parts {
47 part { name: "cliper"; 47 part { name: "cliper";
48 type: RECT; 48 type: RECT;
49 description { state: "default" 0.0; 49 description { state: "default" 0.0;
50 } 50 }
51 } 51 }
52 part { name: "dash_point";
53 type: RECT;
54 clip_to: "cliper";
55 description { state: "default" 0.0;
56 color: RULER_DASHES_COLOR;
57 align: 0.0 1.0;
58 min: 1 10;
59 max: 1 10;
60 }
61 }
62 part { name: "ewe.text"; 52 part { name: "ewe.text";
63 type: TEXT; 53 type: TEXT;
64 scale: 1; 54 scale: 1;
@@ -67,11 +57,11 @@ group { name: "ewe/ruler/horizontal/marks";
67 align: 0.0 1.0; 57 align: 0.0 1.0;
68 color: RULER_MARKS_COLOR; 58 color: RULER_MARKS_COLOR;
69 rel1 { 59 rel1 {
70 to: "dash_point"; 60 to: "dash0";
71 offset: -1 0; 61 offset: -1 0;
72 } 62 }
73 rel2 { 63 rel2 {
74 to_y: "dash_point"; 64 to_y: "dash0";
75 relative: 0.0 0.0; 65 relative: 0.0 0.0;
76 offset: 10 -1; 66 offset: 10 -1;
77 } 67 }
@@ -83,17 +73,7 @@ group { name: "ewe/ruler/horizontal/marks";
83 } 73 }
84 } 74 }
85 } 75 }
86 } 76 part { name: "ewe.middle.text";
87}
88
89group { name: "ewe/ruler/horizontal/dashes";
90 parts {
91 part { name: "cliper";
92 type: RECT;
93 description { state: "default" 0.0;
94 }
95 }
96 part { name: "ewe.text";
97 type: TEXT; 77 type: TEXT;
98 scale: 1; 78 scale: 1;
99 description { state: "default" 0.0; 79 description { state: "default" 0.0;
@@ -117,6 +97,7 @@ group { name: "ewe/ruler/horizontal/dashes";
117 } 97 }
118 } 98 }
119 } 99 }
100 ITEM(0, 10);
120 ITEM(1, 5); 101 ITEM(1, 5);
121 ITEM(2, 5); 102 ITEM(2, 5);
122 ITEM(3, 5); 103 ITEM(3, 5);
@@ -128,6 +109,7 @@ group { name: "ewe/ruler/horizontal/dashes";
128 ITEM(9, 5); 109 ITEM(9, 5);
129 } 110 }
130} 111}
112#undef ITEM
131 113
132#define ITEM_VER(i, sz) \ 114#define ITEM_VER(i, sz) \
133part { name: "dash"#i; \ 115part { name: "dash"#i; \
@@ -160,34 +142,71 @@ group { name: "ewe/ruler/vertical_background/default";
160 } 142 }
161} 143}
162 144
163group { name: "ewe/ruler/vertical/marks"; 145group { name: "ewe/ruler/vertical/dashes/default";
164 inherit: "ewe/ruler/horizontal/marks"; 146 inherit: "ewe/ruler/horizontal/dashes/default";
165 parts { 147 parts {
166 part { name: "dash_point"; 148 part { name: "ewe.text";
167 description { state: "default" 0.0; 149 description { state: "default" 0.0;
168 align: 1.0 0.0; 150 align: 1.0 0.0;
169 min: 10 1; 151 rel1 {
170 max: 10 1; 152 to: "dash0";
153 relative: 1.0 0.0;
154 offset: -5 1;
155 }
156 rel2 {
157 to: "dash0";
158 offset: -1 10;
159 }
171 } 160 }
172 } 161 }
173 part { name: "ewe.text"; 162 part { name: "ewe.middle.text";
174 description { state: "default" 0.0; 163 description { state: "default" 0.0;
175 align: 1.0 0.0; 164 align: 1.0 0.0;
176 rel1 { 165 rel1 {
177 to: "dash_point"; 166 to: "dash5";
178 relative: 1.0 0.0; 167 relative: 0.0 0.0;
179 offset: -5 1; 168 offset: -5 1;
180 } 169 }
181 rel2 { 170 rel2 {
182 to: "dash_point"; 171 to_x: "dash5";
183 offset: -1 10; 172 relative: 0.0 0.0;
173 offset: 0 1;
184 } 174 }
185 } 175 }
186 } 176 }
177 ITEM_VER(0, 10);
178 ITEM_VER(1, 5);
179 ITEM_VER(2, 5);
180 ITEM_VER(3, 5);
181 ITEM_VER(4, 5);
182 ITEM_VER(5, 7);
183 ITEM_VER(6, 5);
184 ITEM_VER(7, 5);
185 ITEM_VER(8, 5);
186 ITEM_VER(9, 5);
187 } 187 }
188} 188}
189#undef ITEM_VER
190
191
192#define RULER_DASHES_COLOR_GREEN 0 255 0 255
193#define RULER_MARKS_COLOR_GREEN 0 255 0 255
194
195
196#define ITEM(i, sz) \
197part { name: "dash"#i; \
198 type: RECT; \
199 clip_to: "cliper"; \
200 description { state: "default" 0.0; \
201 color: RULER_DASHES_COLOR_GREEN; \
202 align: 0.0 1.0; \
203 min: 1 sz; \
204 max: 1 sz; \
205 rel1.relative: 0.i 1.0; \
206 } \
207 }
189 208
190group { name: "ewe/ruler/vertical/dashes"; 209group { name: "ewe/ruler/horizontal/dashes/green";
191 parts { 210 parts {
192 part { name: "cliper"; 211 part { name: "cliper";
193 type: RECT; 212 type: RECT;
@@ -198,18 +217,41 @@ group { name: "ewe/ruler/vertical/dashes";
198 type: TEXT; 217 type: TEXT;
199 scale: 1; 218 scale: 1;
200 description { state: "default" 0.0; 219 description { state: "default" 0.0;
201 fixed: 1 1; 220 fixed: 0 1;
202 align: 1.0 0.0; 221 align: 0.0 1.0;
203 color: RULER_MARKS_COLOR; 222 color: RULER_MARKS_COLOR_GREEN;
223 rel1 {
224 to: "dash0";
225 offset: -1 0;
226 }
227 rel2 {
228 to_y: "dash0";
229 relative: 0.0 0.0;
230 offset: 10 -1;
231 }
232 text {
233 font: FN;
234 size: 9;
235 min: 1 1;
236 ellipsis: -1;
237 }
238 }
239 }
240 part { name: "ewe.middle.text";
241 type: TEXT;
242 scale: 1;
243 description { state: "default" 0.0;
244 fixed: 0 1;
245 align: 0.0 1.0;
246 color:RULER_MARKS_COLOR_GREEN;
204 rel1 { 247 rel1 {
205 to: "dash5"; 248 to: "dash5";
206 relative: 1.0 0.0; 249 offset: -1 0;
207 offset: -5 1;
208 } 250 }
209 rel2 { 251 rel2 {
210 to_y: "dash5"; 252 to_y: "dash5";
211 relative: 1.0 0.0; 253 relative: 0.0 0.0;
212 offset: 5 1; 254 offset: 10 -1;
213 } 255 }
214 text { 256 text {
215 font: FN; 257 font: FN;
@@ -219,17 +261,59 @@ group { name: "ewe/ruler/vertical/dashes";
219 } 261 }
220 } 262 }
221 } 263 }
222 ITEM_VER(1, 5); 264 ITEM(0, 10);
223 ITEM_VER(2, 5); 265 ITEM(5, 7);
224 ITEM_VER(3, 5);
225 ITEM_VER(4, 5);
226 ITEM_VER(5, 7);
227 ITEM_VER(6, 5);
228 ITEM_VER(7, 5);
229 ITEM_VER(8, 5);
230 ITEM_VER(9, 5);
231 } 266 }
232} 267}
233
234#undef ITEM 268#undef ITEM
269
270#define ITEM_VER(i, sz) \
271part { name: "dash"#i; \
272 type: RECT; \
273 clip_to: "cliper"; \
274 description { state: "default" 0.0; \
275 color: RULER_DASHES_COLOR_GREEN; \
276 align: 1.0 0.0; \
277 min: sz 1; \
278 max: sz 1; \
279 rel1.relative: 1.0 0.i; \
280 } \
281 }
282
283group { name: "ewe/ruler/vertical/dashes/green";
284 inherit: "ewe/ruler/horizontal/dashes/green";
285 parts {
286 part { name: "ewe.text";
287 description { state: "default" 0.0;
288 align: 1.0 0.0;
289 rel1 {
290 to: "dash0";
291 relative: 1.0 0.0;
292 offset: -5 1;
293 }
294 rel2 {
295 to: "dash0";
296 offset: -1 10;
297 }
298 }
299 }
300 part { name: "ewe.middle.text";
301 description { state: "default" 0.0;
302 align: 1.0 0.0;
303 rel1 {
304 to: "dash5";
305 relative: 0.0 0.0;
306 offset: -5 1;
307 }
308 rel2 {
309 to_x: "dash5";
310 relative: 0.0 0.0;
311 offset: 0 1;
312 }
313 }
314 }
315 ITEM_VER(0, 10);
316 ITEM_VER(5, 7);
317 }
318}
235#undef ITEM_VER 319#undef ITEM_VER
diff --git a/examples/combobox_example.c b/examples/combobox_example.c
index 35205a0..f0a4276 100644
--- a/examples/combobox_example.c
+++ b/examples/combobox_example.c
@@ -11,40 +11,55 @@ static void _sel(void *data EINA_UNUSED,
11 fprintf(stdout, "\nitem = %s with index %d", item->title, item->index); 11 fprintf(stdout, "\nitem = %s with index %d", item->title, item->index);
12} 12}
13 13
14static void _fcb(void *data,
15 Evas_Object *obj EINA_UNUSED,
16 void *ei)
17{
18 Evas_Object *rc1, *rc2, *rc3;
19 Ewe_Combobox_Item *item = (Ewe_Combobox_Item *) data;
20 Evas * canvas = evas_object_evas_get(item->content);
21 rc1 = evas_object_rectangle_add(canvas);
22 evas_object_color_set(rc1, 255, 0, 0, 255);
23 edje_object_part_swallow(item->content, "ccr1", rc1);
24 rc2 = evas_object_rectangle_add(canvas);
25 evas_object_color_set(rc2, 0, 255, 0, 255);
26 edje_object_part_swallow(item->content, "ccr2", rc2);
27 rc3 = evas_object_rectangle_add(canvas);
28 evas_object_color_set(rc3, 0, 0, 255, 255);
29 edje_object_part_swallow(item->content, "ccr3", rc3);
30}
31
14EAPI_MAIN int 32EAPI_MAIN int
15elm_main(int argc, char **argv) 33elm_main(int argc, char **argv)
16{ 34{
17 Evas_Object *win, *cb; 35 Evas_Object *win, *cb;
18 36
19 ewe_init(0, 0); 37 ewe_init(0, 0);
20 elm_theme_extension_add(NULL, "/usr/local/share/ewe/themes/default.edj");
21 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 38 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
22 39
23 win = elm_win_util_standard_add("combobox", "Combobox"); 40 win = elm_win_util_standard_add("combobox", "Combobox");
24 elm_win_autodel_set(win, EINA_TRUE); 41 elm_win_autodel_set(win, EINA_TRUE);
25 42
26 cb = ewe_combobox_add(win); 43 cb = ewe_combobox_add(win);
27 evas_object_resize(cb, 220, 70);
28 evas_object_show(cb);
29 Ewe_Combobox_Item *it = ewe_combobox_item_add(cb, "Liu Kang"); 44 Ewe_Combobox_Item *it = ewe_combobox_item_add(cb, "Liu Kang");
45 ewe_combobox_item_style_set(cb, it, "color_class/default");
46 evas_object_smart_callback_add(cb, "expanded", _fcb, it);
47
30 Ewe_Combobox_Item *item = ewe_combobox_item_add(cb, "Scorpion"); 48 Ewe_Combobox_Item *item = ewe_combobox_item_add(cb, "Scorpion");
31 Ewe_Combobox_Item *ir = ewe_combobox_item_add(cb, "Raiden"); 49 item = ewe_combobox_item_add(cb, "Raiden");
32 ewe_combobox_item_add(cb, "Johnny Cage"); 50 ewe_combobox_item_add(cb, "Johnny Cage");
33 int i = 0;
34 for (i = 0; i < 50; i++)
35 ewe_combobox_item_add(cb, "Sub-Zero");
36 Ewe_Combobox_Item *ik = ewe_combobox_item_add(cb, "Jaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
37 ewe_combobox_select_item_set(cb, 0); 51 ewe_combobox_select_item_set(cb, 0);
38 ewe_combobox_item_title_set(cb,1,"olololo");
39 evas_object_smart_callback_add(cb, "selected", _sel, NULL); 52 evas_object_smart_callback_add(cb, "selected", _sel, NULL);
53
54 evas_object_resize(cb, 220, 70);
40 evas_object_move(cb, 100, 100); 55 evas_object_move(cb, 100, 100);
56 evas_object_show(cb);
41 57
42 evas_object_resize(win, 500, 500); 58 evas_object_resize(win, 500, 500);
43 evas_object_show(win); 59 evas_object_show(win);
44 60
45 elm_run(); 61 elm_run();
46 elm_shutdown(); 62 elm_shutdown();
47 elm_theme_extension_del(NULL, "/usr/local/share/ewe/themes/default.edj");
48 63
49 return 0; 64 return 0;
50} 65}
diff --git a/examples/ruler_example.c b/examples/ruler_example.c
index ba1cbac..7a8f3c6 100644
--- a/examples/ruler_example.c
+++ b/examples/ruler_example.c
@@ -1,104 +1,164 @@
1/* 1/*
2 * Compile with: 2 * Compile with:
3 * edje_cc ruler_example.edc ruler_example.edj
4 * gcc -o ruler_example ruler_example.c -g `pkg-config --cflags --libs ewe` 3 * gcc -o ruler_example ruler_example.c -g `pkg-config --cflags --libs ewe`
5 */ 4 */
6#include <ewe.h> 5#include <ewe.h>
7 6
8#define RULER_HOR "ruler_hor" 7Evas_Object *ruler;
9#define RULER_VER "ruler_ver"
10 8
11static void 9static void
12_offset_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 10_step_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
13{ 11{
14 int val; 12 int val;
15 Evas_Object *ruler_hor = evas_object_data_get(obj, RULER_HOR);
16 Evas_Object *ruler_ver = evas_object_data_get(obj, RULER_VER);
17 val = elm_spinner_value_get(obj); 13 val = elm_spinner_value_get(obj);
18 ewe_ruler_zero_offset_set(ruler_hor, val); 14 ewe_ruler_step_set(ruler, data, val);
19 ewe_ruler_zero_offset_set(ruler_ver, val);
20 printf("Zero offset changed to %d\n", val);
21} 15}
22 16
23static void 17static void
24_step_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) 18_val_step_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
25{ 19{
26 int val; 20 int val;
27 Evas_Object *ruler_hor = evas_object_data_get(obj, RULER_HOR);
28 Evas_Object *ruler_ver = evas_object_data_get(obj, RULER_VER);
29 val = elm_spinner_value_get(obj); 21 val = elm_spinner_value_get(obj);
30 ewe_ruler_step_set(ruler_hor, val); 22 ewe_ruler_value_step_set(ruler, data, val);
31 ewe_ruler_step_set(ruler_ver, val);
32 printf("Step between marks of the ruler has changed to %d\n", val);
33} 23}
34 24
25static void
26_offset_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
27{
28 int val;
29 val = elm_spinner_value_get(obj);
30 ewe_ruler_zero_offset_set(ruler, data, val);
31}
32
33static void
34_visible_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
35{
36 Eina_Bool val;
37 val = elm_check_state_get(obj);
38 ewe_ruler_scale_visible_set(ruler, data, val);
39}
40
41static void
42_middle_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
43{
44 Eina_Bool val;
45 val = elm_check_state_get(obj);
46 ewe_ruler_scale_middle_mark_set(ruler, data, val);
47}
48
49
50static void
51_orient_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
52{
53 Eina_Bool val;
54 val = elm_check_state_get(obj);
55 if (val)
56 ewe_ruler_orient_set(ruler, EWE_RULER_ORIENT_HORIZONTAL);
57 else
58 ewe_ruler_orient_set(ruler, EWE_RULER_ORIENT_VERTICAL);
59}
60
61static void
62_format_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
63{
64 const char *val;
65 val = elm_entry_entry_get(obj);
66 ewe_ruler_format_set(ruler, data, val);
67}
68
69static void
70_style_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
71{
72 const char *val;
73 val = elm_entry_entry_get(obj);
74 ewe_ruler_style_set(ruler, data, val);
75}
76
77#define SPINNER(FORMAT, MIN, MAX, X, Y, W, H, CB, DATA) \
78 sp = elm_spinner_add(win); \
79 elm_spinner_label_format_set(sp, FORMAT); \
80 elm_spinner_min_max_set(sp, MIN, MAX); \
81 elm_spinner_editable_set(sp, EINA_TRUE); \
82 evas_object_geometry_set(sp, X, Y, W, H); \
83 evas_object_show(sp); \
84 evas_object_smart_callback_add(sp, "changed", CB, DATA);
85
86#define CHECK(TEXT, DEF_VAL, X, Y, W, H, CB, DATA) \
87 check = elm_check_add(win); \
88 elm_check_state_set(check, DEF_VAL); \
89 elm_object_part_text_set(check, "default", TEXT); \
90 evas_object_geometry_set(check, X, Y, W, H); \
91 evas_object_show(check); \
92 evas_object_smart_callback_add(check, "changed", CB, DATA);
93
94#define ENTRY(DEF_VAL, X, Y, W, H, CB, DATA) \
95 ent = elm_entry_add(win); \
96 elm_entry_entry_set(ent, DEF_VAL); \
97 evas_object_geometry_set(ent, X, Y, W, H); \
98 evas_object_show(ent); \
99 evas_object_smart_callback_add(ent, "changed", CB, DATA);
35 100
36EAPI_MAIN int 101EAPI_MAIN int
37elm_main(int argc, char **argv) 102elm_main(int argc, char **argv)
38{ 103{
39 unsigned int step = 100; 104 unsigned int step = 100;
40 ewe_init(argc, argv); 105 ewe_init(argc, argv);
41 Evas_Object *win, *layout, *ruler_ver,*ruler_hor, *spinner1, *spinner2; 106 Evas_Object *win, *ruler_win, *sp, *check, *ent;
107 Ewe_Ruler_Scale *scale;
42 108
43 elm_app_info_set(elm_main, "ewe", "ruler_example.edj");
44 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 109 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
45 110
46 win = elm_win_util_standard_add("layout", "Layout"); 111 ruler_win = elm_win_util_standard_add("layout", "Ruler");
112 elm_win_autodel_set(ruler_win, EINA_TRUE);
113
114 ruler = ewe_ruler_add(ruler_win);
115 evas_object_size_hint_weight_set(ruler, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
116 elm_win_resize_object_add(ruler_win, ruler);
117 scale = ewe_ruler_scale_add(ruler, "green");
118 evas_object_show(ruler);
119
120 win = elm_win_util_standard_add("layout", "Settings");
47 elm_win_autodel_set(win, EINA_TRUE); 121 elm_win_autodel_set(win, EINA_TRUE);
48 122
49 layout = elm_layout_add(win); 123 int pos = 10;
50 evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 124
51 elm_win_resize_object_add(win, layout); 125 CHECK("Ruler is horizontal", EINA_TRUE, 10, pos, 200, 25, _orient_cb, NULL);
52 elm_layout_file_set(layout, "ruler_example.edj", "view"); 126 pos += 35;
53 evas_object_show(layout); 127
54 128 CHECK("Default scale visibile", EINA_TRUE, 10, pos, 200, 25, _visible_cb, NULL);
55 ruler_hor = ewe_ruler_add(win); 129 CHECK("Green scale visibile", EINA_TRUE, 220, pos, 200, 25, _visible_cb, scale);
56 elm_layout_content_set(layout, "ruler_hor", ruler_hor); 130 pos += 35;
57 ewe_ruler_step_set(ruler_hor, step); 131
58 evas_object_show(ruler_hor); 132 CHECK("Default scale middle mark", EINA_FALSE, 10, pos, 200, 25, _middle_cb, NULL);
59 133 CHECK("Green scale middle mark", EINA_FALSE, 220, pos, 200, 25, _middle_cb, scale);
60 layout = elm_layout_add(win); 134 pos += 35;
61 evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 135
62 elm_win_resize_object_add(win, layout); 136 ENTRY("%.0f", 10, pos, 200, 25, _format_cb, NULL);
63 elm_layout_file_set(layout, "ruler_example.edj", "view"); 137 ENTRY("%.0f", 220, pos, 200, 25, _format_cb, scale);
64 evas_object_show(layout); 138 pos += 35;
65 139
66 ruler_ver = ewe_ruler_add(win); 140 ENTRY("default", 10, pos, 200, 25, _style_cb, NULL);
67 elm_layout_content_set(layout, "ruler_ver", ruler_ver); 141 ENTRY("green", 220, pos, 200, 25, _style_cb, scale);
68 ewe_ruler_orient_set(ruler_ver, EWE_RULER_ORIENT_VERTICAL); 142 pos += 35;
69 ewe_ruler_step_set(ruler_ver, step); 143
70 evas_object_show(ruler_ver); 144 SPINNER("Default scale step is %1.0f", 10, 10000, 10, pos, 200, 25, _step_cb, NULL)
71 145 SPINNER("Green scale step is %1.0f", 10, 10000, 220, pos, 200, 25, _step_cb, scale)
72 spinner1 = elm_spinner_add(win); 146 pos += 35;
73 elm_spinner_label_format_set(spinner1, "Zero offset is %1.0f"); 147
74 elm_spinner_step_set(spinner1, 10); 148 SPINNER("Default scale value step is %1.0f", -10000, 10000, 10, pos, 200, 25, _val_step_cb, NULL)
75 elm_spinner_min_max_set(spinner1, -10000.0, 10000.0); 149 SPINNER("Green scale value step is %1.0f", -10000, 10000, 220, pos, 200, 25, _val_step_cb, scale)
76 elm_spinner_editable_set(spinner1, EINA_TRUE); 150 pos += 35;
77 evas_object_size_hint_align_set(spinner1, EVAS_HINT_FILL, 0.5); 151
78 evas_object_size_hint_weight_set(spinner1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 152 SPINNER("Default scale zero offset is %1.0f", -10000, 10000, 10, pos, 200, 25, _offset_cb, NULL)
79 evas_object_geometry_set(spinner1, 350, 350, 210, 25); 153 SPINNER("Green scale zero offset is %1.0f", -10000, 10000, 220, pos, 200, 25, _offset_cb, scale)
80 evas_object_show(spinner1); 154 pos += 35;
81 evas_object_data_set(spinner1, RULER_HOR, ruler_hor); 155
82 evas_object_data_set(spinner1, RULER_VER, ruler_ver); 156 evas_object_resize(win, 430, pos);
83 evas_object_smart_callback_add(spinner1, "changed", _offset_cb, NULL);
84
85 spinner2 = elm_spinner_add(win);
86 elm_spinner_label_format_set(spinner2, "Step between marks is %1.0f");
87 elm_spinner_step_set(spinner2, 5);
88 elm_spinner_min_max_set(spinner2, 0, 1000.0);
89 elm_spinner_value_set(spinner2, 100);
90 elm_spinner_editable_set(spinner2, EINA_TRUE);
91 evas_object_size_hint_align_set(spinner2, EVAS_HINT_FILL, 0.5);
92 evas_object_size_hint_weight_set(spinner2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
93 evas_object_geometry_set(spinner2, 350, 390, 210, 25);
94 evas_object_show(spinner2);
95 evas_object_data_set(spinner2, RULER_HOR, ruler_hor);
96 evas_object_data_set(spinner2, RULER_VER, ruler_ver);
97 evas_object_smart_callback_add(spinner2, "changed", _step_cb, NULL);
98
99 evas_object_resize(win, 740, 740);
100 evas_object_show(win); 157 evas_object_show(win);
101 158
159 evas_object_resize(ruler_win, 740, 40);
160 evas_object_show(ruler_win);
161
102 ewe_shutdown(); 162 ewe_shutdown();
103 elm_run(); 163 elm_run();
104 elm_shutdown(); 164 elm_shutdown();
diff --git a/examples/ruler_example.edc b/examples/ruler_example.edc
deleted file mode 100644
index 02df06d..0000000
--- a/examples/ruler_example.edc
+++ /dev/null
@@ -1,26 +0,0 @@
1collections {
2 group { name: "view";
3 parts {
4 part { name: "ruler_hor";
5 type: SWALLOW;
6 description {
7 state: "default 0.0";
8 align: 0.5 0.0;
9 max: -1 60;
10 rel1.offset: 80 20;
11 rel2.offset: -20 -20;
12 }
13 }
14 part { name: "ruler_ver";
15 type: SWALLOW;
16 description {
17 state: "default 0.0";
18 align: 0.0 0.5;
19 max: 60 -1;
20 rel1.offset: 20 80;
21 rel2.offset: 20 -20;
22 }
23 }
24 }
25 }
26}
diff --git a/src/bin/test.c b/src/bin/test.c
index 01cca6f..a7f990d 100644
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -4,20 +4,19 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20#include "ewe.h" 19#include "Ewe.h"
21 20
22EAPI_MAIN int 21EAPI_MAIN int
23elm_main(int argc, char **argv) 22elm_main(int argc, char **argv)
diff --git a/src/lib/Ewe.h b/src/lib/Ewe.h
new file mode 100644
index 0000000..93d2c19
--- /dev/null
+++ b/src/lib/Ewe.h
@@ -0,0 +1,24 @@
1/* Elementary Widgets Extension
2 * Copyright (C) 2014 Samsung Electronics.
3 *
4 * This file is part of Elementary Widgets Extension.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
17 */
18
19#ifndef ELEMENTARY_WIDGET_EXTENSIONS_H
20#define ELEMENTARY_WIDGET_EXTENSIONS_H
21
22#include "ewe_main.h"
23
24#endif /* ELEMENTARY_WIDGET_EXTENTIONS */
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 9033973..b3d6f7c 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -27,11 +27,12 @@ AM_CPPFLAGS = \
27lib_LTLIBRARIES = libewe.la 27lib_LTLIBRARIES = libewe.la
28 28
29includes_HEADERS = \ 29includes_HEADERS = \
30ewe.h 30Ewe.h
31includesdir = $(includedir)/ewe 31includesdir = $(includedir)/ewe
32 32
33includesub_HEADERS = \ 33includesub_HEADERS = \
34 logger/logger.h \ 34 logger/logger.h \
35 ewe_main.h \
35 ewe_tabs.h \ 36 ewe_tabs.h \
36 ewe_tabs_legacy.h \ 37 ewe_tabs_legacy.h \
37 ewe_tabs_eo.h \ 38 ewe_tabs_eo.h \
@@ -56,13 +57,17 @@ includesub_HEADERS = \
56 ewe_ruler_legacy.h \ 57 ewe_ruler_legacy.h \
57 ewe_ruler_eo.h \ 58 ewe_ruler_eo.h \
58 ewe_ruler_common.h \ 59 ewe_ruler_common.h \
59 ewe_widget_ruler.h 60 ewe_widget_ruler.h \
61 ewe_win.h \
62 ewe_win.eo.h \
63 ewe_win_legacy.h \
64 ewe_win_common.h
60 65
61includesubdir = $(includedir)/ewe 66includesubdir = $(includedir)/ewe
62 67
63libewe_la_LDFLAGS = @EWE_LTLIBRARY_FLAGS@ 68libewe_la_LDFLAGS = @EWE_LTLIBRARY_FLAGS@
64libewe_la_SOURCES = \ 69libewe_la_SOURCES = \
65ewe.c \ 70ewe_main.c \
66logger/logger.c \ 71logger/logger.c \
67ewe_tabs.c \ 72ewe_tabs.c \
68ewe_statusbar.c \ 73ewe_statusbar.c \
@@ -80,4 +85,6 @@ BUILT_SOURCES = \
80 ewe_entry.eo.c \ 85 ewe_entry.eo.c \
81 ewe_entry.eo.h \ 86 ewe_entry.eo.h \
82 ewe_ruler.eo.c \ 87 ewe_ruler.eo.c \
83 ewe_ruler.eo.h 88 ewe_ruler.eo.h \
89 ewe_win.eo.h \
90 ewe_win.eo.c
diff --git a/src/lib/ewe_combobox.c b/src/lib/ewe_combobox.c
index 6560ebd..0947943 100644
--- a/src/lib/ewe_combobox.c
+++ b/src/lib/ewe_combobox.c
@@ -1,6 +1,6 @@
1#include "ewe_private.h" 1#include "ewe_private.h"
2#include "ewe_widget_combobox.h" 2#include "ewe_widget_combobox.h"
3#include "elm_interface_scrollable.h" 3#include <elm_interface_scrollable.h>
4 4
5EAPI Eo_Op EWE_OBJ_COMBOBOX_BASE_ID = EO_NOOP; 5EAPI Eo_Op EWE_OBJ_COMBOBOX_BASE_ID = EO_NOOP;
6 6
@@ -17,9 +17,9 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
17 17
18static void 18static void
19_focusout(void *data, 19_focusout(void *data,
20 Evas *evas EINA_UNUSED, 20 Evas *evas EINA_UNUSED,
21 Evas_Object *obj EINA_UNUSED, 21 Evas_Object *obj EINA_UNUSED,
22 void *einfo EINA_UNUSED) 22 void *einfo EINA_UNUSED)
23{ 23{
24 Eina_List *l; 24 Eina_List *l;
25 EWE_COMBOBOX_DATA_GET(data, sd); 25 EWE_COMBOBOX_DATA_GET(data, sd);
@@ -73,7 +73,6 @@ _expand(Evas_Object *obj)
73 73
74 EWE_COMBOBOX_DATA_GET(obj, sd); 74 EWE_COMBOBOX_DATA_GET(obj, sd);
75 sd->expanded = EINA_TRUE; 75 sd->expanded = EINA_TRUE;
76 evas_object_smart_callback_call(sd->obj, "expanded", NULL);
77 edje_object_signal_emit(sd->combobox, "ewe,state,expanded", "ewe"); 76 edje_object_signal_emit(sd->combobox, "ewe,state,expanded", "ewe");
78 edje_object_signal_emit(sd->combobox, "btn,hide", "ewe"); 77 edje_object_signal_emit(sd->combobox, "btn,hide", "ewe");
79 exs = ecore_x_default_screen_get(); 78 exs = ecore_x_default_screen_get();
@@ -129,7 +128,10 @@ _expand(Evas_Object *obj)
129 EINA_LIST_FOREACH(sd->items, l, item) 128 EINA_LIST_FOREACH(sd->items, l, item)
130 { 129 {
131 item->content = edje_object_add(evas); 130 item->content = edje_object_add(evas);
132 edje_object_file_set(item->content, EWE_THEME, "ewe/combobox/item/content/default"); 131 if (item->style)
132 edje_object_file_set(item->content, EWE_THEME, item->style);
133 else
134 edje_object_file_set(item->content, EWE_THEME, "ewe/combobox/item/content/default");
133 edje_object_size_min_calc(item->content, NULL, &minh); 135 edje_object_size_min_calc(item->content, NULL, &minh);
134 evas_object_resize(item->content, w - bg_minw, minh); 136 evas_object_resize(item->content, w - bg_minw, minh);
135 edje_object_part_text_set(item->content, "ewe.text", item->title); 137 edje_object_part_text_set(item->content, "ewe.text", item->title);
@@ -152,6 +154,7 @@ _expand(Evas_Object *obj)
152 } 154 }
153 } 155 }
154 } 156 }
157 evas_object_smart_callback_call(sd->obj, "expanded", NULL);
155 ecore_evas_move(ee, x, y); 158 ecore_evas_move(ee, x, y);
156 ecore_evas_resize(ee, w, hh); 159 ecore_evas_resize(ee, w, hh);
157 evas_object_resize(sd->bg, w, hh); 160 evas_object_resize(sd->bg, w, hh);
@@ -269,7 +272,6 @@ _ewe_combobox_item_add(Eo *obj,
269 Eina_Stringshare *title) 272 Eina_Stringshare *title)
270{ 273{
271 Ewe_Combobox_Item *ret = NULL; 274 Ewe_Combobox_Item *ret = NULL;
272 Eina_Strbuf *buf = eina_strbuf_new();
273 275
274 ret = malloc(sizeof(Ewe_Combobox_Item)); 276 ret = malloc(sizeof(Ewe_Combobox_Item));
275 ret->owner = obj; 277 ret->owner = obj;
@@ -277,8 +279,8 @@ _ewe_combobox_item_add(Eo *obj,
277 ret->title = eina_stringshare_add(title); 279 ret->title = eina_stringshare_add(title);
278 280
279 ret->index = eina_list_count(sd->items); 281 ret->index = eina_list_count(sd->items);
282 ret->style = NULL;
280 sd->items = eina_list_append(sd->items, ret); 283 sd->items = eina_list_append(sd->items, ret);
281 eina_strbuf_free(buf);
282 return ret; 284 return ret;
283} 285}
284 286
@@ -419,6 +421,19 @@ _ewe_combobox_elm_widget_disable(Eo *obj,
419 return EINA_TRUE; 421 return EINA_TRUE;
420} 422}
421 423
424EOLIAN static Eina_Bool
425_ewe_combobox_item_style_set(Eo *obj EINA_UNUSED,
426 Ewe_Combobox_Smart_Data *sd EINA_UNUSED,
427 Ewe_Combobox_Item *item,
428 Eina_Stringshare *style)
429{
430 if (!style)
431 return EINA_FALSE;
432 item->style = eina_stringshare_printf("ewe/combobox/item/%s", style);
433 if (!item->style)
434 return EINA_FALSE;
435 return EINA_TRUE;
436}
422 437
423#include "ewe_combobox.eo.c" 438#include "ewe_combobox.eo.c"
424#undef NON_ITEM_PADDING 439#undef NON_ITEM_PADDING
diff --git a/src/lib/ewe_combobox.eo b/src/lib/ewe_combobox.eo
index e76c464..66b39a2 100644
--- a/src/lib/ewe_combobox.eo
+++ b/src/lib/ewe_combobox.eo
@@ -121,6 +121,20 @@ class Ewe_Combobox (Elm_Widget)
121 @in Eina_Stringshare *title; /*@New items title*/ 121 @in Eina_Stringshare *title; /*@New items title*/
122 } 122 }
123 } 123 }
124 item_style_set {
125 /*@
126 Set style of the combobox item.
127
128 @return EINA_TRUE on success, EINA_FALSE otherwise
129
130 @ingroup combobox*/
131 return Eina_Bool;
132 params {
133 @in Ewe_Combobox_Item *item; /*@The combobox item*/
134 @in Eina_Stringshare *style; /*@New items style*/
135 }
136 }
137
124 } 138 }
125 139
126 implements { 140 implements {
diff --git a/src/lib/ewe_combobox.h b/src/lib/ewe_combobox.h
index 53bc083..4b50b63 100644
--- a/src/lib/ewe_combobox.h
+++ b/src/lib/ewe_combobox.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20#include "ewe_combobox_common.h" 19#include "ewe_combobox_common.h"
diff --git a/src/lib/ewe_combobox_common.h b/src/lib/ewe_combobox_common.h
index 062e120..40568ce 100644
--- a/src/lib/ewe_combobox_common.h
+++ b/src/lib/ewe_combobox_common.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20typedef struct _Ewe_Combobox_Item Ewe_Combobox_Item; 19typedef struct _Ewe_Combobox_Item Ewe_Combobox_Item;
@@ -24,5 +23,6 @@ struct _Ewe_Combobox_Item
24 Evas_Object *owner; 23 Evas_Object *owner;
25 Evas_Object *content; 24 Evas_Object *content;
26 Eina_Stringshare *title; 25 Eina_Stringshare *title;
26 Eina_Stringshare *style;
27 unsigned int index; 27 unsigned int index;
28}; 28};
diff --git a/src/lib/ewe_combobox_eo.h b/src/lib/ewe_combobox_eo.h
index 0a28091..fd6fa21 100644
--- a/src/lib/ewe_combobox_eo.h
+++ b/src/lib/ewe_combobox_eo.h
@@ -4,18 +4,17 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see 16 * along with this program; If not, see
18 * www.gnu.org/licenses/gpl-2.0.html. 17 * www.gnu.org/licenses/lgpl.html.
19 */ 18 */
20 19
21#include "ewe_combobox.eo.h" 20#include "ewe_combobox.eo.h"
diff --git a/src/lib/ewe_combobox_legacy.h b/src/lib/ewe_combobox_legacy.h
index 74026f2..bd5bb2b 100644
--- a/src/lib/ewe_combobox_legacy.h
+++ b/src/lib/ewe_combobox_legacy.h
@@ -127,3 +127,17 @@ ewe_combobox_select_item_get(Evas_Object *obj);
127EAPI Eina_Bool 127EAPI Eina_Bool
128ewe_combobox_select_item_set(Evas_Object *obj, 128ewe_combobox_select_item_set(Evas_Object *obj,
129 const int index); 129 const int index);
130
131/**
132 * Sets the style for combobox item.
133 *
134 * @param item The combobox item
135 * @param style The name of style
136 * @return EINA_TRUE on success, EINA_FALSE otherwise
137 *
138 * @ingroup combobox
139 */
140EAPI Eina_Bool
141ewe_combobox_item_style_set(Evas_Object *obj,
142 Ewe_Combobox_Item *item,
143 Eina_Stringshare *style);
diff --git a/src/lib/ewe.c b/src/lib/ewe_main.c
index 558e44d..52b1cda 100644
--- a/src/lib/ewe.c
+++ b/src/lib/ewe_main.c
@@ -4,21 +4,20 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20#include "ewe_private.h" 19#include "ewe_private.h"
21#include "ewe.h" 20#include "ewe_main.h"
22 21
23EAPI int 22EAPI int
24ewe_init(int argc, char **argv) 23ewe_init(int argc, char **argv)
diff --git a/src/lib/ewe.h b/src/lib/ewe_main.h
index fb8c352..afa1f89 100644
--- a/src/lib/ewe.h
+++ b/src/lib/ewe_main.h
@@ -4,21 +4,20 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20#ifndef H_ELEMENTARY_WIDGET_EXTENSIONS 19#ifndef EWE_MAIN_H
21#define H_ELEMENTARY_WIDGET_EXTENSIONS 20#define EWE_MAIN_H
22 21
23#include <Elementary.h> 22#include <Elementary.h>
24#include "ewe_statusbar.h" 23#include "ewe_statusbar.h"
@@ -55,4 +54,4 @@ EAPI int ewe_init(int argc, char **argv);
55 */ 54 */
56EAPI int ewe_shutdown(void); 55EAPI int ewe_shutdown(void);
57 56
58#endif //H_ELEMENTARY_WIDGET_EXTENTIONS 57#endif /* EWE_MAIN_H */
diff --git a/src/lib/ewe_private.h b/src/lib/ewe_private.h
index 4c7b4ff..c598bd2 100644
--- a/src/lib/ewe_private.h
+++ b/src/lib/ewe_private.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19#ifndef EWE_PRIVATE_H 18#ifndef EWE_PRIVATE_H
20#define EWE_PRIVATE_H 19#define EWE_PRIVATE_H
diff --git a/src/lib/ewe_ruler.c b/src/lib/ewe_ruler.c
index d9906ff..2382d66 100644
--- a/src/lib/ewe_ruler.c
+++ b/src/lib/ewe_ruler.c
@@ -4,22 +4,21 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
18#include <math.h>
19#include <stdlib.h>
19#include "ewe_private.h" 20#include "ewe_private.h"
20#include "ewe_widget_ruler.h" 21#include "ewe_widget_ruler.h"
21#include "math.h"
22#include "stdlib.h"
23 22
24EAPI Eo_Op EWE_OBJ_RULER_BASE_ID = EO_NOOP; 23EAPI Eo_Op EWE_OBJ_RULER_BASE_ID = EO_NOOP;
25 24
@@ -28,21 +27,13 @@ EAPI Eo_Op EWE_OBJ_RULER_BASE_ID = EO_NOOP;
28#define MY_CLASS_NAME "Ewe_Ruler" 27#define MY_CLASS_NAME "Ewe_Ruler"
29#define MY_CLASS_NAME_LEGACY "ewe_ruler" 28#define MY_CLASS_NAME_LEGACY "ewe_ruler"
30 29
30#define MIN_STEP 10
31#define DEFAULT_STEP 50 31#define DEFAULT_STEP 50
32#define MARKS "ewe/ruler/horizontal/marks" 32#define DEFAULT_FORMAT "%.0f"
33#define DEFAULT_STYLE "default"
33#define DASHES "ewe/ruler/horizontal/dashes" 34#define DASHES "ewe/ruler/horizontal/dashes"
34#define MARKS_VER "ewe/ruler/vertical/marks"
35#define DASHES_VER "ewe/ruler/vertical/dashes" 35#define DASHES_VER "ewe/ruler/vertical/dashes"
36 36
37#define _EWE_RULER_UNIT_ADD(obj, temp, GROUP) \
38{ \
39 temp = edje_object_add(canvas); \
40 edje_object_file_set(temp, EWE_THEME, GROUP); \
41 evas_object_smart_member_add(temp, obj); \
42 evas_object_clip_set(temp, sd->clip); \
43 sd->ruler = eina_list_append(sd->ruler, temp); \
44}
45
46static const Evas_Smart_Cb_Description _smart_callbacks[] = { 37static const Evas_Smart_Cb_Description _smart_callbacks[] = {
47 {NULL, NULL} 38 {NULL, NULL}
48}; 39};
@@ -50,22 +41,16 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
50/*----------------------internal helpers functions----------------------------*/ 41/*----------------------internal helpers functions----------------------------*/
51 42
52static void 43static void
53_delete_extra_dashes(Eo *obj, int amount) 44_delete_extra_dashes(Ewe_Ruler_Scale *scale, int amount)
54{ 45{
55 EWE_RULER_DATA_GET(obj, sd);
56
57 Evas_Object *list_data; 46 Evas_Object *list_data;
58 Eina_Stringshare *buf = NULL;
59 Eina_List *l, *l_next; 47 Eina_List *l, *l_next;
60 48
61 EINA_LIST_REVERSE_FOREACH_SAFE(sd->ruler, l, l_next, list_data) 49 EINA_LIST_REVERSE_FOREACH_SAFE(scale->dashes, l, l_next, list_data)
62 { 50 {
63 if (amount) 51 if (amount)
64 { 52 {
65 buf = edje_object_part_text_get(list_data, "ewe.text"); 53 scale->dashes = eina_list_remove_list(scale->dashes, l);
66 if (buf)
67 eina_stringshare_del(buf);
68 sd->ruler = eina_list_remove_list(sd->ruler, l);
69 evas_object_smart_member_del(list_data); 54 evas_object_smart_member_del(list_data);
70 evas_object_del(list_data); 55 evas_object_del(list_data);
71 } 56 }
@@ -74,6 +59,135 @@ _delete_extra_dashes(Eo *obj, int amount)
74 } 59 }
75} 60}
76 61
62static inline void
63_print_mark_value(Evas_Object *mark, Eina_Stringshare *format, double value, Eina_Bool middle)
64{
65 Eina_Stringshare *buf = NULL;
66 buf = eina_stringshare_printf(format, value);
67 if (middle)
68 edje_object_part_text_set(mark, "ewe.middle.text", buf);
69 else
70 edje_object_part_text_set(mark, "ewe.text", buf);
71 eina_stringshare_del(buf);
72}
73
74static void
75_add_dashes(Ewe_Ruler_Smart_Data *sd)
76{
77 Ewe_Ruler_Scale *scale;
78 Eina_List *l;
79 Evas_Object *above = NULL;
80
81 sd->size_changed = EINA_FALSE;
82 sd->position_changed = EINA_TRUE;
83 sd->text_changed = EINA_TRUE;
84
85 EINA_LIST_FOREACH(sd->scales, l, scale)
86 {
87 if (!scale->visible) continue;
88 int dashes_count = eina_list_count(scale->dashes);
89 int new_dashes_count;
90
91 /* if object has 0 size removing all dashes */
92 if ((!sd->geometry.width) || (!sd->geometry.height))
93 {
94 _delete_extra_dashes(scale, dashes_count);
95 continue;
96 }
97 if (dashes_count) above = eina_list_data_get(scale->dashes);
98 if (sd->orient == EWE_RULER_ORIENT_HORIZONTAL)
99 new_dashes_count = (((sd->geometry.width / scale->mark_step) + 3) - dashes_count);
100 else
101 new_dashes_count = (((sd->geometry.height / scale->mark_step) + 3) - dashes_count);
102 if (new_dashes_count == 0) continue;
103
104 Evas_Object *object;
105 Evas *canvas = evas_object_evas_get(sd->obj);
106
107 if (new_dashes_count > 0)
108 {
109 for (; new_dashes_count > 0; new_dashes_count--)
110 {
111 object = edje_object_add(canvas);
112 edje_object_file_set(object, EWE_THEME, scale->full_style);
113 evas_object_smart_member_add(object, sd->obj);
114 if (above) evas_object_stack_above(object, above);
115 above = object;
116 evas_object_clip_set(object, sd->clip);
117 scale->dashes = eina_list_append(scale->dashes, object);
118 }
119 }
120 else
121 _delete_extra_dashes(scale, -new_dashes_count);
122 }
123}
124
125static void
126_place_dashes(Ewe_Ruler_Smart_Data *sd)
127{
128 Ewe_Ruler_Scale *scale;
129 Eina_List *l, *ls;
130 Evas_Object *item;
131
132 EINA_LIST_FOREACH(sd->scales, ls, scale)
133 {
134 int i = 0;
135 int x, y, offset;
136
137 if (sd->orient == EWE_RULER_ORIENT_HORIZONTAL)
138 {
139 offset = ((sd->geometry.x + (scale->zero_pos % scale->mark_step)) - scale->mark_step);
140 EINA_LIST_FOREACH(scale->dashes, l, item)
141 {
142 x = offset + i * scale->mark_step;
143 evas_object_resize(item, scale->mark_step, sd->geometry.height);
144 evas_object_move(item, x, sd->geometry.y);
145 ++i;
146 }
147 }
148 else
149 {
150 offset = ((sd->geometry.y + (scale->zero_pos % scale->mark_step)) - scale->mark_step);
151 EINA_LIST_FOREACH(scale->dashes, l, item)
152 {
153 y = offset + i * scale->mark_step;
154 evas_object_resize(item, sd->geometry.width, scale->mark_step);
155 evas_object_move(item, sd->geometry.x, y);
156 ++i;
157 }
158 }
159 }
160 sd->position_changed = EINA_FALSE;
161 sd->text_changed = EINA_TRUE;
162}
163
164static void
165_set_labels(Ewe_Ruler_Smart_Data *sd)
166{
167 Ewe_Ruler_Scale *scale;
168 Eina_List *l, *ls;
169 Evas_Object *item;
170
171 EINA_LIST_FOREACH(sd->scales, ls, scale)
172 {
173 int i = - ((int)(scale->zero_pos / scale->mark_step) + 1);
174 EINA_LIST_FOREACH(scale->dashes, l, item)
175 {
176 _print_mark_value(item, scale->format, i * scale->mark_value_step, EINA_FALSE);
177 ++i;
178 }
179
180 if (!scale->show_middle_mark) continue;
181
182 i = - ((int)(scale->zero_pos / scale->mark_step) + 1);
183 EINA_LIST_FOREACH(scale->dashes, l, item)
184 {
185 _print_mark_value(item, scale->format, (i + 0.5) * scale->mark_value_step, EINA_TRUE);
186 ++i;
187 }
188 }
189 sd->text_changed = EINA_FALSE;
190}
77/*----------------------internal realisation API------------------------------*/ 191/*----------------------internal realisation API------------------------------*/
78 192
79EOLIAN static Eina_Bool 193EOLIAN static Eina_Bool
@@ -81,17 +195,41 @@ _ewe_ruler_orient_set(Eo *obj,
81 Ewe_Ruler_Smart_Data *sd, 195 Ewe_Ruler_Smart_Data *sd,
82 Ewe_Ruler_Orient orient) 196 Ewe_Ruler_Orient orient)
83{ 197{
84 Eina_Bool ret;
85 if ((!obj) || (orient < EWE_RULER_ORIENT_HORIZONTAL) || 198 if ((!obj) || (orient < EWE_RULER_ORIENT_HORIZONTAL) ||
86 (orient > EWE_RULER_ORIENT_VERTICAL)) 199 (orient > EWE_RULER_ORIENT_VERTICAL))
87 return EINA_FALSE; 200 return EINA_FALSE;
88 sd->orient = orient; 201 sd->orient = orient;
202 sd->size_changed = EINA_TRUE;
89 203
90 int count = eina_list_count(sd->ruler); 204 Ewe_Ruler_Scale *scale;
91 _delete_extra_dashes(obj, count); 205 Eina_List *ls;
92 eo_do(obj, elm_obj_widget_theme_apply()); 206 int count;
93 ret = EINA_TRUE; 207
94 return ret; 208 if (sd->orient == EWE_RULER_ORIENT_HORIZONTAL)
209 {
210 edje_object_file_set(sd->bg, EWE_THEME, "ewe/ruler/horizontal_background/default");
211 EINA_LIST_FOREACH(sd->scales, ls, scale)
212 {
213 eina_stringshare_del(scale->full_style);
214 scale->full_style = eina_stringshare_printf("%s/%s", DASHES, scale->style);
215 count = eina_list_count(scale->dashes);
216 _delete_extra_dashes(scale, count);
217 }
218 }
219 else
220 {
221 edje_object_file_set(sd->bg, EWE_THEME, "ewe/ruler/vertical_background/default");
222 EINA_LIST_FOREACH(sd->scales, ls, scale)
223 {
224 eina_stringshare_del(scale->full_style);
225 scale->full_style = eina_stringshare_printf("%s/%s", DASHES_VER, scale->style);
226 count = eina_list_count(scale->dashes);
227 _delete_extra_dashes(scale, count);
228 }
229 }
230
231 evas_object_smart_changed(obj);
232 return EINA_TRUE;
95} 233}
96 234
97EOLIAN static Ewe_Ruler_Orient 235EOLIAN static Ewe_Ruler_Orient
@@ -105,53 +243,251 @@ _ewe_ruler_orient_get(Eo *obj, Ewe_Ruler_Smart_Data *sd)
105EOLIAN static Eina_Bool 243EOLIAN static Eina_Bool
106_ewe_ruler_step_set(Eo *obj, 244_ewe_ruler_step_set(Eo *obj,
107 Ewe_Ruler_Smart_Data *sd, 245 Ewe_Ruler_Smart_Data *sd,
246 Ewe_Ruler_Scale *scale,
108 unsigned int step) 247 unsigned int step)
109{ 248{
110 if (!obj) return EINA_FALSE; 249 if (!obj) return EINA_FALSE;
111 if (step == 0) 250 if (!scale) scale = eina_list_data_get(sd->scales);
112 sd->mark_step = 1; 251 if (!scale) return EINA_FALSE;
113 else 252 if (step < MIN_STEP)
114 sd->mark_step = step; 253 step = MIN_STEP;
115 int count = eina_list_count(sd->ruler); 254 if (scale->mark_step == (int)step) return EINA_TRUE;
116 _delete_extra_dashes(obj, count); 255 scale->mark_step = step;
117 sd->size_changed = EINA_TRUE; 256 sd->size_changed = EINA_TRUE;
118 if (sd->geometry.zero_pos != 0)
119 {
120 sd->view_changed = EINA_TRUE;
121 sd->offset_changed = EINA_TRUE;
122 }
123 evas_object_smart_changed(obj); 257 evas_object_smart_changed(obj);
124 return EINA_TRUE; 258 return EINA_TRUE;
125} 259}
126 260
127EOLIAN static unsigned int 261EOLIAN static unsigned int
128_ewe_ruler_step_get(Eo *obj EINA_UNUSED, Ewe_Ruler_Smart_Data *sd) 262_ewe_ruler_step_get(Eo *obj EINA_UNUSED,
263 Ewe_Ruler_Smart_Data *sd,
264 Ewe_Ruler_Scale *scale)
265{
266 if (!scale) scale = eina_list_data_get(sd->scales);
267 if (!scale) return 0;
268 return scale->mark_step;
269}
270
271EOLIAN static Eina_Bool
272_ewe_ruler_value_step_set(Eo *obj,
273 Ewe_Ruler_Smart_Data *sd,
274 Ewe_Ruler_Scale *scale,
275 double step)
129{ 276{
130 return sd->mark_step; 277 if (!obj) return EINA_FALSE;
278 if (!scale) scale = eina_list_data_get(sd->scales);
279 if (!scale) return EINA_FALSE;
280 scale->mark_value_step = step;
281 sd->size_changed = EINA_TRUE;
282 evas_object_smart_changed(obj);
283 return EINA_TRUE;
284}
285
286EOLIAN static double
287_ewe_ruler_value_step_get(Eo *obj EINA_UNUSED,
288 Ewe_Ruler_Smart_Data *sd,
289 Ewe_Ruler_Scale *scale)
290{
291 if (!scale) scale = eina_list_data_get(sd->scales);
292 if (!scale) return 0;
293 return scale->mark_value_step;
131} 294}
132 295
133EOLIAN static Eina_Bool 296EOLIAN static Eina_Bool
134_ewe_ruler_zero_offset_set(Eo *obj, 297_ewe_ruler_zero_offset_set(Eo *obj,
135 Ewe_Ruler_Smart_Data *sd, 298 Ewe_Ruler_Smart_Data *sd,
299 Ewe_Ruler_Scale *scale,
136 int pos) 300 int pos)
137{ 301{
138 if (!obj) return EINA_FALSE; 302 if (!obj) return EINA_FALSE;
139 sd->geometry.zero_pos = pos; 303 if (!scale) scale = eina_list_data_get(sd->scales);
140 if (pos > 0) 304 if (!scale) return EINA_FALSE;
141 sd->zero_pos_increase = EINA_TRUE; 305 if (scale->zero_pos == pos) return EINA_TRUE;
142 else 306 scale->zero_pos = pos;
143 sd->zero_pos_increase = EINA_FALSE; 307 sd->position_changed = EINA_TRUE;
144 sd->view_changed = EINA_TRUE;
145 sd->offset_changed = EINA_TRUE;
146 evas_object_smart_changed(obj); 308 evas_object_smart_changed(obj);
147 return EINA_TRUE; 309 return EINA_TRUE;
148} 310}
149 311
150EOLIAN static int 312EOLIAN static int
151_ewe_ruler_zero_offset_get(Eo *obj EINA_UNUSED, 313_ewe_ruler_zero_offset_get(Eo *obj EINA_UNUSED,
152 Ewe_Ruler_Smart_Data *sd) 314 Ewe_Ruler_Smart_Data *sd,
315 Ewe_Ruler_Scale *scale)
316{
317 if (!scale) scale = eina_list_data_get(sd->scales);
318 if (!scale) return 0;
319 return scale->zero_pos;
320}
321
322EOLIAN static Eina_Bool
323_ewe_ruler_format_set(Eo *obj,
324 Ewe_Ruler_Smart_Data *sd,
325 Ewe_Ruler_Scale *scale,
326 const char *format)
327{
328 if (!obj) return EINA_FALSE;
329 if (!scale) scale = eina_list_data_get(sd->scales);
330 if (!scale) return EINA_FALSE;
331 eina_stringshare_del(scale->format);
332 scale->format = eina_stringshare_add(format);
333 sd->text_changed = EINA_TRUE;
334 evas_object_smart_changed(obj);
335 return EINA_TRUE;
336}
337
338EOLIAN static const char *
339_ewe_ruler_format_get(Eo *obj EINA_UNUSED,
340 Ewe_Ruler_Smart_Data *sd,
341 Ewe_Ruler_Scale *scale)
153{ 342{
154 return sd->geometry.zero_pos; 343 if (!scale) scale = eina_list_data_get(sd->scales);
344 if (!scale) return NULL;
345 return scale->format;
346}
347
348EOLIAN static Eina_Bool
349_ewe_ruler_style_set(Eo *obj,
350 Ewe_Ruler_Smart_Data *sd,
351 Ewe_Ruler_Scale *scale,
352 const char *style)
353{
354 if (!scale) scale = eina_list_data_get(sd->scales);
355 if (!scale) return EINA_FALSE;
356 eina_stringshare_del(scale->style);
357 eina_stringshare_del(scale->full_style);
358 scale->style = eina_stringshare_add(style);
359 if (sd->orient == EWE_RULER_ORIENT_HORIZONTAL)
360 scale->full_style = eina_stringshare_printf("%s/%s", DASHES, style);
361 else
362 scale->full_style = eina_stringshare_printf("%s/%s", DASHES_VER, style);
363
364 int count = eina_list_count(scale->dashes);
365 _delete_extra_dashes(scale, count);
366
367 sd->size_changed = EINA_TRUE;
368 evas_object_smart_changed(obj);
369 return EINA_TRUE;
370}
371
372EOLIAN static const char *
373_ewe_ruler_style_get(Eo *obj EINA_UNUSED,
374 Ewe_Ruler_Smart_Data *sd,
375 Ewe_Ruler_Scale *scale)
376{
377 if (!scale) scale = eina_list_data_get(sd->scales);
378 if (!scale) return 0;
379 return scale->style;
380}
381
382EOLIAN static Ewe_Ruler_Scale *
383_ewe_ruler_scale_add(Eo *obj EINA_UNUSED,
384 Ewe_Ruler_Smart_Data *sd,
385 const char *style)
386{
387 Ewe_Ruler_Scale *ret = malloc(sizeof(Ewe_Ruler_Scale));
388 if (!ret) return NULL;
389 if (!style) style = DEFAULT_STYLE;
390
391 sd->scales = eina_list_append(sd->scales, ret);
392
393 ret->dashes = NULL;
394 ret->visible = EINA_TRUE;
395 ret->mark_step = DEFAULT_STEP;
396 ret->mark_value_step = DEFAULT_STEP;
397 ret->style = eina_stringshare_add(style);
398 if (sd->orient == EWE_RULER_ORIENT_HORIZONTAL)
399 ret->full_style = eina_stringshare_printf("%s/%s", DASHES, style);
400 else
401 ret->full_style = eina_stringshare_printf("%s/%s", DASHES_VER, style);
402 ret->format = eina_stringshare_add(DEFAULT_FORMAT);
403 ret->show_middle_mark = EINA_FALSE;
404 ret->zero_pos = 0;
405
406 return ret;
407}
408
409EOLIAN static Eina_Bool
410_ewe_ruler_scale_del(Eo *obj EINA_UNUSED,
411 Ewe_Ruler_Smart_Data *sd,
412 Ewe_Ruler_Scale *scale)
413{
414 eina_stringshare_del(scale->style);
415 eina_stringshare_del(scale->full_style);
416 eina_stringshare_del(scale->format);
417
418 int count = eina_list_count(scale->dashes);
419 _delete_extra_dashes(scale, count);
420
421 sd->scales = eina_list_remove(sd->scales, scale);
422 free(scale);
423 return EINA_TRUE;
424}
425
426EOLIAN static Eina_Bool
427_ewe_ruler_scale_visible_get(Eo *obj EINA_UNUSED,
428 Ewe_Ruler_Smart_Data *sd,
429 Ewe_Ruler_Scale *scale)
430{
431 if (!scale) scale = eina_list_data_get(sd->scales);
432 if (!scale) return EINA_FALSE;
433 return scale->visible;
434}
435
436EOLIAN static Eina_Bool
437_ewe_ruler_scale_visible_set(Eo *obj EINA_UNUSED,
438 Ewe_Ruler_Smart_Data *sd,
439 Ewe_Ruler_Scale *scale,
440 Eina_Bool visible)
441{
442 if (!scale) scale = eina_list_data_get(sd->scales);
443 if (!scale) return EINA_FALSE;
444 if (scale->visible == visible) return EINA_TRUE;
445 scale->visible = visible;
446 Eina_List *l;
447 Evas_Object *data;
448 if (!visible)
449 EINA_LIST_FOREACH(scale->dashes, l, data)
450 evas_object_hide(data);
451 else if (sd->ruler_visible)
452 EINA_LIST_FOREACH(scale->dashes, l, data)
453 evas_object_show(data);
454 sd->size_changed = EINA_TRUE;
455 evas_object_smart_changed(obj);
456 return EINA_TRUE;
457}
458
459EOLIAN static Eina_Bool
460_ewe_ruler_scale_middle_mark_get(Eo *obj EINA_UNUSED,
461 Ewe_Ruler_Smart_Data *sd,
462 Ewe_Ruler_Scale *scale)
463{
464 if (!scale) scale = eina_list_data_get(sd->scales);
465 if (!scale) return EINA_FALSE;
466 return scale->show_middle_mark;
467}
468
469EOLIAN static Eina_Bool
470_ewe_ruler_scale_middle_mark_set(Eo *obj EINA_UNUSED,
471 Ewe_Ruler_Smart_Data *sd,
472 Ewe_Ruler_Scale *scale,
473 Eina_Bool middle_mark)
474{
475 if (!scale) scale = eina_list_data_get(sd->scales);
476 if (!scale) return EINA_FALSE;
477 if (scale->show_middle_mark == middle_mark) return EINA_TRUE;
478 scale->show_middle_mark = middle_mark;
479
480 if (!middle_mark)
481 {
482 Eina_List *l;
483 Evas_Object *mark;
484 EINA_LIST_FOREACH(scale->dashes, l, mark)
485 edje_object_part_text_set(mark, "ewe.middle.text", "");
486 }
487
488 sd->text_changed = EINA_TRUE;
489 evas_object_smart_changed(obj);
490 return EINA_TRUE;
155} 491}
156 492
157/*------------------------Smart functions ----------------------------*/ 493/*------------------------Smart functions ----------------------------*/
@@ -169,34 +505,27 @@ _ewe_ruler_evas_object_smart_add(Eo *obj, Ewe_Ruler_Smart_Data *sd)
169 evas_object_smart_member_add(sd->bg, obj); 505 evas_object_smart_member_add(sd->bg, obj);
170 506
171 sd->orient = EWE_RULER_ORIENT_HORIZONTAL; 507 sd->orient = EWE_RULER_ORIENT_HORIZONTAL;
172 sd->ruler = NULL;
173 sd->geometry.width = 0; 508 sd->geometry.width = 0;
174 sd->geometry.high = 0; 509 sd->geometry.height = 0;
175 sd->geometry.item_width = DEFAULT_STEP;
176 sd->geometry.item_high = DEFAULT_STEP;
177 sd->geometry.x = 0; 510 sd->geometry.x = 0;
178 sd->geometry.y = 0; 511 sd->geometry.y = 0;
179 sd->delta_width = 0;
180 sd->delta_high = 0;
181 sd->geometry.new_pos = 0;
182 sd->geometry.zero_pos = 0;
183 sd->new_mark_value = 0;
184 sd->ruler_visible = EINA_FALSE; 512 sd->ruler_visible = EINA_FALSE;
185 sd->pointer_visible = EINA_TRUE; 513 sd->pointer_visible = EINA_TRUE;
186 sd->mark_step = DEFAULT_STEP; 514 sd->size_changed = EINA_TRUE;
187 sd->show_middle_mark = EINA_FALSE; 515 sd->text_changed = EINA_TRUE;
188 sd->size_changed = EINA_FALSE; 516 sd->position_changed = EINA_TRUE;
189 sd->view_changed = EINA_FALSE; 517 ewe_ruler_scale_add(obj, NULL);
190 sd->offset_changed = EINA_FALSE;
191 sd->zero_pos_increase = EINA_FALSE;
192 eo_do(obj, elm_obj_widget_theme_apply());
193} 518}
194 519
195EOLIAN static void 520EOLIAN static void
196_ewe_ruler_evas_object_smart_del(Eo *obj, Ewe_Ruler_Smart_Data *sd) 521_ewe_ruler_evas_object_smart_del(Eo *obj EINA_UNUSED,
522 Ewe_Ruler_Smart_Data *sd)
197{ 523{
198 int count = eina_list_count(sd->ruler); 524 Ewe_Ruler_Scale *scale;
199 _delete_extra_dashes(obj, count); 525 Eina_List *ls;
526
527 EINA_LIST_FOREACH(sd->scales, ls, scale)
528 ewe_ruler_scale_del(obj, scale);
200 529
201 evas_object_smart_member_del(sd->clip); 530 evas_object_smart_member_del(sd->clip);
202 evas_object_del(sd->clip); 531 evas_object_del(sd->clip);
@@ -209,29 +538,37 @@ EOLIAN static void
209_ewe_ruler_evas_object_smart_show(Eo* obj, Ewe_Ruler_Smart_Data *sd) 538_ewe_ruler_evas_object_smart_show(Eo* obj, Ewe_Ruler_Smart_Data *sd)
210{ 539{
211 if (sd->ruler_visible) return; 540 if (sd->ruler_visible) return;
212 Eina_List *l;
213 Evas_Object *data;
214 eo_do_super(obj, MY_CLASS, evas_obj_smart_show()); 541 eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
542 Ewe_Ruler_Scale *scale;
543 Eina_List *ls, *l;
544 Evas_Object *data;
545
215 evas_object_show(sd->bg); 546 evas_object_show(sd->bg);
216 evas_object_show(sd->clip); 547 evas_object_show(sd->clip);
217 EINA_LIST_FOREACH(sd->ruler, l, data)
218 evas_object_show(data);
219 sd->ruler_visible = EINA_TRUE;
220 548
549 sd->ruler_visible = EINA_TRUE;
550 EINA_LIST_FOREACH(sd->scales, ls, scale)
551 if ((scale) && (scale->visible))
552 EINA_LIST_FOREACH(scale->dashes, l, data)
553 evas_object_show(data);
221} 554}
222 555
223EOLIAN static void 556EOLIAN static void
224_ewe_ruler_evas_object_smart_hide(Eo* obj, Ewe_Ruler_Smart_Data *sd) 557_ewe_ruler_evas_object_smart_hide(Eo* obj, Ewe_Ruler_Smart_Data *sd)
225{ 558{
226 if (!sd->ruler_visible) return; 559 if (!sd->ruler_visible) return;
227 Eina_List *l;
228 Evas_Object *data;
229 eo_do_super(obj, MY_CLASS, evas_obj_smart_hide()); 560 eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
561 Ewe_Ruler_Scale *scale;
562 Eina_List *ls, *l;
563 Evas_Object *data;
564
230 evas_object_hide(sd->bg); 565 evas_object_hide(sd->bg);
231 evas_object_hide(sd->clip); 566 evas_object_hide(sd->clip);
232 EINA_LIST_FOREACH(sd->ruler, l, data) 567
233 evas_object_hide(data);
234 sd->ruler_visible = EINA_FALSE; 568 sd->ruler_visible = EINA_FALSE;
569 EINA_LIST_FOREACH(sd->scales, ls, scale)
570 EINA_LIST_FOREACH(scale->dashes, l, data)
571 evas_object_hide(data);
235} 572}
236 573
237EOLIAN static void 574EOLIAN static void
@@ -247,7 +584,7 @@ _ewe_ruler_evas_object_smart_move(Eo *obj,
247 584
248 sd->geometry.x = x; 585 sd->geometry.x = x;
249 sd->geometry.y = y; 586 sd->geometry.y = y;
250 sd->view_changed = EINA_TRUE; 587 sd->position_changed = EINA_TRUE;
251 evas_object_smart_changed(obj); 588 evas_object_smart_changed(obj);
252} 589}
253 590
@@ -257,259 +594,65 @@ _ewe_ruler_evas_object_smart_resize(Eo *obj,
257 Evas_Coord w, 594 Evas_Coord w,
258 Evas_Coord h) 595 Evas_Coord h)
259{ 596{
260 sd->ruler_visible = EINA_FALSE; 597 int delta_width = w - sd->geometry.width;
261 sd->delta_width = w - sd->geometry.width; 598 int delta_height = h - sd->geometry.height;
262 sd->delta_high = h - sd->geometry.high; 599 if ((delta_height == 0) && (delta_width == 0))
600 return;
601 sd->size_changed = EINA_TRUE;
263 sd->geometry.width = w; 602 sd->geometry.width = w;
264 sd->geometry.high = h; 603 sd->geometry.height = h;
265 eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h)); 604 eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
266 evas_object_resize(sd->clip, w, h); 605 evas_object_resize(sd->clip, w, h);
267 evas_object_resize(sd->bg, w, h); 606 evas_object_resize(sd->bg, w, h);
268 if ((sd->delta_high != 0) || (sd->delta_width != 0)) 607
269 sd->size_changed = EINA_TRUE;
270 evas_object_smart_changed(obj); 608 evas_object_smart_changed(obj);
271} 609}
272 610
273
274EOLIAN static void 611EOLIAN static void
275_ewe_ruler_evas_object_smart_calculate(Eo *obj, Ewe_Ruler_Smart_Data *sd) 612_ewe_ruler_evas_object_smart_calculate(Eo *obj EINA_UNUSED,
613 Ewe_Ruler_Smart_Data *sd)
276{ 614{
277 Evas *canvas = evas_object_evas_get(obj);
278
279 int diff_units, mrk, i, x_last, y_last;
280 int ruler_count_item, need_ruler_count_item;
281 Eina_List *l;
282 Eina_Stringshare *buf, *mark;
283 Evas_Object *item;
284
285 ruler_count_item = eina_list_count(sd->ruler);
286
287 if (sd->size_changed) 615 if (sd->size_changed)
288 { 616 _add_dashes(sd);
289 if ((!sd->geometry.width) || (!sd->geometry.high)) 617 if (sd->position_changed)
290 { 618 _place_dashes(sd);
291 _delete_extra_dashes(obj, ruler_count_item); 619 if (sd->text_changed)
292 return; 620 _set_labels(sd);
293 }
294
295 if (sd->orient == EWE_RULER_ORIENT_HORIZONTAL)
296 {
297 need_ruler_count_item = sd->geometry.width / sd->mark_step + 2;
298 diff_units = need_ruler_count_item - ruler_count_item / 2;
299
300 if (diff_units == 0)
301 goto move;
302
303 if ((!ruler_count_item) && (!sd->geometry.zero_pos))
304 {
305 mrk = -sd->mark_step;
306 x_last = mrk + sd->geometry.x;
307 }
308 else if ((!ruler_count_item) && (sd->geometry.zero_pos))
309 {
310 mrk = sd->new_mark_value - sd->mark_step;
311 x_last = sd->geometry.x + sd->geometry.new_pos - sd->mark_step;
312 }
313 else
314 {
315 mrk = (sd->geometry.width - sd->delta_width) -
316 (sd->geometry.width - sd->delta_width) % sd->mark_step +
317 sd->new_mark_value + sd->mark_step;
318 x_last = mrk + sd->geometry.x + sd->geometry.new_pos -
319 sd->new_mark_value;
320 }
321
322 if (diff_units > 0)
323 {
324 for (i = 1; i <= diff_units; ++i)
325 {
326 _EWE_RULER_UNIT_ADD(obj, item, MARKS);
327 mark = eina_stringshare_printf("%d", i * sd->mark_step + mrk);
328 edje_object_part_text_set(item, "ewe.text", mark);
329 evas_object_geometry_set(item, i * sd->mark_step + x_last,
330 sd->geometry.y, sd->mark_step, sd->geometry.high);
331
332 _EWE_RULER_UNIT_ADD(obj, item, DASHES);
333 if (sd->show_middle_mark)
334 {
335 mark = eina_stringshare_printf("%d",
336 (int)((i + 0.5) * sd->mark_step + mrk));
337 edje_object_part_text_set(item, "ewe.text", mark);
338 }
339 evas_object_geometry_set(item, i * sd->mark_step + x_last,
340 sd->geometry.y, sd->mark_step, sd->geometry.high);
341 }
342 }
343 else
344 _delete_extra_dashes(obj, -2 * diff_units);
345 }
346 else
347 {
348 need_ruler_count_item = sd->geometry.high / sd->mark_step + 2;
349 diff_units = need_ruler_count_item - ruler_count_item / 2;
350
351 if (diff_units == 0)
352 goto move;
353
354 if ((!ruler_count_item) && (!sd->geometry.zero_pos))
355 {
356 mrk = -sd->mark_step;
357 y_last = mrk + sd->geometry.y;
358 }
359 else if ((!ruler_count_item) && (sd->geometry.zero_pos))
360 {
361 mrk = sd->new_mark_value - sd->mark_step;
362 y_last = sd->geometry.y + sd->geometry.new_pos - sd->mark_step;
363 }
364 else
365 {
366 mrk = (sd->geometry.high - sd->delta_high) -
367 (sd->geometry.high - sd->delta_high) % sd->mark_step +
368 sd->new_mark_value + sd->mark_step;
369 y_last = mrk + sd->geometry.y + sd->geometry.new_pos -
370 sd->new_mark_value;
371 }
372
373 if (diff_units > 0)
374 {
375 for (i = 1; i <= diff_units; ++i)
376 {
377 _EWE_RULER_UNIT_ADD(obj, item, MARKS_VER);
378 mark = eina_stringshare_printf("%d", i * sd->mark_step + mrk);
379 edje_object_part_text_set(item, "ewe.text", mark);
380 evas_object_geometry_set(item, sd->geometry.x,
381 i * sd->mark_step + y_last, sd->geometry.width, sd->mark_step);
382
383 _EWE_RULER_UNIT_ADD(obj, item, DASHES_VER);
384 if (sd->show_middle_mark)
385 {
386 mark = eina_stringshare_printf
387 ("%d", (int)((i + 0.5) * sd->mark_step + mrk));
388 edje_object_part_text_set(item, "ewe.text", mark);
389 }
390 evas_object_geometry_set(item, sd->geometry.x,
391 i * sd->mark_step + y_last, sd->geometry.width, sd->mark_step);
392 }
393 }
394 else
395 _delete_extra_dashes(obj, -2 * diff_units);
396 }
397 sd->size_changed = EINA_FALSE;
398 }
399
400move:
401 if (sd->view_changed)
402 {
403 i = 0;
404 Eina_Bool item_width_changed, item_high_changed;
405 item = eina_list_data_get(sd->ruler);
406
407 if (sd->offset_changed)
408 {
409 if (sd->zero_pos_increase)
410 {
411 sd->geometry.new_pos =
412 sd->geometry.zero_pos % sd->mark_step - sd->mark_step;
413 sd->new_mark_value =
414 ((sd->geometry.zero_pos / sd->mark_step) * (-1) - 1) * sd->mark_step;
415 }
416 else
417 {
418 sd->geometry.new_pos =
419 -1 * (abs(sd->geometry.zero_pos) % sd->mark_step);
420 sd->new_mark_value =
421 ((sd->geometry.zero_pos * (-1) / sd->mark_step)) * sd->mark_step;
422 }
423 }
424
425 if (sd->orient == EWE_RULER_ORIENT_HORIZONTAL)
426 {
427 item_high_changed = ((sd->geometry.item_high) != (sd->geometry.high));
428 if (item_high_changed)
429 sd->geometry.item_high = sd->geometry.high;
430 EINA_LIST_FOREACH(sd->ruler, l, item)
431 {
432 if (item_high_changed)
433 evas_object_resize(item, sd->mark_step, sd->geometry.high);
434 evas_object_move(item,
435 i * sd->mark_step + sd->geometry.x + sd->geometry.new_pos, sd->geometry.y);
436 if (sd->offset_changed)
437 {
438 buf = edje_object_part_text_get(item, "ewe.text");
439 if (buf) eina_stringshare_del(buf);
440 buf = eina_stringshare_printf("%d", i * sd->mark_step +
441 sd->new_mark_value);
442 edje_object_part_text_set(item, "ewe.text", buf);
443 }
444
445 l = eina_list_next(l);
446 if (item_high_changed)
447 evas_object_resize(item, sd->geometry.width, sd->geometry.high);
448 item = eina_list_data_get(l);
449 if ((sd->offset_changed) && (sd->show_middle_mark))
450 {
451 buf = edje_object_part_text_get(item, "ewe.text");
452 if (buf) eina_stringshare_del(buf);
453 buf = eina_stringshare_printf("%d",
454 (int)((i + 0.5) * sd->mark_step) + sd->new_mark_value);
455 edje_object_part_text_set(item, "ewe.text", buf);
456 }
457 evas_object_move(item,
458 i * sd->mark_step + sd->geometry.x + sd->geometry.new_pos, sd->geometry.y);
459 i++;
460 }
461 }
462 else
463 {
464 item_width_changed = ((sd->geometry.item_width) != (sd->geometry.width));
465 if (item_width_changed)
466 sd->geometry.item_width = sd->geometry.width;
467 EINA_LIST_FOREACH(sd->ruler, l, item)
468 {
469 if (item_width_changed)
470 evas_object_resize(item, sd->geometry.width, sd->mark_step);
471 evas_object_move(item,
472 sd->geometry.x, i * sd->mark_step + sd->geometry.y + sd->geometry.new_pos);
473 if (sd->offset_changed)
474 {
475 buf = edje_object_part_text_get(item, "ewe.text");
476 if (buf) eina_stringshare_del(buf);
477 buf = eina_stringshare_printf
478 ("%d", i * sd->mark_step + sd->new_mark_value);
479 edje_object_part_text_set(item, "ewe.text", buf);
480 }
481
482 l = eina_list_next(l);
483 item = eina_list_data_get(l);
484 if ((sd->offset_changed) && (sd->show_middle_mark))
485 {
486 buf = edje_object_part_text_get(item, "ewe.text");
487 if (buf) eina_stringshare_del(buf);
488 buf = eina_stringshare_printf("%d",
489 (int)((i + 0.5) * sd->mark_step) + sd->new_mark_value);
490 edje_object_part_text_set(item, "ewe.text", buf);
491 }
492 evas_object_move(item,
493 sd->geometry.x, i * sd->mark_step + sd->geometry.y + sd->geometry.new_pos);
494 i++;
495 }
496 }
497 sd->view_changed = EINA_FALSE;
498 sd->offset_changed = EINA_FALSE;
499 }
500} 621}
501 622
502EOLIAN static Eina_Bool 623EOLIAN static Eina_Bool
503_ewe_ruler_elm_widget_theme_apply(Eo *obj, Ewe_Ruler_Smart_Data *sd) 624_ewe_ruler_elm_widget_theme_apply(Eo *obj, Ewe_Ruler_Smart_Data *sd)
504{ 625{
505 Eina_Bool int_ret; 626 Eina_Bool int_ret;
627 int count;
506 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_theme_apply()); 628 eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_theme_apply());
507 if (!int_ret) return EINA_FALSE; 629 if (!int_ret) return EINA_FALSE;
508 630
631 Ewe_Ruler_Scale *scale;
632 Eina_List *ls;
633
509 if (sd->orient == EWE_RULER_ORIENT_HORIZONTAL) 634 if (sd->orient == EWE_RULER_ORIENT_HORIZONTAL)
510 edje_object_file_set(sd->bg, EWE_THEME, "ewe/ruler/horizontal_background/default"); 635 {
636 edje_object_file_set(sd->bg, EWE_THEME, "ewe/ruler/horizontal_background/default");
637 EINA_LIST_FOREACH(sd->scales, ls, scale)
638 {
639 eina_stringshare_del(scale->full_style);
640 scale->full_style = eina_stringshare_printf("%s/%s", DASHES, scale->style);
641 count = eina_list_count(scale->dashes);
642 _delete_extra_dashes(scale, count);
643 }
644 }
511 else 645 else
512 edje_object_file_set(sd->bg, EWE_THEME, "ewe/ruler/vertical_background/default"); 646 {
647 edje_object_file_set(sd->bg, EWE_THEME, "ewe/ruler/vertical_background/default");
648 EINA_LIST_FOREACH(sd->scales, ls, scale)
649 {
650 eina_stringshare_del(scale->full_style);
651 scale->full_style = eina_stringshare_printf("%s/%s", DASHES_VER, scale->style);
652 count = eina_list_count(scale->dashes);
653 _delete_extra_dashes(scale, count);
654 }
655 }
513 return EINA_TRUE; 656 return EINA_TRUE;
514} 657}
515 658
diff --git a/src/lib/ewe_ruler.eo b/src/lib/ewe_ruler.eo
index 6e4fe92..ee767da 100644
--- a/src/lib/ewe_ruler.eo
+++ b/src/lib/ewe_ruler.eo
@@ -12,6 +12,15 @@ class Ewe_Ruler (Elm_Widget)
12 @return EWE_RULER_ORIENT_HORIZONTAL or EWE_RULER_ORIENT_VERTICAL, NULL otherwise 12 @return EWE_RULER_ORIENT_HORIZONTAL or EWE_RULER_ORIENT_VERTICAL, NULL otherwise
13 @ingroup ruler*/ 13 @ingroup ruler*/
14 } 14 }
15 set {
16 /*@
17 Change the ruler's orientation to horizontal or vertical.
18
19 @return EINA_TRUE if orientation was set or EINA_FALSE on failure.
20
21 @ingroup ruler*/
22 return Eina_Bool;
23 }
15 values { 24 values {
16 Ewe_Ruler_Orient orient; 25 Ewe_Ruler_Orient orient;
17 } 26 }
@@ -25,10 +34,47 @@ class Ewe_Ruler (Elm_Widget)
25 @return step 34 @return step
26 @ingroup ruler*/ 35 @ingroup ruler*/
27 } 36 }
37 set {
38 /*@
39 Set step between marks of the ruler
40
41 @return EINA_TRUE if step was set or EINA_FALSE on failure.
42
43 @ingroup ruler*/
44 return Eina_Bool;
45 }
46 keys {
47 Ewe_Ruler_Scale *scale;
48 }
28 values { 49 values {
29 uint step; 50 uint step;
30 } 51 }
31 } 52 }
53 value_step {
54 get {
55 /*@
56 Get step between marks values of the ruler.
57
58 @param obj The ruler object
59 @return step
60 @ingroup ruler*/
61 }
62 set {
63 /*@
64 Set step between marks values of the scale
65
66 @return EINA_TRUE if step was set or EINA_FALSE on failure.
67
68 @ingroup ruler*/
69 return Eina_Bool;
70 }
71 keys {
72 Ewe_Ruler_Scale *scale;
73 }
74 values {
75 double step;
76 }
77 }
32 zero_offset { 78 zero_offset {
33 get { 79 get {
34 /*@ 80 /*@
@@ -38,45 +84,153 @@ class Ewe_Ruler (Elm_Widget)
38 @return offset 84 @return offset
39 @ingroup ruler*/ 85 @ingroup ruler*/
40 } 86 }
87 set {
88 /*@
89 Change the ruler's "zero pointer" mark position
90 @return EINA_TRUE if offset was set or EINA_FALSE on failure.
91
92 @ingroup ruler*/
93 return Eina_Bool;
94 }
95 keys {
96 Ewe_Ruler_Scale *scale;
97 }
41 values { 98 values {
42 int offset; 99 int offset;
43 } 100 }
44 } 101 }
45 } 102 format {
46 methods { 103 get {
47 orient_set {
48 /*@ 104 /*@
49 Change the ruler's orientation to horizontal or vertical. 105 Get format string of given scale.
50 106
51 @return EINA_TRUE if orientation was set or EINA_FALSE on failure. 107 @param obj The ruler object
108 @return format string
109 @ingroup ruler*/
110 }
111 set {
112 /*@
113 Set format string for given scale
114
115 @return EINA_TRUE if format was setted or EINA_FALSE on failure.
52 116
53 @ingroup ruler*/ 117 @ingroup ruler*/
54 return Eina_Bool; 118 return Eina_Bool;
55 params { 119 }
56 @in Ewe_Ruler_Orient orient; /*@The Ruler orientation*/ 120 keys {
121 Ewe_Ruler_Scale *scale;
122 }
123 values {
124 const(char) *format;
57 } 125 }
58 } 126 }
59 step_set { 127 style {
128 get {
60 /*@ 129 /*@
61 Set step between marks of the ruler 130 Get style of given scale.
62 131
63 @return EINA_TRUE if step was set or EINA_FALSE on failure. 132 @param obj The ruler object
133 @return style
134 @ingroup ruler*/
135 }
136 set {
137 /*@
138 Set style for given scale
139
140 @return EINA_TRUE if style was setted or EINA_FALSE on failure.
64 141
65 @ingroup ruler*/ 142 @ingroup ruler*/
66 return Eina_Bool; 143 return Eina_Bool;
67 params { 144 }
68 @in uint step; /*@The Ruler's step between marks*/ 145 keys {
146 Ewe_Ruler_Scale *scale;
147 }
148 values {
149 const(char) *style;
69 } 150 }
70 } 151 }
71 zero_offset_set { 152 scale_visible {
153 get {
72 /*@ 154 /*@
73 Change the ruler's "zero pointer" mark position 155 Get visibility of given scale
156
157 @param obj The ruler object
158 @param scale Scale
159 @return visibility
160 @ingroup ruler*/
161 }
162 set {
163 /*@
164 Change the scale's visibility
165 @param obj The ruler object
166 @param scale Scale
167 @param visible New visibility state of given scale
74 @return EINA_TRUE if offset was set or EINA_FALSE on failure. 168 @return EINA_TRUE if offset was set or EINA_FALSE on failure.
75 169
76 @ingroup ruler*/ 170 @ingroup ruler*/
77 return Eina_Bool; 171 return Eina_Bool;
172 }
173 keys {
174 Ewe_Ruler_Scale *scale;
175 }
176 values {
177 Eina_Bool visible;
178 }
179 }
180 scale_middle_mark {
181 get {
182 /*@
183 Get visibility of middle mark in given scale
184
185 @param obj The ruler object
186 @param scale Scale
187 @return visibility
188 @ingroup ruler*/
189 }
190 set {
191 /*@
192 Change the scale middle mark visibility
193 @param obj The ruler object
194 @param scale Scale
195 @param middle_mark New visibility state of middle mark in scale
196 @return EINA_TRUE if middle_mark was set or EINA_FALSE on failure.
197
198 @ingroup ruler*/
199 return Eina_Bool;
200 }
201 keys {
202 Ewe_Ruler_Scale *scale;
203 }
204 values {
205 Eina_Bool middle_mark;
206 }
207 }
208 }
209 methods {
210 scale_add {
211 /*@
212 Add new scale to ruler.
213 @param obj The ruler object
214 @param style Style of new scale. NULL - default.
215 @return Scale object or NULL on failure.
216
217 @ingroup ruler*/
218 return Ewe_Ruler_Scale *;
219 params {
220 const(char) *style;
221 }
222 }
223 scale_del {
224 /*@
225 Delete given scale from ruler.
226 @param obj The ruler object
227 @param scale Scale to be deleted
228 @return EINA_TRUE on success, EIAN_FALSE on failure.
229
230 @ingroup ruler*/
231 return Eina_Bool;
78 params { 232 params {
79 @in int pos; /*@Position for zero pointer*/ 233 Ewe_Ruler_Scale *scale;
80 } 234 }
81 } 235 }
82 } 236 }
diff --git a/src/lib/ewe_ruler.h b/src/lib/ewe_ruler.h
index 512457d..ed36417 100644
--- a/src/lib/ewe_ruler.h
+++ b/src/lib/ewe_ruler.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20#ifndef EWE_RULER_HEADER_H 19#ifndef EWE_RULER_HEADER_H
diff --git a/src/lib/ewe_ruler_common.h b/src/lib/ewe_ruler_common.h
index 7a28e53..87fe1b0 100644
--- a/src/lib/ewe_ruler_common.h
+++ b/src/lib/ewe_ruler_common.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20 19
@@ -25,3 +24,16 @@ typedef enum
25 EWE_RULER_ORIENT_VERTICAL, /**< Ruler (dis)appears in vertical mode */ 24 EWE_RULER_ORIENT_VERTICAL, /**< Ruler (dis)appears in vertical mode */
26} Ewe_Ruler_Orient; 25} Ewe_Ruler_Orient;
27 26
27typedef struct _Ewe_Ruler_Scale Ewe_Ruler_Scale;
28struct _Ewe_Ruler_Scale
29{
30 Eina_List *dashes;
31 Eina_Stringshare *format;
32 Eina_Stringshare *style;
33 Eina_Stringshare *full_style;
34 double mark_value_step;
35 int mark_step;
36 int zero_pos;
37 Eina_Bool visible : 1;
38 Eina_Bool show_middle_mark : 1;
39};
diff --git a/src/lib/ewe_ruler_eo.h b/src/lib/ewe_ruler_eo.h
index cf1a891..53d83f6 100644
--- a/src/lib/ewe_ruler_eo.h
+++ b/src/lib/ewe_ruler_eo.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20#include "ewe_ruler.eo.h" 19#include "ewe_ruler.eo.h"
diff --git a/src/lib/ewe_ruler_legacy.h b/src/lib/ewe_ruler_legacy.h
index 6a411e7..689d9f8 100644
--- a/src/lib/ewe_ruler_legacy.h
+++ b/src/lib/ewe_ruler_legacy.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19#ifndef EWE_RULER_LEGACY 18#ifndef EWE_RULER_LEGACY
20#define EWE_RULER_LEGACY 19#define EWE_RULER_LEGACY
@@ -60,10 +59,10 @@ EAPI Ewe_Ruler_Orient
60ewe_ruler_orient_get(const Eo *obj); 59ewe_ruler_orient_get(const Eo *obj);
61 60
62/** 61/**
63 * Set step between marks of the ruler. If step is setting to 0, it would be 62 * Set step between marks in given scale of the ruler. Min step is 10.
64 * setting to 1.
65 * 63 *
66 * @param obj Ruler object. 64 * @param obj Ruler object.
65 * @param scale Scale. NULL for default scale
67 * @param step Step between marks. 66 * @param step Step between marks.
68 * 67 *
69 * @return EINA_TRUE if step was set or EINA_FALSE on failure. 68 * @return EINA_TRUE if step was set or EINA_FALSE on failure.
@@ -71,25 +70,54 @@ ewe_ruler_orient_get(const Eo *obj);
71 * @ingroup Ruler 70 * @ingroup Ruler
72 */ 71 */
73EAPI Eina_Bool 72EAPI Eina_Bool
74ewe_ruler_step_set(Evas_Object *obj, unsigned int step); 73ewe_ruler_step_set(Evas_Object *obj, Ewe_Ruler_Scale * scale, unsigned int step);
75 74
76/** 75/**
77 * Get step between marks of the ruler 76 * Get step between marks in given scale of the ruler
78 * 77 *
79 * @param obj Ruler object. 78 * @param obj Ruler object.
79 * @param scale Scale. NULL for default scale
80 * 80 *
81 * @return value step between marks. 81 * @return value step between marks.
82 * 82 *
83 * @ingroup Ruler 83 * @ingroup Ruler
84 */ 84 */
85EAPI unsigned int 85EAPI unsigned int
86ewe_ruler_step_get(const Eo *obj); 86ewe_ruler_step_get(const Eo *obj, Ewe_Ruler_Scale * scale);
87 87
88/** 88/**
89 * Change the ruler's "zero pointer" mark position in pixels relative to 89 * Set step between marks values in given scale of the ruler.
90 *
91 * @param obj Ruler object.
92 * @param scale Scale. NULL for default scale
93 * @param step Step between marks values.
94 *
95 * @return EINA_TRUE if step was set or EINA_FALSE on failure.
96 *
97 * @ingroup Ruler
98 */
99EAPI Eina_Bool
100ewe_ruler_value_step_set(Evas_Object *obj, Ewe_Ruler_Scale *scale, double step);
101
102/**
103 * Get step between marks values in given scale of the ruler
104 *
105 * @param obj Ruler object.
106 * @param scale Scale. NULL for default scale
107 *
108 * @return value step between marks values.
109 *
110 * @ingroup Ruler
111 */
112EAPI double
113ewe_ruler_value_step_get(const Eo *obj, Ewe_Ruler_Scale *scale);
114
115/**
116 * Change the scales "zero pointer" mark position in pixels relative to
90 * start parent's layout 117 * start parent's layout
91 * 118 *
92 * @param obj Ruler object. 119 * @param obj Ruler object.
120 * @param scale Scale. NULL for default scale
93 * @param pos Position 121 * @param pos Position
94 * 122 *
95 * @return EINA_TRUE if pointer was set or EINA_FALSE on failure. 123 * @return EINA_TRUE if pointer was set or EINA_FALSE on failure.
@@ -97,18 +125,152 @@ ewe_ruler_step_get(const Eo *obj);
97 * @ingroup Ruler 125 * @ingroup Ruler
98 */ 126 */
99EAPI Eina_Bool 127EAPI Eina_Bool
100ewe_ruler_zero_offset_set(Evas_Object *obj, int pos); 128ewe_ruler_zero_offset_set(Evas_Object *obj, Ewe_Ruler_Scale * scale, int pos);
101 129
102/** 130/**
103 * Get "zero pointer" mark position 131 * Get "zero pointer" mark position of given scale
104 * 132 *
105 * @param obj Ruler object. 133 * @param obj Ruler object.
134 * @param scale Scale. NULL for default scale
106 * 135 *
107 * @return value position in pixels "zero pointer" from start parent's layout. 136 * @return value position in pixels "zero pointer" from start parent's layout.
108 * 137 *
109 * @ingroup Ruler 138 * @ingroup Ruler
110 */ 139 */
111EAPI int 140EAPI int
112ewe_ruler_zero_offset_get(const Eo *obj); 141ewe_ruler_zero_offset_get(const Eo *obj, Ewe_Ruler_Scale * scale);
142
143/**
144 * Set format string for given scale of the ruler.
145 *
146 * @param obj Ruler object.
147 * @param scale Scale. NULL for default scale
148 * @param format New format string.
149 *
150 * @return EINA_TRUE if format string was setted or EINA_FALSE on failure.
151 *
152 * @ingroup Ruler
153 */
154EAPI Eina_Bool
155ewe_ruler_format_set(Evas_Object *obj, Ewe_Ruler_Scale *scale, const char *format);
156
157/**
158 * Get format string of given scale
159 *
160 * @param obj Ruler object.
161 * @param scale Scale. NULL for default scale
162 *
163 * @return format string.
164 *
165 * @ingroup Ruler
166 */
167EAPI const char *
168ewe_ruler_format_get(const Eo *obj, Ewe_Ruler_Scale *scale);
169
170/**
171 * Set style for given scale of the ruler.
172 *
173 * @param obj Ruler object.
174 * @param scale Scale. NULL for default scale
175 * @param style New style.
176 *
177 * @return EINA_TRUE if style was setted or EINA_FALSE on failure.
178 *
179 * @ingroup Ruler
180 */
181EAPI Eina_Bool
182ewe_ruler_style_set(Evas_Object *obj, Ewe_Ruler_Scale *scale, const char *style);
183
184/**
185 * Get style of given scale
186 *
187 * @param obj Ruler object.
188 * @param scale Scale. NULL for default scale
189 *
190 * @return style string.
191 *
192 * @ingroup Ruler
193 */
194EAPI const char *
195ewe_ruler_style_get(const Eo *obj, Ewe_Ruler_Scale *scale);
113 196
197/**
198 * Add new scale to the ruler
199 *
200 * @param obj Ruler object.
201 * @param style Style for new scale. NULL for default style
202 *
203 * @return pointer to new Ewe_Ruler_Scale
204 *
205 * @ingroup Ruler
206 */
207EAPI Ewe_Ruler_Scale *
208ewe_ruler_scale_add(Eo *obj, const char *style);
209
210/**
211 * Delete given scale from the ruler
212 *
213 * @param obj Ruler object.
214 * @param scale Scale
215 *
216 * @return EINA_TRUE on success, EINA_FALSE otherwise
217 *
218 * @ingroup Ruler
219 */
220EAPI Eina_Bool
221ewe_ruler_scale_del(Eo *obj, Ewe_Ruler_Scale *scale);
222
223/**
224 * Get visiblility state of given scale
225 *
226 * @param obj Ruler object.
227 * @param scale Scale. NULL for default scale
228 *
229 * @return EINA_TRUE on success, EINA_FALSE otherwise
230 *
231 * @ingroup Ruler
232 */
233EAPI Eina_Bool
234ewe_ruler_scale_visible_get(const Eo *obj, Ewe_Ruler_Scale *scale);
235
236/**
237 * Set visiblility state of given scale
238 *
239 * @param obj Ruler object.
240 * @param scale Scale. NULL for default scale
241 * @param visible New visibility state for scale
242 *
243 * @return EINA_TRUE on success, EINA_FALSE otherwise
244 *
245 * @ingroup Ruler
246 */
247EAPI Eina_Bool
248ewe_ruler_scale_visible_set(Eo *obj, Ewe_Ruler_Scale *scale, Eina_Bool visible);
249
250/**
251 * Get visiblility state of middle mark in given scale
252 *
253 * @param obj Ruler object.
254 * @param scale Scale. NULL for default scale
255 *
256 * @return EINA_TRUE if mark is visible, EINA_FALSE otherwise
257 *
258 * @ingroup Ruler
259 */
260EAPI Eina_Bool
261ewe_ruler_scale_middle_mark_get(const Eo *obj, Ewe_Ruler_Scale *scale);
262
263/**
264 * Set visiblility state of middle mark in given scale
265 *
266 * @param obj Ruler object.
267 * @param scale Scale. NULL for default scale
268 * @param middle_mark New visibility state for middle mark in given scale
269 *
270 * @return EINA_TRUE on success, EINA_FALSE otherwise
271 *
272 * @ingroup Ruler
273 */
274EAPI Eina_Bool
275ewe_ruler_scale_middle_mark_set(Eo *obj, Ewe_Ruler_Scale *scale, Eina_Bool middle_mark);
114#endif /* EWE_RULER_LEGACY */ 276#endif /* EWE_RULER_LEGACY */
diff --git a/src/lib/ewe_statusbar.c b/src/lib/ewe_statusbar.c
index c1e007f..a49ad33 100644
--- a/src/lib/ewe_statusbar.c
+++ b/src/lib/ewe_statusbar.c
@@ -4,17 +4,16 @@
4* This file is part of Elementary Widgets Extension. 4* This file is part of Elementary Widgets Extension.
5* 5*
6* This program is free software; you can redistribute it and/or modify 6* This program is free software; you can redistribute it and/or modify
7* it under the terms of the GNU General Public License as published by 7* it under the terms of the GNU Lesser General Public License as published by
8* the Free Software Foundation; either version 2, or (at your option) 8* the Free Software Foundation.
9* any later version.
10* 9*
11* This program is distributed in the hope that it will be useful, 10* This program is distributed in the hope that it will be useful,
12* but WITHOUT ANY WARRANTY; without even the implied warranty of 11* but WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14* GNU General Public License for more details. 13* GNU Lesser General Public License for more details.
15* 14*
16* You should have received a copy of the GNU General Public License 15* You should have received a copy of the GNU Lesser General Public License
17* along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16* along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18*/ 17*/
19 18
20#include "ewe_private.h" 19#include "ewe_private.h"
diff --git a/src/lib/ewe_statusbar.h b/src/lib/ewe_statusbar.h
index 06f5e80..12de01e 100644
--- a/src/lib/ewe_statusbar.h
+++ b/src/lib/ewe_statusbar.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20/** 19/**
diff --git a/src/lib/ewe_statusbar_common.h b/src/lib/ewe_statusbar_common.h
index 258cdff..a3dec6b 100644
--- a/src/lib/ewe_statusbar_common.h
+++ b/src/lib/ewe_statusbar_common.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20 19
diff --git a/src/lib/ewe_statusbar_eo.h b/src/lib/ewe_statusbar_eo.h
index ff3197c..fa044d6 100644
--- a/src/lib/ewe_statusbar_eo.h
+++ b/src/lib/ewe_statusbar_eo.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20#include "ewe_statusbar.eo.h" 19#include "ewe_statusbar.eo.h"
diff --git a/src/lib/ewe_statusbar_legacy.h b/src/lib/ewe_statusbar_legacy.h
index 77147dc..93484bc 100644
--- a/src/lib/ewe_statusbar_legacy.h
+++ b/src/lib/ewe_statusbar_legacy.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20 19
diff --git a/src/lib/ewe_tabs.c b/src/lib/ewe_tabs.c
index 8a44d92..3f8d0b1 100644
--- a/src/lib/ewe_tabs.c
+++ b/src/lib/ewe_tabs.c
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20#include "ewe_private.h" 19#include "ewe_private.h"
diff --git a/src/lib/ewe_tabs.h b/src/lib/ewe_tabs.h
index fb414f2..b73f6b5 100644
--- a/src/lib/ewe_tabs.h
+++ b/src/lib/ewe_tabs.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20/** 19/**
diff --git a/src/lib/ewe_tabs_common.h b/src/lib/ewe_tabs_common.h
index c3e5ad5..e9c186d 100644
--- a/src/lib/ewe_tabs_common.h
+++ b/src/lib/ewe_tabs_common.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20typedef struct _Ewe_Tabs_Item Ewe_Tabs_Item; 19typedef struct _Ewe_Tabs_Item Ewe_Tabs_Item;
diff --git a/src/lib/ewe_tabs_eo.h b/src/lib/ewe_tabs_eo.h
index db88f08..dcbdcbd 100644
--- a/src/lib/ewe_tabs_eo.h
+++ b/src/lib/ewe_tabs_eo.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20#include "ewe_tabs.eo.h" 19#include "ewe_tabs.eo.h"
diff --git a/src/lib/ewe_tabs_legacy.h b/src/lib/ewe_tabs_legacy.h
index 193ed5a..95f8352 100644
--- a/src/lib/ewe_tabs_legacy.h
+++ b/src/lib/ewe_tabs_legacy.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20/** 19/**
diff --git a/src/lib/ewe_widget_combobox.h b/src/lib/ewe_widget_combobox.h
index 86665e7..a6fec7e 100644
--- a/src/lib/ewe_widget_combobox.h
+++ b/src/lib/ewe_widget_combobox.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20#ifndef EWE_WIDGET_COMBOBOX_H 19#ifndef EWE_WIDGET_COMBOBOX_H
diff --git a/src/lib/ewe_widget_entry.h b/src/lib/ewe_widget_entry.h
index 5868c02..db9cca5 100644
--- a/src/lib/ewe_widget_entry.h
+++ b/src/lib/ewe_widget_entry.h
@@ -3,7 +3,7 @@
3 3
4#include <regex.h> 4#include <regex.h>
5#include <elm_widget_entry.h> 5#include <elm_widget_entry.h>
6#include "ewe.h" 6#include "ewe_main.h"
7 7
8typedef struct _Ewe_Entry_Data Ewe_Entry_Data; 8typedef struct _Ewe_Entry_Data Ewe_Entry_Data;
9struct _Ewe_Entry_Data { 9struct _Ewe_Entry_Data {
diff --git a/src/lib/ewe_widget_ruler.h b/src/lib/ewe_widget_ruler.h
index acbd9ce..df70913 100644
--- a/src/lib/ewe_widget_ruler.h
+++ b/src/lib/ewe_widget_ruler.h
@@ -10,28 +10,18 @@ struct _Ewe_Ruler_Smart_Data
10 Evas_Object *clip; 10 Evas_Object *clip;
11 Evas_Object *bg; 11 Evas_Object *bg;
12 Ewe_Ruler_Orient orient; 12 Ewe_Ruler_Orient orient;
13 Eina_List *ruler; 13 Eina_List *scales;
14 Eina_Bool ruler_visible; 14 Eina_Bool ruler_visible;
15 Eina_Bool pointer_visible; 15 Eina_Bool pointer_visible;
16 unsigned int mark_step;
17 Eina_Bool show_middle_mark;
18 struct { 16 struct {
19 unsigned int item_width;
20 unsigned int item_high;
21 unsigned int width; 17 unsigned int width;
22 unsigned int high; 18 unsigned int height;
23 int x; 19 int x;
24 int y; 20 int y;
25 int new_pos;
26 int zero_pos;
27 } geometry; 21 } geometry;
28 int delta_width;
29 int delta_high;
30 int new_mark_value;
31 Eina_Bool size_changed : 1; 22 Eina_Bool size_changed : 1;
32 Eina_Bool zero_pos_increase : 1; 23 Eina_Bool position_changed : 1;
33 Eina_Bool offset_changed : 1; 24 Eina_Bool text_changed : 1;
34 Eina_Bool view_changed : 1;
35}; 25};
36 26
37#define EWE_RULER_DATA_GET(o, sd) \ 27#define EWE_RULER_DATA_GET(o, sd) \
diff --git a/src/lib/ewe_widget_statusbar.h b/src/lib/ewe_widget_statusbar.h
index 29d576c..4e61a4b 100644
--- a/src/lib/ewe_widget_statusbar.h
+++ b/src/lib/ewe_widget_statusbar.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20#ifndef EWE_WIDGET_STATUSBAR_ 19#ifndef EWE_WIDGET_STATUSBAR_
diff --git a/src/lib/ewe_widget_tabs.h b/src/lib/ewe_widget_tabs.h
index a522b5a..9dbc0d4 100644
--- a/src/lib/ewe_widget_tabs.h
+++ b/src/lib/ewe_widget_tabs.h
@@ -4,17 +4,16 @@
4 * This file is part of Elementary Widgets Extension. 4 * This file is part of Elementary Widgets Extension.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option) 8 * the Free Software Foundation.
9 * any later version.
10 * 9 *
11 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 13 * GNU Lesser General Public License for more details.
15 * 14 *
16 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; If not, see www.gnu.org/licenses/gpl-2.0.html. 16 * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
18 */ 17 */
19 18
20#ifndef ELM_WIDGET_TABS_H 19#ifndef ELM_WIDGET_TABS_H
diff --git a/src/lib/ewe_win.c b/src/lib/ewe_win.c
new file mode 100644
index 0000000..d8e50a5
--- /dev/null
+++ b/src/lib/ewe_win.c
@@ -0,0 +1,18 @@
1/* Elementary Widgets Extension
2 * Copyright (C) 2014 Samsung Electronics.
3 *
4 * This file is part of Elementary Widgets Extension.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.