Re: Deprecated calls in libzvt
- From: Deepa <deepa chacko wipro com>
- To: jacob berkman <jacob ximian com>
- Cc: desktop-devel-list <desktop-devel-list gnome org>
- Subject: Re: Deprecated calls in libzvt
- Date: Tue, 05 Feb 2002 19:54:19 +0530
Hi
I have removed the deprecated GTK/GDK calls in libzvt. I have not changed
GdkFont. Attached is the patch for the same.
Thanks
Deepa
jacob berkman wrote:
> On Mon, 2002-02-04 at 02:34, Deepa wrote:
> > Hi
> >
> > libzvt still uses gtk_signal_connect, gtk_signal_new, gtk_signal_emit
> > etc which are deprecated (gives errors when compiled with
> > -DGTK_DISABLE_DEPRECATED). Can I change these to use the corresponding
> > g_signal functions?
>
> i'd take a patch for this.
>
> > It also uses GdkFont which is again deprecated. Should this be ported to
> > use Pango?
>
> i am pretty sure pango wouldn't be the right thing to use here.
>
> jacob
> --
> "In fact, can you imagine anything more terrifying than a zombie clown?"
> -- moby
--- libzvt/zvtterm.c Tue Jan 22 07:49:20 2002
+++ libzvt_wip/zvtterm.c Tue Feb 5 10:23:18 2002
@@ -65,7 +65,6 @@
static void zvt_term_init (ZvtTerm *term);
static void zvt_term_class_init (ZvtTermClass *class);
static void zvt_term_init (ZvtTerm *term);
-static void zvt_term_destroy (GtkObject *object);
static void zvt_term_realize (GtkWidget *widget);
static void zvt_term_unrealize (GtkWidget *widget);
static void zvt_term_map (GtkWidget *widget);
@@ -156,18 +155,23 @@
static guint term_type = 0;
if (!term_type) {
- GtkTypeInfo term_info = {
- "ZvtTerm",
- sizeof (ZvtTerm),
+ GTypeInfo term_info = {
sizeof (ZvtTermClass),
- (GtkClassInitFunc) zvt_term_class_init,
- (GtkObjectInitFunc) zvt_term_init,
- NULL,
+ (GBaseInitFunc)0,
+ (GBaseFinalizeFunc)0,
+ (GClassInitFunc) zvt_term_class_init,
+ (GClassFinalizeFunc)0,
NULL,
+ sizeof (ZvtTerm),
+ 0,
+ (GInstanceInitFunc) zvt_term_init,
NULL
};
- term_type = gtk_type_unique (gtk_widget_get_type (), &term_info);
+ term_type = g_type_register_static (gtk_widget_get_type (),
+ "ZvtTerm",
+ &term_info,
+ 0);
}
return term_type;
@@ -177,85 +181,91 @@
static void
zvt_term_class_init (ZvtTermClass *class)
{
- GtkObjectClass *object_class;
+ GObjectClass *object_class;
GtkWidgetClass *widget_class;
ZvtTermClass *term_class;
GtkBindingSet *binding_set;
- object_class = (GtkObjectClass*) class;
+ object_class = (GObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
term_class = (ZvtTermClass*) class;
parent_class = gtk_type_class (gtk_widget_get_type ());
term_signals[CHILD_DIED] =
- gtk_signal_new ("child_died",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ZvtTermClass, child_died),
- gtk_signal_default_marshaller,
- GTK_TYPE_NONE, 0);
+ g_signal_new ("child_died",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ZvtTermClass, child_died),
+ NULL,
+ NULL,
+ zvt_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
term_signals[TITLE_CHANGED] =
- gtk_signal_new ("title_changed",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ZvtTermClass, title_changed),
- /*
- gnome_marshal_VOID__INT_POINTER,
- */
- zvt_marshal_VOID__INT_POINTER,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_INT,
- GTK_TYPE_POINTER);
+ g_signal_new ("title_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ZvtTermClass, title_changed),
+ NULL,
+ NULL,
+ zvt_marshal_VOID__INT_POINTER,
+ G_TYPE_NONE, 2,
+ G_TYPE_INT,
+ G_TYPE_POINTER);
term_signals[GOT_OUTPUT] =
- gtk_signal_new ("got_output",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ZvtTermClass, got_output),
- /*
- gnome_marshal_VOID__POINTER_INT,
- */
- gtk_marshal_VOID__POINTER_INT,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_POINTER,
- GTK_TYPE_INT);
+ g_signal_new ("got_output",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (ZvtTermClass, got_output),
+ NULL,
+ NULL,
+ zvt_marshal_VOID__POINTER_INT,
+ G_TYPE_NONE, 2,
+ G_TYPE_POINTER,
+ G_TYPE_INT);
term_signals[COPY_CLIPBOARD] =
- gtk_signal_new ("copy_clipboard",
- GTK_RUN_LAST | GTK_RUN_ACTION,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ZvtTermClass, copy_clipboard),
- gtk_marshal_VOID__VOID,
- GTK_TYPE_NONE, 0);
+ g_signal_new ("copy_clipboard",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (ZvtTermClass, copy_clipboard),
+ NULL,
+ NULL,
+ zvt_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
term_signals[PASTE_CLIPBOARD] =
- gtk_signal_new ("paste_clipboard",
- GTK_RUN_LAST | GTK_RUN_ACTION,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ZvtTermClass, paste_clipboard),
- gtk_marshal_VOID__VOID,
- GTK_TYPE_NONE, 0);
+ g_signal_new ("paste_clipboard",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (ZvtTermClass, paste_clipboard),
+ NULL,
+ NULL,
+ zvt_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
term_signals[SCROLL] =
- gtk_signal_new ("scroll",
- GTK_RUN_LAST | GTK_RUN_ACTION,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ZvtTermClass,scroll),
- gtk_marshal_VOID__INT,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_INT);
+ g_signal_new ("scroll",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (ZvtTermClass,scroll),
+ NULL,
+ NULL,
+ zvt_marshal_VOID__INT,
+ G_TYPE_NONE, 1,
+ G_TYPE_INT);
term_signals[SELECTION_CHANGED] =
- gtk_signal_new ("selection_changed",
- GTK_RUN_LAST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (ZvtTermClass, selection_changed),
- gtk_marshal_VOID__VOID,
- GTK_TYPE_NONE, 0);
-
- object_class->destroy = zvt_term_destroy;
+ g_signal_new ("selection_changed",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ZvtTermClass, selection_changed),
+ NULL,
+ NULL,
+ zvt_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
widget_class->realize = zvt_term_realize;
widget_class->unrealize = zvt_term_unrealize;
@@ -386,7 +396,7 @@
zp->queue_green = 0;
zp->queue_blue = 0;
- gtk_object_set_data(GTK_OBJECT (term), "_zvtprivate", zp);
+ g_object_set_data(G_OBJECT (term), "_zvtprivate", zp);
/* charwidth, charheight set here */
zvt_term_set_font_name (term, DEFAULT_FONT);
@@ -394,13 +404,13 @@
/* scrollback position adjustment */
term->adjustment =
GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 1.0, 1.0, 1.0, 1.0));
- gtk_object_ref (GTK_OBJECT (term->adjustment));
+ g_object_ref (G_OBJECT (term->adjustment));
gtk_object_sink (GTK_OBJECT (term->adjustment));
- gtk_signal_connect (
- GTK_OBJECT (term->adjustment),
+ g_signal_connect (
+ G_OBJECT (term->adjustment),
"value_changed",
- GTK_SIGNAL_FUNC (zvt_term_scrollbar_moved),
+ G_CALLBACK (zvt_term_scrollbar_moved),
term);
/* selection received */
@@ -579,7 +589,7 @@
zvt_term_new_with_size (int cols, int rows)
{
ZvtTerm *term;
- term = gtk_type_new (zvt_term_get_type ());
+ term = g_object_new (zvt_term_get_type (), NULL);
/* fudge the pixel size, not (really) used anyway */
vt_resize (&term->vx->vt, cols, rows, cols*8, rows*8);
@@ -605,84 +615,10 @@
zvt_term_new (void)
{
ZvtTerm *term;
- term = gtk_type_new (zvt_term_get_type ());
+ term = g_object_new (zvt_term_get_type (), NULL);
return GTK_WIDGET (term);
}
-static void
-zvt_term_destroy (GtkObject *object)
-{
- ZvtTerm *term;
- struct _zvtprivate *zp;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (ZVT_IS_TERM (object));
-
- term = ZVT_TERM (object);
- zp = _ZVT_PRIVATE(term);
-
- if (!zp)
- return;
-
- if (term->timeout_id != -1) {
- gtk_timeout_remove(term->timeout_id);
- term->timeout_id = -1;
- }
-
- zvt_term_closepty (term);
- vtx_destroy (term->vx);
- term->vx = NULL;
-
- if (term->font) {
- gdk_font_unref (term->font);
- term->font = NULL;
- }
-
- if (term->font_bold) {
- gdk_font_unref (term->font_bold);
- term->font_bold = NULL;
- }
-
- /* release the adjustment */
- if (term->adjustment) {
- gtk_signal_disconnect_by_data (GTK_OBJECT (term->adjustment), term);
- gtk_object_unref (GTK_OBJECT (term->adjustment));
- term->adjustment = NULL;
- }
-
- /* Deprecated */
- /*
- if (term->ic) {
- gdk_ic_destroy(term->ic);
- term->ic = NULL;
- }
- */
-
- /* release private data */
- if (zp) {
- if (zp->text_expand)
- g_free(zp->text_expand);
- if (zp->bold_save)
- gdk_pixmap_unref(zp->bold_save);
- if (zp->paste)
- g_free(zp->paste);
- if (zp->paste_id != -1)
- gdk_input_remove(zp->paste_id);
-
- if (zp->queue_red)
- g_free(zp->queue_red);
- if (zp->queue_green)
- g_free(zp->queue_green);
- if (zp->queue_blue)
- g_free(zp->queue_blue);
-
- g_free(zp);
- gtk_object_set_data (GTK_OBJECT (term), "_zvtprivate", 0);
- }
-
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
/**
* zvt_term_reset:
@@ -903,7 +839,7 @@
&widget->style->bg[GTK_STATE_ACTIVE],
0, 0);
gdk_window_set_cursor(widget->window, term->cursor_bar);
- gdk_pixmap_unref (cursor_dot_pm);
+ g_object_unref (cursor_dot_pm);
zp->cursor_hand = gdk_cursor_new(GDK_HAND2);
term->cursor_current = term->cursor_bar;
@@ -975,13 +911,13 @@
zp = _ZVT_PRIVATE(term);
/* free resources */
- gdk_cursor_destroy (term->cursor_bar);
+ gdk_cursor_unref (term->cursor_bar);
term->cursor_bar = NULL;
- gdk_cursor_destroy (term->cursor_dot);
+ gdk_cursor_unref (term->cursor_dot);
term->cursor_dot = NULL;
- gdk_cursor_destroy (zp->cursor_hand);
+ gdk_cursor_unref (zp->cursor_hand);
zp->cursor_hand = NULL;
term->cursor_current = NULL;
@@ -994,13 +930,13 @@
gdk_colormap_unref(term->color_map);
- gdk_gc_destroy (term->scroll_gc);
+ gdk_gc_unref (term->scroll_gc);
term->scroll_gc = NULL;
- gdk_gc_destroy (term->back_gc);
+ gdk_gc_unref (term->back_gc);
term->back_gc = NULL;
- gdk_gc_destroy (term->fore_gc);
+ gdk_gc_unref (term->fore_gc);
term->fore_gc = NULL;
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
@@ -1372,7 +1308,7 @@
int depth;
if (zp->bold_save)
- gdk_pixmap_unref(zp->bold_save);
+ g_object_unref(zp->bold_save);
gdk_window_get_geometry(GTK_WIDGET(term)->window,NULL,NULL,NULL,NULL,&depth);
zp->bold_save = gdk_pixmap_new(GTK_WIDGET(term)->window,
@@ -1459,11 +1395,11 @@
}
if (rest) {
- g_string_sprintf (outname, "%s-medium-r%s", newname->str, rest);
+ g_string_printf (outname, "%s-medium-r%s", newname->str, rest);
font = gdk_font_load (outname->str);
d( printf("loading normal font %s\n", outname->str) );
- g_string_sprintf (outname, "%s-bold-r%s", newname->str, rest);
+ g_string_printf (outname, "%s-bold-r%s", newname->str, rest);
font_bold = gdk_font_load (outname->str);
d( printf("loading bold font %s\n", outname->str) );
@@ -1498,7 +1434,7 @@
GTK_ADJUSTMENT(term->adjustment)->page_size =
term->vx->vt.height - 1;
- gtk_signal_emit_by_name (GTK_OBJECT (term->adjustment), "changed");
+ g_signal_emit_by_name (G_OBJECT (term->adjustment), "changed");
}
static void
@@ -2728,7 +2664,7 @@
g_return_if_fail (term != NULL);
g_return_if_fail (ZVT_IS_TERM (term));
- gtk_signal_emit(GTK_OBJECT(term), term_signals[TITLE_CHANGED], type, str);
+ g_signal_emit(G_OBJECT(term), term_signals[TITLE_CHANGED], 0, type, str);
}
/* emit the got_output signal */
@@ -2738,7 +2674,7 @@
g_return_if_fail (term != NULL);
g_return_if_fail (ZVT_IS_TERM (term));
- gtk_signal_emit(GTK_OBJECT(term), term_signals[GOT_OUTPUT],
+ g_signal_emit(G_OBJECT(term), term_signals[GOT_OUTPUT], 0,
buffer, count);
}
@@ -2791,8 +2727,8 @@
saveerrno = errno;
vt_parse_vt (&vx->vt, buffer, count);
- if (gtk_signal_handler_pending(GTK_OBJECT(term),
- term_signals[GOT_OUTPUT], TRUE))
+ if (g_signal_has_handler_pending(G_OBJECT(term),
+ term_signals[GOT_OUTPUT], 0, TRUE))
zvt_term_got_output(term, buffer, count);
}
@@ -2891,7 +2827,7 @@
zvt_term_closepty (term);
/* signal application FIXME: include error/non error code */
- gtk_signal_emit (GTK_OBJECT(term), term_signals[CHILD_DIED]);
+ g_signal_emit (G_OBJECT(term), term_signals[CHILD_DIED], 0);
}
/**
@@ -2929,7 +2865,7 @@
zvt_term_background_set_pixmap_file(b, pixmap_file);
} else if (transparent) {
b = zvt_term_background_new(terminal);
- zvt_term_background_set_pixmap_atom(b, GDK_ROOT_PARENT(),
+ zvt_term_background_set_pixmap_atom(b, gdk_get_default_root_window(),
gdk_atom_intern("_XROOTPMAP_ID", TRUE));
zvt_term_background_set_translate(b, ZVT_BGTRANSLATE_ROOT, 0, 0);
}
@@ -3051,7 +2987,7 @@
f = term->font;
overstrike = 1;
if (zp && zp->bold_save) {
- gdk_draw_pixmap(zp->bold_save, term->fore_gc, GTK_WIDGET(term)->window,
+ gdk_draw_drawable(zp->bold_save, term->fore_gc, GTK_WIDGET(term)->window,
x + offx + len*term->charwidth, offy + row*term->charheight,
0, 0, 1, term->charheight);
}
@@ -3261,7 +3197,7 @@
}
if (overstrike && zp && zp->bold_save) {
- gdk_draw_pixmap(GTK_WIDGET(term)->window,
+ gdk_draw_drawable(GTK_WIDGET(term)->window,
term->fore_gc,
zp->bold_save,
0, 0,
@@ -3304,7 +3240,7 @@
offy = widget->style->ythickness;
/* "scroll" area */
- gdk_draw_pixmap(widget->window,
+ gdk_draw_drawable(widget->window,
term->scroll_gc, /* must use this to generate expose events */
widget->window,
offx, offy+(firstrow+offset)*term->charheight,
@@ -3372,7 +3308,7 @@
static void
vt_selection_changed (void *user_data)
{
- gtk_signal_emit_by_name (GTK_OBJECT (user_data), "selection_changed");
+ g_signal_emit_by_name (G_OBJECT (user_data), "selection_changed");
}
--- libzvt/zterm.c Tue Aug 14 22:19:38 2001
+++ libzvt_wip/zterm.c Tue Feb 5 07:42:02 2002
@@ -79,7 +79,7 @@
str = zvt_term_match_check(term, x/term->charwidth, y/term->charheight,(void *)&data);
if (str) {
- gtk_signal_emit_stop_by_name (GTK_OBJECT (term), "button_press_event");
+ g_signal_stop_emission_by_name (G_OBJECT (term), "button_press_event");
printf("User clicked on type '%s' -> '%s'\n", data, str);
return TRUE;
}
@@ -216,34 +216,34 @@
zvt_term_match_add (ZVT_TERM (term), "file://[^ ]*[^\\.]", VTATTR_REVERSE, "file");
zvt_term_match_add (ZVT_TERM (term), "[0-9\\.]*", VTATTR_BOLD, "ip #");
- gtk_signal_connect (
- GTK_OBJECT (term),
+ g_signal_connect (
+ G_OBJECT (term),
"button_press_event",
- GTK_SIGNAL_FUNC (button_press_event),
+ G_CALLBACK (button_press_event),
NULL);
- gtk_signal_connect (
- GTK_OBJECT (term),
+ g_signal_connect (
+ G_OBJECT (term),
"child_died",
- GTK_SIGNAL_FUNC (child_died_event),
+ G_CALLBACK (child_died_event),
NULL);
- gtk_signal_connect (
- GTK_OBJECT (term),
+ g_signal_connect (
+ G_OBJECT (term),
"destroy",
- GTK_SIGNAL_FUNC (child_died_event),
+ G_CALLBACK (child_died_event),
NULL);
- gtk_signal_connect (
- GTK_OBJECT (term),
+ g_signal_connect (
+ G_OBJECT (term),
"title_changed",
- GTK_SIGNAL_FUNC (title_changed_event),
+ G_CALLBACK (title_changed_event),
NULL);
- gtk_signal_connect_after (
- GTK_OBJECT (term),
+ g_signal_connect_after (
+ G_OBJECT (term),
"realize",
- GTK_SIGNAL_FUNC (set_hints),
+ G_CALLBACK (set_hints),
term);
gtk_widget_show (term);
--- libzvt/background.c Mon Jan 14 17:24:03 2002
+++ libzvt_wip/background.c Tue Feb 5 07:42:26 2002
@@ -89,15 +89,15 @@
pp = pixmap_from_atom(win, pmap);
if (pp) {
- gdk_window_get_size(pp, &pwidth, &pheight);
+ gdk_drawable_get_size(pp, &pwidth, &pheight);
pb = gdk_pixbuf_get_from_drawable(NULL,
pp,
- gdk_window_get_colormap(win),
+ gdk_drawable_get_colormap(win),
0, 0, 0, 0,
pwidth, pheight);
/* Theoretically this should not destroy the pixmap on X, otherwise
* we'll need another hack like pixmap_free_atom */
- gdk_pixmap_unref(pp);
+ g_object_unref(pp);
return pb;
}
return NULL;
@@ -195,7 +195,7 @@
}
w = g_malloc0(sizeof(*w));
vt_list_new(&w->watchlist);
- gdk_window_ref(win);
+ g_object_ref(win);
w->win = win;
w->propmask = gdk_window_get_events(win);
gdk_window_add_filter(win, zvt_filter_prop_change, w);
@@ -234,7 +234,7 @@
if (vt_list_empty(&w->watchlist)) {
gdk_window_set_events(w->win, w->propmask);
gdk_window_remove_filter(w->win, zvt_filter_prop_change, w);
- gdk_window_unref(w->win);
+ g_object_unref(w->win);
vt_list_remove((struct vt_listnode *)w);
g_free(w);
}
@@ -249,17 +249,17 @@
struct _zvtprivate *zp = _ZVT_PRIVATE(term);
zp->background_watchsig =
- gtk_signal_connect(GTK_OBJECT (gtk_widget_get_toplevel(GTK_WIDGET(term))),
- "configure_event",
- GTK_SIGNAL_FUNC(zvt_configure_window),
- GTK_OBJECT(term));
+ g_signal_connect(G_OBJECT (gtk_widget_get_toplevel(GTK_WIDGET(term))),
+ "configure_event",
+ G_CALLBACK(zvt_configure_window),
+ G_OBJECT(term));
}
static void
zvt_unwatch_move(ZvtTerm *term)
{
struct _zvtprivate *zp = _ZVT_PRIVATE(term);
- gtk_signal_disconnect(GTK_OBJECT (gtk_widget_get_toplevel(GTK_WIDGET(term))), zp->background_watchsig);
+ g_signal_handler_disconnect(G_OBJECT (gtk_widget_get_toplevel(GTK_WIDGET(term))), zp->background_watchsig);
}
/*
@@ -334,11 +334,11 @@
case ZVT_BGTYPE_NONE: /* no background */
break;
case ZVT_BGTYPE_ATOM: /* pixmap id contained in atom */
- gdk_window_unref(b->data.atom.window);
+ g_object_unref(b->data.atom.window);
break;
case ZVT_BGTYPE_PIXMAP: /* normal pixmap */
if (b->data.pixmap.pixmap)
- gdk_pixmap_unref(b->data.pixmap.pixmap);
+ g_object_unref(b->data.pixmap.pixmap);
if (b->data.pixmap.cmap)
gdk_colormap_unref(b->data.pixmap.cmap);
break;
@@ -351,7 +351,7 @@
}
b->data.pixmap.pixmap = p;
if (p)
- gdk_pixmap_ref(p);
+ g_object_ref(p);
b->data.pixmap.cmap = cmap;
if (cmap)
gdk_colormap_ref(cmap);
@@ -373,7 +373,7 @@
{
zvt_term_background_set_pixmap(b, 0, 0);
b->data.atom.atom = atom;
- gdk_window_ref(win);
+ g_object_ref(win);
b->data.atom.window = win;
b->type = ZVT_BGTYPE_ATOM;
}
@@ -675,7 +675,7 @@
int width, height;
if (pixbuf==NULL && pixmap!=NULL) {
int pwidth, pheight;
- gdk_window_get_size(pixmap, &pwidth, &pheight);
+ gdk_drawable_get_size(pixmap, &pwidth, &pheight);
pixbuf = gdk_pixbuf_get_from_drawable(0, pixmap, cmap, 0, 0, 0, 0, pwidth, pheight);
/* free the pixmap? */
}
@@ -797,7 +797,7 @@
0, 0,
&x, &y,
&childret);
- gdk_window_get_size(GTK_WIDGET(term)->window, &width, &height);
+ gdk_drawable_get_size(GTK_WIDGET(term)->window, &width, &height);
d(printf("configure event, pos %d,%d size %d-%d\n", x, y, width, height));
d(printf("last was at %d,%d %d-%d\n", b->pos.x, b->pos.y, b->pos.w, b->pos.h));
--- libzvt/libzvt.h Mon Jan 21 02:04:12 2002
+++ libzvt_wip/libzvt.h Tue Feb 5 10:06:54 2002
@@ -203,7 +203,7 @@
};
/* *** DO NOT USE THIS IN APPS! *** */
-#define _ZVT_PRIVATE(term) ((struct _zvtprivate *)gtk_object_get_data (GTK_OBJECT (term), "_zvtprivate"))
+#define _ZVT_PRIVATE(term) ((struct _zvtprivate *)g_object_get_data (G_OBJECT (term), "_zvtprivate"))
/* options for fork */
#define ZVT_TERM_DO_UTMP_LOG 1
--- libzvt/zvt-marshal.list Mon Jan 21 02:04:12 2002
+++ libzvt_wip/zvt-marshal.list Tue Feb 5 10:23:31 2002
@@ -1 +1,4 @@
VOID:INT,POINTER
+VOID:POINTER,INT
+VOID:VOID
+VOID:INT
**************************Disclaimer************************************
Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged' and 'confidential' and intended for use only by the
individual or entity to which it is addressed. You are notified that any
use, copying or dissemination of the information contained in the E-MAIL
in any manner whatsoever is strictly prohibited.
********************************************************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]