2025-09-28 02:51:15 +00:00
|
|
|
/* $Id$ */
|
2025-11-18 16:19:05 +00:00
|
|
|
/*!
|
|
|
|
|
* @file Mw/LowLevel/X11.h
|
|
|
|
|
* @brief X11 Backend
|
|
|
|
|
* @warning This is used internally
|
|
|
|
|
*/
|
|
|
|
|
#ifndef __MW_LOWLEVEL_X11_H__
|
|
|
|
|
#define __MW_LOWLEVEL_X11_H__
|
2025-09-28 02:51:15 +00:00
|
|
|
|
2025-09-29 00:04:04 +00:00
|
|
|
#include <Mw/MachDep.h>
|
|
|
|
|
#include <Mw/TypeDefs.h>
|
|
|
|
|
#include <Mw/LowLevel.h>
|
2025-09-28 07:03:05 +00:00
|
|
|
|
2025-10-04 04:10:45 +00:00
|
|
|
#include <X11/Xlib.h>
|
2025-09-28 02:51:15 +00:00
|
|
|
#include <X11/Xutil.h>
|
2025-10-11 06:21:43 +00:00
|
|
|
#include <X11/Xatom.h>
|
2025-11-08 22:47:11 +00:00
|
|
|
#ifdef USE_XRENDER
|
2025-09-30 00:52:43 +00:00
|
|
|
#include <X11/extensions/Xrender.h>
|
2025-11-08 22:47:11 +00:00
|
|
|
#endif
|
2025-09-28 02:51:15 +00:00
|
|
|
|
2025-11-13 02:27:31 +00:00
|
|
|
struct _MwLLX11 {
|
|
|
|
|
struct _MwLLCommon common;
|
|
|
|
|
|
|
|
|
|
unsigned int width;
|
|
|
|
|
unsigned int height;
|
|
|
|
|
|
2025-10-21 16:14:09 +00:00
|
|
|
Display* display;
|
|
|
|
|
Window window;
|
|
|
|
|
Pixmap pixmap;
|
|
|
|
|
GC gc;
|
|
|
|
|
Colormap colormap;
|
|
|
|
|
Atom wm_delete;
|
|
|
|
|
XIM xim;
|
|
|
|
|
XIC xic;
|
2025-09-28 09:50:28 +00:00
|
|
|
|
2025-11-09 08:36:57 +00:00
|
|
|
int top;
|
2025-10-17 19:11:32 +00:00
|
|
|
int grabbed;
|
2025-11-20 12:45:07 +00:00
|
|
|
int force_render;
|
2025-10-21 16:14:09 +00:00
|
|
|
|
|
|
|
|
unsigned long red_mask;
|
|
|
|
|
unsigned long red_max;
|
|
|
|
|
unsigned long red_shift;
|
|
|
|
|
|
|
|
|
|
unsigned long green_mask;
|
|
|
|
|
unsigned long green_max;
|
|
|
|
|
unsigned long green_shift;
|
|
|
|
|
|
|
|
|
|
unsigned long blue_mask;
|
|
|
|
|
unsigned long blue_max;
|
|
|
|
|
unsigned long blue_shift;
|
2025-09-28 21:55:50 +00:00
|
|
|
};
|
2025-09-28 02:51:15 +00:00
|
|
|
|
2025-11-13 02:27:31 +00:00
|
|
|
struct _MwLLX11Color {
|
|
|
|
|
struct _MwLLCommonColor common;
|
|
|
|
|
|
2025-09-28 02:51:15 +00:00
|
|
|
unsigned long pixel;
|
2025-09-28 21:55:50 +00:00
|
|
|
};
|
2025-09-28 02:51:15 +00:00
|
|
|
|
2025-11-13 02:27:31 +00:00
|
|
|
struct _MwLLX11Pixmap {
|
|
|
|
|
struct _MwLLCommonPixmap common;
|
2025-09-30 00:52:43 +00:00
|
|
|
|
2025-11-02 21:03:50 +00:00
|
|
|
int depth;
|
2025-11-02 20:43:55 +00:00
|
|
|
unsigned char* data;
|
2025-11-02 21:03:50 +00:00
|
|
|
MwLL handle;
|
2025-11-08 22:47:11 +00:00
|
|
|
int use_xrender;
|
2025-11-02 21:03:50 +00:00
|
|
|
Display* display;
|
|
|
|
|
XImage* image;
|
|
|
|
|
XImage* mask;
|
2025-09-30 00:52:43 +00:00
|
|
|
};
|
|
|
|
|
|
2025-11-29 22:04:23 +00:00
|
|
|
MWDECL int MwLLX11CallInit(void);
|
|
|
|
|
|
2025-09-28 02:51:15 +00:00
|
|
|
#endif
|