home *** CD-ROM | disk | FTP | other *** search
- /*
- GIK/2 1.0.1 EWYYAEH.C 5621-432 (C) COPYRIGHT IBM CORP 1991, 1993. ALL RIGHTS RESERVED. LICENSED MATERIALS - PROPERTY OF IBM.
- */
- /**********************************************************************/
- /* */
- /* MODULE PROLOGUE */
- /* */
- /* COMPONENT NAME: LAN Configurator Example (Getting Started) */
- /* */
- /* MODULE NAME: EWYYAEH.C */
- /* */
- /* DESCRIPTIVE NAME: Graphics Interface Kit/2 - LAN Configurator */
- /* (Getting Started) Example */
- /* */
- /* PURPOSE: */
- /* */
- /* This module contains the event handler functions for the */
- /* LAN configurator example. */
- /* */
- /* COPYRIGHT: (C) 1991, 1993 IBM Corporation */
- /* */
- /* DISCLAIMER OF WARRANTIES. The following [enclosed] code is */
- /* sample code created by IBM Corporation. This sample code is not */
- /* part of any standard or IBM product and is provided to you solely */
- /* for the purpose of assisting you in the development of your */
- /* applications. The code is provided "AS IS", without */
- /* warranty of any kind. IBM shall not be liable for any damages */
- /* arising out of your use of the sample code, even if they have been */
- /* advised of the possibility of such damages. */
- /**********************************************************************/
- /*--------------------------------------------------------------------*/
- /* INCLUDE RELATED DEFINES */
- /*--------------------------------------------------------------------*/
-
- #define INCL_DOS /* OS/2 definitions */
- #define INCL_PM /* PM definitions */
-
- /*--------------------------------------------------------------------*/
- /* HEADER FILES */
- /*--------------------------------------------------------------------*/
-
- #include <os2.h> /* OS/2 header file */
- #include <ewyga.h> /* GIK/2 header file */
- #include "EWYYADF.H" /* Generated header file */
-
- /*--------------------------------------------------------------------*/
- /* LOCAL FUNCTION PROTOTYPES */
- /*--------------------------------------------------------------------*/
-
- SHORT GSENTRY DescriptionToggle(DHND,SHORT,EVS_DOUBLE_CLICK*);
-
- /**********************************************************************/
- /* DescriptionToggle */
- /* */
- /* Parameters: */
- /* DHND dhnd (I): Diagram handle. */
- /* SHORT ev_id (I): Identifies the event. */
- /* EVS_DOUBLE_CLICK *pEvs (I): Pointer to instance of event*/
- /* data type. */
- /* SHND shnd (I): Handle of the symbol */
- /* SHORT part_ref (I): Reference number of the symbol part*/
- /* USHORT button (I): Mouse button that is pressed */
- /* It is one of the following: */
- /* GS_MB1 */
- /* GS_MB2 */
- /* */
- /* Returns: */
- /* GS_NO Any changes made to symbols remain and the action */
- /* stops. */
- /* GS_NO_1 Any changes made to symbols remain and the action */
- /* stops. */
- /* GS_RESTORE Any changes made to symbols since the last undo */
- /* checkpoint are undone and the action stops. */
- /* GS_RESTORE_1 Any changes made to symbols since the last undo */
- /* checkpoint are undone and the action stops. */
- /* GS_YES The default processing continues. */
- /* */
- /* Description: */
- /* The function handles the event EV_DOUBLE_CLICK. */
- /**********************************************************************/
-
- SHORT GSENTRY DescriptionToggle(DHND dhnd,
- SHORT ev_id,
- EVS_DOUBLE_CLICK *pEvs)
- {
- SHORT visible;
-
- GsGetPartVisibility(dhnd, pEvs->shnd, COMPUTER_ID, &visible);
- GsPutPartVisibility(dhnd, pEvs->shnd, COMPUTER_ID, !visible);
- return GS_YES;
- }