diff --git a/.circleci/config.yml b/.circleci/config.yml index 225c3de..9fbc350 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,50 @@ version: 2.1 jobs: + build-libglez: + docker: + - image: ubuntu:22.04 # LTS only + environment: + DEBIAN_FRONTEND: noninteractive + steps: + - git clone -b v1.0.0 https://github.com/oneechanhax/libglez libglez + - run: + name: "Install development packages" + command: "apt update && apt install -y build-essential cmake libz-dev libpng-dev libglew-dev libgl-dev libx11-dev libxext-dev libxfixes-dev libfreetype-dev libsdl2-dev" + - run: + name: "Make build directory" + command: "mkdir libglez/build" + - run: + name: "CMake build files" + command: "cd libglez/build && cmake -DCMAKE_BUILD_TYPE=Release ../" + - run: + name: "Build libglez" + command: "cd libglez/build && make" + - run: + name: "Install libglez" + command: "cd libglez/build && make install" + build-libxoverlay: + docker: + - image: ubuntu:22.04 # LTS only + environment: + DEBIAN_FRONTEND: noninteractive + steps: + - git clone -b v1.0.0 https://github.com/oneechanhax/libxoverlay libxoverlay + - run: + name: "Install development packages" + command: "apt update && apt install -y build-essential cmake libglew-dev libx11-dev libxext-dev libxfixes-dev" + - run: + name: "Make build directory" + command: "mkdir libxoverlay/build" + - run: + name: "CMake build files" + command: "cd libxoverlay/build && cmake -DCMAKE_BUILD_TYPE=Release ../" + - run: + name: "Build libxoverlay" + command: "cd libxoverlay/build && make" + - run: + name: "Install libxoverlay" + command: "cd libxoverlay/build && make install" build-libpdraw: docker: - image: ubuntu:22.04 # LTS only @@ -24,4 +68,6 @@ jobs: workflows: build-libpdraw-workflow: jobs: + - build-libglez + - build-libxoverlay - build-libpdraw diff --git a/example-src/libxoverlay.so b/example-src/libxoverlay.so new file mode 100755 index 0000000..1d7bcd9 Binary files /dev/null and b/example-src/libxoverlay.so differ diff --git a/example-src/xoverlay.h b/example-src/xoverlay.h new file mode 100644 index 0000000..365cf22 --- /dev/null +++ b/example-src/xoverlay.h @@ -0,0 +1,58 @@ +/* + * overlay.hpp + * + * Created on: Nov 8, 2017 + * Author: nullifiedcat + */ + +#pragma once + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include + +struct xoverlay_library +{ + Display *display; + Window window; + Colormap colormap; + GC gc; + XGCValues gcvalues; + XFontStruct font; + int screen; + + int width; + int height; + + struct + { + int x; + int y; + } mouse; + + char init; + char drawing; + char mapped; +}; + +extern struct xoverlay_library xoverlay_library; + +int xoverlay_init(); + +void xoverlay_destroy(); + +void xoverlay_show(); + +void xoverlay_hide(); + +void xoverlay_draw_begin(); + +void xoverlay_draw_end(); + +#ifdef __cplusplus +} +#endif