wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

x.h (2333B)


      1 #include <stuff/base.h>
      2 #include <stuff/x11.h>
      3 #include <fmt.h>
      4 
      5 extern void	init_screens(void);
      6 
      7 #define Net(x) ("_NET_" x)
      8 #define	Action(x) ("_NET_WM_ACTION_" x)
      9 #define	State(x) ("_NET_WM_STATE_" x)
     10 #define	Type(x) ("_NET_WM_WINDOW_TYPE_" x)
     11 #define NET(x) xatom(Net(x))
     12 #define	ACTION(x) xatom(Action(x))
     13 #define	STATE(x) xatom(State(x))
     14 #define	TYPE(x) xatom(Type(x))
     15 
     16 /* printevent.c */
     17 int	fmtevent(Fmt*);
     18 
     19 int	fmtkey(Fmt*);
     20 
     21 /* xext.c */
     22 void	randr_event(XEvent*);
     23 bool	render_argb_p(Visual*);
     24 void	xext_event(XEvent*);
     25 void	xext_init(void);
     26 Rectangle*	xinerama_screens(int*);
     27 
     28 void	client_readconfig(CTuple*, CTuple*, Font**);
     29 
     30 #define event_handle(w, fn, ev) \
     31 	_event_handle(w, offsetof(Handlers, fn), (XEvent*)ev)
     32 
     33 void	_event_handle(Window*, ulong, XEvent*);
     34 
     35 void	event_check(void);
     36 void	event_dispatch(XEvent*);
     37 uint	event_flush(long, bool dispatch);
     38 uint	event_flushenter(void);
     39 void	event_loop(void);
     40 #ifdef IXP_API /* Evil. */
     41 void	event_fdclosed(IxpConn*);
     42 void	event_fdready(IxpConn*);
     43 void	event_preselect(IxpServer*);
     44 #endif
     45 long	event_updatextime(void);
     46 
     47 void	event_buttonpress(XButtonPressedEvent*);
     48 void	event_buttonrelease(XButtonPressedEvent*);
     49 void	event_clientmessage(XClientMessageEvent*);
     50 void	event_configurenotify(XConfigureEvent*);
     51 void	event_configurerequest(XConfigureRequestEvent*);
     52 void	event_destroynotify(XDestroyWindowEvent*);
     53 void	event_enternotify(XCrossingEvent*);
     54 void	event_expose(XExposeEvent*);
     55 void	event_focusin(XFocusChangeEvent*);
     56 void	event_focusout(XFocusChangeEvent*);
     57 void	event_keypress(XKeyEvent*);
     58 void	event_keyrelease(XKeyEvent*);
     59 void	event_leavenotify(XCrossingEvent*);
     60 void	event_mapnotify(XMapEvent*);
     61 void	event_mappingnotify(XMappingEvent*);
     62 void	event_maprequest(XMapRequestEvent*);
     63 void	event_motionnotify(XMotionEvent*);
     64 void	event_propertynotify(XPropertyEvent*);
     65 void	event_reparentnotify(XReparentEvent *ev);
     66 void	event_selection(XSelectionEvent*);
     67 void	event_selectionclear(XSelectionClearEvent*);
     68 void	event_selectionrequest(XSelectionRequestEvent*);
     69 void	event_unmapnotify(XUnmapEvent*);
     70 
     71 extern long	event_lastconfigure;
     72 extern long	event_xtime;
     73 extern bool	event_looprunning;
     74 extern void	(*event_debug)(XEvent*);
     75 
     76 extern Visual*	render_visual;
     77 extern Colormap	render_colormap;
     78 extern bool	have_RandR;
     79 extern bool	have_render;
     80 extern bool	have_xinerama;
     81