/[dtapublic]/projs/ets/trunk/src/c_tk_base_7_5_w_mods/tkwinclipboard.c
ViewVC logotype

Diff of /projs/ets/trunk/src/c_tk_base_7_5_w_mods/tkwinclipboard.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

projs/trunk/shared_source/c_tk_base_7_5_w_mods/tkwinclipboard.c revision 69 by dashley, Sat Nov 5 10:54:17 2016 UTC projs/dtats/trunk/shared_source/c_tk_base_7_5_w_mods/tkwinclipboard.c revision 98 by dashley, Sun Dec 18 00:57:31 2016 UTC
# Line 1  Line 1 
1  /* $Header$ */  /* $Header$ */
2    
3  /*  /*
4   * tkWinClipboard.c --   * tkWinClipboard.c --
5   *   *
6   *      This file contains functions for managing the clipboard.   *      This file contains functions for managing the clipboard.
7   *   *
8   * Copyright (c) 1995-1997 Sun Microsystems, Inc.   * Copyright (c) 1995-1997 Sun Microsystems, Inc.
9   * Copyright (c) 1998-2000 by Scriptics Corporation.   * Copyright (c) 1998-2000 by Scriptics Corporation.
10   *   *
11   * See the file "license.terms" for information on usage and redistribution   * See the file "license.terms" for information on usage and redistribution
12   * of this file, and for a DISCLAIMER OF ALL WARRANTIES.   * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13   *   *
14   * RCS: @(#) $Id: tkwinclipboard.c,v 1.1.1.1 2001/06/13 05:11:58 dtashley Exp $   * RCS: @(#) $Id: tkwinclipboard.c,v 1.1.1.1 2001/06/13 05:11:58 dtashley Exp $
15   */   */
16    
17  #include "tkWinInt.h"  #include "tkWinInt.h"
18  #include "tkSelect.h"  #include "tkSelect.h"
19    
20  static void     UpdateClipboard _ANSI_ARGS_((HWND hwnd));  static void     UpdateClipboard _ANSI_ARGS_((HWND hwnd));
21    
22  /*  /*
23   *----------------------------------------------------------------------   *----------------------------------------------------------------------
24   *   *
25   * TkSelGetSelection --   * TkSelGetSelection --
26   *   *
27   *      Retrieve the specified selection from another process.  For   *      Retrieve the specified selection from another process.  For
28   *      now, only fetching XA_STRING from CLIPBOARD is supported.   *      now, only fetching XA_STRING from CLIPBOARD is supported.
29   *      Eventually other types should be allowed.   *      Eventually other types should be allowed.
30   *   *
31   * Results:   * Results:
32   *      The return value is a standard Tcl return value.   *      The return value is a standard Tcl return value.
33   *      If an error occurs (such as no selection exists)   *      If an error occurs (such as no selection exists)
34   *      then an error message is left in the interp's result.   *      then an error message is left in the interp's result.
35   *   *
36   * Side effects:   * Side effects:
37   *      None.   *      None.
38   *   *
39   *----------------------------------------------------------------------   *----------------------------------------------------------------------
40   */   */
41    
42  int  int
43  TkSelGetSelection(interp, tkwin, selection, target, proc, clientData)  TkSelGetSelection(interp, tkwin, selection, target, proc, clientData)
44      Tcl_Interp *interp;         /* Interpreter to use for reporting      Tcl_Interp *interp;         /* Interpreter to use for reporting
45                                   * errors. */                                   * errors. */
46      Tk_Window tkwin;            /* Window on whose behalf to retrieve      Tk_Window tkwin;            /* Window on whose behalf to retrieve
47                                   * the selection (determines display                                   * the selection (determines display
48                                   * from which to retrieve). */                                   * from which to retrieve). */
49      Atom selection;             /* Selection to retrieve. */      Atom selection;             /* Selection to retrieve. */
50      Atom target;                /* Desired form in which selection      Atom target;                /* Desired form in which selection
51                                   * is to be returned. */                                   * is to be returned. */
52      Tk_GetSelProc *proc;        /* Procedure to call to process the      Tk_GetSelProc *proc;        /* Procedure to call to process the
53                                   * selection, once it has been retrieved. */                                   * selection, once it has been retrieved. */
54      ClientData clientData;      /* Arbitrary value to pass to proc. */      ClientData clientData;      /* Arbitrary value to pass to proc. */
55  {  {
56      char *data, *destPtr;      char *data, *destPtr;
57      Tcl_DString ds;      Tcl_DString ds;
58      HGLOBAL handle;      HGLOBAL handle;
59      Tcl_Encoding encoding;      Tcl_Encoding encoding;
60      int result, locale;      int result, locale;
61    
62      if ((selection != Tk_InternAtom(tkwin, "CLIPBOARD"))      if ((selection != Tk_InternAtom(tkwin, "CLIPBOARD"))
63              || (target != XA_STRING)              || (target != XA_STRING)
64              || !OpenClipboard(NULL)) {              || !OpenClipboard(NULL)) {
65          goto error;          goto error;
66      }      }
67    
68      /*      /*
69       * Attempt to get the data in Unicode form if available as this is       * Attempt to get the data in Unicode form if available as this is
70       * less work that CF_TEXT.       * less work that CF_TEXT.
71       */       */
72    
73      result = TCL_ERROR;      result = TCL_ERROR;
74      if (IsClipboardFormatAvailable(CF_UNICODETEXT)) {      if (IsClipboardFormatAvailable(CF_UNICODETEXT)) {
75          handle = GetClipboardData(CF_UNICODETEXT);          handle = GetClipboardData(CF_UNICODETEXT);
76          if (!handle) {          if (!handle) {
77              CloseClipboard();              CloseClipboard();
78              goto error;              goto error;
79          }          }
80          data = GlobalLock(handle);          data = GlobalLock(handle);
81          Tcl_DStringInit(&ds);          Tcl_DStringInit(&ds);
82          Tcl_UniCharToUtfDString((Tcl_UniChar *)data,          Tcl_UniCharToUtfDString((Tcl_UniChar *)data,
83                  Tcl_UniCharLen((Tcl_UniChar *)data), &ds);                  Tcl_UniCharLen((Tcl_UniChar *)data), &ds);
84          GlobalUnlock(handle);          GlobalUnlock(handle);
85      } else if (IsClipboardFormatAvailable(CF_TEXT)) {      } else if (IsClipboardFormatAvailable(CF_TEXT)) {
86          /*          /*
87           * Determine the encoding to use to convert this text.           * Determine the encoding to use to convert this text.
88           */           */
89    
90          if (IsClipboardFormatAvailable(CF_LOCALE)) {          if (IsClipboardFormatAvailable(CF_LOCALE)) {
91              handle = GetClipboardData(CF_LOCALE);              handle = GetClipboardData(CF_LOCALE);
92              if (!handle) {              if (!handle) {
93                  CloseClipboard();                  CloseClipboard();
94                  goto error;                  goto error;
95              }              }
96    
97              /*              /*
98               * Get the locale identifier, determine the proper code page               * Get the locale identifier, determine the proper code page
99               * to use, and find the corresponding encoding.               * to use, and find the corresponding encoding.
100               */               */
101    
102              Tcl_DStringInit(&ds);              Tcl_DStringInit(&ds);
103              Tcl_DStringAppend(&ds, "cp######", -1);              Tcl_DStringAppend(&ds, "cp######", -1);
104              data = GlobalLock(handle);              data = GlobalLock(handle);
105                            
106    
107              /*              /*
108               * Even though the documentation claims that GetLocaleInfo               * Even though the documentation claims that GetLocaleInfo
109               * expects an LCID, on Windows 9x it really seems to expect               * expects an LCID, on Windows 9x it really seems to expect
110               * a LanguageID.               * a LanguageID.
111               */               */
112    
113              locale = LANGIDFROMLCID(*((int*)data));              locale = LANGIDFROMLCID(*((int*)data));
114              GetLocaleInfo(locale, LOCALE_IDEFAULTANSICODEPAGE,              GetLocaleInfo(locale, LOCALE_IDEFAULTANSICODEPAGE,
115                      Tcl_DStringValue(&ds)+2, Tcl_DStringLength(&ds)-2);                      Tcl_DStringValue(&ds)+2, Tcl_DStringLength(&ds)-2);
116              GlobalUnlock(handle);              GlobalUnlock(handle);
117    
118              encoding = Tcl_GetEncoding(NULL, Tcl_DStringValue(&ds));              encoding = Tcl_GetEncoding(NULL, Tcl_DStringValue(&ds));
119              Tcl_DStringFree(&ds);              Tcl_DStringFree(&ds);
120          } else {          } else {
121              encoding = NULL;              encoding = NULL;
122          }          }
123    
124          /*          /*
125           * Fetch the text and convert it to UTF.           * Fetch the text and convert it to UTF.
126           */           */
127    
128          handle = GetClipboardData(CF_TEXT);          handle = GetClipboardData(CF_TEXT);
129          if (!handle) {          if (!handle) {
130              if (encoding) {              if (encoding) {
131                  Tcl_FreeEncoding(encoding);                  Tcl_FreeEncoding(encoding);
132              }              }
133              CloseClipboard();              CloseClipboard();
134              goto error;              goto error;
135          }          }
136          data = GlobalLock(handle);          data = GlobalLock(handle);
137          Tcl_ExternalToUtfDString(encoding, data, -1, &ds);          Tcl_ExternalToUtfDString(encoding, data, -1, &ds);
138          GlobalUnlock(handle);          GlobalUnlock(handle);
139          if (encoding) {          if (encoding) {
140              Tcl_FreeEncoding(encoding);              Tcl_FreeEncoding(encoding);
141          }          }
142    
143      } else {      } else {
144          CloseClipboard();          CloseClipboard();
145          goto error;          goto error;
146      }      }
147    
148      /*      /*
149       * Translate CR/LF to LF.       * Translate CR/LF to LF.
150       */       */
151                    
152      data = destPtr = Tcl_DStringValue(&ds);      data = destPtr = Tcl_DStringValue(&ds);
153      while (*data) {      while (*data) {
154          if (data[0] == '\r' && data[1] == '\n') {          if (data[0] == '\r' && data[1] == '\n') {
155              data++;              data++;
156          } else {          } else {
157              *destPtr++ = *data++;              *destPtr++ = *data++;
158          }          }
159      }      }
160      *destPtr = '\0';      *destPtr = '\0';
161    
162      /*      /*
163       * Pass the data off to the selection procedure.       * Pass the data off to the selection procedure.
164       */       */
165    
166      result = (*proc)(clientData, interp, Tcl_DStringValue(&ds));      result = (*proc)(clientData, interp, Tcl_DStringValue(&ds));
167      Tcl_DStringFree(&ds);      Tcl_DStringFree(&ds);
168      CloseClipboard();      CloseClipboard();
169      return result;      return result;
170            
171  error:  error:
172      Tcl_AppendResult(interp, Tk_GetAtomName(tkwin, selection),      Tcl_AppendResult(interp, Tk_GetAtomName(tkwin, selection),
173              " selection doesn't exist or form \"",              " selection doesn't exist or form \"",
174              Tk_GetAtomName(tkwin, target),              Tk_GetAtomName(tkwin, target),
175              "\" not defined", (char *) NULL);              "\" not defined", (char *) NULL);
176      return TCL_ERROR;      return TCL_ERROR;
177  }  }
178    
179  /*  /*
180   *----------------------------------------------------------------------   *----------------------------------------------------------------------
181   *   *
182   * TkSetSelectionOwner --   * TkSetSelectionOwner --
183   *   *
184   *      This function claims ownership of the specified selection.   *      This function claims ownership of the specified selection.
185   *      If the selection is CLIPBOARD, then we empty the system   *      If the selection is CLIPBOARD, then we empty the system
186   *      clipboard.   *      clipboard.
187   *   *
188   * Results:   * Results:
189   *      None.   *      None.
190   *   *
191   * Side effects:   * Side effects:
192   *      Empties the system clipboard, and claims ownership.   *      Empties the system clipboard, and claims ownership.
193   *   *
194   *----------------------------------------------------------------------   *----------------------------------------------------------------------
195   */   */
196    
197  void  void
198  XSetSelectionOwner(display, selection, owner, time)  XSetSelectionOwner(display, selection, owner, time)
199      Display* display;      Display* display;
200      Atom selection;      Atom selection;
201      Window owner;      Window owner;
202      Time time;      Time time;
203  {  {
204      HWND hwnd = owner ? TkWinGetHWND(owner) : NULL;      HWND hwnd = owner ? TkWinGetHWND(owner) : NULL;
205      Tk_Window tkwin;      Tk_Window tkwin;
206    
207      /*      /*
208       * This is a gross hack because the Tk_InternAtom interface is broken.       * This is a gross hack because the Tk_InternAtom interface is broken.
209       * It expects a Tk_Window, even though it only needs a Tk_Display.       * It expects a Tk_Window, even though it only needs a Tk_Display.
210       */       */
211    
212      tkwin = (Tk_Window) TkGetMainInfoList()->winPtr;      tkwin = (Tk_Window) TkGetMainInfoList()->winPtr;
213    
214      if (selection == Tk_InternAtom(tkwin, "CLIPBOARD")) {      if (selection == Tk_InternAtom(tkwin, "CLIPBOARD")) {
215    
216          /*          /*
217           * Only claim and empty the clipboard if we aren't already the           * Only claim and empty the clipboard if we aren't already the
218           * owner of the clipboard.           * owner of the clipboard.
219           */           */
220    
221          if (GetClipboardOwner() != hwnd) {          if (GetClipboardOwner() != hwnd) {
222              UpdateClipboard(hwnd);              UpdateClipboard(hwnd);
223          }          }
224      }      }
225  }  }
226    
227  /*  /*
228   *----------------------------------------------------------------------   *----------------------------------------------------------------------
229   *   *
230   * TkWinClipboardRender --   * TkWinClipboardRender --
231   *   *
232   *      This function supplies the contents of the clipboard in   *      This function supplies the contents of the clipboard in
233   *      response to a WM_RENDERFORMAT message.   *      response to a WM_RENDERFORMAT message.
234   *   *
235   * Results:   * Results:
236   *      None.   *      None.
237   *   *
238   * Side effects:   * Side effects:
239   *      Sets the contents of the clipboard.   *      Sets the contents of the clipboard.
240   *   *
241   *----------------------------------------------------------------------   *----------------------------------------------------------------------
242   */   */
243    
244  void  void
245  TkWinClipboardRender(dispPtr, format)  TkWinClipboardRender(dispPtr, format)
246      TkDisplay *dispPtr;      TkDisplay *dispPtr;
247      UINT format;      UINT format;
248  {  {
249      TkClipboardTarget *targetPtr;      TkClipboardTarget *targetPtr;
250      TkClipboardBuffer *cbPtr;      TkClipboardBuffer *cbPtr;
251      HGLOBAL handle;      HGLOBAL handle;
252      char *buffer, *p, *rawText, *endPtr;      char *buffer, *p, *rawText, *endPtr;
253      int length;      int length;
254      Tcl_DString ds;      Tcl_DString ds;
255    
256      for (targetPtr = dispPtr->clipTargetPtr; targetPtr != NULL;      for (targetPtr = dispPtr->clipTargetPtr; targetPtr != NULL;
257              targetPtr = targetPtr->nextPtr) {              targetPtr = targetPtr->nextPtr) {
258          if (targetPtr->type == XA_STRING)          if (targetPtr->type == XA_STRING)
259              break;              break;
260      }      }
261    
262      /*      /*
263       * Count the number of newlines so we can add space for them in       * Count the number of newlines so we can add space for them in
264       * the resulting string.       * the resulting string.
265       */       */
266    
267      length = 0;      length = 0;
268      if (targetPtr != NULL) {      if (targetPtr != NULL) {
269          for (cbPtr = targetPtr->firstBufferPtr; cbPtr != NULL;          for (cbPtr = targetPtr->firstBufferPtr; cbPtr != NULL;
270                  cbPtr = cbPtr->nextPtr) {                  cbPtr = cbPtr->nextPtr) {
271              length += cbPtr->length;              length += cbPtr->length;
272              for (p = cbPtr->buffer, endPtr = p + cbPtr->length;              for (p = cbPtr->buffer, endPtr = p + cbPtr->length;
273                      p < endPtr; p++) {                      p < endPtr; p++) {
274                  if (*p == '\n') {                  if (*p == '\n') {
275                      length++;                      length++;
276                  }                  }
277              }              }
278          }          }
279      }      }
280    
281      /*      /*
282       * Copy the data and change EOL characters.       * Copy the data and change EOL characters.
283       */       */
284    
285      buffer = rawText = ckalloc(length + 1);      buffer = rawText = ckalloc(length + 1);
286      if (targetPtr != NULL) {      if (targetPtr != NULL) {
287          for (cbPtr = targetPtr->firstBufferPtr; cbPtr != NULL;          for (cbPtr = targetPtr->firstBufferPtr; cbPtr != NULL;
288                  cbPtr = cbPtr->nextPtr) {                  cbPtr = cbPtr->nextPtr) {
289              for (p = cbPtr->buffer, endPtr = p + cbPtr->length;              for (p = cbPtr->buffer, endPtr = p + cbPtr->length;
290                      p < endPtr; p++) {                      p < endPtr; p++) {
291                  if (*p == '\n') {                  if (*p == '\n') {
292                      *buffer++ = '\r';                      *buffer++ = '\r';
293                  }                  }
294                  *buffer++ = *p;                  *buffer++ = *p;
295              }              }
296          }          }
297      }      }
298      *buffer = '\0';      *buffer = '\0';
299    
300      /*      /*
301       * Depending on the platform, turn the data into Unicode or the       * Depending on the platform, turn the data into Unicode or the
302       * system encoding before placing it on the clipboard.       * system encoding before placing it on the clipboard.
303       */       */
304    
305      if (TkWinGetPlatformId() == VER_PLATFORM_WIN32_NT) {      if (TkWinGetPlatformId() == VER_PLATFORM_WIN32_NT) {
306          Tcl_DStringInit(&ds);          Tcl_DStringInit(&ds);
307          Tcl_UtfToUniCharDString(rawText, -1, &ds);          Tcl_UtfToUniCharDString(rawText, -1, &ds);
308          ckfree(rawText);          ckfree(rawText);
309          handle = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE,          handle = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE,
310                  Tcl_DStringLength(&ds)+2);                  Tcl_DStringLength(&ds)+2);
311          if (!handle) {          if (!handle) {
312              Tcl_DStringFree(&ds);              Tcl_DStringFree(&ds);
313              return;              return;
314          }          }
315          buffer = GlobalLock(handle);          buffer = GlobalLock(handle);
316          memcpy(buffer, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds) + 2);          memcpy(buffer, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds) + 2);
317          GlobalUnlock(handle);          GlobalUnlock(handle);
318          Tcl_DStringFree(&ds);          Tcl_DStringFree(&ds);
319          SetClipboardData(CF_UNICODETEXT, handle);          SetClipboardData(CF_UNICODETEXT, handle);
320      } else {      } else {
321          Tcl_UtfToExternalDString(NULL, rawText, -1, &ds);          Tcl_UtfToExternalDString(NULL, rawText, -1, &ds);
322          ckfree(rawText);          ckfree(rawText);
323          handle = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE,          handle = GlobalAlloc(GMEM_MOVEABLE|GMEM_DDESHARE,
324                  Tcl_DStringLength(&ds)+1);                  Tcl_DStringLength(&ds)+1);
325          if (!handle) {          if (!handle) {
326              Tcl_DStringFree(&ds);              Tcl_DStringFree(&ds);
327              return;              return;
328          }          }
329          buffer = GlobalLock(handle);          buffer = GlobalLock(handle);
330          memcpy(buffer, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds) + 1);          memcpy(buffer, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds) + 1);
331          GlobalUnlock(handle);          GlobalUnlock(handle);
332          Tcl_DStringFree(&ds);          Tcl_DStringFree(&ds);
333          SetClipboardData(CF_TEXT, handle);          SetClipboardData(CF_TEXT, handle);
334      }      }
335    
336      return;      return;
337  }  }
338    
339  /*  /*
340   *----------------------------------------------------------------------   *----------------------------------------------------------------------
341   *   *
342   * TkSelUpdateClipboard --   * TkSelUpdateClipboard --
343   *   *
344   *      This function is called to force the clipboard to be updated   *      This function is called to force the clipboard to be updated
345   *      after new data is added.   *      after new data is added.
346   *   *
347   * Results:   * Results:
348   *      None.   *      None.
349   *   *
350   * Side effects:   * Side effects:
351   *      Clears the current contents of the clipboard.   *      Clears the current contents of the clipboard.
352   *   *
353   *----------------------------------------------------------------------   *----------------------------------------------------------------------
354   */   */
355    
356  void  void
357  TkSelUpdateClipboard(winPtr, targetPtr)  TkSelUpdateClipboard(winPtr, targetPtr)
358      TkWindow *winPtr;      TkWindow *winPtr;
359      TkClipboardTarget *targetPtr;      TkClipboardTarget *targetPtr;
360  {  {
361      HWND hwnd = TkWinGetHWND(winPtr->window);      HWND hwnd = TkWinGetHWND(winPtr->window);
362      UpdateClipboard(hwnd);      UpdateClipboard(hwnd);
363  }  }
364    
365  /*  /*
366   *----------------------------------------------------------------------   *----------------------------------------------------------------------
367   *   *
368   * UpdateClipboard --   * UpdateClipboard --
369   *   *
370   *      Take ownership of the clipboard, clear it, and indicate to the   *      Take ownership of the clipboard, clear it, and indicate to the
371   *      system the supported formats.   *      system the supported formats.
372   *   *
373   * Results:   * Results:
374   *      None.   *      None.
375   *   *
376   * Side effects:   * Side effects:
377   *      None.   *      None.
378   *   *
379   *----------------------------------------------------------------------   *----------------------------------------------------------------------
380   */   */
381    
382  static void  static void
383  UpdateClipboard(hwnd)  UpdateClipboard(hwnd)
384      HWND hwnd;      HWND hwnd;
385  {  {
386      TkWinUpdatingClipboard(TRUE);      TkWinUpdatingClipboard(TRUE);
387      OpenClipboard(hwnd);      OpenClipboard(hwnd);
388      EmptyClipboard();      EmptyClipboard();
389    
390      /*      /*
391       * CF_UNICODETEXT is only supported on NT, but it it is prefered       * CF_UNICODETEXT is only supported on NT, but it it is prefered
392       * when possible.       * when possible.
393       */       */
394    
395      if (TkWinGetPlatformId() == VER_PLATFORM_WIN32_NT) {      if (TkWinGetPlatformId() == VER_PLATFORM_WIN32_NT) {
396          SetClipboardData(CF_UNICODETEXT, NULL);          SetClipboardData(CF_UNICODETEXT, NULL);
397      } else {      } else {
398          SetClipboardData(CF_TEXT, NULL);          SetClipboardData(CF_TEXT, NULL);
399      }      }
400      CloseClipboard();      CloseClipboard();
401      TkWinUpdatingClipboard(FALSE);      TkWinUpdatingClipboard(FALSE);
402  }  }
403    
404  /*  /*
405   *--------------------------------------------------------------   *--------------------------------------------------------------
406   *   *
407   * TkSelEventProc --   * TkSelEventProc --
408   *   *
409   *      This procedure is invoked whenever a selection-related   *      This procedure is invoked whenever a selection-related
410   *      event occurs.   *      event occurs.
411   *   *
412   * Results:   * Results:
413   *      None.   *      None.
414   *   *
415   * Side effects:   * Side effects:
416   *      Lots:  depends on the type of event.   *      Lots:  depends on the type of event.
417   *   *
418   *--------------------------------------------------------------   *--------------------------------------------------------------
419   */   */
420    
421  void  void
422  TkSelEventProc(tkwin, eventPtr)  TkSelEventProc(tkwin, eventPtr)
423      Tk_Window tkwin;            /* Window for which event was      Tk_Window tkwin;            /* Window for which event was
424                                   * targeted. */                                   * targeted. */
425      register XEvent *eventPtr;  /* X event:  either SelectionClear,      register XEvent *eventPtr;  /* X event:  either SelectionClear,
426                                   * SelectionRequest, or                                   * SelectionRequest, or
427                                   * SelectionNotify. */                                   * SelectionNotify. */
428  {  {
429      if (eventPtr->type == SelectionClear) {      if (eventPtr->type == SelectionClear) {
430          TkSelClearSelection(tkwin, eventPtr);          TkSelClearSelection(tkwin, eventPtr);
431      }      }
432  }  }
433    
434  /*  /*
435   *----------------------------------------------------------------------   *----------------------------------------------------------------------
436   *   *
437   * TkSelPropProc --   * TkSelPropProc --
438   *   *
439   *      This procedure is invoked when property-change events   *      This procedure is invoked when property-change events
440   *      occur on windows not known to the toolkit.  This is a stub   *      occur on windows not known to the toolkit.  This is a stub
441   *      function under Windows.   *      function under Windows.
442   *   *
443   * Results:   * Results:
444   *      None.   *      None.
445   *   *
446   * Side effects:   * Side effects:
447   *      None.   *      None.
448   *   *
449   *----------------------------------------------------------------------   *----------------------------------------------------------------------
450   */   */
451    
452  void  void
453  TkSelPropProc(eventPtr)  TkSelPropProc(eventPtr)
454      register XEvent *eventPtr;          /* X PropertyChange event. */      register XEvent *eventPtr;          /* X PropertyChange event. */
455  {  {
456  }  }
457    
458  /* End of tkwinclipboard.c */  /* End of tkwinclipboard.c */

Legend:
Removed from v.69  
changed lines
  Added in v.98

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25