plugins/perl/common/Account.xs

Sun, 17 Oct 2004 23:55:49 +0000

author
Sean Egan <seanegan@pidgin.im>
date
Sun, 17 Oct 2004 23:55:49 +0000
changeset 10108
0897c42d6cb9
parent 8838
c23227da7b4a
child 10404
9d66d897e96d
permissions
-rw-r--r--

[gaim-migrate @ 11141]
Two things:
a. Added Enter as a gtk_binding to GtkIMHtml. This fixes everything.
Input methods now work. The "Enter sends" and "Ctrl-Enter sends" preferences
were removed and defaulted to yes and no respectively, BUT, in a very super-cool
turn of events, you can now add your own bindings to .gtkrc to make WHATEVER
YOU WANT send. Awesome. Someone should use g_signal_accumulator_true_handled
or something to make profiles and away messages able to insert newlines.

b. Removed "Use multi-colored screennames in chats," defaulted to yes, and
wrote a nifty algorithm to automatically adjust the colors to accomodate the
background (see http://gaim.sf.net/sean/porn-chat.png). People should play
around and tweak it a bit. The algorithm takes into consideration the
luminosity of the current background and the base hue to use for the screenname
in generating the new colors. Note that it does this while maintaining the hues.
Someone should optimize this so it skips over the floating point arithmatic when
the background color is white.

#include "module.h"

MODULE = Gaim::Account  PACKAGE = Gaim::Account  PREFIX = gaim_account_
PROTOTYPES: ENABLE

Gaim::Connection
gaim_account_connect(account)
	Gaim::Account account

void
gaim_account_disconnect(account)
	Gaim::Account account

void
gaim_account_set_username(account, username)
	Gaim::Account account
	const char *username

void
gaim_account_set_password(account, password)
	Gaim::Account account
	const char *password

void
gaim_account_set_alias(account, alias)
	Gaim::Account account
	const char *alias

void
gaim_account_set_user_info(account, user_info)
	Gaim::Account account
	const char *user_info
CODE:
	gaim_account_set_user_info(account, user_info);
	serv_set_info(gaim_account_get_connection(account), user_info);

void
gaim_account_set_buddy_icon(account, buddy_icon)
	Gaim::Account account
	const char *buddy_icon

void
gaim_account_set_protocol_id(account, protocol_id)
	Gaim::Account account
	const char *protocol_id

void
gaim_account_set_remember_password(account, value)
	Gaim::Account account
	gboolean value

void
gaim_account_set_check_mail(account, value)
	Gaim::Account account
	gboolean value

void
gaim_account_set_auto_login(account, ui, value)
	Gaim::Account account
	const char *ui
	gboolean value

gboolean
gaim_account_is_connected(account)
	Gaim::Account account

const char *
gaim_account_get_username(account)
	Gaim::Account account

const char *
gaim_account_get_password(account)
	Gaim::Account account

const char *
gaim_account_get_alias(account)
	Gaim::Account account

const char *
gaim_account_get_user_info(account)
	Gaim::Account account

const char *
gaim_account_get_buddy_icon(account)
	Gaim::Account account

const char *
gaim_account_get_protocol_id(account)
	Gaim::Account account

Gaim::Connection
gaim_account_get_connection(account)
	Gaim::Account account

gboolean
gaim_account_get_remember_password(account)
	Gaim::Account account

gboolean
gaim_account_get_check_mail(account)
	Gaim::Account account

gboolean
gaim_account_get_auto_login(account, ui)
	Gaim::Account account
	const char *ui


MODULE = Gaim::Account  PACKAGE = Gaim::Accounts  PREFIX = gaim_accounts_

void
gaim_accounts_add(account)
	Gaim::Account account

void
gaim_accounts_remove(account)
	Gaim::Account account

Gaim::Account
find(name, protocol_id)
	const char *name
	const char *protocol_id
CODE:
	RETVAL = gaim_accounts_find(name, protocol_id);
OUTPUT:
	RETVAL

void *
handle()
CODE:
	RETVAL = gaim_accounts_get_handle();
OUTPUT:
	RETVAL


MODULE = Gaim::Account  PACKAGE = Gaim

void
accounts()
PREINIT:
	GList *l;
PPCODE:
	for (l = gaim_accounts_get_all(); l != NULL; l = l->next)
		XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Account")));

mercurial