Events后续 MotionNotify(5)

这是上一篇文章Events(3)的补充说明Event MaskEvent TypeStructureGeneric StructurePointerMotionMaskMotionNotifyXPointerMovedEventXMotionEventButtonMotionMaskMotionNotifyXPointerMovedEventXMotionEventXMotionEvent代码结构typedef struct { int type; /* of event */ unsigned long serial; /* # of last re...

Xlib 2021-10-22 PM 833℃ 0条

Events后续 ButtonPress 和 ButtonRelease(4)

这是上一篇文章Events(3)的补充说明Event MaskEvent TypeStructureGeneric StructureButtonPressMaskButtonPressXButtonPressedEventXButtonEventButtonReleaseMaskButtonReleaseXButtonReleasedEventXButtonEventXButtonEvent 代码结构typedef struct { int type; /* of event */ unsigned long serial; /* # of last...

Xlib 2021-10-14 PM 803℃ 0条

Events(3)

Event TypesEvent CategoryEvent Type Keyboard events 键盘事件KeyPress KeyReleasePointer events 鼠标事件ButtonPress ButtonRelease MotionNotify(运动事件)Window crossing events 窗体进入离开事件EnterNotify LeaveNotifyInput focus eventsFocusIn FocusOutKeymap state notification eventKeymapNotifyExposure eventsExpose Grap...

Xlib 2021-10-14 PM 869℃ 0条

图片显示 XImage与Pixmap(2).md

XImage与Pixmap的差别XImage与Pixmap都是Xlib的数据结构,并且都和图片有关,我们首先分析一下他们之间的区别。XImage的数据结构在xlib.h中定义/* * Data structure for "image" data, used by image manipulation routines. */ typedef struct _XImage { int width, height; /* size of image */ int xoffset; /* number of pixels off...

Xlib 2021-10-14 AM 1437℃ 0条

使用stb_image操作图片

项目介绍stb项目是一个ALLINONE的c解决方案,其中有一个stb_image.h,可以用来操作图片。 推荐给大家的博客简单易用的图像解码库介绍 —— stb_image用stb_image.h轻松地加载图片到程序中(比如纹理)Example#define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb_image_write.h" #define COLOR_L 3 int main(...

Xlib 2021-10-13 PM 763℃ 0条