gdkx.pp 4.4 KB

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