mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-04 00:20:51 +00:00
a
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@5 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -10,6 +10,10 @@ typedef struct __Milsko {
|
||||
Window window;
|
||||
GC gc;
|
||||
Colormap colormap;
|
||||
int x;
|
||||
int y;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
}* HMILSKO;
|
||||
|
||||
typedef struct __MilskoColor {
|
||||
|
||||
13
src/x11.c
13
src/x11.c
@@ -10,6 +10,11 @@ HMILSKO MilskoLLCreate(HMILSKO parent, int x, int y, int width, int height){
|
||||
Window p;
|
||||
|
||||
r = malloc(sizeof(*r));
|
||||
r->x = x;
|
||||
r->y = y;
|
||||
r->width = width;
|
||||
r->height = height;
|
||||
|
||||
if(parent == NULL){
|
||||
r->display = XOpenDisplay(NULL);
|
||||
p = XRootWindow(r->display, XDefaultScreen(r->display));
|
||||
@@ -61,10 +66,10 @@ HMILSKOCOLOR MilskoLLAllocColor(HMILSKO handle, int r, int g, int b){
|
||||
}
|
||||
|
||||
void MilskoLLGetXYWH(HMILSKO handle, int* x, int* y, unsigned int* w, unsigned int* h){
|
||||
Window root;
|
||||
unsigned int depth, border;
|
||||
|
||||
XGetGeometry(handle->display, handle->window, &root, x, y, w, h, &border, &depth);
|
||||
*x = handle->x;
|
||||
*y = handle->y;
|
||||
*w = handle->width;
|
||||
*h = handle->height;
|
||||
}
|
||||
|
||||
void MilskoLLFreeColor(HMILSKOCOLOR color){
|
||||
|
||||
Reference in New Issue
Block a user