[Top][All Lists]

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

Re: [XForms] Help with XForms

From: Sunny
Subject: Re: [XForms] Help with XForms
Date: Tue, 8 Apr 2014 19:08:18 +0530


Following our previous discussion, I was able to customise the library
to my liking (thanks for the help).

To continue from where we left off - i.e., compatibility issues with
applications linking to an older version of the library. I'm not sure
if there is a way around this, but I have a concept which I think
could work for future versions of the library.

I am considering adding a pointer called *extra to the end of
FL_OBJECT struct, which will be allocated at run-time by the library.

The general idea is that the contents of *extra can differ drastically
from one library version to another - and should not affect the size
of FL_OBJECT (since the contents will be allocated at _runtime_).
Hopefully it is simple enough to be implemented?
Of course, the structure that *extra points to will not be exposed to
the user directly.

Currently, I am planning on packing the following fields into extra:

int64_t           version_number; /* to check which fields are available */
/* Each bit in ${version_number} can refer to every new field that is
added or is available */

FL_COLOR    label_mouse_over_colour;  /* If mouse hovers over object */
FL_COLOR    label_mouse_click_colour;
FL_COLOR    on_mouse_over_colour;          /* If mouse hovers over object */
FL_COLOR    on_mouse_click_colour;

We could add a couple more depending on what we want to do.

Do you think this will work, or perhaps there are some flaws in this concept?


On 07/04/2014, Jens Thoms Toerring <address@hidden> wrote:
> On Mon, Apr 07, 2014 at 05:51:29PM +0530, Sunny wrote:
>  I'll see if I am competent enough to customise the library to
>> incorporate this functionality. If the result is elegant then I'll
>> post it on the mailing list for feedback.
> The major problem I can see is were to store the information
> about the additional color. The "natural" place would be the
> 'FL_OBJECT' or 'FL_BUTTON_SPEC' structures. But, unfortunately,
> changing one of them would make the new version of the library
> incompatible with older versions, thus requiring all programs
> that want to use it to be recompiled. And I try to avoid this
> except for extremely important reasons. Another aspect is, of
> course, that when allowing to change the label color when the
> button is pressed, why not also allow to change the font etc.?
> If an incompatible change to the library is made I think also
> such things also need to be considered.
>                            Best regards, Jens
> --
>   \   Jens Thoms Toerring  ________      address@hidden
>    \_______________________________      http://toerring.de

reply via email to

[Prev in Thread] Current Thread [Next in Thread]