winforms 4.2 KB

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