home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xwplascr.zip / XWPL0208.ZIP / idl / xcenter.idl < prev    next >
Text File  |  2002-08-08  |  10KB  |  292 lines

  1.  
  2. /*
  3.  * xcenter.idl:
  4.  *      SOM interface description file for the following
  5.  *      XWorkplace classes (in this order):
  6.  *          XCenter
  7.  *      and the respective metaclasses.
  8.  *
  9.  *      See src\classes\xcenter.c for details.
  10.  *
  11.  *      Copyright (C) 2000 Ulrich Möller.
  12.  *      This file is part of the XWorkplace source package.
  13.  *      XWorkplace is free software; you can redistribute it and/or modify
  14.  *      it under the terms of the GNU General Public License as published
  15.  *      by the Free Software Foundation, in version 2 as it comes in the
  16.  *      "COPYING" file of the XWorkplace main distribution.
  17.  *      This program is distributed in the hope that it will be useful,
  18.  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
  19.  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20.  *      GNU General Public License for more details.
  21.  */
  22.  
  23. #include <wpabs.idl>         // this is SOM for WPAbstract
  24.  
  25. /*
  26.    CLASS: XCenter
  27.  
  28.    CLASS HIERARCHY:
  29.  
  30.        SOMObject
  31.          └── WPObject
  32.                └── WPAbstract
  33.                      └── XCenter
  34. */
  35.  
  36. interface M_XCenter;            // forward reference to metaclass
  37.  
  38. interface XCenter : WPAbstract
  39. {
  40.     /*
  41.      * SOM typedef definitions:
  42.      *      declaring types here is similar to
  43.      *      passing them thru to the .H file,
  44.      *      but the difference is that we can also
  45.      *      use them in this .IDL file.
  46.      */
  47.  
  48.     /*
  49.      *@@ WIDGETPOSITION:
  50.      *      specifies a widget position in an XCenter.
  51.      *
  52.      *      If the widget is a "root" widget (i.e. not
  53.      *      in a tray, the first two fields are -1,
  54.      *      and ulWidgetIndex specifies the index of
  55.      *      the widget in the XCenter (with 0 being the
  56.      *      leftmost widget).
  57.      *
  58.      *      Otherwise (if the widget is in a tray),
  59.      *      the first two fields specify the index of
  60.      *      the tray widget and the tray, and ulWidgetIndex
  61.      *      specifies the index of the widget in that tray.
  62.      *
  63.      *@@added V0.9.16 (2001-12-31) [umoeller]
  64.      */
  65.  
  66.     struct WIDGETPOSITION
  67.     {
  68.         ULONG   ulTrayWidgetIndex;      // tray widget index or -1
  69.         ULONG   ulTrayIndex;            // tray index or -1
  70.         ULONG   ulWidgetIndex;          // index of widget in tray or in XCenter
  71.     };
  72.  
  73.     typedef WIDGETPOSITION *PWIDGETPOSITION;
  74.  
  75.     /*
  76.      * New instance methods for XCenter:
  77.      *
  78.      */
  79.  
  80.     ULONG xwpAddXCenterPages(in HWND hwndNotebook);
  81.  
  82.     PVOID xwpQueryWidgets(in PULONG pulCount);
  83.  
  84.     VOID xwpFreeWidgetsBuf(in PVOID pBuf,
  85.                            in ULONG ulCount);
  86.  
  87.     ULONG xwpCreateWidget(in PSZ pszWidgetClass,
  88.                           in PSZ pszSetupString,
  89.                           in PWIDGETPOSITION pPosition);
  90.  
  91.     ULONG xwpCreateTray(in ULONG ulTrayWidgetIndex,
  92.                         in PSZ pszTrayName);
  93.  
  94.     ULONG xwpRenameTray(in ULONG ulTrayWidgetIndex,
  95.                         in ULONG ulTrayIndex,
  96.                         in PSZ pszNewTrayName);
  97.  
  98.     ULONG xwpDeleteWidget(in PWIDGETPOSITION pPosition);
  99.  
  100.     BOOL xwpMoveWidget(in ULONG ulIndex2Move,
  101.                        in ULONG ulBeforeIndex);
  102.  
  103.     BOOL xwpSetPriority(in LONG lDelta);
  104.  
  105.     BOOL xwpQuerySetup2(in PVOID pstrSetup);
  106.  
  107.     HWND xwpHotkeyOrBorderAction(in ULONG hab, in ULONG ulCorner);
  108.  
  109. #ifdef __SOMIDL__
  110.   implementation {
  111.  
  112.     releaseorder: xwpAddXCenterPages,
  113.                   xwpQueryWidgets,
  114.                   xwpFreeWidgetsBuf,
  115.                   xwpCreateWidget,
  116.                   xwpCreateTray,
  117.                   xwpRenameTray,
  118.                   xwpDeleteWidget,
  119.                   xwpMoveWidget,
  120.                   xwpSetPriority,
  121.                   xwpQuerySetup2,
  122.                   xwpHotkeyOrBorderAction;
  123.  
  124.     /*
  125.      * Class Modifiers:
  126.      *
  127.      */
  128.  
  129.     externalprefix = xctr_;
  130.     externalstem = xctr;
  131.     majorversion = 1;
  132.     minorversion = 1;
  133.     filestem = xcenter;           //# specifies the filestem for sc-generated files
  134.     metaclass = M_XCenter;
  135.     dllname = "xfldr.dll";
  136.     callstyle = oidl;           //# forget CORBA stuff (*ev and such)
  137.  
  138.     /*
  139.      * Internal instance variables for XCenter:
  140.      *
  141.      */
  142.  
  143.     BOOL fReduceDesktopWorkarea;    // if TRUE, this XCenter will reduce the desktop
  144.                                     // workarea if open
  145.  
  146.     BOOL fHideOnClick;              // if auto-hide is on, whether to hide on mouse click
  147.                                     // V0.9.14 (2001-08-21) [umoeller]
  148.  
  149.     BOOL fAutoScreenBorder;         // if enabled, automatically add the XCenter
  150.                                     // to the current screen border on each open
  151.                                     // V0.9.19 (2002-05-07) [umoeller]
  152.  
  153.     ULONG ulWindowStyle;            // XCenter frame's window style;
  154.                                     // defaults to 0, but can be WS_TOPMOST | WS_ANIMATE
  155.  
  156.     ULONG ulAutoHide;               // auto-hide delay in milliseconds; if 0,
  157.                                     // auto-hide is off
  158.  
  159.     ULONG ulPosition;               // 0 = bottom (XCENTER_BOTTOM)
  160.                                     // 1 = top (XCENTER_TOP)
  161.  
  162.     ULONG flDisplayStyle;           // XCS_* style flags. See XCENTERGLOBALS.
  163.  
  164.     ULONG ul3DBorderWidth;          // 3D border width of entire XCenter (0-10)
  165.     ULONG ulBorderSpacing;          // spacing between 3D border and widgets (0-10)
  166.     ULONG ulWidgetSpacing;          // spacing between widgets
  167.  
  168.     //# ULONG ulPriorityClass;          // XCenter priority class removed V0.9.20 (2002-08-08) [umoeller]
  169.     LONG lPriorityDelta;            // XCenter priority delta
  170.  
  171.     BOOL fHelpDisplayed;            // TRUE after the first open of the XCenter,
  172.                                     // when introductory help has been displayed.
  173.  
  174.     PSZ pszClientFont;              // font presparam for XCenter client ("9.WarpSans Bold")
  175.                                     // V0.9.9 (2001-03-07) [umoeller]
  176.  
  177.     LONG lcolClientBackground;      // client background color
  178.                                     // V0.9.9 (2001-03-07) [umoeller]
  179.  
  180.     ULONG ulWidth;                  // XCenter width (V0.9.19 (2002-04-16) [lafaix])
  181.     ULONG ulHeight;                 // XCenter height (V0.9.19 (2002-04-16) [lafaix])
  182.  
  183.     // Open view data:
  184.     ULONG tidRunning;               // thread ID of running XCenter thread or NULLHANDLE
  185.     PVOID pvOpenView;               // if != NULLHANDLE, XCenter is currently open,
  186.                                     // and this has a PXCENTERWINDATA pointer
  187.                                     // which contains all the view data.
  188.                 // A remark on these two fields...
  189.                 // tidRunning is set directly by the thread functions
  190.                 // in helpers\threads.c, since &_tidRunning is passed
  191.                 // to thrCreate. As a result, this should be the first
  192.                 // check for whether an XCenter view is only open.
  193.                 // Even though tidRunning may be != null, pvOpenView
  194.                 // may still be NULL since that field is only set
  195.                 // while the XCenter view is fully operable (which
  196.                 // might not be the case while the view is being
  197.                 // created or destroyed).
  198.                 // So do not rely on the pvOpenView field. Check
  199.                 // tidRunning instead.
  200.  
  201.     BOOL fShowingOpenViewMenu;      // TRUE if context menu on open XCenter client
  202.  
  203.     // Widget settings:
  204.     PSZ pszPackedWidgetSettings;    // packed widget settings restored in wpRestoreState
  205.                                     // (allocated with malloc())
  206.     ULONG cbPackedWidgetSettings;   // size of that buffer
  207.  
  208.     PVOID pllAllWidgetSettings;     // linked list of PRIVATEWIDGETSETTING entries
  209.                                     // (this is a PLINKLIST really, no auto-free!)
  210.  
  211.     /*
  212.      * WPAbstract methods overridden by XCenter:
  213.      *
  214.      */
  215.  
  216.     wpInitData: override;
  217.     wpUnInitData: override;
  218.     // wpObjectReady: override;     removed V0.9.9 (2001-03-13) [umoeller]
  219.  
  220.     wpSetup: override;
  221.     wpSetupOnce: override;
  222.  
  223.     wpSaveState: override;
  224.     wpRestoreState: override;
  225.  
  226.     wpModifyPopupMenu: override;
  227.  
  228. //#    wpQueryDefaultHelp: override;    replaced with class method V0.9.20 (2002-07-12) [umoeller]
  229.     wpQueryDefaultView: override;
  230.  
  231.     wpOpen: override;
  232.     wpSwitchTo: override;
  233.     wpClose: override;
  234.  
  235.     wpAddObjectWindowPage: override;
  236.  
  237.     wpAddSettingsPages: override;
  238.  
  239.   }; // implementation
  240. #endif /* __SOMIDL__ */
  241. };
  242.  
  243. //#
  244. //#
  245. //# Now define Metaclass.
  246. //# ---------------------
  247. //#
  248.  
  249. interface M_XCenter : M_WPAbstract
  250. {
  251.  
  252. #ifdef __SOMIDL__
  253.   implementation {
  254.  
  255.     /*
  256.      * Class Modifiers:
  257.      *
  258.      */
  259.  
  260.     externalprefix = xctrM_;
  261.     externalstem = xctrM;
  262.     functionprefix = xctrM_;
  263.     majorversion = 1;
  264.     minorversion = 1;
  265.     filestem = xcenter;           //# specifies the filestem for sc-generated files
  266.     dllname = "xfldr.dll";
  267.     callstyle = oidl;
  268.  
  269.     /*
  270.      * Internal class variables:
  271.      *
  272.      */
  273.  
  274.     /*
  275.      * M_WPAbstract methods overridden by M_XCenter:
  276.      *
  277.      */
  278.  
  279.     wpclsInitData: override;
  280.     wpclsQueryStyle: override;
  281.     wpclsQueryTitle: override;
  282.     wpclsQueryDefaultHelp: override;
  283.  
  284.     wpclsCreateDefaultTemplates: override;
  285.  
  286.     wpclsQueryIconData: override;
  287.   };
  288. #endif /* __SOMIDL__ */
  289. };
  290.  
  291.  
  292.