[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src/gtk gtkutils.c,1.2,1.3 gtkutils.h,1.2,1.3
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src/gtk gtkutils.c,1.2,1.3 gtkutils.h,1.2,1.3 |
Date: |
Sat, 22 Mar 2003 19:19:33 -0500 |
Update of /cvsroot/ayttm/ayttm/src/gtk
In directory subversions:/tmp/cvs-serv25327/src/gtk
Modified Files:
gtkutils.c gtkutils.h
Log Message:
remember window position
Index: gtkutils.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/gtk/gtkutils.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gtkutils.c 29 Jan 2003 19:19:23 -0000 1.2
+++ gtkutils.c 23 Mar 2003 00:19:31 -0000 1.3
@@ -35,3 +35,23 @@
gtk_pixmap_set(pixmap, tpx, tbx);
}
}
+
+void gtkut_widget_get_uposition(GtkWidget *widget, gint *px, gint *py)
+{
+ gint x, y;
+ gint sx, sy;
+
+ g_return_if_fail(widget != NULL);
+ g_return_if_fail(widget->window != NULL);
+
+ sx = gdk_screen_width();
+ sy = gdk_screen_height();
+
+ /* gdk_window_get_root_origin ever return *rootwindow*'s position */
+ gdk_window_get_root_origin(widget->window, &x, &y);
+
+ x %= sx; if (x < 0) x = 0;
+ y %= sy; if (y < 0) y = 0;
+ *px = x;
+ *py = y;
+}
Index: gtkutils.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/gtk/gtkutils.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gtkutils.h 29 Jan 2003 19:19:23 -0000 1.2
+++ gtkutils.h 23 Mar 2003 00:19:31 -0000 1.3
@@ -28,5 +28,5 @@
#include <gdk/gdk.h>
void gtkut_set_pixmap_from_xpm(char **xpm, GtkPixmap *pixmap);
-
+void gtkut_widget_get_uposition(GtkWidget *widget, gint *px, gint *py);
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src/gtk gtkutils.c,1.2,1.3 gtkutils.h,1.2,1.3,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.384,1.385 configure.in,1.378,1.379
- Next by Date:
[Ayttm-commits] CVS: ayttm/src chat_window.c,1.62,1.62.2.1
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.384,1.385 configure.in,1.378,1.379
- Next by thread:
[Ayttm-commits] CVS: ayttm/src chat_window.c,1.62,1.62.2.1
- Index(es):