As bug 17042 [1] reported, the IUnknown object returned by CreateTextServices() does not support ITextDocument. I believe that's the root cause of some apps crash.
richole.c has a very limited implementation of ITextDocument for IRichEditOle, which is totally unreusable.
I'm trying to implement ITextDocument for both ITextServices and IRichEditOle. ME_Editor type provides most of the editor functionalities, and both of ITextServices and IRichEditOle use it. So I'm going to use it to implement ITextDocument.
The proposal is:
struct tagReTxtDoc { IUnknown *parentObj; ME_Editor *editor; } ReTxtDoc;
ReTxtDoc *CreateReTxtDoc(IUnknown *parentObj, ME_Editor *editor); void DestroyReTxtDoc(ReTxtDoc);
ReTxtDoc_addRef/QueryInterface/Release -> delegate to parentObj Other ITextDocument methods: use ME_Editor to implement.
This is my first time to develop WINE. Any comments/suggestions?
Hi,
Welcome again :)
On Wed, Jun 26, 2013 at 3:11 PM, Tiger Soldier tigersoldi@gmail.com wrote:
This is my first time to develop WINE. Any comments/suggestions?
Improving Rich Edit is great appreciated! Interesting, one of GSoC2013 students Jactry Zeng is planning on implementing ITextDocument as well [1] [2]. Maybe it is a good idea to work with Jactry together, if that doesn't violate GSoC rules - actually I don't know, hopefully Austin English or other GSoC mentor/manager could comment on this.
If you are interesting in Rich Edit, there are a lot of bugs to be fixed :) [3]
Some of them may be good for beginner, for example this one with a test case [4], or maybe this one [5] which has a basic diagnosis.
dlls/riched20/tests/ contains some example to show how Rich Edit api works, play with Wine's buitin wordpad maybe a good idea as well.
Before you implementing something or debugging something, there is no harm to learn as more example as you can from website like msdn or codeproject. Be careful on copyright issues: never disassembling or tracing Windows binary. For those things without public document, the only way I know is guess and test :) (Since I know you personally, I believe you are good at this kind of fun :p )
Once you decided to debug on an app, WINEDEBUG=+tid,+richedit may be useful for you, also you can have a look at other debug channel [6].
I hope this helps, feel free to ask in wine-devel if you have further questions. My experience on Wine is limited, so my suggestions maybe not work, maybe not the best, hopefully other developers with more experience could help you when you get in trouble :)
[1] http://www.google-melange.com/gsoc/project/google/gsoc2013/jactry/12001 [2] http://wine.1045685.n5.nabble.com/Application-for-GSoC-2013-improve-Richedit... [3] http://bugs.winehq.org/buglist.cgi?product=Wine&component=richedit&r... [4] http://bugs.winehq.org/show_bug.cgi?id=33191#c2 [5] http://bugs.winehq.org/show_bug.cgi?id=29769#c11 [6] http://wiki.winehq.org/DebugChannels
-- Regards, Qian Hong
On Wed, Jun 26, 2013 at 1:32 AM, Qian Hong fracting@gmail.com wrote:
Hi,
Welcome again :)
On Wed, Jun 26, 2013 at 3:11 PM, Tiger Soldier tigersoldi@gmail.com wrote:
This is my first time to develop WINE. Any comments/suggestions?
Improving Rich Edit is great appreciated! Interesting, one of GSoC2013 students Jactry Zeng is planning on implementing ITextDocument as well [1] [2]. Maybe it is a good idea to work with Jactry together, if that doesn't violate GSoC rules - actually I don't know, hopefully Austin English or other GSoC mentor/manager could comment on this.
There's nothing preventing someone else from working on the same area of code (we can't control what other people do). However it is still the responsibility of the student to complete their proposal.
-- -Austin