Compare commits

...

18 Commits

3 changed files with 138 additions and 0 deletions

80
.circleci/config.yml Normal file
View File

@ -0,0 +1,80 @@
version: 2.1
jobs:
build-libpdraw:
docker:
- image: ubuntu:22.04 # LTS only
environment:
DEBIAN_FRONTEND: noninteractive
steps:
- run:
name: "Update apt and Install git"
command: "apt update && apt install -y git"
- run:
name: "Clone libxoverlay"
command: "git clone -b v1.0.0 https://github.com/oneechanhax/libxoverlay libxoverlay"
- run:
name: "Install xlib development packages"
command: "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"
- run:
name: "Remove libxoverlay source"
command: "rm -rf libxoverlay/"
- run:
name: "Clone libglez"
command: "git clone -b v1.0.1 https://github.com/oneechanhax/libglez libglez"
- run:
name: "Install libglez dependancies"
command: "apt install -y libz-dev libpng-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"
- run:
name: "Remove libglez source"
command: "rm -rf libglez/"
- checkout
- run:
name: "Install libpdraw dependencies"
command: "apt install -y imagemagick "
- run:
name: "Make build directory"
command: "mkdir build"
- run:
name: "CMake build files"
command: "cd build && cmake -DCMAKE_BUILD_TYPE=Release ../"
- run:
name: "Build Project"
command: "cd build && make"
workflows:
build-libpdraw-workflow:
jobs:
- build-libpdraw

BIN
example-src/libxoverlay.so Executable file

Binary file not shown.

58
example-src/xoverlay.h Normal file
View File

@ -0,0 +1,58 @@
/*
* overlay.hpp
*
* Created on: Nov 8, 2017
* Author: nullifiedcat
*/
#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
#include <X11/Xlib.h>
#include <X11/XKBlib.h>
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