summaryrefslogtreecommitdiffstats
path: root/languages/pascal/app_templates/fpcgtk
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/pascal/app_templates/fpcgtk
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/pascal/app_templates/fpcgtk')
-rw-r--r--languages/pascal/app_templates/fpcgtk/.kdev_ignore0
-rw-r--r--languages/pascal/app_templates/fpcgtk/Makefile.am16
-rw-r--r--languages/pascal/app_templates/fpcgtk/app.kdevelop86
-rw-r--r--languages/pascal/app_templates/fpcgtk/fpcgtk9
-rw-r--r--languages/pascal/app_templates/fpcgtk/fpcgtk.kdevtemplate114
-rw-r--r--languages/pascal/app_templates/fpcgtk/fpcgtk.pngbin0 -> 483 bytes
-rw-r--r--languages/pascal/app_templates/fpcgtk/main.pp84
7 files changed, 309 insertions, 0 deletions
diff --git a/languages/pascal/app_templates/fpcgtk/.kdev_ignore b/languages/pascal/app_templates/fpcgtk/.kdev_ignore
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/languages/pascal/app_templates/fpcgtk/.kdev_ignore
diff --git a/languages/pascal/app_templates/fpcgtk/Makefile.am b/languages/pascal/app_templates/fpcgtk/Makefile.am
new file mode 100644
index 00000000..252cbf27
--- /dev/null
+++ b/languages/pascal/app_templates/fpcgtk/Makefile.am
@@ -0,0 +1,16 @@
+dataFiles = main.pp app.kdevelop
+templateName = fpcgtk
+
+### no need to change below:
+template_DATA = $(templateName).kdevtemplate
+templatedir = ${appwizarddatadir}/templates
+
+appwizarddatadir = ${kde_datadir}/kdevappwizard
+$(templateName).tar.gz: ${dataFiles}
+ $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles}
+ $(GZIP_COMMAND) -f9 $(templateName).tar
+
+archivedir = ${appwizarddatadir}
+archive_DATA = $(templateName).tar.gz ${templateName}.png
+
+CLEANFILES = *.tar.gz \ No newline at end of file
diff --git a/languages/pascal/app_templates/fpcgtk/app.kdevelop b/languages/pascal/app_templates/fpcgtk/app.kdevelop
new file mode 100644
index 00000000..995d340b
--- /dev/null
+++ b/languages/pascal/app_templates/fpcgtk/app.kdevelop
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<kdevelop>
+ <general>
+ <author>%{AUTHOR}</author>
+ <email>%{EMAIL}</email>
+ <version>%{VERSION}</version>
+ <projectmanagement>KDevPascalProject</projectmanagement>
+ <primarylanguage>Pascal</primarylanguage>
+ <keywords>
+ <keyword>Pascal</keyword>
+ <keyword>Code</keyword>
+ </keywords>
+ </general>
+ <kdevpascalproject>
+ <general>
+ <useconfiguration>default</useconfiguration>
+ </general>
+ <configurations>
+ <default>
+ <mainsource>src/%{APPNAMELC}.pp</mainsource>
+ <compiler>kdevfpcoptions</compiler>
+ <compileroptions>-vr</compileroptions>
+ <compilerexec>fpc</compilerexec>
+ </default>
+ </configurations>
+ <run>
+ <terminal>false</terminal>
+ </run>
+ </kdevpascalproject>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>c++_bugs_gcc</toc>
+ <toc>clanlib</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>kde2book</toc>
+ <toc>libc</toc>
+ <toc>libstdc++</toc>
+ <toc>opengl</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>qt-kdev3</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>stl</toc>
+ <toc>w3c-svg</toc>
+ <toc>sw</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>Guide to the Qt Translation Tools</toc>
+ <toc>Qt Assistant Manual</toc>
+ <toc>Qt Designer Manual</toc>
+ <toc>Qt Reference Documentation</toc>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ <ignoredoxygen>
+ <toc>KDE Libraries (Doxygen)</toc>
+ </ignoredoxygen>
+ </kdevdoctreeview>
+ <kdevfilecreate>
+ <useglobaltypes>
+ <type ext="pp"/>
+ <type ext="pas"/>
+ <type ext="dpr"/>
+ </useglobaltypes>
+ </kdevfilecreate>
+</kdevelop>
diff --git a/languages/pascal/app_templates/fpcgtk/fpcgtk b/languages/pascal/app_templates/fpcgtk/fpcgtk
new file mode 100644
index 00000000..374f1bc9
--- /dev/null
+++ b/languages/pascal/app_templates/fpcgtk/fpcgtk
@@ -0,0 +1,9 @@
+# KDE Config File
+[General]
+Name=GTK+ application
+Name[fr]=Une application GTK+
+Category=Pascal/Free Pascal
+Comment=Generates a GTK+ based GUI application in Pascal
+Comment[fr]=Gnre une application base sur la bibliothque GTK+ dans le language PASCAL.
+FileTemplates=pp-program,PStyle,pp-unit,PStyle
+ShowFilesAfterGeneration=src/APPNAMELC.pp
diff --git a/languages/pascal/app_templates/fpcgtk/fpcgtk.kdevtemplate b/languages/pascal/app_templates/fpcgtk/fpcgtk.kdevtemplate
new file mode 100644
index 00000000..56696aa1
--- /dev/null
+++ b/languages/pascal/app_templates/fpcgtk/fpcgtk.kdevtemplate
@@ -0,0 +1,114 @@
+# KDE Config File
+[General]
+Name=GTK+ application
+Name[ca]=Aplicació GTK+
+Name[da]=GTK+ program
+Name[de]=GTK+-Anwendung
+Name[el]=Εφαρμογή GTK+
+Name[es]=Aplicación GTK+
+Name[et]=GTK+ rakendus
+Name[eu]=GTK+ aplikazioa
+Name[fa]=کاربرد GTK+
+Name[fr]=Application GTK+
+Name[ga]=Feidhmchlár GTK+
+Name[gl]=Aplicación GTK+
+Name[hu]=GTK+-alapú alkalmazás
+Name[it]=Applicazione GTK+
+Name[ja]=GTK+ アプリケーション
+Name[nds]=GTK+-Programm
+Name[ne]=GTK+ अनुप्रयोग
+Name[nl]=GTK+-toepassing
+Name[pl]=Program GTK+
+Name[pt]=Aplicação do GTK+
+Name[pt_BR]=Aplicativo GTK+
+Name[ru]=Приложение GTK+
+Name[sk]=GTK+ aplikácia
+Name[sr]=GTK+ програм
+Name[sr@Latn]=GTK+ program
+Name[sv]=GTK+ program
+Name[tr]=GTK+ Uygulaması
+Name[zh_CN]=GTK+ 应用程序
+Name[zh_TW]=GTK+ 應用程式
+Category=Pascal/Free Pascal
+Comment=Generates a GTK+ based GUI application in Pascal
+Comment[ca]=Genera una aplicació IGU en Pascal basada en GTK+
+Comment[da]=Genererer et GTK+ baseret GUI program i Pascal
+Comment[de]=Erstellt eine auf GTK+ basierende GUI-Anwendung in Pascal
+Comment[el]=Δημιουργεί μια γραφική εφαρμογή βασισμένη στο GTK+ σε Pascal
+Comment[es]=Genera una aplicación gráfica en Pascal basada en GTK+
+Comment[et]=Graafilise rakenduse loomine GTK+ põhjal Pascalis
+Comment[eu]=GTK+-en oinarritutako GUI aplikazio bat sortzen du Pascal-en
+Comment[fa]=یک کاربرد ونک بر مبنای GTK+ در پاسکال تولید می‌کند
+Comment[fr]=Génère une application avec interface graphique basée sur GTK+ en Pascal
+Comment[ga]=Cruthaigh feidhmchlár grafach i Pascal, bunaithe ar GTK+
+Comment[gl]=Xera unha aplicación GUI baseada en GTK+ en Pascal
+Comment[hu]=Létrehoz egy GTK+-alapú grafikus felületű alkalmazást Pascalban
+Comment[it]=Genera un'applicazione GUI basata su GTK+ in Pascal
+Comment[ja]=GTK+ ベースの GUI アプリケーションを Pascal で作成します
+Comment[nds]=Stellt en op GTK+ opbuut Böversietprogramm in Pascal op
+Comment[ne]= GTK+ आधारित जी यू आई अनुप्रयोगलाई पास्कलमा उत्पन्न गर्दछ
+Comment[nl]=Genereert een GKT+-gebaseerde GUI-toepassing in Pascal
+Comment[pl]=Generuje program z graficznym interfejsem użytkownika używający GTK+ w Pascalu
+Comment[pt]=Gera uma aplicação gráfica, baseada em GTK+, em Pascal
+Comment[pt_BR]=Gera uma aplicação gráfica, baseada em GTK+, em Pascal
+Comment[ru]=Создание приложения GTK+ на Pascal
+Comment[sk]=Vygeneruje GTK+ GUI aplikáciu v Pascal
+Comment[sr]=Прави GUI програм на основу GTK+ у Pascal-у
+Comment[sr@Latn]=Pravi GUI program na osnovu GTK+ u Pascal-u
+Comment[sv]=Skapar ett GTK+ baserat program med grafiskt användargränssnitt i Pascal
+Comment[zh_CN]=生成一个 Pascal 语言的 GTK+ GUI 应用程序
+Comment[zh_TW]=產生一個 Pascal 語言,以GTK+ 為基礎的使用者介面應用程式
+FileTemplates=pp-program,PStyle,pp-unit,PStyle
+ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp
+Archive=fpcgtk.tar.gz
+
+[GNU]
+Type=include
+File=%{kdevelop}/template-common/gnu.kdevtemplate
+
+[FILE1]
+Type=install
+EscapeXML=true
+Source=%{src}/app.kdevelop
+Dest=%{dest}/%{APPNAMELC}.kdevelop
+
+[MkDir1]
+Type=mkdir
+Dir=%{dest}/src
+
+[FILE2]
+Type=install
+Source=%{src}/main.pp
+Dest=%{dest}/src/%{APPNAMELC}.pp
+
+[MSG]
+Type=message
+Comment=A GTK+ application written in pascal was created in %{dest}
+Comment[ca]=Una aplicació GTK+ escrita en Pascal ha estat creada en %{dest}
+Comment[da]=Et GTK+ program skrevet i pascal blev oprettet i %{dest}
+Comment[de]=Eine in Pascal geschriebene GTK+-Anwendung wurde in %{dest} erstellt.
+Comment[el]=Μια εφαρμογή GTK+ γραμμένη σε pascal δημιουργήθηκε στο %{dest}
+Comment[es]=Una aplicación GTK+ escrita en Pascal ha sido creada en %{dest}
+Comment[et]=GTK+ rakendus Pascalis loodi asukohta %{dest}
+Comment[eu]=Pascal-en idatzitako GTK+ aplikazio bat sortu da hemen: %{dest}
+Comment[fa]=یک کاربرد GTK+ نوشته‌شده در پاسکال در %{dest} ایجاد شد
+Comment[fr]=Une application GTK+ écrite en Pascal a été créée dans %{dest}
+Comment[ga]=Cruthaíodh feidhmchlár GTK+, scríofa i pascal, i %{dest}
+Comment[gl]=Creouse unha aplicación GTK+ escrita en pascal en %{dest}
+Comment[hu]=Létrejött egy egyszerű, Pascal nyelvű, GTK+-alapú alkalmazás itt: %{dest}
+Comment[it]=È stata creata un'applicazione GTK+ scritta in Pascal in %{dest}
+Comment[ja]=Pascal で書かれた GTK+ アプリケーションを %{dest} に作成しました
+Comment[nds]=In %{dest} wöör en Pascal-Programm för GTK+ opstellt
+Comment[ne]=पास्कलमा लेखिएको GTK+ अनुप्रयोग %{dest} मा सिर्जना गरियो
+Comment[nl]=Een GTK+-toepassing geschreven in Pascal is aangemaakt in %{dest}
+Comment[pl]=Program GTK+ napisany w Pascalu został utworzony w %{dest}
+Comment[pt]=Foi criada uma aplicação GTK+, escrita em Pascal, em %{dest}
+Comment[pt_BR]=Foi criada uma aplicação GTK+, escrita em Pascal, em %{dest}
+Comment[ru]=Приложение GTK+ на Pascal создано в %{dest}
+Comment[sk]=GTK+ aplikácia v Pascal bola vytvorená v %{dest}
+Comment[sr]=GTK+ програм у Pascal-у направљен је у %{dest}
+Comment[sr@Latn]=GTK+ program u Pascal-u napravljen je u %{dest}
+Comment[sv]=Ett GTK+ program skrivet i Pascal skapades i %{dest}
+Comment[tr]=Pascal'da yazılmış bir GTK+ uygulaması %{dest} içinde yaratıldı.
+Comment[zh_CN]=在 %{dest} 创建了 Pascal 语言的 GTK+ 应用程序
+Comment[zh_TW]=一個 Pascal 的 GTK+ 應用程式已建立於 %{dest}
diff --git a/languages/pascal/app_templates/fpcgtk/fpcgtk.png b/languages/pascal/app_templates/fpcgtk/fpcgtk.png
new file mode 100644
index 00000000..840a953c
--- /dev/null
+++ b/languages/pascal/app_templates/fpcgtk/fpcgtk.png
Binary files differ
diff --git a/languages/pascal/app_templates/fpcgtk/main.pp b/languages/pascal/app_templates/fpcgtk/main.pp
new file mode 100644
index 00000000..4ac4a3b4
--- /dev/null
+++ b/languages/pascal/app_templates/fpcgtk/main.pp
@@ -0,0 +1,84 @@
+program %{APPNAMELC};
+
+{$mode objfpc}
+
+uses
+ glib,gdk,gtk;
+
+procedure hello(widget : pGtkWidget ; data: pgpointer ); cdecl;
+begin
+ writeln('Hello World');
+end;
+
+function delete_event (widget : pGtkWidget ; event: pGdkEvent; data: pgpointer ): integer; cdecl;
+begin
+ writeln('Delete Event Occurred');
+ delete_event := ord(true);
+end;
+
+procedure destroy(widget : pGtkWidget ; data: pgpointer ); cdecl;
+begin
+ gtk_main_quit();
+end;
+
+var
+ window, button : pGtkWidget;//GtkWidget is the storage type for widgets
+
+
+begin
+ // This is called in all GTK applications. Arguments are parsed
+ // from the command line and are returned to the application.
+ gtk_init (@argc, @argv);
+
+ // create a new window
+ window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ // When the window is given the "delete_event" signal (this is given
+ // by the window manager, usually by the 'close' option, or on the
+ // titlebar), we ask it to call the delete_event () function
+ // as defined above. The data passed to the callback
+ // function is NULL and is ignored in the callback function.
+ gtk_signal_connect (pGTKOBJECT (window), 'delete_event',
+ GTK_SIGNAL_FUNC (@delete_event), NIL);
+
+
+ // Here we connect the "destroy" event to a signal handler.
+ // This event occurs when we call gtk_widget_destroy() on the window,
+ // or if we return 'FALSE' in the "delete_event" callback.
+ gtk_signal_connect (pGTKOBJECT (window), 'destroy',
+ GTK_SIGNAL_FUNC (@destroy), NULL);
+
+ // Sets the border width of the window.
+ gtk_container_set_border_width (GTK_CONTAINER (window), 10);
+
+ // Creates a new button with the label "Hello World".
+ button := gtk_button_new_with_label ('Hello_World');
+
+ // When the button receives the "clicked" signal, it will call the
+ // function hello() passing it NULL as its argument. The hello()
+ // function is defined above. */
+ gtk_signal_connect (pGTKOBJECT (button), 'clicked',
+ GTK_SIGNAL_FUNC (@hello), NULL);
+
+ // This will cause the window to be destroyed by calling
+ // gtk_widget_destroy(window) when "clicked". Again, the destroy
+ // signal could come from here, or the window manager
+ gtk_signal_connect_object (pGTKOBJECT (button), 'clicked',
+ GTK_SIGNAL_FUNC (@gtk_widget_destroy),
+ pGTKOBJECT(window));
+
+ // This packs the button into the window (a gtk container).
+ gtk_container_add (GTK_CONTAINER (window), button);
+
+ // The final step is to display this newly created widget.
+ gtk_widget_show (button);
+
+ // and the window
+ gtk_widget_show (window);
+
+ // All GTK applications must have a gtk_main(). Control ends here
+ // and waits for an event to occur (like a key press or
+ // mouse event).
+ gtk_main ();
+
+end.