%include "default.mgp" %default 1 bgrad 0 0 256 0 1 "black" "blue" %page %nodefault %center, size 7, font "standard", fore "white", vgap 20 Enhancing Wine's Richedit Control %center, size 5, font "standard", fore "white" UCLA CS 130 13 Jan 2006 %center, size 7, font "standard", fore "white", vgap 20 Dan Kegel www.kegel.com %page Enhancing Wine's Richedit Control What is Wine? Wine DLLs What is the Richedit control? What's missing from Wine's Richedit? How hard is adding features to Richedit? Getting changes into Wine Project structure Schedule Big Picture %page What is Wine? Wine lets Linux, Mac OS X, FreeBSD run Windows apps Free, open source implementation of Win32 Program loader Per-user daemon (e.g. for global handles, locks) many DLLs several apps (notepad, control panel) Not complete %page Wine DLLs Have conformance test 1:1 replacement for Windows DLLs Wine DLLs can run on Windows (modulo missing features) Windows DLLs can run on Wine (modulo missing features) %page What is the Richedit control? Implemented by RICHED20.DLL Lets you add text editor windows to any app Handles classic rich text features colors fonts positioning load/save RTF files Plus a few other nice things Autohighlights URLs Sends URL click events to app %page What's missing from Wine's Richedit? Features like: URL detection (EM_AUTOURLDETECT) Content limit (EM_EXLIMITTEXT) Scrolling (EM_SCROLL) Fonts! (WM_SETFONT) Search options (case insensitivity) All of these are specified on MSDN Ultimate reference: must match behavior of Windows DLL %page How hard is adding features to Richedit? It's not too bad! EM_GETFIRSTVISIBLELINE was a 25 line change %page Getting changes into Wine This is a bit more challenging! Process to follow: Follow patch conventions (e.g. Changelog entry) Include a conformance test Have a peer review your patch Have me review your patch Have RichEdit maintainer review your patch Submit patch to wine-patches mailing list Feedback will come on wine-devel list Address any feedback promptly %page Project structure One big team Each person picks and implements one feature Each person helps review the work of others wine-test-devel mailing list is main gathering point Code shared by posting patches to mailing list Two advisors: Dan Kegel (project lead) Tommy Kho (cs130 alumnus, test lead) %page Schedule (in no particular order) Install Linux if you don't have it already Install and build Wine sources Review Riched20 source code (10KLOC, 33KB) Review Riched20 conformance test (~5KB) Pick a Riched20 feature to add Write conformance test for your feature, submit Review example patch that added a feature to Riched20 Implement your feature, submit Keep fixing issues and resubmitting until approved Get a job based on your reputation as Wine developer Profit! %page Big Picture This is an exciting time to be involved with Wine! It runs Microsoft Office well Good way to port applications from Windows to Linux Large opportunity for Wine programmers in 2007/2008