X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FManaged.Windows.Forms%2FSystem.Windows.Forms%2FXplatUIStructs.cs;h=21b2515477c0e817cb78b1ab59dc70c5f2119416;hb=4a8ffc802392458d3d9f6ce8ceaa2914eb8395ca;hp=f0a51db67b2b2c5f3e46c737177427a660807bc1;hpb=7e341e71449c5c71716d87f6690311f95e06748e;p=mono.git diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIStructs.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIStructs.cs index f0a51db67b2..21b2515477c 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIStructs.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIStructs.cs @@ -30,9 +30,19 @@ using System; using System.Drawing; using System.Runtime.InteropServices; -namespace System.Windows.Forms { +#if PUBLIC_TYPES +namespace Mono.Winforms +#else +namespace System.Windows.Forms +#endif +{ [Flags] - internal enum WindowStyles : int { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum WindowStyles : int { WS_OVERLAPPED = 0x00000000, WS_POPUP = unchecked((int)0x80000000), WS_CHILD = 0x40000000, @@ -42,7 +52,7 @@ namespace System.Windows.Forms { WS_CLIPSIBLINGS = 0x04000000, WS_CLIPCHILDREN = 0x02000000, WS_MAXIMIZE = 0x01000000, - WS_CAPTION = 0x00C00000, + WS_CAPTION = 0x00C00000, // == WS_BORDER | WS_DLGFRAME WS_BORDER = 0x00800000, WS_DLGFRAME = 0x00400000, WS_VSCROLL = 0x00200000, @@ -63,7 +73,12 @@ namespace System.Windows.Forms { } [Flags] - internal enum WindowExStyles : int { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum WindowExStyles : int { // Extended Styles WS_EX_DLGMODALFRAME = 0x00000001, WS_EX_DRAGDETECT = 0x00000002, @@ -98,7 +113,25 @@ namespace System.Windows.Forms { WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST } - internal enum Msg { + [Flags] +#if PUBLIC_TYPES + public +#else + internal +#endif + enum ToolBarStyles : int { + TBSTYLE_TOOLTIPS = 0x100, + TBSTYLE_FLAT = 0x800, + TBSTYLE_LIST = 0x1000, + TBSTYLE_TRANSPARENT = 0x8000 + } + +#if PUBLIC_TYPES + public +#else + internal +#endif + enum Msg { WM_NULL = 0x0000, WM_CREATE = 0x0001, WM_DESTROY = 0x0002, @@ -234,6 +267,7 @@ namespace System.Windows.Forms { WM_MENUGETOBJECT = 0x0124, WM_UNINITMENUPOPUP = 0x0125, WM_MENUCOMMAND = 0x0126, + WM_CHANGEUISTATE = 0x0127, WM_UPDATEUISTATE = 0x0128, WM_QUERYUISTATE = 0x0129, @@ -338,13 +372,29 @@ namespace System.Windows.Forms { // Our "private" ones WM_MOUSE_ENTER = 0x0401, - WM_MOUSE_LEAVE = 0x0402, WM_ASYNC_MESSAGE = 0x0403, WM_REFLECT = WM_USER + 0x1c00, - WM_CLOSE_INTERNAL = WM_USER + 0x1c01 + WM_CLOSE_INTERNAL = WM_USER + 0x1c01, + + // private messages to support on-the-spot IME editing. + WM_XIM_PREEDITSTART = WM_USER + 0x1d00, + WM_XIM_PREEDITDONE = WM_USER + 0x1d01, + WM_XIM_PREEDITDRAW = WM_USER + 0x1d02, + WM_XIM_PREEDITCARET = WM_USER + 0x1d03, + + // NotifyIcon (Systray) Balloon messages + NIN_BALLOONSHOW = WM_USER + 0x0002, + NIN_BALLOONHIDE = WM_USER + 0x0003, + NIN_BALLOONTIMEOUT = WM_USER + 0x0004, + NIN_BALLOONUSERCLICK = WM_USER + 0x0005 } - internal enum MsgButtons { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum MsgButtons { MK_LBUTTON = 0x0001, MK_RBUTTON = 0x0002, MK_SHIFT = 0x0004, @@ -354,14 +404,54 @@ namespace System.Windows.Forms { MK_XBUTTON2 = 0x0040, } +#if PUBLIC_TYPES + public +#else + internal +#endif + enum MsgUIState { + UIS_SET = 1, + UIS_CLEAR = 2, + UIS_INITIALIZE = 3, + UISF_HIDEFOCUS = 0x1, + UISF_HIDEACCEL = 0x2, + UISF_ACTIVE = 0x4 + } + [StructLayout(LayoutKind.Sequential)] - internal struct POINT { - internal int x; - internal int y; +#if PUBLIC_TYPES + public +#else + internal +#endif + struct POINT { + public int x; + public int y; + + public POINT (int x, int y) + { + this.x = x; + this.y = y; + } + + public Point ToPoint () + { + return new Point (x, y); + } + + public override string ToString () + { + return "Point {" + x.ToString () + ", " + y.ToString () + "}"; + } } [StructLayout(LayoutKind.Sequential)] - internal struct MSG { +#if PUBLIC_TYPES + public +#else + internal +#endif + struct MSG { internal IntPtr hwnd; internal Msg message; internal IntPtr wParam; @@ -369,29 +459,54 @@ namespace System.Windows.Forms { internal uint time; internal POINT pt; internal object refobject; + + public override string ToString () + { + return String.Format ("msg=0x{0:x} ({1}) hwnd=0x{2:x} wparam=0x{3:x} lparam=0x{4:x} pt={5}", (int) message, message.ToString (), hwnd.ToInt32 (), wParam.ToInt32 (), lParam.ToInt32 (), pt); + } } [Flags] - internal enum TransparencySupport { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum TransparencySupport { None = 0x00, Get = 0x01, Set = 0x02, GetSet = 0x03 } - internal enum WindowActiveFlags { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum WindowActiveFlags { WA_INACTIVE = 0, WA_ACTIVE = 1, WA_CLICKACTIVE = 2 } - internal enum KeybdEventFlags { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum KeybdEventFlags { None = 0, ExtendedKey = 0x0001, KeyUp = 0x0002 } - internal enum VirtualKeys { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum VirtualKeys { VK_LBUTTON = 0x01, VK_RBUTTON = 0x02, VK_CANCEL = 0x03, @@ -408,6 +523,8 @@ namespace System.Windows.Forms { VK_PAUSE = 0x13, VK_CAPITAL = 0x14, VK_ESCAPE = 0x1B, + VK_CONVERT = 0x1C, + VK_NONCONVERT = 0x1D, VK_SPACE = 0x20, VK_PRIOR = 0x21, VK_NEXT = 0x22, @@ -528,6 +645,11 @@ namespace System.Windows.Forms { VK_ICO_HELP = 0xE3, VK_ICO_00 = 0xE4, VK_PROCESSKEY = 0xE5, + VK_OEM_ATTN = 0xF0, + VK_OEM_COPY = 0xF2, + VK_OEM_AUTO = 0xF3, + VK_OEM_ENLW = 0xF4, + VK_OEM_BACKTAB = 0xF5, VK_ATTN = 0xF6, VK_CRSEL = 0xF7, VK_EXSEL = 0xF8, @@ -539,7 +661,12 @@ namespace System.Windows.Forms { VK_OEM_CLEAR = 0xFE, } - internal enum TtyKeys { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum TtyKeys { XK_BackSpace = 0xff08, /* Back space, back char */ XK_Tab = 0xff09, XK_Linefeed = 0xff0a, /* Linefeed, LF */ @@ -552,7 +679,12 @@ namespace System.Windows.Forms { XK_Delete = 0xffff /* Delete, rubout */ } - internal enum MiscKeys { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum MiscKeys { XK_ISO_Lock = 0xfe01, XK_ISO_Last_Group_Lock = 0xfe0f, XK_Select = 0xff60, @@ -571,7 +703,12 @@ namespace System.Windows.Forms { XK_Num_Lock = 0xff7f } - internal enum KeypadKeys { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum KeypadKeys { XK_KP_Space = 0xff80, XK_KP_Tab = 0xff89, XK_KP_Enter = 0xff8d, /* Enter */ @@ -612,7 +749,12 @@ namespace System.Windows.Forms { XK_KP_9 = 0xffb9 } - internal enum DeadKeys { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum DeadKeys { XK_dead_grave = 0xfe50, XK_dead_acute = 0xfe51, XK_dead_circumflex = 0xfe52, @@ -636,7 +778,12 @@ namespace System.Windows.Forms { } [StructLayout(LayoutKind.Sequential)] - internal struct HELPINFO { +#if PUBLIC_TYPES + public +#else + internal +#endif + struct HELPINFO { internal uint cbSize; internal int iContextType; internal int iCtrlId; @@ -645,13 +792,23 @@ namespace System.Windows.Forms { internal POINT MousePos; } - internal enum PeekMessageFlags { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum PeekMessageFlags { PM_NOREMOVE = 0x00000000, PM_REMOVE = 0x00000001, PM_NOYIELD = 0x00000002 } - internal enum StdCursor { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum StdCursor { Default = 0, AppStarting = 1, Arrow = 2, @@ -682,7 +839,12 @@ namespace System.Windows.Forms { WaitCursor = 27 } - internal enum HitTest { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum HitTest { HTERROR = -2, HTTRANSPARENT = -1, HTNOWHERE = 0, @@ -714,14 +876,24 @@ namespace System.Windows.Forms { HTHELP = 21 } - internal enum TitleStyle { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum TitleStyle { None = 0, Normal = 1, Tool = 2 } [StructLayout(LayoutKind.Sequential)] - internal struct BITMAPINFOHEADER { +#if PUBLIC_TYPES + public +#else + internal +#endif + struct BITMAPINFOHEADER { internal uint biSize; internal int biWidth; internal int biHeight; @@ -735,7 +907,12 @@ namespace System.Windows.Forms { internal uint biClrImportant; } - internal enum ClipboardFormats : ushort { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum ClipboardFormats : ushort { CF_TEXT = 1, CF_BITMAP = 2, CF_METAFILEPICT = 3, @@ -756,7 +933,12 @@ namespace System.Windows.Forms { } [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)] - internal struct MINMAXINFO { +#if PUBLIC_TYPES + public +#else + internal +#endif + struct MINMAXINFO { internal POINT ptReserved; internal POINT ptMaxSize; internal POINT ptMaxPosition; @@ -764,7 +946,26 @@ namespace System.Windows.Forms { internal POINT ptMaxTrackSize; } - internal enum ScrollBarCommands { + [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)] +#if PUBLIC_TYPES + public +#else + internal +#endif + struct KeyFilterData { + internal bool Down; + internal int keycode; + internal int keysym; + internal Keys ModifierKeys; + internal String str; + } + +#if PUBLIC_TYPES + public +#else + internal +#endif + enum ScrollBarCommands { SB_LINEUP = 0, SB_LINELEFT = 0, SB_LINEDOWN = 1, @@ -782,7 +983,12 @@ namespace System.Windows.Forms { SB_ENDSCROLL = 8 } - internal enum ClipCombineMode { +#if PUBLIC_TYPES + public +#else + internal +#endif + enum ClipCombineMode { RGN_AND = 1, RGN_OR, RGN_XOR, @@ -792,5 +998,45 @@ namespace System.Windows.Forms { RGN_MIN = RGN_AND, RGN_MAX = RGN_COPY } + +#if PUBLIC_TYPES + public +#else + internal +#endif + enum SystemCommands { + SC_SIZE = 0xF000, + SC_MOVE = 0xF010, + SC_MINIMIZE = 0xF020, + SC_MAXIMIZE = 0xF030, + SC_NEXTWINDOW = 0xF040, + SC_PREVWINDOW = 0xF050, + SC_CLOSE = 0xF060, + SC_VSCROLL = 0xF070, + SC_HSCROLL = 0xF080, + SC_MOUSEMENU = 0xF090, + SC_KEYMENU = 0xF100, + SC_ARRANGE = 0xF110, + SC_RESTORE = 0xF120, + SC_TASKLIST = 0xF130, + SC_SCREENSAVE = 0xF140, + SC_HOTKEY = 0xF150, + SC_DEFAULT = 0xF160, + SC_MONITORPOWER = 0xF170, + SC_CONTEXTHELP = 0xF180 + } + +#if PUBLIC_TYPES + public +#else + internal +#endif + enum AlertType { + Default = 1, + Error = 2, + Question = 3, + Warning = 4, + Information = 5 + } }