#region Public Properties
- internal override int Caption {
+ internal override int CaptionHeight {
get { return 19; }
}
internal override Size MaxWindowTrackSize {
get { return new Size (WorkingArea.Width, WorkingArea.Height); }
- }
+ }
- internal override Size MinimizedWindowSize {
- get { return new Size(1, 1); }
- }
+ internal override bool MenuAccessKeysUnderlined {
+ get {
+ return false;
+ }
+ }
internal override Size MinimizedWindowSpacingSize {
get { return new Size(1, 1); }
get { return new Size(1, 1); }
}
- internal override Size MinWindowTrackSize {
- get { return new Size(1, 1); }
- }
-
internal override Keys ModifierKeys {
get { return display.ModifierKeys; }
}
#endregion // Public properties
#region Public Static Methods
- internal override IntPtr InitializeDriver()
+ internal override void RaiseIdle (EventArgs e)
+ {
+ X11ThreadQueue queue = ThreadQueue (Thread.CurrentThread);
+ queue.OnIdle (e);
+ }
+
+ internal override IntPtr InitializeDriver ()
{
lock (this) {
if (display == null)
}
// XXX this implementation should probably be shared between all non-win32 backends
- internal override bool CalculateWindowRect (ref Rectangle ClientRect, int Style, int ExStyle, Menu menu, out Rectangle WindowRect)
+ internal override bool CalculateWindowRect (ref Rectangle ClientRect, CreateParams cp, Menu menu, out Rectangle WindowRect)
{
- FormBorderStyle border_style;
- TitleStyle title_style;
- bool border_static;
- int caption_height;
- int tool_caption_height;
-
- // XXX this method should be static on Hwnd, not X11Hwnd
- X11Hwnd.DeriveStyles (Style, ExStyle, out border_style, out border_static, out title_style,
- out caption_height, out tool_caption_height);
-
- WindowRect = Hwnd.GetWindowRectangle(border_style, border_static, menu, title_style,
- caption_height, tool_caption_height,
- ClientRect);
+ WindowRect = Hwnd.GetWindowRectangle (cp, menu, ClientRect);
return true;
}
{
return display.DefineCursor (bitmap, mask, cursor_pixel, mask_pixel, xHotSpot, yHotSpot);
}
-
+ internal override Bitmap DefineStdCursorBitmap (StdCursor id)
+ {
+ return display.DefineStdCursorBitmap (id);
+ }
internal override IntPtr DefineStdCursor (StdCursor id)
{
return display.DefineStdCursor (id);
return IntPtr.Zero;
}
+ // This is a nop on win32 and x11
+ internal override IntPtr GetPreviousWindow(IntPtr handle) {
+ return handle;
+ }
+
internal override void GetCursorPos (IntPtr handle, out int x, out int y)
{
display.GetCursorPos ((X11Hwnd)Hwnd.ObjectFromHandle(handle),
// XXX this should be shared amongst non-win32 backends
internal override bool GetFontMetrics (Graphics g, Font font, out int ascent, out int descent)
{
- return Xlib.GetFontMetrics(g.GetHdc(), font.ToHfont(), out ascent, out descent);
+ FontFamily ff = font.FontFamily;
+ ascent = ff.GetCellAscent (font.Style);
+ descent = ff.GetCellDescent (font.Style);
+ return true;
}
display.OverrideCursor = cursor;
}
- internal override PaintEventArgs PaintEventStart (IntPtr handle, bool client)
+ internal override PaintEventArgs PaintEventStart (ref Message m, IntPtr handle, bool client)
{
- return display.PaintEventStart (handle, client);
+ return display.PaintEventStart (ref m, handle, client);
}
- internal override void PaintEventEnd (IntPtr handle, bool client)
+ internal override void PaintEventEnd (ref Message m, IntPtr handle, bool client)
{
- display.PaintEventEnd (handle, client);
+ display.PaintEventEnd (ref m, handle, client);
}
display.SystrayRemove (handle, ref tt);
}
-#if NET_2_0
+ NotifyIcon.BalloonWindow balloon_window;
+
internal override void SystrayBalloon(IntPtr handle, int timeout, string title, string text, ToolTipIcon icon)
{
Control control = Control.FromHandle(handle);
if (control == null)
return;
- NotifyIcon.BalloonWindow form = new NotifyIcon.BalloonWindow (handle);
- form.Title = title;
- form.Text = text;
- form.Timeout = timeout;
- form.Show ();
+ if (balloon_window != null) {
+ balloon_window.Close ();
+ balloon_window.Dispose ();
+ }
+
+ balloon_window = new NotifyIcon.BalloonWindow (handle);
+ balloon_window.Title = title;
+ balloon_window.Text = text;
+ balloon_window.Timeout = timeout;
+ balloon_window.Show ();
SendMessage(handle, Msg.WM_USER, IntPtr.Zero, (IntPtr) Msg.NIN_BALLOONSHOW);
}
-#endif
internal override bool Text (IntPtr handle, string text)
{