icon.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: icon.h /main/3 1995/10/27 10:39:18 rswiston $ */
  24. /*****************************************************************************
  25. *****************************************************************************
  26. **
  27. ** File: icon.h
  28. **
  29. ** Description: Header for icon handling portion of CDE Drag & Drop Demo.
  30. **
  31. ** (c) Copyright 1993, 1994 Hewlett-Packard Company
  32. ** (c) Copyright 1993, 1994 International Business Machines Corp.
  33. ** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  34. ** (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
  35. ** Novell, Inc.
  36. **
  37. ****************************************************************************
  38. ************************************<+>*************************************/
  39. #include <sys/param.h>
  40. #include <stdio.h>
  41. /*
  42. * Icon Information Structure
  43. */
  44. typedef struct _IconInfo {
  45. XRectangle icon;
  46. char *name;
  47. void *data;
  48. int dataCount;
  49. Pixmap bitmap;
  50. Pixmap mask;
  51. Widget dragIcon;
  52. int type;
  53. struct _IconInfo *next;
  54. struct _IconInfo *prev;
  55. } IconInfo;
  56. /*
  57. * Icon Typedefs
  58. */
  59. typedef enum {
  60. IconBitmap,
  61. IconMask
  62. } IconBitmapPart;
  63. typedef enum {
  64. IconByFile,
  65. IconByData,
  66. IconByType
  67. } IconTyping;
  68. /*
  69. * Public Icon Handling Function Declarations
  70. */
  71. void IconCreateDouble(Widget, IconInfo*, int, int, IconInfo*,
  72. short, short);
  73. void IconDelete(Widget, IconInfo*);
  74. void IconDraw(Widget, IconInfo*);
  75. void IconInitialize(Widget, IconInfo*, short, short, void*, int,
  76. char*, IconTyping);
  77. IconInfo *IconNew();