summary refs log blame commit diff stats
path: root/src/fe-gtk/sexy-marshal.h
blob: aa5607674c6cb75fe60f79b2108ad8064b6e4a53 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17















                                                                            


                                  
                        





















                                                                              
/* libsexy
 * Copyright (C) 2005-2006 Christian Hammond.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#ifndef __sexy_marshal_MARSHAL_H__
#define __sexy_marshal_MARSHAL_H__

#include <glib-object.h>

G_BEGIN_DECLS

/* BOOLEAN:STRING (./marshal.list:1) */
extern void sexy_marshal_BOOLEAN__STRING (GClosure     *closure,
                                          GValue       *return_value,
                                          guint         n_param_values,
                                          const GValue *param_values,
                                          gpointer      invocation_hint,
                                          gpointer      marshal_data);

/* OBJECT:OBJECT,OBJECT (./marshal.list:2) */
extern void sexy_marshal_OBJECT__OBJECT_OBJECT (GClosure     *closure,
                                                GValue       *return_value,
                                                guint         n_param_values,
                                                const GValue *param_values,
                                                gpointer      invocation_hint,
                                                gpointer      marshal_data);

G_END_DECLS

#endif /* __sexy_marshal_MARSHAL_H__ */
rcDlg.top)); ixPos = rcWorkArea.right - (rcDlg.right - rcDlg.left) + 1; iyPos = rcWorkArea.bottom - (rcDlg.bottom - rcDlg.top); if((g_iAlerts >= iNumPerCol) && (iNumPerCol > 0)) { ixPos -= ((g_iAlerts / iNumPerCol) * (rcDlg.right - rcDlg.left)); iyPos -= ((g_iAlerts - (iNumPerCol * (g_iAlerts / iNumPerCol))) * (rcDlg.bottom - rcDlg.top)); } else { iyPos -= (g_iAlerts * (rcDlg.bottom - rcDlg.top)); } SetWindowPos(hDialog, HWND_TOPMOST, ixPos, iyPos, 0, 0, SWP_NOSIZE | SWP_NOACTIVATE); ConvertString(szName, wszName, 64); ConvertString(szMsg, wszMsg, 256); SetWindowText(hDialog, wszName); SetDlgItemText(hDialog, IDC_ALERT_MSG, wszMsg); ShowWindow(hDialog, SW_SHOWNA); if(iTime > 0) { SetTimer(hDialog, 1, iTime, NULL); } g_iAlerts++; } void sdCloseAlerts() { PostMessage(HWND_BROADCAST, RegisterWindowMessage(TEXT("xTray:CloseAllAlertWindows")), 0, 0); } LRESULT CALLBACK sdAlertProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) { switch(msg) { case WM_CLOSE: if(g_iAlerts > 0){ g_iAlerts--; } DestroyWindow(hwnd); return TRUE; break; case WM_TIMER: if(g_iAlerts > 0){ g_iAlerts--; } AnimateWindow(hwnd, 600, AW_SLIDE | AW_HIDE | AW_VER_POSITIVE); DestroyWindow(hwnd); return TRUE; break; default: if(msg == RegisterWindowMessage(TEXT("xTray:CloseAllAlertWindows"))) { if(g_iAlerts > 0){ g_iAlerts--; } DestroyWindow(hwnd); return TRUE; } break; } return FALSE; } int sdAlertNum() { return g_iAlerts; }