Phase 2: gadcon provider with state-driven icon
Register an "iwd" gadcon client; each instance carries an elm_icon that swaps freedesktop standard names based on Iwd_State. Click toggles the (still stubbed) popup. Listener on iwd_manager refreshes every active instance on state changes. E 0.27 only ships the legacy gadcon API (no e_gadget header), so this targets gadcon for compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6ea19e2252
commit
fcd4427de1
3 changed files with 214 additions and 5 deletions
36
data/e-module-iwd.edc
Normal file
36
data/e-module-iwd.edc
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/* Minimal theme for the iwd module gadget.
|
||||
*
|
||||
* Two groups are exported:
|
||||
* - "icon" : used by the module loader / gadget chooser preview
|
||||
* - "e/modules/iwd/main" : the gadget itself, with a single swallow
|
||||
* "e.swallow.content" the C code drops the icon in.
|
||||
*/
|
||||
|
||||
collections {
|
||||
group { name: "icon";
|
||||
min: 24 24;
|
||||
max: 256 256;
|
||||
parts {
|
||||
part { name: "icon"; type: SWALLOW;
|
||||
description { state: "default" 0.0;
|
||||
aspect: 1.0 1.0;
|
||||
aspect_preference: BOTH;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
group { name: "e/modules/iwd/main";
|
||||
min: 4 4;
|
||||
parts {
|
||||
part { name: "e.swallow.content"; type: SWALLOW;
|
||||
description { state: "default" 0.0;
|
||||
rel1.relative: 0.0 0.0;
|
||||
rel2.relative: 1.0 1.0;
|
||||
aspect: 1.0 1.0;
|
||||
aspect_preference: BOTH;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,2 +1,11 @@
|
|||
install_data('module.desktop', install_dir : module_dir)
|
||||
# TODO: build and install e-module-iwd.edj theme
|
||||
|
||||
edje_cc = find_program('edje_cc')
|
||||
|
||||
iwd_theme = custom_target('e-module-iwd.edj',
|
||||
input : 'e-module-iwd.edc',
|
||||
output : 'e-module-iwd.edj',
|
||||
command : [edje_cc, '-id', meson.current_source_dir(), '@INPUT@', '@OUTPUT@'],
|
||||
install : true,
|
||||
install_dir : module_dir,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue