|
ubit
|
UMS server main class. More...
#include <umserver.hpp>
Public Member Functions | |
| UMServer (const char *display_name, int ums_port, bool reuse_address, int cursor_mode, int neighbor_mode) | |
| constructor. More... | |
| bool | isInit () const |
| checks if the UMS is initialized. More... | |
| void | start () |
| starts the main loop of the UMS server. More... | |
| void | setPublicDir (const char *s) |
| const std::string & | getPublicDir () |
| void | setNativeButton (int raw_btn_number, unsigned int raw_mod_mask, unsigned int to_btn_mask, unsigned int ro_mod_mask) |
| void | setActionKey (unsigned int keycode, int modifier, void(*press_action)(class UMServer &, XEvent &), void(*release_action)(class UMServer &, XEvent &)) |
| this key will perform some useful action when pressed and/or released. | |
| RemoteUMSList::iterator | findRemoteUMS (const char *name) |
| RemoteUMS * | addRemoteUMS (const char *name, const char *address, int port, int pos) |
| void | removeRemoteUMS (const char *name) |
| RemoteUMS * | getNeighborUMS (int pos) const |
| RemoteUMS * | setNeighborUMS (int pos, const char *name) |
| void | sendRemoteUMSState (RemoteUMS *, int state) |
| sends an added/removed state when a RemoteUMS is created or deleted. | |
| void | sendRemoteUMSList (Cnx *to) |
| sends the list of RemoteUMSs that are currently browsed to a client. | |
| void | sendNeighborList (Cnx *to) |
| void | sendNeighborState (RemoteUMS *, int pos) |
| std::string | resolveDeviceName (const char *) |
| returns the /dev/ttxx name from a shortcut. | |
| bool | addEventSource (EventSource *) |
| adds an event source. More... | |
| bool | removeEventSource (EventSource *) |
| removes an event source. More... | |
| MouseFlow & | getNativeMouseFlow () const |
| returns the native mouse flow. More... | |
| MouseFlow * | getMouseFlow (int id) const |
| returns this mouse flow if 'id' is defined and it is a mouse flow. More... | |
| MouseFlow * | getOrCreateMouseFlow (int id) |
| returns this mouse flow or creates it if it does not exist | |
| EventFlow * | getEventFlow (int id) const |
| returns this mouse flow if 'id' is defined and it is a mouse flow. More... | |
| bool | addEventFlow (EventFlow *) |
| adds an event flow. More... | |
| bool | removeEventFlow (EventFlow *) |
| removes an event flow. More... | |
| CnxList::iterator | findCnxIt (USocket *) |
| Cnx * | findCnx (USocket *) |
| Cnx * | addCnx (USocket *) |
| void | removeCnx (USocket *) |
| XDisplay * | getDisplay () const |
| XScreen * | getScreen () const |
| WindowID | getRoot () const |
| int | getXConnection () const |
| long | getScreenWidth () const |
| long | getScreenHeight () const |
| int | getScreenDepth () const |
| struct Calibration * | getCalibration () |
| Win * | addWin (WindowID, bool notify) |
| void | removeWin (WindowID, bool notify) |
| void | reorderWin (WinList::iterator &from, const WinList::iterator &to) |
| void | retrieveXWindows () |
| void | raiseXWindows () |
| void | sendWindowState (Win *, int state) |
| void | sendWindowList (Cnx *to) |
| Win * | findWin (const char *name) |
| Win * | findWin (WindowID) |
| WinList::iterator | findWinIt (WindowID) |
| searches a window from its name or its ID in the X window list. | |
| bool | getXWin (int root_x, int root_y, Pos &, bool check_props) |
| returns the window and pos that contains this point. | |
| bool | getXSubwin (const Pos &wp, int x, int y, Pos &) |
| trouver subwindow de wp.win contenant le point (x,y) relatif a wp.win. | |
| bool | getXWinPos (const Win *w, Pos &) |
| trouver position de w dans root. | |
| bool | isPointer (WindowID) |
| true if this window is a pseudo pointer. | |
| void | moveNativePointerBackHome (bool center) |
| move the native pointer back to the home server. | |
| class UServerSocket * | getServerSocket () |
| WinList & | getWins () |
| CnxList & | getCnxs () |
| void | processRequest (USocket *, class UInbuf &) |
| bool | initX (const char *display_name, int cursor_mode, int neighbor_mode) |
| void | getAndProcessXEvents () |
| bool | addSourceToMainLoop (USocket *) |
| bool | addSourceToMainLoop (EventSource *) |
| void | initMainLoop () |
| void | runMainLoop () |
Static Public Member Functions | |
| static TimeID | getTime () |
| in millisec. | |
Public Attributes | |
| AtomID | _WM_DELETE_WINDOW |
| AtomID | _UMS_WINDOW |
| AtomID | _UMS_MESSAGE |
| bool | is_init |
| class UServerSocket * | serv_sock |
| int | xconnection |
| XDisplay * | xdisplay |
| XScreen * | xscreen |
| WindowID | xrootwin |
| CursorID | root_cursor |
| CursorID | grab_cursor |
| struct Events & | events |
| struct Edges * | edges |
| struct Calibration * | calib |
| struct Mdns * | mdns |
| std::string | hostname |
| std::string | system |
| std::string | public_dir |
| EventSource & | natsource |
| the native event source. | |
| std::vector< EventSource * > | sources |
| list of event sources (= the devices that are connected to the eflows) | |
| std::vector< EventFlow * > | eflows |
| list of event flows (eflows[0] corresponds to the standard X server) | |
| CnxList | cnxs |
| lists of connections (= connected applications) and their opened windows | |
| WinList | wins |
| list of the windows of this X server | |
| RemoteUMSList | remotes |
| the list of RemoteUMS that are currently browsed. | |
| RemoteUMS * | l_neighbor |
| neigbhors of this UMS server. | |
| RemoteUMS * | r_neighbor |
| RemoteUMS * | t_neighbor |
| RemoteUMS * | b_neighbor |
| std::vector< ActionKey > | action_keys |
| predefined keys that perform some action | |
Static Public Attributes | |
| static const TimeID | NEIGHBOR_RETRY_DELAY = 6*1000 |
| attempt to re-connect (if connection failed) after this delay | |
UMS server main class.
| UMServer::UMServer | ( | const char * | display_name, |
| int | ums_port, | ||
| bool | reuse_address, | ||
| int | cursor_mode, | ||
| int | neighbor_mode | ||
| ) |
constructor.
Args:
| bool UMServer::addEventFlow | ( | EventFlow * | fl | ) |
adds an event flow.
NB: - several event flows can be created
| bool UMServer::addEventSource | ( | EventSource * | so | ) |
adds an event source.
NB: - several event sources can be created Return value:
| EventFlow * UMServer::getEventFlow | ( | int | id | ) | const |
returns this mouse flow if 'id' is defined and it is a mouse flow.
equivalent to dynamic_cast<MouseFlow*>(getEventFlow(id)) the id of the native mouse flow is 0.
| MouseFlow * UMServer::getMouseFlow | ( | int | id | ) | const |
returns this mouse flow if 'id' is defined and it is a mouse flow.
equivalent to dynamic_cast<MouseFlow*>(getEventFlow(id) the id of the native mouse flow is 0.
| MouseFlow & UMServer::getNativeMouseFlow | ( | ) | const |
returns the native mouse flow.
equivalent to getMouseFlow(0)
|
inline |
checks if the UMS is initialized.
NB: returns true if the UMS port and the X display could be opened.
| bool UMServer::removeEventFlow | ( | EventFlow * | fl | ) |
removes an event flow.
NB: - this fct does not delete the flow.
| bool UMServer::removeEventSource | ( | EventSource * | so | ) |
removes an event source.
NB: - this fct does not delete the source. Return value:
| void UMServer::start | ( | ) |
starts the main loop of the UMS server.
NB: the UMS must be initialized (see: isInit())
1.8.12