mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.uppdev
git-svn-id: svn://ultimatepp.org/upp/trunk@5285 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
4a019f8266
commit
e72ce429ae
5 changed files with 68 additions and 0 deletions
8
uppdev/GtkApp/GtkApp.cpp
Normal file
8
uppdev/GtkApp/GtkApp.cpp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
|
||||
}
|
||||
10
uppdev/GtkApp/GtkApp.upp
Normal file
10
uppdev/GtkApp/GtkApp.upp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI SSE2",
|
||||
"" = "GUI MT SSE2";
|
||||
|
||||
4
uppdev/GtkApp/init
Normal file
4
uppdev/GtkApp/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _GtkApp_icpp_init_stub
|
||||
#define _GtkApp_icpp_init_stub
|
||||
#include "CtrlLib/init"
|
||||
#endif
|
||||
42
uppdev/GtkApp/main.cpp
Normal file
42
uppdev/GtkApp/main.cpp
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
||||
|
||||
static gboolean on_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data)
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create(widget->window);
|
||||
|
||||
cairo_move_to(cr, 30, 30);
|
||||
cairo_show_text(cr, "Hello world!");
|
||||
|
||||
cairo_destroy(cr);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int main( int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
GtkWidget *darea = gtk_drawing_area_new();
|
||||
gtk_container_add(GTK_CONTAINER (window), darea);
|
||||
|
||||
g_signal_connect(darea, "expose-event", G_CALLBACK(on_expose_event), NULL);
|
||||
g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
|
||||
|
||||
gtk_widget_show_all(window);
|
||||
|
||||
gtk_main();
|
||||
|
||||
return 0;
|
||||
}
|
||||
4
uppdev/Lang/init
Normal file
4
uppdev/Lang/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _Lang_icpp_init_stub
|
||||
#define _Lang_icpp_init_stub
|
||||
#include "CtrlLib/init"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue