Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding back some Manual files that shouldn't have been deleted #40

Merged
merged 1 commit into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
217 changes: 217 additions & 0 deletions sources/Interop/Xlib/X11/Xatom/Xlib.Manual.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from include/X11/Xatom.h in the Xlib - C Language X Interface: X Version 11, Release 7.7
// Original source is Copyright © The Open Group

namespace TerraFX.Interop.Xlib
{
public static partial class Xlib
{
[NativeTypeName("#define XA_PRIMARY ((Atom) 1)")]
public static Atom XA_PRIMARY => ((Atom)(1));

[NativeTypeName("#define XA_SECONDARY ((Atom) 2)")]
public static Atom XA_SECONDARY => ((Atom)(2));

[NativeTypeName("#define XA_ARC ((Atom) 3)")]
public static Atom XA_ARC => ((Atom)(3));

[NativeTypeName("#define XA_ATOM ((Atom) 4)")]
public static Atom XA_ATOM => ((Atom)(4));

[NativeTypeName("#define XA_BITMAP ((Atom) 5)")]
public static Atom XA_BITMAP => ((Atom)(5));

[NativeTypeName("#define XA_CARDINAL ((Atom) 6)")]
public static Atom XA_CARDINAL => ((Atom)(6));

[NativeTypeName("#define XA_COLORMAP ((Atom) 7)")]
public static Atom XA_COLORMAP => ((Atom)(7));

[NativeTypeName("#define XA_CURSOR ((Atom) 8)")]
public static Atom XA_CURSOR => ((Atom)(8));

[NativeTypeName("#define XA_CUT_BUFFER0 ((Atom) 9)")]
public static Atom XA_CUT_BUFFER0 => ((Atom)(9));

[NativeTypeName("#define XA_CUT_BUFFER1 ((Atom) 10)")]
public static Atom XA_CUT_BUFFER1 => ((Atom)(10));

[NativeTypeName("#define XA_CUT_BUFFER2 ((Atom) 11)")]
public static Atom XA_CUT_BUFFER2 => ((Atom)(11));

[NativeTypeName("#define XA_CUT_BUFFER3 ((Atom) 12)")]
public static Atom XA_CUT_BUFFER3 => ((Atom)(12));

[NativeTypeName("#define XA_CUT_BUFFER4 ((Atom) 13)")]
public static Atom XA_CUT_BUFFER4 => ((Atom)(13));

[NativeTypeName("#define XA_CUT_BUFFER5 ((Atom) 14)")]
public static Atom XA_CUT_BUFFER5 => ((Atom)(14));

[NativeTypeName("#define XA_CUT_BUFFER6 ((Atom) 15)")]
public static Atom XA_CUT_BUFFER6 => ((Atom)(15));

[NativeTypeName("#define XA_CUT_BUFFER7 ((Atom) 16)")]
public static Atom XA_CUT_BUFFER7 => ((Atom)(16));

[NativeTypeName("#define XA_DRAWABLE ((Atom) 17)")]
public static Atom XA_DRAWABLE => ((Atom)(17));

[NativeTypeName("#define XA_FONT ((Atom) 18)")]
public static Atom XA_FONT => ((Atom)(18));

[NativeTypeName("#define XA_INTEGER ((Atom) 19)")]
public static Atom XA_INTEGER => ((Atom)(19));

[NativeTypeName("#define XA_PIXMAP ((Atom) 20)")]
public static Atom XA_PIXMAP => ((Atom)(20));

[NativeTypeName("#define XA_POINT ((Atom) 21)")]
public static Atom XA_POINT => ((Atom)(21));

[NativeTypeName("#define XA_RECTANGLE ((Atom) 22)")]
public static Atom XA_RECTANGLE => ((Atom)(22));

[NativeTypeName("#define XA_RESOURCE_MANAGER ((Atom) 23)")]
public static Atom XA_RESOURCE_MANAGER => ((Atom)(23));

[NativeTypeName("#define XA_RGB_COLOR_MAP ((Atom) 24)")]
public static Atom XA_RGB_COLOR_MAP => ((Atom)(24));

[NativeTypeName("#define XA_RGB_BEST_MAP ((Atom) 25)")]
public static Atom XA_RGB_BEST_MAP => ((Atom)(25));

[NativeTypeName("#define XA_RGB_BLUE_MAP ((Atom) 26)")]
public static Atom XA_RGB_BLUE_MAP => ((Atom)(26));

[NativeTypeName("#define XA_RGB_DEFAULT_MAP ((Atom) 27)")]
public static Atom XA_RGB_DEFAULT_MAP => ((Atom)(27));

[NativeTypeName("#define XA_RGB_GRAY_MAP ((Atom) 28)")]
public static Atom XA_RGB_GRAY_MAP => ((Atom)(28));

[NativeTypeName("#define XA_RGB_GREEN_MAP ((Atom) 29)")]
public static Atom XA_RGB_GREEN_MAP => ((Atom)(29));

[NativeTypeName("#define XA_RGB_RED_MAP ((Atom) 30)")]
public static Atom XA_RGB_RED_MAP => ((Atom)(30));

[NativeTypeName("#define XA_STRING ((Atom) 31)")]
public static Atom XA_STRING => ((Atom)(31));

[NativeTypeName("#define XA_VISUALID ((Atom) 32)")]
public static Atom XA_VISUALID => ((Atom)(32));

[NativeTypeName("#define XA_WINDOW ((Atom) 33)")]
public static Atom XA_WINDOW => ((Atom)(33));

[NativeTypeName("#define XA_WM_COMMAND ((Atom) 34)")]
public static Atom XA_WM_COMMAND => ((Atom)(34));

[NativeTypeName("#define XA_WM_HINTS ((Atom) 35)")]
public static Atom XA_WM_HINTS => ((Atom)(35));

[NativeTypeName("#define XA_WM_CLIENT_MACHINE ((Atom) 36)")]
public static Atom XA_WM_CLIENT_MACHINE => ((Atom)(36));

[NativeTypeName("#define XA_WM_ICON_NAME ((Atom) 37)")]
public static Atom XA_WM_ICON_NAME => ((Atom)(37));

[NativeTypeName("#define XA_WM_ICON_SIZE ((Atom) 38)")]
public static Atom XA_WM_ICON_SIZE => ((Atom)(38));

[NativeTypeName("#define XA_WM_NAME ((Atom) 39)")]
public static Atom XA_WM_NAME => ((Atom)(39));

[NativeTypeName("#define XA_WM_NORMAL_HINTS ((Atom) 40)")]
public static Atom XA_WM_NORMAL_HINTS => ((Atom)(40));

[NativeTypeName("#define XA_WM_SIZE_HINTS ((Atom) 41)")]
public static Atom XA_WM_SIZE_HINTS => ((Atom)(41));

[NativeTypeName("#define XA_WM_ZOOM_HINTS ((Atom) 42)")]
public static Atom XA_WM_ZOOM_HINTS => ((Atom)(42));

[NativeTypeName("#define XA_MIN_SPACE ((Atom) 43)")]
public static Atom XA_MIN_SPACE => ((Atom)(43));

[NativeTypeName("#define XA_NORM_SPACE ((Atom) 44)")]
public static Atom XA_NORM_SPACE => ((Atom)(44));

[NativeTypeName("#define XA_MAX_SPACE ((Atom) 45)")]
public static Atom XA_MAX_SPACE => ((Atom)(45));

[NativeTypeName("#define XA_END_SPACE ((Atom) 46)")]
public static Atom XA_END_SPACE => ((Atom)(46));

[NativeTypeName("#define XA_SUPERSCRIPT_X ((Atom) 47)")]
public static Atom XA_SUPERSCRIPT_X => ((Atom)(47));

[NativeTypeName("#define XA_SUPERSCRIPT_Y ((Atom) 48)")]
public static Atom XA_SUPERSCRIPT_Y => ((Atom)(48));

[NativeTypeName("#define XA_SUBSCRIPT_X ((Atom) 49)")]
public static Atom XA_SUBSCRIPT_X => ((Atom)(49));

[NativeTypeName("#define XA_SUBSCRIPT_Y ((Atom) 50)")]
public static Atom XA_SUBSCRIPT_Y => ((Atom)(50));

[NativeTypeName("#define XA_UNDERLINE_POSITION ((Atom) 51)")]
public static Atom XA_UNDERLINE_POSITION => ((Atom)(51));

[NativeTypeName("#define XA_UNDERLINE_THICKNESS ((Atom) 52)")]
public static Atom XA_UNDERLINE_THICKNESS => ((Atom)(52));

[NativeTypeName("#define XA_STRIKEOUT_ASCENT ((Atom) 53)")]
public static Atom XA_STRIKEOUT_ASCENT => ((Atom)(53));

[NativeTypeName("#define XA_STRIKEOUT_DESCENT ((Atom) 54)")]
public static Atom XA_STRIKEOUT_DESCENT => ((Atom)(54));

[NativeTypeName("#define XA_ITALIC_ANGLE ((Atom) 55)")]
public static Atom XA_ITALIC_ANGLE => ((Atom)(55));

[NativeTypeName("#define XA_X_HEIGHT ((Atom) 56)")]
public static Atom XA_X_HEIGHT => ((Atom)(56));

[NativeTypeName("#define XA_QUAD_WIDTH ((Atom) 57)")]
public static Atom XA_QUAD_WIDTH => ((Atom)(57));

[NativeTypeName("#define XA_WEIGHT ((Atom) 58)")]
public static Atom XA_WEIGHT => ((Atom)(58));

[NativeTypeName("#define XA_POINT_SIZE ((Atom) 59)")]
public static Atom XA_POINT_SIZE => ((Atom)(59));

[NativeTypeName("#define XA_RESOLUTION ((Atom) 60)")]
public static Atom XA_RESOLUTION => ((Atom)(60));

[NativeTypeName("#define XA_COPYRIGHT ((Atom) 61)")]
public static Atom XA_COPYRIGHT => ((Atom)(61));

[NativeTypeName("#define XA_NOTICE ((Atom) 62)")]
public static Atom XA_NOTICE => ((Atom)(62));

[NativeTypeName("#define XA_FONT_NAME ((Atom) 63)")]
public static Atom XA_FONT_NAME => ((Atom)(63));

[NativeTypeName("#define XA_FAMILY_NAME ((Atom) 64)")]
public static Atom XA_FAMILY_NAME => ((Atom)(64));

[NativeTypeName("#define XA_FULL_NAME ((Atom) 65)")]
public static Atom XA_FULL_NAME => ((Atom)(65));

[NativeTypeName("#define XA_CAP_HEIGHT ((Atom) 66)")]
public static Atom XA_CAP_HEIGHT => ((Atom)(66));

[NativeTypeName("#define XA_WM_CLASS ((Atom) 67)")]
public static Atom XA_WM_CLASS => ((Atom)(67));

[NativeTypeName("#define XA_WM_TRANSIENT_FOR ((Atom) 68)")]
public static Atom XA_WM_TRANSIENT_FOR => ((Atom)(68));

[NativeTypeName("#define XA_LAST_PREDEFINED ((Atom) 68)")]
public static Atom XA_LAST_PREDEFINED => ((Atom)(68));
}
}
23 changes: 23 additions & 0 deletions sources/Interop/Xlib/X11/Xcms/Xlib.Manual.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from include/X11/Xcms.h in the Xlib - C Language X Interface: X Version 11, Release 7.7
// Original source is Copyright © Tektronix, Inc.

namespace TerraFX.Interop.Xlib
{
public static unsafe partial class Xlib
{
public static Display* DisplayOfCCC(XcmsCCC ccc) => ((XcmsCCCRec*)(ccc))->dpy;

public static int ScreenNumberOfCCC(XcmsCCC ccc) => ((XcmsCCCRec*)(ccc))->screenNumber;

public static Visual* VisualOfCCC(XcmsCCC ccc) => ((XcmsCCCRec*)(ccc))->visual;

public static XcmsColor* ClientWhitePointOfCCC(XcmsCCC ccc) => &((XcmsCCCRec*)(ccc))->clientWhitePt;

public static XcmsColor* ScreenWhitePointOfCCC(XcmsCCC ccc) => &((XcmsCCCRec*)(ccc))->pPerScrnInfo->screenWhitePt;

[return: NativeTypeName("XPointer")]
public static sbyte* FunctionSetOfCCC(XcmsCCC ccc) => ((XcmsCCCRec*)(ccc))->pPerScrnInfo->functionSet;
}
}
124 changes: 124 additions & 0 deletions sources/Interop/Xlib/X11/Xlib/Xlib.Manual.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information.

// Ported from include/X11/Xlib.h in the Xlib - C Language X Interface: X Version 11, Release 7.7
// Original source is Copyright © The Open Group

using System;

namespace TerraFX.Interop.Xlib
{
public static unsafe partial class Xlib
{
[NativeTypeName("#define AllPlanes ((unsigned long)~0L)")]
public static readonly nuint AllPlanes = unchecked((nuint)(~0));

public static int ConnectionNumber(Display* dpy) => dpy->fd;

public static Window RootWindow(Display* dpy, int scr) => ScreenOfDisplay(dpy, scr)->root;

public static int DefaultScreen(Display* dpy) => dpy->default_screen;

public static Window DefaultRootWindow(Display* dpy) => ScreenOfDisplay(dpy, DefaultScreen(dpy))->root;

public static Visual* DefaultVisual(Display* dpy, int scr) => ScreenOfDisplay(dpy, scr)->root_visual;

public static GC DefaultGC(Display* dpy, int scr) => ScreenOfDisplay(dpy, scr)->default_gc;

[return: NativeTypeName("unsigned long")]
public static nuint BlackPixel(Display* dpy, int scr) => ScreenOfDisplay(dpy, scr)->black_pixel;

[return: NativeTypeName("unsigned long")]
public static nuint WhitePixel(Display* dpy, int scr) => ScreenOfDisplay(dpy, scr)->white_pixel;

public static int QLength(Display* dpy) => dpy->qlen;

public static int DisplayWidth(Display* dpy, int scr) => ScreenOfDisplay(dpy, scr)->width;

public static int DisplayHeight(Display* dpy, int scr) => ScreenOfDisplay(dpy, scr)->height;

public static int DisplayWidthMM(Display* dpy, int scr) => ScreenOfDisplay(dpy, scr)->mwidth;

public static int DisplayHeightMM(Display* dpy, int scr) => ScreenOfDisplay(dpy, scr)->mheight;

public static int DisplayPlanes(Display* dpy, int scr) => ScreenOfDisplay(dpy, scr)->root_depth;

public static int DisplayCells(Display* dpy, int scr) => DefaultVisual(dpy, scr)->map_entries;

public static int ScreenCount(Display* dpy) => dpy->nscreens;

[return: NativeTypeName("char *")]
public static sbyte* ServerVendor(Display* dpy) => dpy->vendor;

public static int ProtocolVersion(Display* dpy) => dpy->proto_major_version;

public static int ProtocolRevision(Display* dpy) => dpy->proto_minor_version;

public static int VendorRelease(Display* dpy) => dpy->release;

[return: NativeTypeName("char *")]
public static sbyte* DisplayString(Display* dpy) => dpy->display_name;

public static int DefaultDepth(Display* dpy, int scr) => ScreenOfDisplay(dpy, scr)->root_depth;

public static Colormap DefaultColormap(Display* dpy, int scr) => ScreenOfDisplay(dpy, scr)->cmap;

public static int BitmapUnit(Display* dpy) => dpy->bitmap_unit;

public static int BitmapBitOrder(Display* dpy) => dpy->bitmap_bit_order;

public static int BitmapPad(Display* dpy) => dpy->bitmap_pad;

public static int ImageByteOrder(Display* dpy) => dpy->byte_order;

[return: NativeTypeName("unsigned long")]
public static nuint NextRequest(Display* dpy) => dpy->request + 1;

[return: NativeTypeName("unsigned long")]
public static nuint LastKnownRequestProcessed(Display* dpy) => dpy->last_request_read;

public static Screen* ScreenOfDisplay(Display* dpy, int scr) => &dpy->screens[scr];

public static Screen* DefaultScreenOfDisplay(Display* dpy) => ScreenOfDisplay(dpy, DefaultScreen(dpy));

public static Display* DisplayOfScreen(Screen* s) => s->display;

public static Window RootWindowOfScreen(Screen* s) => s->root;

public static nuint BlackPixelOfScreen(Screen* s) => s->black_pixel;

public static nuint WhitePixelOfScreen(Screen* s) => s->white_pixel;

public static Colormap DefaultColormapOfScreen(Screen* s) => s->cmap;

public static int DefaultDepthOfScreen(Screen* s) => s->root_depth;

public static GC DefaultGCOfScreen(Screen* s) => s->default_gc;

public static Visual* DefaultVisualOfScreen(Screen* s) => s->root_visual;

public static int WidthOfScreen(Screen* s) => s->width;

public static int HeightOfScreen(Screen* s) => s->height;

public static int WidthMMOfScreen(Screen* s) => s->mwidth;

public static int HeightMMOfScreen(Screen* s) => s->mheight;

public static int PlanesOfScreen(Screen* s) => s->root_depth;

public static int CellsOfScreen(Screen* s) => DefaultVisualOfScreen(s)->map_entries;

public static int MinCmapsOfScreen(Screen* s) => s->min_maps;

public static int MaxCmapsOfScreen(Screen* s) => s->max_maps;

public static int DoesSaveUnders(Screen* s) => s->save_unders;

public static int DoesBackingStore(Screen* s) => s->backing_store;

[return: NativeTypeName("long")]
public static IntPtr EventMaskOfScreen(Screen* s) => s->root_input_mask;

public static XID XAllocID(Display* dpy) => dpy->resource_alloc(dpy);
}
}
Loading