guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd: how to raise a widget?]


From: David Pirotte
Subject: Re: [Fwd: how to raise a widget?]
Date: Thu, 11 Oct 2001 23:36:53 +0200

Marius Vollmer wrote:
> 
> David Pirotte <address@hidden> writes:
> 
> > does anyone know how to do it in guile-gtk (either another function,
> > either how to map gdk_window_raise)?
> 
> Add this to gdk-1.2.defs and recompile:
> 
>     (define-func gdk_window_raise
>       none
>       ((GdkWindow window)))
> 
> Also, submit a patch to the guile-gtk list. ;-)

i wish i could, but don't know how to produce a patch and i could not
compile, probably because i use guile-1.7.0 ?

;; -- make output

address@hidden:~/ftp/gnome/gnome-guile-0.21pre2/guile-gtk 23 $ make
guile -l ./gtk/config.scm -s ./build-guile-gtk -I . glue gdk-1.2.defs >tmpd && 
mv tmpd gdk-glue.c
(reading "gdk-1.2.defs")
guile -l ./gtk/config.scm -s ./build-guile-gtk -I . glue gtk-1.2.defs >tmpt && 
mv tmpt gtk-glue.c
(reading "gtk-1.2.defs")
(reading "gdk-1.2.defs")
cd . \
  && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
creating Makefile
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_REENTRANT 
-I/usr/include/gtk-1.2 -I/usr/incl            
ude/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include  -I/usr/local/include 
-I/usr/local/include  -I/usr/loc            
al/include   -g -O2 -c gdk-glue.c
rm -f .libs/gdk-glue.lo
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_REENTRANT -I/usr/include/gtk-1.2 
-I/usr/include/glib-1.2 -I/usr/lib/glib/incl             ude
-I/usr/X11R6/include -I/usr/local/include -I/usr/local/include 
-I/usr/local/include -g -O2 -c gdk-glue.c  -f             PIC -DPIC
-o .libs/gdk-glue.lo
gdk-glue.c: In function `sgtk_gdk_draw_string':
gdk-glue.c:976: warning: pointer/integer type mismatch in conditional expression
gdk-glue.c: In function `sgtk_gdk_draw_text_scm':
gdk-glue.c:1009: warning: pointer/integer type mismatch in conditional 
expression
gdk-glue.c: In function `sgtk_gdk_string_width':
gdk-glue.c:1054: warning: pointer/integer type mismatch in conditional 
expression
gdk-glue.c: In function `sgtk_gdk_pixmap_create_from_xpm':
gdk-glue.c:1210: warning: pointer/integer type mismatch in conditional 
expression
gdk-glue.c: In function `sgtk_gdk_font_load':
gdk-glue.c:1283: warning: pointer/integer type mismatch in conditional 
expression
gdk-glue.c: In function `sgtk_gdk_color_parse_interp':
gdk-glue.c:1354: warning: pointer/integer type mismatch in conditional 
expression
gdk-glue.c: In function `sgtk_gdk_string_extents':
gdk-glue.c:1417: warning: pointer/integer type mismatch in conditional 
expression
gdk-glue.c:1421: `SCM_LIST0' undeclared (first use in this function)
gdk-glue.c:1421: (Each undeclared identifier is reported only once
gdk-glue.c:1421: for each function it appears in.)
gdk-glue.c: In function `sgtk_g_timer_elapsed':
gdk-glue.c:2065: `SCM_LIST0' undeclared (first use in this function)
make: *** [gdk-glue.lo] Error 1
address@hidden:~/ftp/gnome/gnome-guile-0.21pre2/guile-gtk 24 $
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:739: checking for a BSD compatible install
configure:792: checking whether build environment is sane
configure:849: checking whether make sets ${MAKE}
configure:895: checking for working aclocal
configure:908: checking for working autoconf
configure:921: checking for working automake
configure:934: checking for working autoheader
configure:947: checking for working makeinfo
configure:968: checking for gcc
configure:1081: checking whether the C compiler (gcc  ) works
configure:1097: gcc -o conftest    conftest.c  1>&5
configure:1123: checking whether the C compiler (gcc  ) is a cross-compiler
configure:1128: checking whether we are using GNU C
configure:1137: gcc -E conftest.c
configure:1156: checking whether gcc accepts -g
configure:1188: checking for Cygwin environment
configure:1204: gcc -c -g -O2  conftest.c 1>&5
configure: In function `main':
configure:1200: `__CYGWIN32__' undeclared (first use in this function)
configure:1200: (Each undeclared identifier is reported only once
configure:1200: for each function it appears in.)
configure: failed program was:
#line 1193 "configure"
#include "confdefs.h"

int main() {

#ifndef __CYGWIN__
#define __CYGWIN__ __CYGWIN32__
#endif
return __CYGWIN__;
; return 0; }
configure:1221: checking for mingw32 environment
configure:1233: gcc -c -g -O2  conftest.c 1>&5
configure: In function `main':
configure:1229: `__MINGW32__' undeclared (first use in this function)
configure:1229: (Each undeclared identifier is reported only once
configure:1229: for each function it appears in.)
configure: failed program was:
#line 1226 "configure"
#include "confdefs.h"

int main() {
return __MINGW32__;
; return 0; }
configure:1250: checking how to run the C preprocessor
configure:1271: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1405: checking host system type
configure:1426: checking build system type
configure:1455: checking for ld used by GCC
configure:1523: checking if the linker (/usr/i486-suse-linux/bin/ld) is GNU ld
GNU ld version 2.10.91 (with BFD 2.10.91.0.4)
configure:1540: checking for /usr/i486-suse-linux/bin/ld option to reload 
object files
configure:1552: checking for BSD-compatible nm
configure:1590: checking whether ln -s works
configure:1611: checking how to recognise dependant libraries
configure:1784: checking for object suffix
configure:1790: gcc -c -g -O2  conftest.c 1>&5
configure:1810: checking for executable suffix
configure:1820: gcc -o conftest -g -O2   conftest.c  1>&5
configure:1851: checking command to parse /usr/bin/nm -B output
configure:1927: gcc -c -g -O2  conftest.c 1>&5
configure:1930: /usr/bin/nm -B conftest.o | sed -n -e 's/^.*[ 
]\([ABCDGISTW][ABCDGISTW]*\)[ ][ ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 
\3/p' > conftest.nm
configure:1981: gcc -o conftest -g -O2   conftest.c conftstm.o 1>&5
configure:2027: checking for dlfcn.h
configure:2037: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:2205: checking for ranlib
configure:2272: checking for strip
configure:2508: checking for objdir
configure:2535: checking for gcc option to produce PIC
configure:2687: checking if gcc PIC flag -fPIC works
configure:2701: gcc -c -g -O2 -fPIC -DPIC  conftest.c 1>&5
configure:2753: checking if gcc static flag -static works
configure:2768: gcc -o conftest -g -O2   -static conftest.c  1>&5
configure:2795: checking if gcc supports -c -o file.o
configure:2814: gcc -c -g -O2 -o out/conftest2.o  conftest.c 1>&5
configure:2843: checking if gcc supports -c -o file.lo
configure:2859: gcc -c -g -O2 -c -o conftest.lo  conftest.c 1>&5
configure:2908: checking if gcc supports -fno-rtti -fno-exceptions
configure:2921: gcc -c -g -O2 -fno-rtti -fno-exceptions -c conftest.c  
conftest.c 1>&5
configure:2948: checking whether the linker (/usr/i486-suse-linux/bin/ld) 
supports shared libraries
configure:3564: checking how to hardcode library paths into programs
configure:3592: checking whether stripping libraries is possible
configure:3606: checking dynamic linker characteristics
configure:3992: checking if libtool supports shared libraries
configure:4485: checking whether -lc should be explicitly linked in
configure:4492: gcc -c -g -O2  conftest.c 1>&5
configure:4505: gcc -shared conftest.o  -v -Wl,-soname -Wl,conftest -o conftest 
2>&1 | grep  -lc  >/dev/null 2>&1
configure:5083: checking how to run the C preprocessor
configure:5173: checking for pkg-config
configure:5515: checking for pkg-config
configure:5554: checking for pkg-config
configure:5635: checking for GNOME Platform
configure:5755: checking for libraries
configure:5887: checking for main in -lqthreads
configure:5902: gcc -o conftest -g -O2    conftest.c -lqthreads   1>&5
/usr/i486-suse-linux/bin/ld: cannot find -lqthreads
collect2: ld returned 1 exit status
configure: failed program was:
#line 5895 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
configure:5924: checking for qt_null in -lqt
configure:5943: gcc -o conftest -g -O2    conftest.c -lqt   1>&5
/usr/i486-suse-linux/bin/ld: cannot find -lqt
collect2: ld returned 1 exit status
configure: failed program was:
#line 5932 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char qt_null();

int main() {
qt_null()
; return 0; }
configure:5969: checking for main in -ltermcap
configure:5984: gcc -o conftest -g -O2    conftest.c -ltermcap   1>&5
/usr/i486-suse-linux/bin/ld: cannot find -ltermcap
collect2: ld returned 1 exit status
configure: failed program was:
#line 5977 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
configure:6005: checking for main in -lreadline
configure:6020: gcc -o conftest -g -O2    conftest.c -lreadline   1>&5
/usr/lib/libreadline.so: undefined reference to `tgetnum'
/usr/lib/libreadline.so: undefined reference to `tgoto'
/usr/lib/libreadline.so: undefined reference to `tgetflag'
/usr/lib/libreadline.so: undefined reference to `BC'
/usr/lib/libreadline.so: undefined reference to `tputs'
/usr/lib/libreadline.so: undefined reference to `PC'
/usr/lib/libreadline.so: undefined reference to `tgetent'
/usr/lib/libreadline.so: undefined reference to `UP'
/usr/lib/libreadline.so: undefined reference to `tgetstr'
collect2: ld returned 1 exit status
configure: failed program was:
#line 6013 "configure"
#include "confdefs.h"

int main() {
main()
; return 0; }
configure:6053: checking for guile-config
configure:6083: checking whether guile-config works
configure:6140: checking for sin in -lm
configure:6159: gcc -o conftest -g -O2    conftest.c -lm   1>&5
configure:6152: warning: conflicting types for built-in function `sin'
configure:6189: checking for guile libraries
configure:6193: checking for guile headers
configure:6402: checking whether guile works
configure:6417: gcc -o conftest -g -O2  -I/usr/local/include   conftest.c -lm  
-L/usr/local/lib -lguile -lcrypt -lm 1>&5
configure:6463: checking for thread_create in GThreadFunctions
configure:6479: gcc -c -g -O2  -D_REENTRANT -I/usr/include/gtk-1.2 
-I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include   
conftest.c 1>&5
configure: In function `main':
configure:6475: structure has no member named `thread_create'
configure: failed program was:
#line 6472 "configure"
#include "confdefs.h"
#include <glib.h>
int main() {
GThreadFunctions g; g.thread_create;
; return 0; }
configure:6512: checking for scm_internal_cwdr
configure:6540: gcc -o conftest -g -O2 -I/usr/local/include   conftest.c 
-L/usr/local/lib -lguile -lcrypt -lm -lm  1>&5
configure:6512: checking for scm_done_malloc
configure:6540: gcc -o conftest -g -O2 -I/usr/local/include   conftest.c 
-L/usr/local/lib -lguile -lcrypt -lm -lm  1>&5
configure:6512: checking for scm_reverse_x
configure:6540: gcc -o conftest -g -O2 -I/usr/local/include   conftest.c 
-L/usr/local/lib -lguile -lcrypt -lm -lm  1>&5
configure:6512: checking for scm_puts
configure:6540: gcc -o conftest -g -O2 -I/usr/local/include   conftest.c 
-L/usr/local/lib -lguile -lcrypt -lm -lm  1>&5
configure:6512: checking for scm_fdes_to_port
configure:6540: gcc -o conftest -g -O2 -I/usr/local/include   conftest.c 
-L/usr/local/lib -lguile -lcrypt -lm -lm  1>&5
configure:6512: checking for lt_dlopen
configure:6540: gcc -o conftest -g -O2 -I/usr/local/include   conftest.c 
-L/usr/local/lib -lguile -lcrypt -lm -lm  1>&5
configure:6512: checking for scm_simple_format
configure:6540: gcc -o conftest -g -O2 -I/usr/local/include   conftest.c 
-L/usr/local/lib -lguile -lcrypt -lm -lm  1>&5
configure:6566: checking for two argument scm_eval_x
configure:6578: gcc -c -g -O2 -I/usr/local/include  conftest.c 1>&5
configure:6605: checking for gtk_widget_peek_colormap
configure:6633: gcc -o conftest -g -O2 -I/usr/local/include   conftest.c  
-rdynamic -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -lgmodule -ldl -lXi -lXext 
-lX11 -lm -lgthread -lpthread -lglib  -lm  1>&5
/tmp/ccsn8uQJ.o: In function `main':
/usr/alto/staff/david/ftp/gnome/gnome-guile-0.21pre2/guile-gtk/configure:6627: 
undefined reference to `gtk_widget_peek_colormap'
collect2: ld returned 1 exit status
configure: failed program was:
#line 6610 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gtk_widget_peek_colormap(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gtk_widget_peek_colormap();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_gtk_widget_peek_colormap) || defined 
(__stub___gtk_widget_peek_colormap)
choke me
#else
gtk_widget_peek_colormap();
#endif

; return 0; }
configure:6605: checking for gtk_type_get_info
configure:6633: gcc -o conftest -g -O2 -I/usr/local/include   conftest.c  
-rdynamic -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -lgmodule -ldl -lXi -lXext 
-lX11 -lm -lgthread -lpthread -lglib  -lm  1>&5
/tmp/ccFzmXXk.o: In function `main':
/usr/alto/staff/david/ftp/gnome/gnome-guile-0.21pre2/guile-gtk/configure:6627: 
undefined reference to `gtk_type_get_info'
collect2: ld returned 1 exit status
configure: failed program was:
#line 6610 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gtk_type_get_info(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gtk_type_get_info();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_gtk_type_get_info) || defined (__stub___gtk_type_get_info)
choke me
#else
gtk_type_get_info();
#endif

; return 0; }
configure:6605: checking for gtk_signal_set_class_function_full
configure:6633: gcc -o conftest -g -O2 -I/usr/local/include   conftest.c  
-rdynamic -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -lgmodule -ldl -lXi -lXext 
-lX11 -lm -lgthread -lpthread -lglib  -lm  1>&5
/tmp/cclClxXF.o: In function `main':
/usr/alto/staff/david/ftp/gnome/gnome-guile-0.21pre2/guile-gtk/configure:6627: 
undefined reference to `gtk_signal_set_class_function_full'
collect2: ld returned 1 exit status
configure: failed program was:
#line 6610 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gtk_signal_set_class_function_full(); below.  
*/
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gtk_signal_set_class_function_full();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_gtk_signal_set_class_function_full) || defined 
(__stub___gtk_signal_set_class_function_full)
choke me
#else
gtk_signal_set_class_function_full();
#endif

; return 0; }
configure:6696: checking whether gnome-config.h sucks
;; -*- scheme -*-

;;; Gdk enums

(define-enum GdkWindowType
  (root GDK_WINDOW_ROOT)
  (toplevel GDK_WINDOW_TOPLEVEL)
  (child GDK_WINDOW_CHILD)
  (dialog GDK_WINDOW_DIALOG)
  (temp GDK_WINDOW_TEMP)
  (pixmap GDK_WINDOW_PIXMAP))

(define-enum GdkWindowClass
  (input-output GDK_INPUT_OUTPUT)
  (input-only GDK_INPUT_ONLY))

(define-enum GdkImageType
  (normal GDK_IMAGE_NORMAL)
  (shared GDK_IMAGE_SHARED)
  (fastest GDK_IMAGE_FASTEST))

(define-enum GdkVisualType
  (static-gray GDK_VISUAL_STATIC_GRAY)
  (grayscale GDK_VISUAL_GRAYSCALE)
  (static-color GDK_VISUAL_STATIC_COLOR)
  (pseudo-color GDK_VISUAL_PSEUDO_COLOR)
  (true-color GDK_VISUAL_TRUE_COLOR)
  (direct-color GDK_VISUAL_DIRECT_COLOR))

(define-flags GdkWindowAttributesType
  (title GDK_WA_TITLE)
  (x GDK_WA_X)
  (y GDK_WA_Y)
  (cursor GDK_WA_CURSOR)
  (colormap GDK_WA_COLORMAP)
  (visual GDK_WA_VISUAL))

(define-flags GdkWindowHints
  (pos GDK_HINT_POS)
  (min-size GDK_HINT_MIN_SIZE)
  (max-size GDK_HINT_MAX_SIZE))

(define-enum GdkFunction
  (copy GDK_COPY)
  (invert GDK_INVERT)
  (xor GDK_XOR))

(define-enum GdkFill
  (solid GDK_SOLID)
  (tiled GDK_TILED)
  (stippled GDK_STIPPLED)
  (opaque-stippled GDK_OPAQUE_STIPPLED))

(define-enum GdkLineStyle
  (solid GDK_LINE_SOLID)
  (on-off-dash GDK_LINE_ON_OFF_DASH)
  (double-dash GDK_LINE_DOUBLE_DASH))

(define-enum GdkCapStyle
  (not-last GDK_CAP_NOT_LAST)
  (butt GDK_CAP_BUTT)
  (round GDK_CAP_ROUND)
  (projecting GDK_CAP_PROJECTING))

(define-enum GdkJoinStyle
  (miter GDK_JOIN_MITER)
  (round GDK_JOIN_ROUND)
  (bevel GDK_JOIN_BEVEL))

(define-enum GdkCursorType
  (cursor GDK_LAST_CURSOR))

(define-enum GdkEventType
  (nothing GDK_NOTHING)
  (delete GDK_DELETE)
  (destroy GDK_DESTROY)
  (expose GDK_EXPOSE)
  (motion-notify GDK_MOTION_NOTIFY)
  (button-press GDK_BUTTON_PRESS)
  (2button-press GDK_2BUTTON_PRESS)
  (3button-press GDK_3BUTTON_PRESS)
  (button-release GDK_BUTTON_RELEASE)
  (key-press GDK_KEY_PRESS)
  (key-release GDK_KEY_RELEASE)
  (enter-notify GDK_ENTER_NOTIFY)
  (leave-notify GDK_LEAVE_NOTIFY)
  (focus-change GDK_FOCUS_CHANGE)
  (configure GDK_CONFIGURE)
  (map GDK_MAP)
  (unmap GDK_UNMAP)
  (property-notify GDK_PROPERTY_NOTIFY)
  (selection-clear GDK_SELECTION_CLEAR)
  (selection-request GDK_SELECTION_REQUEST)
  (selection-notify GDK_SELECTION_NOTIFY)
  (proximity-in GDK_PROXIMITY_IN)
  (proximity-out GDK_PROXIMITY_OUT)
  (drag-enter GDK_DRAG_ENTER)
  (drag-leave GDK_DRAG_LEAVE)
  (drag-motion GDK_DRAG_MOTION)
  (drag-status GDK_DRAG_STATUS)
  (drop-start GDK_DROP_START)
  (drop-finished GDK_DROP_FINISHED)
  (client-event GDK_CLIENT_EVENT)
  (visibility-notify GDK_VISIBILITY_NOTIFY)
  (no-expose GDK_NO_EXPOSE))

(define-flags GdkEventMask
  (exposure-mask GDK_EXPOSURE_MASK)
  (pointer-motion-mask GDK_POINTER_MOTION_MASK)
  (pointer-motion-hint-mask GDK_POINTER_MOTION_HINT_MASK)
  (button-motion-mask GDK_BUTTON_MOTION_MASK)
  (button1-motion-mask GDK_BUTTON1_MOTION_MASK)
  (button2-motion-mask GDK_BUTTON2_MOTION_MASK)
  (button3-motion-mask GDK_BUTTON3_MOTION_MASK)
  (button-press-mask GDK_BUTTON_PRESS_MASK)
  (button-release-mask GDK_BUTTON_RELEASE_MASK)
  (key-press-mask GDK_KEY_PRESS_MASK)
  (key-release-mask GDK_KEY_RELEASE_MASK)
  (enter-notify-mask GDK_ENTER_NOTIFY_MASK)
  (leave-notify-mask GDK_LEAVE_NOTIFY_MASK)
  (focus-change-mask GDK_FOCUS_CHANGE_MASK)
  (structure-mask GDK_STRUCTURE_MASK)
  (all-events-mask GDK_ALL_EVENTS_MASK))

(define-enum GdkNotifyType
  (ancestor GDK_NOTIFY_ANCESTOR)
  (virtual GDK_NOTIFY_VIRTUAL)
  (inferior GDK_NOTIFY_INFERIOR)
  (nonlinear GDK_NOTIFY_NONLINEAR)
  (nonlinear-virtual GDK_NOTIFY_NONLINEAR_VIRTUAL)
  (unknown GDK_NOTIFY_UNKNOWN))

(define-flags GdkModifierType
  (shift-mask GDK_SHIFT_MASK)
  (lock-mask GDK_LOCK_MASK)
  (control-mask GDK_CONTROL_MASK)
  (mod1-mask GDK_MOD1_MASK)
  (mod2-mask GDK_MOD2_MASK)
  (mod3-mask GDK_MOD3_MASK)
  (mod4-mask GDK_MOD4_MASK)
  (mod5-mask GDK_MOD5_MASK)
  (button1-mask GDK_BUTTON1_MASK)
  (button2-mask GDK_BUTTON2_MASK)
  (button3-mask GDK_BUTTON3_MASK)
  (button4-mask GDK_BUTTON4_MASK)
  (button5-mask GDK_BUTTON5_MASK))

(define-enum GdkSubwindowMode
  (clip-by-children GDK_CLIP_BY_CHILDREN)
  (include-inferiors GDK_INCLUDE_INFERIORS))

(define-flags GdkInputCondition
  (read GDK_INPUT_READ)
  (write GDK_INPUT_WRITE)
  (exception GDK_INPUT_EXCEPTION))

(define-enum GdkStatus
  (ok GDK_OK)
  (error GDK_ERROR)
  (error-param GDK_ERROR_PARAM)
  (error-file GDK_ERROR_FILE)
  (error-mem GDK_ERROR_MEM))

(define-enum GdkByteOrder
  (lsb-first GDK_LSB_FIRST)
  (msb-first GDK_MSB_FIRST))

(define-flags GdkGCValuesMask
  (foreground GDK_GC_FOREGROUND)
  (background GDK_GC_BACKGROUND)
  (font GDK_GC_FONT)
  (function GDK_GC_FUNCTION)
  (fill GDK_GC_FILL)
  (tile GDK_GC_TILE)
  (stipple GDK_GC_STIPPLE)
  (clip-mask GDK_GC_CLIP_MASK)
  (subwindow GDK_GC_SUBWINDOW)
  (ts-x-origin GDK_GC_TS_X_ORIGIN)
  (ts-y-origin GDK_GC_TS_Y_ORIGIN)
  (clip-x-origin GDK_GC_CLIP_X_ORIGIN)
  (clip-y-origin GDK_GC_CLIP_Y_ORIGIN)
  (exposures GDK_GC_EXPOSURES)
  (line-width GDK_GC_LINE_WIDTH)
  (line-style GDK_GC_LINE_STYLE)
  (cap-style GDK_GC_CAP_STYLE)
  (join-style GDK_GC_JOIN_STYLE))

(define-enum GdkSelection
  (primary GDK_SELECTION_PRIMARY)
  (secondary GDK_SELECTION_SECONDARY))

(define-enum GdkPropertyState
  (new-value GDK_PROPERTY_NEW_VALUE)
  (delete GDK_PROPERTY_DELETE))

(define-enum GdkPropMode
  (replace GDK_PROP_MODE_REPLACE)
  (prepend GDK_PROP_MODE_PREPEND)
  (append GDK_PROP_MODE_APPEND))

(define-enum GdkOverlapType
  (in GDK_OVERLAP_RECTANGLE_IN)
  (out GDK_OVERLAP_RECTANGLE_OUT)
  (part GDK_OVERLAP_RECTANGLE_PART))

(define-flags GdkWMDecoration
  (all GDK_DECOR_ALL)
  (border GDK_DECOR_BORDER)
  (resizeh GDK_DECOR_RESIZEH)
  (title GDK_DECOR_TITLE)
  (menu GDK_DECOR_MENU)
  (minimize GDK_DECOR_MINIMIZE)
  (maximize GDK_DECOR_MAXIMIZE))

(define-flags GdkWMFunction
  (all GDK_FUNC_ALL)
  (resize GDK_FUNC_RESIZE)
  (move GDK_FUNC_MOVE)
  (minimize GDK_FUNC_MINIMIZE)
  (maximize GDK_FUNC_MAXIMIZE)
  (close GDK_FUNC_CLOSE))

(define-enum GdkVisibilityState
  (unobscured GDK_VISIBILITY_UNOBSCURED)
  (partial GDK_VISIBILITY_PARTIAL)
  (fully-obscured GDK_VISIBILITY_FULLY_OBSCURED))

(define-enum GdkInputSource
  (mouse GDK_SOURCE_MOUSE)
  (pen GDK_SOURCE_PEN)
  (eraser GDK_SOURCE_ERASER)
  (cursor GDK_SOURCE_CURSOR))

;;; Gdk boxed types

(define-boxed GdkColormap
  (copy gdk_colormap_ref)
  (free gdk_colormap_unref))

(define-boxed GdkVisual
  (copy gdk_visual_ref)
  (free gdk_visual_unref))

(define-boxed GdkFont
  (copy gdk_font_ref)
  (free gdk_font_unref)
  (conversion "sgtk_font_conversion"))

(add-options GdkFont (conversion "sgtk_font_conversion"))

(define-boxed GdkWindow
  (copy gdk_window_ref)
  (free gdk_window_unref))

(define-boxed GdkEvent
  (copy gdk_event_copy)
  (free gdk_event_free)
  (size "sizeof(GdkEvent)"))

(define-boxed GdkColor
  (copy gdk_color_copy)
  (free gdk_color_free)
  (size "sizeof(GdkColor)")
  (fields (uint red)
          (uint green)
          (uint blue))
  (conversion "sgtk_color_conversion"))

(add-options GdkColor (conversion "sgtk_color_conversion"))

(define-struct GTimer
  (copy g_timer_fake_copy)
  (free g_timer_destroy)
  (size 0))

;;; GdkGC

(define-boxed GdkGC
  (copy gdk_gc_ref)
  (free gdk_gc_unref))

(define-func gdk_gc_new
  (GdkGC (copy #f))
  ((GdkWindow window)))

(define-func gdk_gc_set_foreground
  none
  ((GdkGC gc)
   (GdkColor color)))

(define-func gdk_gc_set_background
  none
  ((GdkGC gc)
   (GdkColor color)))

(define-func gdk_gc_set_font
  none
  ((GdkGC gc)
   (GdkFont font)))

(define-func gdk_gc_set_function
  none
  ((GdkGC gc)
   (GdkFunction function)))

(define-func gdk_gc_set_fill
  none
  ((GdkGC gc)
   (GdkFill fill)))

;(define-func gdk_gc_set_tile
;  none
;  ((GdkGC gc)
;   (GdkPixmap tile)))

;(define-func gdk_gc_set_stipple
;  none
;  ((GdkGC gc)
;   (GdkPixmap stipple)))

(define-func gdk_gc_set_ts_origin
  none
  ((GdkGC gc)
   (int x)
   (int y)))

(define-func gdk_gc_set_clip_origin
  none
  ((GdkGC gc)
   (int x)
   (int y)))

;(define-func gdk_gc_set_clip_mask
;  none
;  ((GdkGC gc)
;   (GdkBitmap mask)))

(define-func gdk_gc_set_subwindow
  none
  ((GdkGC gc)
   (GdkSubwindowMode mode)))

(define-func gdk_gc_set_exposures
  none
  ((GdkGC gc)
   (bool exposures)))

(define-func gdk_gc_set_line_attributes
  none
  ((GdkGC gc)
   (int line_width)
   (GdkLineStyle line_style)
   (GdkCapStyle cap_style)
   (GdkJoinStyle join_style)))

(define-func gdk_draw_point
  none
  ((GdkWindow window)
   (GdkGC gc)
   (int x)
   (int y)))

(define-func gdk_draw_line
  none
  ((GdkWindow window)
   (GdkGC gc)
   (int x1)
   (int y1)
   (int x2)
   (int y2)))

(define-func gdk_draw_lines
  none
  ((GdkWindow window)
   (GdkGC gc)
   ((cvecr point) points)))

(define-func gdk_draw_rectangle
  none
  ((GdkWindow window)
   (GdkGC gc)
   (bool filled)
   (int x)
   (int y)
   (int width)
   (int height)))

(define-func gdk_draw_polygon
  none
  ((GdkWindow window)
   (GdkGC gc)
   (bool filled)
   ((cvecr point) points)))

(define-func gdk_draw_arc
  none
  ((GdkWindow window)
   (GdkGC gc)
   (bool filled)
   (int x)
   (int y)
   (int width)
   (int height)
   (int angle1)
   (int angle2)))

(define-func gdk_draw_string
  none
  ((GdkWindow window)
   (GdkFont font)
   (GdkGC gc)
   (int x)
   (int y)
   (string string)))

(define-func gdk_draw_text_scm
  none
  ((GdkWindow window)
   (GdkFont font)
   (GdkGC gc)
   (int x)
   (int y)
   (string text))
  (scm-name "gdk-draw-text"))

(define-func gdk_draw_points
  none
  ((GdkWindow window)
   (GdkGC gc)
   ((cvecr point) points)))

(define-func gdk_string_width
  int
  ((GdkFont font)
   (string str)))

(define-func gdk_window_clear
  none
  ((GdkWindow window)))

(define-func gdk_window_clear_area
  none
  ((GdkWindow window)
   (int x)
   (int y)
   (int width)
   (int height)))

(define-func gdk_window_clear_area_e
  none
  ((GdkWindow window)
   (int x)
   (int y)
   (int width)
   (int height)))

(define-func gdk_pixmap_new
  GdkWindow
  ((GdkWindow window (null-ok))
   (int width)
   (int height)
   (int depth (= "-1"))))

(define-func gdk_pixmap_create_from_xpm
  GdkWindow
  ((GdkWindow window)
   ((ret GdkWindow) mask (null-ok))
   (GdkColor transparent_color (null-ok))
   (string filename)))

(define-func gdk_draw_pixmap
  none
  ((GdkWindow drawable)
   (GdkGC gc)
   (GdkWindow src)
   (int xsrc)
   (int ysrc)
   (int xdest)
   (int ydest)
   (int width)
   (int height)))

(define-func gdk_set_locale
  static_string
  ())

;; Gdk functions

(define-func gdk_font_load
  (GdkFont (copy #f))
  ((string name)))

(define-func gdk_flush
  none
  ())

;; beep 

(define-func gdk_beep
  none
  ())

;; Color

;; XXX lots missing

(define-func gdk_colormap_alloc_color
  bool
  ((GdkColormap colormap)
   (GdkColor color)
   (bool writeable)
   (bool best_match)))

(define-func gdk_color_parse_interp
  GdkColor
  ((string spec)))

(define-func gdk_color_intern
  GdkColor
  ((GdkColor color)))

(define-func gdk_font_intern
  GdkFont
  ((GdkFont font)))

(define-func gdk_string_extents
  (none (values (lbearing rbearing width ascent descent)))
  ((GdkFont font)
   (string string)
   (int lbearing)
   (int rbearing)
   (int width)
   (int ascent)
   (int descent)))

(define-func gdk_event_type
  GdkEventType
  ((GdkEvent event)))

(define-func gdk_event_window
  GdkWindow
  ((GdkEvent event)))

(define-func gdk_event_send_event
  bool
  ((GdkEvent event)))

(define-func gdk_event_area
  rect
  ((GdkEvent event)))

(define-func gdk_event_visibility_state
  GdkVisibilityState
  ((GdkEvent event)))

(define-func gdk_event_time
  uint
  ((GdkEvent event)))

(define-func gdk_event_x
  float
  ((GdkEvent event)))

(define-func gdk_event_y
  float
  ((GdkEvent event)))

(define-func gdk_event_pressure
  float
  ((GdkEvent event)))

(define-func gdk_event_xtilt
  float
  ((GdkEvent event)))

(define-func gdk_event_ytilt
  float
  ((GdkEvent event)))

(define-func gdk_event_button
  int
  ((GdkEvent event)))

(define-func gdk_event_state
  GdkModifierType
  ((GdkEvent event)))

(define-func gdk_event_is_hint
  bool
  ((GdkEvent event)))

(define-func gdk_event_source
  GdkInputSource
  ((GdkEvent event)))

(define-func gdk_event_deviceid
  uint
  ((GdkEvent event)))

(define-func gdk_event_x_root
  float
  ((GdkEvent event)))

(define-func gdk_event_y_root
  float
  ((GdkEvent event)))

(define-func gdk_event_keyval
  uint
  ((GdkEvent event)))

(define-func gdk_event_string
  string
  ((GdkEvent event)))

(define-func gdk_event_subwindow
  GdkWindow
  ((GdkEvent event)))

(define-func gdk_event_notify_detail
  GdkNotifyType
  ((GdkEvent event)))

(define-func gdk_event_in
  bool
  ((GdkEvent event)))

(define-func gdk_event_configure_x
  int
  ((GdkEvent event)))

(define-func gdk_event_configure_y
  int
  ((GdkEvent event)))

(define-func gdk_event_configure_width
  int
  ((GdkEvent event)))

(define-func gdk_event_configure_height
  int
  ((GdkEvent event)))

(define-func gdk_get_leader_window_id
  uint
  ())

(define-func gdk_window_get_id
  uint
  ((GdkWindow window)))

(define-func gdk_window_get_size_scm
  SCM
  ((GdkWindow window))
  (scm-name "gdk-window-get-size"))

(define-func gdk_window_get_origin_scm
  SCM
  ((GdkWindow window))
  (scm-name "gdk-window-get-origin"))

(define-func gdk_window_get_parent
  GdkWindow
  ((GdkWindow window)))

;; added 01.10.11 by drp based on marius suggestion
(define-func gdk_window_raise
  none
  ((GdkWindow window)))

;;; glib functions - timer

(define-func g_timer_new
  GTimer
  ())

(define-func g_timer_start
  none
  ((GTimer      timer)))

(define-func g_timer_stop
  none
  ((GTimer      timer)))

(define-func g_timer_reset
  none
  ((GTimer      timer)))

(define-func g_timer_elapsed
  (float (values (microseconds)))
  ((GTimer      timer)
   (long        microseconds)))

;;; Threads

(define-func gdk_threads_enter
  none
  ())

(define-func gdk_threads_leave
  none
  ())

;; gdkrgb

(define-func gdk_rgb_init
  none
  ())

(define-func gdk_rgb_get_cmap
  GdkColormap
  ())

(define-func gdk_rgb_get_visual
  GdkVisual
  ())

;; Options

(options
 (includes "#include <gtk-1.2/gdk/gdk.h>"
           "#include <gtk-1.2/gdk/gdkrgb.h>")
 (init-func "sgtk_init_gtk_gdk_glue"))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]