gdraw | index /home/hashao/.FontForge/python/modules/gdraw/gdraw.py |
ctypes wrapper to Attach the GDraw event handler to the gtk main loop.
Copyright <hashao2@gmail.com> 2009
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
We use a gdraw timeout handler to call the gtk.main_iteration() periodically.
You might also want to copy setup_syspath() in gdraw.py to setup proper
sys.path for fontforge scripts.
Usage:
from gdraw import gtkrunner
w = gtk.Window()
b = gtk.Button('click')
w.add(b)
w.show_all()
gtkrunner.start()
Example:
t = Timer()
tid = t.add(timeout, func[, data])
t.remove(t)
# top start/stop gtk main iteration
g = GtkRunner()
g.start()
g.stop()
Modules | ||||||
|
Classes | ||||||||||||||||||
|
Data | ||
__all__ = ['Timer', 'GtkRunner', 'gtkrunner'] gtkrunner = <gdraw.GtkRunner instance at 0x9993fac> |