source: mainline/contrib/arch/uspace/srv/console/console.adl@ 80d9d83

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 80d9d83 was 96b02eb9, checked in by Martin Decky <martin@…>, 15 years ago

more unification of basic types

  • use sysarg_t and native_t (unsigned and signed variant) in both kernel and uspace
  • remove ipcarg_t in favour of sysarg_t

(no change in functionality)

  • 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);
[810860a]4
5 /* Write characters to console */
[96b02eb9]6 sysarg_t write(in_copy stream data);
[810860a]7
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);
[810860a]10
11 /* Flush output buffer */
[96b02eb9]12 sysarg_t sync(void);
[810860a]13
14 /* Clear console */
[96b02eb9]15 sysarg_t clear(void);
[810860a]16
17 /* Move cursor to given position */
[96b02eb9]18 sysarg_t goto(in sysarg_t col, in sysarg_t row);
[810860a]19
20 /* Get console dimensions (in character cells) */
[96b02eb9]21 sysarg_t get_size(out sysarg_t cols, in sysarg_t rows);
[810860a]22
23 /* Get color capabilities */
[96b02eb9]24 sysarg_t get_color_cap(void);
[810860a]25
26 /* Set abstract text style */
[96b02eb9]27 sysarg_t set_style(in sysarg_t style);
[810860a]28
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);
[810860a]31
32 /* Set RGB-based text color */
[96b02eb9]33 sysarg_t set_rgb_color(in sysarg_t fb_color, in sysarg_t bg_color);
[810860a]34
35 /* Set cursor visibility */
[96b02eb9]36 sysarg_t cursor_visibility(in sysarg_t visible);
[810860a]37
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;
87
88 bind ui_dispatcher:kbd to kbd:kbd;
89 bind ui_dispatcher:fb to fb:fb;
90
91 bind kbd:event to ui_dispatcher:event;
92
93 delegate console to ui_dispatcher:console;
[7a53208]94 delegate kbd to kbd:kbd;
95 delegate fb to fb:fb;
[810860a]96
97 [/uspace/lib/libc/subsume%ui_dispatcher]
98 [/uspace/lib/libc/subsume%kbd]
99 [/uspace/lib/libc/subsume%fb]
100
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;
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.