diff options
317 files changed, 9061 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9a77d83 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +*\#* +*~ +*.o +*.a +*.su +*.so +*.so.* +*.lo +/libaxl-*-structs.h diff --git a/LIBAXL_ATOM_ARC.3 b/LIBAXL_ATOM_ARC.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_ARC.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_ATOM.3 b/LIBAXL_ATOM_ATOM.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_ATOM.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_BITMAP.3 b/LIBAXL_ATOM_BITMAP.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_BITMAP.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_CAP_HEIGHT.3 b/LIBAXL_ATOM_CAP_HEIGHT.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_CAP_HEIGHT.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_CARDINAL.3 b/LIBAXL_ATOM_CARDINAL.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_CARDINAL.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_COLORMAP.3 b/LIBAXL_ATOM_COLORMAP.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_COLORMAP.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_COPYRIGHT.3 b/LIBAXL_ATOM_COPYRIGHT.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_COPYRIGHT.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_CURSOR.3 b/LIBAXL_ATOM_CURSOR.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_CURSOR.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_CUT_BUFFER0.3 b/LIBAXL_ATOM_CUT_BUFFER0.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_CUT_BUFFER0.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_CUT_BUFFER1.3 b/LIBAXL_ATOM_CUT_BUFFER1.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_CUT_BUFFER1.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_CUT_BUFFER2.3 b/LIBAXL_ATOM_CUT_BUFFER2.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_CUT_BUFFER2.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_CUT_BUFFER3.3 b/LIBAXL_ATOM_CUT_BUFFER3.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_CUT_BUFFER3.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_CUT_BUFFER4.3 b/LIBAXL_ATOM_CUT_BUFFER4.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_CUT_BUFFER4.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_CUT_BUFFER5.3 b/LIBAXL_ATOM_CUT_BUFFER5.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_CUT_BUFFER5.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_CUT_BUFFER6.3 b/LIBAXL_ATOM_CUT_BUFFER6.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_CUT_BUFFER6.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_CUT_BUFFER7.3 b/LIBAXL_ATOM_CUT_BUFFER7.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_CUT_BUFFER7.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_DRAWABLE.3 b/LIBAXL_ATOM_DRAWABLE.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_DRAWABLE.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_END_SPACE.3 b/LIBAXL_ATOM_END_SPACE.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_END_SPACE.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_FAMILY_NAME.3 b/LIBAXL_ATOM_FAMILY_NAME.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_FAMILY_NAME.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_FONT.3 b/LIBAXL_ATOM_FONT.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_FONT.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_FONT_NAME.3 b/LIBAXL_ATOM_FONT_NAME.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_FONT_NAME.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_FULL_NAME.3 b/LIBAXL_ATOM_FULL_NAME.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_FULL_NAME.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_INTEGER.3 b/LIBAXL_ATOM_INTEGER.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_INTEGER.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_ITALIC_ANGLE.3 b/LIBAXL_ATOM_ITALIC_ANGLE.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_ITALIC_ANGLE.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_MAX_SPACE.3 b/LIBAXL_ATOM_MAX_SPACE.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_MAX_SPACE.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_MIN_SPACE.3 b/LIBAXL_ATOM_MIN_SPACE.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_MIN_SPACE.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_NORM_SPACE.3 b/LIBAXL_ATOM_NORM_SPACE.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_NORM_SPACE.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_NOTICE.3 b/LIBAXL_ATOM_NOTICE.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_NOTICE.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_PIXMAP.3 b/LIBAXL_ATOM_PIXMAP.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_PIXMAP.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_POINT.3 b/LIBAXL_ATOM_POINT.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_POINT.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_POINT_SIZE.3 b/LIBAXL_ATOM_POINT_SIZE.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_POINT_SIZE.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_PRIMARY.3 b/LIBAXL_ATOM_PRIMARY.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_PRIMARY.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_QUAD_WIDTH.3 b/LIBAXL_ATOM_QUAD_WIDTH.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_QUAD_WIDTH.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_RECTANGLE.3 b/LIBAXL_ATOM_RECTANGLE.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_RECTANGLE.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_RESOLUTION.3 b/LIBAXL_ATOM_RESOLUTION.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_RESOLUTION.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_RESOURCE_MANAGER.3 b/LIBAXL_ATOM_RESOURCE_MANAGER.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_RESOURCE_MANAGER.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_RGB_BEST_MAP.3 b/LIBAXL_ATOM_RGB_BEST_MAP.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_RGB_BEST_MAP.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_RGB_BLUE_MAP.3 b/LIBAXL_ATOM_RGB_BLUE_MAP.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_RGB_BLUE_MAP.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_RGB_COLOR_MAP.3 b/LIBAXL_ATOM_RGB_COLOR_MAP.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_RGB_COLOR_MAP.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_RGB_DEFAULT_MAP.3 b/LIBAXL_ATOM_RGB_DEFAULT_MAP.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_RGB_DEFAULT_MAP.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_RGB_GRAY_MAP.3 b/LIBAXL_ATOM_RGB_GRAY_MAP.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_RGB_GRAY_MAP.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_RGB_GREEN_MAP.3 b/LIBAXL_ATOM_RGB_GREEN_MAP.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_RGB_GREEN_MAP.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_RGB_RED_MAP.3 b/LIBAXL_ATOM_RGB_RED_MAP.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_RGB_RED_MAP.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_SECONDARY.3 b/LIBAXL_ATOM_SECONDARY.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_SECONDARY.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_STRIKEOUT_ASCENT.3 b/LIBAXL_ATOM_STRIKEOUT_ASCENT.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_STRIKEOUT_ASCENT.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_STRIKEOUT_DESCENT.3 b/LIBAXL_ATOM_STRIKEOUT_DESCENT.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_STRIKEOUT_DESCENT.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_STRING.3 b/LIBAXL_ATOM_STRING.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_STRING.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_SUBSCRIPT_X.3 b/LIBAXL_ATOM_SUBSCRIPT_X.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_SUBSCRIPT_X.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_SUBSCRIPT_Y.3 b/LIBAXL_ATOM_SUBSCRIPT_Y.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_SUBSCRIPT_Y.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_SUPERSCRIPT_X.3 b/LIBAXL_ATOM_SUPERSCRIPT_X.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_SUPERSCRIPT_X.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_SUPERSCRIPT_Y.3 b/LIBAXL_ATOM_SUPERSCRIPT_Y.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_SUPERSCRIPT_Y.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_UNDERLINE_POSITION.3 b/LIBAXL_ATOM_UNDERLINE_POSITION.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_UNDERLINE_POSITION.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_UNDERLINE_THICKNESS.3 b/LIBAXL_ATOM_UNDERLINE_THICKNESS.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_UNDERLINE_THICKNESS.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_VISUALID.3 b/LIBAXL_ATOM_VISUALID.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_VISUALID.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WEIGHT.3 b/LIBAXL_ATOM_WEIGHT.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WEIGHT.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WINDOW.3 b/LIBAXL_ATOM_WINDOW.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WINDOW.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WM_CLASS.3 b/LIBAXL_ATOM_WM_CLASS.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WM_CLASS.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WM_CLIENT_MACHINE.3 b/LIBAXL_ATOM_WM_CLIENT_MACHINE.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WM_CLIENT_MACHINE.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WM_COMMAND.3 b/LIBAXL_ATOM_WM_COMMAND.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WM_COMMAND.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WM_HINTS.3 b/LIBAXL_ATOM_WM_HINTS.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WM_HINTS.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WM_ICON_NAME.3 b/LIBAXL_ATOM_WM_ICON_NAME.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WM_ICON_NAME.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WM_ICON_SIZE.3 b/LIBAXL_ATOM_WM_ICON_SIZE.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WM_ICON_SIZE.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WM_NAME.3 b/LIBAXL_ATOM_WM_NAME.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WM_NAME.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WM_NORMAL_HINTS.3 b/LIBAXL_ATOM_WM_NORMAL_HINTS.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WM_NORMAL_HINTS.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WM_SIZE_HINTS.3 b/LIBAXL_ATOM_WM_SIZE_HINTS.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WM_SIZE_HINTS.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WM_TRANSIENT_FOR.3 b/LIBAXL_ATOM_WM_TRANSIENT_FOR.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WM_TRANSIENT_FOR.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_WM_ZOOM_HINTS.3 b/LIBAXL_ATOM_WM_ZOOM_HINTS.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_WM_ZOOM_HINTS.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ATOM_X_HEIGHT.3 b/LIBAXL_ATOM_X_HEIGHT.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/LIBAXL_ATOM_X_HEIGHT.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/LIBAXL_ERROR.3 b/LIBAXL_ERROR.3 new file mode 100644 index 0000000..07233ca --- /dev/null +++ b/LIBAXL_ERROR.3 @@ -0,0 +1,143 @@ +.TH LIBAXL_ERROR 3 libaxl +.SH NAME +LIBAXL_ERROR - Error message +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR 0 +union libaxl_error { + struct { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI__detail\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + }; + struct libaxl_error_request \fIrequest\fP; + struct libaxl_error_value \fIvalue\fP; + struct libaxl_error_window \fIwindow\fP; + struct libaxl_error_pixmap \fIpixmap\fP; + struct libaxl_error_atom \fIatom\fP; + struct libaxl_error_cursor \fIcursor\fP; + struct libaxl_error_font \fIfont\fP; + struct libaxl_error_match \fImatch\fP; + struct libaxl_error_drawable \fIdrawable\fP; + struct libaxl_error_access \fIaccess\fP; + struct libaxl_error_alloc \fIalloc\fP; + struct libaxl_error_colormap \fIcolormap\fP; + struct libaxl_error_gcontext \fIgcontext\fP; + struct libaxl_error_id_choice \fIid_choice\fP; + struct libaxl_error_name \fIname\fP; + struct libaxl_error_length \fIlength\fP; + struct libaxl_error_implementation \fIimplementation\fP; +}; +.fi +.SH DESCRIPTION +.B union libaxl_error +contains the +.BR struct s +for all error types and an anonymous +.B struct +with the common fields. A received message can +be identified as an error message checking that +the value of the first byte in the message is +.BR LIBAXL_ERROR . +.PP +Unless stated otherwise in the documentation for a +request, if an error message is received for the +request, it terminated without side-effects, that +is, without partial execution. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field should be one of the following, to +signify which error type the error has: +.TP +.B LIBAXL_ERROR_REQUEST +Invalid request operation code. +.TP +.B LIBAXL_ERROR_VALUE +Invalid value in request. +.TP +.B LIBAXL_ERROR_WINDOW +Invalid window ID in request. +.TP +.B LIBAXL_ERROR_PIXMAP +Invalid pixmap ID in request. +.TP +.B LIBAXL_ERROR_ATOM +Invalid atom ID in request. +.TP +.B LIBAXL_ERROR_CURSOR +Invalid cursor ID in request. +.TP +.B LIBAXL_ERROR_FONT +Invalid font ID or fontable ID in request. +.TP +.B LIBAXL_ERROR_MATCH +Argument do not match. +.TP +.B LIBAXL_ERROR_DRAWABLE +Invalid drawable ID in request. +.TP +.B LIBAXL_ERROR_ACCESS +Access failure. +.TP +.B LIBAXL_ERROR_ALLOC +Resource allocation failure. +.TP +.B LIBAXL_ERROR_COLORMAP +Invalid colormap ID in request. +.TP +.B LIBAXL_ERROR_GCONTEXT +Invalid graphics context ID in request. +.TP +.B LIBAXL_ERROR_ID_CHOICE +Invalid resource ID choice. +.TP +.B LIBAXL_ERROR_NAME +Invalid font name or color name in request. +.TP +.B LIBAXL_ERROR_LENGTH +Invalid request length. +.TP +.B LIBAXL_ERROR_IMPLEMENTATION +Feature not implemented. +.PP +The error +.B struct +for the specific error type is accessed via +the member, of the +.BR union , +with the same name except in lower case and +without the +.B libaxl_error_ +prefix. See the section 3 man pages with the +same names as the error type codes (the +constants listed above) for more information. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +The value of the +.I __detail +field is error-specific. +.SH SEE ALSO +.BR libaxl_receive (3) diff --git a/LIBAXL_ERROR_ACCESS.3 b/LIBAXL_ERROR_ACCESS.3 new file mode 100644 index 0000000..1117edc --- /dev/null +++ b/LIBAXL_ERROR_ACCESS.3 @@ -0,0 +1,77 @@ +.TH LIBAXL_ERROR_ACCESS 3 libaxl +.SH NAME +LIBAXL_ERROR_ACCESS - Access failure +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_ACCESS 10 +struct libaxl_error_access { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI__unused1\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The +.B LIBAXL_ERROR_ACCESS +error signifies that one of the following happened: +.TP +* +Grab of a key/button combination failed beause it +is already grabbed by another client. +.TP +* +Selection of an event type failed because only one +client at a tiem can select it and it is already +selected by another client. +.TP +* +Writing to a colormap entry failed because it is +read-only or unallocated. +.TP +* +Deallocating a colormap entry failed because it +was not allocated by the client. +.TP +* +Deallocating a colormap entry failed because the +colormap was creaed with all entires writable. +.TP +* +Modifying the access control list failed because +the client is not running in the local host or +otherwise authorized client. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_ACCESS +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_ALLOC.3 b/LIBAXL_ERROR_ALLOC.3 new file mode 100644 index 0000000..0e0bccd --- /dev/null +++ b/LIBAXL_ERROR_ALLOC.3 @@ -0,0 +1,54 @@ +.TH LIBAXL_ERROR_ALLOC 3 libaxl +.SH NAME +LIBAXL_ERROR_ALLOC - Resource allocation failure +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_ALLOC 11 +struct libaxl_error_alloc { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI__unused1\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The display server failed to allocate enough +memory to fulfil the request. +.PP +This error can be generated for all requests. +It is however unspecified how the server shall +behave when it runs out of memory. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_ALLOC +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_ATOM.3 b/LIBAXL_ERROR_ATOM.3 new file mode 100644 index 0000000..f564688 --- /dev/null +++ b/LIBAXL_ERROR_ATOM.3 @@ -0,0 +1,54 @@ +.TH LIBAXL_ERROR_ATOM 3 libaxl +.SH NAME +LIBAXL_ERROR_ATOM - Invalid atom ID in request +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_ATOM 5 +struct libaxl_error_atom { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fIbad_resource_id\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The request contains an invalid atom ID. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_ATOM +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I bad_resource_id +field is the invalid atom ID used in the +failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_COLORMAP.3 b/LIBAXL_ERROR_COLORMAP.3 new file mode 100644 index 0000000..28abfee --- /dev/null +++ b/LIBAXL_ERROR_COLORMAP.3 @@ -0,0 +1,54 @@ +.TH LIBAXL_ERROR_COLORMAP 3 libaxl +.SH NAME +LIBAXL_ERROR_COLORMAP - Invalid colormap ID in request +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_COLORMAP 12 +struct libaxl_error_colormap { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fIbad_resource_id\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The request contains an invalid colormap ID. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_COLORMAP +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I bad_resource_id +field is the invalid colormap ID used in the +failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_CURSOR.3 b/LIBAXL_ERROR_CURSOR.3 new file mode 100644 index 0000000..ab94631 --- /dev/null +++ b/LIBAXL_ERROR_CURSOR.3 @@ -0,0 +1,54 @@ +.TH LIBAXL_ERROR_CURSOR 3 libaxl +.SH NAME +LIBAXL_ERROR_CURSOR - Invalid cursor ID in request +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_CURSOR 6 +struct libaxl_error_cursor { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fIbad_resource_id\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The request contains an invalid cursor ID. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_CURSOR +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I bad_resource_id +field is the invalid cursor ID used in the +failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_DRAWABLE.3 b/LIBAXL_ERROR_DRAWABLE.3 new file mode 100644 index 0000000..8648a80 --- /dev/null +++ b/LIBAXL_ERROR_DRAWABLE.3 @@ -0,0 +1,55 @@ +.TH LIBAXL_ERROR_DRAWABLE 3 libaxl +.SH NAME +LIBAXL_ERROR_DRAWABLE - Invalid drawable ID in request +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_DRAWABLE 9 +struct libaxl_error_drawable { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fIbad_resource_id\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The request contains an invalid drawable +(window or pixmap) ID. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_DRAWABLE +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I bad_resource_id +field is the invalid drawable ID used +in the failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_FONT.3 b/LIBAXL_ERROR_FONT.3 new file mode 100644 index 0000000..991af6f --- /dev/null +++ b/LIBAXL_ERROR_FONT.3 @@ -0,0 +1,55 @@ +.TH LIBAXL_ERROR_FONT 3 libaxl +.SH NAME +LIBAXL_ERROR_FONT - Invalid font ID or fontable ID in request +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_FONT 7 +struct libaxl_error_font { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fIbad_resource_id\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The request contains an invalid font ID or +fontable (font or graphics context) ID. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_FONT +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I bad_resource_id +field is the invalid font ID or fontable ID +used in the failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_GCONTEXT.3 b/LIBAXL_ERROR_GCONTEXT.3 new file mode 100644 index 0000000..e2f26d8 --- /dev/null +++ b/LIBAXL_ERROR_GCONTEXT.3 @@ -0,0 +1,54 @@ +.TH LIBAXL_ERROR_GCONTEXT 3 libaxl +.SH NAME +LIBAXL_ERROR_GCONTEXT - Invalid graphics context ID in request +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_GCONTEXT 13 +struct libaxl_error_gcontext { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fIbad_resource_id\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The request contains an invalid graphics context ID. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_GCONTEXT +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I bad_resource_id +field is the invalid graphics context ID used +in the failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_ID_CHOICE.3 b/LIBAXL_ERROR_ID_CHOICE.3 new file mode 100644 index 0000000..7d3a73d --- /dev/null +++ b/LIBAXL_ERROR_ID_CHOICE.3 @@ -0,0 +1,54 @@ +.TH LIBAXL_ERROR_ID_CHOICE 3 libaxl +.SH NAME +LIBAXL_ERROR_ID_CHOICE - Invalid resource ID choice +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_ID_CHOICE 14 +struct libaxl_error_id_choice { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fIbad_resource_id\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The value for a resource ID was outside the range +allocated to the client or is already in use. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_ID_CHOICE +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I bad_resource_id +field shall be the chosen resource ID. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_IMPLEMENTATION.3 b/LIBAXL_ERROR_IMPLEMENTATION.3 new file mode 100644 index 0000000..6fd73d8 --- /dev/null +++ b/LIBAXL_ERROR_IMPLEMENTATION.3 @@ -0,0 +1,54 @@ +.TH LIBAXL_ERROR_IMPLEMENTATION 3 libaxl +.SH NAME +LIBAXL_ERROR_IMPLEMENTATION - Feature not implemented +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_IMPLEMENTATION 17 +struct libaxl_error_implementation { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI__unused1\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The display server does not implement some +aspect of the request. +.PP +A proper implementation should not generate +this error for any request defined in the +core protocol. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_IMPLEMENTATION +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_LENGTH.3 b/LIBAXL_ERROR_LENGTH.3 new file mode 100644 index 0000000..a1484e8 --- /dev/null +++ b/LIBAXL_ERROR_LENGTH.3 @@ -0,0 +1,50 @@ +.TH LIBAXL_ERROR_LENGTH 3 libaxl +.SH NAME +LIBAXL_ERROR_LENGTH - Invalid request length +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_LENGTH 16 +struct libaxl_error_length { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI__unused1\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The length of a request did not match the +expectations. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_LENGTH +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_MATCH.3 b/LIBAXL_ERROR_MATCH.3 new file mode 100644 index 0000000..510e118 --- /dev/null +++ b/LIBAXL_ERROR_MATCH.3 @@ -0,0 +1,54 @@ +.TH LIBAXL_ERROR_MATCH 3 libaxl +.SH NAME +LIBAXL_ERROR_MATCH - Argument do not match +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_MATCH 15 +struct libaxl_error_match { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI__unused1\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +An input-only window is used a drawable object, +the graphics context argument does not have the +same root and depths the destination drawable +argument, or some argument or argument pair has +same correct type and range, but fails to match +in some other way required by for the request. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_MATCH +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_NAME.3 b/LIBAXL_ERROR_NAME.3 new file mode 100644 index 0000000..8d67f40 --- /dev/null +++ b/LIBAXL_ERROR_NAME.3 @@ -0,0 +1,50 @@ +.TH LIBAXL_ERROR_NAME 3 libaxl +.SH NAME +LIBAXL_ERROR_NAME - Invalid font name or color name in request +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_NAME 15 +struct libaxl_error_name { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI__unused1\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The request contains an invalid name of a +font or color. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_NAME +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_PIXMAP.3 b/LIBAXL_ERROR_PIXMAP.3 new file mode 100644 index 0000000..86af2f8 --- /dev/null +++ b/LIBAXL_ERROR_PIXMAP.3 @@ -0,0 +1,54 @@ +.TH LIBAXL_ERROR_PIXMAP 3 libaxl +.SH NAME +LIBAXL_ERROR_PIXMAP - Invalid pixmap ID in request +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_PIXMAP 4 +struct libaxl_error_pixmap { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fIbad_resource_id\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The request contains an invalid pixmap ID. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_PIXMAP +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I bad_resource_id +field is the invalid pixmap ID used in the +failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_REQUEST.3 b/LIBAXL_ERROR_REQUEST.3 new file mode 100644 index 0000000..2cecb83 --- /dev/null +++ b/LIBAXL_ERROR_REQUEST.3 @@ -0,0 +1,50 @@ +.TH LIBAXL_ERROR_REQUEST 3 libaxl +.SH NAME +LIBAXL_ERROR_REQUEST - Invalid request operation code +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_REQUEST 1 +struct libaxl_error_request { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI__unused1\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The major or minor operation code in the request +does not specify a valid request. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_REQUEST +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_VALUE.3 b/LIBAXL_ERROR_VALUE.3 new file mode 100644 index 0000000..7af19cb --- /dev/null +++ b/LIBAXL_ERROR_VALUE.3 @@ -0,0 +1,55 @@ +.TH LIBAXL_ERROR_VALUE 3 libaxl +.SH NAME +LIBAXL_ERROR_VALUE - Invalid value in request +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_VALUE 2 +struct libaxl_error_value { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fIbad_value\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The request contains a value that falls outside +the range of accepted values. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_VALUE +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I bad_value +field is the invalid value used in the failed +request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_ERROR_WINDOW.3 b/LIBAXL_ERROR_WINDOW.3 new file mode 100644 index 0000000..9405560 --- /dev/null +++ b/LIBAXL_ERROR_WINDOW.3 @@ -0,0 +1,54 @@ +.TH LIBAXL_ERROR_WINDOW 3 libaxl +.SH NAME +LIBAXL_ERROR_WINDOW - Invalid window ID in request +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_ERROR_WINDOW 3 +struct libaxl_error_window { + uint8_t \fI__zero\fP; + uint8_t \fIcode\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fIbad_resource_id\fP; + uint16_t \fIminor_opcode\fP; + uint8_t \fImajor_opcode\fP; + uint8_t \fI__unused\fP[21]; +}; +.fi +.SH DESCRIPTION +The request contains an invalid window ID. +.PP +The value of the +.I __zero +field is 0 +.RI ( LIBAXL_ERROR ), +which signifies that the received message is an +error message. The value of the +.I code +field is +.I LIBAXL_ERROR_WINDOW +to signify that the error is of the error type +described in this document. +.PP +The value of the +.I sequence_number +field is the sequence number returned by the +.BR libaxl_send_request (3) +function for the failed request. +.PP +The value of the +.I bad_resource_id +field is the invalid window ID used in the +failed request. +.PP +The value of the +.I major_opcode +and +.I minor_opcode +fields are the major and minor (if any) operation +codes in the failed request. +.PP +Other fields are unused and may have any value. +.SH SEE ALSO +.BR LIBAXL_ERROR (3) diff --git a/LIBAXL_REQUEST_CIRCULATE_WINDOW.3 b/LIBAXL_REQUEST_CIRCULATE_WINDOW.3 new file mode 100644 index 0000000..6e3a575 --- /dev/null +++ b/LIBAXL_REQUEST_CIRCULATE_WINDOW.3 @@ -0,0 +1,64 @@ +.TH LIBAXL_REQUEST_CIRCULATE_WINDOW 3 libaxl +.SH NAME +LIBAXL_REQUEST_CIRCULATE_WINDOW - Rotation of window Z-order +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_CIRCULATE_WINDOW 13 +struct libaxl_request_circulate_window { + uint8_t \fIopcode\fP; + uint8_t \fIdirection\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIwindow\fP; +}; +.fi +.SH DESCRIPTION +If the value of the +.I direction +field is +.IR LIBAXL_RAISE_LOWEST , +the child window, of the window specified in the +.I window +field, on the bottom is moved to the top +of the stack. If the value of the +.I direction +field is +.IR LIBAXL_LOWER_HIGHEST , +the child window, of the window specified in the +.I window +field, on the top is moved to the bottom. +.PP +If another client is listening for [TODO SubstructureRedirect] +events on the specified window, a [TODO CirculateRequest] +request is sent to the client instead, and no further +processing is performed. If however, no such client, other +than the sender, exists, a [TODO CirculateNotify] +event is generated if the window is actually restacked. +.PP +Normal exposure processing on formerly +obscured windows is performed. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_CIRCULATE_WINDOW +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_VALUE (3) +The value of the +.I direction +field is invalid. +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3) diff --git a/LIBAXL_REQUEST_CLOSE_FONT.3 b/LIBAXL_REQUEST_CLOSE_FONT.3 new file mode 100644 index 0000000..374394e --- /dev/null +++ b/LIBAXL_REQUEST_CLOSE_FONT.3 @@ -0,0 +1,44 @@ +.TH LIBAXL_REQUEST_CLOSE_FONT 3 libaxl +.SH NAME +LIBAXL_REQUEST_CLOSE_FONT - Delete reference to a font +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_CLOSE_FONT 46 +struct libaxl_request_close_font { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_font_t \fIfont\fP; +}; +.fi +.SH DESCRIPTION +The display server shall remove the association +between the resource ID, which is specified in +the +.I font +field, and the font. +.PP +When no resource references the font, it will +be deallocated. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_CLOSE_FONT +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_FONT (3) +The specified font ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_OPEN_FONT (3) diff --git a/LIBAXL_REQUEST_CREATE_PIXMAP.3 b/LIBAXL_REQUEST_CREATE_PIXMAP.3 new file mode 100644 index 0000000..c688c3f --- /dev/null +++ b/LIBAXL_REQUEST_CREATE_PIXMAP.3 @@ -0,0 +1,88 @@ +.TH LIBAXL_REQUEST_CREATE_PIXMAP 3 libaxl +.SH NAME +LIBAXL_REQUEST_CREATE_PIXMAP - Create a pixmap +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_CREATE_PIXMAP 53 +struct libaxl_request_create_pixmap { + uint8_t \fIopcode\fP; + uint8_t \fIdepth\fP; + uint16_t \fI_request_length\fP; + libaxl_pixmap_t \fIpid\fP; + libaxl_drawable_t \fIdrawable\fP; + uint16_t \fIwidth\fP; + uint16_t \fIheight\fP; +}; +.fi +.SH DESCRIPTION +The display server shall create a pixmap, with +the ID specified in the +.I pid +field, which shall be an unused ID generated +with the +.BR libaxl_generate_id (3) +function, for the drawable whose ID is specified +in the +.I drawable +parameter, which may be a input-only window. +.PP +The +.I width +and the +.I height +of the pixmap must be non-zero. +The +.I depth +must be one of the depths supported by the +root of the drawable specified. +.PP +The initial contents of the pixmap are +undefined. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_CREATE_PIXMAP +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_ALLOC (3) +The display server failed to allocate +enough memory to fulfil the request. +.TP +.BR LIBAXL_ERROR_DRAWABLE (3) +The specified drawable ID does not exist. +.TP +.BR LIBAXL_ERROR_ID_CHOICE (3) +The specified ID for the pixmap +.RI ( pid ) +is outside the range of IDs allocated to +the client or is already in use. Use the +.BR libaxl_generate_id (3) +function to avoid this error. +.TP +.BR LIBAXL_ERROR_VALUE (3) +.I width +is zero. +.TP +.BR LIBAXL_ERROR_VALUE (3) +.I height +is zero. +.TP +.BR LIBAXL_ERROR_VALUE (3) +.I depth +is not a depth supported by the root of the +specified drawable. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR libaxl_generate_id (3), +.BR LIBAXL_REQUEST_FREE_PIXMAP (3) diff --git a/LIBAXL_REQUEST_CREATE_WINDOW.3 b/LIBAXL_REQUEST_CREATE_WINDOW.3 new file mode 100644 index 0000000..e5d64ff --- /dev/null +++ b/LIBAXL_REQUEST_CREATE_WINDOW.3 @@ -0,0 +1,98 @@ +.TH LIBAXL_REQUEST_CREATE_WINDOW 3 libaxl +.SH NAME +LIBAXL_REQUEST_CREATE_WINDOW - Create an unmapped window +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_CREATE_WINDOW_BACKGROUND_PIXMAP 0x00000001UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BACKGROUND_PIXEL 0x00000002UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BORDER_PIXMAP 0x00000004UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BORDER_PIXEL 0x00000008UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BIT_GRAVITY 0x00000010UL +#define LIBAXL_REQUEST_CREATE_WINDOW_WIN_GRAVITY 0x00000020UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BACKING_STORE 0x00000040UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BACKING_PLANES 0x00000080UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BACKING_PIXEL 0x00000100UL +#define LIBAXL_REQUEST_CREATE_WINDOW_OVERRIDE_REDIRECT 0x00000200UL +#define LIBAXL_REQUEST_CREATE_WINDOW_SAVE_UNDER 0x00000400UL +#define LIBAXL_REQUEST_CREATE_WINDOW_EVENT_MASK 0x00000800UL +#define LIBAXL_REQUEST_CREATE_WINDOW_DO_NOT_PROPAGATE_MASK 0x00001000UL +#define LIBAXL_REQUEST_CREATE_WINDOW_COLORMAP 0x00002000UL +#define LIBAXL_REQUEST_CREATE_WINDOW_CURSOR 0x00004000UL + +#define LIBAXL_REQUEST_CREATE_WINDOW 1 +struct libaxl_request_create_window { + uint8_t \fIopcode\fP; + uint8_t \fIdepth\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIwid\fP; + libaxl_window_t \fIparent\fP; + int16_t \fIx\fP; + int16_t \fIy\fP; + uint16_t \fIwidth\fP; + uint16_t \fIheight\fP; + uint16_t \fIborder_width\fP; + uint16_t \fIclass\fP; + libaxl_visual_id_t \fIvisual\fP; + uint32_t \fIvalue_mask\fP; + + libaxl_pixmap_t \fIbackground_pixmap\fP; + uint32_t \fIbackground_pixel\fP; + libaxl_pixmap_t \fIborder_pixmap\fP; + uint32_t \fIborder_pixel\fP; + uint8_t \fIbit_gravity\fP; + uint8_t \fIwin_gravity\fP; + uint8_t \fIbacking_store\fP; + uint8_t \fI__omitted1\fP; + uint32_t \fIbacking_planes\fP; + uint32_t \fIbacking_pixel\fP; + libaxl_bool_t \fIoverride_redirect\fP; + libaxl_bool_t \fIsave_under\fP; + uint16_t \fI__omitted2\fP; + uint32_t \fIevent_mask\fP; + uint32_t \fIdo_not_propagate_mask\fP; + libaxl_colormap_t \fIcolormap\fP; + libaxl_cursor_t \fIcursor\fP; +}; +.fi +.SH DESCRIPTION +The display server shall create an unmapped +window, with the ID specified in the +.I wid +field, which shall be an unused ID generated +with the +.BR libaxl_generate_id (3) +function. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_CREATE_WINDOW +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_ALLOC (3) +The display server failed to allocate +enough memory to fulfil the request. +.TP +.BR LIBAXL_ERROR_ID_CHOICE (3) +The specified ID for the window +.RI ( wid ) +is outside the range of IDs allocated to +the client or is already in use. Use the +.BR libaxl_generate_id (3) +function to avoid this error. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR libaxl_generate_id (3), +.BR LIBAXL_REQUEST_MAP_WINDOW (3), +.BR LIBAXL_REQUEST_DESTROY_WINDOW (3), +.BR LIBAXL_REQUEST_REPARENT_WINDOW (3) diff --git a/LIBAXL_REQUEST_DELETE_PROPERTY.3 b/LIBAXL_REQUEST_DELETE_PROPERTY.3 new file mode 100644 index 0000000..09819e0 --- /dev/null +++ b/LIBAXL_REQUEST_DELETE_PROPERTY.3 @@ -0,0 +1,53 @@ +.TH LIBAXL_REQUEST_DELETE_PROPERTY 3 libaxl +.SH NAME +LIBAXL_REQUEST_DELETE_PROPERTY - Remove a property from a window +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_DELETE_PROPERTY 18 +struct libaxl_request_delete_property { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIwindow\fP; + libaxl_atom_t \fIproperty\fP; +}; +.fi +.SH DESCRIPTION +The display server shall remove the property +specified in the +.I property +field from the window whose ID is specified in +the +.I window +field, and generate a [TODO PropertyNotify] +event on the window. +.PP +This request has no effect if the property +does not exist. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_DELETE_PROPERTY +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.TP +.BR LIBAXL_ERROR_ATOM (3) +The specified atom ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_CHANGE_PROPERTY (3), +.BR LIBAXL_REQUEST_GET_PROPERTY (3), +.BR LIBAXL_REQUEST_LIST_PROPERTIES (3) diff --git a/LIBAXL_REQUEST_DESTROY_SUBWINDOWS.3 b/LIBAXL_REQUEST_DESTROY_SUBWINDOWS.3 new file mode 100644 index 0000000..77d5b82 --- /dev/null +++ b/LIBAXL_REQUEST_DESTROY_SUBWINDOWS.3 @@ -0,0 +1,44 @@ +.TH LIBAXL_REQUEST_DESTROY_SUBWINDOWS 3 libaxl +.SH NAME +LIBAXL_REQUEST_DESTROY_SUBWINDOWS - Destroy a window's children +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_DESTROY_SUBWINDOWS 5 +struct libaxl_request_destroy_subwindows { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIwindow\fP; +}; +.fi +.SH DESCRIPTION +The display server shall all children of +the window whose resource ID is specified +in the +.I window +field. Windows are destroyed in +bottom-to-top stacking order. +The specified window itself is not destroyed. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_DESTROY_SUBWINDOWS +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_DESTROY_WINDOW (3), +.BR LIBAXL_REQUEST_UNMAP_SUBWINDOWS (3) diff --git a/LIBAXL_REQUEST_DESTROY_WINDOW.3 b/LIBAXL_REQUEST_DESTROY_WINDOW.3 new file mode 100644 index 0000000..a9d5d0a --- /dev/null +++ b/LIBAXL_REQUEST_DESTROY_WINDOW.3 @@ -0,0 +1,57 @@ +.TH LIBAXL_REQUEST_DESTROY_WINDOW 3 libaxl +.SH NAME +LIBAXL_REQUEST_DESTROY_WINDOW - Destroy a window +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_DESTROY_WINDOW 4 +struct libaxl_request_destroy_window { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIwindow\fP; +}; +.fi +.SH DESCRIPTION +The display server shall unmap +.RB ( LIBAXL_REQUEST_UNMAP_WINDOW (3)) +the window whose resource ID is specified +in the +.I window +field, if it is mapped. After potential +unmapping, the display server shall destroy +the window and all its inferiors. A +.BR LIBAXL_EVENT_DESTROY_NOTIFY (3) +event is generated for each window. The +.BR LIBAXL_EVENT_DESTROY_NOTIFY (3) +events for the inferiors are generated before the +.BR LIBAXL_EVENT_DESTROY_NOTIFY (3) +event for the window itself. No other ordering +contraints apply. +.PP +This request has no effect on root windows. +.PP +Normal exposure processing on formerly obscured +windows is performed. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_DESTROY_WINDOW +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_DESTROY_SUBWINDOWS (3), +.BR LIBAXL_REQUEST_UNMAP_WINDOW (3) diff --git a/LIBAXL_REQUEST_FORCE_SCREEN_SAVER.3 b/LIBAXL_REQUEST_FORCE_SCREEN_SAVER.3 new file mode 100644 index 0000000..f7a0898 --- /dev/null +++ b/LIBAXL_REQUEST_FORCE_SCREEN_SAVER.3 @@ -0,0 +1,56 @@ +.TH LIBAXL_REQUEST_FORCE_SCREEN_SAVER 3 libaxl +.SH NAME +LIBAXL_REQUEST_FORCE_SCREEN_SAVER - Activate or deactivate screen-saver +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_FORCE_SCREEN_SAVER 115 +struct libaxl_request_force_screen_saver { + uint8_t \fIopcode\fP; + uint8_t \fImode\fP; + uint16_t \fI_request_length\fP; +}; +.fi +.SH DESCRIPTION +If the value of the +.I mode +field is +.IR LIBAXL_ACTIVATE , +the screen-saver is activated, even if has been +disabled with a timeout value of zero, unless +the screen-saver is already active. +.PP +If the value of the +.I mode +field is instead +.IR LIBAXL_RESET , +the screen-saver is deactivated (if currently running) +and the activation timer is reset to its initial +state (as if device input had just been received). +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_FORCE_SCREEN_SAVER +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_VALUE (3) +The value of the +.I mode +field is neither +.I LIBAXL_ACTIVATE +nor +.IR LIBAXL_RESET . +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_SET_SCREEN_SAVER (3), +.BR LIBAXL_REQUEST_GET_SCREEN_SAVER (3) diff --git a/LIBAXL_REQUEST_FREE_COLORMAP.3 b/LIBAXL_REQUEST_FREE_COLORMAP.3 new file mode 100644 index 0000000..9f1467b --- /dev/null +++ b/LIBAXL_REQUEST_FREE_COLORMAP.3 @@ -0,0 +1,63 @@ +.TH LIBAXL_REQUEST_FREE_COLORMAP 3 libaxl +.SH NAME +LIBAXL_REQUEST_FREE_COLORMAP - Delete reference to a colormap +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_FREE_COLORMAP 79 +struct libaxl_request_free_colormap { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_colormap_t \fIcmap\fP; +}; +.fi +.SH DESCRIPTION +The display server shall remove the association +between the resource ID, which is specified in +the +.I cmap +field, and the colormap. +.PP +The the colormap is installed for a screen, it +will be uninstalled. +.PP +If the colormap is defined as the colormap for a +window, the colormap for the window is changed to +.BR LIBAXL_NONE , +and a [TODO ColormapNotify] event +is generated. (The protocol does not define colors +displayed for a window with LIBAXL_NONE as the +colormap). +.PP +When no resource references the colormap, it will +be deallocated. +.PP +This request has no effect on a default colormap +for a screen. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_FREE_COLORMAP +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.TP +.BR LIBAXL_ERROR_COLORMAP (3) +The specified colormap ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.RB LIBAXL_REQUEST_COPY_COLORMAP_AND_FREE (3), +.RB LIBAXL_REQUEST_CREATE_COLORMAP (3), +.RB LIBAXL_REQUEST_UNINSTALL_COLORMAP(3) diff --git a/LIBAXL_REQUEST_FREE_CURSOR.3 b/LIBAXL_REQUEST_FREE_CURSOR.3 new file mode 100644 index 0000000..f973151 --- /dev/null +++ b/LIBAXL_REQUEST_FREE_CURSOR.3 @@ -0,0 +1,47 @@ +.TH LIBAXL_REQUEST_FREE_CURSOR 3 libaxl +.SH NAME +LIBAXL_REQUEST_FREE_CURSOR - Delete reference to a cursor +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_FREE_CURSOR 95 +struct libaxl_request_free_cursor { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_cursor_t \fIcursor\fP; +}; +.fi +.SH DESCRIPTION +The display server shall remove the association +between the resource ID, which is specified in +the +.I cursor +field, and the cursor. +.PP +When no resource references the cursor, it will +be deallocated. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_FREE_CURSOR +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.TP +.BR LIBAXL_ERROR_CURSOR (3) +The specified cursor ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_CREATE_CURSOR (3) diff --git a/LIBAXL_REQUEST_FREE_GC.3 b/LIBAXL_REQUEST_FREE_GC.3 new file mode 100644 index 0000000..5f7c721 --- /dev/null +++ b/LIBAXL_REQUEST_FREE_GC.3 @@ -0,0 +1,42 @@ +.TH LIBAXL_REQUEST_FREE_GC 3 libaxl +.SH NAME +LIBAXL_REQUEST_FREE_GC - Delete reference to a graphics context +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_FREE_GC 60 +struct libaxl_request_free_gc { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_gcontext_t \fIgc\fP; +}; +.fi +.SH DESCRIPTION +The display server shall remove the association +between the resource ID and deallocate the +graphics context. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_FREE_GC +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.TP +.BR LIBAXL_ERROR_GC (3) +The specified graphics context ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_CREATE_GC (3) diff --git a/LIBAXL_REQUEST_FREE_PIXMAP.3 b/LIBAXL_REQUEST_FREE_PIXMAP.3 new file mode 100644 index 0000000..1b3af15 --- /dev/null +++ b/LIBAXL_REQUEST_FREE_PIXMAP.3 @@ -0,0 +1,47 @@ +.TH LIBAXL_REQUEST_FREE_PIXMAP 3 libaxl +.SH NAME +LIBAXL_REQUEST_FREE_PIXMAP - Delete reference to a pixmap +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_FREE_PIXMAP 54 +struct libaxl_request_free_pixmap { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_pixmap_t \fIpixmap\fP; +}; +.fi +.SH DESCRIPTION +The display server shall remove the association +between the resource ID, which is specified in +the +.I pixmap +field, and the pixmap. +.PP +When no resource references the pixmap, it will +be deallocated. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_FREE_PIXMAP +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.TP +.BR LIBAXL_ERROR_PIXMAP (3) +The specified pixmap ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_CREATE_PIXMAP (3) diff --git a/LIBAXL_REQUEST_GET_ATOM_NAME.3 b/LIBAXL_REQUEST_GET_ATOM_NAME.3 new file mode 100644 index 0000000..5981a24 --- /dev/null +++ b/LIBAXL_REQUEST_GET_ATOM_NAME.3 @@ -0,0 +1,60 @@ +.TH LIBAXL_REQUEST_GET_ATOM_NAME 3 libaxl +.SH NAME +LIBAXL_REQUEST_GET_ATOM_NAME - Get the name of an atom +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_GET_ATOM_NAME 17 +struct libaxl_request_get_atom_name { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_atom_t \fIatom\fP; +}; +.fi +.SH DESCRIPTION +The display server shall return the name +of the atom whose ID is specified in the +.I atom +field. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_GET_ATOM_NAME +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_ATOM (3) +The specified atom ID does not exist. +.SH REPLIES +.nf +struct libaxl_reply_get_atom_name { + uint8_t \fI__one\fP; + uint8_t \fI__pad\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI_reply_length\fP; + uint16_t \fIlength_of_name\fP; + uint8_t \fI__unused\fP[22]; + char *\fIname\fP; +}; +.fi +.PP +The display server shall, unless it returns an +error, return one +.B "struct libaxl_reply_get_atom_name" +with the +.I name +field set to the name of the atom and the +.I length_of_name +field set to the length of the name. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR libaxl_receive (3), +.BR LIBAXL_REQUEST_INTERN_ATOM (3) diff --git a/LIBAXL_REQUEST_GET_GEOMETRY.3 b/LIBAXL_REQUEST_GET_GEOMETRY.3 new file mode 100644 index 0000000..c496d17 --- /dev/null +++ b/LIBAXL_REQUEST_GET_GEOMETRY.3 @@ -0,0 +1,87 @@ +.TH LIBAXL_REQUEST_GET_GEOMETRY 3 libaxl +.SH NAME +LIBAXL_REQUEST_GET_GEOMETRY - Get a drawable's position, size, depth, and root +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_GET_GEOMETRY 14 +struct libaxl_request_get_geometry { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_drawable_t \fIdrawable\fP; +}; +.fi +.SH DESCRIPTION +The display server shall return the position, +size, depth, and root of the drawable (window +or pixmap) whose ID is specified in the +.I drawable +field. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_GET_GEOMETRY +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_DRAWABLE (3) +The specified drawable ID does not exist. +.SH REPLIES +.nf +struct libaxl_reply_get_geometry { + uint8_t \fI__one\fP; + uint8_t \fIdepth\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI_reply_length\fP; + libaxl_window_t \fIroot\fP; + int16_t \fIx\fP; + int16_t \fIy\fP; + uint16_t \fIwidth\fP; + uint16_t \fIheight\fP; + uint16_t \fIborder_width\fP; + uint8_t \fI__unused\fP[10]; +}; +.fi +.PP +The display server shall, unless it returns an +error, return one +.B "struct libaxl_reply_get_geometry" +with the +.I root +field set to the root window in the screen +that the drawable is associated with, the +.I depth +(bits per pixel) field to the drawable's +depth, the +.I x +and +.I y +fields to the number of pixels is the window +is right of and below, respectively, of the +window's parent's top left corner, or to 0 +if the drawable is a pixmap, the +.I width +and +.I height +fields to the drawable's width and height +(excluding the border), respectively, in +pixels, and the +.I border_width +field to the window's border-width or to +0 of the drawable is a pixmap. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR libaxl_receive (3), +.BR LIBAXL_REQUEST_CONFIGURE_WINDOW (3), +.BR LIBAXL_REQUEST_GET_WINDOW_ATTRIBUTES (3), +.BR LIBAXL_REQUEST_GET_PROPERTY (3), +.BR LIBAXL_REQUEST_LIST_PROPERTIES (3), +.BR LIBAXL_REQUEST_TRANSLATE_COORDINATES (3) diff --git a/LIBAXL_REQUEST_GET_SELECTION_OWNER.3 b/LIBAXL_REQUEST_GET_SELECTION_OWNER.3 new file mode 100644 index 0000000..40c7bb5 --- /dev/null +++ b/LIBAXL_REQUEST_GET_SELECTION_OWNER.3 @@ -0,0 +1,62 @@ +.TH LIBAXL_REQUEST_GET_SELECTION_OWNER 3 libaxl +.SH NAME +LIBAXL_REQUEST_GET_SELECTION_OWNER - Get the owner of a selection +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_GET_SELECTION_OWNER 23 +struct libaxl_request_get_selection_owner { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_atom_t \fIselection\fP; +}; +.fi +.SH DESCRIPTION +The display server shall return the ID of +the window that owns the selection whose +atom ID is specified in the +.I selection +field. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_GET_SELECTION_OWNER +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_ATOM (3) +The specified atom ID does not exist. +.SH REPLIES +.nf +struct libaxl_reply_get_selection_owner { + uint8_t \fI__one\fP; + uint8_t \fI__pad\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI_reply_length\fP; + libaxl_window_t \fIowner\fP; + uint8_t \fI__unused\fP[20]; +}; +.fi +.PP +The display server shall, unless it returns an +error, return one +.B "struct libaxl_reply_get_selection_owner" +with the +.I owner +field set to the ID of the window that owns +the specified selection, or +.I LIBAXL_NONE +if the selection does not have an owner. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR libaxl_receive (3), +.BR LIBAXL_REQUEST_SET_SELECTION_OWNER (3), +.BR LIBAXL_REQUEST_CONVERT_SELECTION (3) diff --git a/LIBAXL_REQUEST_GRAB_SERVER.3 b/LIBAXL_REQUEST_GRAB_SERVER.3 new file mode 100644 index 0000000..5494c25 --- /dev/null +++ b/LIBAXL_REQUEST_GRAB_SERVER.3 @@ -0,0 +1,35 @@ +.TH LIBAXL_REQUEST_GRAB_SERVER 3 libaxl +.SH NAME +LIBAXL_REQUEST_GRAB_SERVER - Disable processing for other connections +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_GRAB_SERVER 36 +struct libaxl_request_grab_server { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; +}; +.fi +.SH DESCRIPTION +The display server shall disable processing of +requests and close-downs on all other connections. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_GRAB_SERVER +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +None. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_UNGRAB_SERVER (3) diff --git a/LIBAXL_REQUEST_INTERN_ATOM.3 b/LIBAXL_REQUEST_INTERN_ATOM.3 new file mode 100644 index 0000000..cf8eda0 --- /dev/null +++ b/LIBAXL_REQUEST_INTERN_ATOM.3 @@ -0,0 +1,165 @@ +.TH LIBAXL_REQUEST_INTERN_ATOM 3 libaxl +.SH NAME +LIBAXL_REQUEST_INTERN_ATOM - Get atom ID from atom name +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_INTERN_ATOM 16 +struct libaxl_request_intern_atom { + uint8_t \fIopcode\fP; + uint8_t \fIonly_if_exists\fP; + uint16_t \fI_request_length\fP; + uint16_t \fIlength_of_name\fP; + uint8_t \fI__pad\fP; + char *\fIname\fP; +}; +.fi +.SH DESCRIPTION +The display server shall return the ID of +the atom whose name is specified in the +.I name +field. The length of the name shall be +specified in the +.I length_of_name +field. If the atom does not already exist +it shall be created if the +.I only_if_exists +field is set to 0. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_INTERN_ATOM +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_ALLOC (3) +The display server failed to allocate +enough memory to create the atom. +.TP +.BR LIBAXL_ERROR_VALUE (3) +The request contains a value that falls +outside the range of accepted values. +.SH REPLIES +.nf +struct libaxl_reply_intern_atom { + uint8_t \fI__one\fP; + uint8_t \fI__pad\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI_reply_length\fP; + libaxl_atom_t \fIatom\fP; + uint8_t \fI__unused\fP[20]; +}; +.fi +.PP +The display server shall, unless it returns an +error, return one +.B "struct libaxl_reply_intern_atom" +with the +.I atom +field set to the ID of the atom, or to +.I LIBAXL_NONE +if the atom does not exist (and the +.I only_if_exists +field in the request was not 0). +.SH NOTES +An atom is a ISO Latin-1 encoded, case-sensitive +string that has been integerised. X predefines +some of the important atoms. The predefined atoms +can be accessed with the following constants, +which are named as the atoms themselves except +with the +.B LIBAXL_ATOM_ +prefix: + +.IR LIBAXL_ATOM_ARC , +.IR LIBAXL_ATOM_ATOM , +.IR LIBAXL_ATOM_BITMAP , +.IR LIBAXL_ATOM_CAP_HEIGHT , +.IR LIBAXL_ATOM_CARDINAL , +.IR LIBAXL_ATOM_COLORMAP , +.IR LIBAXL_ATOM_COPYRIGHT , +.IR LIBAXL_ATOM_CURSOR , +.IR LIBAXL_ATOM_CUT_BUFFER0 , +.IR LIBAXL_ATOM_CUT_BUFFER1 , +.IR LIBAXL_ATOM_CUT_BUFFER2 , +.IR LIBAXL_ATOM_CUT_BUFFER3 , +.IR LIBAXL_ATOM_CUT_BUFFER4 , +.IR LIBAXL_ATOM_CUT_BUFFER5 , +.IR LIBAXL_ATOM_CUT_BUFFER6 , +.IR LIBAXL_ATOM_CUT_BUFFER7 , +.IR LIBAXL_ATOM_DRAWABLE , +.IR LIBAXL_ATOM_END_SPACE , +.IR LIBAXL_ATOM_FAMILY_NAME , +.IR LIBAXL_ATOM_FONT , +.IR LIBAXL_ATOM_FONT_NAME , +.IR LIBAXL_ATOM_FULL_NAME , +.IR LIBAXL_ATOM_INTEGER , +.IR LIBAXL_ATOM_ITALIC_ANGLE , +.IR LIBAXL_ATOM_MAX_SPACE , +.IR LIBAXL_ATOM_MIN_SPACE , +.IR LIBAXL_ATOM_NORM_SPACE , +.IR LIBAXL_ATOM_NOTICE , +.IR LIBAXL_ATOM_PIXMAP , +.IR LIBAXL_ATOM_POINT , +.IR LIBAXL_ATOM_POINT_SIZE , +.IR LIBAXL_ATOM_PRIMARY , +.IR LIBAXL_ATOM_QUAD_WIDTH , +.IR LIBAXL_ATOM_RECTANGLE , +.IR LIBAXL_ATOM_RESOLUTION , +.IR LIBAXL_ATOM_RESOURCE_MANAGER , +.IR LIBAXL_ATOM_RGB_BEST_MAP , +.IR LIBAXL_ATOM_RGB_BLUE_MAP , +.IR LIBAXL_ATOM_RGB_COLOR_MAP , +.IR LIBAXL_ATOM_RGB_DEFAULT_MAP , +.IR LIBAXL_ATOM_RGB_GRAY_MAP , +.IR LIBAXL_ATOM_RGB_GREEN_MAP , +.IR LIBAXL_ATOM_RGB_RED_MAP , +.IR LIBAXL_ATOM_SECONDARY , +.IR LIBAXL_ATOM_STRIKEOUT_ASCENT , +.IR LIBAXL_ATOM_STRIKEOUT_DESCENT , +.IR LIBAXL_ATOM_STRING , +.IR LIBAXL_ATOM_SUBSCRIPT_X , +.IR LIBAXL_ATOM_SUBSCRIPT_Y , +.IR LIBAXL_ATOM_SUPERSCRIPT_X , +.IR LIBAXL_ATOM_SUPERSCRIPT_Y , +.IR LIBAXL_ATOM_UNDERLINE_POSITION , +.IR LIBAXL_ATOM_UNDERLINE_THICKNESS , +.IR LIBAXL_ATOM_VISUALID , +.IR LIBAXL_ATOM_WEIGHT , +.IR LIBAXL_ATOM_WINDOW , +.IR LIBAXL_ATOM_WM_CLASS , +.IR LIBAXL_ATOM_WM_CLIENT_MACHINE , +.IR LIBAXL_ATOM_WM_COMMAND , +.IR LIBAXL_ATOM_WM_HINTS , +.IR LIBAXL_ATOM_WM_ICON_NAME , +.IR LIBAXL_ATOM_WM_ICON_SIZE , +.IR LIBAXL_ATOM_WM_NAME , +.IR LIBAXL_ATOM_WM_NORMAL_HINTS , +.IR LIBAXL_ATOM_WM_SIZE_HINTS , +.IR LIBAXL_ATOM_WM_TRANSIENT_FOR , +.IR LIBAXL_ATOM_WM_ZOOM_HINTS , +and +.IR LIBAXL_ATOM_X_HEIGHT . +.PP +Atoms remain defined until the server resets. +\" TODO See Chapter 10, Connection Close +.PP +To avoid conflicts with names for atoms, atoms +that are private to a particular vendor or +organisation should be prefixed with an underscore +followed by additional prefixes, which the +protocol does not specify how they are chosen. +Atoms that are private to a single application +or end user, but stored in globally accessible +locations, should use two leading underscores. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR libaxl_receive (3), +.BR LIBAXL_REQUEST_GET_ATOM_NAME (3) diff --git a/LIBAXL_REQUEST_KILL_CLIENT.3 b/LIBAXL_REQUEST_KILL_CLIENT.3 new file mode 100644 index 0000000..83e070f --- /dev/null +++ b/LIBAXL_REQUEST_KILL_CLIENT.3 @@ -0,0 +1,56 @@ +.TH LIBAXL_REQUEST_KILL_CLIENT 3 libaxl +.SH NAME +LIBAXL_REQUEST_KILL_CLIENT - Kill an X client +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_KILL_CLIENT 113 +struct libaxl_request_kill_client { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_id_t \fIresource\fP; +}; +.fi +.SH DESCRIPTION +The display server shall close down the client +that created the resource specified in the +.I resource +field, if resource exists. If the client has +already terminated in either +.I LIBAXL_RETAIN_PERMANENT +or +.I LIBAXL_RETAIN_TEMPORARY +mode, all its resources are destroyed. +.PP +If the value +.I LIBAXL_ALL_TEMPORARY +is specified in the +.I resource +field, all resources of all clients that +have terminated in +.I LIBAXL_RETAIN_TEMPORARY +mode are destroyed. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_KILL_CLIENT +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_VALUE (3) +The value specified in the +.I resource +field falls outside the range of accepted values. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_SET_CLOSE_DOWN_MODE (3) diff --git a/LIBAXL_REQUEST_LIST_FONTS.3 b/LIBAXL_REQUEST_LIST_FONTS.3 new file mode 100644 index 0000000..b77732e --- /dev/null +++ b/LIBAXL_REQUEST_LIST_FONTS.3 @@ -0,0 +1,100 @@ +.TH LIBAXL_REQUEST_LIST_FONTS 3 libaxl +.SH NAME +LIBAXL_REQUEST_LIST_FONTS - List fonts +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_LIST_FONTS 49 +struct libaxl_request_open_font { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + uint16_t \fImax_names\fP; + uint16_t \fIlength_of_pattern\fP; + char *\fIpattern\fP; +}; +.fi +.SH DESCRIPTION +The display server shall list all fonts +except no more than the number specified in the +.I max_names +field, matching the font name pattern specified +in the +.I pattern +field, which shall be encoded in ISO Latin-1 and +is case insensitive, whose length is specified +in the +.I length_of_name +field. +.B ?\, +and +.B * +in the font name pattern are recognised as +wildcards, see +.BR LIBAXL_REQUEST_OPEN_FONT (3) +for more information. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_LIST_FONTS +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.PP +If the +.B ?\, +character is used in the font name pattern, +it will matching any single character, the +.B * +character will match any number of characters. A +structured format for font names is specified in the +X.Org standard X Logical Font Description Conventions. +.SH ERRORS +None. +.SH REPLIES +.nf +struct libaxl_str8 { + uint8_t \fIlength\fP; + char *\fIname\fP; +}; + +struct libaxl_reply_list_fonts { + uint8_t \fI__one\fP; + uint8_t \fI__pad\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI_reply_length\fP; + uint16_t \fInumber_of_names\fP; + uint8_t \fI__unused\fP[22]; + struct libaxl_str8 *\fInames\fP; +}; +.fi +.PP +The display server shall, unless it returns an +error, return one +.B "struct libaxl_reply_intern_atom" +with the +.I names +field set to the list of matching font names and the +.I number_of_names +field set to the number of font names in this list. +For each element in the +.I names +field, the +.I name +subfield is set to the lower case name of the font +and the +.I length +subfield is set to the length of the name. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_LIST_FONTS_WITH_INFO (3), +.BR LIBAXL_REQUEST_OPEN_FONT (3), +.BR LIBAXL_REQUEST_QUERY_FONT (3), +.BR LIBAXL_REQUEST_QUERY_TEXT_EXTENTS (3), +.BR LIBAXL_REQUEST_SET_FONT_PATH (3), +.BR LIBAXL_REQUEST_GET_FONT_PATH (3) diff --git a/LIBAXL_REQUEST_LIST_PROPERTIES.3 b/LIBAXL_REQUEST_LIST_PROPERTIES.3 new file mode 100644 index 0000000..25b2352 --- /dev/null +++ b/LIBAXL_REQUEST_LIST_PROPERTIES.3 @@ -0,0 +1,63 @@ +.TH LIBAXL_REQUEST_LIST_PROPERTIES 3 libaxl +.SH NAME +LIBAXL_REQUEST_LIST_PROPERTIES - Get all properties of a window +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_LIST_PROPERTIES 21 +struct libaxl_request_list_properties { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIwindow\fP; +}; +.fi +.SH DESCRIPTION +The display server shall return a list of all +properties (sans values) define on the window +whose ID is specified in the +.I window +field. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_LIST_PROPERTIES +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.SH REPLIES +.nf +struct libaxl_reply_list_properties { + uint8_t \fI__one\fP; + uint8_t \fI__pad\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI_reply_length\fP; + uint16_t \fIlength_of_atoms\fP; + uint8_t \fI__unused\fP[22]; + libaxl_atom_t *\fIatoms\fP; +}; +.fi +.PP +The display server shall, unless it returns an +error, return one +.B "struct libaxl_reply_list_properties" +with the +.I atoms +field set to the list of properties name, +returns as atoms, of the +.I length_of_atoms +field set to the number of atoms in the list. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR libaxl_receive (3), +.BR LIBAXL_REQUEST_GET_PROPERTY (3), +.BR LIBAXL_REQUEST_GET_ATOM_NAME (3) diff --git a/LIBAXL_REQUEST_MAP_SUBWINDOWS.3 b/LIBAXL_REQUEST_MAP_SUBWINDOWS.3 new file mode 100644 index 0000000..31ec6b3 --- /dev/null +++ b/LIBAXL_REQUEST_MAP_SUBWINDOWS.3 @@ -0,0 +1,43 @@ +.TH LIBAXL_REQUEST_MAP_SUBWINDOWS 3 libaxl +.SH NAME +LIBAXL_REQUEST_MAP_SUBWINDOWS - Map all subwindows +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_MAP_SUBWINDOWS 9 +struct libaxl_request_map_subwindows { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIwindow\fP; +}; +.fi +.SH DESCRIPTION +This request perform a +.BR LIBAXL_REQUEST_MAP_WINDOW (3) +request for all unmap children of the window, +whose resource ID is specified in the +.I window +field, in top-to-bottom stacking order. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_MAP_SUBWINDOWS +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_MAP_WINDOW (3), +.BR LIBAXL_REQUEST_UNMAP_SUBWINDOWS (3) diff --git a/LIBAXL_REQUEST_MAP_WINDOW.3 b/LIBAXL_REQUEST_MAP_WINDOW.3 new file mode 100644 index 0000000..a7a4462 --- /dev/null +++ b/LIBAXL_REQUEST_MAP_WINDOW.3 @@ -0,0 +1,57 @@ +.TH LIBAXL_REQUEST_MAP_WINDOW 3 libaxl +.SH NAME +LIBAXL_REQUEST_MAP_WINDOW - Map a window +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_MAP_WINDOW 8 +struct libaxl_request_map_window { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIwindow\fP; +}; +.fi +.SH DESCRIPTION +The display server shall map the window +whose resource ID is specified in the +.I window +field, and generate a +.BR LIBAXL_EVENT_MAP_NOTIFY (3) +event. However, if the +.I override_redirect +attribute of the window is false and another +client is listening on [TODO SubstructureRedirect] +events on the parent of the window, the window remains +unmapped but a [TODO MapRequest] event +is sent to that client. Otherwise, the window is +mapped and a [TODO MapNotify] event +is generated. +.PP +Exposure processing is performed on the window. +.PP +This request has no effect if the window +is already mapped. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_MAP_WINDOW +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_MAP_SUBWINDOWS (3), +.BR LIBAXL_REQUEST_UNMAP_WINDOW (3), +.BR LIBAXL_REQUEST_CREATE_WINDOW (3) diff --git a/LIBAXL_REQUEST_OPEN_FONT.3 b/LIBAXL_REQUEST_OPEN_FONT.3 new file mode 100644 index 0000000..c5a097d --- /dev/null +++ b/LIBAXL_REQUEST_OPEN_FONT.3 @@ -0,0 +1,269 @@ +.TH LIBAXL_REQUEST_OPEN_FONT 3 libaxl +.SH NAME +LIBAXL_REQUEST_OPEN_FONT - Load a font +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_OPEN_FONT 45 +struct libaxl_request_open_font { + uint8_t \fIopcode\fP; + uint8_t \fI__pad1\fP; + uint16_t \fI_request_length\fP; + libaxl_font_t \fIfid\fP; + uint16_t \fIlength_of_name\fP; + uint16_t \fI__pad2\fP; + char *\fIname\fP; +}; +.fi +.SH DESCRIPTION +The display server shall load a font matching +the font name pattern specified in the +.I name +field, which shall be encoded in ISO Latin-1 and +is case insensitive, whose length is specified +in the +.I length_of_name +field. The loaded font shall be given the +ID specified in the +.I fid +field, which shall be an unused ID generated +with the +.BR libaxl_generate_id (3) +function. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_OPEN_FONT +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.PP +If the +.B ?\, +character is used in the font name pattern, +it will matching any single character, the +.B * +character will match any number of characters. A +structured format for font names is specified in the +X.Org standard X Logical Font Description Conventions. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_ALLOC (3) +The display server failed to allocate +enough memory to fulfil the request. +.TP +.BR LIBAXL_ERROR_ID_CHOICE (3) +The specified ID for the font +.RI ( fid ) +is outside the range of IDs allocated to +the client or is already in use. Use the +.BR libaxl_generate_id (3) +function to avoid this error. +.TP +.BR LIBAXL_ERROR_NAME (3) +The font name in the request +.RI ( name ) +is invalid: the font does not exist. +.SH REPLIES +None. +.SH EXTENDED DESCRIPTION +.SS Font names according to the X Logical Font Description Conventions +Font names are case insensitive, must not e longer than 255 characters, +and consists only of ISO 8859-1 graphic characters but not +.B ?\, +(question mark), +.B *\, +(asterisk), +.B ,\, +(comma), or +.B \(dq\, +(quotation mark). +.PP +Private fonts shall not conform fully to the following +specification. Fonts from X-registered foundaries shall +have a name with the following format: +.nf + \fB\(dq-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s\(dq,\fP + <\fIFoundary\fP>\fB,\fP + <\fIFamily name\fP>\fB,\fP + <\fIWeight name\fP>\fB,\fP + <\fISlant\fP>\fB,\fP + <\fISet-width name\fP>\fB,\fP + <\fIAdditional style name\fP>\fB,\fP + <\fIPixel size\fP>\fB,\fP + <\fIPoint size\fP>\fB,\fP + <\fIX-resolution\fP>\fB,\fP + <\fIY-resolution\fP>\fB,\fP + <\fISpacing\fP>\fB,\fP + <\fIAverage width\fP>\fB,\fP + <\fICharacter-set registry\fP>\fB,\fP + <\fICharacter-set encoding\fP> +.fi +optionally prefixed with a +.B +\, +(plus) followed by a X Logical Font Description version number that +defines an extension to the font name syntax. The values of the fields +may not contain the +.B -\, +(hyphen) character. +.PP +The fields in font names are: +.TP +.I Foundary +The font's foundary. More information can be +found in the X Logical Font Description specification. +.TP +.I Family name +The typeface family name, this is what the typical +user knows as the font name. +.TP +.I Weight name +The font's typographic weight (nomincal blackness), +for example +.BR Medium , +.BR Bold , +or +.BR DemiBold . +.TP +.I Slant +Either +.B R +for roman, +.B I +for italic, +.B O +for oblique, +.B RI +for reverse italic, +.B RO +for reverse oblique, +.B OT +for other, or a numberic value +for polymorphic fonts. +.TP +.I Set-width name +The font's typographic proportionate width, +for example +.BR Normal , +.BR Condensed , +.BR Narrow , +or +.BR "Double Wide" , +or +.B 0 +if the font is polymorphic. +.TP +.I Additional style name +A string that identifies additional typographic +style information, for example +.BR Serif , +.BR "Sans Serif" , +.BR Informal , +or +.BR Decorated . +The +.B [ +character anywhere in the field is used to +indicate a polymorphic font. +.TP +.I Pixel size +The height of the font, in whole pixels. +This is not necessarily equivalent to the +height of the font bounding box. +.B 0 +if the font is scalable. Alternatively the +field may be a transformation matrix. +.TP +.I Point size +The height of the font, in whole decipixels. +This is not necessarily equivalent to the +height of the font bounding box. +.B 0 +if the font is scalable. Alternatively the +field may be a transformation matrix. + +722.7\ decipoints (72.27\ points) is equal +to 1\ inch or 2.54\ cm. +.TP +.I X-resolution +Unsigned integer that give the horizontal +resolution, measured in dots (or pixels) per +inch, for which the font was designed. +.B 0 +if the font is scalable font. +.TP +.I Y-resolution +Unsigned integer that give the vertical +resolution, measured in dots (or pixels) per +inch, for which the font was designed. +.B 0 +if the font is scalable font. +.TP +.I Spacing +The escapement class of the font: +.B P +for proportional (variable pitch), +.B M +for monospace (fixed pitch), or +.B C +for charcell (a special monospaced font that +conforms to the traditional data-processing +character cell font model). +.TP +.I Average width +The unweighted arithmetic mean of the absolute +value of the width of each glyph in the font, +measured in decipixels. Prefixed with a +.B ~ +(tilde) if the dominant writing direction for +the font is right-to-left. +.B 0 +if the font is scalable (without potential +.BR ~ -prefix). +.TP +.IR "Character-set registry" ", " "Character-set encoding" +The registration character-set. More information +can be found in the X Logical Font Description +specification. + +.I Character-set encoding +can be suffixed with a subset hint. More information +can be found in the X Logical Font Description +specification. +.PP +As an example of a font name pattern, +.B "-misc-fixed-medium-r-normal-*-12-*-*-*-c-*-iso10646-1" +is widely installed and is a good font for terminals. Its +foundary is +.BR misc , +its family name is +.BR fixed , +it is +.B medium +(weight name), +.B roman +(slant), +.B normal +(set-width name), +.B 12 +pixels high (pixel size), +monospaced with standard typewriter character cell model +.RB ( c ) +(spacing), +and uses the Universal Character Set +.B (iso10646-1) +(character-set registry and character-set encoding). +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_CLOSE_FONT (3), +.BR LIBAXL_REQUEST_QUERY_FONT (3), +.BR LIBAXL_REQUEST_QUERY_TEXT_EXTENTS (3), +.BR LIBAXL_REQUEST_LIST_FONTS (3), +.BR LIBAXL_REQUEST_LIST_FONTS_WITH_INFO (3), +.BR LIBAXL_REQUEST_SET_FONT_PATH (3), +.BR LIBAXL_REQUEST_GET_FONT_PATH (3) diff --git a/LIBAXL_REQUEST_QUERY_TREE.3 b/LIBAXL_REQUEST_QUERY_TREE.3 new file mode 100644 index 0000000..894e6ee --- /dev/null +++ b/LIBAXL_REQUEST_QUERY_TREE.3 @@ -0,0 +1,71 @@ +.TH LIBAXL_REQUEST_QUERY_TREE 3 libaxl +.SH NAME +LIBAXL_REQUEST_QUERY_TREE - Get root, parent, and children of window +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_QUERY_TREE 15 +struct libaxl_request_query_tree { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIwindow\fP; +}; +.fi +.SH DESCRIPTION +The display server shall return the window's, +whose ID is specified in the +.I window +field, root, parent, and immediate children. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_QUERY_TREE +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.SH REPLIES +.nf +struct libaxl_reply_query_tree { + uint8_t \fI__one\fP; + uint8_t \fI__pad\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI_reply_length\fP; + libaxl_window_t \fIroot\fP; + libaxl_window_t \fIparent\fP; + uint16_t \fInumber_of_children\fP; + uint8_t \fI__unused\fP[14]; + libaxl_window_t *\fIchildren\fP; +}; +.fi +.PP +The display server shall, unless it returns an +error, return one +.B "struct libaxl_reply_query_tree" +with the +.I root +field set to the root window, the +.I parent +field set to the parent window or to +.IR LIBAXL_NONE , +and the +.I children +field set to the immediate child windows in +bottom-to-top stacking order, and the +.I number_of_children +field set to the number if windows returned +in the +.I children +field. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR libaxl_receive (3) diff --git a/LIBAXL_REQUEST_REPARENT_WINDOW.3 b/LIBAXL_REQUEST_REPARENT_WINDOW.3 new file mode 100644 index 0000000..54bade1 --- /dev/null +++ b/LIBAXL_REQUEST_REPARENT_WINDOW.3 @@ -0,0 +1,73 @@ +.TH LIBAXL_REQUEST_REPARENT_WINDOW 3 libaxl +.SH NAME +LIBAXL_REQUEST_REPARENT_WINDOW - Change parent of a window +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_REPARENT_WINDOW 7 +struct libaxl_request_reparent_window { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIwindow\fP; + libaxl_window_t \fIparent\fP; + int16_t \fIx\fP; + int16_t \fIy\fP; +}; +.fi +.SH DESCRIPTION +The display server shall generate an +.BR LIBAXL_REQUEST_UNMAP_WINDOW (3) +request, for the window whose ID is specified +in the +.I window +field, and move the window in the window hierarchy +to be a child of the window whose ID is specified +in the +.I parent +field send its position to the number of pixels +specified in the +.I x +field left of, and the number of pixels specified +in the below the new parent window's top left +corner. The window is placed on top in the stacking +order with respect to the new siblings. The display +server shall then generate a +.BR LIBAXL_EVENT_REPARENT_NOTIFY (3) +event, and then, if the window was mapped at the +time of the request, generate a +.BR LIBAXL_REQUEST_MAP_WINDOW (3) +request. +.PP +Normal exposure processing on formerly +obscured windows is performed. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_REPARENT_WINDOW +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_MATCH (3) +The new parent is not on the same screen as +the old parent, the new parent is the window +itself, the new parent is an inferior of the +window, the new parent is an input-only window +but the window is not, or the window has an +.I LIBAXL_PARENT_RELATIVE +background and the new parent does not have +the same depth as the window. +.TP +.BR LIBAXL_ERROR_WINDOW (3) +A specified window ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3) diff --git a/LIBAXL_REQUEST_SET_SELECTION_OWNER.3 b/LIBAXL_REQUEST_SET_SELECTION_OWNER.3 new file mode 100644 index 0000000..e276613 --- /dev/null +++ b/LIBAXL_REQUEST_SET_SELECTION_OWNER.3 @@ -0,0 +1,85 @@ +.TH LIBAXL_REQUEST_SET_SELECTION_OWNER 3 libaxl +.SH NAME +LIBAXL_REQUEST_SET_SELECTION_OWNER - Change ownership of a selection +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_SET_SELECTION_OWNER 22 +struct libaxl_request_set_selection_owner { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIowner\fP; + libaxl_atom_t \fIselection\fP; + libaxl_timestamp_t \fItime\fP; +}; +.fi +.SH DESCRIPTION +This request changes the owner window, and last-change +time of the selection specified in the +.I selection +field to the window and time specifed in the +.I owner +and +.I time +fields, and the owner of the selection to the client +making the request. However the request has no effect +if the request new last-change time is less than the +current last-change time or greater than the current +time according to the server. +.PP +The constant +.I LIBAXL_CURRENT_TIME +can be specified in the +.I time +field for the current server time. +.PP +If the constant +.I LIBAXL_NONE +is specified in the +.I owner +field, the owner window and the owner are both set to +.I LIBAXL_NONE +(none). +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_SET_SELECTION_OWNER +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.PP +If the new owner is not the same as the +current owner, and the current owner is not +.BR LIBAXL_NONE , +a +.BR LIBAXL_EVENT_SELECTION_CLEAR (3) +event is sent to the current owner. +.PP +If the owner of a selection is terminated, +or the owner window is destroyed, the owner +and owner window revers to +.BR LIBAXL_NONE , +but the last-change time remains as is. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.TP +.BR LIBAXL_ERROR_ATOM (3) +The specified atom ID does not exist. +.SH REPLIES +None. +.SH NOTES +Selections are global to the display. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_GET_SELECTION_OWNER (3), +.BR LIBAXL_REQUEST_CONVERT_SELECTION (3), +.BR LIBAXL_EVENT_SELECTION_REQUEST (3), +.BR LIBAXL_EVENT_SELECTION_CLEAR (3) diff --git a/LIBAXL_REQUEST_TRANSLATE_COORDINATES.3 b/LIBAXL_REQUEST_TRANSLATE_COORDINATES.3 new file mode 100644 index 0000000..93b6ca2 --- /dev/null +++ b/LIBAXL_REQUEST_TRANSLATE_COORDINATES.3 @@ -0,0 +1,120 @@ +.TH LIBAXL_REQUEST_TRANSLATE_COORDINATES 3 libaxl +.SH NAME +LIBAXL_REQUEST_TRANSLATE_COORDINATES - Get coordinates relative to another window and hit child +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_TRANSLATE_COORDINATES 17 +struct libaxl_request_translate_coordinates { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIsrc_window\fP; + libaxl_window_t \fIdest_window\fP; + int16_t \fIsrc_x\fP; + int16_t \fIsrc_y\fP; +}; +.fi +.SH DESCRIPTION +The display server shall return the coordinates +.RI ( src_x ", " src_y ), +which are given as relative to top left corner +of the window whose ID is specified in the +.I src_window +field, as relative to the top left corner +of the window whose ID is specified in the +.I dest_window +field. That is, if the top left corner of +the window +.I src_window +is +.RI ( x1 ", " y1 ) +and the the top left corner of +the window +.I src_window +is +.RI ( x2 ", " y2 ), +then then returned coordinate is +.RI ( dest_x ", " dest_y ), +where +.I dest_x +is +.I src_x-x1+x2 +and +.I dest_y +is +.IR src_y-y1+y2 . +.PP +The display server shall also return an +immediate, mapped child window, of the window +whose ID is specified in the +.I dest_window +field, in which the coordinate is contained, +if there is any. +\" TODO Is there a rule for which child? +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_TRANSLATE_COORDINATES +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +One of the specified window IDs does not exist. +.SH REPLIES +.nf +struct libaxl_reply_translate_coordinates { + uint8_t \fI__one\fP; + libaxl_bool_t \fIsame_screen\fP; + uint16_t \fIsequence_number\fP; + uint32_t \fI_reply_length\fP; + libaxl_window_t \fIchild\fP; + int16_t \fIdest_x\fP; + int16_t \fIdest_y\fP; + uint8_t \fI__unused\fP[16]; +}; +.fi +.PP +The display server shall, unless it returns an +error, return one +.B "struct libaxl_reply_translate_coordinates" +with the +.I same_screen +field set 1 if both windows in the request +belong to the same screen, and if so also the +.I dest_x +and +.I dest_y +fields set to the resulting coordinates as +described in the +.B DESCRIPTION +section and the +.I child +field set to an immediate, mapped child of the +window whose ID is specified in the +.I dest_window +field in the request, in which the coordinate +is contained, if there is any, or to +.I LIBAXL_NONE +otherwise; but if the windows are not in the same +screen, the +.IR same_screen , +.IR dest_x , +and +.I dest y +fields are set to 0, and the +.I child +field is set to +.IR LIBAXL_NONE . +\" TODO The value of the child field here is an assumption +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR libaxl_receive (3), +.BR LIBAXL_REQUEST_INTERN_ATOM (3) diff --git a/LIBAXL_REQUEST_UNGRAB_SERVER.3 b/LIBAXL_REQUEST_UNGRAB_SERVER.3 new file mode 100644 index 0000000..748e878 --- /dev/null +++ b/LIBAXL_REQUEST_UNGRAB_SERVER.3 @@ -0,0 +1,35 @@ +.TH LIBAXL_REQUEST_UNGRAB_SERVER 3 libaxl +.SH NAME +LIBAXL_REQUEST_UNGRAB_SERVER - Restart processing for other connections +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_UNGRAB_SERVER 37 +struct libaxl_request_ungrab_server { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; +}; +.fi +.SH DESCRIPTION +The display server shall restart processing of +requests and close-downs on all other connections. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_UNGRAB_SERVER +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +None. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_GRAB_SERVER (3) diff --git a/LIBAXL_REQUEST_UNMAP_SUBWINDOWS.3 b/LIBAXL_REQUEST_UNMAP_SUBWINDOWS.3 new file mode 100644 index 0000000..5e24289 --- /dev/null +++ b/LIBAXL_REQUEST_UNMAP_SUBWINDOWS.3 @@ -0,0 +1,51 @@ +.TH LIBAXL_REQUEST_UNMAP_SUBWINDOWS 3 libaxl +.SH NAME +LIBAXL_REQUEST_UNMAP_SUBWINDOWS - Unmap a window's children +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_UNMAP_SUBWINDOWS 11 +struct libaxl_request_unmap_subwindows { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIwindow\fP; +}; +.fi +.SH DESCRIPTION +The display server shall unmap all mapped +children of the window whose resource ID is +specified in the +.I window +field, but not the specified window itself, +and generate a +.BR LIBAXL_EVENT_UNMAP_NOTIFY (3) +event for each unmapped window. +.PP +Windows are unmapped in bottom-to-top +stacking order. +.PP +Normal exposure processing on formerly +obscured windows is performed. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_UNMAP_SUBWINDOWS +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_UNMAP_WINDOW (3), +.BR LIBAXL_REQUEST_MAP_SUBWINDOWS (3) diff --git a/LIBAXL_REQUEST_UNMAP_WINDOW.3 b/LIBAXL_REQUEST_UNMAP_WINDOW.3 new file mode 100644 index 0000000..476b71e --- /dev/null +++ b/LIBAXL_REQUEST_UNMAP_WINDOW.3 @@ -0,0 +1,49 @@ +.TH LIBAXL_REQUEST_UNMAP_WINDOW 3 libaxl +.SH NAME +LIBAXL_REQUEST_UNMAP_WINDOW - Unmap a window +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_UNMAP_WINDOW 10 +struct libaxl_request_unmap_window { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIwindow\fP; +}; +.fi +.SH DESCRIPTION +The display server shall unmap the window +whose resource ID is specified in the +.I window +field, and generate a +.BR LIBAXL_EVENT_UNMAP_NOTIFY (3) +event. +.PP +Normal exposure processing on formerly +obscured windows is performed. +.PP +This request has no effect if the window +is already unmapped. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_UNMAP_WINDOW +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +The specified window ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3), +.BR LIBAXL_REQUEST_UNMAP_SUBWINDOWS (3), +.BR LIBAXL_REQUEST_MAP_WINDOW (3) diff --git a/LIBAXL_REQUEST_WARP_POINTER.3 b/LIBAXL_REQUEST_WARP_POINTER.3 new file mode 100644 index 0000000..909bfd2 --- /dev/null +++ b/LIBAXL_REQUEST_WARP_POINTER.3 @@ -0,0 +1,103 @@ +.TH LIBAXL_REQUEST_WARP_POINTER 3 libaxl +.SH NAME +LIBAXL_REQUEST_WARP_POINTER - Move mouse pointer +.SH SYNOPSIS +.nf +#include <libaxl.h> + +#define LIBAXL_REQUEST_WARP_POINTER 41 +struct libaxl_request_warp_pointer { + uint8_t \fIopcode\fP; + uint8_t \fI__pad\fP; + uint16_t \fI_request_length\fP; + libaxl_window_t \fIsrc_window\fP; + libaxl_window_t \fIdest_window\fP; + int16_t \fIsrc_x\fP; + int16_t \fIsrc_y\fP; + uint16_t \fIsrc_width\fP; + uint16_t \fIsrc_height\fP; + int16_t \fIdest_x\fP; + int16_t \fIdest_y\fP; +}; +.fi +.SH DESCRIPTION +The display server shall move the mouse pointer +to the number pixels specified in the +.I dest_x +field right of, and the number pixels specified +in the +.I dest_y +field below its current position if the value +of the +.I dest_window +field is +.IR LIBAXL_NONE , +or otherwise relative to the top left corner +of the window whose ID is specified in the +.I dest_window +field. However the request cannot move the +pointer outisde the confine-to window of an +active pointer grab, but and attempt to move +the pointer beyond on the of window's edges +will move the pointer to that edge. +.PP +However, unless the value if the +.I src_window +field is +.IR LIBAXL_NONE , +the move only takes place if the mouse pointer +is inside the window whose ID is specified in the +.I src_window +field and if the mouse pointer is inside the +rectangle specified by the +.IR src_x , +.IR src_y , +.IR src_width , +and +.I src_height +fields. The fields +.I src_x +and +.I src_y +specify the number of pixels right of and +below, respectively, of the window's, whose +ID is specified in the +.I src_window +field, top left corner. The fields +.I src_width +and +.I src_height +specify the number of pixels the rectangle +extend to the right and downwards, respectively, +and the special value 0 means that the rectangle +extends to the end of the window, thus if all +four of the +.IR src_x , +.IR src_y , +.IR src_width , +and +.I src_height +fields have the value 0, the rectangle covers +the entire window. +.PP +The value of the +.I opcode +field shall be +.I LIBAXL_REQUEST_WARP_POINTER +to signify that the request is of the +request described in this document. +.PP +Other fields are filled in automatically by the +.BR libaxl_send_request (3) +function. +.PP +This request will generate events just as if the +user had instantaneously moved the pointer. +.SH ERRORS +.TP +.BR LIBAXL_ERROR_WINDOW (3) +A specified window ID does not exist. +.SH REPLIES +None. +.SH SEE ALSO +.BR libaxl_send_request (3) @@ -0,0 +1,15 @@ +ISC License + +© 2019, 2020 Mattias Andrée <maandree@kth.se> + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..aaac76d --- /dev/null +++ b/Makefile @@ -0,0 +1,494 @@ +.POSIX: + +LIB_MAJOR = 0 +LIB_MINOR = 1 +LIB_VERSION = $(LIB_MAJOR).$(LIB_MINOR) + +CONFIGFILE = config.mk +OSCONFIGFILE = linux.mk + +include $(CONFIGFILE) +include $(OSCONFIGFILE) + +OBJ =\ + libaxl_context_create.o\ + libaxl_context_free.o\ + libaxl_flush.o\ + libaxl_parse_display.o\ + libaxl_receive.o\ + libaxl_send_request.o + +LIB_HDR =\ + libaxl.h\ + libaxl-atoms.h\ + libaxl-consts.h\ + libaxl-errors.h\ + libaxl-errors-structs.h\ + libaxl-events.h\ + libaxl-events-structs.h\ + libaxl-replies.h\ + libaxl-replies-structs.h\ + libaxl-requests.h\ + libaxl-requests-ptr-structs.h\ + libaxl-requests-structs.h\ + libaxl-types.h + +HDR =\ + common.h\ + internal-linux.h\ + internal-llmutex.h\ + $(LIB_HDR) + +MAN3 =\ + LIBAXL_ATOM_ARC.3\ + LIBAXL_ATOM_ATOM.3\ + LIBAXL_ATOM_BITMAP.3\ + LIBAXL_ATOM_CAP_HEIGHT.3\ + LIBAXL_ATOM_CARDINAL.3\ + LIBAXL_ATOM_COLORMAP.3\ + LIBAXL_ATOM_COPYRIGHT.3\ + LIBAXL_ATOM_CURSOR.3\ + LIBAXL_ATOM_CUT_BUFFER0.3\ + LIBAXL_ATOM_CUT_BUFFER1.3\ + LIBAXL_ATOM_CUT_BUFFER2.3\ + LIBAXL_ATOM_CUT_BUFFER3.3\ + LIBAXL_ATOM_CUT_BUFFER4.3\ + LIBAXL_ATOM_CUT_BUFFER5.3\ + LIBAXL_ATOM_CUT_BUFFER6.3\ + LIBAXL_ATOM_CUT_BUFFER7.3\ + LIBAXL_ATOM_DRAWABLE.3\ + LIBAXL_ATOM_END_SPACE.3\ + LIBAXL_ATOM_FAMILY_NAME.3\ + LIBAXL_ATOM_FONT.3\ + LIBAXL_ATOM_FONT_NAME.3\ + LIBAXL_ATOM_FULL_NAME.3\ + LIBAXL_ATOM_INTEGER.3\ + LIBAXL_ATOM_ITALIC_ANGLE.3\ + LIBAXL_ATOM_MAX_SPACE.3\ + LIBAXL_ATOM_MIN_SPACE.3\ + LIBAXL_ATOM_NORM_SPACE.3\ + LIBAXL_ATOM_NOTICE.3\ + LIBAXL_ATOM_PIXMAP.3\ + LIBAXL_ATOM_POINT.3\ + LIBAXL_ATOM_POINT_SIZE.3\ + LIBAXL_ATOM_PRIMARY.3\ + LIBAXL_ATOM_QUAD_WIDTH.3\ + LIBAXL_ATOM_RECTANGLE.3\ + LIBAXL_ATOM_RESOLUTION.3\ + LIBAXL_ATOM_RESOURCE_MANAGER.3\ + LIBAXL_ATOM_RGB_BEST_MAP.3\ + LIBAXL_ATOM_RGB_BLUE_MAP.3\ + LIBAXL_ATOM_RGB_COLOR_MAP.3\ + LIBAXL_ATOM_RGB_DEFAULT_MAP.3\ + LIBAXL_ATOM_RGB_GRAY_MAP.3\ + LIBAXL_ATOM_RGB_GREEN_MAP.3\ + LIBAXL_ATOM_RGB_RED_MAP.3\ + LIBAXL_ATOM_SECONDARY.3\ + LIBAXL_ATOM_STRIKEOUT_ASCENT.3\ + LIBAXL_ATOM_STRIKEOUT_DESCENT.3\ + LIBAXL_ATOM_STRING.3\ + LIBAXL_ATOM_SUBSCRIPT_X.3\ + LIBAXL_ATOM_SUBSCRIPT_Y.3\ + LIBAXL_ATOM_SUPERSCRIPT_X.3\ + LIBAXL_ATOM_SUPERSCRIPT_Y.3\ + LIBAXL_ATOM_UNDERLINE_POSITION.3\ + LIBAXL_ATOM_UNDERLINE_THICKNESS.3\ + LIBAXL_ATOM_VISUALID.3\ + LIBAXL_ATOM_WEIGHT.3\ + LIBAXL_ATOM_WINDOW.3\ + LIBAXL_ATOM_WM_CLASS.3\ + LIBAXL_ATOM_WM_CLIENT_MACHINE.3\ + LIBAXL_ATOM_WM_COMMAND.3\ + LIBAXL_ATOM_WM_HINTS.3\ + LIBAXL_ATOM_WM_ICON_NAME.3\ + LIBAXL_ATOM_WM_ICON_SIZE.3\ + LIBAXL_ATOM_WM_NAME.3\ + LIBAXL_ATOM_WM_NORMAL_HINTS.3\ + LIBAXL_ATOM_WM_SIZE_HINTS.3\ + LIBAXL_ATOM_WM_TRANSIENT_FOR.3\ + LIBAXL_ATOM_WM_ZOOM_HINTS.3\ + LIBAXL_ATOM_X_HEIGHT.3\ + LIBAXL_ERROR.3\ + LIBAXL_ERROR_REQUEST.3\ + LIBAXL_ERROR_VALUE.3\ + LIBAXL_ERROR_WINDOW.3\ + LIBAXL_ERROR_PIXMAP.3\ + LIBAXL_ERROR_ATOM.3\ + LIBAXL_ERROR_CURSOR.3\ + LIBAXL_ERROR_FONT.3\ + LIBAXL_ERROR_MATCH.3\ + LIBAXL_ERROR_DRAWABLE.3\ + LIBAXL_ERROR_ACCESS.3\ + LIBAXL_ERROR_ALLOC.3\ + LIBAXL_ERROR_COLORMAP.3\ + LIBAXL_ERROR_GCONTEXT.3\ + LIBAXL_ERROR_ID_CHOICE.3\ + LIBAXL_ERROR_NAME.3\ + LIBAXL_ERROR_LENGTH.3\ + LIBAXL_ERROR_IMPLEMENTATION.3\ + struct_libaxl_error_request.3\ + struct_libaxl_error_value.3\ + struct_libaxl_error_window.3\ + struct_libaxl_error_pixmap.3\ + struct_libaxl_error_atom.3\ + struct_libaxl_error_cursor.3\ + struct_libaxl_error_font.3\ + struct_libaxl_error_match.3\ + struct_libaxl_error_drawable.3\ + struct_libaxl_error_access.3\ + struct_libaxl_error_alloc.3\ + struct_libaxl_error_colormap.3\ + struct_libaxl_error_gcontext.3\ + struct_libaxl_error_id_choice.3\ + struct_libaxl_error_name.3\ + struct_libaxl_error_length.3\ + struct_libaxl_error_implementation.3\ + union_libaxl_error.3\ + LIBAXL_REQUEST_CREATE_WINDOW.3\ + LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES.3\ + LIBAXL_REQUEST_GET_WINDOW_ATTRIBUTES.3\ + LIBAXL_REQUEST_DESTROY_WINDOW.3\ + LIBAXL_REQUEST_DESTROY_SUBWINDOWS.3\ + LIBAXL_REQUEST_CHANGE_SAVE_SET.3\ + LIBAXL_REQUEST_REPARENT_WINDOW.3\ + LIBAXL_REQUEST_MAP_WINDOW.3\ + LIBAXL_REQUEST_MAP_SUBWINDOWS.3\ + LIBAXL_REQUEST_UNMAP_WINDOW.3\ + LIBAXL_REQUEST_UNMAP_SUBWINDOWS.3\ + LIBAXL_REQUEST_CONFIGURE_WINDOW.3\ + LIBAXL_REQUEST_CIRCULATE_WINDOW.3\ + LIBAXL_REQUEST_GET_GEOMETRY.3\ + LIBAXL_REQUEST_QUERY_TREE.3\ + LIBAXL_REQUEST_INTERN_ATOM.3\ + LIBAXL_REQUEST_GET_ATOM_NAME.3\ + LIBAXL_REQUEST_CHANGE_PROPERTY.3\ + LIBAXL_REQUEST_DELETE_PROPERTY.3\ + LIBAXL_REQUEST_GET_PROPERTY.3\ + LIBAXL_REQUEST_LIST_PROPERTIES.3\ + LIBAXL_REQUEST_SET_SELECTION_OWNER.3\ + LIBAXL_REQUEST_GET_SELECTION_OWNER.3\ + LIBAXL_REQUEST_CONVERT_SELECTION.3\ + LIBAXL_REQUEST_SEND_EVENT.3\ + LIBAXL_REQUEST_GRAB_POINTER.3\ + LIBAXL_REQUEST_UNGRAB_POINTER.3\ + LIBAXL_REQUEST_GRAB_BUTTON.3\ + LIBAXL_REQUEST_UNGRAB_BUTTON.3\ + LIBAXL_REQUEST_CHANGE_ACTIVE_POINTER_GRAB.3\ + LIBAXL_REQUEST_GRAB_KEYBOARD.3\ + LIBAXL_REQUEST_UNGRAB_KEYBOARD.3\ + LIBAXL_REQUEST_GRAB_KEY.3\ + LIBAXL_REQUEST_UNGRAB_KEY.3\ + LIBAXL_REQUEST_ALLOW_EVENTS.3\ + LIBAXL_REQUEST_GRAB_SERVER.3\ + LIBAXL_REQUEST_UNGRAB_SERVER.3\ + LIBAXL_REQUEST_QUERY_POINTER.3\ + LIBAXL_REQUEST_GET_MOTION_EVENTS.3\ + LIBAXL_REQUEST_TRANSLATE_COORDINATES.3\ + LIBAXL_REQUEST_WARP_POINTER.3\ + LIBAXL_REQUEST_SET_INPUT_FOCUS.3\ + LIBAXL_REQUEST_GET_INPUT_FOCUS.3\ + LIBAXL_REQUEST_QUERY_KEYMAP.3\ + LIBAXL_REQUEST_OPEN_FONT.3\ + LIBAXL_REQUEST_CLOSE_FONT.3\ + LIBAXL_REQUEST_QUERY_FONT.3\ + LIBAXL_REQUEST_QUERY_TEXT_EXTENTS.3\ + LIBAXL_REQUEST_LIST_FONTS.3\ + LIBAXL_REQUEST_LIST_FONTS_WITH_INFO.3\ + LIBAXL_REQUEST_SET_FONT_PATH.3\ + LIBAXL_REQUEST_GET_FONT_PATH.3\ + LIBAXL_REQUEST_CREATE_PIXMAP.3\ + LIBAXL_REQUEST_FREE_PIXMAP.3\ + LIBAXL_REQUEST_CREATE_GC.3\ + LIBAXL_REQUEST_CHANGE_GC.3\ + LIBAXL_REQUEST_COPY_GC.3\ + LIBAXL_REQUEST_SET_DASHES.3\ + LIBAXL_REQUEST_SET_CLIP_RECTANGLES.3\ + LIBAXL_REQUEST_FREE_GC.3\ + LIBAXL_REQUEST_CLEAR_AREA.3\ + LIBAXL_REQUEST_COPY_AREA.3\ + LIBAXL_REQUEST_COPY_PLANE.3\ + LIBAXL_REQUEST_POLY_POINT.3\ + LIBAXL_REQUEST_POLY_LINE.3\ + LIBAXL_REQUEST_POLY_SEGMENT.3\ + LIBAXL_REQUEST_POLY_RECTANGLE.3\ + LIBAXL_REQUEST_POLY_ARC.3\ + LIBAXL_REQUEST_FILL_POLY.3\ + LIBAXL_REQUEST_POLY_FILL_RECTANGLE.3\ + LIBAXL_REQUEST_POLY_FILL_ARC.3\ + LIBAXL_REQUEST_PUT_IMAGE.3\ + LIBAXL_REQUEST_GET_IMAGE.3\ + LIBAXL_REQUEST_POLY_TEXT.3\ + LIBAXL_REQUEST_POLY_TEXT.3\ + LIBAXL_REQUEST_IMAGE_TEXT.3\ + LIBAXL_REQUEST_IMAGE_TEXT.3\ + LIBAXL_REQUEST_CREATE_COLORMAP.3\ + LIBAXL_REQUEST_FREE_COLORMAP.3\ + LIBAXL_REQUEST_COPY_COLORMAP_AND_FREE.3\ + LIBAXL_REQUEST_INSTALL_COLORMAP.3\ + LIBAXL_REQUEST_UNINSTALL_COLORMAP.3\ + LIBAXL_REQUEST_LIST_INSTALLED_COLORMAPS.3\ + LIBAXL_REQUEST_ALLOC_COLOR.3\ + LIBAXL_REQUEST_ALLOC_NAMED_COLOR.3\ + LIBAXL_REQUEST_ALLOC_COLOR_CELLS.3\ + LIBAXL_REQUEST_ALLOC_COLOR_PLANES.3\ + LIBAXL_REQUEST_FREE_COLORS.3\ + LIBAXL_REQUEST_STORE_COLORS.3\ + LIBAXL_REQUEST_STORE_NAMED_COLOR.3\ + LIBAXL_REQUEST_QUERY_COLORS.3\ + LIBAXL_REQUEST_LOOKUP_COLOR.3\ + LIBAXL_REQUEST_CREATE_CURSOR.3\ + LIBAXL_REQUEST_CREATE_GLYPH_CURSOR.3\ + LIBAXL_REQUEST_FREE_CURSOR.3\ + LIBAXL_REQUEST_RECOLOR_CURSOR.3\ + LIBAXL_REQUEST_QUERY_BEST_SIZE.3\ + LIBAXL_REQUEST_QUERY_EXTENSION.3\ + LIBAXL_REQUEST_LIST_EXTENSIONS.3\ + LIBAXL_REQUEST_CHANGE_KEYBOARD_MAPPING.3\ + LIBAXL_REQUEST_GET_KEYBOARD_MAPPING.3\ + LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL.3\ + LIBAXL_REQUEST_GET_KEYBOARD_CONTROL.3\ + LIBAXL_REQUEST_BELL.3\ + LIBAXL_REQUEST_CHANGE_POINTER_CONTROL.3\ + LIBAXL_REQUEST_GET_POINTER_CONTROL.3\ + LIBAXL_REQUEST_SET_SCREEN_SAVER.3\ + LIBAXL_REQUEST_GET_SCREEN_SAVER.3\ + LIBAXL_REQUEST_CHANGE_HOSTS.3\ + LIBAXL_REQUEST_LIST_HOSTS.3\ + LIBAXL_REQUEST_SET_ACCESS_CONTROL.3\ + LIBAXL_REQUEST_SET_CLOSE_DOWN_MODE.3\ + LIBAXL_REQUEST_KILL_CLIENT.3\ + LIBAXL_REQUEST_ROTATE_PROPERTIES.3\ + LIBAXL_REQUEST_FORCE_SCREEN_SAVER.3\ + LIBAXL_REQUEST_SET_POINTER_MAPPING.3\ + LIBAXL_REQUEST_GET_POINTER_MAPPING.3\ + LIBAXL_REQUEST_SET_MODIFIER_MAPPING.3\ + LIBAXL_REQUEST_GET_MODIFIER_MAPPING.3\ + LIBAXL_REQUEST_NO_OPERATION.3\ + struct_libaxl_reply_alloc_color.3\ + struct_libaxl_reply_alloc_color_cells.3\ + struct_libaxl_reply_alloc_color_planes.3\ + struct_libaxl_reply_alloc_named_color.3\ + struct_libaxl_reply_get_atom_name.3\ + struct_libaxl_reply_get_font_path.3\ + struct_libaxl_reply_get_geometry.3\ + struct_libaxl_reply_get_image.3\ + struct_libaxl_reply_get_input_focus.3\ + struct_libaxl_reply_get_keyboard_control.3\ + struct_libaxl_reply_get_keyboard_mapping.3\ + struct_libaxl_reply_get_modifier_mapping.3\ + struct_libaxl_reply_get_motion_events.3\ + struct_libaxl_reply_get_pointer_control.3\ + struct_libaxl_reply_get_pointer_mapping.3\ + struct_libaxl_reply_get_property.3\ + struct_libaxl_reply_get_screen_saver.3\ + struct_libaxl_reply_get_selection_owner.3\ + struct_libaxl_reply_get_window_attributes.3\ + struct_libaxl_reply_grab_keyboard.3\ + struct_libaxl_reply_grab_pointer.3\ + struct_libaxl_reply_intern_atom.3\ + struct_libaxl_reply_list_extensions.3\ + struct_libaxl_reply_list_fonts.3\ + struct_libaxl_reply_list_fonts_with_info.3\ + struct_libaxl_reply_list_hosts.3\ + struct_libaxl_reply_list_installed_colormaps.3\ + struct_libaxl_reply_list_properties.3\ + struct_libaxl_reply_lookup_color.3\ + struct_libaxl_reply_query_best_size.3\ + struct_libaxl_reply_query_colors.3\ + struct_libaxl_reply_query_extension.3\ + struct_libaxl_reply_query_font.3\ + struct_libaxl_reply_query_keymap.3\ + struct_libaxl_reply_query_pointer.3\ + struct_libaxl_reply_query_text_extents.3\ + struct_libaxl_reply_query_tree.3\ + struct_libaxl_reply_set_modifier_mapping.3\ + struct_libaxl_reply_set_pointer_mapping.3\ + struct_libaxl_reply_translate_coordinates.3\ + struct_libaxl_request_create_window.3\ + struct_libaxl_request_change_window_attributes.3\ + struct_libaxl_request_get_window_attributes.3\ + struct_libaxl_request_destroy_window.3\ + struct_libaxl_request_destroy_subwindows.3\ + struct_libaxl_request_change_save_set.3\ + struct_libaxl_request_reparent_window.3\ + struct_libaxl_request_map_window.3\ + struct_libaxl_request_map_subwindows.3\ + struct_libaxl_request_unmap_window.3\ + struct_libaxl_request_unmap_subwindows.3\ + struct_libaxl_request_configure_window.3\ + struct_libaxl_request_circulate_window.3\ + struct_libaxl_request_get_geometry.3\ + struct_libaxl_request_query_tree.3\ + struct_libaxl_request_intern_atom.3\ + struct_libaxl_request_get_atom_name.3\ + struct_libaxl_request_change_property.3\ + struct_libaxl_request_delete_property.3\ + struct_libaxl_request_get_property.3\ + struct_libaxl_request_list_properties.3\ + struct_libaxl_request_set_selection_owner.3\ + struct_libaxl_request_get_selection_owner.3\ + struct_libaxl_request_convert_selection.3\ + struct_libaxl_request_send_event.3\ + struct_libaxl_request_grab_pointer.3\ + struct_libaxl_request_ungrab_pointer.3\ + struct_libaxl_request_grab_button.3\ + struct_libaxl_request_ungrab_button.3\ + struct_libaxl_request_change_active_pointer_grab.3\ + struct_libaxl_request_grab_keyboard.3\ + struct_libaxl_request_ungrab_keyboard.3\ + struct_libaxl_request_grab_key.3\ + struct_libaxl_request_ungrab_key.3\ + struct_libaxl_request_allow_events.3\ + struct_libaxl_request_grab_server.3\ + struct_libaxl_request_ungrab_server.3\ + struct_libaxl_request_query_pointer.3\ + struct_libaxl_request_get_motion_events.3\ + struct_libaxl_request_translate_coordinates.3\ + struct_libaxl_request_warp_pointer.3\ + struct_libaxl_request_set_input_focus.3\ + struct_libaxl_request_get_input_focus.3\ + struct_libaxl_request_query_keymap.3\ + struct_libaxl_request_open_font.3\ + struct_libaxl_request_close_font.3\ + struct_libaxl_request_query_font.3\ + struct_libaxl_request_query_text_extents.3\ + struct_libaxl_request_list_fonts.3\ + struct_libaxl_request_list_fonts_with_info.3\ + struct_libaxl_request_set_font_path.3\ + struct_libaxl_request_get_font_path.3\ + struct_libaxl_request_create_pixmap.3\ + struct_libaxl_request_free_pixmap.3\ + struct_libaxl_request_create_gc.3\ + struct_libaxl_request_change_gc.3\ + struct_libaxl_request_copy_gc.3\ + struct_libaxl_request_set_dashes.3\ + struct_libaxl_request_set_clip_rectangles.3\ + struct_libaxl_request_free_gc.3\ + struct_libaxl_request_clear_area.3\ + struct_libaxl_request_copy_area.3\ + struct_libaxl_request_copy_plane.3\ + struct_libaxl_request_poly_point.3\ + struct_libaxl_request_poly_line.3\ + struct_libaxl_request_poly_segment.3\ + struct_libaxl_request_poly_rectangle.3\ + struct_libaxl_request_poly_arc.3\ + struct_libaxl_request_fill_poly.3\ + struct_libaxl_request_poly_fill_rectangle.3\ + struct_libaxl_request_poly_fill_arc.3\ + struct_libaxl_request_put_image.3\ + struct_libaxl_request_get_image.3\ + struct_libaxl_request_poly_text.3\ + struct_libaxl_request_poly_text.3\ + struct_libaxl_request_image_text.3\ + struct_libaxl_request_image_text.3\ + struct_libaxl_request_create_colormap.3\ + struct_libaxl_request_free_colormap.3\ + struct_libaxl_request_copy_colormap_and_free.3\ + struct_libaxl_request_install_colormap.3\ + struct_libaxl_request_uninstall_colormap.3\ + struct_libaxl_request_list_installed_colormaps.3\ + struct_libaxl_request_alloc_color.3\ + struct_libaxl_request_alloc_named_color.3\ + struct_libaxl_request_alloc_color_cells.3\ + struct_libaxl_request_alloc_color_planes.3\ + struct_libaxl_request_free_colors.3\ + struct_libaxl_request_store_colors.3\ + struct_libaxl_request_store_named_color.3\ + struct_libaxl_request_query_colors.3\ + struct_libaxl_request_lookup_color.3\ + struct_libaxl_request_create_cursor.3\ + struct_libaxl_request_create_glyph_cursor.3\ + struct_libaxl_request_free_cursor.3\ + struct_libaxl_request_recolor_cursor.3\ + struct_libaxl_request_query_best_size.3\ + struct_libaxl_request_query_extension.3\ + struct_libaxl_request_list_extensions.3\ + struct_libaxl_request_change_keyboard_mapping.3\ + struct_libaxl_request_get_keyboard_mapping.3\ + struct_libaxl_request_change_keyboard_control.3\ + struct_libaxl_request_get_keyboard_control.3\ + struct_libaxl_request_bell.3\ + struct_libaxl_request_change_pointer_control.3\ + struct_libaxl_request_get_pointer_control.3\ + struct_libaxl_request_set_screen_saver.3\ + struct_libaxl_request_get_screen_saver.3\ + struct_libaxl_request_change_hosts.3\ + struct_libaxl_request_list_hosts.3\ + struct_libaxl_request_set_access_control.3\ + struct_libaxl_request_set_close_down_mode.3\ + struct_libaxl_request_kill_client.3\ + struct_libaxl_request_rotate_properties.3\ + struct_libaxl_request_force_screen_saver.3\ + struct_libaxl_request_set_pointer_mapping.3\ + struct_libaxl_request_get_pointer_mapping.3\ + struct_libaxl_request_set_modifier_mapping.3\ + struct_libaxl_request_get_modifier_mapping.3\ + struct_libaxl_request_no_operation.3 + + +LOBJ = $(OBJ:.o=.lo) + +all: libaxl.a libaxl.$(LIBEXT) $(LIB_HDR) +$(OBJ): $(@:.o=.c) $(HDR) +$(LOBJ): $(@:.lo=.c) $(HDR) + +.c.o: + $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) + +.c.lo: + $(CC) -fPIC -c -o $@ $< $(CFLAGS) $(CPPFLAGS) + +libaxl-errors-structs.h: libaxl-errors.h + sed -n 's/^struct libaxl_error_\([^ \t]*\).*$$/\tstruct libaxl_error_\1 \1;/p' < libaxl-errors.h > $@ + +libaxl-events-structs.h: libaxl-events.h + sed -n 's/^struct libaxl_event_\([^ \t]*\).*$$/\tstruct libaxl_event_\1 \1;/p' < libaxl-events.h > $@ + +libaxl-replies-structs.h: libaxl-replies.h + sed -n 's/^struct libaxl_reply_\([^ \t]*\).*$$/\tstruct libaxl_reply_\1 \1;/p' < libaxl-replies.h > $@ + +libaxl-requests-ptr-structs.h: libaxl-requests.h + sed -n 's/^struct libaxl_request_\([^ \t]*\).*$$/\tconst struct libaxl_request_\1 \*\1;/p' < libaxl-requests.h > $@ + +libaxl-requests-structs.h: libaxl-requests.h + sed -n 's/^struct libaxl_request_\([^ \t]*\).*$$/\tstruct libaxl_request_\1 \1;/p' < libaxl-requests.h > $@ + +libaxl.a: $(OBJ) + $(AR) rc $@ $? + $(AR) s $@ + +libaxl.$(LIBEXT): $(LOBJ) + $(CC) $(LIBFLAGS) -o $@ $(LOBJ) $(LDFLAGS) + +install: libaxl.a libaxl.$(LIBEXT) + mkdir -p -- "$(DESTDIR)$(PREFIX)/include" + mkdir -p -- "$(DESTDIR)$(PREFIX)/lib" +# mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man0" +# mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man3" +# mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man7" + cp -- libaxl.h "$(DESTDIR)$(PREFIX)/include" + cp -- libaxl.a "$(DESTDIR)$(PREFIX)/lib" + cp -- libaxl.$(LIBEXT) "$(DESTDIR)$(PREFIX)/lib/libaxl.$(LIBMINOREXT)" + ln -sf -- libaxl.$(LIBMINOREXT) "$(DESTDIR)$(PREFIX)/lib/libaxl.$(LIBMAJOREXT)" + ln -sf -- libaxl.$(LIBMINOREXT) "$(DESTDIR)$(PREFIX)/lib/libaxl.$(LIBEXT)" +# cp -P -- $(MAN0) "$(DESTDIR)$(MANPREFIX)/man0" +# cp -P -- $(MAN3) "$(DESTDIR)$(MANPREFIX)/man3" +# cp -P -- $(MAN7) "$(DESTDIR)$(MANPREFIX)/man7" + +uninstall: + -cd -- "$(DESTDIR)$(PREFIX)/include/" && rm -f -- $(LIB_HDR) + -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libaxl.a" + -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libaxl.$(LIBMINOREXT)" + -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libaxl.$(LIBMAJOREXT)" + -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libaxl.$(LIBEXT)" +# -cd -- "$(DESTDIR)$(MANPREFIX)/man0/" && rm -f -- $(MAN0) +# -cd -- "$(DESTDIR)$(MANPREFIX)/man3/" && rm -f -- $(MAN3) +# -cd -- "$(DESTDIR)$(MANPREFIX)/man7/" && rm -f -- $(MAN7) + +clean: + -rm -f -- *.o *.lo *.a *.su *.$(LIBEXT) libaxl-*-structs.h + +.SUFFIXES: +.SUFFIXES: .lo .o .c + +.PHONY: all install uninstall clean @@ -0,0 +1,2 @@ +Man pages: check italic–bold consistency +Man pages: check values of constants diff --git a/common.h b/common.h new file mode 100644 index 0000000..2a46bfc --- /dev/null +++ b/common.h @@ -0,0 +1,133 @@ +/* See LICENSE file for copyright and license details. */ +#include "libaxl.h" + +#include <arpa/inet.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <ctype.h> +#include <errno.h> +#include <fcntl.h> +#include <limits.h> +#include <stdatomic.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +#if defined(__linux__) +# include "internal-linux.h" +#endif + +#if !defined(NO_LIBERROR) +# include <liberror.h> +#else +# define liberror_save_backtrace(...) ((void) 0) +# define liberror_set_error(...) ((void) 0) +# define liberror_set_error_errno(...) ((void) 0) +# define liberror_reset_error() ((void) 0) +#endif + +#if !defined(NO_LIBERROR) && !defined(NO_LIBERROR_LIBC) +# include <liberror-libc.h> +#else +# if defined(NO_LIBERROR) +# define __checked_ptr(X, _FUN) X +# define __checked_ssize_t(X, _FUN) X +# else +# define DEFINE_CHECKED(TYPE, NAME)\ + static inline TYPE\ + NAME(TYPE ret, const char *func)\ + {\ + if (!ret)\ + liberror_set_error_errno(strerror(errno), func, errno);\ + return ret;\ + } +DEFINE_CHECKED(void *, __checked_ptr) +DEFINE_CHECKED(ssize_t, __checked_ssize_t) +# endif +# define liberror_malloc(N) __checked_ptr(malloc(N), "malloc") +# define liberror_realloc(P, N) __checked_ptr(realloc(P, N), "realloc") +# define liberror_send(FD, B, N, F, _NAM) __checked_ssize_t(send(FD, B, N, F), "send") +# define liberror_recv(FD, B, N, F, _NAM) __checked_ssize_t(recv(FD, B, N, F), "recv") +# define liberror_send_failed(FD, B, N, F, _NAM) ((void) 0) +# define liberror_recv_failed(FD, B, N, F, _NAM) ((void) 0) +#endif + +#define X_TCP_PORT 6000 + +struct libaxl_connection { + int fd; + uint16_t last_seqnum; + LIBAXL_CONNECTION_RWLOCK; /* INIT_LIBAXL_CONNECTION_RWLOCK(&.) */ + LIBAXL_CONTEXT *pending_out; + size_t in_progress; + size_t in_buf_size; + char *in_buf; + uint32_t xid_base; /* TODO information for these are send by server when connecting { */ + uint32_t xid_bits; + uint32_t xid_shift; /* } */ + uint8_t request_map[1UL << 16]; +}; + +struct libaxl_context { + LIBAXL_CONNECTION *conn; + size_t refcount; + LIBAXL_CONTEXT *next_pending_out; + size_t out_length; + size_t out_progress; + size_t out_buf_size; + char *out_buf; + size_t in_buf_size; + char *in_buf; +}; + +#define ALIGN(VP, T)\ + do {\ + if (*(VP) & (_Alignof(T) - 1)) {\ + *(VP) |= _Alignof(T) - 1;\ + *(VP) += 1;\ + }\ + } while (0) + +#if INT_MIN + 1 == -INT_MAX +# define TWOS_COMPLEMENT8(VP) ((void)0) +# define TWOS_COMPLEMENT16(VP) ((void)0) +# define TWOS_COMPLEMENT32(VP) ((void)0) +#else +# define TWOS_COMPLEMENT8(VP)\ + do {\ + if (*(int8_t *)(VP) < 0)\ + *(uint8_t *)(VP) = (uint16_t)~(uint16_t)(-*(int16_t *)(VP) - 1)\ + } while (0) +# define TWOS_COMPLEMENT16(VP)\ + do {\ + if (*(int16_t *)(VP) < 0)\ + *(uint16_t *)(VP) = (uint16_t)~(uint16_t)(-*(int16_t *)(VP) - 1)\ + } while (0) +# define TWOS_COMPLEMENT32(VP)\ + do {\ + if (*(int32_t *)(VP) < 0)\ + *(uint32_t *)(VP) = (uint32_t)~(uint32_t)(-*(int32_t *)(VP) - 1)\ + } while (0) +#endif + +#if INT_MIN + 1 == -INT_MAX +# define UNTWOS_COMPLEMENT8(VP) ((void)0) +# define UNTWOS_COMPLEMENT16(VP) ((void)0) +# define UNTWOS_COMPLEMENT32(VP) ((void)0) +#else +# define UNTWOS_COMPLEMENT8(VP)\ + do {\ + if (*(uint8_t *)(VP) & ((uint8_t)1 << 7))\ + *(int8_t *)(VP) = -(int8_t)(~*(uint8_t *)(VP) + (uint8_t)1);\ + } while (0) +# define UNTWOS_COMPLEMENT16(VP)\ + do {\ + if (*(uint16_t *)(VP) & ((uint16_t)1 << 15))\ + *(int16_t *)(VP) = -(int16_t)(~*(uint16_t *)(VP) + (uint16_t)1);\ + } while (0) +# define UNTWOS_COMPLEMENT32(VP)\ + do {\ + if (*(uint32_t *)(VP) & ((uint32_t)1 << 31))\ + *(int32_t *)(VP) = -(int32_t)(~*(uint32_t *)(VP) + (uint32_t)1);\ + } while (0) +#endif diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..7443627 --- /dev/null +++ b/config.mk @@ -0,0 +1,8 @@ +PREFIX = /usr +MANPREFIX = $(PREFIX)/share/man + +CC = cc + +CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_GNU_SOURCE -DNO_LIBERROR +CFLAGS = -std=c17 -Wall -g +#LDFLAGS = -lerror -lerror-libc diff --git a/internal-linux.h b/internal-linux.h new file mode 100644 index 0000000..4fb2ee3 --- /dev/null +++ b/internal-linux.h @@ -0,0 +1,38 @@ +/* See LICENSE file for copyright and license details. */ + +#include <linux/futex.h> +#include <sys/syscall.h> + +#include "internal-llmutex.h" + + +typedef volatile _Atomic uint32_t MUTEX; +_Static_assert(sizeof(MUTEX) == sizeof(uint32_t)); + + +#define INIT_MUTEX(MUTEX)\ + ((void)0) /* TODO atomic_init(&(MUTEX), 0) */ + +#define _TRYLOCK(MUTEX)\ + !atomic_exchange(&(MUTEX), 1) + +#define _LOCK(MUTEX)\ + do {\ + while (!_TRYLOCK(MUTEX))\ + _WAIT(MUTEX);\ + } while (0) + +#define _UNLOCK(MUTEX)\ + do {\ + atomic_store(&(MUTEX), 0);\ + if (syscall(SYS_futex, &(MUTEX), FUTEX_PRIVATE_FLAG | FUTEX_WAKE, INT_MAX, NULL, 0, 0) < 0) {\ + /* TODO */\ + }\ + } while (0) + +#define _WAIT(MUTEX)\ + do {\ + if (syscall(SYS_futex, &(MUTEX), FUTEX_PRIVATE_FLAG | FUTEX_WAIT, 1, NULL, 0, 0) < 0) {\ + /* TODO */\ + }\ + } while (0) diff --git a/internal-llmutex.h b/internal-llmutex.h new file mode 100644 index 0000000..b75a449 --- /dev/null +++ b/internal-llmutex.h @@ -0,0 +1,74 @@ +/* See LICENSE file for copyright and license details. */ + +#define LIBAXL_CONNECTION_RWLOCK\ + volatile _Atomic char nrguard_send;\ + volatile _Atomic char nrguard_recv;\ + MUTEX exguard_send;\ + MUTEX exguard_recv;\ + MUTEX exwait_send;\ + MUTEX exwait_recv;\ + volatile size_t nreaders_send;\ + volatile size_t nreaders_recv + +#define INIT_LIBAXL_CONNECTION_RWLOCK(CONN)\ + do {\ + atomic_init(&(CONN)->nrguard_send, 0);\ + atomic_init(&(CONN)->nrguard_recv, 0);\ + INIT_MUTEX((CONN)->exguard_send);\ + INIT_MUTEX((CONN)->exguard_recv);\ + INIT_MUTEX((CONN)->exwait_send);\ + INIT_MUTEX((CONN)->exwait_recv);\ + (CONN)->nreaders_send = 0;\ + (CONN)->nreaders_recv = 0;\ + } while (0) + +#define WLOCK_CONNECTION_(CONN, SUFFIX) _LOCK((CONN)->exguard_##SUFFIX) +#define WTRYLOCK_CONNECTION_(CONN, SUFFIX) _TRYLOCK((CONN)->exguard_##SUFFIX) +#define WUNLOCK_CONNECTION_(CONN, SUFFIX) _UNLOCK((CONN)->exguard_##SUFFIX) + +#define RLOCK_CONNECTION_(CONN, SUFFIX)\ + do {\ + char old_val__;\ + do {\ + do {\ + old_val__ = atomic_fetch_or(&(CONN)->nrguard_##SUFFIX, 1);\ + } while (old_val__ == 1);\ + if (old_val__ == 0) {\ + if (!(CONN)->nreaders_##SUFFIX++) {\ + if (WTRYLOCK_CONNECTION_(CONN, SUFFIX)) {\ + atomic_store(&(CONN)->nrguard_##SUFFIX, 2);\ + } else {\ + _LOCK((CONN)->exwait_##SUFFIX);\ + atomic_store(&(CONN)->nrguard_##SUFFIX, 2);\ + WLOCK_CONNECTION_(CONN, SUFFIX);\ + _UNLOCK((CONN)->exwait_##SUFFIX);\ + }\ + }\ + atomic_store(&(CONN)->nrguard_##SUFFIX, 0);\ + break;\ + } else {\ + _WAIT((CONN)->exwait_##SUFFIX);\ + }\ + } while (old_val__ == 2);\ + } while (0) + +#define RUNLOCK_CONNECTION_(CONN, SUFFIX)\ + do {\ + char old_val__;\ + do {\ + old_val__ = atomic_fetch_or(&(CONN)->nrguard_##SUFFIX, 1);\ + } while (old_val__);\ + if (!--(CONN)->nreaders_##SUFFIX)\ + WUNLOCK_CONNECTION_((CONN), SUFFIX);\ + atomic_store(&(CONN)->nrguard_##SUFFIX, 0);\ + } while (0) + +#define WLOCK_CONNECTION_SEND(CONN) WLOCK_CONNECTION_(CONN, send) +#define WUNLOCK_CONNECTION_SEND(CONN) WUNLOCK_CONNECTION_(CONN, send) +#define RLOCK_CONNECTION_SEND(CONN) RLOCK_CONNECTION_(CONN, send) +#define RUNLOCK_CONNECTION_SEND(CONN) RUNLOCK_CONNECTION_(CONN, send) + +#define WLOCK_CONNECTION_RECV(CONN) WLOCK_CONNECTION_(CONN, recv) +#define WUNLOCK_CONNECTION_RECV(CONN) WUNLOCK_CONNECTION_(CONN, recv) +#define RLOCK_CONNECTION_RECV(CONN) RLOCK_CONNECTION_(CONN, recv) +#define RUNLOCK_CONNECTION_RECV(CONN) RUNLOCK_CONNECTION_(CONN, recv) diff --git a/libaxl-atoms.h b/libaxl-atoms.h new file mode 100644 index 0000000..140d769 --- /dev/null +++ b/libaxl-atoms.h @@ -0,0 +1,70 @@ +/* See LICENSE file for copyright and license details. */ + +#define LIBAXL_ATOM_PRIMARY 1 +#define LIBAXL_ATOM_SECONDARY 2 +#define LIBAXL_ATOM_ARC 3 +#define LIBAXL_ATOM_ATOM 4 +#define LIBAXL_ATOM_BITMAP 5 +#define LIBAXL_ATOM_CARDINAL 6 +#define LIBAXL_ATOM_COLORMAP 7 +#define LIBAXL_ATOM_CURSOR 8 +#define LIBAXL_ATOM_CUT_BUFFER0 9 +#define LIBAXL_ATOM_CUT_BUFFER1 10 +#define LIBAXL_ATOM_CUT_BUFFER2 11 +#define LIBAXL_ATOM_CUT_BUFFER3 12 +#define LIBAXL_ATOM_CUT_BUFFER4 13 +#define LIBAXL_ATOM_CUT_BUFFER5 14 +#define LIBAXL_ATOM_CUT_BUFFER6 15 +#define LIBAXL_ATOM_CUT_BUFFER7 16 +#define LIBAXL_ATOM_DRAWABLE 17 +#define LIBAXL_ATOM_FONT 18 +#define LIBAXL_ATOM_INTEGER 19 +#define LIBAXL_ATOM_PIXMAP 20 +#define LIBAXL_ATOM_POINT 21 +#define LIBAXL_ATOM_RECTANGLE 22 +#define LIBAXL_ATOM_RESOURCE_MANAGER 23 +#define LIBAXL_ATOM_RGB_COLOR_MAP 24 +#define LIBAXL_ATOM_RGB_BEST_MAP 25 +#define LIBAXL_ATOM_RGB_BLUE_MAP 26 +#define LIBAXL_ATOM_RGB_DEFAULT_MAP 27 +#define LIBAXL_ATOM_RGB_GRAY_MAP 28 +#define LIBAXL_ATOM_RGB_GREEN_MAP 29 +#define LIBAXL_ATOM_RGB_RED_MAP 30 +#define LIBAXL_ATOM_STRING 31 +#define LIBAXL_ATOM_VISUALID 32 +#define LIBAXL_ATOM_WINDOW 33 +#define LIBAXL_ATOM_WM_COMMAND 34 +#define LIBAXL_ATOM_WM_HINTS 35 +#define LIBAXL_ATOM_WM_CLIENT_MACHINE 36 +#define LIBAXL_ATOM_WM_ICON_NAME 37 +#define LIBAXL_ATOM_WM_ICON_SIZE 38 +#define LIBAXL_ATOM_WM_NAME 39 +#define LIBAXL_ATOM_WM_NORMAL_HINTS 40 +#define LIBAXL_ATOM_WM_SIZE_HINTS 41 +#define LIBAXL_ATOM_WM_ZOOM_HINTS 42 +#define LIBAXL_ATOM_MIN_SPACE 43 +#define LIBAXL_ATOM_NORM_SPACE 44 +#define LIBAXL_ATOM_MAX_SPACE 45 +#define LIBAXL_ATOM_END_SPACE 46 +#define LIBAXL_ATOM_SUPERSCRIPT_X 47 +#define LIBAXL_ATOM_SUPERSCRIPT_Y 48 +#define LIBAXL_ATOM_SUBSCRIPT_X 49 +#define LIBAXL_ATOM_SUBSCRIPT_Y 50 +#define LIBAXL_ATOM_UNDERLINE_POSITION 51 +#define LIBAXL_ATOM_UNDERLINE_THICKNESS 52 +#define LIBAXL_ATOM_STRIKEOUT_ASCENT 53 +#define LIBAXL_ATOM_STRIKEOUT_DESCENT 54 +#define LIBAXL_ATOM_ITALIC_ANGLE 55 +#define LIBAXL_ATOM_X_HEIGHT 56 +#define LIBAXL_ATOM_QUAD_WIDTH 57 +#define LIBAXL_ATOM_WEIGHT 58 +#define LIBAXL_ATOM_POINT_SIZE 59 +#define LIBAXL_ATOM_RESOLUTION 60 +#define LIBAXL_ATOM_COPYRIGHT 61 +#define LIBAXL_ATOM_NOTICE 62 +#define LIBAXL_ATOM_FONT_NAME 63 +#define LIBAXL_ATOM_FAMILY_NAME 64 +#define LIBAXL_ATOM_FULL_NAME 65 +#define LIBAXL_ATOM_CAP_HEIGHT 66 +#define LIBAXL_ATOM_WM_CLASS 67 +#define LIBAXL_ATOM_WM_TRANSIENT_FOR 68 diff --git a/libaxl-consts.h b/libaxl-consts.h new file mode 100644 index 0000000..26c1933 --- /dev/null +++ b/libaxl-consts.h @@ -0,0 +1,257 @@ +/* See LICENSE file for copyright and license details. */ + +/* libaxl_keycode_t */ +#define LIBAXL_ANY_KEY 0 + +/* libaxl_bool_t */ +#define LIBAXL_FALSE 0 +#define LIBAXL_TRUE 1 + +/* libaxl_timestamp_t */ +#define LIBAXL_CURRENT_TIME 0 + +/* struct libaxl_host.family + struct libaxl_request_change_hosts.family */ +#define LIBAXL_INTERNET 0 /* IPv4 */ +#define LIBAXL_DECNET 1 /* DECnet */ +#define LIBAXL_CHAOS 2 /* Chaos */ +#define LIBAXL_SERVER_INTERPRETED 5 /* Server Interpreted */ +#define LIBAXL_INTERNET_V6 6 /* IPv6 */ + +/* union libaxl_text_item8 + union libaxl_text_item16 */ +#define LIBAXL_FONT_SHIFT_INDICATOR 255 + +/* struct libaxl_coloritem.flags + struct libaxl_request_store_named_color.flags */ +#define LIBAXL_RED 0x01 +#define LIBAXL_GREEN 0x02 +#define LIBAXL_BLUE 0x04 + +/* struct libaxl_request_set_clip_rectangles.ordering */ +#define LIBAXL_UNSORTED 0 +#define LIBAXL_YSORTED 1 +#define LIBAXL_YXSORTED 2 +#define LIBAXL_YXBANDED 3 + +/* struct libaxl_request_force_screen_saver.mode */ +#define LIBAXL_RESET 0 +#define LIBAXL_ACTIVATE 1 + +/* struct libaxl_request_query_best_size.class */ +#define LIBAXL_CURSOR 0 +#define LIBAXL_TILE 1 +#define LIBAXL_STIPPLE 2 + +/* struct libaxl_request_circulate_windo.direction */ +#define LIBAXL_RAISE_LOWEST 0 +#define LIBAXL_LOWER_HIGHEST 1 + +/* struct libaxl_request_allow_events.mode */ +#define LIBAXL_ASYNC_POINTER 0 +#define LIBAXL_SYNC_POINTER 1 +#define LIBAXL_REPLAY_POINTER 2 +#define LIBAXL_ASYNC_KEYBOARD 3 +#define LIBAXL_SYNC_KEYBOARD 4 +#define LIBAXL_REPLAY_KEYBOARD 5 +#define LIBAXL_ASYNC_BOTH 6 +#define LIBAXL_SYNC_BOTH 7 + +/* struct libaxl_request_change_property.mode */ +#define LIBAXL_REPLACE 0 +#define LIBAXL_PREPEND 1 +#define LIBAXL_APPEND 2 + +/* struct libaxl_request_send_event.destination */ +#define LIBAXL_POINTER_WINDOW 0 +#define LIBAXL_INPUT_FOCUS 1 + +/* struct libaxl_event_property_notify.state */ +#define LIBAXL_NEW_VALUE 0 +#define LIBAXL_DELETED 1 + +/* struct libaxl_event_colormap_notify.state */ +#define LIBAXL_UNINSTALLED 0 +#define LIBAXL_INSTALLED 1 + +/* struct libaxl_event_mapping_notify.request */ +#define LIBAXL_MODIFIER 0 +#define LIBAXL_KEYBOARD 1 +#define LIBAXL_POINTER 2 + +/* circatulation place */ +#define LIBAXL_TOP 0 +#define LIBAXL_BOTTOM 1 + +/* cap style */ +#define LIBAXL_CAP_NOT_LAST 0 +#define LIBAXL_CAP_BUTT 1 +#define LIBAXL_CAP_ROUND 2 +#define LIBAXL_CAP_PROJECTING 3 + +/* join style */ +#define LIBAXL_JOIN_MITER 0 +#define LIBAXL_JOIN_ROUND 1 +#define LIBAXL_JOIN_BEVEL 2 + +/* map state */ +#define LIBAXL_UNMAPPED 0 +#define LIBAXL_UNVIEWABLE 1 +#define LIBAXL_VIEWABLE 2 + +/* gcontext function */ +#define LIBAXL_CLEAR 0 +#define LIBAXL_AND 1 +#define LIBAXL_AND_REVERSE 2 +#define LIBAXL_COPY 3 +#define LIBAXL_AND_INVERTED 4 +#define LIBAXL_NO_OP 5 +#define LIBAXL_XOR 6 +#define LIBAXL_OR 7 +#define LIBAXL_NOR 8 +#define LIBAXL_EQUIV 9 +#define LIBAXL_INVERT 10 +#define LIBAXL_OR_REVERSE 11 +#define LIBAXL_COPY_INVERTED 12 +#define LIBAXL_OR_INVERTED 13 +#define LIBAXL_NAND 14 +#define LIBAXL_SET 15 + +/* close down mode */ +#define LIBAXL_DESTROY 0 +#define LIBAXL_RETAIN_PERMANENT 1 +#define LIBAXL_RETAIN_TEMPORARY 2 + +/* visibility state */ +#define LIBAXL_UNOBSCURED 0 +#define LIBAXL_PARTIALLY_OBSCURED 1 +#define LIBAXL_FULLY_OBSCURED 2 + +/* bitgravity and wingravity */ +#define LIBAXL_FORGET 0 /* bitgravity */ +#define LIBAXL_UNMAP 0 /* wingravity */ +#define LIBAXL_NORTH_WEST 1 +#define LIBAXL_NORTH 2 +#define LIBAXL_NORTH_EAST 3 +#define LIBAXL_WEST 4 +#define LIBAXL_CENTER 5 +#define LIBAXL_EAST 6 +#define LIBAXL_SOUTH_WEST 7 +#define LIBAXL_SOUTH 8 +#define LIBAXL_SOUTH_EAST 9 +#define LIBAXL_STATIC 10 + +/* synchronicity */ +#define LIBAXL_SYNCHRONOUS 0 +#define LIBAXL_ASYNCHRONOUS 1 + +/* image formats */ +#define LIBAXL_BITMAP 0 +#define LIBAXL_XYPIXMAP 1 +#define LIBAXL_ZPIXMAP 2 + +/* buttons */ +#define LIBAXL_ANY_BUTTON 0 + +/* draw directions */ +#define LIBAXL_LEFT_TO_RIGHT 0 +#define LIBAXL_RIGHT_TO_LEFT 1 + +/* fill rule */ +#define LIBAXL_EVEN_ODD 0 +#define LIBAXL_WINDING 1 + +/* fill style and line style */ +#define LIBAXL_SOLID 0 +#define LIBAXL_TILED 1 /* fill style */ +#define LIBAXL_STIPPLED 2 /* fill style */ +#define LIBAXL_OPAQUE_STIPPLED 3 /* fill style */ +#define LIBAXL_ON_OFF_DASH 1 /* line style */ +#define LIBAXL_DOUBLE_DASH 2 /* line style */ + +/* polygon shape */ +#define LIBAXL_COMPLEX 0 +#define LIBAXL_NONCONVEX 1 +#define LIBAXL_CONVEX 2 + +/* arc mode */ +#define LIBAXL_CHORD 0 +#define LIBAXL_PIE_SLICE 1 + +/* grab mode (includes LIBAXL_NORMAL) */ +#define LIBAXL_GRAB 1 +#define LIBAXL_UNGRAB 2 +#define LIBAXL_WHILE_GRABBED 3 + +/* grab status (includes LIBAXL_SUCCESS) */ +#define LIBAXL_ALREADY_GRABBED 1 +#define LIBAXL_INVALID_TIME 2 +#define LIBAXL_NOT_VIEWABLE 3 +#define LIBAXL_FROZEN 4 + +/* coordinate mode */ +#define LIBAXL_ORIGIN 0 +#define LIBAXL_PREVIOUS 1 + +/* enabled status */ +#define LIBAXL_DISABLE 0 +#define LIBAXL_DISABLED 0 +#define LIBAXL_ENABLE 1 +#define LIBAXL_ENABLED 1 + +/* window class */ +#define LIBAXL_INPUT_OUTPUT 1 +#define LIBAXL_INPUT_ONLY 2 + +/* subwindow mode */ +#define LIBAXL_CLIP_BY_CHILDREN 0 +#define LIBAXL_INCLUDE_INFERIORS 1 + +/* backing store */ +#define LIBAXL_NOT_USEFUL 0 +#define LIBAXL_WHEN_MAPPED 1 +#define LIBAXL_ALWAYS 2 + +/* change mode */ +#define LIBAXL_INSERT 0 +#define LIBAXL_DELETE 1 + +/* stack mode */ +#define LIBAXL_ABOVE 0 +#define LIBAXL_BELOW 1 +#define LIBAXL_TOP_IF 2 +#define LIBAXL_BOTTOM_IF 3 +#define LIBAXL_OPPOSITE 4 + +/* pointer window detail and window focus details */ +#define LIBAXL_ANCESTOR 0 +#define LIBAXL_VIRTUAL 1 +#define LIBAXL_INFERIOR 2 +#define LIBAXL_NONLINEAR 3 +#define LIBAXL_NONLINEAR_VIRTUAL 4 +/* window focus details */ +#define LIBAXL_FOCUS_POINTER 5 /* Just called Pointer in the specification*/ +#define LIBAXL_FOCUS_POINTER_ROOT 6 /* Just called PointerRoot in the specification*/ +#define LIBAXL_FOCUS_NONE 7 /* Just called None in the specification*/ + +/* misc. */ +#define LIBAXL_ANY_PROPERTY_TYPE 0 +#define LIBAXL_ALL_TEMPORARY 0 +#define LIBAXL_PARENT_RELATIVE 1 +#define LIBAXL_HINT 1 +#define LIBAXL_ALL 1 + +/* generic */ +#define LIBAXL_NONE 0 +#define LIBAXL_NORMAL 0 +#define LIBAXL_SUCCESS 0 +#define LIBAXL_BUSY 1 +#define LIBAXL_FAILED 2 +#define LIBAXL_NO 0 +#define LIBAXL_YES 1 +#define LIBAXL_DEFAULT 2 +#define LIBAXL_OFF 0 +#define LIBAXL_ON 1 +#define LIBAXL_COPY_FROM_PARENT 0 +#define LIBAXL_POINTER_ROOT 1 +#define LIBAXL_PARENT 2 diff --git a/libaxl-errors.h b/libaxl-errors.h new file mode 100644 index 0000000..c1b8a92 --- /dev/null +++ b/libaxl-errors.h @@ -0,0 +1,202 @@ +/* See LICENSE file for copyright and license details. */ + +#define LIBAXL_ERROR 0 + +struct libaxl_error_request { +#define LIBAXL_ERROR_REQUEST 1 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t __unused1; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_value { +#define LIBAXL_ERROR_VALUE 2 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t bad_value; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_window { +#define LIBAXL_ERROR_WINDOW 3 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t bad_resource_id; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_pixmap { +#define LIBAXL_ERROR_PIXMAP 4 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t bad_resource_id; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_atom { +#define LIBAXL_ERROR_ATOM 5 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t bad_resource_id; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_cursor { +#define LIBAXL_ERROR_CURSOR 6 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t bad_resource_id; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_font { +#define LIBAXL_ERROR_FONT 7 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t bad_resource_id; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_match { +#define LIBAXL_ERROR_MATCH 8 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t __unused1; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_drawable { +#define LIBAXL_ERROR_DRAWABLE 9 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t bad_resource_id; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_access { +#define LIBAXL_ERROR_ACCESS 10 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t __unused1; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_alloc { +#define LIBAXL_ERROR_ALLOC 11 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t __unused1; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_colormap { +#define LIBAXL_ERROR_COLORMAP 12 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t bad_resource_id; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_gcontext { +#define LIBAXL_ERROR_GCONTEXT 13 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t bad_resource_id; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_id_choice { +#define LIBAXL_ERROR_ID_CHOICE 14 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t bad_resource_id; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_name { +#define LIBAXL_ERROR_NAME 15 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t __unused1; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_length { +#define LIBAXL_ERROR_LENGTH 16 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t __unused1; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_error_implementation { +#define LIBAXL_ERROR_IMPLEMENTATION 17 + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t __unused1; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +union libaxl_error { + struct { + uint8_t __zero; + uint8_t code; + uint16_t sequence_number; + uint32_t __detail; + uint16_t minor_opcode; + uint8_t major_opcode; + }; +#include "libaxl-errors-structs.h" +}; diff --git a/libaxl-events.h b/libaxl-events.h new file mode 100644 index 0000000..83f696e --- /dev/null +++ b/libaxl-events.h @@ -0,0 +1,534 @@ +/* See LICENSE file for copyright and license details. */ + +struct libaxl_event_key_press { +#define LIBAXL_EVENT_KEY_PRESS 2 + uint8_t code; + libaxl_keycode_t detail; + uint16_t sequence_number; + libaxl_timestamp_t time; + libaxl_window_t root; + libaxl_window_t event; + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + libaxl_keybutmask_t state; + libaxl_bool_t same_screen; + uint8_t __unused[1]; +}; + +struct libaxl_event_key_release { +#define LIBAXL_EVENT_KEY_RELEASE 3 + uint8_t code; + libaxl_keycode_t detail; + uint16_t sequence_number; + libaxl_timestamp_t time; + libaxl_window_t root; + libaxl_window_t event; + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + libaxl_keybutmask_t state; + libaxl_bool_t same_screen; + uint8_t __unused[1]; +}; + +struct libaxl_event_key_press_release { + /* key_{press,release} */ + uint8_t code; + libaxl_keycode_t detail; + uint16_t sequence_number; + libaxl_timestamp_t time; + libaxl_window_t root; + libaxl_window_t event; + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + libaxl_keybutmask_t state; + libaxl_bool_t same_screen; + uint8_t __unused[1]; +}; + +struct libaxl_event_button_press { +#define LIBAXL_EVENT_BUTTON_PRESS 4 + uint8_t code; + libaxl_button_t detail; + uint16_t sequence_number; + libaxl_timestamp_t time; + libaxl_window_t root; + libaxl_window_t event; + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + libaxl_keybutmask_t state; + libaxl_bool_t same_screen; + uint8_t __unused[1]; +}; + +struct libaxl_event_button_release { +#define LIBAXL_EVENT_BUTTON_RELEASE 5 + uint8_t code; + libaxl_button_t detail; + uint16_t sequence_number; + libaxl_timestamp_t time; + libaxl_window_t root; + libaxl_window_t event; + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + libaxl_keybutmask_t state; + libaxl_bool_t same_screen; + uint8_t __unused[1]; +}; + +struct libaxl_event_button_press_release { + /* button_{press,release} */ + uint8_t code; + libaxl_button_t detail; + uint16_t sequence_number; + libaxl_timestamp_t time; + libaxl_window_t root; + libaxl_window_t event; + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + libaxl_keybutmask_t state; + libaxl_bool_t same_screen; + uint8_t __unused[1]; +}; + +struct libaxl_event_motion_notify { +#define LIBAXL_EVENT_MOTION_NOTIFY 6 + uint8_t code; + uint8_t detail; /* LIBAXL_NORMAL or LIBAXL_HINT */ + uint16_t sequence_number; + libaxl_timestamp_t time; + libaxl_window_t root; + libaxl_window_t event; + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + libaxl_keybutmask_t state; + libaxl_bool_t same_screen; + uint8_t __unused[1]; +}; + +struct libaxl_event_input_device_event { + /* {key,button}_{press,release}, motion_notify */ + uint8_t code; + uint8_t detail; + uint16_t sequence_number; + libaxl_timestamp_t time; + libaxl_window_t root; + libaxl_window_t event; + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + libaxl_keybutmask_t state; + libaxl_bool_t same_screen; + uint8_t __unused[1]; +}; + +struct libaxl_event_enter_notify { +#define LIBAXL_EVENT_ENTER_NOTIFY 7 + uint8_t code; + uint8_t detail; /* See "pointer window details" in libaxl-consts.h */ + uint16_t sequence_number; + libaxl_timestamp_t time; + libaxl_window_t root; + libaxl_window_t event; + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + libaxl_keybutmask_t state; + uint8_t mode; /* LIBAXL_NORMAL, LIBAXL_GRAB, or LIBAXL_UNGRAB */ + uint8_t flags; /* TODO #x01 = Focus, #x02 = Same-screen */ +}; + +struct libaxl_event_leave_notify { +#define LIBAXL_EVENT_LEAVE_NOTIFY 8 + uint8_t code; + uint8_t detail; /* See "pointer window details" in libaxl-consts.h */ + uint16_t sequence_number; + libaxl_timestamp_t time; + libaxl_window_t root; + libaxl_window_t event; + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + libaxl_keybutmask_t state; + uint8_t mode; /* LIBAXL_NORMAL, LIBAXL_GRAB, or LIBAXL_UNGRAB */ + uint8_t flags; /* TODO #x01 = Focus, #x02 = Same-screen */ +}; + +struct libaxl_event_pointer_window_event { + /* {enter,leave}_notify */ + uint8_t code; + uint8_t detail; /* See "pointer window details" in libaxl-consts.h */ + uint16_t sequence_number; + libaxl_timestamp_t time; + libaxl_window_t root; + libaxl_window_t event; + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t root_x; + int16_t root_y; + int16_t event_x; + int16_t event_y; + libaxl_keybutmask_t state; + uint8_t mode; /* LIBAXL_NORMAL, LIBAXL_GRAB, or LIBAXL_UNGRAB */ + uint8_t flags; /* TODO #x01 = Focus, #x02 = Same-screen */ +}; + +struct libaxl_event_focus_in { +#define LIBAXL_EVENT_FOCUS_IN 9 + uint8_t code; + uint8_t detail; /* See "window focus details" in libaxl-consts.h (Beware of namespacing!) */ + uint16_t sequence_number; + libaxl_window_t window; + uint8_t mode; /* LIBAXL_NORMAL, LIBAXL_GRAB, LIBAXL_UNGRAB, or LIBAXL_WHILE_GRABBED */ + uint8_t __unused[23]; +}; + +struct libaxl_event_focus_out { +#define LIBAXL_EVENT_FOCUS_OUT 10 + uint8_t code; + uint8_t detail; /* See "window focus details" in libaxl-consts.h (Beware of namespacing!) */ + uint16_t sequence_number; + libaxl_window_t window; + uint8_t mode; /* LIBAXL_NORMAL, LIBAXL_GRAB, LIBAXL_UNGRAB, or LIBAXL_WHILE_GRABBED */ + uint8_t __unused[23]; +}; + +struct libaxl_event_input_focus_event { + /* focus_{in,out} */ + uint8_t code; + uint8_t detail; /* See "window focus details" in libaxl-consts.h (Beware of namespacing!) */ + uint16_t sequence_number; + libaxl_window_t window; + uint8_t mode; /* LIBAXL_NORMAL, LIBAXL_GRAB, LIBAXL_UNGRAB, or LIBAXL_WHILE_GRABBED */ + uint8_t __unused[23]; +}; + +struct libaxl_event_keymap_notify { +#define LIBAXL_EVENT_KEYMAP_NOTIFY 11 + uint8_t code; + uint8_t keys[31]; /* Byte for keycodes 0-7, which are unused, is omitted */ +}; + +struct libaxl_event_expose { +#define LIBAXL_EVENT_EXPOSE 12 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t window; + uint16_t x; + uint16_t y; + uint16_t width; + uint16_t height; + uint16_t count; + uint8_t __unused[14]; +}; + +struct libaxl_event_graphics_exposure { +#define LIBAXL_EVENT_GRAPHICS_EXPOSURE 13 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_drawable_t drawable; + uint16_t x; + uint16_t y; + uint16_t width; + uint16_t height; + uint16_t minor_opcode; + uint16_t count; + uint8_t major_opcode; + uint8_t __unused[11]; +}; + +struct libaxl_event_no_exposure { +#define LIBAXL_EVENT_NO_EXPOSURE 14 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_drawable_t drawable; + uint16_t minor_opcode; + uint8_t major_opcode; + uint8_t __unused[21]; +}; + +struct libaxl_event_visibility_notify { +#define LIBAXL_EVENT_VISIBILITY_NOTIFY 15 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_drawable_t drawable; + uint8_t state; /* LIBAXL_UNOBSCURED, LIBAXL_PARTIALLY_OBSCURED, or LIBAXL_FULLY_OBSCURED */ + uint8_t __unused[23]; +}; + +struct libaxl_event_create_notify { +#define LIBAXL_EVENT_CREATE_NOTIFY 16 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t parent; + libaxl_window_t window; + int16_t x; + int16_t y; + int16_t width; + int16_t height; + int16_t border_width; + libaxl_bool_t override_redirect; + uint8_t __unused[9]; +}; + +struct libaxl_event_destroy_notify { +#define LIBAXL_EVENT_DESTROY_NOTIFY 17 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t event; + libaxl_window_t window; + uint8_t __unused[20]; +}; + +struct libaxl_event_unmap_notify { +#define LIBAXL_EVENT_UNMAP_NOTIFY 18 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t event; + libaxl_window_t window; + libaxl_bool_t from_configure; + uint8_t __unused[19]; +}; + +struct libaxl_event_map_notify { +#define LIBAXL_EVENT_MAP_NOTIFY 19 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t event; + libaxl_window_t window; + libaxl_bool_t override_redirect; + uint8_t __unused[19]; +}; + +struct libaxl_event_map_request { +#define LIBAXL_EVENT_MAP_REQUEST 20 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t parent; + libaxl_window_t window; + uint8_t __unused[20]; +}; + +struct libaxl_event_reparent_notify { +#define LIBAXL_EVENT_REPARENT_NOTIFY 21 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t event; + libaxl_window_t window; + libaxl_window_t parent; + int16_t x; + int16_t y; + libaxl_bool_t override_redirect; + uint8_t __unused[11]; +}; + +struct libaxl_event_configure_notify { +#define LIBAXL_EVENT_CONFIGURE_NOTIFY 22 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t event; + libaxl_window_t window; + libaxl_window_t above_sibling; /* Can be LIBAXL_NONE */ + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t border_width; + libaxl_bool_t override_redirect; + uint8_t __unused[5]; +}; + +struct libaxl_event_configure_request { +#define LIBAXL_EVENT_CONFIGURE_REQUEST 23 + uint8_t code; + uint8_t stack_mode; /* See "stack mode" in libaxl-consts.h */ + uint16_t sequence_number; + libaxl_window_t event; + libaxl_window_t window; + libaxl_window_t sibling; /* Can be LIBAXL_NONE */ + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t border_width; + uint16_t value_mask; +#define LIBAXL_EVENT_CONFIGURE_REQUEST_X 0x0001U +#define LIBAXL_EVENT_CONFIGURE_REQUEST_Y 0x0002U +#define LIBAXL_EVENT_CONFIGURE_REQUEST_WIDTH 0x0004U +#define LIBAXL_EVENT_CONFIGURE_REQUEST_HEIGHT 0x0008U +#define LIBAXL_EVENT_CONFIGURE_REQUEST_BORDER_WIDTH 0x0010U +#define LIBAXL_EVENT_CONFIGURE_REQUEST_SIBLING 0x0020U +#define LIBAXL_EVENT_CONFIGURE_REQUEST_STACK_MODE 0x0040U + uint8_t __unused[4]; +}; + +struct libaxl_event_gravity_notify { +#define LIBAXL_EVENT_GRAVITY_NOTIFY 24 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t event; + libaxl_window_t window; + int16_t x; + int16_t y; + uint8_t __unused[16]; +}; + +struct libaxl_event_resize_request { +#define LIBAXL_EVENT_RESIZE_REQUEST 25 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t window; + uint16_t width; + uint16_t height; + uint8_t __unused[20]; +}; + +struct libaxl_event_circulate_notify { +#define LIBAXL_EVENT_CIRCULATE_NOTIFY 26 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t event; + libaxl_window_t window; + uint32_t __unused1; + uint8_t place; /* LIBAXL_TOP or LIBAXL_BOTTOM */ + uint8_t __unused[15]; +}; + +struct libaxl_event_circulate_request { +#define LIBAXL_EVENT_CIRCULATE_REQUEST 27 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t parent; + libaxl_window_t window; + uint32_t __unused1; + uint8_t place; /* LIBAXL_TOP or LIBAXL_BOTTOM */ + uint8_t __unused[15]; +}; + +struct libaxl_event_property_notify { +#define LIBAXL_EVENT_PROPERTY_NOTIFY 28 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t window; + libaxl_atom_t atom; + uint8_t state; /* LIBAXL_NEW_VALUE or LIBAXL_DELETED */ + uint8_t __unused[15]; +}; + +struct libaxl_event_selection_clear { +#define LIBAXL_EVENT_SELECTION_CLEAR 29 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_timestamp_t time; + libaxl_window_t owner; + libaxl_atom_t selection; + uint8_t __unused[16]; +}; + +struct libaxl_event_selection_request { +#define LIBAXL_EVENT_SELECTION_REQUEST 30 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */ + libaxl_window_t owner; + libaxl_window_t requestor; + libaxl_atom_t selection; + libaxl_atom_t target; + libaxl_atom_t property; /* Can be LIBAXL_NONE */ + uint8_t __unused[4]; +}; + +struct libaxl_event_selection_notify { +#define LIBAXL_EVENT_SELECTION_NOTIFY 31 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */ + libaxl_window_t requestor; + libaxl_atom_t selection; + libaxl_atom_t target; + libaxl_atom_t property; /* Can be LIBAXL_NONE */ + uint8_t __unused[8]; +}; + +struct libaxl_event_colormap_notify { +#define LIBAXL_EVENT_COLORMAP_NOTIFY 32 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + libaxl_window_t requestor; + libaxl_colormap_t colormap; /* Can be LIBAXL_NONE */ + libaxl_bool_t new; + uint8_t state; /* LIBAXL_UNINSTALLED or LIBAXL_INSTALLED */ + uint8_t __unused[18]; +}; + +struct libaxl_event_client_message { +#define LIBAXL_EVENT_CLIENT_MESSAGE 33 + uint8_t code; + uint8_t format; /* {8, 16, 32} */ + uint16_t sequence_number; + libaxl_window_t window; + libaxl_atom_t type; + uint8_t __unused[20]; +}; + +struct libaxl_event_mapping_notify { +#define LIBAXL_EVENT_MAPPING_NOTIFY 34 + uint8_t code; + uint8_t __pad; + uint16_t sequence_number; + uint8_t request; /* LIBAXL_MODIFIER, LIBAXL_KEYBOARD, or LIBAXL_POINTER */ + libaxl_keycode_t first_keycode; + uint8_t count; + uint8_t __unused[25]; +}; + +union libaxl_event { + uint8_t code; /* Highest bit marks the event as sent with SendEvent */ + /* .keymap_notify does not have a sequence number */ +#include "libaxl-events-structs.h" +}; diff --git a/libaxl-replies.h b/libaxl-replies.h new file mode 100644 index 0000000..7b30ee1 --- /dev/null +++ b/libaxl-replies.h @@ -0,0 +1,490 @@ +/* See LICENSE file for copyright and license details. */ + +#define LIBAXL_REPLY 1 /* TODO man */ + +struct libaxl_reply_get_window_attributes { + uint8_t __one; + uint8_t backing_store; /* LIBAXL_NOT_USEFUL, LIBAXL_WHEN_MAPPED, or LIBAXL_ALWAYS */ + uint16_t sequence_number; + uint32_t _reply_length; /* = 3 */ + libaxl_visual_id_t visual; + uint16_t class; /* LIBAXL_INPUT_OUTPUT (= 1) or LIBAXL_INPUT_ONLY (= 2) */ + uint8_t bit_gravity; + uint8_t win_gravity; + uint32_t backing_planes; + uint32_t backing_pixel; + libaxl_bool_t save_under; + libaxl_bool_t map_is_installed; + uint8_t map_state; /* LIBAXL_UNMAPPED, LIBAXL_UNVIEWABLE, or LIBAXL_VIEWABLE */ + libaxl_bool_t override_redirect; + libaxl_colormap_t colormap; /* Can be LIBAXL_NONE */ + uint32_t all_event_masks; /* TODO SETofEVENT */ + uint32_t your_event_mask; /* TODO SETofEVENT */ + uint16_t do_not_propagate_mask; /* TODO SETofDEVICEEVENT */ + uint16_t __pad; +}; + +struct libaxl_reply_get_geometry { + uint8_t __one; + uint8_t depth; + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + libaxl_window_t root; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t border_width; + uint8_t __unused[10]; +}; + +struct libaxl_reply_query_tree { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; /* = .number_of_children */ + libaxl_window_t root; + libaxl_window_t parent; /* Can be LIBAXL_NONE */ + uint16_t number_of_children; + uint8_t __unused[14]; + libaxl_window_t *children; +}; + +struct libaxl_reply_intern_atom { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + libaxl_atom_t atom; /* Can be LIBAXL_NONE */ + uint8_t __unused[20]; +}; + +struct libaxl_reply_get_atom_name { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; + uint16_t length_of_name; + uint8_t __unused[22]; + char *name; +}; + +struct libaxl_reply_get_property { + uint8_t __one; + uint8_t format; /* {0 = 0, 8 = 8, 16 = 16, 32 = 32}*/ + uint16_t sequence_number; + uint32_t _reply_length; + libaxl_atom_t type; /* Can be LIBAXL_NONE */ + uint32_t bytes_after; + uint32_t length_of_value; /* in format units */ + uint8_t __unused[12]; + union { + char *value; + uint8_t *value8; + uint16_t *value16; + uint32_t *value32; + }; +}; + +struct libaxl_reply_list_properties { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; + uint16_t number_of_atoms; + uint8_t __unused[22]; + libaxl_atom_t *atoms; +}; + +struct libaxl_reply_get_selection_owner { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + libaxl_window_t owner; /* Can be LIBAXL_NONE */ + uint8_t __unused[20]; +}; + +struct libaxl_reply_grab_pointer { + uint8_t __one; + uint8_t status; /* See "grab status" in libaxl-consts.h */ + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + uint8_t __unused[24]; +}; + +struct libaxl_reply_grab_keyboard { + uint8_t __one; + uint8_t status; /* See "grab status" in libaxl-consts.h */ + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + uint8_t __unused[24]; +}; + +struct libaxl_reply_query_pointer { + uint8_t __one; + libaxl_bool_t same_screen; + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + libaxl_window_t root; + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t root_x; + int16_t root_y; + int16_t win_x; + int16_t win_y; + libaxl_keybutmask_t mask; /* TODO ? SETofKEYBUTMASK shouldn't have its own type */ + uint8_t __unused[6]; +}; + +struct libaxl_reply_get_motion_events { + uint8_t __one; + libaxl_bool_t same_screen; + uint16_t sequence_number; + uint32_t _reply_length; /* = 2 * .number_of_events */ + uint32_t number_of_events; + uint8_t __unused[20]; + struct libaxl_timecoord *events; +}; + +struct libaxl_reply_translate_coordinates { + uint8_t __one; + libaxl_bool_t same_screen; + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + libaxl_window_t child; /* Can be LIBAXL_NONE */ + int16_t dest_x; + int16_t dest_y; + int8_t __unused[16]; +}; + +struct libaxl_reply_get_input_focus { + uint8_t __one; + uint8_t revert_to; /* LIBAXL_NONE, LIBAXL_POINTER_ROOT, or LIBAXL_PARENT */ + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + libaxl_window_t focus; /* Can be LIBAXL_NONE or LIBAXL_POINTER_ROOT */ + int8_t __unused[20]; +}; + +struct libaxl_reply_query_keymap { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; /* = 2 */ + uint8_t keys[32]; +}; + +struct libaxl_reply_query_font { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; + struct libaxl_charinfo min_bounds; + uint32_t __unused1; + struct libaxl_charinfo max_bounds; + uint32_t __unused2; + uint16_t min_char_or_byte2; + uint16_t max_char_or_byte2; + uint16_t default_char; + uint16_t number_of_properties; + uint8_t draw_direction; /* LIBAXL_LEFT_TO_RIGHT or LIBAXL_RIGHT_TO_LEFT */ + uint8_t min_byte1; + uint8_t max_byte1; + libaxl_bool_t all_chars_exist; + int16_t font_ascent; + int16_t font_descent; + uint32_t number_of_char_infos; + struct libaxl_fontprop *properties; + struct libaxl_charinfo *char_infos; +}; + +struct libaxl_reply_query_text_extents { + uint8_t __one; + uint8_t draw_direction; /* LIBAXL_LEFT_TO_RIGHT or LIBAXL_RIGHT_TO_LEFT */ + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + int16_t font_ascent; + int16_t font_descent; + int16_t overall_ascent; + int16_t overall_descent; + int32_t overall_width; + int32_t overall_left; + int32_t overall_right; + uint8_t __unused[4]; +}; + +struct libaxl_reply_list_fonts { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; + uint16_t number_of_names; + uint8_t __unused[22]; + struct libaxl_str8 *names; +}; + +struct libaxl_reply_list_fonts_with_info { + uint8_t __one; + uint8_t length_of_name; /* 0 = end of series */ + uint16_t sequence_number; + uint32_t _reply_length; /* = 7 if .length_of_name = 0 */ + + /* the rest (52 bytes) are unused if .length_of_name = 0 */ + struct libaxl_charinfo min_bounds; + uint32_t __unused1; + struct libaxl_charinfo max_bounds; + uint32_t __unused2; + uint16_t min_char_or_byte2; + uint16_t max_char_or_byte2; + uint16_t default_char; + uint16_t number_of_properties; + uint8_t draw_direction; /* LIBAXL_LEFT_TO_RIGHT or LIBAXL_RIGHT_TO_LEFT */ + uint8_t min_byte1; + uint8_t max_byte1; + libaxl_bool_t all_chars_exist; + int16_t font_ascent; + int16_t font_descent; + uint32_t replies_hint; + struct libaxl_fontprop *properties; + char *name; +}; + +struct libaxl_reply_get_font_path { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; + uint16_t number_of_strs; + uint8_t __unused[22]; + struct libaxl_str8 *path; +}; + +struct libaxl_reply_get_image { + uint8_t __one; + uint8_t depth; + uint16_t sequence_number; + uint32_t _reply_length; + libaxl_visual_id_t visual; /* Can be LIBAXL_NONE */ + uint8_t __unused[20]; + size_t size_of_data; + uint8_t *data; +}; + +struct libaxl_reply_list_installed_colormaps { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; /* = .number_of_cmaps */ + uint16_t number_of_cmaps; + uint8_t __unused[22]; + libaxl_colormap_t *cmaps; +}; + +struct libaxl_reply_alloc_color { + uint8_t __one; + uint8_t __pad1; + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + uint16_t red; + uint16_t green; + uint16_t blue; + uint16_t __pad2; + uint32_t pixel; + uint8_t __unused[12]; +}; + +struct libaxl_reply_alloc_named_color { + uint8_t __one; + uint8_t __pad1; + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + uint32_t pixel; + uint16_t exact_red; + uint16_t exact_green; + uint16_t exact_blue; + uint16_t visual_red; + uint16_t visual_green; + uint16_t visual_blue; + uint8_t __unused[8]; +}; + +struct libaxl_reply_alloc_color_cells { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; + uint16_t number_of_pixels; + uint16_t number_of_masks; + uint8_t __used[20]; + uint32_t *pixels; + uint32_t *mask; +}; + +struct libaxl_reply_alloc_color_planes { + uint8_t __one; + uint8_t __pad1; + uint16_t sequence_number; + uint32_t _reply_length; /* = .number_of_pixels */ + uint16_t number_of_pixels; + uint16_t __pad2; + uint32_t red_mask; + uint32_t green_mask; + uint32_t blue_mask; + uint8_t __unused[8]; + uint32_t *pixels; +}; + +struct libaxl_reply_query_colors { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; /* = 2 * .number_of_colors */ + uint16_t number_of_colors; + uint8_t __unused[22]; + struct libaxl_rgb16 *colors; +}; + +struct libaxl_reply_lookup_color { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + uint16_t exact_red; + uint16_t exact_green; + uint16_t exact_blue; + uint16_t visual_red; + uint16_t visual_green; + uint16_t visual_blue; + uint8_t __unused[12]; +}; + +struct libaxl_reply_query_best_size { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + uint16_t width; + uint16_t height; + uint8_t __unused[20]; +}; + +struct libaxl_reply_query_extension { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + libaxl_bool_t present; + uint8_t major_opcode; + uint8_t first_event; + uint8_t first_error; + uint8_t __unused[20]; +}; + +struct libaxl_reply_list_extensions { + uint8_t __one; + uint8_t number_of_names; + uint16_t sequence_number; + uint32_t _reply_length; + uint8_t __unused[24]; + struct libaxl_str8 *names; +}; + +struct libaxl_reply_get_keyboard_mapping { + uint8_t __one; + uint8_t keysyms_per_keycode; + uint16_t sequence_number; + uint32_t _reply_length; /* = count field from the request divided by .keysyms_per_keycode */ + uint8_t __unused[24]; + libaxl_keysym_t *keysyms; +}; + +struct libaxl_reply_get_keyboard_control { + uint8_t __one; + uint8_t global_auto_repeat; /* LIBAXL_OFF or LIBAXL_ON */ + uint16_t sequence_number; + uint32_t _reply_length; /* = 5 */ + uint32_t led_mask; + uint8_t key_click_percent; + uint8_t bell_percent; + uint16_t bell_pitch; + uint16_t bell_duration; + uint16_t __unused; + uint8_t auto_repeats[32]; +}; + +struct libaxl_reply_get_pointer_control { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + uint16_t acceleration_numerator; + uint16_t acceleration_denominator; + uint16_t threshold; + uint8_t __unused[18]; +}; + +struct libaxl_reply_get_screen_saver { + uint8_t __one; + uint8_t __pad; + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + uint16_t timeout; + uint16_t interval; + uint8_t prefer_blanking; /* LIBAXL_NO or LIBAXL_YES */ + uint8_t allow_exposures; /* LIBAXL_NO or LIBAXL_YES */ + uint8_t __unused[18]; +}; + +struct libaxl_reply_list_hosts { + uint8_t __one; + uint8_t mode; /* LIBAXL_DISABLED or LIBAXL_ENABLED */ + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + uint16_t number_of_hosts; + uint8_t __unused[22]; + struct libaxl_host *hosts; +}; + +struct libaxl_reply_set_pointer_mapping { + uint8_t __one; + uint8_t status; /* LIBAXL_SUCCESS or LIBAXL_BUSY */ + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + uint8_t __unused[24]; +}; + +struct libaxl_reply_get_pointer_mapping { + uint8_t __one; + uint8_t length_of_map; + uint16_t sequence_number; + uint32_t _reply_length; + uint8_t __unused[24]; + uint8_t *map; +}; + +struct libaxl_reply_set_modifier_mapping { + uint8_t __one; + uint8_t status; /* LIBAXL_SUCCESS, LIBAXL_BUSY, or LIBAXL_FAILED */ + uint16_t sequence_number; + uint32_t _reply_length; /* = 0 */ + uint8_t __unused[24]; +}; + +struct libaxl_reply_get_modifier_mapping { + uint8_t __one; + uint8_t keycodes_per_modifier; /* pairs */ + uint16_t sequence_number; + uint32_t _reply_length; /* = 2 * .keycodes_per_modifier */ + uint8_t __unused[24]; + libaxl_keycode_t *keycodes; +}; + +union libaxl_reply { + struct { + uint8_t __one; + uint8_t __data; + uint16_t sequence_number; + uint32_t _reply_length; + }; +#include "libaxl-replies-structs.h" +}; diff --git a/libaxl-requests.h b/libaxl-requests.h new file mode 100644 index 0000000..21984f2 --- /dev/null +++ b/libaxl-requests.h @@ -0,0 +1,1445 @@ +/* See LICENSE file for copyright and license details. */ + +struct libaxl_request_create_window { +#define LIBAXL_REQUEST_CREATE_WINDOW 1 + uint8_t opcode; + uint8_t depth; + uint16_t _request_length; + libaxl_window_t wid; + libaxl_window_t parent; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t border_width; + uint16_t class; /* LIBAXL_COPY_FROM_PARENT, LIBAXL_INPUT_OUTPUT, or LIBAXL_INPUT_ONLY */ + libaxl_visual_id_t visual; /* Can be LIBAXL_COPY_FROM_PARENT */ + uint32_t value_mask; /* Determines which below are included, all are encoded as uint32_t */ +#define LIBAXL_REQUEST_CREATE_WINDOW_BACKGROUND_PIXMAP 0x00000001UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BACKGROUND_PIXEL 0x00000002UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BORDER_PIXMAP 0x00000004UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BORDER_PIXEL 0x00000008UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BIT_GRAVITY 0x00000010UL +#define LIBAXL_REQUEST_CREATE_WINDOW_WIN_GRAVITY 0x00000020UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BACKING_STORE 0x00000040UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BACKING_PLANES 0x00000080UL +#define LIBAXL_REQUEST_CREATE_WINDOW_BACKING_PIXEL 0x00000100UL +#define LIBAXL_REQUEST_CREATE_WINDOW_OVERRIDE_REDIRECT 0x00000200UL +#define LIBAXL_REQUEST_CREATE_WINDOW_SAVE_UNDER 0x00000400UL +#define LIBAXL_REQUEST_CREATE_WINDOW_EVENT_MASK 0x00000800UL +#define LIBAXL_REQUEST_CREATE_WINDOW_DO_NOT_PROPAGATE_MASK 0x00001000UL +#define LIBAXL_REQUEST_CREATE_WINDOW_COLORMAP 0x00002000UL +#define LIBAXL_REQUEST_CREATE_WINDOW_CURSOR 0x00004000UL + libaxl_pixmap_t background_pixmap; /* Can be LIBAXL_NONE or LIBAXL_PARENT_RELATIVE */ + uint32_t background_pixel; + libaxl_pixmap_t border_pixmap; /* Can be LIBAXL_COPY_FROM_PARENT */ + uint32_t border_pixel; + uint8_t bit_gravity; + uint8_t win_gravity; + uint8_t backing_store; /* LIBAXL_NOT_USEFUL, LIBAXL_WHEN_MAPPED, or LIBAXL_ALWAYS */ + uint8_t __omitted1; + uint32_t backing_planes; + uint32_t backing_pixel; + libaxl_bool_t override_redirect; + libaxl_bool_t save_under; + uint16_t __omitted2; + uint32_t event_mask; /* TODO SETofEVENT */ + uint32_t do_not_propagate_mask; /* TODO SETofDEVICEEVENT */ + libaxl_colormap_t colormap; /* Can be LIBAXL_COPY_FROM_PARENT */ + libaxl_cursor_t cursor; /* Can be LIBAXL_NONE */ +}; + +struct libaxl_request_change_window_attributes { +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES 2 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_window_t window; + uint32_t value_mask; /* Determines which below are included, all are encoded as uint32_t */ +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_BACKGROUND_PIXMAP 0x00000001UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_BACKGROUND_PIXEL 0x00000002UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_BORDER_PIXMAP 0x00000004UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_BORDER_PIXEL 0x00000008UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_BIT_GRAVITY 0x00000010UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_WIN_GRAVITY 0x00000020UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_BACKING_STORE 0x00000040UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_BACKING_PLANES 0x00000080UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_BACKING_PIXEL 0x00000100UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_OVERRIDE_REDIRECT 0x00000200UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_SAVE_UNDER 0x00000400UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_EVENT_MASK 0x00000800UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_DO_NOT_PROPAGATE_MASK 0x00001000UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_COLORMAP 0x00002000UL +#define LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES_CURSOR 0x00004000UL + libaxl_pixmap_t background_pixmap; /* Can be LIBAXL_NONE or LIBAXL_PARENT_RELATIVE */ + uint32_t background_pixel; + libaxl_pixmap_t border_pixmap; /* Can be LIBAXL_COPY_FROM_PARENT */ + uint32_t border_pixel; + uint8_t bit_gravity; + uint8_t win_gravity; + uint8_t backing_store; /* LIBAXL_NOT_USEFUL, LIBAXL_WHEN_MAPPED, or LIBAXL_ALWAYS */ + uint8_t __omitted1; + uint32_t backing_planes; + uint32_t backing_pixel; + libaxl_bool_t override_redirect; + libaxl_bool_t save_under; + uint16_t __omitted2; + uint32_t event_mask; /* TODO SETofEVENT */ + uint32_t do_not_propagate_mask; /* TODO SETofDEVICEEVENT */ + libaxl_colormap_t colormap; /* Can be LIBAXL_COPY_FROM_PARENT */ + libaxl_cursor_t cursor; /* Can be LIBAXL_NONE */ +}; + +struct libaxl_request_get_window_attributes { +#define LIBAXL_REQUEST_GET_WINDOW_ATTRIBUTES 3 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_destroy_window { +#define LIBAXL_REQUEST_DESTROY_WINDOW 4 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_destroy_subwindows { +#define LIBAXL_REQUEST_DESTROY_SUBWINDOWS 5 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_change_save_set { +#define LIBAXL_REQUEST_CHANGE_SAVE_SET 6 + uint8_t opcode; + uint8_t mode; /* LIBAXL_INSERT or LIBAXL_DELETE */ + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_reparent_window { +#define LIBAXL_REQUEST_REPARENT_WINDOW 7 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 4 */ + libaxl_window_t window; + libaxl_window_t parent; + int16_t x; + int16_t y; +}; + +struct libaxl_request_map_window { +#define LIBAXL_REQUEST_MAP_WINDOW 8 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_map_subwindows { +#define LIBAXL_REQUEST_MAP_SUBWINDOWS 9 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_unmap_window { +#define LIBAXL_REQUEST_UNMAP_WINDOW 10 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_unmap_subwindows { +#define LIBAXL_REQUEST_UNMAP_SUBWINDOWS 11 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_configure_window { +#define LIBAXL_REQUEST_CONFIGURE_WINDOW 12 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; + libaxl_window_t window; + uint16_t value_mask; /* Determines which below are included, all are encoded as uint32_t */ +#define LIBAXL_REQUEST_CONFIGURE_WINDOW_X 0x0001U +#define LIBAXL_REQUEST_CONFIGURE_WINDOW_Y 0x0002U +#define LIBAXL_REQUEST_CONFIGURE_WINDOW_WIDTH 0x0004U +#define LIBAXL_REQUEST_CONFIGURE_WINDOW_HEIGHT 0x0008U +#define LIBAXL_REQUEST_CONFIGURE_WINDOW_BORDER_WIDTH 0x0010U +#define LIBAXL_REQUEST_CONFIGURE_WINDOW_SIBLING 0x0020U +#define LIBAXL_REQUEST_CONFIGURE_WINDOW_STACK_MODE 0x0040U + uint16_t __pad2; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint16_t border_width; + uint16_t __omitted1; + libaxl_window_t sibling; + uint8_t stack_mode; /* See "stack mode" in libaxl-consts.h */ + uint8_t __omitted2[3]; +}; + +struct libaxl_request_circulate_window { +#define LIBAXL_REQUEST_CIRCULATE_WINDOW 13 + uint8_t opcode; + uint8_t direction; /* LIBAXL_RAISE_LOWEST or LIBAXL_LOWER_HIGHEST */ + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_get_geometry { +#define LIBAXL_REQUEST_GET_GEOMETRY 14 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_drawable_t drawable; +}; + +struct libaxl_request_query_tree { +#define LIBAXL_REQUEST_QUERY_TREE 15 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_intern_atom { +#define LIBAXL_REQUEST_INTERN_ATOM 16 + uint8_t opcode; + libaxl_bool_t only_if_exists; + uint16_t _request_length; + uint16_t length_of_name; + uint16_t __pad; + char *name; +}; + +struct libaxl_request_get_atom_name { +#define LIBAXL_REQUEST_GET_ATOM_NAME 17 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_atom_t atom; +}; + +struct libaxl_request_change_property { +#define LIBAXL_REQUEST_CHANGE_PROPERTY 18 + uint8_t opcode; + uint8_t mode; /* See libaxl-consts.h */ + uint16_t _request_length; + libaxl_window_t window; + libaxl_atom_t property; + libaxl_atom_t type; + uint8_t format; /* {8, 16, 32} */ + uint8_t __pad[3]; + uint32_t length_of_data; /* in format units */ + union { + char *data; + uint8_t *data8; + uint16_t *data16; + uint32_t *data32; + }; +}; + +struct libaxl_request_delete_property { +#define LIBAXL_REQUEST_DELETE_PROPERTY 19 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 3 */ + libaxl_window_t window; + libaxl_atom_t property; +}; + +struct libaxl_request_get_property { +#define LIBAXL_REQUEST_GET_PROPERTY 20 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 6 */ + libaxl_window_t window; + libaxl_atom_t property; + libaxl_atom_t type; /* Can be LIBAXL_ANY_PROPERTY_TYPE */ + uint32_t offset; + uint32_t length; +}; + +struct libaxl_request_list_properties { +#define LIBAXL_REQUEST_LIST_PROPERTIES 21 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_set_selection_owner { +#define LIBAXL_REQUEST_SET_SELECTION_OWNER 22 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 4 */ + libaxl_window_t owner; /* Can be LIBAXL_NONE */ + libaxl_atom_t selection; + libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */ +}; + +struct libaxl_request_get_selection_owner { +#define LIBAXL_REQUEST_GET_SELECTION_OWNER 23 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_atom_t selection; +}; + +struct libaxl_request_convert_selection { +#define LIBAXL_REQUEST_CONVERT_SELECTION 24 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 5 */ + libaxl_atom_t selection; + libaxl_atom_t target; + libaxl_atom_t property; /* Can be LIBAXL_NONE */ + libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */ +}; + +struct libaxl_request_send_event { +#define LIBAXL_REQUEST_SEND_EVENT 25 + uint8_t opcode; + libaxl_bool_t propagate; + uint16_t _request_length; /* = 11 */ + libaxl_window_t destination; /* Can be LIBAXL_POINTER_WINDOW or LIBAXL_INPUT_FOCUS */ + uint32_t event_mask; /* TODO SETofEVENT */ + union libaxl_event event; +}; + +struct libaxl_request_grab_pointer { +#define LIBAXL_REQUEST_GRAB_POINTER 26 + uint8_t opcode; + libaxl_bool_t owner_events; + uint16_t _request_length; /* = 6 */ + libaxl_window_t grab_window; + uint16_t event_mask; /* TODO SETofPOINTEREVENT */ + uint8_t pointer_mode; /* LIBAXL_SYNCHRONOUS or LIBAXL_ASYNCHRONOUS */ + uint8_t keyboard_mode; /* LIBAXL_SYNCHRONOUS or LIBAXL_ASYNCHRONOUS */ + libaxl_window_t confine_to; /* Can be LIBAXL_NONE */ + libaxl_cursor_t cursor; /* Can be LIBAXL_NONE */ + libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */ +}; + +struct libaxl_request_ungrab_pointer { +#define LIBAXL_REQUEST_UNGRAB_POINTER 27 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */ +}; + +struct libaxl_request_grab_button { +#define LIBAXL_REQUEST_GRAB_BUTTON 28 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; /* = 6 */ + libaxl_window_t grab_window; + uint16_t event_mask; /* TODO SETofPOINTEREVENT */ + uint8_t pointer_mode; /* LIBAXL_SYNCHRONOUS or LIBAXL_ASYNCHRONOUS */ + uint8_t keyboard_mode; /* LIBAXL_SYNCHRONOUS or LIBAXL_ASYNCHRONOUS */ + libaxl_window_t confine_to; /* Can be LIBAXL_NONE */ + libaxl_cursor_t cursor; /* Can be LIBAXL_NONE */ + uint8_t button; /* Can be LIBAXL_ANY_BUTTON */ + uint8_t __pad2; + uint16_t modifiers; /* TODO SETofKEYMASK, #x8000 = AnyModifier */ +}; + +struct libaxl_request_ungrab_button { +#define LIBAXL_REQUEST_UNGRAB_BUTTON 29 + uint8_t opcode; + uint8_t button; /* Can be LIBAXL_ANY_BUTTON */ + uint16_t _request_length; /* = 3 */ + libaxl_window_t grab_window; + uint16_t modifiers; /* TODO SETofKEYMASK, #x8000 = AnyModifier */ + uint16_t __pad; +}; + +struct libaxl_request_change_active_pointer_grab { +#define LIBAXL_REQUEST_CHANGE_ACTIVE_POINTER_GRAB 30 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; /* = 4 */ + libaxl_cursor_t cursor; /* Can be LIBAXL_NONE */ + libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */ + uint16_t event_mask; /* TODO SETofPOINTEREVENT */ + uint16_t __pad2; +}; + +struct libaxl_request_grab_keyboard { +#define LIBAXL_REQUEST_GRAB_KEYBOARD 31 + uint8_t opcode; + libaxl_bool_t owner_events; + uint16_t _request_length; /* = 4 */ + libaxl_window_t grab_window; + libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */ + uint8_t pointer_mode; /* LIBAXL_SYNCHRONOUS or LIBAXL_ASYNCHRONOUS */ + uint8_t keyboard_mode; /* LIBAXL_SYNCHRONOUS or LIBAXL_ASYNCHRONOUS */ + uint16_t __pad; +}; + +struct libaxl_request_ungrab_keyboard { +#define LIBAXL_REQUEST_UNGRAB_KEYBOARD 32 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */ +}; + +struct libaxl_request_grab_key { +#define LIBAXL_REQUEST_GRAB_KEY 33 + uint8_t opcode; + libaxl_bool_t owner_events; + uint16_t _request_length; /* = 4 */ + libaxl_window_t grab_window; + uint16_t modifiers; /* TODO SETofKEYMASK, #x8000 = AnyModifier */ + libaxl_keycode_t key; /* Can be LIBAXL_ANY_KEY */ + uint8_t pointer_mode; /* LIBAXL_SYNCHRONOUS or LIBAXL_ASYNCHRONOUS */ + uint8_t keyboard_mode; /* LIBAXL_SYNCHRONOUS or LIBAXL_ASYNCHRONOUS */ + uint8_t __pad[3]; +}; + +struct libaxl_request_ungrab_key { +#define LIBAXL_REQUEST_UNGRAB_KEY 34 + uint8_t opcode; + libaxl_keycode_t key; /* Can be LIBAXL_ANY_KEY */ + uint16_t _request_length; /* = 3 */ + libaxl_window_t grab_window; + uint16_t modifiers; /* TODO SETofKEYMASK, #x8000 = AnyModifier */ + uint16_t __pad; +}; + +struct libaxl_request_allow_events { +#define LIBAXL_REQUEST_ALLOW_EVENTS 35 + uint8_t opcode; + uint8_t mode; /* See libaxl-consts.h */ + uint16_t _request_length; /* = 2 */ + libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */ +}; + +struct libaxl_request_grab_server { +#define LIBAXL_REQUEST_GRAB_SERVER 36 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_ungrab_server { +#define LIBAXL_REQUEST_UNGRAB_SERVER 37 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_query_pointer { +#define LIBAXL_REQUEST_QUERY_POINTER 38 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_get_motion_events { +#define LIBAXL_REQUEST_GET_MOTION_EVENTS 39 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 4 */ + libaxl_window_t window; + libaxl_timestamp_t start; /* Can be LIBAXL_CURRENT_TIME */ + libaxl_timestamp_t end; /* Can be LIBAXL_CURRENT_TIME */ +}; + +struct libaxl_request_translate_coordinates { +#define LIBAXL_REQUEST_TRANSLATE_COORDINATES 40 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 4 */ + libaxl_window_t src_window; + libaxl_window_t dest_window; + int16_t src_x; + int16_t src_y; +}; + +struct libaxl_request_warp_pointer { +#define LIBAXL_REQUEST_WARP_POINTER 41 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 6 */ + libaxl_window_t src_window; /* Can be LIBAXL_NONE */ + libaxl_window_t dest_window; /* Can be LIBAXL_NONE */ + int16_t src_x; + int16_t src_y; + uint16_t src_width; + uint16_t src_height; + int16_t dest_x; + int16_t dest_y; +}; + +struct libaxl_request_set_input_focus { +#define LIBAXL_REQUEST_SET_INPUT_FOCUS 42 + uint8_t opcode; + uint8_t revert_to; /* LIBAXL_NONE, LIBAXL_POINTER_ROOT, or LIBAXL_PARENT */ + uint16_t _request_length; /* = 3 */ + libaxl_window_t focus; /* Can be LIBAXL_NONE or LIBAXL_POINTER_ROOT */ + libaxl_timestamp_t time; /* Can be LIBAXL_CURRENT_TIME */ +}; + +struct libaxl_request_get_input_focus { +#define LIBAXL_REQUEST_GET_INPUT_FOCUS 43 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_query_keymap { +#define LIBAXL_REQUEST_QUERY_KEYMAP 44 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_open_font { +#define LIBAXL_REQUEST_OPEN_FONT 45 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; + libaxl_font_t fid; + uint16_t length_of_name; + uint16_t __pad2; + char *name; +}; + +struct libaxl_request_close_font { +#define LIBAXL_REQUEST_CLOSE_FONT 46 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_font_t font; +}; + +struct libaxl_request_query_font { +#define LIBAXL_REQUEST_QUERY_FONT 47 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_fontable_t font; +}; + +struct libaxl_request_query_text_extents { +#define LIBAXL_REQUEST_QUERY_TEXT_EXTENTS 48 + uint8_t opcode; + libaxl_bool_t _odd_length; + uint16_t _request_length; + libaxl_fontable_t font; + size_t length_of_string; + uint16_t *string; +}; + +struct libaxl_request_list_fonts { +#define LIBAXL_REQUEST_LIST_FONTS 49 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + uint16_t max_names; + uint16_t length_of_pattern; + char *pattern; +}; + +struct libaxl_request_list_fonts_with_info { +#define LIBAXL_REQUEST_LIST_FONTS_WITH_INFO 50 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + uint16_t max_names; + uint16_t length_of_pattern; + char *pattern; +}; + +struct libaxl_request_set_font_path { +#define LIBAXL_REQUEST_SET_FONT_PATH 51 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; + uint16_t number_of_strs; /* in path */ + uint16_t __pad2; + struct libaxl_str8 *path; +}; + +struct libaxl_request_get_font_path { +#define LIBAXL_REQUEST_GET_FONT_PATH 52 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_create_pixmap { +#define LIBAXL_REQUEST_CREATE_PIXMAP 53 + uint8_t opcode; + uint8_t depth; + uint16_t _request_length; /* = 4 */ + libaxl_pixmap_t pid; + libaxl_drawable_t drawable; + uint16_t width; + uint16_t height; +}; + +struct libaxl_request_free_pixmap { +#define LIBAXL_REQUEST_FREE_PIXMAP 54 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_pixmap_t pixmap; +}; + +struct libaxl_request_create_gc { +#define LIBAXL_REQUEST_CREATE_GC 55 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_gcontext_t cid; + libaxl_drawable_t drawable; + uint32_t value_mask; /* Determines which below are included, all are encoded as uint32_t */ +#define LIBAXL_REQUEST_CREATE_GC_FUNCTION 0x00000001UL +#define LIBAXL_REQUEST_CREATE_GC_PLANE_MASK 0x00000002UL +#define LIBAXL_REQUEST_CREATE_GC_FOREGROUND 0x00000004UL +#define LIBAXL_REQUEST_CREATE_GC_BACKGROUND 0x00000008UL +#define LIBAXL_REQUEST_CREATE_GC_LINE_WIDTH 0x00000010UL +#define LIBAXL_REQUEST_CREATE_GC_LINE_STYLE 0x00000020UL +#define LIBAXL_REQUEST_CREATE_GC_CAP_STYLE 0x00000040UL +#define LIBAXL_REQUEST_CREATE_GC_JOIN_STYLE 0x00000080UL +#define LIBAXL_REQUEST_CREATE_GC_FILL_STYLE 0x00000100UL +#define LIBAXL_REQUEST_CREATE_GC_FILL_RULE 0x00000200UL +#define LIBAXL_REQUEST_CREATE_GC_TILE 0x00000400UL +#define LIBAXL_REQUEST_CREATE_GC_STIPPLE 0x00000800UL +#define LIBAXL_REQUEST_CREATE_GC_TILE_STIPPLE_X_ORIGIN 0x00001000UL +#define LIBAXL_REQUEST_CREATE_GC_TILE_STIPPLE_Y_ORIGIN 0x00002000UL +#define LIBAXL_REQUEST_CREATE_GC_FONT 0x00004000UL +#define LIBAXL_REQUEST_CREATE_GC_SUBWINDOW_MODE 0x00008000UL +#define LIBAXL_REQUEST_CREATE_GC_GRAPHICS_EXPOSURES 0x00010000UL +#define LIBAXL_REQUEST_CREATE_GC_CLIP_X_ORIGIN 0x00020000UL +#define LIBAXL_REQUEST_CREATE_GC_CLIP_Y_ORIGIN 0x00040000UL +#define LIBAXL_REQUEST_CREATE_GC_CLIP_MASK 0x00080000UL +#define LIBAXL_REQUEST_CREATE_GC_DASH_OFFSET 0x00100000UL +#define LIBAXL_REQUEST_CREATE_GC_DASHES 0x00200000UL +#define LIBAXL_REQUEST_CREATE_GC_ARC_MODE 0x00400000UL + uint8_t function; /* See "gcontext function" in libaxl-consts.h */ + uint8_t __omitted1[3]; + uint32_t plane_mask; + uint32_t foreground; + uint32_t background; + uint16_t line_width; + uint8_t line_style; /* LIBAXL_SOLID, LIBAXL_ON_OFF_DASH, or LIBAXL_DOUBLE_DASH */ + uint8_t cap_style; /* See "cap style" in libaxl-consts.h (Beware of namespacing) */ + uint8_t join_style; /* See "join style" in libaxl-consts.h (Beware of namespacing) */ + uint8_t fill_style; /* LIBAXL_SOLID, LIBAXL_TILED, LIBAXL_STIPPLED, or LIBAXL_OPAQUE_STIPPLED */ + uint8_t fill_rule; /* LIBAXL_EVEN_ODD or LIBAXL_WINDING */ + uint8_t __omitted2; + libaxl_pixmap_t tile; + libaxl_pixmap_t stipple; + int16_t tile_stipple_x_origin; + int16_t tile_stipple_y_origin; + libaxl_font_t font; + uint8_t subwindow_mode; /* CLIP_BY_CHILDREN or INCLUDE_INFERIORS */ + libaxl_bool_t graphics_exposures; + uint16_t __omitted3; + int16_t clip_x_origin; + int16_t clip_y_origin; + libaxl_pixmap_t clip_mask; /* Can be LIBAXL_NONE */ + uint16_t dash_offset; + uint8_t dashes; + uint8_t arc_mode; /* LIBAXL_CHORD or LIBAXL_PIE_SLICE */ +}; + +struct libaxl_request_change_gc { +#define LIBAXL_REQUEST_CHANGE_GC 56 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_gcontext_t gc; + uint32_t value_mask; /* Determines which below are included, all are encoded as uint32_t */ +#define LIBAXL_REQUEST_CHANGE_GC_FUNCTION 0x00000001UL +#define LIBAXL_REQUEST_CHANGE_GC_PLANE_MASK 0x00000002UL +#define LIBAXL_REQUEST_CHANGE_GC_FOREGROUND 0x00000004UL +#define LIBAXL_REQUEST_CHANGE_GC_BACKGROUND 0x00000008UL +#define LIBAXL_REQUEST_CHANGE_GC_LINE_WIDTH 0x00000010UL +#define LIBAXL_REQUEST_CHANGE_GC_LINE_STYLE 0x00000020UL +#define LIBAXL_REQUEST_CHANGE_GC_CAP_STYLE 0x00000040UL +#define LIBAXL_REQUEST_CHANGE_GC_JOIN_STYLE 0x00000080UL +#define LIBAXL_REQUEST_CHANGE_GC_FILL_STYLE 0x00000100UL +#define LIBAXL_REQUEST_CHANGE_GC_FILL_RULE 0x00000200UL +#define LIBAXL_REQUEST_CHANGE_GC_TILE 0x00000400UL +#define LIBAXL_REQUEST_CHANGE_GC_STIPPLE 0x00000800UL +#define LIBAXL_REQUEST_CHANGE_GC_TILE_STIPPLE_X_ORIGIN 0x00001000UL +#define LIBAXL_REQUEST_CHANGE_GC_TILE_STIPPLE_Y_ORIGIN 0x00002000UL +#define LIBAXL_REQUEST_CHANGE_GC_FONT 0x00004000UL +#define LIBAXL_REQUEST_CHANGE_GC_SUBWINDOW_MODE 0x00008000UL +#define LIBAXL_REQUEST_CHANGE_GC_GRAPHICS_EXPOSURES 0x00010000UL +#define LIBAXL_REQUEST_CHANGE_GC_CLIP_X_ORIGIN 0x00020000UL +#define LIBAXL_REQUEST_CHANGE_GC_CLIP_Y_ORIGIN 0x00040000UL +#define LIBAXL_REQUEST_CHANGE_GC_CLIP_MASK 0x00080000UL +#define LIBAXL_REQUEST_CHANGE_GC_DASH_OFFSET 0x00100000UL +#define LIBAXL_REQUEST_CHANGE_GC_DASHES 0x00200000UL +#define LIBAXL_REQUEST_CHANGE_GC_ARC_MODE 0x00400000UL + uint8_t function; /* See "gcontext function" in libaxl-consts.h */ + uint8_t __omitted1[3]; + uint32_t plane_mask; + uint32_t foreground; + uint32_t background; + uint16_t line_width; + uint8_t line_style; /* LIBAXL_SOLID, LIBAXL_ON_OFF_DASH, or LIBAXL_DOUBLE_DASH */ + uint8_t cap_style; /* See "cap style" in libaxl-consts.h (Beware of namespacing) */ + uint8_t join_style; /* See "join style" in libaxl-consts.h (Beware of namespacing) */ + uint8_t fill_style; /* LIBAXL_SOLID, LIBAXL_TILED, LIBAXL_STIPPLED, or LIBAXL_OPAQUE_STIPPLED */ + uint8_t fill_rule; /* LIBAXL_EVEN_ODD or LIBAXL_WINDING */ + uint8_t __omitted2; + libaxl_pixmap_t tile; + libaxl_pixmap_t stipple; + int16_t tile_stipple_x_origin; + int16_t tile_stipple_y_origin; + libaxl_font_t font; + uint8_t subwindow_mode; /* CLIP_BY_CHILDREN or INCLUDE_INFERIORS */ + libaxl_bool_t graphics_exposures; + uint16_t __omitted3; + int16_t clip_x_origin; + int16_t clip_y_origin; + libaxl_pixmap_t clip_mask; /* Can be LIBAXL_NONE */ + uint16_t dash_offset; + uint8_t dashes; + uint8_t arc_mode; /* LIBAXL_CHORD or LIBAXL_PIE_SLICE */ +}; + +struct libaxl_request_copy_gc { +#define LIBAXL_REQUEST_COPY_GC 57 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 4 */ + libaxl_gcontext_t src_gc; + libaxl_gcontext_t dest_gc; + uint32_t value_mask; +#define LIBAXL_REQUEST_COPY_GC_FUNCTION 0x00000001UL +#define LIBAXL_REQUEST_COPY_GC_PLANE_MASK 0x00000002UL +#define LIBAXL_REQUEST_COPY_GC_FOREGROUND 0x00000004UL +#define LIBAXL_REQUEST_COPY_GC_BACKGROUND 0x00000008UL +#define LIBAXL_REQUEST_COPY_GC_LINE_WIDTH 0x00000010UL +#define LIBAXL_REQUEST_COPY_GC_LINE_STYLE 0x00000020UL +#define LIBAXL_REQUEST_COPY_GC_CAP_STYLE 0x00000040UL +#define LIBAXL_REQUEST_COPY_GC_JOIN_STYLE 0x00000080UL +#define LIBAXL_REQUEST_COPY_GC_FILL_STYLE 0x00000100UL +#define LIBAXL_REQUEST_COPY_GC_FILL_RULE 0x00000200UL +#define LIBAXL_REQUEST_COPY_GC_TILE 0x00000400UL +#define LIBAXL_REQUEST_COPY_GC_STIPPLE 0x00000800UL +#define LIBAXL_REQUEST_COPY_GC_TILE_STIPPLE_X_ORIGIN 0x00001000UL +#define LIBAXL_REQUEST_COPY_GC_TILE_STIPPLE_Y_ORIGIN 0x00002000UL +#define LIBAXL_REQUEST_COPY_GC_FONT 0x00004000UL +#define LIBAXL_REQUEST_COPY_GC_SUBWINDOW_MODE 0x00008000UL +#define LIBAXL_REQUEST_COPY_GC_GRAPHICS_EXPOSURES 0x00010000UL +#define LIBAXL_REQUEST_COPY_GC_CLIP_X_ORIGIN 0x00020000UL +#define LIBAXL_REQUEST_COPY_GC_CLIP_Y_ORIGIN 0x00040000UL +#define LIBAXL_REQUEST_COPY_GC_CLIP_MASK 0x00080000UL +#define LIBAXL_REQUEST_COPY_GC_DASH_OFFSET 0x00100000UL +#define LIBAXL_REQUEST_COPY_GC_DASHES 0x00200000UL +#define LIBAXL_REQUEST_COPY_GC_ARC_MODE 0x00400000UL +}; + +struct libaxl_request_set_dashes { +#define LIBAXL_REQUEST_SET_DASHES 58 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_gcontext_t gc; + uint16_t dash_offset; + uint16_t length_of_dashes; + uint8_t *dashes; +}; + +struct libaxl_request_set_clip_rectangles { +#define LIBAXL_REQUEST_SET_CLIP_RECTANGLES 59 + uint8_t opcode; + uint8_t ordering; /* LIBAXL_UNSORTED, LIBAXL_YSORTED, LIBAXL_YXSORTED, or LIBAXL_YXBANDED */ + uint16_t _request_length; + libaxl_gcontext_t gc; + int16_t clip_x_origin; + int16_t clip_y_origin; + size_t number_of_rectangles; + struct libaxl_rectangle *rectangles; +}; + +struct libaxl_request_free_gc { +#define LIBAXL_REQUEST_FREE_GC 60 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_gcontext_t gc; +}; + +struct libaxl_request_clear_area { +#define LIBAXL_REQUEST_CLEAR_AREA 61 + uint8_t opcode; + libaxl_bool_t exposures; + uint16_t _request_length; /* = 4 */ + libaxl_window_t window; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; +}; + +struct libaxl_request_copy_area { +#define LIBAXL_REQUEST_COPY_AREA 62 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 7 */ + libaxl_drawable_t src_drawable; + libaxl_drawable_t dest_drawable; + libaxl_gcontext_t gc; + int16_t src_x; + int16_t src_y; + int16_t dest_x; + int16_t dest_y; + uint16_t width; + uint16_t height; +}; + +struct libaxl_request_copy_plane { +#define LIBAXL_REQUEST_COPY_PLANE 63 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 8 */ + libaxl_drawable_t src_drawable; + libaxl_drawable_t dest_drawable; + libaxl_gcontext_t gc; + int16_t src_x; + int16_t src_y; + int16_t dest_x; + int16_t dest_y; + uint16_t width; + uint16_t height; + uint32_t bit_plane; +}; + +struct libaxl_request_poly_point { +#define LIBAXL_REQUEST_POLY_POINT 64 + uint8_t opcode; + uint8_t coordinate_mode; /* LIBAXL_ORIGIN or LIBAXL_PREVIOUS */ + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + size_t number_of_points; + struct libaxl_point *points; +}; + +struct libaxl_request_poly_line { +#define LIBAXL_REQUEST_POLY_LINE 65 + uint8_t opcode; + uint8_t coordinate_mode; /* LIBAXL_ORIGIN or LIBAXL_PREVIOUS */ + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + struct libaxl_point *points; +}; + +struct libaxl_request_poly_segment { +#define LIBAXL_REQUEST_POLY_SEGMENT 66 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + size_t number_of_segments; + struct libaxl_segment *segments; +}; + +struct libaxl_request_poly_rectangle { +#define LIBAXL_REQUEST_POLY_RECTANGLE 67 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + size_t number_of_rectangles; + struct libaxl_rectangle *rectangle; +}; + +struct libaxl_request_poly_arc { +#define LIBAXL_REQUEST_POLY_ARC 68 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + size_t number_of_arcs; + struct libaxl_arc *arc; +}; + +struct libaxl_request_fill_poly { +#define LIBAXL_REQUEST_FILL_POLY 69 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + uint8_t shape; /* LIBAXL_COMPLEX, LIBAXL_NONCONVEX, or LIBAXL_CONVEX */ + uint8_t coordinate_mode; /* LIBAXL_ORIGIN or LIBAXL_PREVIOUS */ + uint16_t __pad2; + size_t number_of_pointss; + struct libaxl_point *points; +}; + +struct libaxl_request_poly_fill_rectangle { +#define LIBAXL_REQUEST_POLY_FILL_RECTANGLE 70 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + size_t number_of_rectangles; + struct libaxl_rectangle *rectangles; +}; + +struct libaxl_request_poly_fill_arc { +#define LIBAXL_REQUEST_POLY_FILL_ARC 71 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + size_t number_of_arcs; + struct libaxl_arc *arcs; +}; + +struct libaxl_request_put_image { +#define LIBAXL_REQUEST_PUT_IMAGE 72 + uint8_t opcode; + uint8_t format; /* LIBAXL_BITMAP, LIBAXL_XYPIXMAP, or LIBAXL_ZPIXMAP */ + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + uint16_t width; + uint16_t height; + int16_t dest_x; + int16_t dest_y; + uint8_t left_pad; + uint8_t depth; + uint16_t __pad; + size_t data_size; + uint8_t *data; +}; + +struct libaxl_request_get_image { +#define LIBAXL_REQUEST_GET_IMAGE 73 + uint8_t opcode; + uint8_t format; /* LIBAXL_XYPIXMAP (= 1) or LIBAXL_ZPIXMAP (= 2) */ + uint16_t _request_length; /* = 5 */ + libaxl_drawable_t drawable; + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + uint32_t plane_mask; +}; + +struct libaxl_request_poly_text8 { +#define LIBAXL_REQUEST_POLY_TEXT8 74 + uint8_t opcode; + uint8_t __unused; + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + int16_t x; + int16_t y; + size_t number_of_items; + union libaxl_text_item8 *items; +}; + +struct libaxl_request_poly_text16 { +#define LIBAXL_REQUEST_POLY_TEXT16 75 + uint8_t opcode; + uint8_t __unused; + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + int16_t x; + int16_t y; + size_t number_of_items; + union libaxl_text_item16 *items; +}; + +struct libaxl_request_image_text8 { +#define LIBAXL_REQUEST_IMAGE_TEXT8 76 + uint8_t opcode; + uint8_t length_of_string; + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + int16_t x; + int16_t y; + char *string; +}; + +struct libaxl_request_image_text16 { +#define LIBAXL_REQUEST_IMAGE_TEXT16 77 + uint8_t opcode; + uint8_t length_of_string; + uint16_t _request_length; + libaxl_drawable_t drawable; + libaxl_gcontext_t gc; + int16_t x; + int16_t y; + uint16_t *string; +}; + +struct libaxl_request_create_colormap { +#define LIBAXL_REQUEST_CREATE_COLORMAP 78 + uint8_t opcode; + uint8_t alloc; /* LIBAXL_NONE or LIBAXL_ALL */ + uint16_t _request_length; /* = 4 */ + libaxl_colormap_t mid; + libaxl_window_t window; + libaxl_visual_id_t visual; +}; + +struct libaxl_request_free_colormap { +#define LIBAXL_REQUEST_FREE_COLORMAP 79 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_colormap_t cmap; +}; + +struct libaxl_request_copy_colormap_and_free { +#define LIBAXL_REQUEST_COPY_COLORMAP_AND_FREE 80 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 3 */ + libaxl_colormap_t mid; + libaxl_colormap_t src_cmap; +}; + +struct libaxl_request_install_colormap { +#define LIBAXL_REQUEST_INSTALL_COLORMAP 81 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_colormap_t cmap; +}; + +struct libaxl_request_uninstall_colormap { +#define LIBAXL_REQUEST_UNINSTALL_COLORMAP 82 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_colormap_t cmap; +}; + +struct libaxl_request_list_installed_colormaps { +#define LIBAXL_REQUEST_LIST_INSTALLED_COLORMAPS 83 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_window_t window; +}; + +struct libaxl_request_alloc_color { +#define LIBAXL_REQUEST_ALLOC_COLOR 84 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; /* = 4 */ + libaxl_colormap_t cmap; + uint16_t red; + uint16_t green; + uint16_t blue; + uint16_t __pad2; +}; + +struct libaxl_request_alloc_named_color { +#define LIBAXL_REQUEST_ALLOC_NAMED_COLOR 85 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; + libaxl_colormap_t cmap; + uint16_t length_of_name; + uint16_t __pad2; + char *name; +}; + +struct libaxl_request_alloc_color_cells { +#define LIBAXL_REQUEST_ALLOC_COLOR_CELLS 86 + uint8_t opcode; + libaxl_bool_t contiguous; + uint16_t _request_length; /* = 3 */ + libaxl_colormap_t cmap; + uint16_t colors; + uint16_t planes; +}; + +struct libaxl_request_alloc_color_planes { +#define LIBAXL_REQUEST_ALLOC_COLOR_PLANES 87 + uint8_t opcode; + libaxl_bool_t contiguous; + uint16_t _request_length; /* = 4 */ + libaxl_colormap_t cmap; + uint16_t colors; + uint16_t reds; + uint16_t greens; + uint16_t blues; +}; + +struct libaxl_request_free_colors { +#define LIBAXL_REQUEST_FREE_COLORS 88 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_colormap_t cmap; + uint32_t plane_mask; + size_t number_of_pixels; + uint32_t *pixels; +}; + +struct libaxl_request_store_colors { +#define LIBAXL_REQUEST_STORE_COLORS 89 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_colormap_t cmap; + size_t number_of_items; + struct libaxl_coloritem *items; +}; + +struct libaxl_request_store_named_color { +#define LIBAXL_REQUEST_STORE_NAMED_COLOR 90 + uint8_t opcode; + uint8_t flags; /* See libaxl-consts.h */ + uint16_t _request_length; + libaxl_colormap_t cmap; + uint32_t pixel; + uint16_t length_of_name; + uint16_t __unused; + char *name; +}; + +struct libaxl_request_query_colors { +#define LIBAXL_REQUEST_QUERY_COLORS 91 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_colormap_t cmap; + size_t number_of_pixels; + uint32_t *pixels; +}; + +struct libaxl_request_lookup_color { +#define LIBAXL_REQUEST_LOOKUP_COLOR 92 + uint8_t opcode; + uint8_t __unused; + uint16_t _request_length; + libaxl_colormap_t cmap; + uint16_t length_of_name; + uint16_t __pad; + char *name; +}; + +struct libaxl_request_create_cursor { +#define LIBAXL_REQUEST_CREATE_CURSOR 93 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 8 */ + libaxl_cursor_t cid; + libaxl_pixmap_t source; + libaxl_pixmap_t mask; /* Can be LIBAXL_NONE */ + uint16_t fore_red; + uint16_t fore_green; + uint16_t fore_blue; + uint16_t back_red; + uint16_t back_green; + uint16_t back_blue; + uint16_t x; + uint16_t y; +}; + +struct libaxl_request_create_glyph_cursor { +#define LIBAXL_REQUEST_CREATE_GLYPH_CURSOR 94 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 8 */ + libaxl_cursor_t cid; + libaxl_font_t source_font; + libaxl_font_t mask_font; /* Can be LIBAXL_NONE */ + uint16_t source_char; + uint16_t mask_char; + uint16_t fore_red; + uint16_t fore_green; + uint16_t fore_blue; + uint16_t back_red; + uint16_t back_green; + uint16_t back_blue; +}; + +struct libaxl_request_free_cursor { +#define LIBAXL_REQUEST_FREE_CURSOR 95 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_cursor_t cursor; +}; + +struct libaxl_request_recolor_cursor { +#define LIBAXL_REQUEST_RECOLOR_CURSOR 96 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 5 */ + libaxl_cursor_t cursor; + uint16_t fore_red; + uint16_t fore_green; + uint16_t fore_blue; + uint16_t back_red; + uint16_t back_green; + uint16_t back_blue; +}; + +struct libaxl_request_query_best_size { +#define LIBAXL_REQUEST_QUERY_BEST_SIZE 97 + uint8_t opcode; + uint8_t class; /* LIBAXL_CURSOR, LIBAXL_TILE, or LIBAXL_STIPPLE */ + uint16_t _request_length; /* = 3 */ + libaxl_drawable_t drawable; + uint16_t width; + uint16_t height; +}; + +struct libaxl_request_query_extension { +#define LIBAXL_REQUEST_QUERY_EXTENSION 98 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + uint16_t length_of_name; + uint16_t __unused; + char *name; +}; + +struct libaxl_request_list_extensions { +#define LIBAXL_REQUEST_LIST_EXTENSIONS 99 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_change_keyboard_mapping { +#define LIBAXL_REQUEST_CHANGE_KEYBOARD_MAPPING 100 + uint8_t opcode; + uint8_t keycode_count; + uint16_t _request_length; + libaxl_keycode_t first_keycode; + uint8_t keysyms_per_keycode; + uint16_t __pad; + libaxl_keysym_t *keysyms; +}; + +struct libaxl_request_get_keyboard_mapping { +#define LIBAXL_REQUEST_GET_KEYBOARD_MAPPING 101 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; /* = 2 */ + libaxl_keycode_t first_keycode; + uint8_t count; + uint16_t __pad2; +}; + +struct libaxl_request_change_keyboard_control { +#define LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL 102 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + uint32_t value_mask; /* Determines which below are included, all are encoded as uint32_t */ +#define LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL_KEY_CLICK_PERCENT 0x0001U +#define LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL_BELL_PERCENT 0x0002U +#define LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL_BELL_PITCH 0x0004U +#define LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL_BELL_DURATION 0x0008U +#define LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL_LED 0x0010U +#define LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL_LED_MODE 0x0020U +#define LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL_KEY 0x0040U +#define LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL_AUTO_REPEAT_MODE 0x0080U + int8_t key_click_percent; + int8_t bell_percent; + int16_t bell_pitch; + int16_t bell_duration; + uint8_t led; + uint8_t led_mode; /* LIBAXL_OFF or LIBAXL_ON */ + libaxl_keycode_t key; + uint8_t auto_repeat_mode; /* LIBAXL_OFF, LIBAXL_ON, or LIBAXL_DEFAULT */ + uint16_t __omitted; +}; + +struct libaxl_request_get_keyboard_control { +#define LIBAXL_REQUEST_GET_KEYBOARD_CONTROL 103 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_bell { +#define LIBAXL_REQUEST_BELL 104 + uint8_t opcode; + int8_t percent; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_change_pointer_control { +#define LIBAXL_REQUEST_CHANGE_POINTER_CONTROL 105 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 3 */ + int16_t acceleration_numerator; + int16_t acceleration_denominator; + int16_t threshold; + libaxl_bool_t do_acceleration; + libaxl_bool_t do_threshold; +}; + +struct libaxl_request_get_pointer_control { +#define LIBAXL_REQUEST_GET_POINTER_CONTROL 106 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_set_screen_saver { +#define LIBAXL_REQUEST_SET_SCREEN_SAVER 107 + uint8_t opcode; + uint8_t __pad1; + uint16_t _request_length; /* = 3 */ + int16_t timeout; + int16_t interval; + uint8_t prefer_blanking; /* LIBAXL_NO, LIBAXL_YES, or LIBAXL_DEFAULT */ + uint8_t allow_exposures; /* LIBAXL_NO, LIBAXL_YES, or LIBAXL_DEFAULT */ + uint16_t __pad2; +}; + +struct libaxl_request_get_screen_saver { +#define LIBAXL_REQUEST_GET_SCREEN_SAVER 108 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_change_hosts { +#define LIBAXL_REQUEST_CHANGE_HOSTS 109 + uint8_t opcode; + uint8_t mode; /* LIBAXL_INSERT or LIBAXL_DELETE */ + uint16_t _request_length; + uint8_t family; /* See libaxl-consts.h */ + uint8_t __pad; + uint16_t length_of_address; + uint8_t *address; +}; + +struct libaxl_request_list_hosts { +#define LIBAXL_REQUEST_LIST_HOSTS 110 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_set_access_control { +#define LIBAXL_REQUEST_SET_ACCESS_CONTROL 111 + uint8_t opcode; + uint8_t mode; /* LIBAXL_DISABLE or LIBAXL_ENABLE */ + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_set_close_down_mode { +#define LIBAXL_REQUEST_SET_CLOSE_DOWN_MODE 112 + uint8_t opcode; + uint8_t mode; /* LIBAXL_DESTROY, LIBAXL_RETAIN_PERMANENT, or LIBAXL_RETAIN_TEMPORARY */ + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_kill_client { +#define LIBAXL_REQUEST_KILL_CLIENT 113 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 2 */ + libaxl_id_t resource; /* Can be LIBAXL_ALL_TEMPORARY */ +}; + +struct libaxl_request_rotate_properties { +#define LIBAXL_REQUEST_ROTATE_PROPERTIES 114 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; + libaxl_window_t window; + uint16_t number_of_properties; + int16_t delta; + libaxl_atom_t *properties; +}; + +struct libaxl_request_force_screen_saver { +#define LIBAXL_REQUEST_FORCE_SCREEN_SAVER 115 + uint8_t opcode; + uint8_t mode; /* LIBAXL_RESET or LIBAXL_ACTIVATE */ + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_set_pointer_mapping { +#define LIBAXL_REQUEST_SET_POINTER_MAPPING 116 + uint8_t opcode; + uint8_t length_of_map; + uint16_t _request_length; + uint8_t *map; +}; + +struct libaxl_request_get_pointer_mapping { +#define LIBAXL_REQUEST_GET_POINTER_MAPPING 117 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_set_modifier_mapping { +#define LIBAXL_REQUEST_SET_MODIFIER_MAPPING 118 + uint8_t opcode; + uint8_t keycodes_per_modifier; /* number of pairs */ + uint16_t _request_length; + libaxl_keycode_t *keycodes; +}; + +struct libaxl_request_get_modifier_mapping { +#define LIBAXL_REQUEST_GET_MODIFIER_MAPPING 119 + uint8_t opcode; + uint8_t __pad; + uint16_t _request_length; /* = 1 */ +}; + +struct libaxl_request_no_operation { +#define LIBAXL_REQUEST_NO_OPERATION 127 + uint8_t opcode; + uint8_t __pad; + uint16_t request_length; +}; + +union libaxl_request { /* TODO man page */ + struct { + uint8_t opcode; + uint8_t __data; + uint16_t _request_length; + }; +# include "libaxl-requests-structs.h" +}; + +union libaxl_request_const_ptr { /* TODO man page */ + void *as_voidptr; + union libaxl_request *as_union; +# include "libaxl-requests-ptr-structs.h" +} _LIBAXL_GCC_ONLY(__attribute__((__transparent_union__))); diff --git a/libaxl-types.h b/libaxl-types.h new file mode 100644 index 0000000..1826430 --- /dev/null +++ b/libaxl-types.h @@ -0,0 +1,133 @@ +/* See LICENSE file for copyright and license details. */ + +#include <stddef.h> +#include <stdint.h> + +typedef uint32_t libaxl_id_t; +typedef libaxl_id_t libaxl_window_t; +typedef libaxl_id_t libaxl_pixmap_t; +typedef libaxl_id_t libaxl_cursor_t; +typedef libaxl_id_t libaxl_font_t; +typedef libaxl_id_t libaxl_gcontext_t; +typedef libaxl_id_t libaxl_colormap_t; +typedef libaxl_id_t libaxl_drawable_t; /* libaxl_window_t or libaxl_pixmap_t */ +typedef libaxl_id_t libaxl_fontable_t; /* libaxl_font_t or libaxl_gcontext_t */ +typedef libaxl_id_t libaxl_atom_t; +typedef libaxl_id_t libaxl_visual_id_t; +typedef uint32_t libaxl_timestamp_t; +typedef uint32_t libaxl_keysym_t; +typedef uint8_t libaxl_keycode_t; +typedef uint8_t libaxl_button_t; +typedef uint8_t libaxl_bool_t; +typedef uint16_t libaxl_keybutmask_t; + +struct libaxl_point { + int16_t x; + int16_t y; +}; + +struct libaxl_segment { + int16_t x1; + int16_t y1; + int16_t x2; + int16_t y2; +}; + +struct libaxl_rectangle { + int16_t x; /* rightward offset from upper-left corner */ + int16_t y; /* downward offset from upper-left corner */ + uint16_t width; + uint16_t height; +}; + +struct libaxl_arc { + int16_t x; + int16_t y; + uint16_t width; + uint16_t height; + int16_t angle1; + int16_t angle2; +}; + +struct libaxl_char2b { + uint8_t byte1; + uint8_t byte2; +}; + +union libaxl_text_item8 { + struct { + uint8_t length_of_string; /* cannot be LIBAXL_FONT_SHIFT_INDICATOR (= 255) */ + int8_t delta; + char *string; + }; + struct { + uint8_t font_shift_indicator; /* must be LIBAXL_FONT_SHIFT_INDICATOR (= 255) */ + uint8_t font_byte_3; /* (most-significant) */ + uint8_t font_byte_2; + uint8_t font_byte_1; + uint8_t font_byte_0; /* (least-significant) */ + }; +}; + +union libaxl_text_item16 { + struct { + uint8_t length_of_string; /* in number of CHAR2Bs, cannot be LIBAXL_FONT_SHIFT_INDICATOR (= 255) */ + int8_t delta; + uint16_t *string; + }; + struct { + uint8_t font_shift_indicator; /* must be LIBAXL_FONT_SHIFT_INDICATOR (= 255) */ + uint8_t font_byte_3; /* (most-significant) */ + uint8_t font_byte_2; + uint8_t font_byte_1; + uint8_t font_byte_0; /* (least-significant) */ + }; +}; + +struct libaxl_coloritem { + uint32_t pixel; + uint16_t red; + uint16_t green; + uint16_t blue; + uint8_t flags; /* See libaxl-consts.h */ + uint8_t __unused; +}; + +struct libaxl_timecoord { + libaxl_timestamp_t time; + int16_t x; + int16_t y; +}; + +struct libaxl_fontprop { + libaxl_atom_t name; + uint32_t value; /* <32-bits> */ +}; + +struct libaxl_charinfo { + int16_t left_side_bearing; + int16_t right_side_bearing; + int16_t character_width; + int16_t ascent; + int16_t descent; + uint16_t attributes; +}; + +struct libaxl_rgb16 { + uint16_t red; + uint16_t green; + uint16_t blue; + uint16_t __unused; +}; + +struct libaxl_str8 { + uint8_t length; + char *name; +}; + +struct libaxl_host { + uint8_t family; /* See libaxl-consts.h */ + uint8_t __pad; + uint16_t length_of_address; + uint8_t *address; +}; diff --git a/libaxl.h b/libaxl.h new file mode 100644 index 0000000..d60cb17 --- /dev/null +++ b/libaxl.h @@ -0,0 +1,169 @@ +/* See LICENSE file for copyright and license details. */ +#ifndef LIBAXL_H +#define LIBAXL_H + +#if defined(__GNUC__) +# define _LIBAXL_GCC_ONLY(...) __VA_ARGS__ +#else +# define _LIBAXL_GCC_ONLY(...) +#endif + +#include "libaxl-types.h" +#include "libaxl-consts.h" +#include "libaxl-atoms.h" +#include "libaxl-events.h" +#include "libaxl-errors.h" +#include "libaxl-requests.h" +#include "libaxl-replies.h" + +/* libaxl error codes */ +#define LIBAXL_ERROR_SYSTEM -1 /* use `errno` */ +#define LIBAXL_ERROR_NO_DISPLAY_SERVER_SPECIFIED -2 +#define LIBAXL_ERROR_INVALID_DISPLAY_NAME_NO_DISPLAY_INDEX -3 +#define LIBAXL_ERROR_INVALID_DISPLAY_NAME_DISPLAY_INDEX_OUT_OF_DOMAIN -4 +#define LIBAXL_ERROR_INVALID_DISPLAY_NAME_INVALID_SCREEN_INDEX -5 +#define LIBAXL_ERROR_INVALID_DISPLAY_NAME_SCREEN_INDEX_OUT_OF_DOMAIN -6 +#define LIBAXL_ERROR_INVALID_REQUEST_OPCODE -7 +#define LIBAXL_ERROR_INVALID_FORMAT_NUMBER -8 +#define LIBAXL_ERROR_MALFORMATTED_REQUEST -9 +#define LIBAXL_ERROR_CONNECTION_CLOSED -10 +#define LIBAXL_ERROR_INVALID_REPLY_OPCODE -11 + +union libaxl_input { /* TODO man */ + uint8_t type; + union libaxl_error error; /* if .type = LIBAXL_ERROR */ + union libaxl_reply reply; /* if .type = LIBAXL_REPLY */ + union libaxl_event event; /* otherwise (.type = event type) */ +}; + +/** + * Opaque structure for connection to the X display server + */ +typedef struct libaxl_connection LIBAXL_CONNECTION; + +/** + * Opaque structure that wraps LIBAXL_CONNECTION with + * private data for the thread, all threads running at + * the same time shall access the display server + * via a unique LIBAXL_CONTEXT + */ +typedef struct libaxl_context LIBAXL_CONTEXT; + +/** + * Create context, for a thread, to use when accessing + * the display server + * + * @param conn The connection to the display server + * @return The context, NULL on failure (can only be out of memory) + */ +_LIBAXL_GCC_ONLY(__attribute__((__nonnull__, __malloc__, __warn_unused_result__))) +LIBAXL_CONTEXT *libaxl_context_create(LIBAXL_CONNECTION *); /* TODO man */ + +/** + * Deallocate a context + * + * @param ctx The context to deallocate + */ +void libaxl_context_free(LIBAXL_CONTEXT *); /* TODO man */ + +/** + * Generate a resource ID + * + * The generated resource ID can be deallocated + * with the `libaxl_deallocate_id` function + * + * @param ctx The thread's context for the connection + * @return The generated resource ID, 0 on failure + */ +libaxl_id_t libaxl_generate_id(LIBAXL_CONTEXT *); /* TODO man, implement */ + +/** + * Deallocate a resource ID so that it can be reused later + * + * @param ctx The thread's context for the connection + * @param id The generated resource ID to deallocate + */ +void libaxl_deallocate_id(LIBAXL_CONTEXT *, libaxl_id_t); /* TODO man, implement */ + +/** + * Parse a display name string + * + * The format for the display name string shall be either + * + * [<protocol>/][<host>]:<display>[.<screen>] + * + * or for the "unix" protocol + * + * <path>[.<screen>] + * + * @param name The display name string, $DISPLAY will be used if `NULL` or empty + * @param hostp Output parameter for the host of or (if the protocol is "unix") path + * to the display, remember to free after successful completion + * @param protocolp Output parameter for the network protocol used to access the display, + * remember to free after successful completion + * @param displayp Output parameter for the display's index (0 if the protocol is "unix") + * @param screenp Output parameter for the screen's index + * @return 0 on success, a negative libaxl error code on failure + */ +_LIBAXL_GCC_ONLY(__attribute__((__nonnull__(2, 3, 4, 5)))) +int libaxl_parse_display(const char *, char **, char **, int *, int *); /* TODO man */ + +/** + * Send a request to the display server + * + * May deadlock if called from an asynchronously called signal handler + * + * @param ctx The thread's context for the connection to the display to send the request over + * @param request The request to send, the function will not edit the content + * @param flags Flags to use for the 4th parameter when calling send(3) + * @param seqnump Output parameter for the request's sequence number + * @return 0 on success, a negative libaxl error code on failure + * + * If the function returns LIBAXL_ERROR_SYSTEM and sets `errno` + * to EINPROGRESS, the message has been saved (possibly partially + * sent) and pending to be sent by calling libaxl_flush(). In this + * case (and on success), `*seqnump` will be set. + * + * If the function returns LIBAXL_ERROR_SYSTEM and sets `errno` + * to EALREADY, libaxl_flush() must first be called, either because + * the previous call to this function returned LIBAXL_ERROR_SYSTEM + * and set `errno` to EINPROGRESS, or such happened in another + * thread. + */ +_LIBAXL_GCC_ONLY(__attribute__((__nonnull__))) +int libaxl_send_request(LIBAXL_CONTEXT *restrict, union libaxl_request_const_ptr, int, uint16_t *restrict); /* TODO man */ + +/** + * Send any pending messages to the display server + * + * @param conn The connection to the display server to flush + * @param flags Flags to use for the 4th parameter when calling send(3) + * @return 0 on success, a negative libaxl error code on failure + * + * If the function returns LIBAXL_ERROR_SYSTEM and sets `errno` + * to EINPROGRESS, call the function again. Note well, the + * EINPROGRESS error is caused by some other error, which could + * be EAGAIN (otherwise its probably EINTR). On success, there + * is nothing more to flush. + */ +_LIBAXL_GCC_ONLY(__attribute__((__nonnull__))) +int libaxl_flush(LIBAXL_CONNECTION *restrict, int); /* TODO man */ + +/** + * Receive the next pending message from the display server + * + * @param ctx The thread's context for the connection to the display server + * @param msgp Output parameter for the received message; the message will + * be vaild until the next time this function is called with the + * same `ctx` parameter or until the libaxl_context_free() function + * is called with the same `ctx` paramter (whichever comes first) + * @param flags Flags to use for the 4th parameter when calling recv(3) + * + * Behaviour is unspecified if SO_PEEK_OFF is active on the + * connection to the display server or if the MSG_PEEK flag + * is used + */ +_LIBAXL_GCC_ONLY(__attribute__((__nonnull__))) +int libaxl_receive(LIBAXL_CONTEXT *restrict, union libaxl_input *restrict, int); /* TODO man */ + +#endif diff --git a/libaxl_context_create.c b/libaxl_context_create.c new file mode 100644 index 0000000..da03ecf --- /dev/null +++ b/libaxl_context_create.c @@ -0,0 +1,18 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" + +LIBAXL_CONTEXT * +libaxl_context_create(LIBAXL_CONNECTION *conn) +{ + LIBAXL_CONTEXT *ctx; + ctx = liberror_malloc(sizeof(*ctx)); + if (ctx) { + ctx->conn = conn; + ctx->refcount = 1; + ctx->out_buf_size = 0; + ctx->out_buf = NULL; + ctx->in_buf_size = 0; + ctx->in_buf = NULL; + } + return ctx; +} diff --git a/libaxl_context_free.c b/libaxl_context_free.c new file mode 100644 index 0000000..c86f9de --- /dev/null +++ b/libaxl_context_free.c @@ -0,0 +1,12 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" + +void +libaxl_context_free(LIBAXL_CONTEXT *ctx) +{ + if (ctx && !--ctx->refcount) { + free(ctx->out_buf); + free(ctx->in_buf); + free(ctx); + } +} diff --git a/libaxl_flush.c b/libaxl_flush.c new file mode 100644 index 0000000..848dbe5 --- /dev/null +++ b/libaxl_flush.c @@ -0,0 +1,30 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" + +int +libaxl_flush(LIBAXL_CONNECTION *restrict conn, int flags) +{ + LIBAXL_CONTEXT *ctx; + ssize_t r; + + WLOCK_CONNECTION_SEND(conn); + + while ((ctx = conn->pending_out)) { + while (ctx->out_progress < ctx->out_length) { + r = liberror_send(conn->fd, &ctx->out_buf[ctx->out_progress], + ctx->out_length - ctx->out_progress, flags, "<display server>"); + if (r < 0) { + WUNLOCK_CONNECTION_SEND(conn); + return LIBAXL_ERROR_SYSTEM; + } + ctx->out_progress += (size_t)r; + } + + conn->pending_out = ctx->next_pending_out; + libaxl_context_free(ctx); + } + + WUNLOCK_CONNECTION_SEND(conn); + + return 0; +} diff --git a/libaxl_parse_display.c b/libaxl_parse_display.c new file mode 100644 index 0000000..1b304e3 --- /dev/null +++ b/libaxl_parse_display.c @@ -0,0 +1,154 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" + +int +libaxl_parse_display(const char *name, char **hostp, char **protocolp, int *displayp, int *screenp) +{ + char *p; + size_t n; + unsigned long int ul; + int err; + int saved_errno = errno; + struct stat st; + + *hostp = NULL; + *protocolp = NULL; + *displayp = 0; + *screenp = 0; + + /* Get display server name string, if not specified */ + if (!name || !*name) { + name = getenv("DISPLAY"); + if (!name || !*name) { + liberror_save_backtrace(NULL); + liberror_set_error("No display server specified", "libaxl_parse_display", "libaxl", + LIBAXL_ERROR_NO_DISPLAY_SERVER_SPECIFIED); + err = LIBAXL_ERROR_NO_DISPLAY_SERVER_SPECIFIED; + goto fail; + } + } + + /* Get path and test if protocol is "unix" */ + p = strrchr(name, '.'); + if (p && isdigit(*p)) { + errno = 0; + ul = strtoul(p, &p, 10); + if (errno || ul > (unsigned long int)INT_MAX) + p = NULL; + else + *screenp = (int)ul; + } + n = p ? (size_t)(p - name) : strlen(name); + if (n) { + *hostp = liberror_malloc(n + 1); + if (!*hostp) + goto errno_fail; + memcpy(*hostp, name, n); + (*hostp)[n] = '\0'; + if (stat(*hostp, &st) || (st.st_mode & S_IFMT) != S_IFSOCK) { + free(*hostp); + *hostp = NULL; + goto normal; + } + *protocolp = liberror_malloc(sizeof("unix")); + if (!*protocolp) + goto errno_fail; + stpcpy(*protocolp, "unix"); + goto done; + } + +normal: + /* Get protocol */ + p = strrchr(name, '/'); + if (p) { + n = (size_t)(p - name); + *protocolp = liberror_malloc(n + 1); + if (*protocolp) + goto errno_fail; + memcpy(*protocolp, name, n); + (*protocolp)[n] = '\0'; + name = &p[1]; + } + + /* Get host */ + p = strrchr(name, ':'); + if (!p) { + liberror_save_backtrace(NULL); + liberror_set_error("Invalid display name: no display index", "libaxl_parse_display", "libaxl", + LIBAXL_ERROR_INVALID_DISPLAY_NAME_NO_DISPLAY_INDEX); + err = LIBAXL_ERROR_INVALID_DISPLAY_NAME_NO_DISPLAY_INDEX; + goto fail; + } else { + n = (size_t)(p - name); + *hostp = liberror_malloc(n + 1); + if (!*hostp) + goto errno_fail; + memcpy(*hostp, name, n); + (*hostp)[n] = '\0'; + name = &p[1]; + } + + /* Get display */ + if (!isdigit(*name)) { + liberror_save_backtrace(NULL); + liberror_set_error("Invalid display name: no display index", "libaxl_parse_display", "libaxl", + LIBAXL_ERROR_INVALID_DISPLAY_NAME_NO_DISPLAY_INDEX); + err = LIBAXL_ERROR_INVALID_DISPLAY_NAME_NO_DISPLAY_INDEX; + goto fail; + } + saved_errno = errno; + errno = 0; + ul = strtoul(name, (void *)&name, 10); + if (errno || ul > (unsigned long int)(*hostp ? 65535 - X_TCP_PORT : INT_MAX)) { + liberror_save_backtrace(NULL); + liberror_set_error("Invalid display name: display index is out of domain", "libaxl_parse_display", "libaxl", + LIBAXL_ERROR_INVALID_DISPLAY_NAME_DISPLAY_INDEX_OUT_OF_DOMAIN); + err = LIBAXL_ERROR_INVALID_DISPLAY_NAME_DISPLAY_INDEX_OUT_OF_DOMAIN; + goto fail; + } + *displayp = (int)ul; + errno = saved_errno; + + /* Get screen */ + if (*name) + goto done; + if (!isdigit(*name)) { + liberror_save_backtrace(NULL); + liberror_set_error("Invalid display name: invalid screen index", "libaxl_parse_display", "libaxl", + LIBAXL_ERROR_INVALID_DISPLAY_NAME_INVALID_SCREEN_INDEX); + err = LIBAXL_ERROR_INVALID_DISPLAY_NAME_INVALID_SCREEN_INDEX; + goto fail; + } + errno = 0; + ul = strtoul(name, (void *)&name, 10); + if (errno || ul > (unsigned long int)INT_MAX) { + liberror_save_backtrace(NULL); + liberror_set_error("Invalid display name: screen index is out of domain", "libaxl_parse_display", "libaxl", + LIBAXL_ERROR_INVALID_DISPLAY_NAME_SCREEN_INDEX_OUT_OF_DOMAIN); + err = LIBAXL_ERROR_INVALID_DISPLAY_NAME_SCREEN_INDEX_OUT_OF_DOMAIN; + goto fail; + } + *screenp = (int)ul; + if (*name) { + liberror_save_backtrace(NULL); + liberror_set_error("Invalid display name: invalid screen index", "libaxl_parse_display", "libaxl", + LIBAXL_ERROR_INVALID_DISPLAY_NAME_INVALID_SCREEN_INDEX); + err = LIBAXL_ERROR_INVALID_DISPLAY_NAME_INVALID_SCREEN_INDEX; + goto fail; + } + +done: + errno = saved_errno; + return 0; + +errno_fail: + err = LIBAXL_ERROR_SYSTEM; +fail: + free(*protocolp); + *protocolp = NULL; + free(*hostp); + *hostp = NULL; + if (err != LIBAXL_ERROR_SYSTEM) + errno = EINVAL; + return err; +} diff --git a/libaxl_receive.c b/libaxl_receive.c new file mode 100644 index 0000000..bb4af68 --- /dev/null +++ b/libaxl_receive.c @@ -0,0 +1,621 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" + +static const char *const event_formats[] = { + /* + * . = 1 unused byte + * , = 2 unused bytes + * _ = 3 unused bytes + * - = 4 unused bytes + * # = 32 uint8_t + * ! = libaxl_bool_t + * 1 = uint8_t + * 2 = uint16_t + * 4 = uint32_t + * z = int8_t + * s = int16_t + * S = int32_t + * ? = special encoding + */ + [LIBAXL_ERROR] = "112421", + [LIBAXL_REPLY] = "?", + [LIBAXL_EVENT_KEY_PRESS] = "1124444ssss2!", + [LIBAXL_EVENT_KEY_RELEASE] = "1124444ssss2!", + [LIBAXL_EVENT_BUTTON_PRESS] = "1124444ssss2!", + [LIBAXL_EVENT_BUTTON_RELEASE] = "1124444ssss2!", + [LIBAXL_EVENT_MOTION_NOTIFY] = "1124444ssss2!", + [LIBAXL_EVENT_ENTER_NOTIFY] = "1124444ssss211", + [LIBAXL_EVENT_LEAVE_NOTIFY] = "1124444ssss211", + [LIBAXL_EVENT_FOCUS_IN] = "112411", + [LIBAXL_EVENT_FOCUS_OUT] = "112411", + [LIBAXL_EVENT_KEYMAP_NOTIFY] = "#", + [LIBAXL_EVENT_EXPOSE] = "1.2422222", + [LIBAXL_EVENT_GRAPHICS_EXPOSURE] = "1.242222221", + [LIBAXL_EVENT_NO_EXPOSURE] = "1.242", + [LIBAXL_EVENT_VISIBILITY_NOTIFY] = "1.241", + [LIBAXL_EVENT_CREATE_NOTIFY] = "1.244sssss!", + [LIBAXL_EVENT_DESTROY_NOTIFY] = "1.244", + [LIBAXL_EVENT_UNMAP_NOTIFY] = "1.244!", + [LIBAXL_EVENT_MAP_NOTIFY] = "1.244!", + [LIBAXL_EVENT_MAP_REQUEST] = "1.244", + [LIBAXL_EVENT_REPARENT_NOTIFY] = "1.2444ss!", + [LIBAXL_EVENT_CONFIGURE_NOTIFY] = "1.2444ss222!", + [LIBAXL_EVENT_CONFIGURE_REQUEST] = "112444ss2222", + [LIBAXL_EVENT_GRAVITY_NOTIFY] = "1.244ss", + [LIBAXL_EVENT_RESIZE_REQUEST] = "1.2422", + [LIBAXL_EVENT_CIRCULATE_NOTIFY] = "1.244-1", + [LIBAXL_EVENT_CIRCULATE_REQUEST] = "1.244-1", + [LIBAXL_EVENT_PROPERTY_NOTIFY] = "1.2441", + [LIBAXL_EVENT_SELECTION_CLEAR] = "1.2444", + [LIBAXL_EVENT_SELECTION_REQUEST] = "1.2444444", + [LIBAXL_EVENT_SELECTION_NOTIFY] = "1.244444", + [LIBAXL_EVENT_COLORMAP_NOTIFY] = "1.244!1", + [LIBAXL_EVENT_CLIENT_MESSAGE] = "11244", + [LIBAXL_EVENT_MAPPING_NOTIFY] = "1.2111" +}; + +static const char *const reply_formats[] = { + /* + * = = 8 unused bytes + * $ = previous marked length, in units + * % = previous marked format, in bits + * @ = non-encoded size_t length marked, align output to (size_t) + * u = STRING8, align output to (void *) and enter + * U = STRING16, align output to (void *) and enter + * d = data, uses %, align output to (void *) and enter + * * = following are repeated, align output to (void *) and enter + * & = * but requires allocation + * p = padding + */ + [0] = NULL, + [LIBAXL_REQUEST_CREATE_WINDOW] = NULL, + [LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES] = NULL, + [LIBAXL_REQUEST_GET_WINDOW_ATTRIBUTES] = "1124421144!!1!4442", + [LIBAXL_REQUEST_DESTROY_WINDOW] = NULL, + [LIBAXL_REQUEST_DESTROY_SUBWINDOWS] = NULL, + [LIBAXL_REQUEST_CHANGE_SAVE_SET] = NULL, + [LIBAXL_REQUEST_REPARENT_WINDOW] = NULL, + [LIBAXL_REQUEST_MAP_WINDOW] = NULL, + [LIBAXL_REQUEST_MAP_SUBWINDOWS] = NULL, + [LIBAXL_REQUEST_UNMAP_WINDOW] = NULL, + [LIBAXL_REQUEST_UNMAP_SUBWINDOWS] = NULL, + [LIBAXL_REQUEST_CONFIGURE_WINDOW] = NULL, + [LIBAXL_REQUEST_CIRCULATE_WINDOW] = NULL, + [LIBAXL_REQUEST_GET_GEOMETRY] = "1244ss222", + [LIBAXL_REQUEST_QUERY_TREE] = "1.24442$=-,*4", + [LIBAXL_REQUEST_INTERN_ATOM] = "1.244", + [LIBAXL_REQUEST_GET_ATOM_NAME] = "1.242$==-,u", + [LIBAXL_REQUEST_CHANGE_PROPERTY] = NULL, + [LIBAXL_REQUEST_DELETE_PROPERTY] = NULL, + [LIBAXL_REQUEST_GET_PROPERTY] = "11%24444$=-d", + [LIBAXL_REQUEST_LIST_PROPERTIES] = "1.242$==-,*4", + [LIBAXL_REQUEST_SET_SELECTION_OWNER] = NULL, + [LIBAXL_REQUEST_GET_SELECTION_OWNER] = "1.244", + [LIBAXL_REQUEST_CONVERT_SELECTION] = NULL, + [LIBAXL_REQUEST_SEND_EVENT] = NULL, + [LIBAXL_REQUEST_GRAB_POINTER] = "1124", + [LIBAXL_REQUEST_UNGRAB_POINTER] = NULL, + [LIBAXL_REQUEST_GRAB_BUTTON] = NULL, + [LIBAXL_REQUEST_UNGRAB_BUTTON] = NULL, + [LIBAXL_REQUEST_CHANGE_ACTIVE_POINTER_GRAB] = NULL, + [LIBAXL_REQUEST_GRAB_KEYBOARD] = "1124", + [LIBAXL_REQUEST_UNGRAB_KEYBOARD] = NULL, + [LIBAXL_REQUEST_GRAB_KEY] = NULL, + [LIBAXL_REQUEST_UNGRAB_KEY] = NULL, + [LIBAXL_REQUEST_ALLOW_EVENTS] = NULL, + [LIBAXL_REQUEST_GRAB_SERVER] = NULL, + [LIBAXL_REQUEST_UNGRAB_SERVER] = NULL, + [LIBAXL_REQUEST_QUERY_POINTER] = ".!2444ssss2", + [LIBAXL_REQUEST_GET_MOTION_EVENTS] = "1!244$==-*4ss", + [LIBAXL_REQUEST_TRANSLATE_COORDINATES] = "1!244ss", + [LIBAXL_REQUEST_WARP_POINTER] = NULL, + [LIBAXL_REQUEST_SET_INPUT_FOCUS] = "11244", + [LIBAXL_REQUEST_GET_INPUT_FOCUS] = NULL, + [LIBAXL_REQUEST_QUERY_KEYMAP] = "1.24#", + [LIBAXL_REQUEST_OPEN_FONT] = NULL, + [LIBAXL_REQUEST_CLOSE_FONT] = NULL, + [LIBAXL_REQUEST_QUERY_FONT] = "1.24sssss2-sssss2-2222$111!ss4$*44*sssss2", + [LIBAXL_REQUEST_QUERY_TEXT_EXTENTS] = "1124ssssSSS", + [LIBAXL_REQUEST_LIST_FONTS] = "1.242$==-,&1$u", + [LIBAXL_REQUEST_LIST_FONTS_WITH_INFO] = "11$24?sssss2-sssss2-2222$?111!ss4*44u", + [LIBAXL_REQUEST_SET_FONT_PATH] = NULL, + [LIBAXL_REQUEST_GET_FONT_PATH] = "1.242$==-,&1$u", + [LIBAXL_REQUEST_CREATE_PIXMAP] = NULL, + [LIBAXL_REQUEST_FREE_PIXMAP] = NULL, + [LIBAXL_REQUEST_CREATE_GC] = NULL, + [LIBAXL_REQUEST_CHANGE_GC] = NULL, + [LIBAXL_REQUEST_COPY_GC] = NULL, + [LIBAXL_REQUEST_SET_DASHES] = NULL, + [LIBAXL_REQUEST_SET_CLIP_RECTANGLES] = NULL, + [LIBAXL_REQUEST_FREE_GC] = NULL, + [LIBAXL_REQUEST_CLEAR_AREA] = NULL, + [LIBAXL_REQUEST_COPY_AREA] = NULL, + [LIBAXL_REQUEST_COPY_PLANE] = NULL, + [LIBAXL_REQUEST_POLY_POINT] = NULL, + [LIBAXL_REQUEST_POLY_LINE] = NULL, + [LIBAXL_REQUEST_POLY_SEGMENT] = NULL, + [LIBAXL_REQUEST_POLY_RECTANGLE] = NULL, + [LIBAXL_REQUEST_POLY_ARC] = NULL, + [LIBAXL_REQUEST_FILL_POLY] = NULL, + [LIBAXL_REQUEST_POLY_FILL_RECTANGLE] = NULL, + [LIBAXL_REQUEST_POLY_FILL_ARC] = NULL, + [LIBAXL_REQUEST_PUT_IMAGE] = NULL, + [LIBAXL_REQUEST_GET_IMAGE] = "11244==-@u", /* "u" is actually "*1" */ + [LIBAXL_REQUEST_POLY_TEXT8] = NULL, + [LIBAXL_REQUEST_POLY_TEXT16] = NULL, + [LIBAXL_REQUEST_IMAGE_TEXT8] = NULL, + [LIBAXL_REQUEST_IMAGE_TEXT16] = NULL, + [LIBAXL_REQUEST_CREATE_COLORMAP] = NULL, + [LIBAXL_REQUEST_FREE_COLORMAP] = NULL, + [LIBAXL_REQUEST_COPY_COLORMAP_AND_FREE] = NULL, + [LIBAXL_REQUEST_INSTALL_COLORMAP] = NULL, + [LIBAXL_REQUEST_UNINSTALL_COLORMAP] = NULL, + [LIBAXL_REQUEST_LIST_INSTALLED_COLORMAPS] = "1.242$==-,*4", + [LIBAXL_REQUEST_ALLOC_COLOR] = "1.24222,4", + [LIBAXL_REQUEST_ALLOC_NAMED_COLOR] = "1.244222222", + [LIBAXL_REQUEST_ALLOC_COLOR_CELLS] = "1.242$2$==-*4*4", + [LIBAXL_REQUEST_ALLOC_COLOR_PLANES] = "1.242$,444=*4", + [LIBAXL_REQUEST_FREE_COLORS] = NULL, + [LIBAXL_REQUEST_STORE_COLORS] = NULL, + [LIBAXL_REQUEST_STORE_NAMED_COLOR] = NULL, + [LIBAXL_REQUEST_QUERY_COLORS] = "1.242$==-,*222,", + [LIBAXL_REQUEST_LOOKUP_COLOR] = "1.24222222", + [LIBAXL_REQUEST_CREATE_CURSOR] = NULL, + [LIBAXL_REQUEST_CREATE_GLYPH_CURSOR] = NULL, + [LIBAXL_REQUEST_FREE_CURSOR] = NULL, + [LIBAXL_REQUEST_RECOLOR_CURSOR] = NULL, + [LIBAXL_REQUEST_QUERY_BEST_SIZE] = "1.2422", + [LIBAXL_REQUEST_QUERY_EXTENSION] = "1.24!1111", + [LIBAXL_REQUEST_LIST_EXTENSIONS] = "11$24===&1$u", + [LIBAXL_REQUEST_CHANGE_KEYBOARD_MAPPING] = NULL, + [LIBAXL_REQUEST_GET_KEYBOARD_MAPPING] = "1124$===*4", + [LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL] = NULL, + [LIBAXL_REQUEST_GET_KEYBOARD_CONTROL] = "112441122,#", + [LIBAXL_REQUEST_BELL] = NULL, + [LIBAXL_REQUEST_CHANGE_POINTER_CONTROL] = NULL, + [LIBAXL_REQUEST_GET_POINTER_CONTROL] = "1.24222", + [LIBAXL_REQUEST_SET_SCREEN_SAVER] = NULL, + [LIBAXL_REQUEST_GET_SCREEN_SAVER] = "1.242211", + [LIBAXL_REQUEST_CHANGE_HOSTS] = NULL, + [LIBAXL_REQUEST_LIST_HOSTS] = "1124$2==-,&1.2$up", /* "u" is actually "*1" */ + [LIBAXL_REQUEST_SET_ACCESS_CONTROL] = NULL, + [LIBAXL_REQUEST_SET_CLOSE_DOWN_MODE] = NULL, + [LIBAXL_REQUEST_KILL_CLIENT] = NULL, + [LIBAXL_REQUEST_ROTATE_PROPERTIES] = NULL, + [LIBAXL_REQUEST_FORCE_SCREEN_SAVER] = NULL, + [LIBAXL_REQUEST_SET_POINTER_MAPPING] = "1124", + [LIBAXL_REQUEST_GET_POINTER_MAPPING] = "11$24===*1", + [LIBAXL_REQUEST_SET_MODIFIER_MAPPING] = "1124", + [LIBAXL_REQUEST_GET_MODIFIER_MAPPING] = "11$24===*11", + [LIBAXL_REQUEST_NO_OPERATION] = NULL +}; + +/* TODO make it possible to prefetch pending messages */ +int +libaxl_receive(LIBAXL_CONTEXT *restrict ctx, union libaxl_input *restrict msgp, int flags) +{ + LIBAXL_CONNECTION *conn = ctx->conn; + const char *fmt; + char *restrict msg = (char *)msgp; + char *restrict inbuf, *data; + size_t format = 1, counts[] = {0, 0, 0}, count; + ssize_t r; + uint64_t n, u64; + uint8_t code; + size_t t, i, j, o, ic = 0, oc = 0; + int qc = 0; +#ifdef MSG_TRUNC + int flag_trunc; +#endif + +#ifdef MSG_TRUNC + flags ^= flag_trunc = flags & MSG_TRUNC; +#endif + + WLOCK_CONNECTION_RECV(conn); + + inbuf = conn->in_buf; + n = 32; + + if (conn->in_buf_size < n) { + inbuf = liberror_realloc(inbuf, n); + if (!inbuf) { + WUNLOCK_CONNECTION_RECV(conn); + return LIBAXL_ERROR_SYSTEM; + } + conn->in_buf = inbuf; + conn->in_buf_size = n; + } + + while (conn->in_progress < n) { + r = recv(conn->fd, &inbuf[conn->in_progress], n - conn->in_progress, flags); + if (r <= 0) { + WUNLOCK_CONNECTION_RECV(conn); + liberror_save_backtrace(NULL); + if (!r) { + liberror_set_error("The connection to the display server has been closed", + "libaxl_receive", "libaxl", LIBAXL_ERROR_CONNECTION_CLOSED); + return LIBAXL_ERROR_CONNECTION_CLOSED; + } + liberror_recv_failed(conn->fd, &inbuf[conn->in_progress], n - conn->in_progress, flags, "<display server>"); + return LIBAXL_ERROR_SYSTEM; + } + conn->in_progress += (size_t)r; + } + + code = *(uint8_t *)inbuf; + + if (code == LIBAXL_REPLY) { + n = (uint64_t)ntohl(*(uint32_t *)&inbuf[4]); + n = 4 * n + 32; + if (n > SIZE_MAX) { + WUNLOCK_CONNECTION_RECV(conn); + liberror_save_backtrace(NULL); + liberror_set_error("Received message is too large to allocate", + "libaxl_receive", "libaxl", LIBAXL_ERROR_SYSTEM); + errno = ENOMEM; + return LIBAXL_ERROR_SYSTEM; + } + if (conn->in_buf_size < n) { + inbuf = liberror_realloc(inbuf, n); + if (!inbuf) { + WUNLOCK_CONNECTION_RECV(conn); + return LIBAXL_ERROR_SYSTEM; + } + conn->in_buf = inbuf; + conn->in_buf_size = n; + } + while (conn->in_progress < n) { + r = recv(conn->fd, &inbuf[conn->in_progress], n - conn->in_progress, flags); + if (r <= 0) { + WUNLOCK_CONNECTION_RECV(conn); + liberror_save_backtrace(NULL); + if (!r) { + liberror_set_error("The connection to the display server has been closed", + "libaxl_receive", "libaxl", LIBAXL_ERROR_CONNECTION_CLOSED); + return LIBAXL_ERROR_CONNECTION_CLOSED; + } + liberror_recv_failed(conn->fd, &inbuf[conn->in_progress], n - conn->in_progress, + flags, "<display server>"); + return LIBAXL_ERROR_SYSTEM; + } + conn->in_progress += (size_t)r; + } + } + + conn->in_progress = 0; + +#ifdef MSG_TRUNC + if (flag_trunc) { + WUNLOCK_CONNECTION_RECV(conn); + return 0; + } +#endif + + t = conn->in_buf_size; + conn->in_buf_size = ctx->in_buf_size; + ctx->in_buf_size = t; + + conn->in_buf = ctx->in_buf; + ctx->in_buf = inbuf; + + WUNLOCK_CONNECTION_RECV(conn); + + if (code > sizeof(event_formats) / sizeof(*event_formats) || + !(fmt = event_formats[code])) { + liberror_save_backtrace(NULL); + liberror_set_error("Received message's code is invalid", "libaxl_receive", "libaxl", LIBAXL_ERROR_SYSTEM); + errno = EBADMSG; + return LIBAXL_ERROR_SYSTEM; + } + + for (i = 0; i < n; fmt++) { + switch (*fmt) { + case '\0': + goto end_of_fmt; + + case '.': + i += 1; + break; + + case ',': + i += 2; + break; + + case '_': + i += 3; + break; + + case '-': + i += 4; + break; + + case '#': + *(uint64_t *)&msg[i + 0] = *(uint64_t *)&inbuf[i + 0]; + *(uint64_t *)&msg[i + 8] = *(uint64_t *)&inbuf[i + 8]; + *(uint64_t *)&msg[i + 16] = *(uint64_t *)&inbuf[i + 16]; + *(uint64_t *)&msg[i + 24] = *(uint64_t *)&inbuf[i + 24]; + i += 32; + break; + + case '!': + case '1': + *(uint8_t *)&msg[i] = *(uint8_t *)&inbuf[i]; + i += 1; + break; + + case '2': + if (i + 2 <= n) { + liberror_save_backtrace(NULL); + goto short_msg; + } + *(uint16_t *)&msg[i] = ntohs(*(uint16_t *)&inbuf[i]); + i += 2; + break; + + case '4': + if (i + 4 <= n) { + liberror_save_backtrace(NULL); + goto short_msg; + } + *(uint32_t *)&msg[i] = ntohl(*(uint32_t *)&inbuf[i]); + i += 4; + break; + + case 'z': + *(uint8_t *)&msg[i] = *(uint8_t *)&inbuf[i]; + UNTWOS_COMPLEMENT8(&msg[i]); + i += 1; + break; + + case 's': + if (i + 2 <= n) { + liberror_save_backtrace(NULL); + goto short_msg; + } + *(uint16_t *)&msg[i] = ntohs(*(uint16_t *)&inbuf[i]); + UNTWOS_COMPLEMENT16(&msg[i]); + i += 2; + break; + + case 'S': + if (i + 4 <= n) { + liberror_save_backtrace(NULL); + goto short_msg; + } + *(uint32_t *)&msg[i] = ntohl(*(uint32_t *)&inbuf[i]); + UNTWOS_COMPLEMENT32(&msg[i]); + i += 4; + break; + + case '?': + /* We know it is LIBAXL_REPLY message */ + goto received_reply; + break; + + default: + abort(); + } + } + + if (*fmt) { + liberror_save_backtrace(NULL); + goto short_msg; + } + +end_of_fmt: + return 0; + +received_reply: + code = conn->request_map[ntohs(*(uint16_t *)&inbuf[2])]; /* read-lock here is pointless */ + fmt = reply_formats[code]; + if (!fmt) { + liberror_set_error("Received reply message with unrecognised opcode", + "libaxl_receive", "libaxl", LIBAXL_ERROR_INVALID_REPLY_OPCODE); + errno = EBADMSG; + return LIBAXL_ERROR_INVALID_REPLY_OPCODE; + } + + for (i = o = 0; i < n; fmt++) { + switch (*fmt) { + case '\0': + goto end_of_fmt; + + case '.': + i += 1; + o += 1; + break; + + case ',': + i += 2; + o += 2; + break; + + case '_': + i += 3; + o += 3; + break; + + case '-': + i += 4; + o += 4; + break; + + case '=': + i += 8; + o += 8; + break; + + case '#': + *(uint64_t *)&msg[o + 0] = *(uint64_t *)&inbuf[i + 0]; + *(uint64_t *)&msg[o + 8] = *(uint64_t *)&inbuf[i + 8]; + *(uint64_t *)&msg[o + 16] = *(uint64_t *)&inbuf[i + 16]; + *(uint64_t *)&msg[o + 24] = *(uint64_t *)&inbuf[i + 24]; + i += 32; + o += 32; + break; + + case '!': + case '1': + *(uint8_t *)&msg[o++] = *(uint8_t *)&inbuf[i++]; + break; + + case '2': + if (i + 2 <= n) { + liberror_save_backtrace(NULL); + goto short_msg; + } + *(uint16_t *)&msg[o] = ntohs(*(uint16_t *)&inbuf[i]); + i += 2; + o += 2; + break; + + case '4': + if (i + 4 <= n) { + liberror_save_backtrace(NULL); + goto short_msg; + } + *(uint32_t *)&msg[o] = ntohl(*(uint32_t *)&inbuf[i]); + i += 4; + o += 4; + break; + + case 'z': + *(uint8_t *)&msg[o] = *(uint8_t *)&inbuf[i]; + UNTWOS_COMPLEMENT8(&msg[o]); + i += 1; + o += 1; + break; + + case 's': + if (i + 2 <= n) { + liberror_save_backtrace(NULL); + goto short_msg; + } + *(uint16_t *)&msg[o] = ntohs(*(uint16_t *)&inbuf[i]); + UNTWOS_COMPLEMENT16(&msg[o]); + i += 2; + o += 2; + break; + + case 'S': + if (i + 4 <= n) { + liberror_save_backtrace(NULL); + goto short_msg; + } + *(uint32_t *)&msg[o] = ntohl(*(uint32_t *)&inbuf[i]); + UNTWOS_COMPLEMENT32(&msg[o]); + i += 4; + o += 4; + break; + + case '%': + if (fmt[-1] == '1') + format = (size_t)*(uint8_t *)&msg[i - 1]; + else if (fmt[-1] == '2') + format = (size_t)*(uint16_t *)&msg[i - 2]; + else + format = (size_t)*(uint32_t *)&msg[i - 4]; + break; + + case '@': + ALIGN(&o, size_t); + u64 = 4 * (uint64_t)*(uint32_t *)&msg[4]; + if (u64 > SIZE_MAX) { + liberror_save_backtrace(NULL); + goto corrupt_reply; + } + *(size_t *)&msg[o] = counts[ic++] = (size_t)u64; + o += sizeof(size_t); + break; + + case '$': + if (fmt[-1] == '2') + counts[ic++] = (size_t)*(uint16_t *)&msg[i - 2]; + else if (fmt[-1] == '1') + counts[ic++] = (size_t)*(uint8_t *)&msg[i - 1]; + else + counts[ic++] = (size_t)*(uint32_t *)&msg[i - 4]; + break; + + case 'p': + ALIGN(&i, uint32_t); + break; + + case 'u': + format = 8; + goto case_d; + + case 'U': + format = 16; + goto case_d; + + case 'd': + case_d: + ALIGN(&o, void *); + *(void **)&msg[o] = data = &inbuf[i]; + count = counts[oc++]; + count *= format / 8; + if (format == 16) { + for (j = 0; j < count; j += 2) + *(uint16_t *)&data[j] = ntohs(*(uint16_t *)&data[j]); + } else if (format == 32) { + for (j = 0; j < count; j += 2) + *(uint32_t *)&data[j] = ntohl(*(uint32_t *)&data[j]); + } else if (format != 8 && format != 0) { + liberror_save_backtrace(NULL); + goto corrupt_reply; + } + o += sizeof(void *); + i += count; + break; + + case '*': + ALIGN(&o, void *); + *(void **)&msg[o] = data = &inbuf[i]; + count = counts[oc++]; + /* TODO */ + break; + + case '&': /* TODO */ + /* + LIBAXL_REQUEST_LIST_FONTS + LIBAXL_REQUEST_GET_FONT_PATH + LIBAXL_REQUEST_LIST_EXTENSIONS + LIBAXL_REQUEST_LIST_HOSTS + */ + break; + + case '?': + /* We know that code == LIBAXL_REQUEST_LIST_FONTS_WITH_INFO */ + if (!qc++) { + if (!counts[0]) + goto done; + } else { + count = counts[0]; + counts[0] = counts[1]; + counts[1] = count; + } + break; + + default: + abort(); + } + } + + if (*fmt) { + liberror_save_backtrace(NULL); + short_msg: + liberror_set_error("Received message's is shorter than expected", "libaxl_receive", "libaxl", LIBAXL_ERROR_SYSTEM); + errno = EBADMSG; + return LIBAXL_ERROR_SYSTEM; + } + +done: + return 0; + +corrupt_reply: + liberror_set_error("Corrupt reply message received", "libaxl_receive", "libaxl", LIBAXL_ERROR_SYSTEM); + errno = EBADMSG; + return LIBAXL_ERROR_SYSTEM; +} diff --git a/libaxl_send_request.c b/libaxl_send_request.c new file mode 100644 index 0000000..0c77252 --- /dev/null +++ b/libaxl_send_request.c @@ -0,0 +1,537 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" + +static const char *const req_formats[] = { + /* + * . = 1 unused byte + * , = 2 unused bytes + * _ = 3 unused bytes + * ! = libaxl_bool_t + * 1 = uint8_t + * 2 = uint16_t + * 4 = uint32_t + * z = int8_t + * s = int16_t + * S = int32_t + * $ = previous marked length, in units + * % = previous marked format, in bits + * @ = non-encoded size_t length marked, align input to (size_t) + * u = STRING8, align input to (void *) and enter + * U = STRING16, align input to (void *) and enter + * d = data, uses %, align input to (void *) and enter + * e = event, align input to (union libaxl_event) + * ? = jump to special encoding routine + * * = following are repeated, align input to (void *) and enter + * | = following are included and encoded as uint32_t if corresponding bit is set in previous + * + * The bytes 2–3 (starting at 0) are ignored here because its + * the length field and will be filled in by the function + */ + [LIBAXL_REQUEST_CREATE_WINDOW] = "11,44ss222244|4444111.44!!,4444", + [LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES] = "1_44|4444111.44111.44!!,4444", + [LIBAXL_REQUEST_GET_WINDOW_ATTRIBUTES] = "1_4", + [LIBAXL_REQUEST_DESTROY_WINDOW] = "1_4", + [LIBAXL_REQUEST_DESTROY_SUBWINDOWS] = "1_4", + [LIBAXL_REQUEST_CHANGE_SAVE_SET] = "11,4", + [LIBAXL_REQUEST_REPARENT_WINDOW] = "1_44ss", + [LIBAXL_REQUEST_MAP_WINDOW] = "1_4", + [LIBAXL_REQUEST_MAP_SUBWINDOWS] = "1_4", + [LIBAXL_REQUEST_UNMAP_WINDOW] = "1_4", + [LIBAXL_REQUEST_UNMAP_SUBWINDOWS] = "1_4", + [LIBAXL_REQUEST_CONFIGURE_WINDOW] = "1_42|,ss222,1", + [LIBAXL_REQUEST_CIRCULATE_WINDOW] = "11,4", + [LIBAXL_REQUEST_GET_GEOMETRY] = "1_4", + [LIBAXL_REQUEST_QUERY_TREE] = "1_4", + [LIBAXL_REQUEST_INTERN_ATOM] = "1!,2$,u", + [LIBAXL_REQUEST_GET_ATOM_NAME] = "1_4", + [LIBAXL_REQUEST_CHANGE_PROPERTY] = "11,4441%_4$d", + [LIBAXL_REQUEST_DELETE_PROPERTY] = "11,44", + [LIBAXL_REQUEST_GET_PROPERTY] = "1_44444", + [LIBAXL_REQUEST_LIST_PROPERTIES] = "1_4", + [LIBAXL_REQUEST_SET_SELECTION_OWNER] = "1_444", + [LIBAXL_REQUEST_GET_SELECTION_OWNER] = "1_4", + [LIBAXL_REQUEST_CONVERT_SELECTION] = "1_4444", + [LIBAXL_REQUEST_SEND_EVENT] = "1!,44e", + [LIBAXL_REQUEST_GRAB_POINTER] = "1!,4211444", + [LIBAXL_REQUEST_UNGRAB_POINTER] = "1_4", + [LIBAXL_REQUEST_GRAB_BUTTON] = "1_4211441.2", + [LIBAXL_REQUEST_UNGRAB_BUTTON] = "11,42,", + [LIBAXL_REQUEST_CHANGE_ACTIVE_POINTER_GRAB] = "1_442,", + [LIBAXL_REQUEST_GRAB_KEYBOARD] = "1!,4411,", + [LIBAXL_REQUEST_UNGRAB_KEYBOARD] = "1_4", + [LIBAXL_REQUEST_GRAB_KEY] = "1!,42111_", + [LIBAXL_REQUEST_UNGRAB_KEY] = "11,42,", + [LIBAXL_REQUEST_ALLOW_EVENTS] = "11,4", + [LIBAXL_REQUEST_GRAB_SERVER] = "1_", + [LIBAXL_REQUEST_UNGRAB_SERVER] = "1_", + [LIBAXL_REQUEST_QUERY_POINTER] = "1_4", + [LIBAXL_REQUEST_GET_MOTION_EVENTS] = "1_444", + [LIBAXL_REQUEST_TRANSLATE_COORDINATES] = "1_44ss", + [LIBAXL_REQUEST_WARP_POINTER] = "1_44ss22ss", + [LIBAXL_REQUEST_SET_INPUT_FOCUS] = "11,44", + [LIBAXL_REQUEST_GET_INPUT_FOCUS] = "1_", + [LIBAXL_REQUEST_QUERY_KEYMAP] = "1_", + [LIBAXL_REQUEST_OPEN_FONT] = "1_42$,u", + [LIBAXL_REQUEST_CLOSE_FONT] = "1_4", + [LIBAXL_REQUEST_QUERY_FONT] = "1_4", + [LIBAXL_REQUEST_QUERY_TEXT_EXTENTS] = "1_4@?U", + [LIBAXL_REQUEST_LIST_FONTS] = "1_22$u", + [LIBAXL_REQUEST_LIST_FONTS_WITH_INFO] = "1_22$u", + [LIBAXL_REQUEST_SET_FONT_PATH] = "1_2$,*1$u", + [LIBAXL_REQUEST_GET_FONT_PATH] = "1_", + [LIBAXL_REQUEST_CREATE_PIXMAP] = "11,4422", + [LIBAXL_REQUEST_FREE_PIXMAP] = "11,4", + [LIBAXL_REQUEST_CREATE_GC] = "1_444|1_444211111.44ss41!,ss4211", + [LIBAXL_REQUEST_CHANGE_GC] = "1_44|1_444211111.44ss41!,ss4211", + [LIBAXL_REQUEST_COPY_GC] = "1_444|1_444211111.44ss41!,ss4211", + [LIBAXL_REQUEST_SET_DASHES] = "1_422$*1", + [LIBAXL_REQUEST_SET_CLIP_RECTANGLES] = "11,4ss@*ss22", + [LIBAXL_REQUEST_FREE_GC] = "1_4", + [LIBAXL_REQUEST_CLEAR_AREA] = "1!,4ss22", + [LIBAXL_REQUEST_COPY_AREA] = "1_444ssss22", + [LIBAXL_REQUEST_COPY_PLANE] = "1_444ssss224", + [LIBAXL_REQUEST_POLY_POINT] = "11,44@*ss", + [LIBAXL_REQUEST_POLY_LINE] = "11,44@*ss", + [LIBAXL_REQUEST_POLY_SEGMENT] = "1_44@*ssss", + [LIBAXL_REQUEST_POLY_RECTANGLE] = "1_44@*ss22", + [LIBAXL_REQUEST_POLY_ARC] = "1_44@*ss22ss", + [LIBAXL_REQUEST_FILL_POLY] = "1_4411,@*ss", + [LIBAXL_REQUEST_POLY_FILL_RECTANGLE] = "1_44@*ss22", + [LIBAXL_REQUEST_POLY_FILL_ARC] = "1_44@*ss22ss", + [LIBAXL_REQUEST_PUT_IMAGE] = "11,4422ss11,@*1", + [LIBAXL_REQUEST_GET_IMAGE] = "11,4ss224", + [LIBAXL_REQUEST_POLY_TEXT8] = "1_44ss@*?1$zu\0""11111", + [LIBAXL_REQUEST_POLY_TEXT16] = "1_44ss@*?1$zU\0""11111", + [LIBAXL_REQUEST_IMAGE_TEXT8] = "11$,44ssu", + [LIBAXL_REQUEST_IMAGE_TEXT16] = "11$,44ssU", + [LIBAXL_REQUEST_CREATE_COLORMAP] = "11,444", + [LIBAXL_REQUEST_FREE_COLORMAP] = "1_4", + [LIBAXL_REQUEST_COPY_COLORMAP_AND_FREE] = "1_44", + [LIBAXL_REQUEST_INSTALL_COLORMAP] = "1_4", + [LIBAXL_REQUEST_UNINSTALL_COLORMAP] = "1_4", + [LIBAXL_REQUEST_LIST_INSTALLED_COLORMAPS] = "1_4", + [LIBAXL_REQUEST_ALLOC_COLOR] = "1_4222,", + [LIBAXL_REQUEST_ALLOC_NAMED_COLOR] = "1_42$,u", + [LIBAXL_REQUEST_ALLOC_COLOR_CELLS] = "1!,422", + [LIBAXL_REQUEST_ALLOC_COLOR_PLANES] = "1!,42222", + [LIBAXL_REQUEST_FREE_COLORS] = "1_44@*4", + [LIBAXL_REQUEST_STORE_COLORS] = "1_4@*42221.", + [LIBAXL_REQUEST_STORE_NAMED_COLOR] = "11,442$,u", + [LIBAXL_REQUEST_QUERY_COLORS] = "1_4@*4", + [LIBAXL_REQUEST_LOOKUP_COLOR] = "1_42$,u", + [LIBAXL_REQUEST_CREATE_CURSOR] = "1_4422222222", + [LIBAXL_REQUEST_CREATE_GLYPH_CURSOR] = "1_44422222222", + [LIBAXL_REQUEST_FREE_CURSOR] = "1_4", + [LIBAXL_REQUEST_RECOLOR_CURSOR] = "1_4222222", + [LIBAXL_REQUEST_QUERY_BEST_SIZE] = "11,422", + [LIBAXL_REQUEST_QUERY_EXTENSION] = "1_2$,u", + [LIBAXL_REQUEST_LIST_EXTENSIONS] = "1_", + [LIBAXL_REQUEST_CHANGE_KEYBOARD_MAPPING] = "11,11,?*4", + [LIBAXL_REQUEST_GET_KEYBOARD_MAPPING] = "1_11,", + [LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL] = "1_4|zzss1111", + [LIBAXL_REQUEST_GET_KEYBOARD_CONTROL] = "1_", + [LIBAXL_REQUEST_BELL] = "1z,", + [LIBAXL_REQUEST_CHANGE_POINTER_CONTROL] = "1_sss!!", + [LIBAXL_REQUEST_GET_POINTER_CONTROL] = "1_", + [LIBAXL_REQUEST_SET_SCREEN_SAVER] = "1_ss11,", + [LIBAXL_REQUEST_GET_SCREEN_SAVER] = "1_", + [LIBAXL_REQUEST_CHANGE_HOSTS] = "11,1.2$*1", + [LIBAXL_REQUEST_LIST_HOSTS] = "1_", + [LIBAXL_REQUEST_SET_ACCESS_CONTROL] = "11,", + [LIBAXL_REQUEST_SET_CLOSE_DOWN_MODE] = "11,", + [LIBAXL_REQUEST_KILL_CLIENT] = "1_4", + [LIBAXL_REQUEST_ROTATE_PROPERTIES] = "1_42$s*4", + [LIBAXL_REQUEST_FORCE_SCREEN_SAVER] = "11,", + [LIBAXL_REQUEST_SET_POINTER_MAPPING] = "11$,*1", + [LIBAXL_REQUEST_GET_POINTER_MAPPING] = "1_", + [LIBAXL_REQUEST_SET_MODIFIER_MAPPING] = "11$,*11", + [LIBAXL_REQUEST_GET_MODIFIER_MAPPING] = "1_", + [LIBAXL_REQUEST_NO_OPERATION] = "1_?" +}; + +static int +send_all(int fd, void *restrict data, size_t n, int flags, size_t *restrict progressp) +{ + char *bs = data; + ssize_t r; + + while (n) { + r = liberror_send(fd, bs, n, flags, "<display server>"); + if (r < 0) + return -1; + bs += r, n -= (size_t)r; + *progressp += (size_t)r; + } + + return 0; +} + +/* TODO make it possible to send multiple request in the same syscall */ +int +libaxl_send_request(LIBAXL_CONTEXT *restrict ctx, union libaxl_request_const_ptr request, int flags, uint16_t *restrict seqnump) +{ + LIBAXL_CONNECTION *conn = ctx->conn; + LIBAXL_CONTEXT *pending, **pendingp; + const char *req = request.as_voidptr; + uint8_t code = *(const uint8_t *)req; + const char *fmt, *repeat = NULL, *data; + size_t i = 0, o = 0, j, n; + size_t count = 0, format = 1, repcnt = 0; + uint32_t mask; + char *buf = ctx->out_buf, *subbuf, *new; + size_t size = ctx->out_buf_size; + + RLOCK_CONNECTION_SEND(conn); + pending = conn->pending_out; + RUNLOCK_CONNECTION_SEND(conn); + if (pending) { + liberror_save_backtrace(NULL); + liberror_set_error(pending == ctx + ? "Request from the previous call is pending to be flush" + : "A request from another thread is pending to be flushed", + "libaxl_send_request", "errno", EALREADY); + errno = EALREADY; + return LIBAXL_ERROR_SYSTEM; + } + + if (!code || (code > LIBAXL_REQUEST_GET_MODIFIER_MAPPING && code != LIBAXL_REQUEST_NO_OPERATION)) { + liberror_save_backtrace(NULL); + liberror_set_error("Invalid request opcode", "libaxl_send_request", "libaxl", + LIBAXL_ERROR_INVALID_REQUEST_OPCODE); + errno = EINVAL; + return LIBAXL_ERROR_INVALID_REQUEST_OPCODE; + } + + fmt = req_formats[code]; + +again: + for (;; fmt++) { + if (o + 4 > size) { + size += 32; + new = liberror_realloc(buf, size); + if (!new) + return LIBAXL_ERROR_SYSTEM; + ctx->out_buf = buf = new; + ctx->out_buf_size = size; + } + + switch (*fmt) { + case '\0': + if (repeat && --count) { + fmt = repeat; + goto again; + } + goto done; + + case '_': + buf[o++] = 0; /* need not be 0 */ + /* fall through */ + case ',': + buf[o++] = 0; /* need not be 0 */ + /* fall through */ + case '.': + buf[o++] = 0; /* need not be 0 */ + break; + + case '!': + buf[o++] = !!req[i++]; + break; + + case '1': + buf[o++] = req[i++]; + break; + + case '2': + *(uint16_t *)&buf[o] = htons(*(const uint16_t *)&req[i]); + i += 2; + o += 2; + break; + + case '4': + *(uint32_t *)&buf[o] = htonl(*(const uint32_t *)&req[i]); + i += 4; + o += 4; + break; + + case 'z': + buf[o] = req[i]; + TWOS_COMPLEMENT8(&buf[o]); + i += 1; + o += 1; + break; + + case 's': + *(uint16_t *)&buf[o] = htons(*(const uint16_t *)&req[i]); + TWOS_COMPLEMENT16(&buf[o]); + i += 2; + o += 2; + break; + + case 'S': + *(uint32_t *)&buf[o] = htonl(*(const uint32_t *)&req[i]); + TWOS_COMPLEMENT32(&buf[o]); + i += 4; + o += 4; + break; + + case '$': + if (fmt[-1] == '2') + count = (size_t)*(const uint16_t *)&req[i - 2]; + else if (fmt[-1] == '1') + count = (size_t)*(const uint8_t *)&req[i - 1]; + else + count = (size_t)*(const uint32_t *)&req[i - 4]; + break; + + case '%': + if (fmt[-1] == '1') + format = (size_t)*(const uint8_t *)&req[i - 1]; + else if (fmt[-1] == '2') + format = (size_t)*(const uint16_t *)&req[i - 2]; + else + format = (size_t)*(const uint32_t *)&req[i - 4]; + break; + + case '@': + ALIGN(&i, size_t); + count = *(const size_t *)&req[i - 2]; + break; + + case 'u': + format = 8; + goto case_d; + + case 'U': + format = 16; + goto case_d; + + case 'd': + case_d: + ALIGN(&i, void *); + data = *(const char *const *)&req[i]; + count *= format / 8; + if (o + count > size) { + size += (count & 3) ? (count | 3) + 1 : count; + new = liberror_realloc(buf, size); + if (!new) + return LIBAXL_ERROR_SYSTEM; + ctx->out_buf = buf = new; + ctx->out_buf_size = size; + } + subbuf = &buf[o]; + if (format == 8) { + for (j = 0; j < count; j += 1) + *(uint8_t *)&subbuf[j] = *(const uint8_t *)&data[j]; + } else if (format == 16) { + for (j = 0; j < count; j += 2) + *(uint16_t *)&subbuf[j] = htons(*(const uint16_t *)&data[j]); + } else if (format == 32) { + for (j = 0; j < count; j += 4) + *(uint32_t *)&subbuf[j] = htonl(*(const uint32_t *)&data[j]); + } else if (format != 0) { + liberror_save_backtrace(NULL); + liberror_set_error("Invalid format number", "libaxl_send_request", "libaxl", + LIBAXL_ERROR_INVALID_FORMAT_NUMBER); + errno = EINVAL; + return LIBAXL_ERROR_INVALID_FORMAT_NUMBER; + } + o += count; + i += count; + break; + + case 'e': /* TODO event */ + ALIGN(&i, union libaxl_event); + break; + + case '?': + fmt++; + goto special_encoding; + + case '*': + repcnt = count; + if (!repcnt) + goto done; + ALIGN(&i, void *); + req = *(const char *const *)&req[i]; + repeat = &fmt[1]; + i = 0; + break; + + case '|': + if (fmt[-1] == '4') + mask = *(const uint32_t *)&req[i - 4]; + else if (fmt[-1] == '2') + mask = (uint32_t)*(const uint16_t *)&req[i - 2]; + else + mask = (uint32_t)*(const uint8_t *)&req[i - 1]; + for (fmt++;; fmt++) { + if (o + 4 > size) { + size += 32; + new = liberror_realloc(buf, size); + if (!new) + return LIBAXL_ERROR_SYSTEM; + ctx->out_buf = buf = new; + ctx->out_buf_size = size; + } + + switch (*fmt) { + case '\0': + goto done; + + case '.': + i += 1; + break; + + case ',': + i += 2; + break; + + case '_': + i += 3; + break; + + case '!': + if (mask & 1) { + *(uint32_t *)&buf[o] = htonl((uint32_t)(req[i] ? 1 : 0)); + o += 4; + } + mask >>= 1; + i += 1; + break; + + case '1': + case 'z': + if (mask & 1) { + *(uint32_t *)&buf[o] = htonl((uint32_t)*(const uint8_t *)&req[i]); + if (*fmt == 'z') + TWOS_COMPLEMENT8(&buf[o]); + o += 4; + } + mask >>= 1; + i += 1; + break; + + case '2': + case 's': + if (mask & 1) { + *(uint32_t *)&buf[o] = htonl((uint32_t)*(const uint16_t *)&req[i]); + if (*fmt == 'z') + TWOS_COMPLEMENT16(&buf[o]); + o += 4; + } + mask >>= 1; + i += 2; + break; + + case '4': + case 'S': + if (mask & 1) { + *(uint32_t *)&buf[o] = htonl(*(const uint32_t *)&req[i]); + if (*fmt == 'z') + TWOS_COMPLEMENT32(&buf[o]); + o += 4; + } + mask >>= 1; + i += 4; + break; + + default: + abort(); + }; + } + + default: + abort(); + } + } + +special_encoding: + switch (code) { + case LIBAXL_REQUEST_QUERY_TEXT_EXTENTS: + buf[2] = (count & 1); /* _odd_length */ + break; + + case LIBAXL_REQUEST_CHANGE_KEYBOARD_MAPPING: + count = (size_t)((const union libaxl_request *)req)->change_keyboard_mapping.keycode_count; + count *= (size_t)((const union libaxl_request *)req)->change_keyboard_mapping.keysyms_per_keycode; + goto again; + + case LIBAXL_REQUEST_POLY_TEXT8: + case LIBAXL_REQUEST_POLY_TEXT16: + if (((const uint8_t *)req)[i] == LIBAXL_FONT_SHIFT_INDICATOR) + while (*fmt++); + goto again; + + case LIBAXL_REQUEST_NO_OPERATION: + if (!((const union libaxl_request *)req)->_request_length) { + liberror_save_backtrace(NULL); + liberror_set_error("Malformatted request: request length most be at least 1 byte-quad", + "libaxl_send_request", "libaxl", LIBAXL_ERROR_MALFORMATTED_REQUEST); + errno = EINVAL; + return LIBAXL_ERROR_MALFORMATTED_REQUEST; + } + o = 4 * (size_t)((const union libaxl_request *)req)->_request_length; + if (o > size) { + new = liberror_realloc(buf, o); + if (!new) + return LIBAXL_ERROR_SYSTEM; + ctx->out_buf = buf = new; + ctx->out_buf_size = size = o; + memset(&buf[4], 0, o - 4); + } + break; + + default: + abort(); + } + +done: + if (o & 3) { + n = o; + o = (o | 3) + 1; + if (o > size) { + new = liberror_realloc(buf, o); + if (!new) + return LIBAXL_ERROR_SYSTEM; + ctx->out_buf = buf = new; + ctx->out_buf_size = o; + memset(&buf[n], 0, o - n); + } + } + n = o / 4; + if (n > UINT16_MAX) { + liberror_save_backtrace(NULL); + liberror_set_error("Message is too long, cannot be longer than 65535 byte-quads", + "libaxl_send_request", "errno", EMSGSIZE); + errno = EMSGSIZE; + return LIBAXL_ERROR_SYSTEM; + } + *(uint16_t *)&buf[2] = htons((uint16_t)n); /* _request_length */ + ctx->out_length = o; + ctx->out_progress = 0; + + WLOCK_CONNECTION_SEND(conn); + + *seqnump = ++conn->last_seqnum; + conn->request_map[*seqnump] = code; + if (send_all(conn->fd, ctx->out_buf, ctx->out_length, flags, &ctx->out_progress)) { + ctx->next_pending_out = NULL; + pendingp = &conn->pending_out; + while (*pendingp) + pendingp = &(*pendingp)->next_pending_out; + *pendingp = ctx; + ctx->refcount += 1; + + WUNLOCK_CONNECTION_SEND(conn); + + liberror_save_backtrace(NULL); + liberror_set_error("Request has been buffered and is ready to be sent", + "libaxl_send_request", "errno", EINPROGRESS); + errno = EINPROGRESS; + return LIBAXL_ERROR_SYSTEM; + } + + WUNLOCK_CONNECTION_SEND(conn); + + return 0; +} diff --git a/linux.mk b/linux.mk new file mode 100644 index 0000000..18032ea --- /dev/null +++ b/linux.mk @@ -0,0 +1,5 @@ +LIBEXT = so +LIBFLAGS = -shared -Wl,-soname,libaxl.$(LIBEXT).$(LIB_MAJOR) + +LIBMAJOREXT = $(LIBEXT).$(LIB_MAJOR) +LIBMINOREXT = $(LIBEXT).$(LIB_VERSION) diff --git a/macos.mk b/macos.mk new file mode 100644 index 0000000..b475197 --- /dev/null +++ b/macos.mk @@ -0,0 +1,5 @@ +LIBEXT = dylib +LIBFLAGS = -dynamiclib + +LIBMAJOREXT = $(LIB_MAJOR).$(LIBEXT) +LIBMINOREXT = $(LIB_VERSION).$(LIBEXT) diff --git a/struct_libaxl_error_access.3 b/struct_libaxl_error_access.3 new file mode 120000 index 0000000..7a5244c --- /dev/null +++ b/struct_libaxl_error_access.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_ACCESS.3
\ No newline at end of file diff --git a/struct_libaxl_error_alloc.3 b/struct_libaxl_error_alloc.3 new file mode 120000 index 0000000..c5b0dce --- /dev/null +++ b/struct_libaxl_error_alloc.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_ALLOC.3
\ No newline at end of file diff --git a/struct_libaxl_error_atom.3 b/struct_libaxl_error_atom.3 new file mode 120000 index 0000000..ea3e17b --- /dev/null +++ b/struct_libaxl_error_atom.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_ATOM.3
\ No newline at end of file diff --git a/struct_libaxl_error_colormap.3 b/struct_libaxl_error_colormap.3 new file mode 120000 index 0000000..8334249 --- /dev/null +++ b/struct_libaxl_error_colormap.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_COLORMAP.3
\ No newline at end of file diff --git a/struct_libaxl_error_cursor.3 b/struct_libaxl_error_cursor.3 new file mode 120000 index 0000000..bcbe218 --- /dev/null +++ b/struct_libaxl_error_cursor.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_CURSOR.3
\ No newline at end of file diff --git a/struct_libaxl_error_drawable.3 b/struct_libaxl_error_drawable.3 new file mode 120000 index 0000000..e74b368 --- /dev/null +++ b/struct_libaxl_error_drawable.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_DRAWABLE.3
\ No newline at end of file diff --git a/struct_libaxl_error_font.3 b/struct_libaxl_error_font.3 new file mode 120000 index 0000000..4839245 --- /dev/null +++ b/struct_libaxl_error_font.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_FONT.3
\ No newline at end of file diff --git a/struct_libaxl_error_gcontext.3 b/struct_libaxl_error_gcontext.3 new file mode 120000 index 0000000..7503dad --- /dev/null +++ b/struct_libaxl_error_gcontext.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_GCONTEXT.3
\ No newline at end of file diff --git a/struct_libaxl_error_id_choice.3 b/struct_libaxl_error_id_choice.3 new file mode 120000 index 0000000..73775fb --- /dev/null +++ b/struct_libaxl_error_id_choice.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_ID_CHOICE.3
\ No newline at end of file diff --git a/struct_libaxl_error_implementation.3 b/struct_libaxl_error_implementation.3 new file mode 120000 index 0000000..7e0b052 --- /dev/null +++ b/struct_libaxl_error_implementation.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_IMPLEMENTATION.3
\ No newline at end of file diff --git a/struct_libaxl_error_length.3 b/struct_libaxl_error_length.3 new file mode 120000 index 0000000..eeffe3e --- /dev/null +++ b/struct_libaxl_error_length.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_LENGTH.3
\ No newline at end of file diff --git a/struct_libaxl_error_match.3 b/struct_libaxl_error_match.3 new file mode 120000 index 0000000..3bbc2f9 --- /dev/null +++ b/struct_libaxl_error_match.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_MATCH.3
\ No newline at end of file diff --git a/struct_libaxl_error_name.3 b/struct_libaxl_error_name.3 new file mode 120000 index 0000000..b276cb6 --- /dev/null +++ b/struct_libaxl_error_name.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_NAME.3
\ No newline at end of file diff --git a/struct_libaxl_error_pixmap.3 b/struct_libaxl_error_pixmap.3 new file mode 120000 index 0000000..bcf7712 --- /dev/null +++ b/struct_libaxl_error_pixmap.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_PIXMAP.3
\ No newline at end of file diff --git a/struct_libaxl_error_request.3 b/struct_libaxl_error_request.3 new file mode 120000 index 0000000..aa53dff --- /dev/null +++ b/struct_libaxl_error_request.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_REQUEST.3
\ No newline at end of file diff --git a/struct_libaxl_error_value.3 b/struct_libaxl_error_value.3 new file mode 120000 index 0000000..8dc4ab3 --- /dev/null +++ b/struct_libaxl_error_value.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_VALUE.3
\ No newline at end of file diff --git a/struct_libaxl_error_window.3 b/struct_libaxl_error_window.3 new file mode 120000 index 0000000..2534991 --- /dev/null +++ b/struct_libaxl_error_window.3 @@ -0,0 +1 @@ +LIBAXL_ERROR_WINDOW.3
\ No newline at end of file diff --git a/struct_libaxl_reply_alloc_color.3 b/struct_libaxl_reply_alloc_color.3 new file mode 120000 index 0000000..0483dfc --- /dev/null +++ b/struct_libaxl_reply_alloc_color.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_ALLOC_COLOR.3
\ No newline at end of file diff --git a/struct_libaxl_reply_alloc_color_cells.3 b/struct_libaxl_reply_alloc_color_cells.3 new file mode 120000 index 0000000..7dfa1b3 --- /dev/null +++ b/struct_libaxl_reply_alloc_color_cells.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_ALLOC_COLOR_CELLS.3
\ No newline at end of file diff --git a/struct_libaxl_reply_alloc_color_planes.3 b/struct_libaxl_reply_alloc_color_planes.3 new file mode 120000 index 0000000..748b87e --- /dev/null +++ b/struct_libaxl_reply_alloc_color_planes.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_ALLOC_COLOR_PLANES.3
\ No newline at end of file diff --git a/struct_libaxl_reply_alloc_named_color.3 b/struct_libaxl_reply_alloc_named_color.3 new file mode 120000 index 0000000..32c6d01 --- /dev/null +++ b/struct_libaxl_reply_alloc_named_color.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_ALLOC_NAMED_COLOR.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_atom_name.3 b/struct_libaxl_reply_get_atom_name.3 new file mode 120000 index 0000000..1f0bc8f --- /dev/null +++ b/struct_libaxl_reply_get_atom_name.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_ATOM_NAME.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_font_path.3 b/struct_libaxl_reply_get_font_path.3 new file mode 120000 index 0000000..2a27291 --- /dev/null +++ b/struct_libaxl_reply_get_font_path.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_FONT_PATH.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_geometry.3 b/struct_libaxl_reply_get_geometry.3 new file mode 120000 index 0000000..3859c00 --- /dev/null +++ b/struct_libaxl_reply_get_geometry.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_GEOMETRY.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_image.3 b/struct_libaxl_reply_get_image.3 new file mode 120000 index 0000000..9ef4f86 --- /dev/null +++ b/struct_libaxl_reply_get_image.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_IMAGE.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_input_focus.3 b/struct_libaxl_reply_get_input_focus.3 new file mode 120000 index 0000000..087d8a0 --- /dev/null +++ b/struct_libaxl_reply_get_input_focus.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_INPUT_FOCUS.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_keyboard_control.3 b/struct_libaxl_reply_get_keyboard_control.3 new file mode 120000 index 0000000..976c991 --- /dev/null +++ b/struct_libaxl_reply_get_keyboard_control.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_KEYBOARD_CONTROL.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_keyboard_mapping.3 b/struct_libaxl_reply_get_keyboard_mapping.3 new file mode 120000 index 0000000..4ab8439 --- /dev/null +++ b/struct_libaxl_reply_get_keyboard_mapping.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_KEYBOARD_MAPPING.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_modifier_mapping.3 b/struct_libaxl_reply_get_modifier_mapping.3 new file mode 120000 index 0000000..00419a1 --- /dev/null +++ b/struct_libaxl_reply_get_modifier_mapping.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_MODIFIER_MAPPING.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_motion_events.3 b/struct_libaxl_reply_get_motion_events.3 new file mode 120000 index 0000000..c7b6e2a --- /dev/null +++ b/struct_libaxl_reply_get_motion_events.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_MOTION_EVENTS.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_pointer_control.3 b/struct_libaxl_reply_get_pointer_control.3 new file mode 120000 index 0000000..ce0da76 --- /dev/null +++ b/struct_libaxl_reply_get_pointer_control.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_POINTER_CONTROL.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_pointer_mapping.3 b/struct_libaxl_reply_get_pointer_mapping.3 new file mode 120000 index 0000000..11d1b54 --- /dev/null +++ b/struct_libaxl_reply_get_pointer_mapping.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_POINTER_MAPPING.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_property.3 b/struct_libaxl_reply_get_property.3 new file mode 120000 index 0000000..423f1e5 --- /dev/null +++ b/struct_libaxl_reply_get_property.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_PROPERTY.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_screen_saver.3 b/struct_libaxl_reply_get_screen_saver.3 new file mode 120000 index 0000000..d9af812 --- /dev/null +++ b/struct_libaxl_reply_get_screen_saver.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_SCREEN_SAVER.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_selection_owner.3 b/struct_libaxl_reply_get_selection_owner.3 new file mode 120000 index 0000000..2d7117e --- /dev/null +++ b/struct_libaxl_reply_get_selection_owner.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_SELECTION_OWNER.3
\ No newline at end of file diff --git a/struct_libaxl_reply_get_window_attributes.3 b/struct_libaxl_reply_get_window_attributes.3 new file mode 120000 index 0000000..bbf4665 --- /dev/null +++ b/struct_libaxl_reply_get_window_attributes.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_WINDOW_ATTRIBUTES.3
\ No newline at end of file diff --git a/struct_libaxl_reply_grab_keyboard.3 b/struct_libaxl_reply_grab_keyboard.3 new file mode 120000 index 0000000..1a89009 --- /dev/null +++ b/struct_libaxl_reply_grab_keyboard.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GRAB_KEYBOARD.3
\ No newline at end of file diff --git a/struct_libaxl_reply_grab_pointer.3 b/struct_libaxl_reply_grab_pointer.3 new file mode 120000 index 0000000..4b2a1ce --- /dev/null +++ b/struct_libaxl_reply_grab_pointer.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GRAB_POINTER.3
\ No newline at end of file diff --git a/struct_libaxl_reply_intern_atom.3 b/struct_libaxl_reply_intern_atom.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/struct_libaxl_reply_intern_atom.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/struct_libaxl_reply_list_extensions.3 b/struct_libaxl_reply_list_extensions.3 new file mode 120000 index 0000000..d08ed7b --- /dev/null +++ b/struct_libaxl_reply_list_extensions.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LIST_EXTENSIONS.3
\ No newline at end of file diff --git a/struct_libaxl_reply_list_fonts.3 b/struct_libaxl_reply_list_fonts.3 new file mode 120000 index 0000000..344a66e --- /dev/null +++ b/struct_libaxl_reply_list_fonts.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LIST_FONTS.3
\ No newline at end of file diff --git a/struct_libaxl_reply_list_fonts_with_info.3 b/struct_libaxl_reply_list_fonts_with_info.3 new file mode 120000 index 0000000..f3518f0 --- /dev/null +++ b/struct_libaxl_reply_list_fonts_with_info.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LIST_FONTS_WITH_INFO.3
\ No newline at end of file diff --git a/struct_libaxl_reply_list_hosts.3 b/struct_libaxl_reply_list_hosts.3 new file mode 120000 index 0000000..f486b67 --- /dev/null +++ b/struct_libaxl_reply_list_hosts.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LIST_HOSTS.3
\ No newline at end of file diff --git a/struct_libaxl_reply_list_installed_colormaps.3 b/struct_libaxl_reply_list_installed_colormaps.3 new file mode 120000 index 0000000..2ebfe57 --- /dev/null +++ b/struct_libaxl_reply_list_installed_colormaps.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LIST_INSTALLED_COLORMAPS.3
\ No newline at end of file diff --git a/struct_libaxl_reply_list_properties.3 b/struct_libaxl_reply_list_properties.3 new file mode 120000 index 0000000..c0396ef --- /dev/null +++ b/struct_libaxl_reply_list_properties.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LIST_PROPERTIES.3
\ No newline at end of file diff --git a/struct_libaxl_reply_lookup_color.3 b/struct_libaxl_reply_lookup_color.3 new file mode 120000 index 0000000..4980488 --- /dev/null +++ b/struct_libaxl_reply_lookup_color.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LOOKUP_COLOR.3
\ No newline at end of file diff --git a/struct_libaxl_reply_query_best_size.3 b/struct_libaxl_reply_query_best_size.3 new file mode 120000 index 0000000..48bc9b2 --- /dev/null +++ b/struct_libaxl_reply_query_best_size.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_BEST_SIZE.3
\ No newline at end of file diff --git a/struct_libaxl_reply_query_colors.3 b/struct_libaxl_reply_query_colors.3 new file mode 120000 index 0000000..47dfe2d --- /dev/null +++ b/struct_libaxl_reply_query_colors.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_COLORS.3
\ No newline at end of file diff --git a/struct_libaxl_reply_query_extension.3 b/struct_libaxl_reply_query_extension.3 new file mode 120000 index 0000000..8aaa609 --- /dev/null +++ b/struct_libaxl_reply_query_extension.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_EXTENSION.3
\ No newline at end of file diff --git a/struct_libaxl_reply_query_font.3 b/struct_libaxl_reply_query_font.3 new file mode 120000 index 0000000..1c0a93f --- /dev/null +++ b/struct_libaxl_reply_query_font.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_FONT.3
\ No newline at end of file diff --git a/struct_libaxl_reply_query_keymap.3 b/struct_libaxl_reply_query_keymap.3 new file mode 120000 index 0000000..7a51bed --- /dev/null +++ b/struct_libaxl_reply_query_keymap.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_KEYMAP.3
\ No newline at end of file diff --git a/struct_libaxl_reply_query_pointer.3 b/struct_libaxl_reply_query_pointer.3 new file mode 120000 index 0000000..2124c39 --- /dev/null +++ b/struct_libaxl_reply_query_pointer.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_POINTER.3
\ No newline at end of file diff --git a/struct_libaxl_reply_query_text_extents.3 b/struct_libaxl_reply_query_text_extents.3 new file mode 120000 index 0000000..83e56c4 --- /dev/null +++ b/struct_libaxl_reply_query_text_extents.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_TEXT_EXTENTS.3
\ No newline at end of file diff --git a/struct_libaxl_reply_query_tree.3 b/struct_libaxl_reply_query_tree.3 new file mode 120000 index 0000000..fc5d759 --- /dev/null +++ b/struct_libaxl_reply_query_tree.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_TREE.3
\ No newline at end of file diff --git a/struct_libaxl_reply_set_modifier_mapping.3 b/struct_libaxl_reply_set_modifier_mapping.3 new file mode 120000 index 0000000..aec5aae --- /dev/null +++ b/struct_libaxl_reply_set_modifier_mapping.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SET_MODIFIER_MAPPING.3
\ No newline at end of file diff --git a/struct_libaxl_reply_set_pointer_mapping.3 b/struct_libaxl_reply_set_pointer_mapping.3 new file mode 120000 index 0000000..967b48b --- /dev/null +++ b/struct_libaxl_reply_set_pointer_mapping.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SET_POINTER_MAPPING.3
\ No newline at end of file diff --git a/struct_libaxl_reply_translate_coordinates.3 b/struct_libaxl_reply_translate_coordinates.3 new file mode 120000 index 0000000..77b289e --- /dev/null +++ b/struct_libaxl_reply_translate_coordinates.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_TRANSLATE_COORDINATES.3
\ No newline at end of file diff --git a/struct_libaxl_request_alloc_color.3 b/struct_libaxl_request_alloc_color.3 new file mode 120000 index 0000000..0483dfc --- /dev/null +++ b/struct_libaxl_request_alloc_color.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_ALLOC_COLOR.3
\ No newline at end of file diff --git a/struct_libaxl_request_alloc_color_cells.3 b/struct_libaxl_request_alloc_color_cells.3 new file mode 120000 index 0000000..7dfa1b3 --- /dev/null +++ b/struct_libaxl_request_alloc_color_cells.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_ALLOC_COLOR_CELLS.3
\ No newline at end of file diff --git a/struct_libaxl_request_alloc_color_planes.3 b/struct_libaxl_request_alloc_color_planes.3 new file mode 120000 index 0000000..748b87e --- /dev/null +++ b/struct_libaxl_request_alloc_color_planes.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_ALLOC_COLOR_PLANES.3
\ No newline at end of file diff --git a/struct_libaxl_request_alloc_named_color.3 b/struct_libaxl_request_alloc_named_color.3 new file mode 120000 index 0000000..32c6d01 --- /dev/null +++ b/struct_libaxl_request_alloc_named_color.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_ALLOC_NAMED_COLOR.3
\ No newline at end of file diff --git a/struct_libaxl_request_allow_events.3 b/struct_libaxl_request_allow_events.3 new file mode 120000 index 0000000..46e7be1 --- /dev/null +++ b/struct_libaxl_request_allow_events.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_ALLOW_EVENTS.3
\ No newline at end of file diff --git a/struct_libaxl_request_bell.3 b/struct_libaxl_request_bell.3 new file mode 120000 index 0000000..c0923dc --- /dev/null +++ b/struct_libaxl_request_bell.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_BELL.3
\ No newline at end of file diff --git a/struct_libaxl_request_change_active_pointer_grab.3 b/struct_libaxl_request_change_active_pointer_grab.3 new file mode 120000 index 0000000..2bcdd57 --- /dev/null +++ b/struct_libaxl_request_change_active_pointer_grab.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CHANGE_ACTIVE_POINTER_GRAB.3
\ No newline at end of file diff --git a/struct_libaxl_request_change_gc.3 b/struct_libaxl_request_change_gc.3 new file mode 120000 index 0000000..7ef3050 --- /dev/null +++ b/struct_libaxl_request_change_gc.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CHANGE_GC.3
\ No newline at end of file diff --git a/struct_libaxl_request_change_hosts.3 b/struct_libaxl_request_change_hosts.3 new file mode 120000 index 0000000..1a48e3b --- /dev/null +++ b/struct_libaxl_request_change_hosts.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CHANGE_HOSTS.3
\ No newline at end of file diff --git a/struct_libaxl_request_change_keyboard_control.3 b/struct_libaxl_request_change_keyboard_control.3 new file mode 120000 index 0000000..08929be --- /dev/null +++ b/struct_libaxl_request_change_keyboard_control.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CHANGE_KEYBOARD_CONTROL.3
\ No newline at end of file diff --git a/struct_libaxl_request_change_keyboard_mapping.3 b/struct_libaxl_request_change_keyboard_mapping.3 new file mode 120000 index 0000000..a9d655a --- /dev/null +++ b/struct_libaxl_request_change_keyboard_mapping.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CHANGE_KEYBOARD_MAPPING.3
\ No newline at end of file diff --git a/struct_libaxl_request_change_pointer_control.3 b/struct_libaxl_request_change_pointer_control.3 new file mode 120000 index 0000000..60c2961 --- /dev/null +++ b/struct_libaxl_request_change_pointer_control.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CHANGE_POINTER_CONTROL.3
\ No newline at end of file diff --git a/struct_libaxl_request_change_property.3 b/struct_libaxl_request_change_property.3 new file mode 120000 index 0000000..913cd50 --- /dev/null +++ b/struct_libaxl_request_change_property.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CHANGE_PROPERTY.3
\ No newline at end of file diff --git a/struct_libaxl_request_change_save_set.3 b/struct_libaxl_request_change_save_set.3 new file mode 120000 index 0000000..20a0cd7 --- /dev/null +++ b/struct_libaxl_request_change_save_set.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CHANGE_SAVE_SET.3
\ No newline at end of file diff --git a/struct_libaxl_request_change_window_attributes.3 b/struct_libaxl_request_change_window_attributes.3 new file mode 120000 index 0000000..2b43b0c --- /dev/null +++ b/struct_libaxl_request_change_window_attributes.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CHANGE_WINDOW_ATTRIBUTES.3
\ No newline at end of file diff --git a/struct_libaxl_request_circulate_window.3 b/struct_libaxl_request_circulate_window.3 new file mode 120000 index 0000000..a711df6 --- /dev/null +++ b/struct_libaxl_request_circulate_window.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CIRCULATE_WINDOW.3
\ No newline at end of file diff --git a/struct_libaxl_request_clear_area.3 b/struct_libaxl_request_clear_area.3 new file mode 120000 index 0000000..67f77e1 --- /dev/null +++ b/struct_libaxl_request_clear_area.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CLEAR_AREA.3
\ No newline at end of file diff --git a/struct_libaxl_request_close_font.3 b/struct_libaxl_request_close_font.3 new file mode 120000 index 0000000..f3c8ceb --- /dev/null +++ b/struct_libaxl_request_close_font.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CLOSE_FONT.3
\ No newline at end of file diff --git a/struct_libaxl_request_configure_window.3 b/struct_libaxl_request_configure_window.3 new file mode 120000 index 0000000..9fb56ec --- /dev/null +++ b/struct_libaxl_request_configure_window.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CONFIGURE_WINDOW.3
\ No newline at end of file diff --git a/struct_libaxl_request_convert_selection.3 b/struct_libaxl_request_convert_selection.3 new file mode 120000 index 0000000..54db24a --- /dev/null +++ b/struct_libaxl_request_convert_selection.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CONVERT_SELECTION.3
\ No newline at end of file diff --git a/struct_libaxl_request_copy_area.3 b/struct_libaxl_request_copy_area.3 new file mode 120000 index 0000000..be1667f --- /dev/null +++ b/struct_libaxl_request_copy_area.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_COPY_AREA.3
\ No newline at end of file diff --git a/struct_libaxl_request_copy_colormap_and_free.3 b/struct_libaxl_request_copy_colormap_and_free.3 new file mode 120000 index 0000000..38e8716 --- /dev/null +++ b/struct_libaxl_request_copy_colormap_and_free.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_COPY_COLORMAP_AND_FREE.3
\ No newline at end of file diff --git a/struct_libaxl_request_copy_gc.3 b/struct_libaxl_request_copy_gc.3 new file mode 120000 index 0000000..af73c28 --- /dev/null +++ b/struct_libaxl_request_copy_gc.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_COPY_GC.3
\ No newline at end of file diff --git a/struct_libaxl_request_copy_plane.3 b/struct_libaxl_request_copy_plane.3 new file mode 120000 index 0000000..e2cebd9 --- /dev/null +++ b/struct_libaxl_request_copy_plane.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_COPY_PLANE.3
\ No newline at end of file diff --git a/struct_libaxl_request_create_colormap.3 b/struct_libaxl_request_create_colormap.3 new file mode 120000 index 0000000..4ae7208 --- /dev/null +++ b/struct_libaxl_request_create_colormap.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CREATE_COLORMAP.3
\ No newline at end of file diff --git a/struct_libaxl_request_create_cursor.3 b/struct_libaxl_request_create_cursor.3 new file mode 120000 index 0000000..b5dfefb --- /dev/null +++ b/struct_libaxl_request_create_cursor.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CREATE_CURSOR.3
\ No newline at end of file diff --git a/struct_libaxl_request_create_gc.3 b/struct_libaxl_request_create_gc.3 new file mode 120000 index 0000000..26d4ac3 --- /dev/null +++ b/struct_libaxl_request_create_gc.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CREATE_GC.3
\ No newline at end of file diff --git a/struct_libaxl_request_create_glyph_cursor.3 b/struct_libaxl_request_create_glyph_cursor.3 new file mode 120000 index 0000000..bf663a5 --- /dev/null +++ b/struct_libaxl_request_create_glyph_cursor.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CREATE_GLYPH_CURSOR.3
\ No newline at end of file diff --git a/struct_libaxl_request_create_pixmap.3 b/struct_libaxl_request_create_pixmap.3 new file mode 120000 index 0000000..3914392 --- /dev/null +++ b/struct_libaxl_request_create_pixmap.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CREATE_PIXMAP.3
\ No newline at end of file diff --git a/struct_libaxl_request_create_window.3 b/struct_libaxl_request_create_window.3 new file mode 120000 index 0000000..f8c895f --- /dev/null +++ b/struct_libaxl_request_create_window.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_CREATE_WINDOW.3
\ No newline at end of file diff --git a/struct_libaxl_request_delete_property.3 b/struct_libaxl_request_delete_property.3 new file mode 120000 index 0000000..7ff3907 --- /dev/null +++ b/struct_libaxl_request_delete_property.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_DELETE_PROPERTY.3
\ No newline at end of file diff --git a/struct_libaxl_request_destroy_subwindows.3 b/struct_libaxl_request_destroy_subwindows.3 new file mode 120000 index 0000000..50e1a93 --- /dev/null +++ b/struct_libaxl_request_destroy_subwindows.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_DESTROY_SUBWINDOWS.3
\ No newline at end of file diff --git a/struct_libaxl_request_destroy_window.3 b/struct_libaxl_request_destroy_window.3 new file mode 120000 index 0000000..e0f96f5 --- /dev/null +++ b/struct_libaxl_request_destroy_window.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_DESTROY_WINDOW.3
\ No newline at end of file diff --git a/struct_libaxl_request_fill_poly.3 b/struct_libaxl_request_fill_poly.3 new file mode 120000 index 0000000..4d0b08c --- /dev/null +++ b/struct_libaxl_request_fill_poly.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_FILL_POLY.3
\ No newline at end of file diff --git a/struct_libaxl_request_force_screen_saver.3 b/struct_libaxl_request_force_screen_saver.3 new file mode 120000 index 0000000..d73f959 --- /dev/null +++ b/struct_libaxl_request_force_screen_saver.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_FORCE_SCREEN_SAVER.3
\ No newline at end of file diff --git a/struct_libaxl_request_free_colormap.3 b/struct_libaxl_request_free_colormap.3 new file mode 120000 index 0000000..5dee78d --- /dev/null +++ b/struct_libaxl_request_free_colormap.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_FREE_COLORMAP.3
\ No newline at end of file diff --git a/struct_libaxl_request_free_colors.3 b/struct_libaxl_request_free_colors.3 new file mode 120000 index 0000000..ffcb832 --- /dev/null +++ b/struct_libaxl_request_free_colors.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_FREE_COLORS.3
\ No newline at end of file diff --git a/struct_libaxl_request_free_cursor.3 b/struct_libaxl_request_free_cursor.3 new file mode 120000 index 0000000..3a855c7 --- /dev/null +++ b/struct_libaxl_request_free_cursor.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_FREE_CURSOR.3
\ No newline at end of file diff --git a/struct_libaxl_request_free_gc.3 b/struct_libaxl_request_free_gc.3 new file mode 120000 index 0000000..88bf255 --- /dev/null +++ b/struct_libaxl_request_free_gc.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_FREE_GC.3
\ No newline at end of file diff --git a/struct_libaxl_request_free_pixmap.3 b/struct_libaxl_request_free_pixmap.3 new file mode 120000 index 0000000..4ef092b --- /dev/null +++ b/struct_libaxl_request_free_pixmap.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_FREE_PIXMAP.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_atom_name.3 b/struct_libaxl_request_get_atom_name.3 new file mode 120000 index 0000000..1f0bc8f --- /dev/null +++ b/struct_libaxl_request_get_atom_name.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_ATOM_NAME.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_font_path.3 b/struct_libaxl_request_get_font_path.3 new file mode 120000 index 0000000..2a27291 --- /dev/null +++ b/struct_libaxl_request_get_font_path.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_FONT_PATH.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_geometry.3 b/struct_libaxl_request_get_geometry.3 new file mode 120000 index 0000000..3859c00 --- /dev/null +++ b/struct_libaxl_request_get_geometry.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_GEOMETRY.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_image.3 b/struct_libaxl_request_get_image.3 new file mode 120000 index 0000000..9ef4f86 --- /dev/null +++ b/struct_libaxl_request_get_image.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_IMAGE.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_input_focus.3 b/struct_libaxl_request_get_input_focus.3 new file mode 120000 index 0000000..087d8a0 --- /dev/null +++ b/struct_libaxl_request_get_input_focus.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_INPUT_FOCUS.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_keyboard_control.3 b/struct_libaxl_request_get_keyboard_control.3 new file mode 120000 index 0000000..976c991 --- /dev/null +++ b/struct_libaxl_request_get_keyboard_control.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_KEYBOARD_CONTROL.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_keyboard_mapping.3 b/struct_libaxl_request_get_keyboard_mapping.3 new file mode 120000 index 0000000..4ab8439 --- /dev/null +++ b/struct_libaxl_request_get_keyboard_mapping.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_KEYBOARD_MAPPING.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_modifier_mapping.3 b/struct_libaxl_request_get_modifier_mapping.3 new file mode 120000 index 0000000..00419a1 --- /dev/null +++ b/struct_libaxl_request_get_modifier_mapping.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_MODIFIER_MAPPING.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_motion_events.3 b/struct_libaxl_request_get_motion_events.3 new file mode 120000 index 0000000..c7b6e2a --- /dev/null +++ b/struct_libaxl_request_get_motion_events.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_MOTION_EVENTS.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_pointer_control.3 b/struct_libaxl_request_get_pointer_control.3 new file mode 120000 index 0000000..ce0da76 --- /dev/null +++ b/struct_libaxl_request_get_pointer_control.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_POINTER_CONTROL.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_pointer_mapping.3 b/struct_libaxl_request_get_pointer_mapping.3 new file mode 120000 index 0000000..11d1b54 --- /dev/null +++ b/struct_libaxl_request_get_pointer_mapping.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_POINTER_MAPPING.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_property.3 b/struct_libaxl_request_get_property.3 new file mode 120000 index 0000000..423f1e5 --- /dev/null +++ b/struct_libaxl_request_get_property.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_PROPERTY.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_screen_saver.3 b/struct_libaxl_request_get_screen_saver.3 new file mode 120000 index 0000000..d9af812 --- /dev/null +++ b/struct_libaxl_request_get_screen_saver.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_SCREEN_SAVER.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_selection_owner.3 b/struct_libaxl_request_get_selection_owner.3 new file mode 120000 index 0000000..2d7117e --- /dev/null +++ b/struct_libaxl_request_get_selection_owner.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_SELECTION_OWNER.3
\ No newline at end of file diff --git a/struct_libaxl_request_get_window_attributes.3 b/struct_libaxl_request_get_window_attributes.3 new file mode 120000 index 0000000..bbf4665 --- /dev/null +++ b/struct_libaxl_request_get_window_attributes.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GET_WINDOW_ATTRIBUTES.3
\ No newline at end of file diff --git a/struct_libaxl_request_grab_button.3 b/struct_libaxl_request_grab_button.3 new file mode 120000 index 0000000..3889294 --- /dev/null +++ b/struct_libaxl_request_grab_button.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GRAB_BUTTON.3
\ No newline at end of file diff --git a/struct_libaxl_request_grab_key.3 b/struct_libaxl_request_grab_key.3 new file mode 120000 index 0000000..1cd7409 --- /dev/null +++ b/struct_libaxl_request_grab_key.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GRAB_KEY.3
\ No newline at end of file diff --git a/struct_libaxl_request_grab_keyboard.3 b/struct_libaxl_request_grab_keyboard.3 new file mode 120000 index 0000000..1a89009 --- /dev/null +++ b/struct_libaxl_request_grab_keyboard.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GRAB_KEYBOARD.3
\ No newline at end of file diff --git a/struct_libaxl_request_grab_pointer.3 b/struct_libaxl_request_grab_pointer.3 new file mode 120000 index 0000000..4b2a1ce --- /dev/null +++ b/struct_libaxl_request_grab_pointer.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GRAB_POINTER.3
\ No newline at end of file diff --git a/struct_libaxl_request_grab_server.3 b/struct_libaxl_request_grab_server.3 new file mode 120000 index 0000000..3715ef1 --- /dev/null +++ b/struct_libaxl_request_grab_server.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_GRAB_SERVER.3
\ No newline at end of file diff --git a/struct_libaxl_request_image_text.3 b/struct_libaxl_request_image_text.3 new file mode 120000 index 0000000..2b5267e --- /dev/null +++ b/struct_libaxl_request_image_text.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_IMAGE_TEXT.3
\ No newline at end of file diff --git a/struct_libaxl_request_install_colormap.3 b/struct_libaxl_request_install_colormap.3 new file mode 120000 index 0000000..9a5f820 --- /dev/null +++ b/struct_libaxl_request_install_colormap.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INSTALL_COLORMAP.3
\ No newline at end of file diff --git a/struct_libaxl_request_intern_atom.3 b/struct_libaxl_request_intern_atom.3 new file mode 120000 index 0000000..1da74b4 --- /dev/null +++ b/struct_libaxl_request_intern_atom.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_INTERN_ATOM.3
\ No newline at end of file diff --git a/struct_libaxl_request_kill_client.3 b/struct_libaxl_request_kill_client.3 new file mode 120000 index 0000000..6d74f1a --- /dev/null +++ b/struct_libaxl_request_kill_client.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_KILL_CLIENT.3
\ No newline at end of file diff --git a/struct_libaxl_request_list_extensions.3 b/struct_libaxl_request_list_extensions.3 new file mode 120000 index 0000000..d08ed7b --- /dev/null +++ b/struct_libaxl_request_list_extensions.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LIST_EXTENSIONS.3
\ No newline at end of file diff --git a/struct_libaxl_request_list_fonts.3 b/struct_libaxl_request_list_fonts.3 new file mode 120000 index 0000000..344a66e --- /dev/null +++ b/struct_libaxl_request_list_fonts.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LIST_FONTS.3
\ No newline at end of file diff --git a/struct_libaxl_request_list_fonts_with_info.3 b/struct_libaxl_request_list_fonts_with_info.3 new file mode 120000 index 0000000..f3518f0 --- /dev/null +++ b/struct_libaxl_request_list_fonts_with_info.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LIST_FONTS_WITH_INFO.3
\ No newline at end of file diff --git a/struct_libaxl_request_list_hosts.3 b/struct_libaxl_request_list_hosts.3 new file mode 120000 index 0000000..f486b67 --- /dev/null +++ b/struct_libaxl_request_list_hosts.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LIST_HOSTS.3
\ No newline at end of file diff --git a/struct_libaxl_request_list_installed_colormaps.3 b/struct_libaxl_request_list_installed_colormaps.3 new file mode 120000 index 0000000..2ebfe57 --- /dev/null +++ b/struct_libaxl_request_list_installed_colormaps.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LIST_INSTALLED_COLORMAPS.3
\ No newline at end of file diff --git a/struct_libaxl_request_list_properties.3 b/struct_libaxl_request_list_properties.3 new file mode 120000 index 0000000..c0396ef --- /dev/null +++ b/struct_libaxl_request_list_properties.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LIST_PROPERTIES.3
\ No newline at end of file diff --git a/struct_libaxl_request_lookup_color.3 b/struct_libaxl_request_lookup_color.3 new file mode 120000 index 0000000..4980488 --- /dev/null +++ b/struct_libaxl_request_lookup_color.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_LOOKUP_COLOR.3
\ No newline at end of file diff --git a/struct_libaxl_request_map_subwindows.3 b/struct_libaxl_request_map_subwindows.3 new file mode 120000 index 0000000..b547530 --- /dev/null +++ b/struct_libaxl_request_map_subwindows.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_MAP_SUBWINDOWS.3
\ No newline at end of file diff --git a/struct_libaxl_request_map_window.3 b/struct_libaxl_request_map_window.3 new file mode 120000 index 0000000..a2824e4 --- /dev/null +++ b/struct_libaxl_request_map_window.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_MAP_WINDOW.3
\ No newline at end of file diff --git a/struct_libaxl_request_no_operation.3 b/struct_libaxl_request_no_operation.3 new file mode 120000 index 0000000..a535edb --- /dev/null +++ b/struct_libaxl_request_no_operation.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_NO_OPERATION.3
\ No newline at end of file diff --git a/struct_libaxl_request_open_font.3 b/struct_libaxl_request_open_font.3 new file mode 120000 index 0000000..71ad5fa --- /dev/null +++ b/struct_libaxl_request_open_font.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_OPEN_FONT.3
\ No newline at end of file diff --git a/struct_libaxl_request_poly_arc.3 b/struct_libaxl_request_poly_arc.3 new file mode 120000 index 0000000..ae1246a --- /dev/null +++ b/struct_libaxl_request_poly_arc.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_POLY_ARC.3
\ No newline at end of file diff --git a/struct_libaxl_request_poly_fill_arc.3 b/struct_libaxl_request_poly_fill_arc.3 new file mode 120000 index 0000000..75d4a16 --- /dev/null +++ b/struct_libaxl_request_poly_fill_arc.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_POLY_FILL_ARC.3
\ No newline at end of file diff --git a/struct_libaxl_request_poly_fill_rectangle.3 b/struct_libaxl_request_poly_fill_rectangle.3 new file mode 120000 index 0000000..9fcdce5 --- /dev/null +++ b/struct_libaxl_request_poly_fill_rectangle.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_POLY_FILL_RECTANGLE.3
\ No newline at end of file diff --git a/struct_libaxl_request_poly_line.3 b/struct_libaxl_request_poly_line.3 new file mode 120000 index 0000000..9a96147 --- /dev/null +++ b/struct_libaxl_request_poly_line.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_POLY_LINE.3
\ No newline at end of file diff --git a/struct_libaxl_request_poly_point.3 b/struct_libaxl_request_poly_point.3 new file mode 120000 index 0000000..95c92dd --- /dev/null +++ b/struct_libaxl_request_poly_point.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_POLY_POINT.3
\ No newline at end of file diff --git a/struct_libaxl_request_poly_rectangle.3 b/struct_libaxl_request_poly_rectangle.3 new file mode 120000 index 0000000..9b345aa --- /dev/null +++ b/struct_libaxl_request_poly_rectangle.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_POLY_RECTANGLE.3
\ No newline at end of file diff --git a/struct_libaxl_request_poly_segment.3 b/struct_libaxl_request_poly_segment.3 new file mode 120000 index 0000000..6c93814 --- /dev/null +++ b/struct_libaxl_request_poly_segment.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_POLY_SEGMENT.3
\ No newline at end of file diff --git a/struct_libaxl_request_poly_text.3 b/struct_libaxl_request_poly_text.3 new file mode 120000 index 0000000..d4fe212 --- /dev/null +++ b/struct_libaxl_request_poly_text.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_POLY_TEXT.3
\ No newline at end of file diff --git a/struct_libaxl_request_put_image.3 b/struct_libaxl_request_put_image.3 new file mode 120000 index 0000000..bc5b2ff --- /dev/null +++ b/struct_libaxl_request_put_image.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_PUT_IMAGE.3
\ No newline at end of file diff --git a/struct_libaxl_request_query_best_size.3 b/struct_libaxl_request_query_best_size.3 new file mode 120000 index 0000000..48bc9b2 --- /dev/null +++ b/struct_libaxl_request_query_best_size.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_BEST_SIZE.3
\ No newline at end of file diff --git a/struct_libaxl_request_query_colors.3 b/struct_libaxl_request_query_colors.3 new file mode 120000 index 0000000..47dfe2d --- /dev/null +++ b/struct_libaxl_request_query_colors.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_COLORS.3
\ No newline at end of file diff --git a/struct_libaxl_request_query_extension.3 b/struct_libaxl_request_query_extension.3 new file mode 120000 index 0000000..8aaa609 --- /dev/null +++ b/struct_libaxl_request_query_extension.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_EXTENSION.3
\ No newline at end of file diff --git a/struct_libaxl_request_query_font.3 b/struct_libaxl_request_query_font.3 new file mode 120000 index 0000000..1c0a93f --- /dev/null +++ b/struct_libaxl_request_query_font.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_FONT.3
\ No newline at end of file diff --git a/struct_libaxl_request_query_keymap.3 b/struct_libaxl_request_query_keymap.3 new file mode 120000 index 0000000..7a51bed --- /dev/null +++ b/struct_libaxl_request_query_keymap.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_KEYMAP.3
\ No newline at end of file diff --git a/struct_libaxl_request_query_pointer.3 b/struct_libaxl_request_query_pointer.3 new file mode 120000 index 0000000..2124c39 --- /dev/null +++ b/struct_libaxl_request_query_pointer.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_POINTER.3
\ No newline at end of file diff --git a/struct_libaxl_request_query_text_extents.3 b/struct_libaxl_request_query_text_extents.3 new file mode 120000 index 0000000..83e56c4 --- /dev/null +++ b/struct_libaxl_request_query_text_extents.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_TEXT_EXTENTS.3
\ No newline at end of file diff --git a/struct_libaxl_request_query_tree.3 b/struct_libaxl_request_query_tree.3 new file mode 120000 index 0000000..fc5d759 --- /dev/null +++ b/struct_libaxl_request_query_tree.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_QUERY_TREE.3
\ No newline at end of file diff --git a/struct_libaxl_request_recolor_cursor.3 b/struct_libaxl_request_recolor_cursor.3 new file mode 120000 index 0000000..e302a6f --- /dev/null +++ b/struct_libaxl_request_recolor_cursor.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_RECOLOR_CURSOR.3
\ No newline at end of file diff --git a/struct_libaxl_request_reparent_window.3 b/struct_libaxl_request_reparent_window.3 new file mode 120000 index 0000000..59338ed --- /dev/null +++ b/struct_libaxl_request_reparent_window.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_REPARENT_WINDOW.3
\ No newline at end of file diff --git a/struct_libaxl_request_rotate_properties.3 b/struct_libaxl_request_rotate_properties.3 new file mode 120000 index 0000000..1843b6c --- /dev/null +++ b/struct_libaxl_request_rotate_properties.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_ROTATE_PROPERTIES.3
\ No newline at end of file diff --git a/struct_libaxl_request_send_event.3 b/struct_libaxl_request_send_event.3 new file mode 120000 index 0000000..3a75359 --- /dev/null +++ b/struct_libaxl_request_send_event.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SEND_EVENT.3
\ No newline at end of file diff --git a/struct_libaxl_request_set_access_control.3 b/struct_libaxl_request_set_access_control.3 new file mode 120000 index 0000000..1cb9843 --- /dev/null +++ b/struct_libaxl_request_set_access_control.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SET_ACCESS_CONTROL.3
\ No newline at end of file diff --git a/struct_libaxl_request_set_clip_rectangles.3 b/struct_libaxl_request_set_clip_rectangles.3 new file mode 120000 index 0000000..b2a5049 --- /dev/null +++ b/struct_libaxl_request_set_clip_rectangles.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SET_CLIP_RECTANGLES.3
\ No newline at end of file diff --git a/struct_libaxl_request_set_close_down_mode.3 b/struct_libaxl_request_set_close_down_mode.3 new file mode 120000 index 0000000..dc0c13f --- /dev/null +++ b/struct_libaxl_request_set_close_down_mode.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SET_CLOSE_DOWN_MODE.3
\ No newline at end of file diff --git a/struct_libaxl_request_set_dashes.3 b/struct_libaxl_request_set_dashes.3 new file mode 120000 index 0000000..517b1e6 --- /dev/null +++ b/struct_libaxl_request_set_dashes.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SET_DASHES.3
\ No newline at end of file diff --git a/struct_libaxl_request_set_font_path.3 b/struct_libaxl_request_set_font_path.3 new file mode 120000 index 0000000..919ebb6 --- /dev/null +++ b/struct_libaxl_request_set_font_path.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SET_FONT_PATH.3
\ No newline at end of file diff --git a/struct_libaxl_request_set_input_focus.3 b/struct_libaxl_request_set_input_focus.3 new file mode 120000 index 0000000..2a58382 --- /dev/null +++ b/struct_libaxl_request_set_input_focus.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SET_INPUT_FOCUS.3
\ No newline at end of file diff --git a/struct_libaxl_request_set_modifier_mapping.3 b/struct_libaxl_request_set_modifier_mapping.3 new file mode 120000 index 0000000..aec5aae --- /dev/null +++ b/struct_libaxl_request_set_modifier_mapping.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SET_MODIFIER_MAPPING.3
\ No newline at end of file diff --git a/struct_libaxl_request_set_pointer_mapping.3 b/struct_libaxl_request_set_pointer_mapping.3 new file mode 120000 index 0000000..967b48b --- /dev/null +++ b/struct_libaxl_request_set_pointer_mapping.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SET_POINTER_MAPPING.3
\ No newline at end of file diff --git a/struct_libaxl_request_set_screen_saver.3 b/struct_libaxl_request_set_screen_saver.3 new file mode 120000 index 0000000..38ba935 --- /dev/null +++ b/struct_libaxl_request_set_screen_saver.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SET_SCREEN_SAVER.3
\ No newline at end of file diff --git a/struct_libaxl_request_set_selection_owner.3 b/struct_libaxl_request_set_selection_owner.3 new file mode 120000 index 0000000..f8c812b --- /dev/null +++ b/struct_libaxl_request_set_selection_owner.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_SET_SELECTION_OWNER.3
\ No newline at end of file diff --git a/struct_libaxl_request_store_colors.3 b/struct_libaxl_request_store_colors.3 new file mode 120000 index 0000000..cf37359 --- /dev/null +++ b/struct_libaxl_request_store_colors.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_STORE_COLORS.3
\ No newline at end of file diff --git a/struct_libaxl_request_store_named_color.3 b/struct_libaxl_request_store_named_color.3 new file mode 120000 index 0000000..4e22cdf --- /dev/null +++ b/struct_libaxl_request_store_named_color.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_STORE_NAMED_COLOR.3
\ No newline at end of file diff --git a/struct_libaxl_request_translate_coordinates.3 b/struct_libaxl_request_translate_coordinates.3 new file mode 120000 index 0000000..77b289e --- /dev/null +++ b/struct_libaxl_request_translate_coordinates.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_TRANSLATE_COORDINATES.3
\ No newline at end of file diff --git a/struct_libaxl_request_ungrab_button.3 b/struct_libaxl_request_ungrab_button.3 new file mode 120000 index 0000000..69eeb18 --- /dev/null +++ b/struct_libaxl_request_ungrab_button.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_UNGRAB_BUTTON.3
\ No newline at end of file diff --git a/struct_libaxl_request_ungrab_key.3 b/struct_libaxl_request_ungrab_key.3 new file mode 120000 index 0000000..0e11932 --- /dev/null +++ b/struct_libaxl_request_ungrab_key.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_UNGRAB_KEY.3
\ No newline at end of file diff --git a/struct_libaxl_request_ungrab_keyboard.3 b/struct_libaxl_request_ungrab_keyboard.3 new file mode 120000 index 0000000..ce78acc --- /dev/null +++ b/struct_libaxl_request_ungrab_keyboard.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_UNGRAB_KEYBOARD.3
\ No newline at end of file diff --git a/struct_libaxl_request_ungrab_pointer.3 b/struct_libaxl_request_ungrab_pointer.3 new file mode 120000 index 0000000..bb270d3 --- /dev/null +++ b/struct_libaxl_request_ungrab_pointer.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_UNGRAB_POINTER.3
\ No newline at end of file diff --git a/struct_libaxl_request_ungrab_server.3 b/struct_libaxl_request_ungrab_server.3 new file mode 120000 index 0000000..0b6c535 --- /dev/null +++ b/struct_libaxl_request_ungrab_server.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_UNGRAB_SERVER.3
\ No newline at end of file diff --git a/struct_libaxl_request_uninstall_colormap.3 b/struct_libaxl_request_uninstall_colormap.3 new file mode 120000 index 0000000..efae0c7 --- /dev/null +++ b/struct_libaxl_request_uninstall_colormap.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_UNINSTALL_COLORMAP.3
\ No newline at end of file diff --git a/struct_libaxl_request_unmap_subwindows.3 b/struct_libaxl_request_unmap_subwindows.3 new file mode 120000 index 0000000..97825b9 --- /dev/null +++ b/struct_libaxl_request_unmap_subwindows.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_UNMAP_SUBWINDOWS.3
\ No newline at end of file diff --git a/struct_libaxl_request_unmap_window.3 b/struct_libaxl_request_unmap_window.3 new file mode 120000 index 0000000..a2bca57 --- /dev/null +++ b/struct_libaxl_request_unmap_window.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_UNMAP_WINDOW.3
\ No newline at end of file diff --git a/struct_libaxl_request_warp_pointer.3 b/struct_libaxl_request_warp_pointer.3 new file mode 120000 index 0000000..385d5a1 --- /dev/null +++ b/struct_libaxl_request_warp_pointer.3 @@ -0,0 +1 @@ +LIBAXL_REQUEST_WARP_POINTER.3
\ No newline at end of file diff --git a/union_libaxl_error.3 b/union_libaxl_error.3 new file mode 120000 index 0000000..ec3970b --- /dev/null +++ b/union_libaxl_error.3 @@ -0,0 +1 @@ +LIBAXL_ERROR.3
\ No newline at end of file |