Miranda IM
+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 36

Thread: accessibility: how to access custom miranda controls from other apps

  1. #1
    Join Date
    March 2005
    Location
    Slovakia
    Posts
    677

    accessibility: how to access custom miranda controls from other apps

    Hello all
    I would like to know if it is somehow possible to retrieve contact name from the clist control by sending any win api command to that control or some other way which can be used within some other application.
    Let me explain what am I thinking about maybe someone will be able to correct me if I'm wrong. I am slowly trying to make miranda as accessible as possible. so untilnow I have been trying to modify dialogs which had to be navigated using mouse (lack of keyboard-only navigation). at this point I can't find such dialogs in the core set of plugins so I am trying to go deeper. Except of standard dialogs we have some custom controls. the most problematic for me is the clistcontrol. In order to make it fully accessible a modification is required. since there are more plugins defining the same thing they all need to be modified. so instead modifiing several plugins I am searching for the possibility how to retrieve the information and process it as needed. Generally such screen-reading applications are able to extract window text and maybe some other predefined values from a control using win api. unluckily these are very general and do not apply to the miranda's specific custom controls. so assuming we have window handle and class name is it somehow possible to extract text which gets displayed on the clist such as contact name and status message (clistm derivatives only).
    Please if you can help me with this let me know. write to me also if you are not able to understand what I am looking for I'll try to explain more.
    thanks for the great messenger and support.

  2. #2
    Join Date
    November 2005
    Location
    London, UK
    Posts
    56
    I'm not sure about what do you want to do, but..
    As I understood, you're a developer. Make a plugin, that creates an invisible (aka hidden) window, and send all the API to this window, and retrieve whatever you need through it. The plugin itself will take all the info directly from the database. Also, you can make a universal plugin, so that external ones can send miranda-internal function names, and retrieve results. Whoever needs this function, will install the plugin. If someone doesn't need it - will have no concerns about security ;)
    tell me if this is what you want.. it became interesting )

    And please explain about those screen-reading applications. What about them? What kind of apps? What would they use the info from miranda for?

  3. #3
    Join Date
    March 2005
    Location
    Slovakia
    Posts
    677
    well the idea with hidden window is great but it is not the thing I am looking for.
    screen-reading applications are providing access to the computer programmes for people who are not able to read the screen them-selves. so these applications are gathering info which are necessary and then passing to some voice synthesizers to create the audible output.
    So as one is navigating over the clist I need to notify my application that caret position has changed and which contact it points to.
    Usually this is related to keyboard only navigation. there is only one possibility to navigate over the contact list using keyboard by pressing up or down arrow key. so I am able to catch these events. if a clistcontrol is focused and one of these 2 key is pressed I would wait some little amount of time and I would like to request contact name from the contact list's selected item.
    I am just beginer in programming so maybe there are some more efficient solutions to this. this is not final one. if you have something to say just do it please.
    thanks for your interest
    greetings
    Last edited by -pv-; 22 Nov 2007 at 6:47 PM.

  4. #4
    Join Date
    July 2005
    Location
    Brasil
    Posts
    2,705
    The clist have all that info, so handling a message to return the current selected contact would be not much problem. I think the easiest way to do that is make the clist handle WM_COPYDATA and define some constants to be sent. But would it be enought?

    Maybe it isn't, so another problems are: which message the screen-reading app send to the window? What is the expected return? Also, how it is possible to notify the screen-reader app that a selection has changed?

  5. #5
    Join Date
    March 2005
    Location
    Slovakia
    Posts
    677
    @pescuma
    screen readers have usually some predefined procedures how to treat common controls. for example when it does "know" nothing about the control it simply "assumes" it's some standard element and tryes to get the window text by sending a getwindowtext command to it. this perfectly works with mbutton class or what ever is that custom class called. unfortunatelly clistcontrol is more complicated. It is very close to listview I guess so perhaps it would be nice to get inspiration from that. I am currently trying to study these things so this might not be so accurate. .
    Perhaps it would be possible to create an alternative clist plugin to display contacts using listview instead of this custom control but I don't know whether this would not affect some other things.

  6. #6
    Join Date
    March 2005
    Location
    Slovakia
    Posts
    677
    Hello all
    I have looked to the sources again. and now I hope I have found something to start at least thinking about how to hack into the clist.
    I am interested in this three messages:
    Code:
    #define CLM_GETITEMTEXT       (CLM_FIRST+21)   //wParam=hItem, lParam=(char*)pszStr, max 120 bytes
    #define CLM_GETSELECTION      (CLM_FIRST+23)   //returns hItem
    #define CLM_SELECTITEM        (CLM_FIRST+26)   //wParam=hItem
    Now here goes my concept:
    each control has some event which is fired to notify that something has been changed. for example I believe combo boxes and list views have something like onchange event. Does something like this exist in the clistcontrol class here in miranda? for example when a contact is selected? I am just guessing that message CLM_SELECTITEM is sent upon selecting any of the contacts. is this true?
    if yes, I hope I can extract the contact name and other information by processing hitem received from above call and sending it as a CLM_GETITEMTEXT message.
    If CLM_SELECTITEM is not sent internally so I am unable to hook into it is it possible to pool for the selected item by sending CLM_GETSELECTION message?
    And finally the most problematic thing. am I able to send or dispatch these messages from any other application besides miranda-im?
    Please excuse for any wrong assumptions I am just a beginner. I am sure I am able to figure it out by studying but now I think I need some help or a couple of corrections. So all comments on this are welcome.

    @pescuma WM_copydata is used to pass information not extract them... - as I am aware. so clist has to be modified for this to work.. or am I wrong once again?

  7. #7
    Join Date
    July 2005
    Location
    Brasil
    Posts
    2,705
    Quote Originally Posted by -pv- View Post
    @pescuma WM_copydata is used to pass information not extract them... - as I am aware. so clist has to be modified for this to work.. or am I wrong once again?
    You are right. My idea was to modify the clist to call your app passing that info.

    PS: I guess that CLM_SELECTITEM is used to make clist select a contact, and not to notify a selection.

  8. #8
    Join Date
    March 2005
    Location
    Slovakia
    Posts
    677
    Quote Originally Posted by pescuma View Post
    PS: I guess that CLM_SELECTITEM is used to make clist select a contact, and not to notify a selection.
    so then there is no chance to be notified of selection being made.
    What about the other thing with polling?
    Also there is an alternative which I was not writing about. is the clistcontrol derived from any known clas e.g. treeview? because treeview supports all the microsoft's accessibility apis so if all the properties are inherited from any standard control a class remapping in my app would be sufficient.

    EDIT: Also maybe it would be possible to make a mod of clist classic to show entryes using any standard class with some down sides. e.g. not displaying icons or not being able to sort clist into groups.
    What would be the best choice?
    Last edited by -pv-; 29 Jan 2007 at 2:47 PM.

  9. #9
    Join Date
    July 2005
    Location
    Brasil
    Posts
    2,705
    Quote Originally Posted by -pv- View Post
    EDIT: Also maybe it would be possible to make a mod of clist classic to show entryes using any standard class with some down sides. e.g. not displaying icons or not being able to sort clist into groups.
    What would be the best choice?
    Try one of those and tell me what you think (expect a looot of bugs):
    ansi: http://pescuma.mirandaim.ru/miranda/clist_blind.zip
    unicode: http://pescuma.mirandaim.ru/miranda/clist_blindW.zip

  10. #10
    Join Date
    March 2005
    Location
    Slovakia
    Posts
    677
    hello pescuma.
    These work fine I have tested both of them and I have not fallen into problems until now. Great. Sorry for being too rude but I have 2 additional things. It is not necessary to have each item prefixed with the "contact"/"group"/"divider" word. I believe it is obvious for most of the users and it breaks searching abilites because all the contact items start with "contact" so it is no longer possible to type a first letter of any contact to select it. And second thing: It would be nice to display a status message after the status if possible. Thanks a lot for your interest in providing such amount of help. And sorry for too many things asked.

    Edit: I noticed search by typing first letter is only possible in the root node of the box so it won't be easy :( Anyway if you would be willing to continue this project it will be appreciated for sure. Thanks

    Edit2: There are also some serious issues which I have not found at first run: the status of the contact is not correct. I guess you are still working on this because all are reported as online. It does not properly react to contact's status changes I think; because I let it runing for an hour and during that time some users changed their statuses but the order in my clist was still the same as when started. It even leads to a situation where pressing enter on / clicking a contact in the clist opens the conversation window with different contact.
    Last edited by -pv-; 12 Feb 2007 at 4:57 PM.

+ Reply to Thread

Similar Threads

  1. Accessibility Issues
    By ms22282 in forum Technical Support
    Replies: 9
    Last Post: 9 Jul 2008, 3:25 PM
  2. Miranda .7 jumping in front of fullscreen apps
    By Hamsterkill in forum Technical Support
    Replies: 7
    Last Post: 20 Oct 2007, 3:13 AM
  3. Replies: 0
    Last Post: 10 Feb 2007, 5:42 PM
  4. Miranda crashes: 'cannot access function call stack'
    By -=IOI=- in forum Technical Support
    Replies: 3
    Last Post: 7 Sep 2006, 4:17 PM
  5. why can access the website:http://www.miranda-im.org/
    By wangcity in forum Technical Support
    Replies: 1
    Last Post: 9 Apr 2006, 6:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts