From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15758 invoked by alias); 5 Aug 2003 00:31:36 -0000 Mailing-List: contact guile-gtk-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: guile-gtk-owner@sources.redhat.com Received: (qmail 15660 invoked from network); 5 Aug 2003 00:31:35 -0000 Received: from unknown (HELO snoopy.pacific.net.au) (61.8.0.36) by sources.redhat.com with SMTP; 5 Aug 2003 00:31:35 -0000 Received: from sunny.pacific.net.au (sunny.pacific.net.au [203.2.228.40]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.4) with ESMTP id h750VYdK024790 for ; Tue, 5 Aug 2003 10:31:34 +1000 Received: from wisma.pacific.net.au (wisma.pacific.net.au [210.23.129.72]) by sunny.pacific.net.au with ESMTP id h750VXCh019272 for ; Tue, 5 Aug 2003 10:31:33 +1000 (EST) Received: from localhost (ppp64.dyn228.pacific.net.au [203.143.228.64]) by wisma.pacific.net.au (8.12.9/8.12.9) with ESMTP id h750VVPs024487 for ; Tue, 5 Aug 2003 10:31:32 +1000 (EST) Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19jpjZ-0001CZ-00; Tue, 05 Aug 2003 10:31:25 +1000 To: guile-gtk@sources.redhat.com Subject: gdk-1.2.defs unimplemented stuff From: Kevin Ryde Mail-Copies-To: never Date: Tue, 05 Aug 2003 00:31:00 -0000 Message-ID: <87fzkh2bdu.fsf@zip.com.au> User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-q3/txt/msg00023.txt.bz2 I added some comments to the unimplemented functions at the top of gdk-1.2.defs. ;; void gdk_add_client_message_filter (GdkAtom mess_type, GdkFilterFunc func, ;; gpointer data); ;; This needs a GdkXEvent type and field accessors, and GdkEvent field ;; setters before it can do much useful. ;; ;; void gdk_exit(gint error_code); ;; Since currently Gtk is initialized when (gdk gdk) loads, applications ;; should call gtk-exit (which in gtk 1.2 does nothing but call gdk_exit ;; in fact). gdk-exit could be introduced if/when Gdk can be used ;; alone. ;; ;; void gdk_event_handler_set (GdkEventFunc func, gpointer data, ;; GDestroyNotify notify); ;; This is used by Gtk to implement gtk_main etc and so won't be useful ;; to normal applications, not unless/until Gdk can be used alone. ;; ;; void gdk_init(gint *argc,char ***argv); ;; This is done automatically when the gdk module is loaded, so really ;; doesn't need to be available separately. And manipulating the global ;; `program-arguments' should be enough for normal uses. ;; ;; gboolean gdk_init_check(gint *argc,char ***argv); ;; It might be nice to have this available, so an application can do ;; something if the X display is unreachable or whatever. A way to ;; catch an error from a normal (gtk gdk) module load would be another ;; possibility. ;; ;; void gdk_window_add_filter (GdkWindow *window, GdkFilterFunc function, ;; gpointer data); ;; void gdk_window_remove_filter (GdkWindow *window, GdkFilterFunc function, ;; gpointer data); ;; These need a GdkXEvent type and field accessors, and GdkEvent field ;; setters before they can do much useful. ;; ;; The aim would be to garbage collect the scheme filter function when ;; the window is destroyed, as happens for Gtk level signal handlers. ;; Unfortunately gtk 1.2 doesn't seem to offer any way to know when ;; that's happened for a window (gtk 2 does, since GdkWindow is a ;; GObject there). Maybe initially it'd be good enough to keep all ;; added filters alive until removal. This would be wanted for ;; window==NULL for a start, and applications could be asked to remove a ;; filter before the window is destroyed. (Failing to do so would ;; merely mean filter procs kept alive but never called.) ;; ;; void gdk_window_get_user_data (GdkWindow *window, gpointer *data); ;; void gdk_window_set_user_data (GdkWindow *window, gpointer data); ;; Gtk uses this user data to point to the GtkWidget owning the window, ;; ready for event dispatch, and it doesn't seem to have much error ;; checking, so anything else in the user data is likely to cause ;; problems. On that basis these functions have no use unless/until Gdk ;; can be used alone. A more scheme-like approach might be to get ;; GdkWindow objects represented uniquely (like GtkObject), so ;; applications can use object properties etc. ;; ;; GdkPropertyState gdk_event_property_state (GdkEvent *event); ;; Field accessor for property.state, as per gdk_event_visibility_state.