comparison src/conversation.h @ 10827:53e7884c549a

[gaim-migrate @ 12492] this should fix some problems with contact aware conversations, while possibly introducing new problems, and breaking some plugins. Someone needs to just remove GaimConvWindows all together. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Fri, 15 Apr 2005 22:32:00 +0000
parents 8d52201620d0
children c203cd637f95
comparison
equal deleted inserted replaced
10826:2a5fe8e67195 10827:53e7884c549a
160 void (*show)(GaimConvWindow *win); 160 void (*show)(GaimConvWindow *win);
161 void (*hide)(GaimConvWindow *win); 161 void (*hide)(GaimConvWindow *win);
162 void (*raise)(GaimConvWindow *win); 162 void (*raise)(GaimConvWindow *win);
163 void (*flash)(GaimConvWindow *win); 163 void (*flash)(GaimConvWindow *win);
164 164
165 void (*switch_conversation)(GaimConvWindow *win, unsigned int index); 165 void (*switch_conversation)(GaimConvWindow *win, GaimConversation *conv);
166 void (*add_conversation)(GaimConvWindow *win, GaimConversation *conv); 166 void (*add_conversation)(GaimConvWindow *win, GaimConversation *conv);
167 void (*remove_conversation)(GaimConvWindow *win, GaimConversation *conv); 167 void (*remove_conversation)(GaimConvWindow *win, GaimConversation *conv);
168 void (*move_conversation)(GaimConvWindow *win, GaimConversation *conv, 168
169 unsigned int newIndex); 169 GaimConversation *(*get_active_conversation)(const GaimConvWindow *win);
170
171 int (*get_active_index)(const GaimConvWindow *win);
172 gboolean (*has_focus)(GaimConvWindow *win); 170 gboolean (*has_focus)(GaimConvWindow *win);
173 }; 171 };
174 172
175 /** 173 /**
176 * Conversation operations and events. 174 * Conversation operations and events.
375 * 373 *
376 * @param win The window. 374 * @param win The window.
377 * @param ops The UI window operations structure. 375 * @param ops The UI window operations structure.
378 */ 376 */
379 void gaim_conv_window_set_ui_ops(GaimConvWindow *win, 377 void gaim_conv_window_set_ui_ops(GaimConvWindow *win,
380 GaimConvWindowUiOps *ops); 378 GaimConvWindowUiOps *ops);
381 379
382 /** 380 /**
383 * Returns the specified window's UI window operations structure. 381 * Returns the specified window's UI window operations structure.
384 * 382 *
385 * @param win The window. 383 * @param win The window.
397 * @param conv The conversation. 395 * @param conv The conversation.
398 * 396 *
399 * @return The new index of the conversation in the window. 397 * @return The new index of the conversation in the window.
400 */ 398 */
401 int gaim_conv_window_add_conversation(GaimConvWindow *win, 399 int gaim_conv_window_add_conversation(GaimConvWindow *win,
402 GaimConversation *conv); 400 GaimConversation *conv);
403 401
404 /** 402 /**
405 * Removes the conversation from the window. 403 * Removes the conversation from the window.
406 * 404 *
407 * @param win The window. 405 * @param win The window.
409 * 407 *
410 * @return The conversation removed. 408 * @return The conversation removed.
411 */ 409 */
412 GaimConversation *gaim_conv_window_remove_conversation(GaimConvWindow *win, 410 GaimConversation *gaim_conv_window_remove_conversation(GaimConvWindow *win,
413 GaimConversation *conv); 411 GaimConversation *conv);
414
415 /**
416 * Moves the conversation at the specified index in a window to a new index.
417 *
418 * @param win The window.
419 * @param index The index of the conversation to move.
420 * @param new_index The new index.
421 */
422 void gaim_conv_window_move_conversation(GaimConvWindow *win,
423 unsigned int index,
424 unsigned int new_index);
425
426 /**
427 * Returns the conversation in the window at the specified index.
428 *
429 * If the index is out of range, this returns @c NULL.
430 *
431 * @param win The window.
432 * @param index The index containing a conversation.
433 *
434 * @return The conversation at the specified index.
435 */
436 GaimConversation *gaim_conv_window_get_conversation_at(
437 const GaimConvWindow *win, unsigned int index);
438
439 /** 412 /**
440 * Returns the number of conversations in the window. 413 * Returns the number of conversations in the window.
441 * 414 *
442 * @param win The window. 415 * @param win The window.
443 * 416 *
452 * 425 *
453 * @param win The window. 426 * @param win The window.
454 * @param index The new index. 427 * @param index The new index.
455 */ 428 */
456 void gaim_conv_window_switch_conversation(GaimConvWindow *win, 429 void gaim_conv_window_switch_conversation(GaimConvWindow *win,
457 unsigned int index); 430 GaimConversation *conv);
458 431
459 /** 432 /**
460 * Returns the active conversation in the window. 433 * Returns the active conversation in the window.
461 * 434 *
462 * @param win The window. 435 * @param win The window.
577 * 550 *
578 * @param conv The conversation. 551 * @param conv The conversation.
579 * @param account The gaim_account. 552 * @param account The gaim_account.
580 */ 553 */
581 void gaim_conversation_set_account(GaimConversation *conv, 554 void gaim_conversation_set_account(GaimConversation *conv,
582 GaimAccount *account); 555 GaimAccount *account);
583 556
584 /** 557 /**
585 * Returns the specified conversation's gaim_account. 558 * Returns the specified conversation's gaim_account.
586 * 559 *
587 * This gaim_account represents the user using gaim, not the person the user 560 * This gaim_account represents the user using gaim, not the person the user
630 * @param conv The conversation. 603 * @param conv The conversation.
631 */ 604 */
632 void gaim_conversation_autoset_title(GaimConversation *conv); 605 void gaim_conversation_autoset_title(GaimConversation *conv);
633 606
634 /** 607 /**
635 * Returns the specified conversation's index in the parent window.
636 *
637 * @param conv The conversation.
638 *
639 * @return The current index in the parent window.
640 */
641 int gaim_conversation_get_index(const GaimConversation *conv);
642
643 /**
644 * Sets the conversation's unseen state. 608 * Sets the conversation's unseen state.
645 * 609 *
646 * @param conv The conversation. 610 * @param conv The conversation.
647 * @param state The new unseen state. 611 * @param state The new unseen state.
648 */ 612 */
649 void gaim_conversation_set_unseen(GaimConversation *conv, 613 void gaim_conversation_set_unseen(GaimConversation *conv,
650 GaimUnseenState state); 614 GaimUnseenState state);
651 615
652 /** 616 /**
653 * Returns the conversation's unseen state. 617 * Returns the conversation's unseen state.
654 * 618 *
655 * @param conv The conversation. 619 * @param conv The conversation.