public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
* gdk-1.2.defs unimplemented stuff
@ 2003-08-05  0:31 Kevin Ryde
  0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2003-08-05  0:31 UTC (permalink / raw)
  To: guile-gtk

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-05  0:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-05  0:31 gdk-1.2.defs unimplemented stuff Kevin Ryde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).