Re: Newbie Question
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: Tomaz Canabrava <tumaix gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Newbie Question
- Date: Tue, 5 Apr 2005 19:45:53 +0200
On Tue, Apr 05, 2005 at 02:26:48PM -0300, Tomaz Canabrava wrote:
i have a function defined by
void window_createMatrix(int rows, int colums, float **pointerMatrix, );
and a button "WhatSoEver"
is there a way to use the function by clicking the button?
i try to use the g_connect_event(G_OBJECT(WhatSoEver), "clicked",
window_createMatrix, Parameters List);
but the g_connect_event only takes 4 parameters, and my function
requires 3 more.
You can create atrbitrary complex structure and pass
a pointer to it as user_data. The signal handler then
unpacks it and calls your function with the appropriate
arguments.
This is probably the single most frequently asked question
ever -- competing with `I installed GLib to /somewhere, but
forgot to add /somewhere/lib/pkgconfig to PKG_CONFIG_PATH.'
Maybe it could be added to the FAQ, even though it has
nothing to do with Gtk+, just with general programming in C.
Yeti
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]