1package agar.gui.widget.separator is 2 3 type type_t is (SEPARATOR_HORIZ, SEPARATOR_VERT); 4 for type_t use (SEPARATOR_HORIZ => 0, SEPARATOR_VERT => 1); 5 for type_t'size use c.unsigned'size; 6 pragma convention (c, type_t); 7 8 type separator_t is limited private; 9 type separator_access_t is access all separator_t; 10 pragma convention (c, separator_access_t); 11 12 function allocate 13 (parent : widget_access_t; 14 separator_type : type_t) return separator_access_t; 15 pragma import (c, allocate, "AG_SeparatorNew"); 16 17 function allocate_spacer 18 (parent : widget_access_t; 19 separator_type : type_t) return separator_access_t; 20 pragma import (c, allocate_spacer, "AG_SpacerNew"); 21 22 procedure set_padding 23 (separator : separator_access_t; 24 pixels : natural); 25 pragma inline (set_padding); 26 27 function widget (separator : separator_access_t) return widget_access_t; 28 pragma inline (widget); 29 30private 31 32 type separator_t is record 33 widget : aliased widget_t; 34 sep_type : type_t; 35 padding : c.unsigned; 36 visible : c.int; 37 end record; 38 pragma convention (c, separator_t); 39 40end agar.gui.widget.separator; 41