Update Gui for genodeSources update
This commit is contained in:
parent
cbeeef067d
commit
c7a64a59ef
|
@ -31,6 +31,7 @@ in {
|
||||||
in Sigil.Init::{
|
in Sigil.Init::{
|
||||||
, routes =
|
, routes =
|
||||||
[ Sigil.Init.ServiceRoute.parent "File_system"
|
[ Sigil.Init.ServiceRoute.parent "File_system"
|
||||||
|
, Sigil.Init.ServiceRoute.parent "Gui"
|
||||||
, Sigil.Init.ServiceRoute.parent "IO_MEM"
|
, Sigil.Init.ServiceRoute.parent "IO_MEM"
|
||||||
, Sigil.Init.ServiceRoute.parent "IO_PORT"
|
, Sigil.Init.ServiceRoute.parent "IO_PORT"
|
||||||
, Sigil.Init.ServiceRoute.parent "IRQ"
|
, Sigil.Init.ServiceRoute.parent "IRQ"
|
||||||
|
|
|
@ -14,10 +14,6 @@ let Resources = Init.Resources
|
||||||
|
|
||||||
let ServiceRoute = Init.ServiceRoute
|
let ServiceRoute = Init.ServiceRoute
|
||||||
|
|
||||||
let routeLog =
|
|
||||||
λ(label : Text) →
|
|
||||||
ServiceRoute.childLabel "terminal_log" "LOG" (None Text) (Some label)
|
|
||||||
|
|
||||||
let routeRom =
|
let routeRom =
|
||||||
λ(label : Text) → ServiceRoute.parentLabel "ROM" (Some "log") (Some label)
|
λ(label : Text) → ServiceRoute.parentLabel "ROM" (Some "log") (Some label)
|
||||||
|
|
||||||
|
@ -117,21 +113,51 @@ in λ ( params
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
, terminal_log =
|
, terminal_log =
|
||||||
Child.flat Child.Attributes::{ binary = params.terminal_log }
|
Child.flat
|
||||||
|
Child.Attributes::{
|
||||||
|
, binary = params.terminal_log
|
||||||
|
, config = Init.Config::{
|
||||||
|
, content =
|
||||||
|
[ XML.leaf
|
||||||
|
{ name = "initial"
|
||||||
|
, attributes = toMap
|
||||||
|
{ width = "600"
|
||||||
|
, height = "400"
|
||||||
|
, info = "defaults to 1x1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
, policies =
|
||||||
|
[ Init.Config.Policy::{
|
||||||
|
, service = "LOG"
|
||||||
|
, label = Init.LabelSelector.prefix "core_log -> log"
|
||||||
|
, attributes = toMap { log_label = "[core] " }
|
||||||
|
}
|
||||||
|
, Init.Config.Policy::{
|
||||||
|
, service = "LOG"
|
||||||
|
, label = Init.LabelSelector.prefix "kernel_log -> log"
|
||||||
|
, attributes = toMap { log_label = "[kernel] " }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
, core_log =
|
, core_log =
|
||||||
Child.flat
|
Child.flat
|
||||||
Child.Attributes::{
|
Child.Attributes::{
|
||||||
, binary = params.log_core
|
, binary = params.log_core
|
||||||
, priorityOffset = 1
|
, priorityOffset = 1
|
||||||
, routes = [ routeLog "core", routeRom "core_log" ]
|
, routes = [ routeRom "core_log" ]
|
||||||
}
|
}
|
||||||
, kernel_log =
|
, kernel_log =
|
||||||
Child.flat
|
Child.flat
|
||||||
Child.Attributes::{
|
Child.Attributes::{
|
||||||
, binary = params.log_core
|
, binary = params.log_core
|
||||||
, priorityOffset = 1
|
, priorityOffset = 1
|
||||||
, routes = [ routeLog "kernel", routeRom "kernel_log" ]
|
, routes = [ routeRom "kernel_log" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Init.Attributes.default
|
Init.Attributes::{
|
||||||
|
, binary
|
||||||
|
, routes = [ Init.ServiceRoute.child "Gui" "gui" ]
|
||||||
|
}
|
||||||
|
|
|
@ -73,21 +73,28 @@ in {
|
||||||
|
|
||||||
genode.gui.domains.consoleLog = lib.mkIf cfg.consoleLog.enable {
|
genode.gui.domains.consoleLog = lib.mkIf cfg.consoleLog.enable {
|
||||||
layer = toString cfg.consoleLog.layer;
|
layer = toString cfg.consoleLog.layer;
|
||||||
label = "no";
|
|
||||||
content = "client";
|
content = "client";
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.genode.framebuffer.enable = cfg.enable;
|
hardware.genode.framebuffer.enable = cfg.enable;
|
||||||
|
|
||||||
genode.core.children.nitpicker = lib.mkIf cfg.enable (let
|
genode.core.children.gui = lib.mkIf cfg.enable (let
|
||||||
nitpicker' = lib.getEris' "bin" pkgs.genodePackages.nitpicker "nitpicker";
|
eris = with pkgs.genodePackages;
|
||||||
|
lib.attrsets.mapAttrs (_: lib.getEris "bin") {
|
||||||
|
inherit decorator window_layouter wm;
|
||||||
|
} // (let nitpick = lib.getEris' "bin" nitpicker;
|
||||||
|
in {
|
||||||
|
nitpicker = nitpick "nitpicker";
|
||||||
|
pointer = nitpick "pointer";
|
||||||
|
});
|
||||||
in {
|
in {
|
||||||
binary = nitpicker'.cap;
|
package = pkgs.genodePackages.init;
|
||||||
extraErisInputs = [ nitpicker' ];
|
extraErisInputs = builtins.attrValues eris;
|
||||||
configFile = pkgs.writeText "nitpicker.dhall" ''
|
configFile = pkgs.writeText "gui.dhall" ''
|
||||||
${./nitpicker.dhall} {domains = ${toDhall domains'}, policies = [ ${
|
${./gui.dhall} ${
|
||||||
lib.strings.concatStringsSep ", " cfg.policies
|
toDhall
|
||||||
} ] }
|
(lib.attrsets.mapAttrs (_: value: { binary = value.cap; }) eris)
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ let XML = Prelude.XML
|
||||||
|
|
||||||
let Init = Sigil.Init
|
let Init = Sigil.Init
|
||||||
|
|
||||||
let forward = λ(x : Text) → { local = x, route = x }
|
let forward = λ(x : Text) → { report = x, rom = x }
|
||||||
|
|
||||||
let Domain/Type = { name : Text, layer : Natural, attrs : Attributes }
|
let Domain/Type = { name : Text, layer : Natural, attrs : Attributes }
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ let nitpickerDomains =
|
||||||
{ content = "client"
|
{ content = "client"
|
||||||
, label = "no"
|
, label = "no"
|
||||||
, focus = "click"
|
, focus = "click"
|
||||||
, hover = "transient"
|
, hover = "always"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
, { name = "other", layer = 2, attrs = toMap { content = "client" } }
|
, { name = "other", layer = 2, attrs = toMap { content = "client" } }
|
||||||
|
@ -60,7 +60,7 @@ let BinaryField = { binary : Text }
|
||||||
|
|
||||||
in λ ( params
|
in λ ( params
|
||||||
: { decorator : BinaryField
|
: { decorator : BinaryField
|
||||||
, layouter : BinaryField
|
, window_layouter : BinaryField
|
||||||
, nitpicker : BinaryField
|
, nitpicker : BinaryField
|
||||||
, pointer : BinaryField
|
, pointer : BinaryField
|
||||||
, wm : BinaryField
|
, wm : BinaryField
|
||||||
|
@ -77,7 +77,6 @@ in λ ( params
|
||||||
, binary = params.nitpicker.binary
|
, binary = params.nitpicker.binary
|
||||||
, resources = Init.Resources::{ ram = Sigil.units.MiB 4 }
|
, resources = Init.Resources::{ ram = Sigil.units.MiB 4 }
|
||||||
, config = Init.Config::{
|
, config = Init.Config::{
|
||||||
, attributes = toMap { focus = "rom" }
|
|
||||||
, content =
|
, content =
|
||||||
[ XML.leaf
|
[ XML.leaf
|
||||||
{ name = "capture"
|
{ name = "capture"
|
||||||
|
@ -94,6 +93,8 @@ in λ ( params
|
||||||
, focus = "yes"
|
, focus = "yes"
|
||||||
, clicked = "yes"
|
, clicked = "yes"
|
||||||
, keystate = "no"
|
, keystate = "no"
|
||||||
|
, displays = "yes"
|
||||||
|
, pointer = "yes"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
, XML.leaf
|
, XML.leaf
|
||||||
|
@ -133,12 +134,19 @@ in λ ( params
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
, provides = [ "Capture", "Event" ]
|
, provides = [ "Capture", "Event" ]
|
||||||
|
, consumeReports =
|
||||||
|
[ { rom = "focus", report = "sculpt-only?" } ]
|
||||||
, produceReports =
|
, produceReports =
|
||||||
let f =
|
let f =
|
||||||
λ(report : Text) →
|
λ(report : Text) →
|
||||||
{ report, rom = "nitpicker_" ++ local }
|
{ report, rom = "nitpicker_" ++ report }
|
||||||
|
|
||||||
in [ f "hover", f "clicked", f "focus" ]
|
in [ f "hover"
|
||||||
|
, f "clicked"
|
||||||
|
, f "focus"
|
||||||
|
, f "displays"
|
||||||
|
, f "pointer"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
, pointer =
|
, pointer =
|
||||||
Init.Child.flat
|
Init.Child.flat
|
||||||
|
@ -148,7 +156,10 @@ in λ ( params
|
||||||
, attributes = toMap { shape = "yes" }
|
, attributes = toMap { shape = "yes" }
|
||||||
}
|
}
|
||||||
, provides = [ "Report" ]
|
, provides = [ "Report" ]
|
||||||
, reportRoms = [ forward "hover", forward "xray" ]
|
, consumeReports =
|
||||||
|
[ { rom = "hover", report = "nitpicker_hover" }
|
||||||
|
, forward "xray"
|
||||||
|
]
|
||||||
, resources = Init.Resources::{ ram = Sigil.units.MiB 2 }
|
, resources = Init.Resources::{ ram = Sigil.units.MiB 2 }
|
||||||
}
|
}
|
||||||
, decorator =
|
, decorator =
|
||||||
|
@ -182,7 +193,7 @@ in λ ( params
|
||||||
, layouter =
|
, layouter =
|
||||||
Init.Child.flat
|
Init.Child.flat
|
||||||
Init.Child.Attributes::{
|
Init.Child.Attributes::{
|
||||||
, binary = params.layouter.binary
|
, binary = params.window_layouter.binary
|
||||||
, resources = Init.Resources::{ ram = Sigil.units.MiB 4 }
|
, resources = Init.Resources::{ ram = Sigil.units.MiB 4 }
|
||||||
, consumeReports =
|
, consumeReports =
|
||||||
[ forward "decorator_margins"
|
[ forward "decorator_margins"
|
||||||
|
@ -191,11 +202,11 @@ in λ ( params
|
||||||
, { rom = "rules", report = "layouter_rules" }
|
, { rom = "rules", report = "layouter_rules" }
|
||||||
, forward "window_list"
|
, forward "window_list"
|
||||||
]
|
]
|
||||||
, procdueReports =
|
, produceReports =
|
||||||
[ forward "window_layout"
|
[ forward "window_layout"
|
||||||
, forward "resize_request"
|
, forward "resize_request"
|
||||||
, { report = "focus", rom = "layouter_focus" }
|
, { report = "focus", rom = "layouter_focus" }
|
||||||
, { repot = "rules", rom = "layouter_rules" }
|
, { report = "rules", rom = "layouter_rules" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
, wm =
|
, wm =
|
||||||
|
@ -233,10 +244,13 @@ in λ ( params
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
, routes = [ Init.ServiceRoute.parent "Timer" ]
|
||||||
, services =
|
, services =
|
||||||
[ Init.ServiceRoute.child "Gui" "wm"
|
[ Init.ServiceRoute.child "Capture" "nitpicker"
|
||||||
, Init.ServiceRoute.child "Report" "wm"
|
, Init.ServiceRoute.child "Event" "nitpicker"
|
||||||
|
, Init.ServiceRoute.child "Gui" "wm"
|
||||||
, Init.ServiceRoute.child "ROM" "wm"
|
, Init.ServiceRoute.child "ROM" "wm"
|
||||||
|
, Init.ServiceRoute.child "Report" "wm"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Init.Attributes::{ binary }
|
Init.Attributes::{ provides = [ "Capture", "Event", "Gui" ] }
|
||||||
|
|
|
@ -46,6 +46,7 @@ in {
|
||||||
, routes =
|
, routes =
|
||||||
[ Init.ServiceRoute.parent "IO_MEM"
|
[ Init.ServiceRoute.parent "IO_MEM"
|
||||||
, Init.ServiceRoute.parent "IO_PORT"
|
, Init.ServiceRoute.parent "IO_PORT"
|
||||||
|
, Init.ServiceRoute.child "Capture" "gui"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -108,6 +108,7 @@ in λ ( params
|
||||||
, Init.ServiceRoute.parent "VM"
|
, Init.ServiceRoute.parent "VM"
|
||||||
, Init.ServiceRoute.child "Timer" "timer"
|
, Init.ServiceRoute.child "Timer" "timer"
|
||||||
, Init.ServiceRoute.child "Rtc" "rtc"
|
, Init.ServiceRoute.child "Rtc" "rtc"
|
||||||
|
, Init.ServiceRoute.child "Gui" "gui"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue