/* * secde -- experimental lightweight Wayland/X11 server * Copyright (C) 2019 Samuel Lidén Borell * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef FBOPS_H #define FBOPS_H struct FbPixelFormat { short bytes_per_pixel; /* TODO planar formats etc. */ }; struct FbSurf { short w, h, line_length; unsigned char *pixels; }; struct FbDestSurf { struct FbSurf *surf; const struct FbPixelFormat *format; }; struct FbRect { short x, y, w, h; }; typedef unsigned FbColor; int fbops_cliprect(struct FbRect *rect, const struct FbRect *clip); int fbops_cliprect1(struct FbRect *destrect, struct FbRect *srcrect, const struct FbRect *destclip); void fbops_fillrect(struct FbDestSurf *destsurf, const struct FbRect *rect, const FbColor color); void fbops_copysurf(struct FbDestSurf *destsurf, short x, short y, const struct FbSurf *srcsurf); void fbops_copysurf1(struct FbDestSurf *destsurf, short x, short y, const struct FbSurf *srcsurf, const struct FbRect *srcrect); void fbops_moverect(struct FbDestSurf *destsurf, short destx, short desty, const struct FbRect *srcrect); #endif