Register new instance of GtkApplication with gtk_application_new
This commit is contained in:
parent
4aa3f60eab
commit
6fd9796e3a
@ -4,9 +4,17 @@ namespace UniversalEditor.Engines.GTK
|
||||
{
|
||||
public static class GtkApplication
|
||||
{
|
||||
private static IntPtr mvarHandle = IntPtr.Zero;
|
||||
|
||||
public static bool Initialize(ref int argc, ref string[] argv)
|
||||
{
|
||||
bool check = Internal.GTK.Methods.gtk_init_check (ref argc, ref argv);
|
||||
if (!check)
|
||||
return check;
|
||||
|
||||
mvarHandle = Internal.GTK.Methods.gtk_application_new ("net.alcetech.UniversalEditor", Internal.GTK.Constants.GApplicationFlags.None);
|
||||
|
||||
|
||||
return check;
|
||||
}
|
||||
public static void Run()
|
||||
|
||||
@ -4,6 +4,11 @@ namespace UniversalEditor.Engines.GTK.Internal.GTK
|
||||
{
|
||||
internal static class Constants
|
||||
{
|
||||
public enum GApplicationFlags
|
||||
{
|
||||
None = 0
|
||||
}
|
||||
|
||||
public enum GtkWindowType
|
||||
{
|
||||
TopLevel = 0,
|
||||
|
||||
@ -31,6 +31,11 @@ namespace UniversalEditor.Engines.GTK.Internal.GTK
|
||||
[DllImport(LIBRARY_FILENAME)]
|
||||
public static extern void gtk_window_set_title(IntPtr window, string title);
|
||||
|
||||
#region Application
|
||||
[DllImport(LIBRARY_FILENAME)]
|
||||
public static extern IntPtr gtk_application_new(string application_id, Constants.GApplicationFlags flags);
|
||||
#endregion
|
||||
|
||||
#region Widget
|
||||
[DllImport(LIBRARY_FILENAME)]
|
||||
public static extern void gtk_widget_set_size_request(IntPtr widget, uint width, uint height);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user