home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / gik2 / ewyio2eu.d2x / EWYYAEH.C < prev   
Encoding:
C/C++ Source or Header  |  1993-08-04  |  5.6 KB  |  92 lines

  1. /*
  2. GIK/2 1.0.1 EWYYAEH.C 5621-432 (C) COPYRIGHT IBM CORP 1991, 1993.  ALL RIGHTS RESERVED.  LICENSED MATERIALS - PROPERTY OF IBM.
  3. */
  4. /**********************************************************************/
  5. /*                                                                    */
  6. /*                         MODULE PROLOGUE                            */
  7. /*                                                                    */
  8. /* COMPONENT NAME:   LAN Configurator Example (Getting Started)       */
  9. /*                                                                    */
  10. /* MODULE NAME:      EWYYAEH.C                                        */
  11. /*                                                                    */
  12. /* DESCRIPTIVE NAME: Graphics Interface Kit/2 - LAN Configurator      */
  13. /*                   (Getting Started) Example                        */
  14. /*                                                                    */
  15. /* PURPOSE:                                                           */
  16. /*                                                                    */
  17. /*   This module contains the event handler functions for the         */
  18. /*   LAN configurator example.                                        */
  19. /*                                                                    */
  20. /* COPYRIGHT:        (C) 1991, 1993 IBM Corporation                   */
  21. /*                                                                    */
  22. /* DISCLAIMER OF WARRANTIES.  The following [enclosed] code is        */
  23. /* sample code created by IBM Corporation. This sample code is not    */
  24. /* part of any standard or IBM product and is provided to you solely  */
  25. /* for the purpose of assisting you in the development of your        */
  26. /* applications.  The code is provided "AS IS", without               */
  27. /* warranty of any kind.  IBM shall not be liable for any damages     */
  28. /* arising out of your use of the sample code, even if they have been */
  29. /* advised of the possibility of such damages.                        */
  30. /**********************************************************************/
  31. /*--------------------------------------------------------------------*/
  32. /* INCLUDE RELATED DEFINES                                            */
  33. /*--------------------------------------------------------------------*/
  34.  
  35. #define  INCL_DOS                            /* OS/2 definitions      */
  36. #define  INCL_PM                             /* PM definitions        */
  37.  
  38. /*--------------------------------------------------------------------*/
  39. /* HEADER FILES                                                       */
  40. /*--------------------------------------------------------------------*/
  41.  
  42. #include <os2.h>                             /* OS/2  header file     */
  43. #include <ewyga.h>                           /* GIK/2 header file     */
  44. #include "EWYYADF.H"                         /* Generated header file */
  45.  
  46. /*--------------------------------------------------------------------*/
  47. /* LOCAL FUNCTION PROTOTYPES                                          */
  48. /*--------------------------------------------------------------------*/
  49.  
  50. SHORT GSENTRY DescriptionToggle(DHND,SHORT,EVS_DOUBLE_CLICK*);
  51.  
  52. /**********************************************************************/
  53. /* DescriptionToggle                                                  */
  54. /*                                                                    */
  55. /* Parameters:                                                        */
  56. /*    DHND                     dhnd  (I): Diagram handle.             */
  57. /*    SHORT                    ev_id (I): Identifies the event.       */
  58. /*    EVS_DOUBLE_CLICK         *pEvs (I): Pointer to instance of event*/
  59. /*                                        data type.                  */
  60. /*     SHND   shnd (I):            Handle of the symbol               */
  61. /*     SHORT  part_ref (I):        Reference number of the symbol part*/
  62. /*     USHORT button (I):          Mouse button that is pressed       */
  63. /*                                 It is one of the following:        */
  64. /*                                   GS_MB1                           */
  65. /*                                   GS_MB2                           */
  66. /*                                                                    */
  67. /* Returns:                                                           */
  68. /*   GS_NO        Any changes made to symbols remain and the action   */
  69. /*                stops.                                              */
  70. /*   GS_NO_1      Any changes made to symbols remain and the action   */
  71. /*                stops.                                              */
  72. /*   GS_RESTORE   Any changes made to symbols since the last undo     */
  73. /*                checkpoint are undone and the action stops.         */
  74. /*   GS_RESTORE_1 Any changes made to symbols since the last undo     */
  75. /*                checkpoint are undone and the action stops.         */
  76. /*   GS_YES       The default processing continues.                   */
  77. /*                                                                    */
  78. /* Description:                                                       */
  79. /*    The function handles the event EV_DOUBLE_CLICK.                 */
  80. /**********************************************************************/
  81.  
  82. SHORT GSENTRY DescriptionToggle(DHND dhnd,
  83.                                 SHORT ev_id,
  84.                                 EVS_DOUBLE_CLICK *pEvs)
  85. {
  86.   SHORT visible;
  87.  
  88.   GsGetPartVisibility(dhnd, pEvs->shnd, COMPUTER_ID, &visible);
  89.   GsPutPartVisibility(dhnd, pEvs->shnd, COMPUTER_ID, !visible);
  90.   return GS_YES;
  91. }
  92.