sending events to the libpurple library without gtk or gnt

Ethan Blanton elb at pidgin.im
Fri Jul 2 11:04:21 EDT 2010


Siddharth Chandra spake unto us the following wisdom:
> Since Libpurple is a thread unsafe library, I wanted to know, how I can send
> UI requests like "send IM" and "status update" etc. without creating a new
> thread. I have gone through pidgin and finch code and have noticed that they
> register gtk and gnt callbacks to do so. I am not using any of these, so how
> can I get the same functionality?

I think you need to clarify your question.  Sending an IM is not a UI
request, for example.  If you want to send an IM, simply call
purple_conv_im_send (or whatever) at the point where you wish to send
an IM.

In the general case, you are not going to be able to get by without
callbacks.  The event-driven programming model simply requires them
for handling complex, multi-stage operations.

Ethan

-- 
The laws that forbid the carrying of arms are laws [that have no remedy
for evils].  They disarm only those who are neither inclined nor
determined to commit crimes.
		-- Cesare Beccaria, "On Crimes and Punishments", 1764
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: Digital signature
URL: <http://pidgin.im/pipermail/support/attachments/20100702/c82a5bb6/attachment.sig>


More information about the Support mailing list