Changeset 837 for trunk/src


Ignore:
Timestamp:
Mar 18, 2011, 2:28:54 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

xsystray: Moved instant API documentation from .c to xsystray.h and bumped the version number to 0.1.1 due to r836.

Location:
trunk/src/3rdparty/os2/xsystray
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/3rdparty/os2/xsystray/README

    r333 r837  
    22Version 0.1.0
    33
    4 Copyright (C) 2009 Dmitry A. Kuminov
     4Copyright (C) 2009-2011 Dmitriy Kuminov
    55
    66Extended system tray widget is free software; you can redistribute it
  • trunk/src/3rdparty/os2/xsystray/apilib/xsystray.c

    r835 r837  
    66 *      Implementation of the public API.
    77 *
    8  *      Copyright (C) 2009 Dmitry A. Kuminov
     8 *      Copyright (C) 2009-2011 Dmitriy Kuminov
    99 *
    1010 *      This file is part of the Extended system tray widget source package.
     
    240240}
    241241
    242 /*
    243  *@@ xstQuerySysTrayVersion:
    244  *
    245  *      Returns the version of the Extended system tray in the variables pointed
    246  *      to by arguments. Any argument may be NULL in which case the
    247  *      corresponding component of the version is not returned.
    248  *
    249  *      Returns TRUE on success and FALSE if the Extended system tray is not
    250  *      installed or not operational.
    251  *
    252  *      NOTE: When the Extended system tray is started up or gets enabled after
    253  *      being temporarily disabled, it sends a message with the ID returned by
    254  *      xstGetSysTrayCreatedMsgId() to all top-level WC_FRAME windows on the
    255  *      desktop to let them add tray icons if they need.
    256  */
    257 
    258242BOOL xstQuerySysTrayVersion(PULONG pulMajor,    // out: major version number
    259243                            PULONG pulMinor,    // out: minor version number
     
    283267    return brc;
    284268}
    285 
    286 /*
    287  *@@ xstAddSysTrayIcon:
    288  *
    289  *      Adds an icon for the given window handle to the system tray. The icon ID
    290  *      is used to distinguish between several icons for the same window handle.
    291  *      If the icon with the specified ID already exists in the system tray, it
    292  *      will be replaced.
    293  *
    294  *      Returns TRUE on success and FALSE otherwise.
    295  *
    296  *      The specified window handle receives notification messages about icon
    297  *      events using the message ID specified by the ulMsgId parameter. The
    298  *      layout of the message parameters is as follows:
    299  *
    300  *          param1
    301  *              USHORT  usIconID        icon ID
    302  *              USHORT  usNotifyCode    notify code, one of XST_IN_ constants
    303  *
    304  *          param2
    305  *              PVOID   pData           notify code specific data (see below)
    306  *
    307  *      The following notify codes are currently recognized:
    308  *
    309  *          XST_IN_MOUSE:
    310  *              Mouse event in the icon area. Currently, only mouse click
    311  *              messages are recognized. param2 is a pointer to the XSTMOUSEMSG
    312  *              structure containing full mouse message details.
    313  *
    314  *          XST_IN_CONTEXT:
    315  *              Context menu event in the icon area. param2 is a pointer to the
    316  *              XSTCONTEXTMSG structure containing full message details.
    317  *
    318  *          XST_IN_WHEEL:
    319  *              Mouse wheel event in the icon area. param2 is a pointer to the
    320  *              XSTWHEELTMSG structure containing full message details.
    321  *
    322  *      NOTE: The maximum tooltip text length (including terminating null) is
    323  *      limited to a value returned by xstGetSysTrayMaxTextLen(). If the
    324  *      supplied string is longer, it will be truncated.
    325  */
    326269
    327270BOOL xstAddSysTrayIcon(HWND hwnd,       // in: window handle associated with the icon
     
    443386}
    444387
    445 /*
    446  *@@ xstReplaceSysTrayIcon:
    447  *
    448  *      Replaces the existing icon previously added by xstAddSysTrayIcon() with
    449  *      a new icon.
    450  *
    451  *      Returns TRUE on success and FALSE otherwise.
    452  */
    453 
    454388BOOL xstReplaceSysTrayIcon(HWND hwnd,        // in: window handle associated with the icon
    455389                           USHORT usId,      // in: icon ID to change
     
    484418    return brc;
    485419}
    486 
    487 /*
    488  *@@ xstRemoveSysTrayIcon:
    489  *
    490  *      Removes the icon previously added by xstAddSysTrayIcon() from the system
    491  *      tray.
    492  *
    493  *      Returns TRUE on success and FALSE otherwise.
    494  */
    495420
    496421BOOL xstRemoveSysTrayIcon(HWND hwnd,    // in: window handle associated with the icon
     
    542467}
    543468
    544 /*
    545  *@@ xstSetSysTrayIconToolTip:
    546  *
    547  *      Sets the tooltip text for the given icon in the system tray. This text
    548  *      is shown when the mouse pointer is held still over the icon area for
    549  *      some time.
    550  *
    551  *      If pszText is NULL, the tooltip text is reset and will not be shown next
    552  *      time. The old tooltip is hidden if it is being currently shown.
    553  *
    554  *      Returns TRUE on success and FALSE otherwise.
    555  *
    556  *      NOTE: The maximum tooltip text length (including terminating null) is
    557  *      limited to a value returned by xstGetSysTrayMaxTextLen(). If the
    558  *      supplied string is longer, it will be truncated.
    559  */
    560 
    561469BOOL xstSetSysTrayIconToolTip(HWND hwnd,        // in: window handle associated with the icon
    562470                              USHORT usId,      // in: icon ID to set the tooltip for
     
    602510}
    603511
    604 /*
    605  *@@ xstQuerySysTrayIconRect:
    606  *
    607  *      Obtains a rectangle occupied by the given icon (in screen coordinates,
    608  *      top right corner exclusive).
    609  *
    610  *      Returns TRUE on success and FALSE otherwise.
    611  */
    612512BOOL xstQuerySysTrayIconRect(HWND hwnd, USHORT usId, PRECTL prclRect)
    613513{
     
    631531    return brc;
    632532}
    633 
    634 /*
    635  *@@ xstGetSysTrayCreatedMsgId:
    636  *
    637  *      Returns the ID of the message that is sent by the Extended system tray
    638  *      to all top-level WC_FRAME windows on the desktop to let them add tray
    639  *      icons if they need.
    640  *
    641  *      NOTE: The returned value never changes until reboot so it is a good
    642  *      practice to cache it instead of calling this function each time from the
    643  *      window procedure of every involved window.
    644  */
    645533
    646534ULONG xstGetSysTrayCreatedMsgId()
     
    652540}
    653541
    654 /*
    655  *@@ xstGetSysTrayMaxTextLen:
    656  *
    657  *      Returns the maximum length of the text (in bytes, including the
    658  *      terminating null) that can be shown in the tooltop of the icon in the
    659  *      system tray. You can use the returned value to determine the maximum
    660  *      length of the string passed as pszText to xstSetSysTrayIconToolTip().
    661  *
    662  *      The returned value also defines the maximum length of both the title and
    663  *      the text (including terminating nulls) of the icon's balloon for the
    664  *      xstShowSysTrayIconBalloon() call.
    665  *
    666  *      Returns TRUE on success and FALSE otherwise.
    667  *
    668  *      NOTE: The returned value never changes until reboot so it is a good
    669  *      practice to cache it instead of calling this function each time.
    670  */
    671 
    672542ULONG xstGetSysTrayMaxTextLen()
    673543{
  • trunk/src/3rdparty/os2/xsystray/apilib/xsystray.def

    r835 r837  
    55
    66LIBRARY XSYSTRAY INITINSTANCE TERMINSTANCE
    7 DESCRIPTION '@#netlabs.org:0.1.0#@ Extended system tray API'
     7DESCRIPTION '@#netlabs.org:0.1.1#@ Extended system tray API'
  • trunk/src/3rdparty/os2/xsystray/apilib/xsystray.h

    r835 r837  
    1313 *      Refer to the "API" file for more details about the public API.
    1414 *
    15  *      Copyright (C) 2009 Dmitry A. Kuminov
     15 *      Copyright (C) 2009-2011 Dmitriy Kuminov
    1616 *
    1717 *      This file is part of the Extended system tray widget source package.
     
    8181} XSTWHEELMSG, *PXSTWHEELMSG;
    8282
     83/*
     84 *@@ xstQuerySysTrayVersion:
     85 *
     86 *      Returns the version of the Extended system tray in the variables pointed
     87 *      to by arguments. Any argument may be NULL in which case the
     88 *      corresponding component of the version is not returned.
     89 *
     90 *      Returns TRUE on success and FALSE if the Extended system tray is not
     91 *      installed or not operational.
     92 *
     93 *      NOTE: When the Extended system tray is started up or gets enabled after
     94 *      being temporarily disabled, it sends a message with the ID returned by
     95 *      xstGetSysTrayCreatedMsgId() to all top-level WC_FRAME windows on the
     96 *      desktop to let them add tray icons if they need.
     97 */
     98
    8399BOOL XSTAPI xstQuerySysTrayVersion(PULONG pulMajor, PULONG pulMinor,
    84100                                   PULONG pulRevision);
    85                                    
     101
     102/*
     103 *@@ xstAddSysTrayIcon:
     104 *
     105 *      Adds an icon for the given window handle to the system tray. The icon ID
     106 *      is used to distinguish between several icons for the same window handle.
     107 *      If the icon with the specified ID already exists in the system tray, it
     108 *      will be replaced.
     109 *
     110 *      Returns TRUE on success and FALSE otherwise.
     111 *
     112 *      The specified window handle receives notification messages about icon
     113 *      events using the message ID specified by the ulMsgId parameter. The
     114 *      layout of the message parameters is as follows:
     115 *
     116 *          param1
     117 *              USHORT  usIconID        icon ID
     118 *              USHORT  usNotifyCode    notify code, one of XST_IN_ constants
     119 *
     120 *          param2
     121 *              PVOID   pData           notify code specific data (see below)
     122 *
     123 *      The following notify codes are currently recognized:
     124 *
     125 *          XST_IN_MOUSE:
     126 *              Mouse event in the icon area. Currently, only mouse click
     127 *              messages are recognized. param2 is a pointer to the XSTMOUSEMSG
     128 *              structure containing full mouse message details.
     129 *
     130 *          XST_IN_CONTEXT:
     131 *              Context menu event in the icon area. param2 is a pointer to the
     132 *              XSTCONTEXTMSG structure containing full message details.
     133 *
     134 *          XST_IN_WHEEL:
     135 *              Mouse wheel event in the icon area. param2 is a pointer to the
     136 *              XSTWHEELTMSG structure containing full message details.
     137 *
     138 *      NOTE: The maximum tooltip text length (including terminating null) is
     139 *      limited to a value returned by xstGetSysTrayMaxTextLen(). If the
     140 *      supplied string is longer, it will be truncated.
     141 */
     142
    86143BOOL XSTAPI xstAddSysTrayIcon(HWND hwnd, USHORT usId, HPOINTER hIcon,
    87144                              PCSZ pcszToolTip, ULONG ulMsgId, ULONG ulFlags);
    88                                
     145
     146/*
     147 *@@ xstReplaceSysTrayIcon:
     148 *
     149 *      Replaces the existing icon previously added by xstAddSysTrayIcon() with
     150 *      a new icon.
     151 *
     152 *      Returns TRUE on success and FALSE otherwise.
     153 */
     154
    89155BOOL XSTAPI xstReplaceSysTrayIcon(HWND hwnd, USHORT usId, HPOINTER hIcon);
    90156
     157/*
     158 *@@ xstRemoveSysTrayIcon:
     159 *
     160 *      Removes the icon previously added by xstAddSysTrayIcon() from the system
     161 *      tray.
     162 *
     163 *      Returns TRUE on success and FALSE otherwise.
     164 */
     165
    91166BOOL XSTAPI xstRemoveSysTrayIcon(HWND hwnd, USHORT usId);
    92167
     168/*
     169 *@@ xstSetSysTrayIconToolTip:
     170 *
     171 *      Sets the tooltip text for the given icon in the system tray. This text
     172 *      is shown when the mouse pointer is held still over the icon area for
     173 *      some time.
     174 *
     175 *      If pszText is NULL, the tooltip text is reset and will not be shown next
     176 *      time. The old tooltip is hidden if it is being currently shown.
     177 *
     178 *      Returns TRUE on success and FALSE otherwise.
     179 *
     180 *      NOTE: The maximum tooltip text length (including terminating null) is
     181 *      limited to a value returned by xstGetSysTrayMaxTextLen(). If the
     182 *      supplied string is longer, it will be truncated.
     183 */
     184
    93185BOOL XSTAPI xstSetSysTrayIconToolTip(HWND hwnd, USHORT usId, PCSZ pcszToolTip);
     186
     187/*
     188 *@@ xstShowSysTrayIconBalloon:
     189 *
     190 *      Not implemented yet.
     191 */
    94192
    95193BOOL XSTAPI xstShowSysTrayIconBalloon(HWND hwnd, USHORT usId, PCSZ pcszTitle,
     
    97195                                      ULONG ulTimeout);
    98196
     197/*
     198 *@@ xstHideSysTrayIconBalloon:
     199 *
     200 *      Not implemented yet.
     201 */
     202
    99203BOOL XSTAPI xstHideSysTrayIconBalloon(HWND hwnd, USHORT usId);
    100204
     205/*
     206 *@@ xstQuerySysTrayIconRect:
     207 *
     208 *      Obtains a rectangle occupied by the given icon (in screen coordinates,
     209 *      top right corner exclusive).
     210 *
     211 *      Returns TRUE on success and FALSE otherwise.
     212 */
     213
    101214BOOL XSTAPI xstQuerySysTrayIconRect(HWND hwnd, USHORT usId, PRECTL prclRect);
    102215
     216/*
     217 *@@ xstGetSysTrayCreatedMsgId:
     218 *
     219 *      Returns the ID of the message that is sent by the Extended system tray
     220 *      to all top-level WC_FRAME windows on the desktop to let them add tray
     221 *      icons if they need.
     222 *
     223 *      NOTE: The returned value never changes until reboot so it is a good
     224 *      practice to cache it instead of calling this function each time from the
     225 *      window procedure of every involved window.
     226 */
     227
    103228ULONG XSTAPI xstGetSysTrayCreatedMsgId();
     229
     230/*
     231 *@@ xstGetSysTrayMaxTextLen:
     232 *
     233 *      Returns the maximum length of the text (in bytes, including the
     234 *      terminating null) that can be shown in the tooltop of the icon in the
     235 *      system tray. You can use the returned value to determine the maximum
     236 *      length of the string passed as pszText to xstSetSysTrayIconToolTip().
     237 *
     238 *      The returned value also defines the maximum length of both the title and
     239 *      the text (including terminating nulls) of the icon's balloon for the
     240 *      xstShowSysTrayIconBalloon() call.
     241 *
     242 *      Returns TRUE on success and FALSE otherwise.
     243 *
     244 *      NOTE: The returned value never changes until reboot so it is a good
     245 *      practice to cache it instead of calling this function each time.
     246 */
    104247
    105248ULONG XSTAPI xstGetSysTrayMaxTextLen();
  • trunk/src/3rdparty/os2/xsystray/plugin/w_xsystray.c

    r836 r837  
    66 *      Implementation.
    77 *
    8  *      Copyright (C) 2009 Dmitry A. Kuminov
     8 *      Copyright (C) 2009-2011 Dmitriy Kuminov
    99 *
    1010 *      This file is part of the Extended system tray widget source package.
  • trunk/src/3rdparty/os2/xsystray/plugin/w_xsystray.def

    r835 r837  
    55
    66LIBRARY XSYSTRAY INITGLOBAL TERMGLOBAL
    7 Description '@#netlabs.org:0.1.0#@ Extended system tray widget DLL for XCenter'
     7Description '@#netlabs.org:0.1.1#@ Extended system tray widget DLL for XCenter'
    88PROTMODE
    99
  • trunk/src/3rdparty/os2/xsystray/plugin/w_xsystray.h

    r835 r837  
    66 *      Private declarations.
    77 *
    8  *      Copyright (C) 2009 Dmitry A. Kuminov
     8 *      Copyright (C) 2009-2011 Dmitriy Kuminov
    99 *
    1010 *      This file is part of the Extended system tray widget source package.
     
    2828#define XSYSTRAY_VERSION_MAJOR 0
    2929#define XSYSTRAY_VERSION_MINOR 1
    30 #define XSYSTRAY_VERSION_REVISION 0
     30#define XSYSTRAY_VERSION_REVISION 1
    3131
    3232#define WNDCLASS_WIDGET_XSYSTRAY_SERVER "XWPCenterExtendedSysTrayServer"
Note: See TracChangeset for help on using the changeset viewer.