…lines 1–497 unchanged (497 lines)
498 /* lua has to make sure this surface gets destroyed */
499 lua_pushlightuserdata(L, cairo_surface_reference(globalconf.wallpaper));
500 return 1;
501}
502
503
504/** Get the content of the root window as a cairo surface
505 *
506 * @return A cairo surface
507 * @staticfct content
508 */
509static int
510luaA_root_get_content(lua_State *L)
511{
512
513 cairo_surface_t *surface;
514 int width = globalconf.screen->width_in_pixels;
515 int height = globalconf.screen->height_in_pixels;
516
517 surface = cairo_xcb_surface_create(globalconf.connection,
518 globalconf.screen->root,
519 globalconf.default_visual,
520 width, height);
521
522 lua_pushlightuserdata(L, surface);
523 return 1;
524
525}
526
527
528/** Get the size of the root window.
529 *
530 * @return Width of the root window.
531 * @return height of the root window.
…lines 532–629 unchanged (98 lines)
630 { "_buttons", luaA_root_buttons },
631 { "_keys", luaA_root_keys },
632 { "cursor", luaA_root_cursor },
633 { "fake_input", luaA_root_fake_input },
634 { "drawins", luaA_root_drawins },
635 { "_wallpaper", luaA_root_wallpaper },
636 { "content", luaA_root_get_content},
637 { "size", luaA_root_size },
638 { "size_mm", luaA_root_size_mm },
639 { "tags", luaA_root_tags },
640 { "__index", luaA_root_index },
641 { "__newindex", luaA_root_newindex },
642 { "set_index_miss_handler", luaA_root_set_index_miss_handler},
…lines 643–655 unchanged (13 lines)