Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–495 unchanged (495 lines)
496 return 0;
497
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/** Get the size of the root window.
504 *
505 * @return Width of the root window.
506 * @return height of the root window.
507 * @staticfct size
508 */
…lines 509–604 unchanged (96 lines)
605 { "_buttons", luaA_root_buttons },
606 { "_keys", luaA_root_keys },
607 { "cursor", luaA_root_cursor },
608 { "fake_input", luaA_root_fake_input },
609 { "drawins", luaA_root_drawins },
610 { "_wallpaper", luaA_root_wallpaper },
611 { "size", luaA_root_size },
612 { "size_mm", luaA_root_size_mm },
613 { "tags", luaA_root_tags },
614 { "__index", luaA_root_index },
615 { "__newindex", luaA_root_newindex },
616 { "set_index_miss_handler", luaA_root_set_index_miss_handler},
617 { "set_call_handler", luaA_root_set_call_handler},
…lines 618–629 unchanged (12 lines)

After

…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)

Before

translation_unit
comment "/*\n * root.c - root window management\n *\n * Copyright © 2008"...
comment "/** awesome root window API.\n * @author Julien Danjou <ju"...
preproc_include
#include "#include"
string_literal
" "\""
string_content "globalconf.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "common/atoms.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "common/xcursor.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "common/xutil.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "objects/button.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "common/luaclass.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "xwindow.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "math.h"
" "\""
preproc_include
#include "#include"
system_lib_string "<xcb/xtest.h>"
preproc_include
#include "#include"
system_lib_string "<xcb/xcb_aux.h>"
preproc_include
#include "#include"
system_lib_string "<cairo-xcb.h>"
declaration
storage_class_specifier
static "static"
primitive_type "int"
init_declarator
identifier "miss_index_handler"
= "="
identifier "LUA_REFNIL"
; ";"
declaration
storage_class_specifier
static "static"
primitive_type "int"
init_declarator
identifier "miss_newindex_handler"
= "="
identifier "LUA_REFNIL"
; ";"
declaration
storage_class_specifier
static "static"
primitive_type "int"
init_declarator
identifier "miss_call_handler"
= "="
identifier "LUA_REFNIL"
; ";"
function_definition (+243 nodes collapsed)
function_definition (+430 nodes collapsed)
function_definition (+357 nodes collapsed)
function_definition (+83 nodes collapsed)
comment "/** Send fake keyboard or mouse events.\n *\n * Usually the cu"...
function_definition (+453 nodes collapsed)
comment "/** Get or set global key bindings.\n * These bindings will b"...
function_definition (+261 nodes collapsed)
comment "/**\n * Store the list of mouse buttons to be applied on the "...
function_definition (+227 nodes collapsed)
comment "/** Set the root cursor\n *\n * The possible values are:\n *\n *"...
function_definition (+123 nodes collapsed)
comment "/** Get the drawins attached to a screen.\n *\n * @return A ta"...
function_definition (+102 nodes collapsed)
comment "/** Get the wallpaper as a cairo surface or set it as a cair"...
function_definition (+135 nodes collapsed)
comment "/** Get the size of the root window.\n *\n * @return Width of "...
function_definition (+53 nodes collapsed)
comment "/** Get the physical size of the root window, in millimeter."...
function_definition (+53 nodes collapsed)
comment "/** Get the attached tags.\n * @return A table with all tags."...
function_definition (+102 nodes collapsed)
comment "/**\n* Add a custom call handler.\n*/"
function_definition (+32 nodes collapsed)
comment "/**\n* Add a custom property handler (getter).\n*/"
function_definition (+32 nodes collapsed)
comment "/**\n* Add a custom property handler (setter).\n*/"
function_definition (+32 nodes collapsed)
comment "/** Root library.\n * \\param L The Lua VM state.\n * \\return T"...
function_definition (+46 nodes collapsed)
comment "/** Newindex for root.\n * \\param L The Lua VM state.\n * \\ret"...
function_definition (+47 nodes collapsed)
declaration
type_qualifier
const "const"
struct_specifier
struct "struct"
type_identifier "luaL_Reg"
init_declarator
array_declarator
identifier "awesome_root_methods"
[ "["
] "]"
= "="
initializer_list
{ "{"
initializer_list
{ "{"
string_literal
" "\""
string_content "_buttons"
" "\""
, ","
identifier "luaA_root_buttons"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "_keys"
" "\""
, ","
identifier "luaA_root_keys"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "cursor"
" "\""
, ","
identifier "luaA_root_cursor"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "fake_input"
" "\""
, ","
identifier "luaA_root_fake_input"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "drawins"
" "\""
, ","
identifier "luaA_root_drawins"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "_wallpaper"
" "\""
, ","
identifier "luaA_root_wallpaper"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "size"
" "\""
, ","
identifier "luaA_root_size"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "size_mm"
" "\""
, ","
identifier "luaA_root_size_mm"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "tags"
" "\""
, ","
identifier "luaA_root_tags"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "__index"
" "\""
, ","
identifier "luaA_root_index"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "__newindex"
" "\""
, ","
identifier "luaA_root_newindex"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "set_index_miss_handler"
" "\""
, ","
identifier "luaA_root_set_index_miss_handler"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "set_call_handler"
" "\""
, ","
identifier "luaA_root_set_call_handler"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "set_newindex_miss_handler"
" "\""
, ","
identifier "luaA_root_set_newindex_miss_handler"
} "}"
, ","
initializer_list
{ "{"
null
NULL "NULL"
, ","
null
NULL "NULL"
} "}"
} "}"
; ";"
declaration (+24 nodes collapsed)
comment "// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabs"...

After

translation_unit
comment "/*\n * root.c - root window management\n *\n * Copyright © 2008"...
comment "/** awesome root window API.\n * @author Julien Danjou &lt;ju"...
preproc_include
#include "#include"
string_literal
" "\""
string_content "globalconf.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "common/atoms.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "common/xcursor.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "common/xutil.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "objects/button.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "common/luaclass.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "xwindow.h"
" "\""
preproc_include
#include "#include"
string_literal
" "\""
string_content "math.h"
" "\""
preproc_include
#include "#include"
system_lib_string "<xcb/xtest.h>"
preproc_include
#include "#include"
system_lib_string "<xcb/xcb_aux.h>"
preproc_include
#include "#include"
system_lib_string "<cairo-xcb.h>"
declaration
storage_class_specifier
static "static"
primitive_type "int"
init_declarator
identifier "miss_index_handler"
= "="
identifier "LUA_REFNIL"
; ";"
declaration
storage_class_specifier
static "static"
primitive_type "int"
init_declarator
identifier "miss_newindex_handler"
= "="
identifier "LUA_REFNIL"
; ";"
declaration
storage_class_specifier
static "static"
primitive_type "int"
init_declarator
identifier "miss_call_handler"
= "="
identifier "LUA_REFNIL"
; ";"
function_definition (+243 nodes collapsed)
function_definition (+430 nodes collapsed)
function_definition (+357 nodes collapsed)
function_definition (+83 nodes collapsed)
comment "/** Send fake keyboard or mouse events.\n *\n * Usually the cu"...
function_definition (+453 nodes collapsed)
comment "/** Get or set global key bindings.\n * These bindings will b"...
function_definition (+261 nodes collapsed)
comment "/**\n * Store the list of mouse buttons to be applied on the "...
function_definition (+227 nodes collapsed)
comment "/** Set the root cursor\n *\n * The possible values are:\n *\n *"...
function_definition (+123 nodes collapsed)
comment "/** Get the drawins attached to a screen.\n *\n * @return A ta"...
function_definition (+102 nodes collapsed)
comment "/** Get the wallpaper as a cairo surface or set it as a cair"...
function_definition (+135 nodes collapsed)
comment "/** Get the content of the root window as a cairo surface\n *"...
function_definition
storage_class_specifier
static "static"
primitive_type "int"
function_declarator
identifier "luaA_root_get_content"
parameter_list
( "("
parameter_declaration
type_identifier "lua_State"
pointer_declarator
* "*"
identifier "L"
) ")"
compound_statement
{ "{"
declaration
type_identifier "cairo_surface_t"
pointer_declarator
* "*"
identifier "surface"
; ";"
declaration
primitive_type "int"
init_declarator
identifier "width"
= "="
field_expression
field_expression
identifier "globalconf"
. "."
field_identifier "screen"
-> "->"
field_identifier "width_in_pixels"
; ";"
declaration
primitive_type "int"
init_declarator
identifier "height"
= "="
field_expression
field_expression
identifier "globalconf"
. "."
field_identifier "screen"
-> "->"
field_identifier "height_in_pixels"
; ";"
expression_statement
assignment_expression
identifier "surface"
= "="
call_expression
identifier "cairo_xcb_surface_create"
argument_list
( "("
field_expression
identifier "globalconf"
. "."
field_identifier "connection"
, ","
field_expression
field_expression
identifier "globalconf"
. "."
field_identifier "screen"
-> "->"
field_identifier "root"
, ","
field_expression
identifier "globalconf"
. "."
field_identifier "default_visual"
, ","
identifier "width"
, ","
identifier "height"
) ")"
; ";"
expression_statement
call_expression
identifier "lua_pushlightuserdata"
argument_list
( "("
identifier "L"
, ","
identifier "surface"
) ")"
; ";"
return_statement
return "return"
number_literal "1"
; ";"
} "}"
comment "/** Get the size of the root window.\n *\n * @return Width of "...
function_definition (+53 nodes collapsed)
comment "/** Get the physical size of the root window, in millimeter."...
function_definition (+53 nodes collapsed)
comment "/** Get the attached tags.\n * @return A table with all tags."...
function_definition (+102 nodes collapsed)
comment "/**\n* Add a custom call handler.\n*/"
function_definition (+32 nodes collapsed)
comment "/**\n* Add a custom property handler (getter).\n*/"
function_definition (+32 nodes collapsed)
comment "/**\n* Add a custom property handler (setter).\n*/"
function_definition (+32 nodes collapsed)
comment "/** Root library.\n * \\param L The Lua VM state.\n * \\return T"...
function_definition (+46 nodes collapsed)
comment "/** Newindex for root.\n * \\param L The Lua VM state.\n * \\ret"...
function_definition (+47 nodes collapsed)
declaration
type_qualifier
const "const"
struct_specifier
struct "struct"
type_identifier "luaL_Reg"
init_declarator
array_declarator
identifier "awesome_root_methods"
[ "["
] "]"
= "="
initializer_list
{ "{"
initializer_list
{ "{"
string_literal
" "\""
string_content "_buttons"
" "\""
, ","
identifier "luaA_root_buttons"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "_keys"
" "\""
, ","
identifier "luaA_root_keys"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "cursor"
" "\""
, ","
identifier "luaA_root_cursor"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "fake_input"
" "\""
, ","
identifier "luaA_root_fake_input"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "drawins"
" "\""
, ","
identifier "luaA_root_drawins"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "_wallpaper"
" "\""
, ","
identifier "luaA_root_wallpaper"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "content"
" "\""
, ","
identifier "luaA_root_get_content"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "size"
" "\""
, ","
identifier "luaA_root_size"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "size_mm"
" "\""
, ","
identifier "luaA_root_size_mm"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "tags"
" "\""
, ","
identifier "luaA_root_tags"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "__index"
" "\""
, ","
identifier "luaA_root_index"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "__newindex"
" "\""
, ","
identifier "luaA_root_newindex"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "set_index_miss_handler"
" "\""
, ","
identifier "luaA_root_set_index_miss_handler"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "set_call_handler"
" "\""
, ","
identifier "luaA_root_set_call_handler"
} "}"
, ","
initializer_list
{ "{"
string_literal
" "\""
string_content "set_newindex_miss_handler"
" "\""
, ","
identifier "luaA_root_set_newindex_miss_handler"
} "}"
, ","
initializer_list
{ "{"
null
NULL "NULL"
, ","
null
NULL "NULL"
} "}"
} "}"
; ";"
declaration (+24 nodes collapsed)
comment "// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabs"...