2
0

winforms 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. * System.Windows.Forms
  2. Currently Windows.Forms support is not finished.
  3. The System.Windows.Forms effort is taking two paths:
  4. <ul>
  5. <li>Win32/Wine-based: This effort will use the Win32
  6. API, and use a stub program to run the with Wine.
  7. This allows applications that use P/Invoke to
  8. function, and event delivery through the Wndproc
  9. method to work for the most advanced and custom
  10. applications. This is the path of best compatibility.
  11. Also, work on a Gtk-based rendered for Wine will be
  12. done, to make the user interface integrate with your
  13. desktop look.
  14. <li>Gtk# based: This effort will build a subset of
  15. Windows.Forms that uses Gtk#. This gives a better
  16. integration with the desktop, but will not be
  17. completely compatible with the Windows edition. In
  18. particular code that uses P/Invoke to call into Win32
  19. or overwrite the Wndproc method to achieve special
  20. effects will not work.
  21. </ul>
  22. * Win32/Wine edition.
  23. <table>
  24. <tr>
  25. <td>
  26. System.Windows.Forms is currently being implemented using the
  27. Win32 API, we will be using <a
  28. href="http://www.winehq.com">WineLib</a> on Unix systems to
  29. emulate the Win32 API.
  30. This means that those who want to contribute to the effort can
  31. develop and test classes today using Windows and P/Invoke
  32. calls to Win32 and we will then just run the result on Unix.
  33. In terms of integrating visually with the desktop, we are
  34. hoping to contribute to the Wine project an mechanism to make
  35. it use the Gtk+ themes on X11 and Cocoa on MacOS to render the
  36. widgets, and get the native look and feel on each of these
  37. platforms.
  38. </td>
  39. <td>
  40. <a href="images/WINESWF.JPG"><img src="images/WINESWF-mini.JPG"></a>
  41. </td>
  42. </table>
  43. * Gtk# based
  44. The code is contained in CVS.
  45. There are no current plans to support embedded devices, but
  46. Gtk/FrameBuffer is an option. If you have suggestions or
  47. recommendations, please let us <a
  48. href="mailto:[email protected]">let us know</a>
  49. * Contributing
  50. The Winforms effort is being coordinated in the <a
  51. href="mailto:[email protected]:.com">[email protected]</a>.
  52. If you are interested in helping out with this effort,
  53. subscribe to it by sending an email message to <a
  54. href="mailto:[email protected]:.com">[email protected]</a>.
  55. If you want to help, you can start by writing a control and
  56. testing it with Windows today (or you can also try to build
  57. the existing library on Linux, but this is a bit more
  58. complicated).
  59. See the file mcs/class/System.Windows.Forms/CheckOutList for
  60. details on who is working on which class.
  61. Please read the README document in the
  62. System.Windows.Forms/WINElib directory for details about how
  63. to build the Windows.Forms support for Mono.
  64. * System.Drawing
  65. Using existing libraries to implement some of the
  66. functionality required:
  67. <ul>
  68. * gdk-pixbuf is a generic image loader that loads an image
  69. and leaves it into an RGB buffer. It hides all the details
  70. about what image file format is being loaded.
  71. * Libart is a general framework for rendering RGB/RGBA
  72. buffers into RGB buffers and rendering postscript-like paths into
  73. RGB/RGBA buffers.
  74. </ul>
  75. We want to use gdk-pixbuf as the image loader for the image
  76. classes, and then we need operations to render that into the
  77. windowing system (Gtk+, MacOS, etc). But notice how there is
  78. very little dependnecies in Gdk-pixbuf on gtk, and libart has
  79. none.
  80. They are pretty independent from a windowing system
  81. (gdk-pixbuf comes with some "helper" routines for rendering
  82. data into a pixmap and to load pixmaps into RGB buffers).
  83. A few things to keep in mind:
  84. <ul>
  85. * gdk-pixbuf can be used to load images for Gtk+,
  86. MacOS X and Windows, it should be pretty portable,
  87. although we might need in the future to back-port
  88. some new features from Gtk head.
  89. * Libart is probably only going to be used with X11,
  90. as the MacOS X provides the same features in Quartz,
  91. and Win32 *probably* has that in GDI+. If not, we
  92. should use libart in Win32 as well (or for older
  93. Windows systems).
  94. </ul>
  95. * Directory Layout
  96. <pre>
  97. System.Drawing (assembly directory)
  98. System.Drawing.Blah
  99. Common code for "Blah"
  100. Stubs for "Blah" to ease ports.
  101. Gtk
  102. System.Drawing.Blah.
  103. Gtk ports of "System.Drawing.Blah"
  104. MacOS
  105. System.Drawing.Blah
  106. MacOS ports of "System.Drawing.Blah"
  107. WineLIB
  108. System.Drawing.Blah
  109. Win32 ports of "System.Drawing.Blah"
  110. </pre>
  111. Notice that there is a proof of concept Gtk-backend for
  112. Windows.Forms, but nobody is working on it, and for the
  113. reasons stated before it is not a long term strategy.
  114. * Open questions:
  115. I believe that the graphics contexts that are used to render
  116. can accept either libart-like rendering operations and
  117. X11-like rendering operations. This complicates matters, but
  118. I am not sure. Someone needs to investigate this.
  119. * Historical
  120. Although the original plans were to use Gtk on X and Cocoa on
  121. MacOS X, it would be very hard to emulate the event model in
  122. which some Winforms applications depend, and it would be very
  123. hard to implement the Wndproc method.