top

Package xwindow defines a window type that provides easy access to common window operations while hiding many of the more obscure X parameters. Examples of such window operations include, but are not limited to, creating a window, mapping a window, moving/resizing a window and getting the geometry of a top-level client window including the window manager's decorations.

New and Generate functions are provided as constructors. New should be used when you already have a window id, and it cannot fail. Generate should be used when you need to allocate a new window identifier. Since allocating a new window identifier can fail, an error could be returned.

Note that methods starting with 'WM' should only be used with a window manager running that supports the EWMH specification. You should otherwise try to use the corresponding methods without the 'WM' prefix.

A quick example

To create a window with a blue background that is 500 pixels wide and 200 pixels tall and map the window, use something like:

win, err := xwindow.Generate(X)
if err != nil {
	log.Fatal(err)
}
win.Create(X.RootWin(), 0, 0, 500, 200, xproto.CwBackPixel, 0x0000ff)
win.Map()

You may also want to use CreateChecked instead of Create if you want to see if there was an error when creating a window.

More examples

The xwindow package is used in many of the examples in the examples directory of the xgbutil package. Of particular interest is window-name-sizes, which prints the name and size of each top-level client window. (The geometry of the window is found using DecorGeometry.)

Imported by 246 package(s)

  1. code.google.com/p/ncabatoff/vlib
  2. dasa.cc/run/prompt
  3. github.com/AmandaCameron/go.wde/xgb
  4. github.com/AmandaCameron/gobar
  5. github.com/AmandaCameron/gobar/commandtray
  6. github.com/AmandaCameron/gobar/statbar
  7. github.com/AmandaCameron/gobar/utils/startup
  8. github.com/AmandaCameron/gobar/utils/system-tray
  9. github.com/AmandaCameron/gobar/utils/system-tray/tests
  10. github.com/AmandaCameron/gobar/utils/xembed
  11. github.com/AmandaCameron/wingo
  12. github.com/AmandaCameron/wingo/focus
  13. github.com/AmandaCameron/wingo/frame
  14. github.com/AmandaCameron/wingo/heads
  15. github.com/AmandaCameron/wingo/prompt
  16. github.com/AmandaCameron/wingo/stack
  17. github.com/AmandaCameron/wingo/text
  18. github.com/AmandaCameron/wingo/wm
  19. github.com/AmandaCameron/wingo/workspace
  20. github.com/AmandaCameron/wingo/xclient
  21. github.com/Arrow/display
  22. github.com/Arrow/vgximg
  23. github.com/BurntSushi/imgv
  24. github.com/BurntSushi/wingo
  25. github.com/BurntSushi/wingo/focus
  26. github.com/BurntSushi/wingo/frame
  27. github.com/BurntSushi/wingo/heads
  28. github.com/BurntSushi/wingo/prompt
  29. github.com/BurntSushi/wingo/prompt/examples/cycle
  30. github.com/BurntSushi/wingo/prompt/examples/input
  31. github.com/BurntSushi/wingo/prompt/examples/message
  32. github.com/BurntSushi/wingo/prompt/examples/select
  33. github.com/BurntSushi/wingo/stack
  34. github.com/BurntSushi/wingo/text
  35. github.com/BurntSushi/wingo/text/examples/input
  36. github.com/BurntSushi/wingo/wm
  37. github.com/BurntSushi/wingo/workspace
  38. github.com/BurntSushi/wingo/xclient
  39. github.com/BurntSushi/xgbutil/xgraphics
  40. github.com/FredFoonly/gobar
  41. github.com/FredFoonly/wingo
  42. github.com/FredFoonly/wingo/focus
  43. github.com/FredFoonly/wingo/frame
  44. github.com/FredFoonly/wingo/heads
  45. github.com/FredFoonly/wingo/prompt
  46. github.com/FredFoonly/wingo/stack
  47. github.com/FredFoonly/wingo/text
  48. github.com/FredFoonly/wingo/wm
  49. github.com/FredFoonly/wingo/workspace
  50. github.com/FredFoonly/wingo/xclient
  51. github.com/Iceyer/dde-daemon/dock
  52. github.com/Iceyer/dde-daemon/grub2
  53. github.com/Iceyer/dde-daemon/power
  54. github.com/JonathanLogan/xgbutil/xgraphics
  55. github.com/KaptajnKold/antwar
  56. github.com/KarateCode/go.wde/xgb
  57. github.com/KenjiTakahashi/gobar
  58. github.com/Pursuit92/wingo
  59. github.com/Pursuit92/wingo/focus
  60. github.com/Pursuit92/wingo/frame
  61. github.com/Pursuit92/wingo/heads
  62. github.com/Pursuit92/wingo/prompt
  63. github.com/Pursuit92/wingo/stack
  64. github.com/Pursuit92/wingo/text
  65. github.com/Pursuit92/wingo/wm
  66. github.com/Pursuit92/wingo/workspace
  67. github.com/Pursuit92/wingo/xclient
  68. github.com/Zwobot/go.wde/xgb
  69. github.com/a1305315624/go.wde/xgb
  70. github.com/aarzilli/xgbutil/xgraphics
  71. github.com/addtheice/DataVisual
  72. github.com/alexanderkyte/wingo
  73. github.com/alexanderkyte/wingo/focus
  74. github.com/alexanderkyte/wingo/frame
  75. github.com/alexanderkyte/wingo/heads
  76. github.com/alexanderkyte/wingo/prompt
  77. github.com/alexanderkyte/wingo/stack
  78. github.com/alexanderkyte/wingo/text
  79. github.com/alexanderkyte/wingo/wm
  80. github.com/alexanderkyte/wingo/workspace
  81. github.com/alexanderkyte/wingo/xclient
  82. github.com/andrebq/go.wde/xgb
  83. github.com/auroralaboratories/corona-api/modules/session
  84. github.com/bmatsuo/dockapp-go/dockapp
  85. github.com/boomshroom/go.wde/xgb
  86. github.com/cabrel/xfcm
  87. github.com/cespare/carlisle
  88. github.com/cnitfarmer/go.wde/xgb
  89. github.com/codechapin/go.wde/xgb
  90. github.com/cookieo9/go.wde/xgb
  91. github.com/cshapeshifter/wingo
  92. github.com/cshapeshifter/wingo/focus
  93. github.com/cshapeshifter/wingo/frame
  94. github.com/cshapeshifter/wingo/heads
  95. github.com/cshapeshifter/wingo/prompt
  96. github.com/cshapeshifter/wingo/stack
  97. github.com/cshapeshifter/wingo/text
  98. github.com/cshapeshifter/wingo/wm
  99. github.com/cshapeshifter/wingo/workspace
  100. github.com/cshapeshifter/wingo/xclient
  101. github.com/ctlod/go.wde/xgb
  102. github.com/darthlukan/go.wde/xgb
  103. github.com/darthlukan/gopanel
  104. github.com/darthlukan/wingo-menu
  105. github.com/dim13/wingo
  106. github.com/dim13/wingo/focus
  107. github.com/dim13/wingo/frame
  108. github.com/dim13/wingo/heads
  109. github.com/dim13/wingo/prompt
  110. github.com/dim13/wingo/stack
  111. github.com/dim13/wingo/text
  112. github.com/dim13/wingo/wm
  113. github.com/dim13/wingo/workspace
  114. github.com/dim13/wingo/xclient
  115. github.com/distatus/gobar
  116. github.com/dlintw/wingo
  117. github.com/dlintw/wingo/focus
  118. github.com/dlintw/wingo/frame
  119. github.com/dlintw/wingo/heads
  120. github.com/dlintw/wingo/prompt
  121. github.com/dlintw/wingo/stack
  122. github.com/dlintw/wingo/text
  123. github.com/dlintw/wingo/wingo-cmd
  124. github.com/droundy/xgbutil/tests
  125. github.com/droundy/xgbutil/xgraphics
  126. github.com/errnoh/go.wde/xgb
  127. github.com/fangyuanziti/wayland-html
  128. github.com/fangyuanziti/xgbutil/xgraphics
  129. github.com/floren/wingo
  130. github.com/floren/wingo/focus
  131. github.com/floren/wingo/frame
  132. github.com/floren/wingo/heads
  133. github.com/floren/wingo/prompt
  134. github.com/floren/wingo/stack
  135. github.com/floren/wingo/text
  136. github.com/floren/wingo/wm
  137. github.com/floren/wingo/workspace
  138. github.com/floren/wingo/xclient
  139. github.com/grd/go.wde/xgb
  140. github.com/guelfey/go.wde/xgb
  141. github.com/henkman/go.wde/xgb
  142. github.com/iand/go.wde/xgb
  143. github.com/istdev/x11ui
  144. github.com/justjake/j3
  145. github.com/justjake/j3/ui
  146. github.com/justjake/j3/wm
  147. github.com/kalkin/wingo
  148. github.com/kalkin/wingo/focus
  149. github.com/kalkin/wingo/frame
  150. github.com/kalkin/wingo/heads
  151. github.com/kalkin/wingo/prompt
  152. github.com/kalkin/wingo/stack
  153. github.com/kalkin/wingo/text
  154. github.com/kalkin/wingo/wm
  155. github.com/kalkin/wingo/workspace
  156. github.com/kalkin/wingo/xclient
  157. github.com/kirillDanshin/go-wde/xgb
  158. github.com/lex148/xgbutil/xgraphics
  159. github.com/linuxdeepin/dde-daemon/dock
  160. github.com/linuxdeepin/dde-daemon/grub2
  161. github.com/linuxdeepin/dde-daemon/session/power
  162. github.com/linuxdeepin/dde-daemon/trayicon
  163. github.com/llgcode/go.wde/xgb
  164. github.com/mibitzi/stwm/xclient
  165. github.com/mibitzi/stwm/xgb
  166. github.com/mistree/go.wde/xgb
  167. github.com/mpnordland/mirror-go
  168. github.com/nickoneill/go.wde/xgb
  169. github.com/onodera-punpun/sponewm
  170. github.com/onodera-punpun/sponewm/focus
  171. github.com/onodera-punpun/sponewm/frame
  172. github.com/onodera-punpun/sponewm/heads
  173. github.com/onodera-punpun/sponewm/stack
  174. github.com/onodera-punpun/sponewm/wm
  175. github.com/onodera-punpun/sponewm/workspace
  176. github.com/onodera-punpun/sponewm/xclient
  177. github.com/papplampe/go.wde/xgb
  178. github.com/pascience/foci
  179. github.com/pascience/foci/focus
  180. github.com/pascience/foci/frame
  181. github.com/pascience/foci/heads
  182. github.com/pascience/foci/prompt
  183. github.com/pascience/foci/stack
  184. github.com/pascience/foci/text
  185. github.com/pascience/foci/wm
  186. github.com/pascience/foci/workspace
  187. github.com/pascience/foci/xclient
  188. github.com/pascience/wingo/focus
  189. github.com/pascience/wingo/frame
  190. github.com/pascience/wingo/heads
  191. github.com/pascience/wingo/prompt
  192. github.com/pascience/wingo/stack
  193. github.com/pascience/wingo/text
  194. github.com/pascience/wingo/wm
  195. github.com/pascience/wingo/workspace
  196. github.com/pascience/wingo/xclient
  197. github.com/pointlander/csm
  198. github.com/remogatto/egles/examples/es2/xorg
  199. github.com/reusee/yokan
  200. github.com/ricochet2200/go.wde/xgb
  201. github.com/sebastianskejoe/go.wde/xgb
  202. github.com/siebenmann/ffox-remote
  203. github.com/sinni800/go.wde/xgb
  204. github.com/skelterjohn/go.wde/xgb
  205. github.com/sqweek/go.wde/xgb
  206. github.com/stanim/display
  207. github.com/stanim/vgximg
  208. github.com/taruti/go.wde/xgb
  209. github.com/thesyncim/go.wde/xgb
  210. github.com/tv42/quobar
  211. github.com/uriel/vimg
  212. github.com/varialus/gobar
  213. github.com/varialus/gobar/commandtray
  214. github.com/varialus/gobar/statbar
  215. github.com/varialus/wingo
  216. github.com/varialus/wingo/focus
  217. github.com/varialus/wingo/frame
  218. github.com/varialus/wingo/heads
  219. github.com/varialus/wingo/prompt
  220. github.com/varialus/wingo/stack
  221. github.com/varialus/wingo/text
  222. github.com/varialus/wingo/wm
  223. github.com/varialus/wingo/workspace
  224. github.com/varialus/wingo/xclient
  225. github.com/whyrusleeping/go.wde/xgb
  226. github.com/wiless/x11ui
  227. github.com/xsrc/wingo/focus
  228. github.com/xsrc/wingo/frame
  229. github.com/xsrc/wingo/heads
  230. github.com/xsrc/wingo/prompt
  231. github.com/xsrc/wingo/stack
  232. github.com/xsrc/wingo/text
  233. github.com/xsrc/wingo/wm
  234. github.com/xsrc/wingo/workspace
  235. github.com/xsrc/wingo/xclient
  236. github.com/xthexder/superhexagon
  237. github.com/yannicklm/wingo
  238. github.com/yannicklm/wingo/focus
  239. github.com/yannicklm/wingo/frame
  240. github.com/yannicklm/wingo/heads
  241. github.com/yannicklm/wingo/prompt
  242. github.com/yannicklm/wingo/stack
  243. github.com/yannicklm/wingo/text
  244. github.com/yannicklm/wingo/wm
  245. github.com/yannicklm/wingo/workspace
  246. github.com/yannicklm/wingo/xclient

Imports 8 package(s)

  1. github.com/BurntSushi/xgbutil/ewmh
  2. github.com/BurntSushi/xgb/xproto
  3. github.com/BurntSushi/xgbutil/xrect
  4. github.com/BurntSushi/xgbutil/icccm
  5. github.com/BurntSushi/xgbutil/keybind
  6. github.com/BurntSushi/xgbutil
  7. github.com/BurntSushi/xgbutil/xevent
  8. github.com/BurntSushi/xgbutil/mousebind