summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2003-09-15 13:36:06 +0000
committerJames Henstridge <jamesh@src.gnome.org>2003-09-15 13:36:06 +0000
commitea7f1197088dbed5f5301b0137a47ec299da4efb (patch)
tree10e50f6b46e8c4fd621367b7af1bdfb251657de6
parentc51e388d2a8168881e6dbc5ed7dc6aa2e121ca1f (diff)
downloadpygtk-ea7f1197088dbed5f5301b0137a47ec299da4efb.tar.gz
remove files.
2003-09-15 James Henstridge <james@daa.com.au> * gtk/gtkgl*: remove files. * gtk/Makefile.am: remove gtkgl binding. * configure.in (build_gtkgl): remove gtkgl bindings.
-rw-r--r--ChangeLog8
-rw-r--r--Makefile.am6
-rw-r--r--acconfig.h9
-rw-r--r--configure.in14
-rw-r--r--examples/gl/README3
-rw-r--r--examples/gl/cone.py97
-rw-r--r--examples/gl/dots.py129
-rw-r--r--examples/gl/gears.py290
-rw-r--r--gtk/Makefile.am14
-rw-r--r--gtk/gtkgl.defs202
-rw-r--r--gtk/gtkgl.override135
-rw-r--r--gtk/gtkglmodule.c92
12 files changed, 10 insertions, 989 deletions
diff --git a/ChangeLog b/ChangeLog
index 12ce9deb..b5f5a2b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2003-09-15 James Henstridge <james@daa.com.au>
+
+ * gtk/gtkgl*: remove files.
+
+ * gtk/Makefile.am: remove gtkgl binding.
+
+ * configure.in (build_gtkgl): remove gtkgl bindings.
+
2003-09-04 James Henstridge <james@daa.com.au>
* gtk/gtk.override (headers): add defs for GdkDisplay and GdkScreen
diff --git a/Makefile.am b/Makefile.am
index 11ca2330..633936c4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -157,11 +157,7 @@ EXTRA_DIST += \
examples/neil/README \
examples/glade/README \
examples/glade/glade-demo.py \
- examples/glade/test.glade \
- examples/gl/README \
- examples/gl/cone.py \
- examples/gl/dots.py \
- examples/gl/gears.py
+ examples/glade/test.glade
snap:
$(MAKE) dist distdir=$(PACKAGE)-SNAP-`date +"%Y%m%d"`
diff --git a/acconfig.h b/acconfig.h
index 20358cf9..5fd7aaee 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -22,14 +22,5 @@
#define _PYGTK_CONFIG_H_
@TOP@
-/* define if Numeric Python support is to be used */
-#undef HAVE_NUMPY
-
-#undef HAVE_ARRAYOBJECT_H
-#undef HAVE_EXTENSIONS_ARRAYOBJECT_H
-#undef HAVE_NUMERIC_ARRAYOBJECT_H
-
-#undef ENABLE_PYGTK_THREADING
-
@BOTTOM@
#endif /* !_PYGTK_CONFIG_H_ */
diff --git a/configure.in b/configure.in
index 9bef0ff3..78765eb0 100644
--- a/configure.in
+++ b/configure.in
@@ -74,7 +74,7 @@ AM_CHECK_PYMOD(thread,,,enable_thread=no)
AC_MSG_CHECKING(whether to enable threading in pygtk)
if test "x$enable_thread" != xno; then
extra_mods=gthread
- AC_DEFINE(ENABLE_PYGTK_THREADING)
+ AC_DEFINE(ENABLE_PYGTK_THREADING,,[enable threading support in pygtk])
AC_MSG_RESULT(yes)
else
extra_mods=
@@ -124,18 +124,6 @@ if test -n "$export_dynamic"; then
LIBGLADE_LIBS=`echo $LIBGLADE_LIBS | sed -e "s/$export_dynamic//"`
fi
-dnl gtkgl
-build_gtkgl=false
-PKG_CHECK_MODULES(GTKGL, gtkgl-2.0 >= gtkgl_required_version,
- build_gtkgl=true,
- build_gtkgl=false)
-AC_SUBST(GTKGL_CFLAGS)
-AC_SUBST(GTKGL_LIBS)
-AM_CONDITIONAL(BUILD_GTKGL, $build_gtkgl)
-if test -n "$export_dynamic"; then
- GTKGL_LIBS=`echo $GTKGL_LIBS | sed -e "s/$export_dynamic//"`
-fi
-
AC_ARG_ENABLE(numpy,
AC_HELP_STRING([--disable-numpy], [Disable numeric python features]),,
diff --git a/examples/gl/README b/examples/gl/README
deleted file mode 100644
index 673e5d82..00000000
--- a/examples/gl/README
+++ /dev/null
@@ -1,3 +0,0 @@
-These examples demonstrate using OpenGL with pygtk. They require that the
-gtkglarea package be installed before building pygtk, and you must install
-PyOpenGL for the actual OpenGL bindings.
diff --git a/examples/gl/cone.py b/examples/gl/cone.py
deleted file mode 100644
index 66117e05..00000000
--- a/examples/gl/cone.py
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/env python
-
-import gtk
-import gtk.gl
-
-from OpenGL.GL import *
-from OpenGL.GLU import *
-
-rotx = 250
-roty = 0
-
-def hchanged(hadj):
- global roty
- roty = hadj.value
- redraw(glarea)
-
-def vchanged(vadj):
- global rotx
- rotx = vadj.value
- redraw(glarea)
-
-quadObj = gluNewQuadric()
-
-def glutSolidCone(base, height, slices, stacks):
- gluQuadricDrawStyle(quadObj, GLU_FILL)
- gluQuadricNormals(quadObj, GLU_SMOOTH)
- gluCylinder(quadObj, base, 0.0, height, slices, stacks)
-
-def redraw(glarea, event=None):
- if not glarea.make_current(): return
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
- glPushMatrix()
- glScale(0.5, 0.5, 0.5)
- #glTranslate(0, -1, 0)
- glRotatef(rotx, 1, 0, 0)
- glRotatef(roty, 0, 1, 0)
- glutSolidCone(1, 2, 50, 10)
- glPopMatrix()
- glarea.swap_buffers()
-
-def realise(glarea):
- if glarea.make_current():
- glMaterial(GL_FRONT, GL_AMBIENT, [0.2, 0.2, 0.2, 1.0])
- glMaterial(GL_FRONT, GL_DIFFUSE, [0.8, 0.8, 0.8, 1.0])
- glMaterial(GL_FRONT, GL_SPECULAR, [1.0, 0.0, 1.0, 1.0])
- glMaterial(GL_FRONT, GL_SHININESS, 50.0)
- glLight(GL_LIGHT0, GL_AMBIENT, [0.0, 1.0, 0.0, 1.0])
- glLight(GL_LIGHT0, GL_DIFFUSE, [1.0, 1.0, 1.0, 1.0])
- glLight(GL_LIGHT0, GL_SPECULAR, [1.0, 1.0, 1.0, 1.0])
- glLight(GL_LIGHT0, GL_POSITION, [1.0, 1.0, 1.0, 0.0]);
- glLightModel(GL_LIGHT_MODEL_AMBIENT, [0.2, 0.2, 0.2, 1.0])
- glEnable(GL_LIGHTING)
- glEnable(GL_LIGHT0)
- glDepthFunc(GL_LESS)
- glEnable(GL_DEPTH_TEST)
-
-#if not gtkgl.query():
-# print "OpenGL not supported. Bye."
-# raise SystemExit
-
-win = gtk.Window()
-win.connect("destroy", gtk.mainquit)
-win.set_title("Cone")
-
-table = gtk.Table(2, 3)
-table.set_border_width(5)
-table.set_col_spacings(5)
-table.set_row_spacings(5)
-win.add(table)
-table.show()
-
-vadj = gtk.Adjustment(250, 0, 360, 5, 5, 0)
-vscale = gtk.VScale(vadj)
-table.attach(vscale, 1,2, 0,1, xoptions=gtk.FILL)
-vscale.show()
-
-hadj = gtk.Adjustment(0, 0, 360, 5, 5, 0)
-hscale = gtk.HScale(hadj)
-table.attach(hscale, 0,1, 1,2, yoptions=gtk.FILL)
-hscale.show()
-
-vadj.connect("value_changed", vchanged)
-hadj.connect("value_changed", hchanged)
-
-glarea = gtk.gl.Area((gtk.gl.RGBA, gtk.gl.DOUBLEBUFFER, gtk.gl.DEPTH_SIZE, 1))
-glarea.set_size_request(300, 300)
-
-glarea.connect("realize", realise)
-glarea.connect("expose_event", redraw)
-
-table.attach(glarea, 0,1, 0,1)
-glarea.show()
-
-win.show()
-
-gtk.mainloop()
-#glarea.destroy()
diff --git a/examples/gl/dots.py b/examples/gl/dots.py
deleted file mode 100644
index 668e7de9..00000000
--- a/examples/gl/dots.py
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/usr/bin/env python
-try:
- from Numeric import *
-except:
- print "This demo requires the Numeric extension, sorry"
- import sys
- sys.exit()
-from RandomArray import *
-import string, sys
-from OpenGL.GL import *
-
-import gtk
-import gtk.gl
-
-MY_LIST=1
-NUMDOTS = 500
-NUMDOTS2 = 600
-x = random(NUMDOTS)*2-1
-y = random(NUMDOTS)*2-1
-MAX_AGE = 13
-age = randint(0,MAX_AGE,(NUMDOTS,))
-move_length = .005 # 1.0 = screen width
-angle = 0 # in radians
-delta_angle = .2 # in radians
-move_x = move_length*cos(angle)
-move_y = move_length*sin(angle)
-
-glarea = None
-timer_id = 0
-
-def display(area=None, event=None):
- global x, y, move_x, move_y, NUMDOTS, NUMDOTS2, MAX_AGE, age
-
- # do not draw unless we can make the area the current drawable
- if not glarea.make_current(): return
-
- glClearColor(0.0, 0.0, 0.0, 0.0)
- glClear(GL_COLOR_BUFFER_BIT)
- glColor3f(1.0,1.0,0.0)
- glBegin(GL_POINTS)
- x = x + move_x
- y = y + move_y
- age = age + 1
- which = greater(age, MAX_AGE)
- x = choose(which, (x, random(NUMDOTS)))
- y = choose(which, (y, random(NUMDOTS)))
- age = choose(which, (age, 0))
- x = choose(greater(x,1.0),(x,x-1.0)) # very cool - wraparound
- y = choose(greater(y,1.0),(y,y-1.0))
- glVertex(transpose(array([x,y])))
- glVertex(transpose(array([x-.005,y+.005])))
- glVertex(transpose(array([x+.005,y-.005])))
- x2 = random(NUMDOTS2)
- y2 = random(NUMDOTS2)
- glVertex(transpose(array([x2,y2])))
- glEnd()
- glFlush()
-
- glarea.swap_buffers()
-
- return gtk.TRUE
-
-def mouse(glarea, event):
- global angle, delta_angle, move_x, move_y, move_length, timer_id
-
- if event.button == 1:
- angle = angle + delta_angle
- elif event.button == 3:
- angle = angle - delta_angle
- elif event.button == 2:
- if timer_id:
- gtk.timeout_remove(timer_id)
- timer_id = 0
- else:
- timer_id = gtk.idle_add(display)
- move_x = move_length * cos(angle)
- move_y = move_length * sin(angle)
-
-def setup_viewport():
- glMatrixMode(GL_PROJECTION)
- glLoadIdentity()
- glOrtho(0.0, 1.0, 0.0, 1.0, 0.0, 1.0)
-
-def reshape_callback():
- x, y, w, h = glarea.get_allocation()
-
- glViewport(0, 0, w, h)
- setup_viewport()
- return gtk.FALSE
-
-def reshape(glarea, allocation):
- # the allocation parameter here is of type GTK_TYPE_POINTER, so we
- # can't get to it directly -- so we set an idle callback and use
- # the get_allocation method
- gtk.idle_add(reshape_callback)
-
-def main():
- global glarea, timer_id
- win = gtk.Window()
- win.set_title("GL Dots")
- win.connect("destroy", gtk.mainquit)
-
- glarea = gtk.gl.Area((gtk.gl.RGBA, gtk.gl.DOUBLEBUFFER))
- glarea.add_events(gtk.gdk.BUTTON_PRESS_MASK)
- glarea.set_size_request(300, 300)
-
- setup_viewport()
- glarea.connect_after("size_allocate", reshape)
- glarea.connect("expose_event", display)
- glarea.connect("button_press_event", mouse)
-
- timer_id = gtk.idle_add(display)
-
- win.add(glarea)
- glarea.show()
- win.show()
-
- gtk.mainloop()
- #glarea.destroy()
-
-#if gtkgl.query():
-# print "Use the mouse buttons to control some of the dots."
-
-main()
-#else:
-# print "Your X server does not support GLX"
-
-
-
diff --git a/examples/gl/gears.py b/examples/gl/gears.py
deleted file mode 100644
index 43ddcef2..00000000
--- a/examples/gl/gears.py
+++ /dev/null
@@ -1,290 +0,0 @@
-#!/usr/bin/env python
-
-# A translation of the gears demo that comes with mesa, modified to use
-# a few GtkHScale widgets for the rotation, rather than the keyboard.
-
-from OpenGL.GL import *
-import gobject
-import gtk
-import gtk.gl
-
-import math
-
-# Draw a gear wheel. You'll probably want to call this function when
-# building a display list since we do a lot of trig here.
-#
-# Input: inner_radius - radius of hole at center
-# outer_radius - radius at center of teeth
-# width - width of gear
-# teeth - number of teeth
-# tooth_depth - depth of tooth
-def gear(inner_radius, outer_radius, width, teeth, tooth_depth):
- cos = math.cos
- sin = math.sin
-
- r0 = inner_radius
- r1 = outer_radius - tooth_depth/2.0
- r2 = outer_radius + tooth_depth/2.0
-
- da = 2.0*math.pi / teeth / 4.0
-
- glShadeModel( GL_FLAT )
-
- glNormal3f( 0.0, 0.0, 1.0 )
-
- # draw front face
- glBegin( GL_QUAD_STRIP )
- for i in range(teeth + 1):
- angle = i * 2.0*math.pi / teeth
- glVertex3f( r0*cos(angle), r0*sin(angle), width*0.5 )
- glVertex3f( r1*cos(angle), r1*sin(angle), width*0.5 )
- glVertex3f( r0*cos(angle), r0*sin(angle), width*0.5 )
- glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da), width*0.5 )
- glEnd();
-
- # draw front sides of teeth
- glBegin( GL_QUADS )
- da = 2.0*math.pi / teeth / 4.0
- for i in range(teeth):
- angle = i * 2.0*math.pi / teeth
- glVertex3f( r1*cos(angle), r1*sin(angle), width*0.5 )
- glVertex3f( r2*cos(angle+da), r2*sin(angle+da), width*0.5 )
- glVertex3f( r2*cos(angle+2*da), r2*sin(angle+2*da), width*0.5 )
- glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da), width*0.5 )
- glEnd()
-
-
- glNormal3f( 0.0, 0.0, -1.0 )
-
- # draw back face
- glBegin( GL_QUAD_STRIP )
- for i in range(teeth + 1):
- angle = i * 2.0*math.pi / teeth
- glVertex3f( r1*cos(angle), r1*sin(angle), -width*0.5 )
- glVertex3f( r0*cos(angle), r0*sin(angle), -width*0.5 )
- glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da),-width*0.5 )
- glVertex3f( r0*cos(angle), r0*sin(angle), -width*0.5 )
- glEnd()
-
- # draw back sides of teeth
- glBegin( GL_QUADS )
- da = 2.0*math.pi / teeth / 4.0
- for i in range(teeth):
- angle = i * 2.0*math.pi / teeth
-
- glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da),-width*0.5 )
- glVertex3f( r2*cos(angle+2*da), r2*sin(angle+2*da),-width*0.5 )
- glVertex3f( r2*cos(angle+da), r2*sin(angle+da), -width*0.5 )
- glVertex3f( r1*cos(angle), r1*sin(angle), -width*0.5 )
- glEnd()
-
-
- # draw outward faces of teeth
- glBegin( GL_QUAD_STRIP );
- for i in range(teeth):
- angle = i * 2.0*math.pi / teeth
-
- glVertex3f( r1*cos(angle), r1*sin(angle), width*0.5 )
- glVertex3f( r1*cos(angle), r1*sin(angle), -width*0.5 )
- u = r2*cos(angle+da) - r1*cos(angle)
- v = r2*sin(angle+da) - r1*sin(angle)
- len = math.sqrt( u*u + v*v )
- u = u / len
- v = v / len
- glNormal3f( v, -u, 0.0 )
- glVertex3f( r2*cos(angle+da), r2*sin(angle+da), width*0.5 )
- glVertex3f( r2*cos(angle+da), r2*sin(angle+da), -width*0.5 )
- glNormal3f( cos(angle), sin(angle), 0.0 )
- glVertex3f( r2*cos(angle+2*da), r2*sin(angle+2*da), width*0.5 )
- glVertex3f( r2*cos(angle+2*da), r2*sin(angle+2*da),-width*0.5 )
- u = r1*cos(angle+3*da) - r2*cos(angle+2*da)
- v = r1*sin(angle+3*da) - r2*sin(angle+2*da)
- glNormal3f( v, -u, 0.0 )
- glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da), width*0.5 )
- glVertex3f( r1*cos(angle+3*da), r1*sin(angle+3*da),-width*0.5 )
- glNormal3f( cos(angle), sin(angle), 0.0 )
-
- glVertex3f( r1*cos(0), r1*sin(0), width*0.5 )
- glVertex3f( r1*cos(0), r1*sin(0), -width*0.5 )
-
- glEnd()
-
-
- glShadeModel( GL_SMOOTH )
-
- # draw inside radius cylinder
- glBegin( GL_QUAD_STRIP )
- for i in range(teeth + 1):
- angle = i * 2.0*math.pi / teeth;
- glNormal3f( -cos(angle), -sin(angle), 0.0 )
- glVertex3f( r0*cos(angle), r0*sin(angle), -width*0.5 )
- glVertex3f( r0*cos(angle), r0*sin(angle), width*0.5 )
- glEnd()
-
-view_rotx=20.0
-view_roty=30.0
-view_rotz=0.0
-
-gear1 = 0
-gear2 = 0
-gear3 = 0
-
-angle = 0.0
-
-def xchange(adj):
- global view_rotx
- view_rotx = adj.value
- draw(glarea)
-def ychange(adj):
- global view_roty
- view_roty = adj.value
- draw(glarea)
-def zchange(adj):
- global view_rotz
- view_rotz = adj.value
- draw(glarea)
-
-def draw(glarea, event=None):
- if not glarea.make_current(): return
-
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT )
-
- glPushMatrix()
- glRotatef( view_rotx, 1.0, 0.0, 0.0 )
- glRotatef( view_roty, 0.0, 1.0, 0.0 )
- glRotatef( view_rotz, 0.0, 0.0, 1.0 )
-
- glPushMatrix()
- glTranslatef( -3.0, -2.0, 0.0 )
- glRotatef( angle, 0.0, 0.0, 1.0 )
- glCallList(gear1)
- glPopMatrix()
-
- glPushMatrix()
- glTranslatef( 3.1, -2.0, 0.0 )
- glRotatef( -2.0*angle-9.0, 0.0, 0.0, 1.0 )
- glCallList(gear2)
- glPopMatrix()
-
- glPushMatrix()
- glTranslatef( -3.1, 4.2, 0.0 )
- glRotatef( -2.0*angle-25.0, 0.0, 0.0, 1.0 )
- glCallList(gear3)
- glPopMatrix()
-
- glPopMatrix()
-
- glarea.swap_buffers()
-
-def idle():
- global angle
- angle = angle + 2.0
-
- draw(glarea)
-
- return gtk.TRUE
-
-def reshape_idle():
- if not glarea.make_current(): return
- x, y, width, height = glarea.get_allocation()
-
- glViewport(0, 0, width, height)
- glMatrixMode(GL_PROJECTION)
- glLoadIdentity()
- if width > height:
- w = width / height
- glFrustum( -w, w, -1.0, 1.0, 5.0, 60.0 )
- else:
- h = height / width
- glFrustum( -1.0, 1.0, -h, h, 5.0, 60.0 )
-
- glMatrixMode(GL_MODELVIEW)
- glLoadIdentity()
- glTranslatef( 0.0, 0.0, -40.0 )
- glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT )
-
- return gtk.FALSE
-
-def reshape(glarea, allocation):
- gtk.idle_add(reshape_idle)
-
-def init(glarea):
- if not glarea.make_current(): return
-
- global gear1, gear2, gear3
-
- pos = (5.0, 5.0, 10.0, 0.0 )
- red = (0.8, 0.1, 0.0, 1.0 )
- green = (0.0, 0.8, 0.2, 1.0 )
- blue = (0.2, 0.2, 1.0, 1.0 )
-
- glLightfv( GL_LIGHT0, GL_POSITION, pos )
- glEnable( GL_CULL_FACE )
- glEnable( GL_LIGHTING )
- glEnable( GL_LIGHT0 )
- glEnable( GL_DEPTH_TEST )
-
- # make the gears
- gear1 = glGenLists(1)
- glNewList(gear1, GL_COMPILE)
- glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red )
- gear( 1.0, 4.0, 1.0, 20, 0.7 )
- glEndList()
-
- gear2 = glGenLists(1)
- glNewList(gear2, GL_COMPILE)
- glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green )
- gear( 0.5, 2.0, 2.0, 10, 0.7 )
- glEndList()
-
- gear3 = glGenLists(1)
- glNewList(gear3, GL_COMPILE)
- glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue )
- gear( 1.3, 2.0, 0.5, 10, 0.7 )
- glEndList()
-
- glEnable( GL_NORMALIZE )
-
-#if not gtkgl.query():
-# print "OpenGL not supported. Bye."
-# raise SystemExit
-
-win = gobject.new(gtk.Window,
- title='Gears')
-win.connect("destroy", gtk.mainquit)
-
-table = gtk.Table(4, 2)
-win.add(table)
-table.show()
-
-glarea = gtk.gl.Area((gtk.gl.RGBA, gtk.gl.DEPTH_SIZE, 1, gtk.gl.DOUBLEBUFFER))
-glarea.set_size_request(300, 300)
-
-glarea.connect("realize", init)
-glarea.connect("size_allocate", reshape)
-glarea.connect("expose_event", draw)
-
-gtk.idle_add(idle)
-
-table.attach(glarea, 0,2, 0,1)
-glarea.show()
-
-for row, label, start, cb in ((1,'X Rotation', view_rotx, xchange),
- (2,'Y Rotation', view_roty, ychange),
- (3,'Z Rotation', view_rotz, zchange)):
- l = gtk.Label(label)
- table.attach(l, 0,1, row,row+1, xoptions=0, yoptions=gtk.FILL)
- l.show()
-
- adj = gtk.Adjustment(start, 0, 360, 5, 5, 0)
- adj.connect("value_changed", cb)
-
- scale = gtk.HScale(adj)
- table.attach(scale, 1,2, row,row+1, yoptions=gtk.FILL)
- scale.show()
-
-win.show()
-
-gtk.mainloop()
-
-#glarea.destroy()
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index fa92667d..43c97914 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -90,20 +90,6 @@ CLEANFILES += libglade.c
defs_DATA += libglade.defs
EXTRA_DIST += libglade.override
-# gtkgl module
-if BUILD_GTKGL
-pygtkexec_LTLIBRARIES += gl.la
-endif
-gl_la_CFLAGS = $(GTKGL_CFLAGS)
-gl_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initgl
-gl_la_LIBADD = $(GTKGL_LIBS)
-gl_la_SOURCES = gtkglmodule.c
-nodist_gl_la_SOURCES = gtkgl.c
-libgl.c: $(COMMONDEFS) gtkgl.override
-CLEANFILES += gtkgl.c
-defs_DATA += gtkgl.defs
-EXTRA_DIST += gtkgl.override
-
.defs.c:
(cd $(srcdir) \
&& $(PYTHON) ../codegen/codegen.py \
diff --git a/gtk/gtkgl.defs b/gtk/gtkgl.defs
deleted file mode 100644
index 9b4e5521..00000000
--- a/gtk/gtkgl.defs
+++ /dev/null
@@ -1,202 +0,0 @@
-;; -*- scheme -*-
-
-; object definitions ...
-(define-object Area
- (in-module "Gtk")
- (parent "GtkDrawingArea")
- (c-name "GtkGLArea")
- (gtype-id "GTK_TYPE_GL_AREA")
-)
-
-;; Enumerations and flags ...
-
-;; From /opt/gnome2/include/gtkgl-2.0/gtkgl/gdkgl.h
-
-(define-function get_info
- (c-name "gdk_gl_get_info")
- (return-type "gchar*")
-)
-
-(define-function choose_visual
- (c-name "gdk_gl_choose_visual")
- (return-type "GdkVisual*")
- (parameters
- '("int*" "attrlist")
- )
-)
-
-(define-function get_config
- (c-name "gdk_gl_get_config")
- (return-type "int")
- (parameters
- '("GdkVisual*" "visual")
- '("int" "attrib")
- )
-)
-
-(define-function gdk_gl_context_new
- (c-name "gdk_gl_context_new")
- (is-constructor-of "GdkGLContext")
- (return-type "GdkGLContext*")
- (parameters
- '("GdkVisual*" "visual")
- )
-)
-
-(define-function gdk_gl_context_share_new
- (c-name "gdk_gl_context_share_new")
- (is-constructor-of "GdkGLContext")
- (return-type "GdkGLContext*")
- (parameters
- '("GdkVisual*" "visual")
- '("GdkGLContext*" "sharelist")
- '("gint" "direct")
- )
-)
-
-(define-function gdk_gl_context_attrlist_share_new
- (c-name "gdk_gl_context_attrlist_share_new")
- (is-constructor-of "GdkGLContext")
- (return-type "GdkGLContext*")
- (parameters
- '("int*" "attrlist")
- '("GdkGLContext*" "sharelist")
- '("gint" "direct")
- )
-)
-
-(define-method ref
- (of-object "GdkGLContext")
- (c-name "gdk_gl_context_ref")
- (return-type "GdkGLContext*")
-)
-
-(define-method unref
- (of-object "GdkGLContext")
- (c-name "gdk_gl_context_unref")
- (return-type "none")
-)
-
-(define-function make_current
- (c-name "gdk_gl_make_current")
- (return-type "gint")
- (parameters
- '("GdkDrawable*" "drawable")
- '("GdkGLContext*" "context")
- )
-)
-
-(define-function swap_buffers
- (c-name "gdk_gl_swap_buffers")
- (return-type "none")
- (parameters
- '("GdkDrawable*" "drawable")
- )
-)
-
-(define-function wait_gdk
- (c-name "gdk_gl_wait_gdk")
- (return-type "none")
-)
-
-(define-function wait_gl
- (c-name "gdk_gl_wait_gl")
- (return-type "none")
-)
-
-(define-function pixmap_new
- (c-name "gdk_gl_pixmap_new")
- (return-type "GdkGLPixmap*")
- (parameters
- '("GdkVisual*" "visual")
- '("GdkPixmap*" "pixmap")
- )
-)
-
-(define-method ref
- (of-object "GdkGLPixmap")
- (c-name "gdk_gl_pixmap_ref")
- (return-type "GdkGLPixmap*")
-)
-
-(define-method unref
- (of-object "GdkGLPixmap")
- (c-name "gdk_gl_pixmap_unref")
- (return-type "none")
-)
-
-(define-method make_current
- (of-object "GdkGLPixmap")
- (c-name "gdk_gl_pixmap_make_current")
- (return-type "gint")
- (parameters
- '("GdkGLContext*" "context")
- )
-)
-
-(define-function use_gdk_font
- (c-name "gdk_gl_use_gdk_font")
- (return-type "none")
- (parameters
- '("GdkFont*" "font")
- '("int" "first")
- '("int" "count")
- '("int" "list_base")
- )
-)
-
-
-
-;; From /opt/gnome2/include/gtkgl-2.0/gtkgl/gtkglarea.h
-
-(define-function gtk_gl_area_get_type
- (c-name "gtk_gl_area_get_type")
- (return-type "GtkType")
-)
-
-(define-function gtk_gl_area_new
- (c-name "gtk_gl_area_new")
- (return-type "GtkWidget*")
- (parameters
- '("int*" "attrList")
- )
-)
-
-(define-function gtk_gl_area_share_new
- (c-name "gtk_gl_area_share_new")
- (is-constructor-of GtkGLArea)
- (return-type "GtkWidget*")
- (parameters
- '("int*" "attrList")
- '("GtkGLArea*" "share")
- )
-)
-
-(define-method new_vargs
- (of-object "GtkGLArea")
- (c-name "gtk_gl_area_new_vargs")
- (return-type "GtkWidget*")
- (parameters
- )
- (varargs #t)
-)
-
-(define-method make_current
- (of-object "GtkGLArea")
- (c-name "gtk_gl_area_make_current")
- (return-type "gint")
-)
-
-(define-method endgl
- (of-object "GtkGLArea")
- (c-name "gtk_gl_area_endgl")
- (return-type "none")
-)
-
-(define-method swap_buffers
- (of-object "GtkGLArea")
- (c-name "gtk_gl_area_swap_buffers")
- (return-type "none")
-)
-
-
diff --git a/gtk/gtkgl.override b/gtk/gtkgl.override
deleted file mode 100644
index 1a6f6d72..00000000
--- a/gtk/gtkgl.override
+++ /dev/null
@@ -1,135 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygtk- Python bindings for the GTK toolkit.
- * Copyright (C) 1998-2003 James Henstridge
- *
- * gtkgl.override: overrides for the gtk.gl module.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-%%
-headers
-#define NO_IMPORT_PYGOBJECT
-#include "pygobject.h"
-#include "pygtk.h"
-
-#include <gtkgl/gtkglarea.h>
-#include <gtk/gtk.h>
-
-%%
-modulename gl
-%%
-import gobject.GObject as PyGObject_Type
-import gtk.gdk.Visual as PyGdkVisual_Type
-import gtk.DrawingArea as PyGtkDrawingArea_Type
-%%
-ignore
- gtk_gl_area_get_type
- gtk_gl_area_new
- gtk_gl_area_new_vargs
- gtk_gl_area_begingl
- gtk_gl_area_endgl
- gtk_gl_area_swapbuffers
- gtk_gl_area_size
- gdk_gl_choose_visual
- gdk_gl_context_new
- gdk_gl_context_share_new
- gdk_gl_context_attrlist_share_new
- gdk_gl_context_ref
- gdk_gl_context_unref
- gdk_gl_make_current
- gdk_gl_swap_buffers
- gdk_gl_pixmap_new
- gdk_gl_pixmap_ref
- gdk_gl_pixmap_unref
- gdk_gl_pixmap_make_current
-%%
-override gtk_gl_area_share_new kwargs
-static int
-_wrap_gtk_gl_area_share_new(PyGObject *self, PyObject *args,
- PyObject *kwargs)
-{
- char *kwlist[] = { "attr_list", "share", NULL };
- gint *attr_list;
- GtkGLArea *share = NULL;
- PyObject *py_attr_list, *py_share = Py_None;
- gint i, len;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:GtkGLArea.__init__",
- kwlist, &py_attr_list, &py_share))
- return -1;
- if (!PySequence_Check(py_attr_list)) {
- PyErr_SetString(PyExc_TypeError, "attr_list must be a sequence");
- return -1;
- }
- len = PySequence_Length(py_attr_list);
- attr_list = g_new(gint, len+1);
- for (i = 0; i < len; i++) {
- PyObject *item = PySequence_GetItem(py_attr_list, i);
-
- Py_DECREF(item);
- if (!PyInt_Check(item)) {
- g_free(attr_list);
- PyErr_SetString(PyExc_TypeError, "attr_list items must be ints");
- return -1;
- }
- attr_list[i] = PyInt_AsLong(item);
- }
- attr_list[len] = GDK_GL_NONE; /* sentinel */
-
- if (!pygobject_check(py_share, &PyGtkGLArea_Type)) {
- if ( pygobject_get(py_share) != NULL )
- share = GTK_GL_AREA(pygobject_get(py_share));
- } else if (py_share != Py_None) {
- PyErr_SetString(PyExc_TypeError, "share must be a GtkGLArea or None");
- return -1;
- }
-
- pygobject_get(self) = (GObject *)gtk_gl_area_share_new(attr_list, share);
- if (!self->obj) {
- PyErr_SetString(PyExc_RuntimeError,
- "could not create GtkGLArea object");
- return -1;
- }
- pygobject_register_wrapper((PyObject *)self);
- //Py_INCREF(Py_None);
- //return Py_None;
- return 0;
-}
-%%
-override gdk_gl_wait_gdk noargs
-static PyObject *
-_wrap_gdk_gl_wait_gdk(PyGObject *self)
-{
- pyg_unblock_threads();
- gdk_gl_wait_gdk();
- pyg_block_threads();
- Py_INCREF(Py_None);
- return Py_None;
-}
-%%
-override gdk_gl_wait_gl noargs
-static PyObject *
-_wrap_gdk_gl_wait_gl(PyGObject *self)
-{
- pyg_unblock_threads();
- gdk_gl_wait_gl();
- pyg_block_threads();
- Py_INCREF(Py_None);
- return Py_None;
-}
-
-/* you should add appropriate ignore, ignore-glob and
- * override sections here */
diff --git a/gtk/gtkglmodule.c b/gtk/gtkglmodule.c
deleted file mode 100644
index 8a8d2293..00000000
--- a/gtk/gtkglmodule.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- * pygtk- Python bindings for the GTK toolkit.
- * Copyright (C) 1998-2003 James Henstridge
- *
- * gtkglmodule.c: wrapper for the gtkglarea library.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-#include <Python.h>
-//#include <pygtk.h>
-#include <pygobject.h>
-
-#include <gtkgl/gtkglarea.h>
-
-void pygtkgl_register_classes(PyObject *d);
-extern PyMethodDef pygtkgl_functions[];
-
-DL_EXPORT(void)
-initgl(void)
-{
- PyObject *m, *d, *c;
-
- init_pygobject();
- //init_pygtk();
-
- m = Py_InitModule("gl", pygtkgl_functions);
- d = PyModule_GetDict(m);
-
- pygtkgl_register_classes(d);
-
- PyDict_SetItemString(d, "NONE",
- c=PyInt_FromLong(GDK_GL_NONE));
- Py_DECREF(c);
- PyDict_SetItemString(d, "USE_GL", c=PyInt_FromLong(GDK_GL_USE_GL));
- Py_DECREF(c);
- PyDict_SetItemString(d, "BUFFER_SIZE",
- c=PyInt_FromLong(GDK_GL_BUFFER_SIZE));
- Py_DECREF(c);
- PyDict_SetItemString(d, "LEVEL", c=PyInt_FromLong(GDK_GL_LEVEL));
- Py_DECREF(c);
- PyDict_SetItemString(d, "RGBA", c=PyInt_FromLong(GDK_GL_RGBA));
- Py_DECREF(c);
- PyDict_SetItemString(d, "DOUBLEBUFFER",
- c=PyInt_FromLong(GDK_GL_DOUBLEBUFFER));
- Py_DECREF(c);
- PyDict_SetItemString(d, "STEREO", c=PyInt_FromLong(GDK_GL_STEREO));
- Py_DECREF(c);
- PyDict_SetItemString(d, "AUX_BUFFERS",
- c=PyInt_FromLong(GDK_GL_AUX_BUFFERS));
- Py_DECREF(c);
- PyDict_SetItemString(d, "RED_SIZE", c=PyInt_FromLong(GDK_GL_RED_SIZE));
- Py_DECREF(c);
- PyDict_SetItemString(d, "GREEN_SIZE", c=PyInt_FromLong(GDK_GL_GREEN_SIZE));
- Py_DECREF(c);
- PyDict_SetItemString(d, "BLUE_SIZE", c=PyInt_FromLong(GDK_GL_BLUE_SIZE));
- Py_DECREF(c);
- PyDict_SetItemString(d, "ALPHA_SIZE", c=PyInt_FromLong(GDK_GL_ALPHA_SIZE));
- Py_DECREF(c);
- PyDict_SetItemString(d, "DEPTH_SIZE", c=PyInt_FromLong(GDK_GL_DEPTH_SIZE));
- Py_DECREF(c);
- PyDict_SetItemString(d, "STENCIL_SIZE",
- c=PyInt_FromLong(GDK_GL_STENCIL_SIZE));
- Py_DECREF(c);
- PyDict_SetItemString(d, "ACCUM_RED_SIZE",
- c=PyInt_FromLong(GDK_GL_ACCUM_RED_SIZE));
- Py_DECREF(c);
- PyDict_SetItemString(d, "ACCUM_GREEN_SIZE",
- c=PyInt_FromLong(GDK_GL_ACCUM_GREEN_SIZE));
- Py_DECREF(c);
- PyDict_SetItemString(d, "ACCUM_BLUE_SIZE",
- c=PyInt_FromLong(GDK_GL_ACCUM_BLUE_SIZE));
- Py_DECREF(c);
- PyDict_SetItemString(d, "ACCUM_ALPHA_SIZE",
- c=PyInt_FromLong(GDK_GL_ACCUM_ALPHA_SIZE));
- Py_DECREF(c);
-}