File: remote.h

package info (click to toggle)
twin 0.4.0-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,804 kB
  • ctags: 23,904
  • sloc: ansic: 61,860; cpp: 1,023; makefile: 777; sh: 552; lex: 302; yacc: 231
file content (40 lines) | stat: -rw-r--r-- 1,379 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef _TWIN_REMOTE_H
#define _TWIN_REMOTE_H

uldat	RegisterRemoteFd(int Fd, void (*HandlerIO)(int Fd, uldat Slot));
uldat	RegisterRemote(int Fd, obj HandlerData, void *HandlerIO); /* (void (*HandlerIO))(int Fd, obj HandlerData) */
void  UnRegisterRemote(uldat Slot);
byte	RegisterWindowFdIO(window Window, void (*HandlerIO)(int Fd, window Window));
void  UnRegisterWindowFdIO(window Window);
uldat	RemoteWriteQueue(uldat Slot, uldat len, CONST void *data);
#define	RemoteWindowWriteQueue(Window, len, data) RemoteWriteQueue((Window)->RemoteData.FdSlot, (len), (data))
byte	RemoteFlush(uldat Slot);
#define	RemoteWindowFlush(Window) RemoteFlush((Window)->RemoteData.FdSlot)

msgport RemoteGetMsgPort(uldat Slot);

void RemoteFlushAll(void);
void RemoteEvent(int FdNum, fd_set *FdSet);
void RemoteParanoia(void);

/*
 * call this if you couldn't write all pending data to a slot
 * which DOES NOT use the RemoteWriteQueue mechanism
 * (i.e. the slot of a display or something like that)
 */
void RemoteCouldntWrite(uldat Slot);
/*
 * if you called RemoteCouldntWrite(),
 * you *MUST* call RemoteCouldWrite() after you succeed
 * in writing all pending data
 */
void RemoteCouldWrite(uldat Slot);

extern uldat FdWQueued;

void   RegisterMsgPort(msgport MsgPort, uldat Slot);
void UnRegisterMsgPort(msgport MsgPort);

void remoteKillSlot(uldat slot);

#endif /* _TWIN_REMOTE_H */