MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / X11MessageBox_Init

Function X11MessageBox_Init

src/Window_X11.c:914–932  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

912}
913
914static void X11MessageBox_Init(struct X11MessageBox* m) {
915 m->black = BlackPixel(m->dpy, DefaultScreen(m->dpy));
916 m->white = WhitePixel(m->dpy, DefaultScreen(m->dpy));
917 m->background = X11_Col(m, 206, 206, 206);
918
919 m->btnBorder = X11_Col(m, 60, 60, 60);
920 m->highlight = X11_Col(m, 144, 144, 144);
921 m->shadow = X11_Col(m, 49, 49, 49);
922
923 m->win = XCreateSimpleWindow(m->dpy, DefaultRootWindow(m->dpy), 0, 0, 100, 100,
924 0, m->black, m->background);
925 XSelectInput(m->dpy, m->win, ExposureMask | StructureNotifyMask |
926 KeyReleaseMask | PointerMotionMask |
927 ButtonPressMask | ButtonReleaseMask );
928
929 m->gc = XCreateGC(m->dpy, m->win, 0, NULL);
930 XSetForeground(m->dpy, m->gc, m->black);
931 XSetBackground(m->dpy, m->gc, m->background);
932}
933
934static void X11MessageBox_Free(struct X11MessageBox* m) {
935 XFreeGC(m->dpy, m->gc);

Callers 1

X11_MessageBoxFunction · 0.85

Calls 1

X11_ColFunction · 0.85

Tested by

no test coverage detected