Changeset 835 for trunk


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

gui: Extracted xsystray API from Qt and put it to a separate DLL dynamically loaded at runtime (see #99 for details).

Location:
trunk/src
Files:
4 added
3 edited
1 copied
5 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/3rdparty/os2/xsystray/apilib/xsystray.c

    r834 r835  
    11
    22/*
    3  *@@sourcefile xsystray_api.c:
     3 *@@sourcefile xsystray.c:
    44 *      Extended system tray widget for XCenter/eCenter.
    55 *
     
    3030#include <os2.h>
    3131
    32 #include "xsystray_api.h"
     32#
    3333#include "xsystray.h"
     34
     35
    3436
    3537#include <string.h>
  • trunk/src/3rdparty/os2/xsystray/apilib/xsystray.h

    r834 r835  
    11
    22/*
    3  *@@sourcefile xsystray_api.h:
     3 *@@sourcefile xsystray.h:
    44 *      Extended system tray widget for XCenter/eCenter.
    55 *
     
    3131#if __cplusplus
    3232extern "C" {
     33
     34
     35
     36
     37
     38
    3339#endif
    3440
     
    7581} XSTWHEELMSG, *PXSTWHEELMSG;
    7682
    77 BOOL xstQuerySysTrayVersion(PULONG pulMajor, PULONG pulMinor, PULONG pulRevision);
    78 BOOL xstAddSysTrayIcon(HWND hwnd, USHORT usId, HPOINTER hIcon, PCSZ pcszToolTip,
    79                        ULONG ulMsgId, ULONG ulFlags);
    80 BOOL xstReplaceSysTrayIcon(HWND hwnd, USHORT usId, HPOINTER hIcon);
    81 BOOL xstRemoveSysTrayIcon(HWND hwnd, USHORT usId);
    82 BOOL xstSetSysTrayIconToolTip(HWND hwnd, USHORT usId, PCSZ pcszToolTip);
    83 BOOL xstShowSysTrayIconBalloon(HWND hwnd, USHORT usId, PCSZ pcszTitle,
    84                                PCSZ pcszText, ULONG ulFlags, ULONG ulTimeout);
    85 BOOL xstHideSysTrayIconBalloon(HWND hwnd, USHORT usId);
     83BOOL XSTAPI xstQuerySysTrayVersion(PULONG pulMajor, PULONG pulMinor,
     84                                   PULONG pulRevision);
     85                                   
     86BOOL XSTAPI xstAddSysTrayIcon(HWND hwnd, USHORT usId, HPOINTER hIcon,
     87                              PCSZ pcszToolTip, ULONG ulMsgId, ULONG ulFlags);
     88                               
     89BOOL XSTAPI xstReplaceSysTrayIcon(HWND hwnd, USHORT usId, HPOINTER hIcon);
    8690
    87 BOOL xstQuerySysTrayIconRect(HWND hwnd, USHORT usId, PRECTL prclRect);
     91BOOL );
    8892
    89 ULONG xstGetSysTrayCreatedMsgId();
     93);
    9094
    91 ULONG xstGetSysTrayMaxTextLen();
     95BOOL XSTAPI xstShowSysTrayIconBalloon(HWND hwnd, USHORT usId, PCSZ pcszTitle,
     96                                      PCSZ pcszText, ULONG ulFlags,
     97                                      ULONG ulTimeout);
     98
     99BOOL XSTAPI xstHideSysTrayIconBalloon(HWND hwnd, USHORT usId);
     100
     101BOOL XSTAPI xstQuerySysTrayIconRect(HWND hwnd, USHORT usId, PRECTL prclRect);
     102
     103ULONG XSTAPI xstGetSysTrayCreatedMsgId();
     104
     105ULONG XSTAPI xstGetSysTrayMaxTextLen();
    92106
    93107#if __cplusplus
  • trunk/src/3rdparty/os2/xsystray/plugin/plugin.pro

    r834 r835  
    44QT =
    55
    6 SOURCES = xsystray.c
     6TARGET = xsystray
    77
    8 DEF_FILE = xsystray.def
     8SOURCES = w_xsystray.c
     9
     10DEF_FILE = w_xsystray.def
     11
     12INCLUDEPATH += .. ../apilib
    913
    1014DESTDIR = $$[QT_INSTALL_PLUGINS]/xcenter
  • trunk/src/3rdparty/os2/xsystray/plugin/w_xsystray.c

    r834 r835  
    11
    22/*
    3  *@@sourcefile xsystray.c:
     3 *@@sourcefile xsystray.c:
    44 *      Extended system tray widget for XCenter/eCenter.
    55 *
     
    7777#include "shared\center.h"              // public XCenter interfaces
    7878
    79 #include "xsystray.h"
     79#include "xsystray.h"
    8080
    8181#if defined(__IBMC__) || defined(__IBMCPP__)
  • trunk/src/3rdparty/os2/xsystray/plugin/w_xsystray.h

    r834 r835  
    11
    22/*
    3  *@@sourcefile xsystray.h:
     3 *@@sourcefile xsystray.h:
    44 *      Extended system tray widget for XCenter/eCenter.
    55 *
     
    2222#define XSYSTRAY_HEADER_INCLUDED
    2323
    24 #include "xsystray_api.h"
     24#include "xsystray.h"
    2525
    2626#include <sys/builtin.h>        // atomics
     
    115115 *      posted to clients (windows associated with system tray icons) about
    116116 *      icon events. This structure unions all public notification code
    117  *      dependent structures defined in xsystray_api.h (starting with XST*).
     117 *      dependent structures defined in xsystray.h (starting with XST*).
    118118 *
    119119 *      All messages posted to the client have an ID corresponding to the
     
    137137 *
    138138 *      NOTE: When you change the size of this structure, you may also need to
    139  *      change SERVER_MEMORYPOOL_SIZE value in xsystray.c (see the comments
     139 *      change SERVER_MEMORYPOOL_SIZE value in xsystray.c (see the comments
    140140 *      there for details).
    141141 */
  • trunk/src/3rdparty/os2/xsystray/xsystray.pro

    r252 r835  
    1 TEMPLATE = lib
     1TEMPLATE = subdirs
     2SUBDIRS = plugin apilib
    23
    3 CONFIG += dll
    4 QT =
    5 
    6 SOURCES = xsystray.c
    7 
    8 DEF_FILE = xsystray.def
    9 
    10 DESTDIR = $$[QT_INSTALL_PLUGINS]/xcenter
  • trunk/src/gui/util/qsystemtrayicon_pm.cpp

    r659 r835  
    4848#include "qapplication.h"
    4949#include "qdesktopwidget.h"
     50
    5051#include "qt_os2.h"
    5152
    52 #include "xsystray_api.h"
     53// for dynamic linking to xsystray DLL
     54#define xstQuerySysTrayVersion (*_xstQuerySysTrayVersion)
     55#define xstAddSysTrayIcon (*_xstAddSysTrayIcon)
     56#define xstReplaceSysTrayIcon (*_xstReplaceSysTrayIcon)
     57#define xstRemoveSysTrayIcon (*_xstRemoveSysTrayIcon)
     58#define xstSetSysTrayIconToolTip (*_xstSetSysTrayIconToolTip)
     59#define xstQuerySysTrayIconRect (*_xstQuerySysTrayIconRect)
     60#define xstGetSysTrayCreatedMsgId (*_xstGetSysTrayCreatedMsgId)
     61#define xstGetSysTrayMaxTextLen (*_xstGetSysTrayMaxTextLen)
     62
     63#include "xsystray.h"
    5364
    5465QT_BEGIN_NAMESPACE
     
    5667#define WM_XST_MYNOTIFY     (WM_USER + 1000)
    5768
    58 static ULONG WM_XST_CREATED = xstGetSysTrayCreatedMsgId();
    59 static ULONG MaxTextLen = xstGetSysTrayMaxTextLen();
     69static ULONG WM_XST_CREATED = ;
     70static ULONG MaxTextLen = ;
    6071
    6172class QSystemTrayIconSys : QWidget
     
    307318bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys()
    308319{
     320
     321
     322
     323
     324
     325
     326
     327
     328
     329
     330
     331
     332
     333
     334
     335
     336
     337
     338
     339
     340
     341
     342
     343
     344
    309345    return xstQuerySysTrayVersion(0, 0, 0);
    310346}
  • trunk/src/gui/util/util.pri

    r769 r835  
    3131os2 {
    3232                SOURCES += \
    33                                 util/qsystemtrayicon_pm.cpp \
    34                                 ../3rdparty/os2/xsystray/xsystray_api.c
     33                                util/qsystemtrayicon_pm.cpp
     34                # @todo this should be required to present extenrally in the
     35                # environment when it gets moved to XWP (see #99 for details)
    3536                INCLUDEPATH += \
    36                                 ../3rdparty/os2/xsystray
     37                                ../3rdparty/os2/xsystray
    3738}
    3839
Note: See TracChangeset for help on using the changeset viewer.