1 /*
2 
3   $Id$
4 
5   X G N O K I I
6 
7   A Linux/Unix GUI for the mobile phones.
8 
9   This file is part of gnokii.
10 
11   Gnokii is free software; you can redistribute it and/or modify
12   it under the terms of the GNU General Public License as published by
13   the Free Software Foundation; either version 2 of the License, or
14   (at your option) any later version.
15 
16   Gnokii is distributed in the hope that it will be useful,
17   but WITHOUT ANY WARRANTY; without even the implied warranty of
18   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19   GNU General Public License for more details.
20 
21   You should have received a copy of the GNU General Public License
22   along with gnokii; if not, write to the Free Software
23   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24 
25   Copyright (C) 1999 Pavel Jan�k ml., Hugh Blemings
26   & 1999-2005 Jan Derfinak.
27 
28 */
29 
30 #ifndef XGNOKII_COMMON_H
31 #define XGNOKII_COMMON_H
32 
33 #include <gtk/gtk.h>
34 #include <stdlib.h>		/* for size_t */
35 
36 typedef struct {
37 	GtkWidget *clist;
38 	gint column;
39 } SortColumn;
40 
41 /* typedef struct {
42   gchar *model;
43   gchar *number;
44 } Model;
45 */
46 
47 typedef struct {
48 	GtkWidget *dialog;
49 	GtkWidget *text;
50 } ErrorDialog;
51 
52 typedef struct {
53 	GtkWidget *dialog;
54 	GtkWidget *text;
55 } InfoDialog;
56 
57 typedef struct {
58 	GtkWidget *dialog;
59 	GtkWidget *text;
60 } YesNoDialog;
61 
62 typedef struct {
63 	GdkPixmap *pixmap;
64 	GdkBitmap *mask;
65 } QuestMark;
66 
67 typedef enum {
68 	GUI_EVENT_CONTACTS_CHANGED,
69 	GUI_EVENT_CALLERS_GROUPS_CHANGED,
70 	GUI_EVENT_SMS_NUMBER_CHANGED,
71 	GUI_EVENT_SMS_CENTERS_CHANGED,
72 	GUI_EVENT_NETMON_CHANGED,
73 } GUIEventType;
74 
75 extern void CancelDialog(const GtkWidget *, const gpointer);
76 extern void CreateErrorDialog(ErrorDialog *, GtkWidget *);
77 extern void CreateInfoDialog(InfoDialog *, GtkWidget *);
78 extern void CreateYesNoDialog(YesNoDialog *, const GtkSignalFunc, const GtkSignalFunc, GtkWidget *);
79 extern GtkWidget *NewPixmap(gchar **, GdkWindow *, GdkColor *);
80 extern void DeleteEvent(const GtkWidget *, const GdkEvent *, const gpointer);
81 extern gint LaunchProcess(const gchar *, const gchar *, const gint, const gint, const gint);
82 extern void RemoveZombie(const gint);
83 extern gint strrncmp(const gchar * const, const gchar * const, size_t);
84 extern void GUI_Refresh(void);
85 extern void SetSortColumn(GtkWidget *, SortColumn *);
86 extern void GUIEventAdd(GUIEventType, void (*)(void));
87 extern bool GUIEventRemove(GUIEventType, void (*)(void));
88 extern void GUIEventSend(GUIEventType);
89 #endif
90