/* * * ProLinga-Run * * Copyright (C) 2002-2008 Xobas Software. * All rights reserved. * * This file is part of ProLinga-Run. * * ProLinga-Run is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * ProLinga-Run 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with ProLinga-Run. If not, see . * * More information is available at the following addresses: * * Website : http://www.prolinga.org * * Email : prolinga-list@prolinga.org * * */ #ifndef __RUN_SHARE_HPP #define __RUN_SHARE_HPP /* Proto types */ void ToLower(char *inString); void DialogError(GtkWidget *openwindow, gchar *message); bool DialogConfirm(GtkWidget *openwindow, gchar *message); GtkWidget* LookupWidget(GtkWidget *widget, const gchar *widget_name); char* CreateGladeString(xmlDocPtr doc); int ReplaceCharInString(char *string, char find, char replace); void ResetScreenStack(void); /* Active Screen Stack for control of Dialog Screens */ class ScreenStack { public: ScreenStack(); ~ScreenStack(); void push(ScreenStack **topPtr, GtkWidget *screenPtr); void pop(ScreenStack **topPtr, GtkWidget **screenPtr); void deleteStack(ScreenStack **topPtr); void get(ScreenStack **topPtr, GtkWidget **screenPtr); private: GtkWidget *prevScreenPtr; ScreenStack *nextPtr; }; typedef ScreenStack *ScreenStackPtr; /* List of windows/dialog on desktop */ class DesktopScreen { public: DesktopScreen(); ~DesktopScreen(); GtkWidget *getOneValue(DesktopScreen **dtsPtr, const char *name); void putValue(DesktopScreen **dtsPtr, const char *name, const GtkWidget *wdgScreen); void deleteValue(DesktopScreen **dtsPtr, const char *name, const GtkWidget *wdgScreen); GtkWidget *getFirstValue(DesktopScreen **dtsPtr); int isOnDesktop(DesktopScreen *dtsPtr, const char *name); int numberOnDesktop(DesktopScreen *dtsPtr); void printList(DesktopScreen *dtsPtr) const; private: char screenName[32]; GtkWidget *screenWidget; DesktopScreen *nextPtr; }; typedef DesktopScreen *DesktopScreenPtr; #endif /* __RUN_SHARE_HPP */