gdkx.pp 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. function gdk_pixmap_foreign_new(anid:guint32):PGdkPixmap;cdecl;external gdkdll name 'gdk_pixmap_foreign_new';
  28. function gdk_window_foreign_new(anid:guint32):PGdkWindow;cdecl;external gdkdll name 'gdk_window_foreign_new';
  29. {$endif}
  30. {$endif}
  31. {$endif read_interface}
  32. {****************************************************************************
  33. Implementation
  34. ****************************************************************************}
  35. {$ifdef read_implementation}
  36. {$ifndef gtkwin}
  37. {$ifndef gtkos2}
  38. function GDK_GET_ROOT_WINDOW : PGdkWindow;
  39. begin
  40. GDK_GET_ROOT_WINDOW:=PGdkwindow(gdk_root_window);
  41. end;
  42. function GDK_GET_ROOT_PARENT : PGdkWindow;
  43. begin
  44. GDK_GET_ROOT_PARENT:=PGdkWindow(@(gdk_root_parent));
  45. end;
  46. function GDK_GET_XDISPLAY : PDisplay;
  47. begin
  48. GDK_GET_XDISPLAY:=gdk_display;
  49. end;
  50. function GDK_WINDOW_XDISPLAY(win : PGdkWindowPrivate) : PDisplay;
  51. begin
  52. GDK_WINDOW_XDISPLAY:=(PGdkWindowPrivate(win))^.xdisplay;
  53. end;
  54. function GDK_WINDOW_XWINDOW(win : PGdkWindowPrivate) : Twindow;
  55. begin
  56. GDK_WINDOW_XWINDOW:=(PGdkWindowPrivate(win))^.xwindow;
  57. end;
  58. function GDK_IMAGE_XDISPLAY(image : PGdkImagePrivate) : PDisplay;
  59. begin
  60. GDK_IMAGE_XDISPLAY:=(PGdkImagePrivate(image))^.xdisplay;
  61. end;
  62. function GDK_IMAGE_XIMAGE(image : PGdkImagePrivate) : PXImage;
  63. begin
  64. GDK_IMAGE_XIMAGE:=(PGdkImagePrivate(image))^.ximage;
  65. end;
  66. function GDK_GC_XDISPLAY(gc : PGdkGCPrivate) : PDisplay;
  67. begin
  68. GDK_GC_XDISPLAY:=(PGdkGCPrivate(gc))^.xdisplay;
  69. end;
  70. function GDK_GC_XGC(gc : PGdkGCPrivate) : TGC;
  71. begin
  72. GDK_GC_XGC:=(PGdkGCPrivate(gc))^.xgc;
  73. end;
  74. function GDK_COLORMAP_XDISPLAY(cmap : PGdkColorMapPrivate) : PDisplay;
  75. begin
  76. GDK_COLORMAP_XDISPLAY:=(PGdkColormapPrivate(cmap))^.xdisplay;
  77. end;
  78. function GDK_COLORMAP_XCOLORMAP(cmap : PGdkColorMapPrivate) : TColorMap;
  79. begin
  80. GDK_COLORMAP_XCOLORMAP:=(PGdkColormapPrivate(cmap))^.xcolormap;
  81. end;
  82. function GDK_VISUAL_XVISUAL(vis : PGdkVisualPrivate) : PVisual;
  83. begin
  84. GDK_VISUAL_XVISUAL:=(PGdkVisualPrivate(vis))^.xvisual;
  85. end;
  86. function GDK_FONT_XDISPLAY(font : PGdkFontPrivate) : PDisplay;
  87. begin
  88. GDK_FONT_XDISPLAY:=(PGdkFontPrivate(font))^.xdisplay;
  89. end;
  90. function GDK_FONT_XFONT(font : PGdkFontPrivate) : gpointer;
  91. begin
  92. GDK_FONT_XFONT:=(PGdkFontPrivate(font))^.xfont;
  93. end;
  94. {$endif}
  95. {$endif}
  96. {$endif read_implementation}
  97. {
  98. $Log$
  99. Revision 1.3 2003-03-02 02:08:50 hajny
  100. + OS/2 support for GTK and X11 added by Yuri
  101. Revision 1.2 2002/09/07 15:42:58 peter
  102. * old logs removed and tabs fixed
  103. Revision 1.1 2002/01/29 17:55:08 peter
  104. * splitted to base and extra
  105. }