YggdrasilWM  0.1.1
A tiny window manager coded in C++
mockX11Wrapper.hpp
Go to the documentation of this file.
1 #include "gmock/gmock.h"
3 
4 class mockX11Wrapper : public BaseX11Wrapper {
5 public:
6  mockX11Wrapper() = default;
7  ~mockX11Wrapper() = default;
8  MOCK_METHOD(Display *, openDisplay, (), (override));
9  MOCK_METHOD(Display *, openDisplay, (const char *), (override));
10  MOCK_METHOD(void, closeDisplay, (Display *), (override));
11  MOCK_METHOD(int, defaultScreen, (Display *), (override));
12  MOCK_METHOD(Window, rootWindow, (Display *, int), (override));
13  MOCK_METHOD(Atom, internAtom, (Display *, const char *, bool), (override));
14  MOCK_METHOD(int, displayWidth, (Display *, int), (override));
15  MOCK_METHOD(int, displayHeight, (Display *, int), (override));
16  MOCK_METHOD(int, grabServer, (Display *), (override));
17  MOCK_METHOD(int, ungrabServer, (Display *), (override));
18  MOCK_METHOD(int, flush, (Display *), (override));
19  MOCK_METHOD(XErrorHandler, setErrorHandler, (XErrorHandler), (override));
20  MOCK_METHOD(int, selectInput, (Display *, Window, long), (override));
21  MOCK_METHOD(int, sync, (Display *, bool), (override));
22  MOCK_METHOD(int, queryTree, (Display *, Window, Window *, Window *, Window **, unsigned int *), (override));
23  MOCK_METHOD(int, freeX, (void *), (override));
24  MOCK_METHOD(int, nextEvent, (Display *, XEvent *), (override));
25  MOCK_METHOD(int, sendEvent, (Display *, Window, bool, long, XEvent *), (override));
26  MOCK_METHOD(int, changeProperty, (Display *, Window, Atom, Atom, int, int, const unsigned char *, int), (override));
27  MOCK_METHOD(int, getProperty, (Display *, Window, Atom, long, long, bool, Atom, Atom *, int *, unsigned long *, unsigned long *, unsigned char **), (override));
28  MOCK_METHOD(int, setInputFocus, (Display *, Window, int, Time), (override));
29  MOCK_METHOD(int, getErrorText, (Display *, int, char *, int), (override));
30  MOCK_METHOD(int, mapWindow, (Display *, Window), (override));
31  MOCK_METHOD(int, unmapWindow, (Display *, Window), (override));
32  MOCK_METHOD(int, configureWindow, (Display *, Window, unsigned, XWindowChanges *), (override));
33  MOCK_METHOD(int, setInputFocus, (Display *, Window, int), (override));
34  MOCK_METHOD(int, raiseWindow, (Display *, Window), (override));
35  MOCK_METHOD(int, lowerWindow, (Display *, Window), (override));
36  MOCK_METHOD(int, setWindowBorder, (Display *, Window, unsigned long), (override));
37  MOCK_METHOD(int, getWindowProperty, (Display *, Window, Atom, long, long, bool, Atom, Atom *, int *, unsigned long *, unsigned long *, unsigned char **), (override));
38  MOCK_METHOD(int, destroyWindow, (Display *, Window), (override));
39  MOCK_METHOD(int, getWindowAttributes, (Display *, Window, XWindowAttributes *), (override));
40  MOCK_METHOD(int, addToSaveSet, (Display *, Window), (override));
41  MOCK_METHOD(int, removeFromSaveSet, (Display *, Window), (override));
42  MOCK_METHOD(int, reparentWindow, (Display *, Window, Window, int, int), (override));
43  MOCK_METHOD(int, grabButton, (Display *, unsigned int, unsigned int, Window, bool, unsigned int, int, int, Window, Cursor), (override));
44  MOCK_METHOD(int, ungrabButton, (Display *, unsigned int, unsigned int, Window), (override));
45  MOCK_METHOD(int, grabKey, (Display *, int, unsigned int, Window, bool, int, int), (override));
46  MOCK_METHOD(int, ungrabKey, (Display *, int, unsigned int, Window), (override));
47  MOCK_METHOD(int, moveWindow, (Display *, Window, int, int), (override));
48  MOCK_METHOD(int, resizeWindow, (Display *, Window, unsigned int, unsigned int), (override));
49  MOCK_METHOD(int, keysymToKeycode, (Display *, int), (override));
50  MOCK_METHOD(KeySym, stringToKeysym, (const char *), (override));
51  MOCK_METHOD(Window, createWindow, (Display *, Window, int, int, unsigned int, unsigned int, unsigned int, int, unsigned int, Visual *, unsigned long, XSetWindowAttributes *), (override));
52  MOCK_METHOD(int, clearWindow, (Display *, Window), (override));
53  MOCK_METHOD(int, drawString, (Display *, Window, GC, int, int, const char *, int), (override));
54  MOCK_METHOD(Window, createSimpleWindow, (Display *, Window, int, int, unsigned int, unsigned int, unsigned int, unsigned long, unsigned long), (override));
55 };
Definition: baseX11Wrapper.hpp:37
virtual int ungrabKey(Display *display, int keycode, unsigned int modifiers, Window grab_window)=0
virtual int moveWindow(Display *display, Window window, int x, int y)=0
virtual int selectInput(Display *display, Window window, long eventMask)=0
virtual int reparentWindow(Display *display, Window window, Window parent, int x, int y)=0
virtual int ungrabServer(Display *display)=0
virtual Display * openDisplay()=0
virtual int clearWindow(Display *display, Window window)=0
virtual int sync(Display *display, bool discard)=0
virtual Atom internAtom(Display *display, const char *atomName, bool onlyIfExists)=0
virtual int nextEvent(Display *display, XEvent *event_return)=0
virtual int sendEvent(Display *display, Window window, bool propagate, long eventMask, XEvent *event_send)=0
virtual int drawString(Display *display, Window window, GC gc, int x, int y, const char *string, int length)=0
virtual int mapWindow(Display *display, Window window)=0
virtual int getWindowAttributes(Display *display, Window window, XWindowAttributes *window_attributes_return)=0
virtual int grabServer(Display *display)=0
virtual int lowerWindow(Display *display, Window window)=0
virtual Window createSimpleWindow(Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, unsigned long border, unsigned long background)=0
virtual int setInputFocus(Display *display, Window focus, int revertTo, Time time)=0
virtual XErrorHandler setErrorHandler(XErrorHandler handler)=0
virtual int grabButton(Display *display, unsigned int button, unsigned int modifiers, Window grab_window, bool owner_events, unsigned int event_mask, int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor)=0
virtual int displayWidth(Display *display, int screen)=0
virtual int keysymToKeycode(Display *display, int keysym)=0
virtual int destroyWindow(Display *display, Window window)=0
virtual int defaultScreen(Display *display)=0
virtual int resizeWindow(Display *display, Window window, unsigned int width, unsigned int height)=0
virtual int removeFromSaveSet(Display *display, Window window)=0
virtual KeySym stringToKeysym(const char *string)=0
virtual int displayHeight(Display *display, int screen)=0
virtual int addToSaveSet(Display *display, Window window)=0
virtual int flush(Display *display)=0
virtual int freeX(void *data)=0
virtual int raiseWindow(Display *display, Window window)=0
virtual int setWindowBorder(Display *display, Window window, unsigned long border)=0
virtual int changeProperty(Display *display, Window window, Atom property, Atom type, int format, int mode, const unsigned char *data, int nelements)=0
virtual int ungrabButton(Display *display, unsigned int button, unsigned int modifiers, Window grab_window)=0
virtual void closeDisplay(Display *display)=0
virtual int getErrorText(Display *display, int code, char *buffer_return, int length)=0
virtual int getProperty(Display *display, Window window, Atom property, long long_offset, long long_length, bool delete_, Atom req_type, Atom *actual_type_return, int *actual_format_return, unsigned long *nitems_return, unsigned long *bytes_after_return, unsigned char **prop_return)=0
virtual Window rootWindow(Display *display, int screen)=0
virtual Window createWindow(Display *display, Window parent, int x, int y, unsigned int width, unsigned int height, unsigned int border_width, int depth, unsigned int _class, Visual *visual, unsigned long valuemask, XSetWindowAttributes *attributes)=0
virtual int getWindowProperty(Display *display, Window window, Atom property, long long_offset, long long_length, bool delete_, Atom req_type, Atom *actual_type_return, int *actual_format_return, unsigned long *nitems_return, unsigned long *bytes_after_return, unsigned char **prop_return)=0
virtual int unmapWindow(Display *display, Window window)=0
virtual int queryTree(Display *display, Window window, Window *rootReturn, Window *parentReturn, Window **childrenReturn, unsigned int *nChildrenReturn)=0
virtual int configureWindow(Display *display, Window window, unsigned valueMask, XWindowChanges *changes)=0
virtual int grabKey(Display *display, int keycode, unsigned int modifiers, Window grab_window, bool owner_events, int pointer_mode, int keyboard_mode)=0
Definition: mockX11Wrapper.hpp:4
MOCK_METHOD(int, ungrabKey,(Display *, int, unsigned int, Window),(override))
MOCK_METHOD(int, getWindowAttributes,(Display *, Window, XWindowAttributes *),(override))
MOCK_METHOD(int, grabKey,(Display *, int, unsigned int, Window, bool, int, int),(override))
MOCK_METHOD(KeySym, stringToKeysym,(const char *),(override))
MOCK_METHOD(int, raiseWindow,(Display *, Window),(override))
~mockX11Wrapper()=default
MOCK_METHOD(int, drawString,(Display *, Window, GC, int, int, const char *, int),(override))
MOCK_METHOD(int, nextEvent,(Display *, XEvent *),(override))
MOCK_METHOD(int, keysymToKeycode,(Display *, int),(override))
MOCK_METHOD(int, freeX,(void *),(override))
MOCK_METHOD(int, sync,(Display *, bool),(override))
MOCK_METHOD(int, flush,(Display *),(override))
MOCK_METHOD(int, getProperty,(Display *, Window, Atom, long, long, bool, Atom, Atom *, int *, unsigned long *, unsigned long *, unsigned char **),(override))
MOCK_METHOD(int, setInputFocus,(Display *, Window, int, Time),(override))
MOCK_METHOD(int, displayWidth,(Display *, int),(override))
MOCK_METHOD(XErrorHandler, setErrorHandler,(XErrorHandler),(override))
MOCK_METHOD(int, configureWindow,(Display *, Window, unsigned, XWindowChanges *),(override))
MOCK_METHOD(int, mapWindow,(Display *, Window),(override))
MOCK_METHOD(int, defaultScreen,(Display *),(override))
MOCK_METHOD(Window, createSimpleWindow,(Display *, Window, int, int, unsigned int, unsigned int, unsigned int, unsigned long, unsigned long),(override))
MOCK_METHOD(void, closeDisplay,(Display *),(override))
MOCK_METHOD(int, getErrorText,(Display *, int, char *, int),(override))
MOCK_METHOD(int, unmapWindow,(Display *, Window),(override))
MOCK_METHOD(int, getWindowProperty,(Display *, Window, Atom, long, long, bool, Atom, Atom *, int *, unsigned long *, unsigned long *, unsigned char **),(override))
MOCK_METHOD(int, destroyWindow,(Display *, Window),(override))
MOCK_METHOD(int, sendEvent,(Display *, Window, bool, long, XEvent *),(override))
MOCK_METHOD(int, grabServer,(Display *),(override))
MOCK_METHOD(int, displayHeight,(Display *, int),(override))
MOCK_METHOD(int, addToSaveSet,(Display *, Window),(override))
MOCK_METHOD(int, ungrabServer,(Display *),(override))
MOCK_METHOD(int, queryTree,(Display *, Window, Window *, Window *, Window **, unsigned int *),(override))
MOCK_METHOD(int, setInputFocus,(Display *, Window, int),(override))
MOCK_METHOD(Window, createWindow,(Display *, Window, int, int, unsigned int, unsigned int, unsigned int, int, unsigned int, Visual *, unsigned long, XSetWindowAttributes *),(override))
MOCK_METHOD(Display *, openDisplay,(const char *),(override))
MOCK_METHOD(int, changeProperty,(Display *, Window, Atom, Atom, int, int, const unsigned char *, int),(override))
MOCK_METHOD(int, resizeWindow,(Display *, Window, unsigned int, unsigned int),(override))
MOCK_METHOD(int, reparentWindow,(Display *, Window, Window, int, int),(override))
MOCK_METHOD(Display *, openDisplay,(),(override))
MOCK_METHOD(int, lowerWindow,(Display *, Window),(override))
MOCK_METHOD(Window, rootWindow,(Display *, int),(override))
MOCK_METHOD(int, selectInput,(Display *, Window, long),(override))
MOCK_METHOD(int, setWindowBorder,(Display *, Window, unsigned long),(override))
MOCK_METHOD(int, removeFromSaveSet,(Display *, Window),(override))
MOCK_METHOD(int, ungrabButton,(Display *, unsigned int, unsigned int, Window),(override))
MOCK_METHOD(int, moveWindow,(Display *, Window, int, int),(override))
MOCK_METHOD(int, grabButton,(Display *, unsigned int, unsigned int, Window, bool, unsigned int, int, int, Window, Cursor),(override))
mockX11Wrapper()=default
MOCK_METHOD(int, clearWindow,(Display *, Window),(override))
MOCK_METHOD(Atom, internAtom,(Display *, const char *, bool),(override))