Re: [g-a-devel] ATK for own cell renderer



>> Hi,
>> I've written my own cell renderer which inherits from GtkCellRenderer
>> and I use the renderer with GtkTreeView. Now I want to write
>> implementation of ATK for the object and I want to do it in my own
>> package, but I have a problem because my accessible object cannot
>> inherit from GailRendererCell, it is not available outside Gail. As I
>> see, all accessible objects for cell renderers should inherit from
>> GailRendererCell if these renderers are used with GtkTreeView, if not,
>> the implementation of ATK for any renderer is not complete (e.g. size,
>> position and focus is not available).
>> So, is it possible to create implementation of ATK for my own renderer
>> without changing Gail? If it is possible, how to do it?
>>   
> 
> Hi Marcin;
> 
> I believe this is possible - see Marc Mulcahy's paper on writing custom
> widget accessibility support. It's a bit of a hack, but you can inherit
> from a GailObject type without access to the original Gail headers - via
> the GObject/GType system.
> 
> http://developer.gnome.org/projects/gap/presentations/GUAD3C/making-apps-accessible/start.html
> 
> 
> The GObject system's object constructor for your custom GailRendererCell
> implementation needs to know the size of the object to be allocated -
> this can be obtained from the base GailRendererCell class by asking the
> GType system at runtime.
> 
> Have a look at the examples in Marc's paper - if it doesn't make sense,
> you might ask Padraig O'Briain at Sun.

Hi Bill,

Inheriting from a GailObject type without access to the original Gail
headers works very good, but there are another problems when you want to
 write an accessibility support for custom cell renderer. For example,
in the init function you must get a GailRendererCell parent instance
from your Accessibility object to set a 'renderer' pointer to your cell
renderer. Also you have to init GailRendererCellClass class in your
class_init function or invoke gail_cell_type_add_action_interface
function in your get_type function if you want to do some actions. So,
it seems that it is impossible to create implementation of ATK for
custom renderer without access to the Gail headers...

Regards,
Marcin




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