[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] usage of wind_calc()



Hello,

>  WM_xxx messages contain work instead of full area coordinates,
> wind_set/get() works with work areas too. No change in the way things
> are handled here, except from cases where the application needs to
> modify the new positions. For example snap this is what is needed now;
>
>  1. new_pos = WM_MOVED coordinates
>  2. new_pos = wind_calc(WC_WORK, new_pos)
>  3. snap(new_pos)
>  4. new_pos = wind_calc(WC_BORER, new_pos)
>  5. wind_set(handle, WF_CURRXYWH, new_pos)

I don't agree at all ? Do you do such nasty stuff in your own applications

 Have you ever tried to snap a window containing text using the fonts
with/heigh? Have you ever looked at Qed source? Have you ever seen
Everest? You tell me how else to snap coordinates!

I cannot believe it ;)

Your only argument is application optimised to be faster on old "real ATARI" computer without graphic card and with old VDI.

I don't remember why exactly the snap is needed, but i think it's because of a line-A function to paste bitmap of characters to the screen, or something like that. Maybe a VDI guru can give more information.

Anyway, the snap stuff is no more usefull...

So, you want to simplify the programmer life of programmer that develop application for old hardware only (IIRC, lineA functions are deprecated for a long time now)... and to help them you added new features in XaAES ?

for the snap stuff, i agree that WCOWORK may help a bit... but it's definitively useless because the snap stuff have no more reason to exist since we have graphic cards and/or NVDI.

I think in most "not so bad" written AES applications we have the
following:

1. reception of WM_MOVED/WM_SIZED message
2. apply the new position : wind_set(WF_CURRXYWH,data of the message)
3. get the new WORK area (WM_SIZED) : wind_get(WF_WORKXYWH)
4. update the slider stuff

 yes, if no modification, like snapping, is needed.

so for most applications because snapping is a bad rest of old software :)

With WCOWORK, it's the same :

1. reception of WM_MOVED/WM_SIZED message
2. apply the new position : wind_set(WF_CURRXYWH,data of the message)
3. get the new WORK area (WM_SIZED) : wind_get(WF_WORKXYWH)
4. update the slider stuff

 You are wrong.

I don't see what's wrong... Can you please explain me ?

So, this is something that most applications usually do. When the user
clic on the FULL widget, then the application set the FULL area of the
window to the WORK area of the desktop :
wind_set(WF_CURRXYWH,handle,desk.g_x, desk.g_y...).

 There is a call wind_get(WF_FULLXYWH/WF_PREVXYWH). Those buggy in other
AES's too? Anyway, these are the ones to use for the above. WF_FULLXYWH
will get you the maximum size of the window, as set/modified by
wind_create(). XaAES also have wind_set(WF_FULLXYWHY/WF_PREVXYWH), so
application dont really have to track this for itself (untested tho).

Whao... now you said that wind_set(WF_CURRXYWH) should no more be used to set a new FULL area, because the data may be interpreted by the AES either as a WORK area or as a FULL area... interesting... BTW, i haven't understood your WF_FULLXYWH stuff. More below.

BTW, i still don't see any benefit for the user, and only one poor benefit for application optimised for old hardware with old VDI.


For all AES messages (WM_SIZED, WM_MOVED...), this mostly deal with FULL
area (and not WORK area).
For example, when the user clic on the full widget, the user commands to
the application "set the FULL area of the window to the whole screen".

 So use wind_set(WF_FULLXYWH). I think ALL applications have wind_get
(WF_FULLXYWH/WF_PREVXYWH). Why are those not used?

I'm lost :/

Now, we have the following:
- wind_get(WF_CURRXYWH) to get the global (external) area of the window.
- wind_get(WF_FULLXYWH) to get the global (external) area of the window when at full size (this is the paramters given to wind_create(), which is in most cases the desktop work area)

- wind_set(WF_CURRXYWH) to modify the global (external) area of the window.

- wind_set(WF_FULLXYWH) doesn't exist. If you want to implement that function, then wind_set(WF_FULLXYWH) shall modify the global (external) area of the window when at full size. In other words this may change the value that wind_get(WF_FULLXYWH) will return. It should not modify the size of the window.

The ONLY function to change the size/position of a window is wind_set(WF_CURRXYWH)... plus the very new wind_set(WF_WORKXYWH) if supported by the AES.

So there is
- wind_set(WF_WORKXYWH) to change the work area
- wind_set(WF_CURRXYWH) to change the full area.

with WCOWORK, both modify the work area, we have no way to change the FULL area !

 Own modifications, you are correct. But even then WCOWORK will help,
because after the application knows the new image size (which is the new
WORK coordinates), there is no need for wind_calc() to convert to FULL
for wind_set(WF_CURRXYWH). So, WCOWORK will help!

wrong :)

When the application knows the new image size, wind_set(WF_WORKXYWH) will do the job.
WCOWORK won't help at all.


best regards,
Arnaud.