123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283 |
- Dat : module {
- PATH : con "/dis/acme/dat.dis";
- init : fn(mods : ref Mods);
- Mods : adt {
- sys : Sys;
- bufio : Bufio;
- draw : Draw;
- styx : Styx;
- styxaux : Styxaux;
- acme : Acme;
- gui : Gui;
- graph : Graph;
- dat : Dat;
- framem : Framem;
- utils : Utils;
- regx : Regx;
- scroll : Scroll;
- textm : Textm;
- filem : Filem;
- windowm : Windowm;
- rowm : Rowm;
- columnm : Columnm;
- bufferm : Bufferm;
- diskm : Diskm;
- exec : Exec;
- look : Look;
- timerm : Timerm;
- fsys : Fsys;
- xfidm : Xfidm;
- plumbmsg : Plumbmsg;
- edit: Edit;
- editlog: Editlog;
- editcmd: Editcmd;
- };
- SZSHORT : con 2;
- SZINT : con 4;
- FALSE, TRUE, XXX : con iota;
- EM_NORMAL, EM_RAW, EM_MASK : con iota;
- Qdir,Qacme,Qcons,Qconsctl,Qdraw,Qeditout,Qindex,Qlabel,Qnew,QWaddr,QWbody,QWconsctl,QWctl,QWdata,QWeditout,QWevent,QWrdsel,QWwrsel,QWtag,QMAX : con iota;
- Blockincr : con 256;
- Maxblock : con 8*1024;
- NRange : con 10;
- Infinity : con 16r7fffffff; # huge value for regexp address
- # fbufalloc() guarantees room off end of BUFSIZE
- MAXRPC : con 8192+Styx->IOHDRSZ;
- BUFSIZE : con MAXRPC;
- EVENTSIZE : con 256;
- PLUMBSIZE : con 1024;
- Scrollwid : con 12; # width of scroll bar
- Scrollgap : con 4; # gap right of scroll bar
- Margin : con 4; # margin around text
- Border : con 2; # line between rows, cols, windows
- Maxtab : con 4; # size of a tab, in units of the '0' character
-
- Empty: con 0;
- Null : con '-';
- Delete : con 'd';
- Insert : con 'i';
- Replace: con 'r';
- Filename : con 'f';
- # editing
- Inactive, Inserting, Collecting: con iota;
- # alphabets
- ALPHA_LATIN: con '\0';
- ALPHA_GREEK: con '*';
- ALPHA_CYRILLIC: con '@';
- Kscrollup: con 16re050;
- Kscrolldown: con 16re051;
- Astring : adt {
- s : string;
- };
- Lock : adt {
- cnt : int;
- chann : chan of int;
- init : fn() : ref Lock;
- lock : fn(l : self ref Lock);
- unlock : fn(l : self ref Lock);
- locked : fn(l : self ref Lock) : int;
- };
- # Lockx : adt {
- # sem : ref Lock->Semaphore;
- #
- # init : fn() : ref Lockx;
- # lock : fn(l : self ref Lockx);
- # unlock : fn(l : self ref Lockx);
- # };
- Ref : adt {
- l : ref Lock;
- cnt : int;
- init : fn() : ref Ref;
- inc : fn(r : self ref Ref) : int;
- dec : fn(r : self ref Ref) : int;
- refx : fn(r : self ref Ref) : int;
- };
- Runestr : adt {
- r: string;
- nr: int;
- };
- Range : adt {
- q0 : int;
- q1 : int;
- };
- Block : adt {
- addr : int; # disk address in bytes
- n : int; # number of used runes in block
- next : cyclic ref Block; # pointer to next in free list
- };
- Timer : adt {
- dt : int;
- c : chan of int;
- next : cyclic ref Timer;
- };
- Command : adt {
- pid : int;
- name : string;
- text : string;
- av : list of string;
- iseditcmd: int;
- md : ref Mntdir;
- next : cyclic ref Command;
- };
- Dirtab : adt {
- name : string;
- qtype : int;
- qid : int;
- perm : int;
- };
- Mntdir : adt {
- id : int;
- refs : int;
- dir : string;
- ndir : int;
- next : cyclic ref Mntdir;
- nincl : int;
- incl : array of string;
- };
- Fid : adt {
- fid : int;
- busy : int;
- open : int;
- qid : Sys->Qid;
- w : cyclic ref Windowm->Window;
- dir : array of Dirtab;
- next : cyclic ref Fid;
- mntdir : ref Mntdir;
- nrpart : int;
- rpart : array of byte;
- };
- Rangeset : type array of Range;
- Expand : adt {
- q0 : int;
- q1 : int;
- name : string;
- bname : string;
- jump : int;
- at : ref Textm->Text;
- ar : string;
- a0 : int;
- a1 : int;
- };
- Dirlist : adt {
- r : string;
- wid : int;
- };
- Reffont : adt {
- r : ref Ref;
- f : ref Draw->Font;
- get : fn(p : int, q : int, r : int, b : string) : ref Reffont;
- close : fn(r : self ref Reffont);
- };
- Cursor : adt {
- hot : Draw->Point;
- size : Draw->Point;
- bits : array of byte;
- };
- Smsg0 : adt {
- msize : int;
- version : string;
- iounit: int;
- qid : Sys->Qid;
- count : int;
- data : array of byte;
- stat : Sys->Dir;
- qids: array of Sys->Qid;
- };
- # loadfile function ptr
- BUFL, READL: con iota;
- # allwindows pick type
- Looper: adt{
- cp: ref Edit->Cmd;
- XY: int;
- w: array of ref Windowm->Window;
- nw: int;
- }; # only one; X and Y can't nest
- Tofile: adt {
- f: ref Filem->File;
- r: ref Edit->String;
- };
- Filecheck: adt{
- f: ref Filem->File;
- r: string;
- nr: int;
- };
- Allwin: adt{
- pick{
- LP => lp: ref Looper;
- FF => ff: ref Tofile;
- FC => fc: ref Filecheck;
- }
- };
- seq : int;
- maxtab : int;
- mouse : ref Draw->Pointer;
- reffont : ref Reffont;
- modbutton : ref Draw->Image;
- colbutton : ref Draw->Image;
- button : ref Draw->Image;
- arrowcursor, boxcursor : ref Cursor;
- row : ref Rowm->Row;
- disk : ref Diskm->Disk;
- seltext : ref Textm->Text;
- argtext : ref Textm->Text;
- mousetext : ref Textm->Text; # global because Text.close needs to clear it
- typetext : ref Textm->Text; # ditto
- barttext : ref Textm->Text; # shared between mousetask and keyboardtask
- bartflag : int;
- activewin : ref Windowm->Window;
- activecol : ref Columnm->Column;
- nullrect : Draw->Rect;
- home : string;
- plumbed : int;
- ckeyboard : chan of int;
- cmouse : chan of ref Draw->Pointer;
- cwait : chan of string;
- ccommand : chan of ref Command;
- ckill : chan of string;
- cxfidalloc : chan of ref Xfidm->Xfid;
- cxfidfree : chan of ref Xfidm->Xfid;
- cerr : chan of string;
- cplumb : chan of ref Plumbmsg->Msg;
- cedit: chan of int;
- };
|