2007-08-05 23:09:05 +00:00
using System ;
using System.Collections.Generic ;
using System.Text ;
using System.Runtime.InteropServices ;
namespace OpenTK.Platform.X11
{
2008-01-24 21:18:23 +00:00
internal static partial class Functions
2007-08-05 23:09:05 +00:00
{
[DllImport("libX11", EntryPoint = "XOpenDisplay")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XOpenDisplay ( IntPtr display ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XCloseDisplay")]
2007-08-21 09:01:24 +00:00
public extern static int XCloseDisplay ( IntPtr display ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSynchronize")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XSynchronize ( IntPtr display , bool onoff ) ;
2007-08-05 23:09:05 +00:00
2007-09-25 16:45:12 +00:00
//[DllImport("libX11", EntryPoint = "XCreateWindow"), CLSCompliant(false)]
//public extern static IntPtr XCreateWindow(IntPtr display, IntPtr parent, int x, int y, int width, int height, int border_width, int depth, int xclass, IntPtr visual, UIntPtr valuemask, ref XSetWindowAttributes attributes);
2007-08-21 09:34:05 +00:00
[DllImport("libX11", EntryPoint = "XCreateWindow")]
public extern static IntPtr XCreateWindow ( IntPtr display , IntPtr parent , int x , int y , int width , int height , int border_width , int depth , int xclass , IntPtr visual , IntPtr valuemask , ref XSetWindowAttributes attributes ) ;
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XCreateSimpleWindow")] //, CLSCompliant(false)]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XCreateSimpleWindow ( IntPtr display , IntPtr parent , int x , int y , int width , int height , int border_width , UIntPtr border , UIntPtr background ) ;
2007-08-21 09:34:05 +00:00
[DllImport("libX11", EntryPoint = "XCreateSimpleWindow")]
public extern static IntPtr XCreateSimpleWindow ( IntPtr display , IntPtr parent , int x , int y , int width , int height , int border_width , IntPtr border , IntPtr background ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XMapWindow")]
2007-08-21 09:01:24 +00:00
public extern static int XMapWindow ( IntPtr display , IntPtr window ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XUnmapWindow")]
2007-08-21 09:01:24 +00:00
public extern static int XUnmapWindow ( IntPtr display , IntPtr window ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XMapSubwindows")]
2007-08-21 09:01:24 +00:00
public extern static int XMapSubindows ( IntPtr display , IntPtr window ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XUnmapSubwindows")]
2007-08-21 09:01:24 +00:00
public extern static int XUnmapSubwindows ( IntPtr display , IntPtr window ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XRootWindow")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XRootWindow ( IntPtr display , int screen_number ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XNextEvent")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XNextEvent ( IntPtr display , ref XEvent xevent ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11")]
2007-08-21 09:01:24 +00:00
public extern static int XConnectionNumber ( IntPtr diplay ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11")]
2007-08-21 09:01:24 +00:00
public extern static int XPending ( IntPtr diplay ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSelectInput")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XSelectInput ( IntPtr display , IntPtr window , IntPtr mask ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XDestroyWindow")]
2007-08-21 09:01:24 +00:00
public extern static int XDestroyWindow ( IntPtr display , IntPtr window ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XReparentWindow")]
2007-08-21 09:01:24 +00:00
public extern static int XReparentWindow ( IntPtr display , IntPtr window , IntPtr parent , int x , int y ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XMoveResizeWindow")]
2007-08-21 09:01:24 +00:00
public extern static int XMoveResizeWindow ( IntPtr display , IntPtr window , int x , int y , int width , int height ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XResizeWindow")]
2007-08-21 09:01:24 +00:00
public extern static int XResizeWindow ( IntPtr display , IntPtr window , int width , int height ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XGetWindowAttributes")]
2007-08-21 09:01:24 +00:00
public extern static int XGetWindowAttributes ( IntPtr display , IntPtr window , ref XWindowAttributes attributes ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XFlush")]
2007-08-21 09:01:24 +00:00
public extern static int XFlush ( IntPtr display ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetWMName")]
2007-08-21 09:01:24 +00:00
public extern static int XSetWMName ( IntPtr display , IntPtr window , ref XTextProperty text_prop ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XStoreName")]
2007-08-21 09:01:24 +00:00
public extern static int XStoreName ( IntPtr display , IntPtr window , string window_name ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XFetchName")]
2007-08-21 09:01:24 +00:00
public extern static int XFetchName ( IntPtr display , IntPtr window , ref IntPtr window_name ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSendEvent")]
2007-08-21 09:01:24 +00:00
public extern static int XSendEvent ( IntPtr display , IntPtr window , bool propagate , IntPtr event_mask , ref XEvent send_event ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XQueryTree")]
2007-08-21 09:01:24 +00:00
public extern static int XQueryTree ( IntPtr display , IntPtr window , out IntPtr root_return , out IntPtr parent_return , out IntPtr children_return , out int nchildren_return ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XFree")]
2007-08-21 09:01:24 +00:00
public extern static int XFree ( IntPtr data ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XRaiseWindow")]
2007-08-21 09:01:24 +00:00
public extern static int XRaiseWindow ( IntPtr display , IntPtr window ) ;
2007-08-05 23:09:05 +00:00
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XLowerWindow")] //, CLSCompliant(false)]
2007-08-21 09:01:24 +00:00
public extern static uint XLowerWindow ( IntPtr display , IntPtr window ) ;
2007-08-05 23:09:05 +00:00
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XConfigureWindow")] //, CLSCompliant(false)]
2008-01-27 16:34:45 +00:00
public extern static uint XConfigureWindow ( IntPtr display , IntPtr window , ChangeWindowAttributes value_mask , ref XWindowChanges values ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XInternAtom")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XInternAtom ( IntPtr display , string atom_name , bool only_if_exists ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XInternAtoms")]
2007-08-21 09:01:24 +00:00
public extern static int XInternAtoms ( IntPtr display , string [ ] atom_names , int atom_count , bool only_if_exists , IntPtr [ ] atoms ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetWMProtocols")]
2007-08-21 09:01:24 +00:00
public extern static int XSetWMProtocols ( IntPtr display , IntPtr window , IntPtr [ ] protocols , int count ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XGrabPointer")]
2007-08-21 09:01:24 +00:00
public extern static int XGrabPointer ( IntPtr display , IntPtr window , bool owner_events , EventMask event_mask , GrabMode pointer_mode , GrabMode keyboard_mode , IntPtr confine_to , IntPtr cursor , IntPtr timestamp ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XUngrabPointer")]
2007-08-21 09:01:24 +00:00
public extern static int XUngrabPointer ( IntPtr display , IntPtr timestamp ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XQueryPointer")]
2007-08-21 09:01:24 +00:00
public extern static bool XQueryPointer ( IntPtr display , IntPtr window , out IntPtr root , out IntPtr child , out int root_x , out int root_y , out int win_x , out int win_y , out int keys_buttons ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XTranslateCoordinates")]
2007-08-21 09:01:24 +00:00
public extern static bool XTranslateCoordinates ( IntPtr display , IntPtr src_w , IntPtr dest_w , int src_x , int src_y , out int intdest_x_return , out int dest_y_return , out IntPtr child_return ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XGetGeometry")]
2007-08-21 09:01:24 +00:00
public extern static bool XGetGeometry ( IntPtr display , IntPtr window , out IntPtr root , out int x , out int y , out int width , out int height , out int border_width , out int depth ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XGetGeometry")]
2007-08-21 09:01:24 +00:00
public extern static bool XGetGeometry ( IntPtr display , IntPtr window , IntPtr root , out int x , out int y , out int width , out int height , IntPtr border_width , IntPtr depth ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XGetGeometry")]
2007-08-21 09:01:24 +00:00
public extern static bool XGetGeometry ( IntPtr display , IntPtr window , IntPtr root , out int x , out int y , IntPtr width , IntPtr height , IntPtr border_width , IntPtr depth ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XGetGeometry")]
2007-08-21 09:01:24 +00:00
public extern static bool XGetGeometry ( IntPtr display , IntPtr window , IntPtr root , IntPtr x , IntPtr y , out int width , out int height , IntPtr border_width , IntPtr depth ) ;
2007-08-05 23:09:05 +00:00
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XWarpPointer")] //, CLSCompliant(false)]
2007-08-21 09:01:24 +00:00
public extern static uint XWarpPointer ( IntPtr display , IntPtr src_w , IntPtr dest_w , int src_x , int src_y , uint src_width , uint src_height , int dest_x , int dest_y ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XClearWindow")]
2007-08-21 09:01:24 +00:00
public extern static int XClearWindow ( IntPtr display , IntPtr window ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XClearArea")]
2007-08-21 09:01:24 +00:00
public extern static int XClearArea ( IntPtr display , IntPtr window , int x , int y , int width , int height , bool exposures ) ;
2007-08-05 23:09:05 +00:00
// Colormaps
[DllImport("libX11", EntryPoint = "XDefaultScreenOfDisplay")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XDefaultScreenOfDisplay ( IntPtr display ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XScreenNumberOfScreen")]
2007-08-21 09:01:24 +00:00
public extern static int XScreenNumberOfScreen ( IntPtr display , IntPtr Screen ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XDefaultVisual")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XDefaultVisual ( IntPtr display , int screen_number ) ;
2007-08-05 23:09:05 +00:00
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XDefaultDepth")] //, CLSCompliant(false)]
2007-08-21 09:01:24 +00:00
public extern static uint XDefaultDepth ( IntPtr display , int screen_number ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XDefaultScreen")]
2007-08-21 09:01:24 +00:00
public extern static int XDefaultScreen ( IntPtr display ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XDefaultColormap")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XDefaultColormap ( IntPtr display , int screen_number ) ;
2007-08-05 23:09:05 +00:00
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XLookupColor")] //, CLSCompliant(false)]
2007-08-21 09:01:24 +00:00
public extern static int XLookupColor ( IntPtr display , IntPtr Colormap , string Coloranem , ref XColor exact_def_color , ref XColor screen_def_color ) ;
2007-08-05 23:09:05 +00:00
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XAllocColor")] //, CLSCompliant(false)]
2007-08-21 09:01:24 +00:00
public extern static int XAllocColor ( IntPtr display , IntPtr Colormap , ref XColor colorcell_def ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetTransientForHint")]
2007-08-21 09:01:24 +00:00
public extern static int XSetTransientForHint ( IntPtr display , IntPtr window , IntPtr prop_window ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XChangeProperty")]
2007-08-21 09:01:24 +00:00
public extern static int XChangeProperty ( IntPtr display , IntPtr window , IntPtr property , IntPtr type , int format , PropertyMode mode , ref MotifWmHints data , int nelements ) ;
2007-08-05 23:09:05 +00:00
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XChangeProperty")] //, CLSCompliant(false)]
2007-08-21 09:01:24 +00:00
public extern static int XChangeProperty ( IntPtr display , IntPtr window , IntPtr property , IntPtr type , int format , PropertyMode mode , ref uint value , int nelements ) ;
2007-08-21 09:34:05 +00:00
[DllImport("libX11", EntryPoint = "XChangeProperty")]
public extern static int XChangeProperty ( IntPtr display , IntPtr window , IntPtr property , IntPtr type , int format , PropertyMode mode , ref int value , int nelements ) ;
2007-08-05 23:09:05 +00:00
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XChangeProperty")] //, CLSCompliant(false)]
2007-08-21 09:01:24 +00:00
public extern static int XChangeProperty ( IntPtr display , IntPtr window , IntPtr property , IntPtr type , int format , PropertyMode mode , ref IntPtr value , int nelements ) ;
2007-08-05 23:09:05 +00:00
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XChangeProperty")] //, CLSCompliant(false)]
2007-08-21 09:01:24 +00:00
public extern static int XChangeProperty ( IntPtr display , IntPtr window , IntPtr property , IntPtr type , int format , PropertyMode mode , uint [ ] data , int nelements ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XChangeProperty")]
2007-08-21 09:01:24 +00:00
public extern static int XChangeProperty ( IntPtr display , IntPtr window , IntPtr property , IntPtr type , int format , PropertyMode mode , int [ ] data , int nelements ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XChangeProperty")]
2007-08-21 09:01:24 +00:00
public extern static int XChangeProperty ( IntPtr display , IntPtr window , IntPtr property , IntPtr type , int format , PropertyMode mode , IntPtr [ ] data , int nelements ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XChangeProperty")]
2007-08-21 09:01:24 +00:00
public extern static int XChangeProperty ( IntPtr display , IntPtr window , IntPtr property , IntPtr type , int format , PropertyMode mode , IntPtr atoms , int nelements ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XChangeProperty", CharSet = CharSet.Ansi)]
2007-08-21 09:01:24 +00:00
public extern static int XChangeProperty ( IntPtr display , IntPtr window , IntPtr property , IntPtr type , int format , PropertyMode mode , string text , int text_length ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XDeleteProperty")]
2007-08-21 09:01:24 +00:00
public extern static int XDeleteProperty ( IntPtr display , IntPtr window , IntPtr property ) ;
2007-08-05 23:09:05 +00:00
// Drawing
[DllImport("libX11", EntryPoint = "XCreateGC")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XCreateGC ( IntPtr display , IntPtr window , IntPtr valuemask , ref XGCValues values ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XFreeGC")]
2007-08-21 09:01:24 +00:00
public extern static int XFreeGC ( IntPtr display , IntPtr gc ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetFunction")]
2007-08-21 09:01:24 +00:00
public extern static int XSetFunction ( IntPtr display , IntPtr gc , GXFunction function ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetLineAttributes")]
2007-08-21 09:01:24 +00:00
public extern static int XSetLineAttributes ( IntPtr display , IntPtr gc , int line_width , GCLineStyle line_style , GCCapStyle cap_style , GCJoinStyle join_style ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XDrawLine")]
2007-08-21 09:01:24 +00:00
public extern static int XDrawLine ( IntPtr display , IntPtr drawable , IntPtr gc , int x1 , int y1 , int x2 , int y2 ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XDrawRectangle")]
2007-08-21 09:01:24 +00:00
public extern static int XDrawRectangle ( IntPtr display , IntPtr drawable , IntPtr gc , int x1 , int y1 , int width , int height ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XFillRectangle")]
2007-08-21 09:01:24 +00:00
public extern static int XFillRectangle ( IntPtr display , IntPtr drawable , IntPtr gc , int x1 , int y1 , int width , int height ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetWindowBackground")]
2007-08-21 09:01:24 +00:00
public extern static int XSetWindowBackground ( IntPtr display , IntPtr window , IntPtr background ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XCopyArea")]
2007-08-21 09:01:24 +00:00
public extern static int XCopyArea ( IntPtr display , IntPtr src , IntPtr dest , IntPtr gc , int src_x , int src_y , int width , int height , int dest_x , int dest_y ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XGetWindowProperty")]
2007-08-21 09:01:24 +00:00
public extern static int XGetWindowProperty ( IntPtr display , IntPtr window , IntPtr atom , IntPtr long_offset , IntPtr long_length , bool delete , IntPtr req_type , out IntPtr actual_type , out int actual_format , out IntPtr nitems , out IntPtr bytes_after , ref IntPtr prop ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetInputFocus")]
2007-08-21 09:01:24 +00:00
public extern static int XSetInputFocus ( IntPtr display , IntPtr window , RevertTo revert_to , IntPtr time ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XIconifyWindow")]
2007-08-21 09:01:24 +00:00
public extern static int XIconifyWindow ( IntPtr display , IntPtr window , int screen_number ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XDefineCursor")]
2007-08-21 09:01:24 +00:00
public extern static int XDefineCursor ( IntPtr display , IntPtr window , IntPtr cursor ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XUndefineCursor")]
2007-08-21 09:01:24 +00:00
public extern static int XUndefineCursor ( IntPtr display , IntPtr window ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XFreeCursor")]
2007-08-21 09:01:24 +00:00
public extern static int XFreeCursor ( IntPtr display , IntPtr cursor ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XCreateFontCursor")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XCreateFontCursor ( IntPtr display , CursorFontShape shape ) ;
2007-08-05 23:09:05 +00:00
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XCreatePixmapCursor")] //, CLSCompliant(false)]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XCreatePixmapCursor ( IntPtr display , IntPtr source , IntPtr mask , ref XColor foreground_color , ref XColor background_color , int x_hot , int y_hot ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XCreatePixmapFromBitmapData")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XCreatePixmapFromBitmapData ( IntPtr display , IntPtr drawable , byte [ ] data , int width , int height , IntPtr fg , IntPtr bg , int depth ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XCreatePixmap")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XCreatePixmap ( IntPtr display , IntPtr d , int width , int height , int depth ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XFreePixmap")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XFreePixmap ( IntPtr display , IntPtr pixmap ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XQueryBestCursor")]
2007-08-21 09:01:24 +00:00
public extern static int XQueryBestCursor ( IntPtr display , IntPtr drawable , int width , int height , out int best_width , out int best_height ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XQueryExtension")]
2007-08-21 09:01:24 +00:00
public extern static int XQueryExtension ( IntPtr display , string extension_name , ref int major , ref int first_event , ref int first_error ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XWhitePixel")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XWhitePixel ( IntPtr display , int screen_no ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XBlackPixel")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XBlackPixel ( IntPtr display , int screen_no ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XGrabServer")]
2007-08-21 09:01:24 +00:00
public extern static void XGrabServer ( IntPtr display ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XUngrabServer")]
2007-08-21 09:01:24 +00:00
public extern static void XUngrabServer ( IntPtr display ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XGetWMNormalHints")]
2007-08-21 09:01:24 +00:00
public extern static void XGetWMNormalHints ( IntPtr display , IntPtr window , ref XSizeHints hints , out IntPtr supplied_return ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetWMNormalHints")]
2007-08-21 09:01:24 +00:00
public extern static void XSetWMNormalHints ( IntPtr display , IntPtr window , ref XSizeHints hints ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetZoomHints")]
2007-08-21 09:01:24 +00:00
public extern static void XSetZoomHints ( IntPtr display , IntPtr window , ref XSizeHints hints ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetWMHints")]
2007-08-21 09:01:24 +00:00
public extern static void XSetWMHints ( IntPtr display , IntPtr window , ref XWMHints wmhints ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XGetIconSizes")]
2007-08-21 09:01:24 +00:00
public extern static int XGetIconSizes ( IntPtr display , IntPtr window , out IntPtr size_list , out int count ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetErrorHandler")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XSetErrorHandler ( XErrorHandler error_handler ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XGetErrorText")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XGetErrorText ( IntPtr display , byte code , StringBuilder buffer , int length ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XInitThreads")]
2007-08-21 09:01:24 +00:00
public extern static int XInitThreads ( ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XConvertSelection")]
2007-08-21 09:01:24 +00:00
public extern static int XConvertSelection ( IntPtr display , IntPtr selection , IntPtr target , IntPtr property , IntPtr requestor , IntPtr time ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XGetSelectionOwner")]
2007-08-21 09:01:24 +00:00
public extern static IntPtr XGetSelectionOwner ( IntPtr display , IntPtr selection ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetSelectionOwner")]
2007-08-21 09:01:24 +00:00
public extern static int XSetSelectionOwner ( IntPtr display , IntPtr selection , IntPtr owner , IntPtr time ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XSetPlaneMask")]
2007-08-21 09:01:24 +00:00
public extern static int XSetPlaneMask ( IntPtr display , IntPtr gc , IntPtr mask ) ;
2007-08-05 23:09:05 +00:00
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XSetForeground")] //, CLSCompliant(false)]
2007-08-21 09:01:24 +00:00
public extern static int XSetForeground ( IntPtr display , IntPtr gc , UIntPtr foreground ) ;
2007-08-21 09:34:05 +00:00
[DllImport("libX11", EntryPoint = "XSetForeground")]
public extern static int XSetForeground ( IntPtr display , IntPtr gc , IntPtr foreground ) ;
2007-08-05 23:09:05 +00:00
2008-01-31 13:15:17 +00:00
[DllImport("libX11", EntryPoint = "XSetBackground")] //, CLSCompliant(false)]
2007-08-21 09:01:24 +00:00
public extern static int XSetBackground ( IntPtr display , IntPtr gc , UIntPtr background ) ;
2007-08-21 09:34:05 +00:00
[DllImport("libX11", EntryPoint = "XSetBackground")]
public extern static int XSetBackground ( IntPtr display , IntPtr gc , IntPtr background ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XBell")]
2007-08-21 09:01:24 +00:00
public extern static int XBell ( IntPtr display , int percent ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XChangeActivePointerGrab")]
2007-08-21 09:01:24 +00:00
public extern static int XChangeActivePointerGrab ( IntPtr display , EventMask event_mask , IntPtr cursor , IntPtr time ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11", EntryPoint = "XFilterEvent")]
2007-08-21 09:01:24 +00:00
public extern static bool XFilterEvent ( ref XEvent xevent , IntPtr window ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11")]
2007-08-21 09:01:24 +00:00
public extern static void XkbSetDetectableAutoRepeat ( IntPtr display , bool detectable , IntPtr supported ) ;
2007-08-05 23:09:05 +00:00
[DllImport("libX11")]
2007-08-21 09:01:24 +00:00
public extern static void XPeekEvent ( IntPtr display , ref XEvent xevent ) ;
2008-03-01 13:15:31 +00:00
[DllImport("libX11")]
public static extern IntPtr XGetVisualInfo ( IntPtr display , IntPtr vinfo_mask , ref XVisualInfo vinfo_template ,
out int nitems_return ) ;
2007-08-05 23:09:05 +00:00
}
}