gdkx.pp 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. {
  2. $Id$
  3. }
  4. {****************************************************************************
  5. Interface
  6. ****************************************************************************}
  7. {$ifdef read_interface}
  8. {$ifndef gtkwin}
  9. {$ifndef gtkos2}
  10. function GDK_GET_ROOT_WINDOW : PGdkWindow;
  11. function GDK_GET_ROOT_PARENT : PGdkWindow;
  12. function GDK_GET_XDISPLAY : PDisplay;
  13. function GDK_WINDOW_XDISPLAY(win : PGdkWindowPrivate) : PDisplay;
  14. function GDK_WINDOW_XWINDOW(win : PGdkWindowPrivate) : Twindow;
  15. function GDK_IMAGE_XDISPLAY(image : PGdkImagePrivate) : PDisplay;
  16. function GDK_IMAGE_XIMAGE(image : PGdkImagePrivate) : PXImage;
  17. function GDK_GC_XDISPLAY(gc : PGdkGCPrivate) : PDisplay;
  18. function GDK_GC_XGC(gc : PGdkGCPrivate) : TGC;
  19. function GDK_COLORMAP_XDISPLAY(cmap : PGdkColorMapPrivate) : PDisplay;
  20. function GDK_COLORMAP_XCOLORMAP(cmap : PGdkColorMapPrivate) : TColorMap;
  21. function GDK_VISUAL_XVISUAL(vis : PGdkVisualPrivate) : PVisual;
  22. function GDK_FONT_XDISPLAY(font : PGdkFontPrivate) : PDisplay;
  23. function GDK_FONT_XFONT(font : PGdkFontPrivate) : gpointer;
  24. function gdkx_visual_get(xvisualid:TVisualID):PGdkVisual;cdecl;external gdkdll name 'gdkx_visual_get';
  25. function gdkx_colormap_get(xcolormap:TColormap):PGdkColormap;cdecl;external gdkdll name 'gdkx_colormap_get';
  26. function gdk_get_client_window(dpy:pDisplay; win:TWindow):TWindow;cdecl;external gdkdll name 'gdk_get_client_window';
  27. {$endif}
  28. {$endif}
  29. {$ifndef gtkos2}
  30. function gdk_pixmap_foreign_new(anid:guint32):PGdkPixmap;cdecl;external gdkdll name 'gdk_pixmap_foreign_new';
  31. function gdk_window_foreign_new(anid:guint32):PGdkWindow;cdecl;external gdkdll name 'gdk_window_foreign_new';
  32. {$endif}
  33. {$endif read_interface}
  34. {****************************************************************************
  35. Implementation
  36. ****************************************************************************}
  37. {$ifdef read_implementation}
  38. {$ifndef gtkwin}
  39. {$ifndef gtkos2}
  40. function GDK_GET_ROOT_WINDOW : PGdkWindow;
  41. begin
  42. GDK_GET_ROOT_WINDOW:=PGdkwindow(gdk_root_window);
  43. end;
  44. function GDK_GET_ROOT_PARENT : PGdkWindow;
  45. begin
  46. GDK_GET_ROOT_PARENT:=PGdkWindow(@(gdk_root_parent));
  47. end;
  48. function GDK_GET_XDISPLAY : PDisplay;
  49. begin
  50. GDK_GET_XDISPLAY:=gdk_display;
  51. end;
  52. function GDK_WINDOW_XDISPLAY(win : PGdkWindowPrivate) : PDisplay;
  53. begin
  54. GDK_WINDOW_XDISPLAY:=(PGdkWindowPrivate(win))^.xdisplay;
  55. end;
  56. function GDK_WINDOW_XWINDOW(win : PGdkWindowPrivate) : Twindow;
  57. begin
  58. GDK_WINDOW_XWINDOW:=(PGdkWindowPrivate(win))^.xwindow;
  59. end;
  60. function GDK_IMAGE_XDISPLAY(image : PGdkImagePrivate) : PDisplay;
  61. begin
  62. GDK_IMAGE_XDISPLAY:=(PGdkImagePrivate(image))^.xdisplay;
  63. end;
  64. function GDK_IMAGE_XIMAGE(image : PGdkImagePrivate) : PXImage;
  65. begin
  66. GDK_IMAGE_XIMAGE:=(PGdkImagePrivate(image))^.ximage;
  67. end;
  68. function GDK_GC_XDISPLAY(gc : PGdkGCPrivate) : PDisplay;
  69. begin
  70. GDK_GC_XDISPLAY:=(PGdkGCPrivate(gc))^.xdisplay;
  71. end;
  72. function GDK_GC_XGC(gc : PGdkGCPrivate) : TGC;
  73. begin
  74. GDK_GC_XGC:=(PGdkGCPrivate(gc))^.xgc;
  75. end;
  76. function GDK_COLORMAP_XDISPLAY(cmap : PGdkColorMapPrivate) : PDisplay;
  77. begin
  78. GDK_COLORMAP_XDISPLAY:=(PGdkColormapPrivate(cmap))^.xdisplay;
  79. end;
  80. function GDK_COLORMAP_XCOLORMAP(cmap : PGdkColorMapPrivate) : TColorMap;
  81. begin
  82. GDK_COLORMAP_XCOLORMAP:=(PGdkColormapPrivate(cmap))^.xcolormap;
  83. end;
  84. function GDK_VISUAL_XVISUAL(vis : PGdkVisualPrivate) : PVisual;
  85. begin
  86. GDK_VISUAL_XVISUAL:=(PGdkVisualPrivate(vis))^.xvisual;
  87. end;
  88. function GDK_FONT_XDISPLAY(font : PGdkFontPrivate) : PDisplay;
  89. begin
  90. GDK_FONT_XDISPLAY:=(PGdkFontPrivate(font))^.xdisplay;
  91. end;
  92. function GDK_FONT_XFONT(font : PGdkFontPrivate) : gpointer;
  93. begin
  94. GDK_FONT_XFONT:=(PGdkFontPrivate(font))^.xfont;
  95. end;
  96. {$endif}
  97. {$endif}
  98. {$endif read_implementation}
  99. {
  100. $Log$
  101. Revision 1.4 2003-08-06 07:28:21 michael
  102. + Patch from Marc Weustinck to fix Win32 version
  103. Revision 1.3 2003/03/02 02:08:50 hajny
  104. + OS/2 support for GTK and X11 added by Yuri
  105. Revision 1.2 2002/09/07 15:42:58 peter
  106. * old logs removed and tabs fixed
  107. Revision 1.1 2002/01/29 17:55:08 peter
  108. * splitted to base and extra
  109. }