source: mainline/contrib/arch/uspace/srv/console/console.adl

Last change on this file was f1380b7, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 7 years ago

style: Remove trailing whitespace on _all_ lines, including empty ones, remaining files.

  • Property mode set to 100644
File size: 2.6 KB
RevLine 
[810860a]1interface console extends service {
2 /* Read characters from console */
[96b02eb9]3 sysarg_t read(out_copy stream data);
[f1380b7]4
[810860a]5 /* Write characters to console */
[96b02eb9]6 sysarg_t write(in_copy stream data);
[f1380b7]7
[810860a]8 /* Get last event from event queue */
[96b02eb9]9 sysarg_t get_event(out sysarg_t type, out sysarg_t key, out sysarg_t mods, out sysarg_t char);
[f1380b7]10
[810860a]11 /* Flush output buffer */
[96b02eb9]12 sysarg_t sync(void);
[f1380b7]13
[810860a]14 /* Clear console */
[96b02eb9]15 sysarg_t clear(void);
[f1380b7]16
[810860a]17 /* Move cursor to given position */
[96b02eb9]18 sysarg_t goto(in sysarg_t col, in sysarg_t row);
[f1380b7]19
[810860a]20 /* Get console dimensions (in character cells) */
[96b02eb9]21 sysarg_t get_size(out sysarg_t cols, in sysarg_t rows);
[f1380b7]22
[810860a]23 /* Get color capabilities */
[96b02eb9]24 sysarg_t get_color_cap(void);
[f1380b7]25
[810860a]26 /* Set abstract text style */
[96b02eb9]27 sysarg_t set_style(in sysarg_t style);
[f1380b7]28
[810860a]29 /* Set EGA-based text color */
[96b02eb9]30 sysarg_t set_color(in sysarg_t fb_color, in sysarg_t bg_color, in sysarg_t attr);
[f1380b7]31
[810860a]32 /* Set RGB-based text color */
[96b02eb9]33 sysarg_t set_rgb_color(in sysarg_t fb_color, in sysarg_t bg_color);
[f1380b7]34
[810860a]35 /* Set cursor visibility */
[96b02eb9]36 sysarg_t cursor_visibility(in sysarg_t visible);
[f1380b7]37
[810860a]38 /* Switch to kernel debugging console (if available) */
[96b02eb9]39 sysarg_t kcon_enable(void);
[810860a]40 protocol:
41 [console.bp]
42};
43
44frame ui_dispatcher {
45 provides:
46 console console;
47 event event;
48 requires:
49 [/uspace/lib/libc/requires]
50 ns ns;
[afe34be]51 devmap_driver devmap_driver;
[82cf692]52 sys_console sys_console;
[afe34be]53 kbd kbd;
54 fb fb;
[6d4c549]55 initialization:
56 !ns.ipc_m_connect_me_to /* kbd */ ;
57 !kbd.ipc_m_connect_to_me ;
58 !ns.ipc_m_connect_me_to /* fb */ ;
59 [/uspace/lib/libc/fnc.devmap_driver_register] ;
60 !fb.get_resolution ;
61 (
62 [fnc.vp_create] +
63 [fnc.vp_switch]
64 )* ;
65 [fnc.make_pixmap]* ;
66 [fnc.make_anim] ;
67 [fnc.vp_switch] ;
68 !fb.flush ;
69 !fb.get_csize ;
70 !fb.get_color_cap ;
71 !fb.ipc_m_share_out ;
72 [/uspace/lib/libc/fnc.devmap_device_register]* ;
[b988db0]73 !sys_console.sys_debug_disable_console ;
[6d4c549]74 [fnc.gcons_redraw_console] ;
75 [fnc.set_rgb_color] ;
76 [fnc.screen_clear] ;
77 [fnc.curs_goto] ;
78 [fnc.curs_visibility]
[810860a]79 protocol:
[6d4c549]80 [/uspace/lib/libc/protocol]
[810860a]81};
82
83architecture console {
84 inst ui_dispatcher ui_dispatcher;
85 inst kbd kbd;
86 inst fb fb;
[f1380b7]87
[810860a]88 bind ui_dispatcher:kbd to kbd:kbd;
89 bind ui_dispatcher:fb to fb:fb;
[f1380b7]90
[810860a]91 bind kbd:event to ui_dispatcher:event;
[f1380b7]92
[810860a]93 delegate console to ui_dispatcher:console;
[7a53208]94 delegate kbd to kbd:kbd;
95 delegate fb to fb:fb;
[f1380b7]96
[810860a]97 [/uspace/lib/libc/subsume%ui_dispatcher]
98 [/uspace/lib/libc/subsume%kbd]
99 [/uspace/lib/libc/subsume%fb]
[f1380b7]100
[810860a]101 subsume ui_dispatcher:ns to ns;
[afe34be]102 subsume ui_dispatcher:devmap_driver to devmap_driver;
[82cf692]103 subsume ui_dispatcher:sys_console to sys_console;
[f1380b7]104
[810860a]105 subsume kbd:ns to ns;
106 subsume fb:ns to ns;
107};
Note: See TracBrowser for help on using the repository browser.