#include "window.h"
#include "main.h"
+#include "settings.h"
#include <ucx/buffer.h>
#include <ucx/utils.h>
"*rt*fontType: FONT_IS_XFT",
"*rt*fontName: Sans",
"*rt*fontSize: 9",
+
+ "*pbbutton.shadowThickness: 1",
+ "*pbbutton.highlightThickness: 1",
+
+ "*XmText.baseTranslations: #override\\n" \
+ "Ctrl~Alt~Meta<KeyPress>v: paste-clipboard()\\n" \
+ "Ctrl~Alt~Meta<KeyPress>c: copy-clipboard()\\n" \
+ "Ctrl~Alt~Meta<KeyPress>x: cut-clipboard()\\n" \
+ "Ctrl~Alt~Meta<KeyPress>u: delete-to-start-of-line()\\n",
+ "*XmTextField.baseTranslations: #override\\n" \
+ "Ctrl~Alt~Meta<KeyPress>v: paste-clipboard()\\n" \
+ "Ctrl~Alt~Meta<KeyPress>c: copy-clipboard()\\n" \
+ "Ctrl~Alt~Meta<KeyPress>x: cut-clipboard()\\n" \
+ "Ctrl~Alt~Meta<KeyPress>u: delete-to-start-of-line()\\n",
NULL
};
// has a bug on freebsd and doesn't flush the output after a newline
setvbuf(stdout, NULL, _IONBF, 0);
+ // initialize toolkit
XtToolkitInitialize();
XtSetLanguageProc(NULL, NULL, NULL);
app = XtCreateApplicationContext();
display = XtOpenDisplay(app, NULL, APP_NAME, APP_CLASS, NULL, 0, &argc, argv);
+ // load settings
+ if(load_settings()) {
+ return 1;
+ }
+
MainWindow *window = WindowCreate(display);
WindowShow(window);
void ApplicationExit(void) {
XtAppSetExitFlag(app);
}
+
+void AppAddTimeOut(unsigned long interval, XtTimerCallbackProc proc, XtPointer data) {
+ XtAppAddTimeOut(app, interval, proc, data);
+}