mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
.rainbow: Gtk backend getting ready for uppsrc
git-svn-id: svn://ultimatepp.org/upp/trunk@5689 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
36e194b7c5
commit
6c02d65eab
20 changed files with 21 additions and 24 deletions
43
rainbow/Gtk/GtkApp.cpp
Normal file
43
rainbow/Gtk/GtkApp.cpp
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#include <CtrlCore/CtrlCore.h>
|
||||
|
||||
#ifdef GUI_GTK
|
||||
|
||||
NAMESPACE_UPP
|
||||
|
||||
#define LLOG(x) // DLOG(x)
|
||||
|
||||
void _DBG_Ungrab(void)
|
||||
{
|
||||
gdk_pointer_ungrab(GDK_CURRENT_TIME);
|
||||
}
|
||||
|
||||
void Ctrl::PanicMsgBox(const char *title, const char *text)
|
||||
{
|
||||
LLOG("PanicMsgBox " << title << ": " << text);
|
||||
_DBG_Ungrab();
|
||||
GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_CLOSE, "%s: %s", title, text);
|
||||
gtk_dialog_run(GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy(dialog);
|
||||
__BREAK__;
|
||||
}
|
||||
|
||||
void InitGtkApp(int argc, char **argv, const char **envptr)
|
||||
{
|
||||
gtk_init(&argc, &argv); // TODO?
|
||||
Ctrl::GlobalBackBuffer();
|
||||
Ctrl::ReSkin();
|
||||
g_timeout_add(20, (GSourceFunc) Ctrl::TimeHandler, NULL);
|
||||
InstallPanicMessageBox(Ctrl::PanicMsgBox);
|
||||
}
|
||||
/*
|
||||
void ChSysInit()
|
||||
{
|
||||
CtrlImg::Reset();
|
||||
CtrlsImg::Reset();
|
||||
ChReset();
|
||||
}
|
||||
*/
|
||||
END_UPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
Loading…
Reference in a new issue