Re: [g-a-devel] RFC: AtkText simplification (take 2)



On 06/22/2013 08:49 PM, Joanmarie Diggs wrote:
On 06/17/2013 02:40 PM, Piñeiro wrote:

[...]

As Joanmarie said on that thread, the idea is not having any _END/_START
boundaries, and the "surviving" boundary would mimic what _START is
doing right now. Anyway, as I said this is the first step, and probably
the only thing that we can do on ATK 2.X without breaking the API/ABI.

I hope that this would lead to having a proper/saner documentation on
the "surviving" method.

Comments and suggestions are welcome.
Given the absence of comments, and the fact that Orca is already ported,
my suggestion is that we finish the job, creating the new, generic,
"surviving" boundary. :) Having done so then we can make the changes to
AT-SPI2 and the implementors can do the same.

Just a comment about the new generic boundary, as it was mentioned here.
Ideally, what we want for the boundaries is the following:
typedef enum {
  ATK_TEXT_BOUNDARY_CHAR,
  ATK_TEXT_BOUNDARY_WORD
  ATK_TEXT_BOUNDARY_SENTENCE,
  ATK_TEXT_BOUNDARY_LINE,
} AtkTextBoundary;


But right now there is not way to properly remove an enum without
breaking API. In fact, there is not way to mark one macro of the enum as
deprecated, except on the documentation. So as right now the plan is
keeping ATK2 API compatible with older versions of other
libraries/applications, for the life of ATK2, the deprecated boundaries
need to remain there. So we have two options:
  a) Keeping the boundaries enum as it is, and add the generic boundary
when we decide to break API. FWIW, right now the enum is like this:
    typedef enum {
      ATK_TEXT_BOUNDARY_CHAR,
      ATK_TEXT_BOUNDARY_WORD_START,
      ATK_TEXT_BOUNDARY_WORD_END,
      ATK_TEXT_BOUNDARY_SENTENCE_START,
      ATK_TEXT_BOUNDARY_SENTENCE_END,
      ATK_TEXT_BOUNDARY_LINE_START,
      ATK_TEXT_BOUNDARY_LINE_END
    } AtkTextBoundary;


  b) Add the generic boundary now. The enum would be something like:
    typedef enum {
      ATK_TEXT_BOUNDARY_CHAR,
      ATK_TEXT_BOUNDARY_WORD_START,
      ATK_TEXT_BOUNDARY_WORD_END,
      ATK_TEXT_BOUNDARY_SENTENCE_START,
      ATK_TEXT_BOUNDARY_SENTENCE_END,
      ATK_TEXT_BOUNDARY_LINE_START,
      ATK_TEXT_BOUNDARY_LINE_END
      ATK_TEXT_BOUNDARY_WORD,
      ATK_TEXT_BOUNDARY_SENTENCE,
      ATK_TEXT_BOUNDARY_LINE
    } AtkTextBoundary;


Right now I prefer a). The main problem with b) is that we would have
three pairs of macros that would mean exactly the same. Of course, the
main problem of a) is that we don't have right now a specific schedule
for the API break so that means that we don't yet when the generic
boundary would be added (FWIW, this is another candidate for our list of
ATK3 bugs).

BR

-- 
Alejandro Piñeiro Iglesias




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