~ubuntu-branches/ubuntu/natty/gtk-sharp2/natty

« back to all changes in this revision

Viewing changes to gtk/Application.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-05-18 00:00:41 UTC
  • mfrom: (1.1.16 upstream) (13.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100518000041-tlgvki554jx6ndhi
Tags: 2.12.10-1
* New upstream release
* debian/rules:
  + Bump API version to 2.12.10
* debian/control:
  + Bump Standards to 3.8.4 (no changes needed)
* debian/source/format:
  + Force Debian source format 1.0
* debian/rules:
  + Write a get-orig-source rule
* debian/watch:
  + Get rid of evil "debian uupdate" line which breaks packaging work on
    Ubuntu
* debian/patches/01_dllmaps.dpatch:
  + Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
                private Application ()
34
34
                {
35
35
                }
36
 
                
 
36
 
 
37
                const int WS_EX_TOOLWINDOW = 0x00000080;
 
38
                const int WS_OVERLAPPEDWINDOW = 0x00CF0000;
 
39
 
 
40
                [DllImport ("user32.dll", EntryPoint="CreateWindowExW", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.StdCall)]
 
41
                static extern IntPtr Win32CreateWindow (int dwExStyle, string lpClassName, string lpWindowName,int dwStyle, int x, int y, int nWidth, int nHeight, IntPtr hWndParent, IntPtr hMenu, IntPtr hInstance, IntPtr lParam);
 
42
 
 
43
                [DllImport ("user32.dll", EntryPoint="DestroyWindow", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.StdCall)]
 
44
                static extern bool Win32DestroyWindow (IntPtr window); 
 
45
 
37
46
                static Application ()
38
47
                {
39
48
                        if (!GLib.Thread.Supported)
44
53
                        case PlatformID.Win32S:
45
54
                        case PlatformID.Win32Windows:
46
55
                        case PlatformID.WinCE:
47
 
                                Assembly assm = Assembly.Load ("System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
48
 
                                Type swfapp = assm.GetType ("System.Windows.Forms.Application");
49
 
                                MethodInfo method = swfapp.GetMethod ("DoEvents", BindingFlags.Public | BindingFlags.Static);
50
 
                                method.Invoke (null, null);
 
56
                                // No idea why we need to create that window, but it enables visual styles on the Windows platform
 
57
                                IntPtr window = Win32CreateWindow (WS_EX_TOOLWINDOW, "static", "gtk-sharp visual styles window", WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
 
58
                                Win32DestroyWindow (window);
51
59
                                break;
52
60
                        default:
53
61
                                break;