gdkx.pp 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. {
  2. }
  3. {****************************************************************************
  4. Interface
  5. ****************************************************************************}
  6. {$ifdef read_interface}
  7. {$ifndef gtkwin}
  8. {$ifndef gtkos2}
  9. function GDK_GET_ROOT_WINDOW : PGdkWindow;
  10. function GDK_GET_ROOT_PARENT : PGdkWindow;
  11. function GDK_GET_XDISPLAY : PDisplay;
  12. function GDK_WINDOW_XDISPLAY(win : PGdkWindowPrivate) : PDisplay;
  13. function GDK_WINDOW_XWINDOW(win : PGdkWindowPrivate) : Twindow;
  14. function GDK_IMAGE_XDISPLAY(image : PGdkImagePrivate) : PDisplay;
  15. function GDK_IMAGE_XIMAGE(image : PGdkImagePrivate) : PXImage;
  16. function GDK_GC_XDISPLAY(gc : PGdkGCPrivate) : PDisplay;
  17. function GDK_GC_XGC(gc : PGdkGCPrivate) : TGC;
  18. function GDK_COLORMAP_XDISPLAY(cmap : PGdkColorMapPrivate) : PDisplay;
  19. function GDK_COLORMAP_XCOLORMAP(cmap : PGdkColorMapPrivate) : TColorMap;
  20. function GDK_VISUAL_XVISUAL(vis : PGdkVisualPrivate) : PVisual;
  21. function GDK_FONT_XDISPLAY(font : PGdkFontPrivate) : PDisplay;
  22. function GDK_FONT_XFONT(font : PGdkFontPrivate) : gpointer;
  23. function gdkx_visual_get(xvisualid:TVisualID):PGdkVisual;cdecl;external gdkdll name 'gdkx_visual_get';
  24. function gdkx_colormap_get(xcolormap:TColormap):PGdkColormap;cdecl;external gdkdll name 'gdkx_colormap_get';
  25. {$ifndef gtkdarwin}
  26. function gdk_get_client_window(dpy:pDisplay; win:TWindow):TWindow;cdecl;external gdkdll name 'gdk_get_client_window';
  27. {$endif not gtkdarwin}
  28. {$endif}
  29. {$endif}
  30. {$ifndef gtkos2}
  31. function gdk_pixmap_foreign_new(anid:guint32):PGdkPixmap;cdecl;external gdkdll name 'gdk_pixmap_foreign_new';
  32. function gdk_window_foreign_new(anid:guint32):PGdkWindow;cdecl;external gdkdll name 'gdk_window_foreign_new';
  33. {$endif}
  34. {$endif read_interface}
  35. {****************************************************************************
  36. Implementation
  37. ****************************************************************************}
  38. {$ifdef read_implementation}
  39. {$ifndef gtkwin}
  40. {$ifndef gtkos2}
  41. function GDK_GET_ROOT_WINDOW : PGdkWindow;
  42. begin
  43. GDK_GET_ROOT_WINDOW:=PGdkwindow(PtrInt(gdk_root_window));
  44. end;
  45. function GDK_GET_ROOT_PARENT : PGdkWindow;
  46. begin
  47. GDK_GET_ROOT_PARENT:=PGdkWindow(@(gdk_root_parent));
  48. end;
  49. function GDK_GET_XDISPLAY : PDisplay;
  50. begin
  51. GDK_GET_XDISPLAY:=gdk_display;
  52. end;
  53. function GDK_WINDOW_XDISPLAY(win : PGdkWindowPrivate) : PDisplay;
  54. begin
  55. GDK_WINDOW_XDISPLAY:=(PGdkWindowPrivate(win))^.xdisplay;
  56. end;
  57. function GDK_WINDOW_XWINDOW(win : PGdkWindowPrivate) : Twindow;
  58. begin
  59. GDK_WINDOW_XWINDOW:=(PGdkWindowPrivate(win))^.xwindow;
  60. end;
  61. function GDK_IMAGE_XDISPLAY(image : PGdkImagePrivate) : PDisplay;
  62. begin
  63. GDK_IMAGE_XDISPLAY:=(PGdkImagePrivate(image))^.xdisplay;
  64. end;
  65. function GDK_IMAGE_XIMAGE(image : PGdkImagePrivate) : PXImage;
  66. begin
  67. GDK_IMAGE_XIMAGE:=(PGdkImagePrivate(image))^.ximage;
  68. end;
  69. function GDK_GC_XDISPLAY(gc : PGdkGCPrivate) : PDisplay;
  70. begin
  71. GDK_GC_XDISPLAY:=(PGdkGCPrivate(gc))^.xdisplay;
  72. end;
  73. function GDK_GC_XGC(gc : PGdkGCPrivate) : TGC;
  74. begin
  75. GDK_GC_XGC:=(PGdkGCPrivate(gc))^.xgc;
  76. end;
  77. function GDK_COLORMAP_XDISPLAY(cmap : PGdkColorMapPrivate) : PDisplay;
  78. begin
  79. GDK_COLORMAP_XDISPLAY:=(PGdkColormapPrivate(cmap))^.xdisplay;
  80. end;
  81. function GDK_COLORMAP_XCOLORMAP(cmap : PGdkColorMapPrivate) : TColorMap;
  82. begin
  83. GDK_COLORMAP_XCOLORMAP:=(PGdkColormapPrivate(cmap))^.xcolormap;
  84. end;
  85. function GDK_VISUAL_XVISUAL(vis : PGdkVisualPrivate) : PVisual;
  86. begin
  87. GDK_VISUAL_XVISUAL:=(PGdkVisualPrivate(vis))^.xvisual;
  88. end;
  89. function GDK_FONT_XDISPLAY(font : PGdkFontPrivate) : PDisplay;
  90. begin
  91. GDK_FONT_XDISPLAY:=(PGdkFontPrivate(font))^.xdisplay;
  92. end;
  93. function GDK_FONT_XFONT(font : PGdkFontPrivate) : gpointer;
  94. begin
  95. GDK_FONT_XFONT:=(PGdkFontPrivate(font))^.xfont;
  96. end;
  97. {$endif}
  98. {$endif}
  99. {$endif read_implementation}