File: 025-flags.lua

package info (click to toggle)
lua-gtk 0.9%2B20100528-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,176 kB
  • ctags: 1,934
  • sloc: ansic: 9,571; sh: 373; makefile: 241
file content (10 lines) | stat: -rwxr-xr-x 189 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
#! /usr/bin/env lua

require "gtk"

x = gtk.button_new_with_label "hello"

-- flags are not defined as ENUM, but a simple integer.
x.flags = x.flags + gtk.CAN_DEFAULT
assert(x.flags ~= 0)