home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / videofrm / network.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-15  |  4.2 KB  |  139 lines

  1. /*
  2.  * Copyright (c) 1992 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software and 
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that (i) the above copyright notices and this permission notice appear in
  7.  * all copies of the software and related documentation, and (ii) the name
  8.  * Stanford may not be used in any advertising or publicity relating to
  9.  * the software without the specific, prior written permission of
  10.  * Stanford.
  11.  * 
  12.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  13.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  14.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  15.  *
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  17.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
  18.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
  19.  * ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
  20.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21.  * SOFTWARE.
  22.  */
  23.  
  24. /* $Header: /Source/Media/drapeau/VideoFrame/RCS/network.c,v 1.1 92/07/14 14:42:45 drapeau Exp $ */
  25. /* $Log:    network.c,v $
  26.  * Revision 1.1  92/07/14  14:42:45  drapeau
  27.  * Initial revision
  28.  *  */
  29.  
  30. #include "VideoFrame.h"
  31.  
  32. static char networkRcsid[] = "$Header: /Source/Media/drapeau/VideoFrame/RCS/network.c,v 1.1 92/07/14 14:42:45 drapeau Exp $";
  33.  
  34.  
  35. void OpenDoc(char** filename)
  36. {
  37.   OpenEditList(*filename, 0);
  38. }                                    /* end function OpenDoc */
  39.  
  40.  
  41. void SetSelection(MAESelection* selection)
  42. {
  43.   if (selection->start <= editList.numEdits)
  44.   currentEdit = selection->start;
  45.   return;
  46. }                                    /* end function SetSelection */
  47.  
  48.  
  49. void PerformSelection(void* unusedArg)
  50. {
  51.   LoadCurrentSelection(currentEdit);
  52. }                                    /* end function PerformSelection */
  53.  
  54.  
  55. char** GetDoc(void* unusedArg)
  56. {
  57.   return((char**)&editListFileName);
  58. }                                    /* end function GetDoc */
  59.  
  60.  
  61. MAESelection* GetSelection(void* unusedArg)
  62. {
  63.   static MAESelection selection;
  64.   
  65.   selection.duration = 1000;
  66.   selection.start = currentEdit;
  67.   selection.end = currentEdit;
  68.   selection.offset = 0;
  69.   sprintf(selection.label, "%s", editList.item[currentEdit].label);
  70.   return (&selection);
  71. }                                    /* end function GetSelection */
  72.  
  73.  
  74. void HaltSelection(MAESelection* selection)
  75. {
  76. }                                    /* end function HaltSelection */
  77.  
  78.  
  79. void PauseSelection(void* unusedArg)
  80. {
  81. }                                    /* end function PauseSelection */
  82.  
  83.  
  84. void ResumeSelection(void* unusedArg)
  85. {
  86. }                                    /* end function ResumeSelection */
  87.  
  88.  
  89. void HideApplication(void* unusedArg)
  90. {
  91.   xv_set(VideoFrame_mainWindow->mainWindow, FRAME_CLOSED, TRUE, NULL); /* Iconify the app */
  92.   xv_set(VideoFrame_inputWindow1->inputWindow1, FRAME_CLOSED, TRUE, NULL); /* Iconify video input window 1 */
  93.   xv_set(VideoFrame_inputWindow2->inputWindow2, FRAME_CLOSED, TRUE, NULL); /* Iconify video input window 2 */
  94.   XFlush((Display *) xv_get(VideoFrame_mainWindow->mainWindow, 
  95.                 XV_DISPLAY));
  96.   return;
  97. }                                    /* end function HideApplication */
  98.  
  99.  
  100. void ShowApplication(void* unusedArg)
  101. {
  102.   xv_set(VideoFrame_mainWindow->mainWindow, FRAME_CLOSED, FALSE, NULL);    /* Open the app if it is iconified */
  103.   xv_set(VideoFrame_mainWindow->mainWindow, XV_SHOW, TRUE, NULL);   /* Bring the app to the front */
  104.   xv_set(VideoFrame_inputWindow1->inputWindow1, FRAME_CLOSED, FALSE, NULL);
  105.  
  106.   if (xv_get(VideoFrame_inputWindow1->inputWindow1, XV_SHOW) == TRUE) 
  107.   {
  108.     xv_set(VideoFrame_inputWindow1->inputWindow1, XV_SHOW, TRUE, NULL);
  109.   }
  110.   xv_set(VideoFrame_inputWindow2->inputWindow2, FRAME_CLOSED, FALSE, NULL);
  111.   if (xv_get(VideoFrame_inputWindow2->inputWindow2, XV_SHOW) == TRUE) 
  112.   {
  113.     xv_set(VideoFrame_inputWindow2->inputWindow2, XV_SHOW, TRUE, NULL);
  114.   }
  115.   XFlush((Display *) xv_get(VideoFrame_mainWindow->mainWindow, 
  116.                 XV_DISPLAY));
  117.   return;
  118. }                                    /* end function ShowApplication */
  119.  
  120.  
  121. IconData* GetAppIcon(void* unusedArg)
  122. {
  123.   static IconData returnVal;
  124.   static unsigned short iconBits[] = 
  125.   {
  126. #include "icons/VideoFrame"
  127.   };
  128.  
  129.   returnVal.iconData = (char *) malloc(sizeof(iconBits));
  130.   bcopy(iconBits, returnVal.iconData, sizeof(iconBits));
  131.   if (returnVal.iconData) 
  132.   {
  133.     returnVal.dataLength = sizeof(iconBits);
  134.   }
  135.   return(&returnVal);
  136. }                                    /* end function GetAppIcon */
  137.  
  138.  
  139.