Tk Source Code

View Ticket
Login
Ticket UUID: 564521
Title: Objectify wm
Type: Patch Version: None
Submitter: pspjuth Created on: 2002-06-04 19:00:37
Subsystem: 65. Generic Window Operations Assigned To: hobbs
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2002-09-16 18:23:08
Resolution: Accepted Closed By: vincentdarley
    Closed on: 2002-09-16 11:23:08
Description:
This patch is for objectifying wm.

The first patch attached only objectifies the Windows
file, tkWinWm.c, to get feedback before starting on
the Unix/Mac files.

The patch has one function for each subcommand and
hopefully many of those can be identical between
platforms, which will simplify centralization of
common code in a later step.
User Comments: vincentdarley added on 2002-09-16 18:23:08:
Logged In: YES 
user_id=32170

wm is objectified in 8.4.0 on all four platforms.

vincentdarley added on 2002-07-23 23:28:43:
Logged In: YES 
user_id=32170

I don't have the possiblity to compile a Mac file, so can't 
help there (I'm only on the new system).

The diff for MacOSX looks very good; I've realised I can't 
compile it (yet) since the cvs branch of osx is not 100% 
in sync with the main tree, but I guarantee I will do so 
(and make fixes as necessary) the moment the trees are 
in sync again.

pspjuth added on 2002-07-23 03:05:55:

File Added - 27557: wmobjmacosx.zip

Logged In: YES 
user_id=98900

I didn't know about the MacOSX file but
now that I do I have objectified it 
too.

Vincent, if you find any errors, could you
fix it and upload a 
working version?
Also, if you have the possibility to at 
least
compile the Mac file it would be nice to
know if it works that 
much.

vincentdarley added on 2002-07-22 06:36:03:
Logged In: YES 
user_id=32170

Assuming you're going to objectify tkMacOSXWm.c (in the 'macosx-8-4-
branch') I can happily test that for you on MacOS X,

One suggestion for making a lot of code generic is to look at the 
implementation of 'file attributes' for the new 'wm attributes' -- the generic 
part of that (in tclFCmd.c) could be used with only a couple of tiny 
changes.  (But feel free to ignore too!)

pspjuth added on 2002-07-21 22:22:26:

File Added - 27483: wmobjall.zip

Logged In: YES 
user_id=98900

Oh, it was too big... A zipped version...

pspjuth added on 2002-07-21 22:20:32:
Logged In: YES 
user_id=98900

Trying again to attach the patch...

pspjuth added on 2002-07-21 22:16:43:
Logged In: YES 
user_id=98900

Finally here is the full patch.
It has been tested on WinXP and Linux, but Mac is
completely untested (not even compiled).

I think it would be a good idea to get this in before
8.4b2, and if that is planned for Aug 5th I need
to commit this before Friday (July 26th) due to
vacation.


Note 1: Some wm tests on Win fails before this patch
and they still fail with it. I have not tried to correct
them here.

Note 2: I have removed some usages of Tk_Uid in
this patch. The most obvious is removing using
Tk_Uid as storage for Title and Iconname (on Win
and Mac), which is a rather bad thing, so they
now use the same way as Unix.

Another is the use for Tk_Uid in calls to Tk_GetBitmap.
I can't find anything that indicates that Tk_GetBitmap
needs a Tk_Uid (specially it's not in its interface)
and thus it seemed useless.
Any expert that can comment on this?
(There are a lot of such usages of Tk_Uid throughout Tk
that seems useless, but that is for another patch.)

pspjuth added on 2002-06-14 03:40:27:

File Added - 25057: wmobjwu.diff

pspjuth added on 2002-06-14 03:40:26:
Logged In: YES 
user_id=98900

The work goes on and here is a new patch
that objectifies on Unix too.

Any feedback is appreciated since I have very
limited means of testing on Unix.

On to the Mac file...

pspjuth added on 2002-06-05 02:00:38:

File Added - 24369: wmobjwin.diff

Attachments: