dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/Xsharp/Types ConfigureWindowMask.cs,


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/Xsharp/Types ConfigureWindowMask.cs,NONE,1.1 CreateWindowMask.cs,NONE,1.1 GCValueMask.cs,NONE,1.1 XColor.cs,NONE,1.1 XGCValues.cs,NONE,1.1 XPoint.cs,NONE,1.1 XRectangle.cs,NONE,1.1 XSegment.cs,NONE,1.1 XSetWindowAttributes.cs,NONE,1.1 XWindowChanges.cs,NONE,1.1
Date: Wed, 28 May 2003 00:17:55 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/Xsharp/Types
In directory subversions:/tmp/cvs-serv20758/Xsharp/Types

Added Files:
        ConfigureWindowMask.cs CreateWindowMask.cs GCValueMask.cs 
        XColor.cs XGCValues.cs XPoint.cs XRectangle.cs XSegment.cs 
        XSetWindowAttributes.cs XWindowChanges.cs 
Log Message:


Add the Xsharp library to pnetlib.


--- NEW FILE ---
/*
 * ConfigureWindowMask.cs - Value mask values for "XConfigureWindow".
 *
 * Copyright (C) 2002, 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Xsharp.Types
{

using System;

[Flags]
internal enum ConfigureWindowMask
{

        CWX                             = (1<<0),
        CWY                             = (1<<1),
        CWWidth                 = (1<<2),
        CWHeight                = (1<<3),
        CWBorderWidth   = (1<<4),
        CWSibling               = (1<<5),
        CWStackMode             = (1<<6)

} // enum ConfigureWindowMask

} // namespace Xsharp.Types

--- NEW FILE ---
/*
 * CreateWindowMask.cs - Value mask values for "XCreateWindow".
 *
 * Copyright (C) 2002, 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Xsharp.Types
{

using System;

[Flags]
internal enum CreateWindowMask
{

        CWBackPixmap            = (1<<0),
        CWBackPixel                     = (1<<1),
        CWBorderPixmap          = (1<<2),
        CWBorderPixel       = (1<<3),
        CWBitGravity            = (1<<4),
        CWWinGravity            = (1<<5),
        CWBackingStore      = (1<<6),
        CWBackingPlanes     = (1<<7),
        CWBackingPixel      = (1<<8),
        CWOverrideRedirect      = (1<<9),
        CWSaveUnder                     = (1<<10),
        CWEventMask                     = (1<<11),
        CWDontPropagate     = (1<<12),
        CWColormap                      = (1<<13),
        CWCursor                = (1<<14)

} // enum CreateWindowMask

} // namespace Xsharp.Types

--- NEW FILE ---
/*
 * GCValueMask.cs - GC value mask values.
 *
 * Copyright (C) 2002, 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Xsharp.Types
{

using System;

[Flags]
internal enum GCValueMask
{

        GCFunction          = (1<<0),
        GCPlaneMask         = (1<<1),
        GCForeground        = (1<<2),
        GCBackground        = (1<<3),
        GCLineWidth         = (1<<4),
        GCLineStyle         = (1<<5),
        GCCapStyle          = (1<<6),
        GCJoinStyle                 = (1<<7),
        GCFillStyle                 = (1<<8),
        GCFillRule                  = (1<<9) ,
        GCTile                      = (1<<10),
        GCStipple                   = (1<<11),
        GCTileStipXOrigin   = (1<<12),
        GCTileStipYOrigin   = (1<<13),
        GCFont                      = (1<<14),
        GCSubwindowMode         = (1<<15),
        GCGraphicsExposures = (1<<16),
        GCClipXOrigin           = (1<<17),
        GCClipYOrigin           = (1<<18),
        GCClipMask                  = (1<<19),
        GCDashOffset            = (1<<20),
        GCDashList                  = (1<<21),
        GCArcMode                   = (1<<22)

} // enum GCValueMask

} // namespace Xsharp.Types

--- NEW FILE ---
/*
 * XColor.cs - Definition of the X color structure.
 *
 * Copyright (C) 2002, 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Xsharp.Types
{

using System;
using System.Runtime.InteropServices;

// X color structure.
[StructLayout(LayoutKind.Sequential)]
internal struct XColor
{
        public Xlib.Pixel       pixel;
        public ushort           red, green, blue;
        public sbyte            flags;
        public sbyte            pad;

        public const int DoRed   = (1<<0);
        public const int DoGreen = (1<<1);
        public const int DoBlue  = (1<<2);

} // struct XColor

} // namespace Xsharp.Types

--- NEW FILE ---
/*
 * XGCValues.cs - Definition of the X graphic context values structure.
 *
 * Copyright (C) 2002, 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Xsharp.Types
{

using System;
using System.Runtime.InteropServices;

// X graphic context values structure.
[StructLayout(LayoutKind.Sequential)]
internal struct XGCValues
{

        // Structure fields.
        public Xlib.Xint        function__;
        public Xlib.Pixel       plane_mask;
        public Xlib.Pixel       foreground;
        public Xlib.Pixel       background;
        public Xlib.Xint        line_width__;
        public Xlib.Xint        line_style__;
        public Xlib.Xint        cap_style__;
        public Xlib.Xint        join_style__;
        public Xlib.Xint        fill_style__;
        public Xlib.Xint        fill_rule__;
        public Xlib.Xint        arc_mode__;
        public Xlib.Pixmap      tile;
        public Xlib.Pixmap      stipple;
        public Xlib.Xint        ts_x_origin__;
        public Xlib.Xint        ts_y_origin__;
        public Xlib.Font        font;
        public Xlib.Xint        subwindow_mode__;
        public Xlib.Bool        graphics_exposures__;
        public Xlib.Xint        clip_x_origin__;
        public Xlib.Xint        clip_y_origin__;
        public Xlib.Pixmap      clip_mask;
        public Xlib.Xint        dash_offset__;
        public sbyte            dashes;

        // Convert odd fields into types that are useful.
        public Function function
                        { get { return (Function)(int)function__; }
                          set { function__ = (Xlib.Xint)(int)value; } }
        public int line_width
                        { get { return (int)line_width__; }
                          set { line_width__ = (Xlib.Xint)value; } }
        public LineStyle line_style
                        { get { return (LineStyle)(int)line_style__; }
                          set { line_style__ = (Xlib.Xint)(int)value; } }
        public CapStyle cap_style
                        { get { return (CapStyle)(int)cap_style__; }
                          set { cap_style__ = (Xlib.Xint)(int)value; } }
        public JoinStyle join_style
                        { get { return (JoinStyle)(int)join_style__; }
                          set { join_style__ = (Xlib.Xint)(int)value; } }
        public FillStyle fill_style
                        { get { return (FillStyle)(int)fill_style__; }
                          set { fill_style__ = (Xlib.Xint)(int)value; } }
        public FillRule fill_rule
                        { get { return (FillRule)(int)fill_rule__; }
                          set { fill_rule__ = (Xlib.Xint)(int)value; } }
        public ArcMode arc_mode
                        { get { return (ArcMode)(int)arc_mode__; }
                          set { arc_mode__ = (Xlib.Xint)(int)value; } }
        public int ts_x_origin
                        { get { return (int)ts_x_origin__; }
                          set { ts_x_origin__ = (Xlib.Xint)value; } }
        public int ts_y_origin
                        { get { return (int)ts_y_origin__; }
                          set { ts_y_origin__ = (Xlib.Xint)value; } }
        public SubwindowMode subwindow_mode
                        { get { return (SubwindowMode)(int)subwindow_mode__; }
                          set { subwindow_mode__ = (Xlib.Xint)(int)value; } }
        public bool graphics_exposures
                        { get { return (graphics_exposures__ != 
Xlib.Bool.False); }
                          set { graphics_exposures__ = (value ? Xlib.Bool.True
                                                                                
                  : Xlib.Bool.False); } }
        public int clip_x_origin
                        { get { return (int)clip_x_origin__; }
                          set { clip_x_origin__ = (Xlib.Xint)value; } }
        public int clip_y_origin
                        { get { return (int)clip_y_origin__; }
                          set { clip_y_origin__ = (Xlib.Xint)value; } }
        public int dash_offset
                        { get { return (int)dash_offset__; }
                          set { dash_offset__ = (Xlib.Xint)value; } }

} // struct XGCValues

} // namespace Xsharp.Types

--- NEW FILE ---
/*
 * XPoint.cs - Definition of the X point type structure.
 *
 * Copyright (C) 2002, 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Xsharp.Types
{

using System;
using System.Runtime.InteropServices;

// X point structure.
[StructLayout(LayoutKind.Sequential)]
internal struct XPoint
{
        public short x;
        public short y;

        // Constructor.
        public XPoint(int x, int y)
                        {
                                try
                                {
                                        checked
                                        {
                                                this.x = (short)x;
                                                this.y = (short)y;
                                        }
                                }
                                catch(OverflowException)
                                {
                                        throw new 
XException(S._("X_PointCoordRange"));
                                }
                        }

} // struct XPoint

} // namespace Xsharp.Types

--- NEW FILE ---
/*
 * XRectangle.cs - Definition of the X rectangle type structure.
 *
 * Copyright (C) 2002, 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Xsharp.Types
{

using System;
using System.Runtime.InteropServices;

// X rectangle structure.
[StructLayout(LayoutKind.Sequential)]
internal struct XRectangle
{
        public short x;
        public short y;
        public ushort width;
        public ushort height;

        // Constructor.
        public XRectangle(int x, int y, int width, int height)
                        {
                                try
                                {
                                        checked
                                        {
                                                this.x = (short)x;
                                                this.y = (short)y;
                                                this.width = (ushort)width;
                                                this.height = (ushort)height;
                                        }
                                }
                                catch(OverflowException)
                                {
                                        throw new 
XException(S._("X_RectCoordRange"));
                                }
                        }

} // struct XRectangle

} // namespace Xsharp.Types

--- NEW FILE ---
/*
 * XSegment.cs - Definition of the X segment type structure.
 *
 * Copyright (C) 2002, 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Xsharp.Types
{

using System;
using System.Runtime.InteropServices;

// X segment structure.
[StructLayout(LayoutKind.Sequential)]
internal struct XSegment
{
        public short x1;
        public short y1;
        public short x2;
        public short y2;

} // struct XSegment

} // namespace Xsharp.Types

--- NEW FILE ---
/*
 * XSetWindowAttributes.cs - Definition of window attributes that can be set.
 *
 * Copyright (C) 2002, 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Xsharp.Types
{

using System;
using System.Runtime.InteropServices;
using Xsharp.Events;

// Set window attributes structure.
[StructLayout(LayoutKind.Sequential)]
internal struct XSetWindowAttributes
{

        // Structure fields.
        public Xlib.Pixmap              background_pixmap;
        public Xlib.Pixel               background_pixel;
        public Xlib.Pixmap              border_pixmap;
        public Xlib.Pixel               border_pixel;
        public Xlib.Xint                bit_gravity__;
        public Xlib.Xint                win_gravity__;
        public Xlib.Xint                backing_store__;
        public Xlib.Pixel               backing_planes;
        public Xlib.Pixel               backing_pixel;
        public Xlib.Bool                save_under__;
        public Xlib.Xlong               event_mask__;
        public Xlib.Xlong               do_not_propagate_mask__;
        public Xlib.Bool                override_redirect__;
        public Xlib.Colormap    colormap;
        public Xlib.Cursor              cursor;

        // Convert odd fields into types that are useful.
        public int bit_gravity
                        { get { return (int)bit_gravity__; }
                          set { bit_gravity__ = (Xlib.Xint)value; } }
        public int win_gravity
                        { get { return (int)win_gravity__; }
                          set { win_gravity__ = (Xlib.Xint)value; } }
        public int backing_store
                        { get { return (int)backing_store__; }
                          set { backing_store__ = (Xlib.Xint)value; } }
        public bool save_under
                        { get { return (save_under__ != Xlib.Bool.False); }
                          set { save_under__ = (value ? Xlib.Bool.True
                                                                                
  : Xlib.Bool.False); } }
        public EventMask event_mask
                        { get { return (EventMask)(int)event_mask__; }
                          set { event_mask__ = (Xlib.Xlong)(int)value; } }
        public EventMask do_not_propagate_mask
                        { get { return (EventMask)(int)do_not_propagate_mask__; 
}
                          set { do_not_propagate_mask__ = 
(Xlib.Xlong)(int)value; } }
        public bool override_redirect
                        { get { return (override_redirect__ != 
Xlib.Bool.False); }
                          set { override_redirect__ = (value ? Xlib.Bool.True
                                                                                
                 : Xlib.Bool.False); } }

} // struct XSetWindowAttributes

} // namespace Xsharp.Types

--- NEW FILE ---
/*
 * XWindowChanges.cs - Definition of configuration changes structure.
 *
 * Copyright (C) 2002, 2003  Southern Storm Software, Pty Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

namespace Xsharp.Types
{

using System;
using System.Runtime.InteropServices;

// Window configuration change structure.
[StructLayout(LayoutKind.Sequential)]
internal struct XWindowChanges
{

        // Structure fields.
        public Xlib.Xint                x__;
        public Xlib.Xint                y__;
        public Xlib.Xint                width__;
        public Xlib.Xint                height__;
        public Xlib.Xint                border_width__;
        public Xlib.Window              sibling;
        public Xlib.Xint                stack_mode__;

        // Convert odd fields into types that are useful.
        public int x
                        { get { return (int)x__; }
                          set { x__ = (Xlib.Xint)value; } }
        public int y
                        { get { return (int)y__; }
                          set { y__ = (Xlib.Xint)value; } }
        public int width
                        { get { return (int)width__; }
                          set { width__ = (Xlib.Xint)value; } }
        public int height
                        { get { return (int)height__; }
                          set { height__ = (Xlib.Xint)value; } }
        public int border_width
                        { get { return (int)border_width__; }
                          set { border_width__ = (Xlib.Xint)value; } }
        public int stack_mode
                        { get { return (int)stack_mode__; }
                          set { stack_mode__ = (Xlib.Xint)value; } }

} // struct XWindowChanges

} // namespace Xsharp.Types





reply via email to

[Prev in Thread] Current Thread [Next in Thread]