From 614421e09843d53295618ccd26e7b9cc7da202ff Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 8 Dec 2008 09:24:46 +0000 Subject: [PATCH] working on nuts and bolts to do a multi-sel widget (hoversel). SVN revision: 38012 --- legacy/elementary/data/themes/Makefile.am | 7 +- legacy/elementary/data/themes/default.edc | 701 +++++++++++++++++- .../data/themes/hoversel_entry_bg.png | Bin 0 -> 782 bytes .../elementary/data/themes/outdent-bottom.png | Bin 0 -> 1826 bytes legacy/elementary/data/themes/outdent-top.png | Bin 0 -> 1913 bytes legacy/elementary/src/lib/Elementary.h | 2 + legacy/elementary/src/lib/Makefile.am | 3 +- legacy/elementary/src/lib/elc_hoversel.c | 115 +++ legacy/elementary/src/lib/elm_button.c | 17 +- legacy/elementary/src/lib/elm_contact.c | 2 - legacy/elementary/src/lib/elm_contactlist.c | 2 - legacy/elementary/src/lib/elm_frame.c | 17 + legacy/elementary/src/lib/elm_hover.c | 10 +- 13 files changed, 859 insertions(+), 17 deletions(-) create mode 100644 legacy/elementary/data/themes/hoversel_entry_bg.png create mode 100644 legacy/elementary/data/themes/outdent-bottom.png create mode 100644 legacy/elementary/data/themes/outdent-top.png create mode 100644 legacy/elementary/src/lib/elc_hoversel.c delete mode 100644 legacy/elementary/src/lib/elm_contact.c delete mode 100644 legacy/elementary/src/lib/elm_contactlist.c diff --git a/legacy/elementary/data/themes/Makefile.am b/legacy/elementary/data/themes/Makefile.am index 60aad9ae2e..1d7a38d509 100644 --- a/legacy/elementary/data/themes/Makefile.am +++ b/legacy/elementary/data/themes/Makefile.am @@ -62,7 +62,12 @@ shelf_inset.png \ tog_base.png \ shad_circ.png \ bt_dis_base.png \ -bt_dis_hilight.png +bt_dis_hilight.png \ +outdent-top.png \ +outdent-bottom.png \ +updown.png \ +leftright.png \ +hoversel_entry_bg.png default.edj: Makefile $(EXTRA_DIST) $(EDJE_CC) $(EDJE_FLAGS) \ diff --git a/legacy/elementary/data/themes/default.edc b/legacy/elementary/data/themes/default.edc index 0caed5eaff..7d4da5afe2 100644 --- a/legacy/elementary/data/themes/default.edc +++ b/legacy/elementary/data/themes/default.edc @@ -633,6 +633,390 @@ collections { } } + group { name: "elm/button/base/hoversel_vertical"; + images { + image: "bt_base1.png" COMP; + image: "bt_base2.png" COMP; + image: "bt_hilight.png" COMP; + image: "bt_shine.png" COMP; + image: "bt_glow.png" COMP; + image: "updown.png" COMP; + } + parts { + part { name: "button_image"; + mouse_events: 1; + description { state: "default" 0.0; + image { + normal: "bt_base2.png"; + border: 7 7 7 7; + } + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + image.normal: "bt_base1.png"; + } + } + part { name: "arrow"; + mouse_events: 0; + description { state: "default" 0.0; + image.normal: "updown.png"; + aspect: 0.6666666666 0.6666666666; + aspect_preference: VERTICAL; + rel1.offset: 6 7; + rel2.offset: 6 -7; + rel2.relative: 0.0 1.0; + align: 0.0 0.5; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + description { state: "default" 0.0; + visible: 0; + align: 0.0 0.5; + rel1 { + to_x: "arrow"; + offset: 2 4; + relative: 1.0 0.0; + } + rel2 { + to_x: "arrow"; + offset: 1 -5; + relative: 1.0 1.0; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + rel2.offset: 2 -5; + } + description { state: "icononly" 0.0; + inherit: "default" 0.0; + visible: 1; + align: 0.5 0.5; + aspect: 1.0 1.0; + rel1 { + to_x: "button_image"; + offset: -5 -5; + relative: 1.0 1.0; + } + aspect_preference: VERTICAL; + } + } + part { + name: "elm.text"; + type: TEXT; + effect: SOFT_SHADOW; + mouse_events: 0; + scale: 1; + description { state: "default" 0.0; + visible: 0; + rel1.to_x: "elm.swallow.content"; + rel1.relative: 1.0 0.0; + rel1.offset: 0 4; + rel2.offset: -5 -5; + color: 224 224 224 255; + color3: 0 0 0 64; + text { + font: "Sans,Edje-Vera"; + size: 10; + min: 0 0; + align: 0.5 0.5; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + text.min: 1 1; + } + } + part { name: "over1"; + mouse_events: 0; + description { state: "default" 0.0; + rel2.relative: 1.0 0.5; + image { + normal: "bt_hilight.png"; + border: 7 7 7 0; + } + } + } + part { name: "over2"; + mouse_events: 1; + repeat_events: 1; + ignore_flags: ON_HOLD; + description { state: "default" 0.0; + image { + normal: "bt_shine.png"; + border: 7 7 7 7; + } + } + } + part { name: "over3"; + mouse_events: 1; + repeat_events: 1; + description { state: "default" 0.0; + color: 255 255 255 0; + image { + normal: "bt_glow.png"; + border: 12 12 12 12; + middle: 0; + } + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + } + } + programs { + program { + name: "button_click"; + signal: "mouse,down,1"; + source: "over2"; + action: STATE_SET "clicked" 0.0; + target: "button_image"; + } + program { + name: "button_unclick"; + signal: "mouse,up,1"; + source: "over2"; + action: STATE_SET "default" 0.0; + target: "button_image"; + } + program { + name: "button_click2"; + signal: "mouse,down,1"; + source: "over3"; + action: STATE_SET "clicked" 0.0; + target: "over3"; + } + program { + name: "button_unclick2"; + signal: "mouse,up,1"; + source: "over3"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.5; + target: "over3"; + } + program { + name: "button_unclick3"; + signal: "mouse,up,1"; + source: "over2"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + program { name: "text_show"; + signal: "elm,state,text,visible"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.content", st, 30, vl); + if (!strcmp(st, "icononly")) + set_state(PART:"elm.swallow.content", "visible", 0.0); + set_state(PART:"elm.text", "visible", 0.0); + } + } + program { name: "text_hide"; + signal: "elm,state,text,hidden"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.content", st, 30, vl); + if (!strcmp(st, "visible")) + set_state(PART:"elm.swallow.content", "icononly", 0.0); + set_state(PART:"elm.text", "default", 0.0); + } + } + program { name: "icon_show"; + signal: "elm,state,icon,visible"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.text", st, 30, vl); + if (!strcmp(st, "visible")) + set_state(PART:"elm.swallow.content", "visible", 0.0); + else + set_state(PART:"elm.swallow.content", "icononly", 0.0); + } + } + program { name: "icon_hide"; + signal: "elm,state,icon,hidden"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.content"; + } + } + } + + group { name: "elm/button/base/hoversel_vertical_entry"; + images { + image: "hoversel_entry_bg.png" COMP; + } + parts { + part { name: "button_image"; + mouse_events: 1; + description { state: "default" 0.0; + color: 255 255 255 0; + image.normal: "hoversel_entry_bg.png"; + image.border: 0 0 2 2; + fill.smooth: 0; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + description { state: "default" 0.0; + visible: 0; + align: 0.0 0.5; + rel1.offset: 4 4; + rel2.offset: 3 -5; + rel2.relative: 0.0 1.0; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + rel2.offset: 4 -5; + } + description { state: "icononly" 0.0; + inherit: "default" 0.0; + visible: 1; + align: 0.5 0.5; + aspect: 1.0 1.0; + rel2.offset: -5 -5; + rel2.relative: 1.0 1.0; + aspect_preference: VERTICAL; + } + } + part { name: "textvis"; + type: RECT; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + } + description { state: "visible" 0.0; + visible: 1; + } + } + part { + name: "elm.text"; + type: TEXT; + effect: SOFT_SHADOW; + mouse_events: 0; + scale: 1; + clip_to: "textvis"; + description { state: "default" 0.0; + rel1.to_x: "elm.swallow.content"; + rel1.relative: 1.0 0.0; + rel1.offset: 0 4; + rel2.offset: -5 -5; + color: 224 224 224 255; + color3: 0 0 0 64; + text { + font: "Sans,Edje-Vera"; + size: 10; + min: 0 0; + align: 0.5 0.5; + } + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + text.min: 1 1; + } + description { state: "clicked" 0.0; + inherit: "default" 0.0; + text.min: 1 1; + color: 0 0 0 255; + color3: 0 0 0 0; + } + } + part { name: "over2"; + type: RECT; + mouse_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + } + } + } + programs { + program { + name: "button_click"; + signal: "mouse,down,1"; + source: "over2"; + action: STATE_SET "clicked" 0.0; + target: "button_image"; + target: "elm.text"; + } + program { + name: "button_unclick"; + signal: "mouse,up,1"; + source: "over2"; + action: STATE_SET "default" 0.0; + target: "button_image"; + target: "elm.text"; + } + program { + name: "button_unclick3"; + signal: "mouse,up,1"; + source: "over2"; + action: SIGNAL_EMIT "elm,action,click" ""; + } + program { name: "text_show"; + signal: "elm,state,text,visible"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.content", st, 30, vl); + if (!strcmp(st, "icononly")) + set_state(PART:"elm.swallow.content", "visible", 0.0); + set_state(PART:"textvis", "visible", 0.0); + set_state(PART:"elm.text", "visible", 0.0); + } + } + program { name: "text_hide"; + signal: "elm,state,text,hidden"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"elm.swallow.content", st, 30, vl); + if (!strcmp(st, "visible")) + set_state(PART:"elm.swallow.content", "icononly", 0.0); + set_state(PART:"textvis", "default", 0.0); + set_state(PART:"elm.text", "default", 0.0); + } + } + program { name: "icon_show"; + signal: "elm,state,icon,visible"; + source: "elm"; + script { + new st[31]; + new Float:vl; + get_state(PART:"textvis", st, 30, vl); + if (!strcmp(st, "visible")) + set_state(PART:"elm.swallow.content", "visible", 0.0); + else + set_state(PART:"elm.swallow.content", "icononly", 0.0); + } + } + program { name: "icon_hide"; + signal: "elm,state,icon,hidden"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.swallow.content"; + } + } + } + /////////////////////////////////////////////////////////////////////////////// group { name: "elm/toggle/base/default"; images { @@ -2216,6 +2600,52 @@ collections { } } + group { name: "elm/frame/base/outdent_top"; + images { + image: "outdent-top.png" COMP; + } + parts { + part { name: "base0"; + mouse_events: 0; + description { state: "default" 0.0; + image.normal: "outdent-top.png"; + image.border: 0 0 0 13; + fill.smooth: 0; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + description { state: "default" 0.0; + rel1.offset: 2 2; + rel2.offset: -3 -13; + } + } + } + } + + group { name: "elm/frame/base/outdent_bottom"; + images { + image: "outdent-bottom.png" COMP; + } + parts { + part { name: "base0"; + mouse_events: 0; + description { state: "default" 0.0; + image.normal: "outdent-bottom.png"; + image.border: 0 0 13 0; + fill.smooth: 0; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + description { state: "default" 0.0; + rel1.offset: 2 12; + rel2.offset: -3 -3; + } + } + } + } + /////////////////////////////////////////////////////////////////////////////// group { name: "elm/hover/base/default"; images { @@ -2334,7 +2764,6 @@ collections { } } -/////////////////////////////////////////////////////////////////////////////// group { name: "elm/hover/base/popout"; images { image: "shad_circ.png" COMP; @@ -2723,7 +3152,6 @@ collections { source: "elm"; action: STATE_SET "visible" 0.0; transition: DECELERATE 0.5; - target: "bottom"; target: "elm.swallow.slot.bottom"; } program { name: "bottomhide"; @@ -2731,12 +3159,279 @@ collections { source: "elm"; action: STATE_SET "default" 0.0; transition: DECELERATE 0.5; - target: "bottom"; target: "elm.swallow.slot.bottom"; } } } + group { name: "elm/hover/base/hoversel_vertical"; + images { + image: "shad_circ.png" COMP; + image: "bt_base2.png" COMP; + image: "bt_hilight.png" COMP; + image: "bt_shine.png" COMP; + image: "outdent-top.png" COMP; + image: "outdent-bottom.png" COMP; + } + parts { + part { name: "elm.swallow.offset"; + type: SWALLOW; + description { state: "default" 0.0; + align: 0.0 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 0.0 0.0; + } + } + part { name: "elm.swallow.size"; + type: SWALLOW; + description { state: "default" 0.0; + align: 0.0 0.0; + rel1.to: "elm.swallow.offset"; + rel1.relative: 1.0 1.0; + rel2.to: "elm.swallow.offset"; + rel2.relative: 1.0 1.0; + } + } + + part { name: "shad"; + mouse_events: 0; + description { state: "default" 0.0; + image.normal: "shad_circ.png"; + rel1.to: "button_image"; + rel1.offset: -64 -64; + rel2.to: "button_image"; + rel2.offset: 63 63; + fill.smooth: 0; + } + } + part { name: "button_image"; + mouse_events: 1; + description { state: "default" 0.0; + rel1.to: "elm.swallow.slot.top"; + rel1.offset: -2 -6; + rel2.to: "elm.swallow.slot.bottom"; + rel2.offset: 1 5; + image { + normal: "bt_base2.png"; + border: 7 7 7 7; + } + } + } + + part { name: "base"; + type: RECT; + mouse_events: 1; + description { state: "default" 0.0; + color: 0 0 0 0; + } + description { state: "visible" 0.0; + inherit: "default" 1.0; + color: 0 0 0 64; + } + } + + part { name: "topclip"; + type: RECT; + description { state: "default" 0.0; + rel2.to_y: "edge_top"; + rel2.relative: 1.0 0.0; + rel2.offset: -1 7; + } + } + part { name: "elm.swallow.slot.top"; + type: SWALLOW; + clip_to: "topclip"; + description { state: "default" 0.0; + visible: 1; + align: 0.5 0.0; + rel1.to: "elm.swallow.slot.middle"; + rel1.relative: 0.0 0.0; + rel1.offset: 0 -1; + rel2.to: "elm.swallow.slot.middle"; + rel2.relative: 1.0 0.0; + rel2.offset: -1 -1; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1.offset: 0 -7; + rel2.offset: -1 -7; + align: 0.5 1.0; + } + } + + part { name: "bottomclip"; + type: RECT; + description { state: "default" 0.0; + rel1.to_y: "edge_bottom"; + rel1.relative: 0.0 1.0; + rel1.offset: -1 -8; + } + } + part { name: "elm.swallow.slot.bottom"; + type: SWALLOW; + clip_to: "bottomclip"; + description { state: "default" 0.0; + align: 0.5 1.0; + rel1.to: "elm.swallow.slot.middle"; + rel1.relative: 0.0 1.0; + rel1.offset: 0 0; + rel2.to: "elm.swallow.slot.middle"; + rel2.relative: 1.0 1.0; + rel2.offset: -1 0; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + rel1.offset: 0 6; + rel2.offset: -1 6; + align: 0.5 0.0; + } + } + + part { name: "over1"; + mouse_events: 0; + description { state: "default" 0.0; + rel1.to: "button_image"; + rel2.to: "button_image"; + rel2.relative: 1.0 0.5; + image { + normal: "bt_hilight.png"; + border: 7 7 7 0; + } + } + } + part { name: "over2"; + mouse_events: 1; + repeat_events: 1; + ignore_flags: ON_HOLD; + description { state: "default" 0.0; + rel1.to: "button_image"; + rel2.to: "button_image"; + image { + normal: "bt_shine.png"; + border: 7 7 7 7; + } + } + } + part { name: "edge_top"; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1 { + to: "elm.swallow.size"; + offset: 0 -10; + } + rel2 { + to: "elm.swallow.size"; + } + image.normal: "outdent-bottom.png"; + image.border: 0 0 13 0; + fill.smooth: 0; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { name: "edge_bottom"; + mouse_events: 0; + description { state: "default" 0.0; + visible: 0; + rel1 { + to: "elm.swallow.size"; + } + rel2 { + to: "elm.swallow.size"; + offset: -1 9; + } + image.normal: "outdent-top.png"; + image.border: 0 0 0 13; + fill.smooth: 0; + } + description { state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { name: "elm.swallow.slot.middle"; + type: SWALLOW; + description { state: "default" 0.0; + rel1.to: "elm.swallow.size"; + rel2.to: "elm.swallow.size"; + } + } + } + programs { + program { name: "end"; + signal: "mouse,down,1"; + source: "base"; + action: SIGNAL_EMIT "elm,action,dismiss" ""; + } + + program { name: "show"; + signal: "elm,action,show"; + source: "elm"; + action: STATE_SET "visible" 0.0; +// transition: DECELERATE 0.5; + target: "base"; + } + program { name: "hide"; + signal: "elm,action,hide"; + source: "elm"; + action: STATE_SET "default" 0.0; +// transition: DECELERATE 0.5; + target: "base"; + } + program { name: "topshow"; + signal: "elm,action,slot,top,show"; + source: "elm"; + action: STATE_SET "visible" 0.0; + target: "edge_top"; + after: "topshow2"; + } + program { name: "topshow2"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.5; + target: "elm.swallow.slot.top"; + } + program { name: "tophide"; + signal: "elm,action,slot,top,hide"; + source: "elm"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.5; + target: "elm.swallow.slot.top"; + after: "tophide2"; + } + program { name: "tophide2"; + action: STATE_SET "default" 0.0; + target: "edge_top"; + } + program { name: "bottomshow"; + signal: "elm,action,slot,bottom,show"; + source: "elm"; + action: STATE_SET "visible" 0.0; + target: "edge_bottom"; + after: "bottomshow2"; + } + program { name: "bottomshow2"; + action: STATE_SET "visible" 0.0; + transition: DECELERATE 0.5; + target: "elm.swallow.slot.bottom"; + } + program { name: "bottomhide"; + signal: "elm,action,slot,bottom,hide"; + source: "elm"; + action: STATE_SET "default" 0.0; + transition: DECELERATE 0.5; + target: "elm.swallow.slot.bottom"; + after: "bottomhide2"; + } + program { name: "bottomhide2"; + action: STATE_SET "default" 0.0; + target: "edge_bottom"; + } + } + } + /////////////////////////////////////////////////////////////////////////////// group { name: "elm/entry/base/default"; styles diff --git a/legacy/elementary/data/themes/hoversel_entry_bg.png b/legacy/elementary/data/themes/hoversel_entry_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..ec8b31d31af7730419687fe877202eb01bbe4457 GIT binary patch literal 782 zcmV+p1M&QcP)Px#24YJ`L;wH)0002_L%V+f000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iOb< z2?{Zm9U?OT000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}0007MNklVAE1?I?r<-~jLj;5UF@5x`FXp8&i9_(FK? zVuqlBNKlc1MkU1<#KxFuOnp2F9{~Pzy!Y_~z!~MGm5!TntRyx%2Ax|GUU{GQefR%J z>8TPKeNeIWk)vHD@|G={@m@=aqKKvL1SoR1N$D1`UK)gKctF4`Xm!HtA4DOX$&ZSS zFg~CKIV=>MVr>pdi*TKA%Pb)G5ASkAHnLEhB4vV)7O~o+I^@k`OF*J7lj-_Zmtmrh zb|K5Yie&vC`-RX2q~0p^#$9a01Y5t}q_Afe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F4b`SUOn7nn|P@Of{kcG#Mn(#?%(bWDE_9Qb!RVgT}`$&P?D?g%KUUuwZsPd+!9e zFjsMBQMMKc?g99e967Y)F!D$~cx0%GHOup8CaW31W1tM=Obkh&i_*3s8t2060MqPYoce0GXer z0Oa`fXkNbv;7F(jmu_-q+(=OYJ_M8mxEj`fcV+^k**|X~hmt@aB?m>LrizF}M0j9# z3Qoih=(qxn0Fh!y5){J?XexjrPFNWM?#7(?P=H-o7dT?|vtYs`Nz&JK(#o>|BPLZL zvr^}|1~gnjQ7jS-qCGKE$wic#LV!Inxs#pPIRZAER01~$Bx7>~90Z??_5I8q0SuOb z$xs9C@0;>oIfSjOo>jPjnNM@A83UQ?Ek zi4wvcCtpzR;v*3XBN)MLD8EZ9fyrT*uj0$`Bf2*8gbOV<5ZyO03% zokc|nUNccX9gyMKsrE7XSbN literal 0 HcmV?d00001 diff --git a/legacy/elementary/data/themes/outdent-top.png b/legacy/elementary/data/themes/outdent-top.png new file mode 100644 index 0000000000000000000000000000000000000000..b4f891d040fd76397cb113721d09b55cf261fac9 GIT binary patch literal 1913 zcmV-<2Zs2GP)Px#24YJ`L;wH)0002_L%V+f000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iOb< z0u47jYW^Sq000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2HM@dakSAh-}000KmNkl0|=JCWXJFE@k0ti;wK^q z&->xUYct2t*&+at>g!_w05WJ``k;=D_Os{CTn87PEkiIC0LLc+j|=B!fP(=UI?$v* z*ZcaTaBrfv9vLzuxIzf|O5l$^Cc(!q05v;q7HrSr!2z5ApqM@=z!?Bq-*1Z~m>rve zCQkx-1pbG2!~yu20P8AQZ~=VJx<{bvW&tk%Q2X|{MiltEd5Qo58Ds)}RykI|%|1&) z7ofn$MN52^zn)q33~Ud04Za4x8WMoA_yz!bZuj{x@wU@iaF+ot+j0d_@-hf%-hDj7zWiWBf6;L#Z~x)53cx2L`S1K>lY$7%9U_ znwAOdA_9;~@z6>0w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n z?EHuR$dX`UJ<)#V{wvGPuRMRYVtI8LHZNYkx~x0%yp^Tr3==R`tVSl0>?|_QT)+As zNh{C9g~&UT^JmA&Tq}v|v*YvVnRpU_)jSoy;2QkmXUT zXPtSkE7iEK_>bVr>j3`*xPNNguNYJQPh +#include "elm_priv.h" + +typedef struct _Widget_Data Widget_Data; + +struct _Widget_Data +{ + Evas_Object *pop, *hover; + Evas_Object *hover_parent; + const char *hover_style; +}; + +static void _del_pre_hook(Evas_Object *obj); +static void _del_hook(Evas_Object *obj); +static void _sizing_eval(Evas_Object *obj); +static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info); +static void _parent_del(void *data, Evas *e, Evas_Object *obj, void *event_info); + +static void +_del_pre_hook(Evas_Object *obj) +{ + elm_hoversel_hover_end(obj); + elm_hoversel_hover_parent_set(obj, NULL); +} + +static void +_del_hook(Evas_Object *obj) +{ + Widget_Data *wd = elm_widget_data_get(obj); + if (wd->hover_style) eina_stringshare_del(wd->hover_style); + free(wd); +} + +static void +_sizing_eval(Evas_Object *obj) +{ + Widget_Data *wd = elm_widget_data_get(obj); + Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1; + + evas_object_size_hint_min_set(obj, minw, minh); + evas_object_size_hint_max_set(obj, maxw, maxh); +} + +static void +_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + _sizing_eval(data); +} + +static void +_hover_clicked(void *data, Evas_Object *obj, void *event_info) +{ + elm_hoversel_hover_end(data); +} + +static void +_parent_del(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + Widget_Data *wd = elm_widget_data_get(data); + wd->hover_parent = NULL; +} + +EAPI Evas_Object * +elm_hoversel_add(Evas_Object *parent) +{ + Evas_Object *obj; + Evas *e; + Widget_Data *wd; + + wd = ELM_NEW(Widget_Data); + e = evas_object_evas_get(parent); + obj = elm_widget_add(e); + elm_widget_data_set(obj, wd); + elm_widget_del_pre_hook_set(obj, _del_pre_hook); + elm_widget_del_hook_set(obj, _del_hook); + +// wd->scroller = elm_scroller_add(parent); +// elm_widget_resize_object_set(obj, wd->scroller); + +// evas_object_event_callback_add(wd->entry, EVAS_CALLBACK_CHANGED_SIZE_HINTS, +// _changed_size_hints, obj); + + _sizing_eval(obj); + return obj; +} + +EAPI void +elm_hoversel_hover_parent_set(Evas_Object *obj, Evas_Object *parent) +{ + Widget_Data *wd = elm_widget_data_get(obj); + if (wd->hover_parent) + evas_object_event_callback_del(wd->hover_parent, EVAS_CALLBACK_DEL, _parent_del); + wd->hover_parent = parent; + if (wd->hover_parent) + evas_object_event_callback_add(wd->hover_parent, EVAS_CALLBACK_DEL, _parent_del, obj); +} + +EAPI void +elm_hoversel_hover_style_set(Evas_Object *obj, const char *style) +{ + Widget_Data *wd = elm_widget_data_get(obj); + if (wd->hover_style) eina_stringshare_del(wd->hover_style); + wd->hover_style = NULL; + if (style) wd->hover_style = eina_stringshare_add(style); +} + +EAPI void +elm_hoversel_hover_end(Evas_Object *obj) +{ + Widget_Data *wd = elm_widget_data_get(obj); + if (wd->hover) evas_object_del(wd->hover); + if (wd->pop) evas_object_del(wd->pop); + wd->hover = NULL; + wd->pop = NULL; +} diff --git a/legacy/elementary/src/lib/elm_button.c b/legacy/elementary/src/lib/elm_button.c index 78cab883d5..2e3245b93f 100644 --- a/legacy/elementary/src/lib/elm_button.c +++ b/legacy/elementary/src/lib/elm_button.c @@ -8,6 +8,7 @@ struct _Widget_Data Evas_Object *btn; Evas_Object *icon; const char *label; + const char *style; }; static void _del_hook(Evas_Object *obj); @@ -22,6 +23,7 @@ _del_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); if (wd->label) eina_stringshare_del(wd->label); + if (wd->style) eina_stringshare_del(wd->style); free(wd); } @@ -29,7 +31,10 @@ static void _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); - _elm_theme_set(wd->btn, "button", "base", "default"); + if (wd->style) _elm_theme_set(wd->btn, "button", "base", wd->style); + else _elm_theme_set(wd->btn, "button", "base", "default"); + if (wd->icon) + edje_object_part_swallow(wd->btn, "elm.swallow.content", wd->icon); if (wd->label) edje_object_signal_emit(wd->btn, "elm,state,text,visible", "elm"); else @@ -154,3 +159,13 @@ elm_button_icon_set(Evas_Object *obj, Evas_Object *icon) else wd->icon = icon; } + +EAPI void +elm_button_style_set(Evas_Object *obj, const char *style) +{ + Widget_Data *wd = elm_widget_data_get(obj); + if (wd->style) eina_stringshare_del(wd->style); + if (style) wd->style = eina_stringshare_add(style); + else wd->style = NULL; + _theme_hook(obj); +} diff --git a/legacy/elementary/src/lib/elm_contact.c b/legacy/elementary/src/lib/elm_contact.c deleted file mode 100644 index bd21d43cc2..0000000000 --- a/legacy/elementary/src/lib/elm_contact.c +++ /dev/null @@ -1,2 +0,0 @@ -#include -#include "elm_priv.h" diff --git a/legacy/elementary/src/lib/elm_contactlist.c b/legacy/elementary/src/lib/elm_contactlist.c deleted file mode 100644 index bd21d43cc2..0000000000 --- a/legacy/elementary/src/lib/elm_contactlist.c +++ /dev/null @@ -1,2 +0,0 @@ -#include -#include "elm_priv.h" diff --git a/legacy/elementary/src/lib/elm_frame.c b/legacy/elementary/src/lib/elm_frame.c index c35da31de9..2f3e06a66a 100644 --- a/legacy/elementary/src/lib/elm_frame.c +++ b/legacy/elementary/src/lib/elm_frame.c @@ -7,6 +7,7 @@ struct _Widget_Data { Evas_Object *frm; Evas_Object *content; + const char *style; }; static void _del_hook(Evas_Object *obj); @@ -19,12 +20,18 @@ static void _del_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); + if (wd->style) eina_stringshare_del(wd->style); free(wd); } static void _theme_hook(Evas_Object *obj) { + Widget_Data *wd = elm_widget_data_get(obj); + if (wd->style) _elm_theme_set(wd->frm, "frame", "base", wd->style); + else _elm_theme_set(wd->frm, "frame", "base", "default"); + if (wd->content) + edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->content); _sizing_eval(obj); } @@ -109,3 +116,13 @@ elm_frame_content_set(Evas_Object *obj, Evas_Object *content) _sizing_eval(obj); } } + +EAPI void +elm_frame_style_set(Evas_Object *obj, const char *style) +{ + Widget_Data *wd = elm_widget_data_get(obj); + if (wd->style) eina_stringshare_del(wd->style); + if (style) wd->style = eina_stringshare_add(style); + else wd->style = NULL; + _theme_hook(obj); +} diff --git a/legacy/elementary/src/lib/elm_hover.c b/legacy/elementary/src/lib/elm_hover.c index 406014f900..abbe4df206 100644 --- a/legacy/elementary/src/lib/elm_hover.c +++ b/legacy/elementary/src/lib/elm_hover.c @@ -67,11 +67,8 @@ _theme_hook(Evas_Object *obj) { Widget_Data *wd = elm_widget_data_get(obj); // FIXME: hover contents doesnt seem to propagate resizes properly - if (wd->style) - _elm_theme_set(wd->cov, "hover", "base", wd->style); - else - _elm_theme_set(wd->cov, "hover", "base", "default"); - edje_object_message_signal_process(wd->cov); + if (wd->style) _elm_theme_set(wd->cov, "hover", "base", wd->style); + else _elm_theme_set(wd->cov, "hover", "base", "default"); _reval_content(obj); _sizing_eval(obj); if (evas_object_visible_get(wd->cov)) _hov_show_do(obj); @@ -386,7 +383,8 @@ elm_hover_style_set(Evas_Object *obj, const char *style) if (wd->style) eina_stringshare_del(wd->style); if (style) wd->style = eina_stringshare_add(style); else wd->style = NULL; - _elm_theme_set(wd->cov, "hover", "base", style); + if (wd->style) _elm_theme_set(wd->cov, "hover", "base", wd->style); + else _elm_theme_set(wd->cov, "hover", "base", "default"); _reval_content(obj); _sizing_eval(obj); }