File: Fl_Button.i

package info (click to toggle)
pyfltk 1.4.4.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,556 kB
  • sloc: python: 7,769; cpp: 356; makefile: 24
file content (33 lines) | stat: -rw-r--r-- 990 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* File : Fl_Button.i */
//%module Fl_Button

%feature("docstring") ::Fl_Button
"""
Buttons generate callbacks when they are clicked by the user. You control 
exactly when and how by changing the values for type()  and when().

Buttons can also generate callbacks in response to FL_SHORTCUT events. The 
button can either have an explicit shortcut() value or a letter shortcut 
can be indicated in the label() with an '&' character before it. For the 
label shortcut it does not matter if Alt is held down, but if you have an 
input field in the same window, the user will have to hold down the Alt key 
so that the input field does not eat the event first as an FL_KEYBOARD event. 
""" ;

%{
#include "FL/Fl_Button.H"
%}

%include "macros.i"

// typemap to map output of Fl_Button.value from char to int
%typemap(out) char {
    $result = PyInt_FromLong( (long)$1);
}

CHANGE_OWNERSHIP(Fl_Button)

%include "FL/Fl_Button.H"

// clear the typemap for char
%typemap(out) char;