CoreGTK 3.22.0 CoreGTK is an Objective-C language binding for the GTK+ widget toolkit

CGTKNativeDialog.m
1 /*
2 * CGTKNativeDialog.m
3 * This file is part of CoreGTK
4 *
5 * Copyright (C) 2017 - Tyler Burton
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 /*
23 * Modified by the CoreGTK Team, 2017. See the AUTHORS file for a
24 * list of people on the CoreGTK Team.
25 * See the ChangeLog files for a list of changes.
26 *
27 */
28
29 /*
30 * Objective-C imports
31 */
32 #import "CoreGTK/CGTKNativeDialog.h"
33
34 @implementation CGTKNativeDialog
35
36 -(GtkNativeDialog*)NATIVEDIALOG
37 {
38 return GTK_NATIVE_DIALOG([self GOBJECT]);
39 }
40
41 -(void)destroy
42 {
43 gtk_native_dialog_destroy(GTK_NATIVE_DIALOG([self GOBJECT]));
44 }
45
46 -(BOOL)getModal
47 {
48 return (gtk_native_dialog_get_modal(GTK_NATIVE_DIALOG([self GOBJECT])) ? YES : NO);
49 }
50
51 -(const char*)getTitle
52 {
53 return gtk_native_dialog_get_title(GTK_NATIVE_DIALOG([self GOBJECT]));
54 }
55
56 -(GtkWindow*)getTransientFor
57 {
58 return gtk_native_dialog_get_transient_for(GTK_NATIVE_DIALOG([self GOBJECT]));
59 }
60
61 -(BOOL)getVisible
62 {
63 return (gtk_native_dialog_get_visible(GTK_NATIVE_DIALOG([self GOBJECT])) ? YES : NO);
64 }
65
66 -(void)hide
67 {
68 gtk_native_dialog_hide(GTK_NATIVE_DIALOG([self GOBJECT]));
69 }
70
71 -(gint)run
72 {
73 return gtk_native_dialog_run(GTK_NATIVE_DIALOG([self GOBJECT]));
74 }
75
76 -(void)setModal:(BOOL) modal
77 {
78 gtk_native_dialog_set_modal(GTK_NATIVE_DIALOG([self GOBJECT]), (modal ? TRUE : FALSE));
79 }
80
81 -(void)setTitle:(const char*) title
82 {
83 gtk_native_dialog_set_title(GTK_NATIVE_DIALOG([self GOBJECT]), title);
84 }
85
86 -(void)setTransientFor:(GtkWindow*) parent
87 {
88 gtk_native_dialog_set_transient_for(GTK_NATIVE_DIALOG([self GOBJECT]), parent);
89 }
90
91 -(void)show
92 {
93 gtk_native_dialog_show(GTK_NATIVE_DIALOG([self GOBJECT]));
94 }
95
96
97 @end
-[CGTKBase GOBJECT]
GObject * GOBJECT()
Definition: CGTKBase.m:82
-[CGTKNativeDialog show]
void show()
Definition: CGTKNativeDialog.m:91
-[CGTKNativeDialog getModal]
BOOL getModal()
Definition: CGTKNativeDialog.m:46
-[CGTKNativeDialog getTitle]
const char * getTitle()
Definition: CGTKNativeDialog.m:51
-[CGTKNativeDialog getTransientFor]
GtkWindow * getTransientFor()
Definition: CGTKNativeDialog.m:56
-[CGTKNativeDialog destroy]
void destroy()
Definition: CGTKNativeDialog.m:41
-[CGTKNativeDialog run]
gint run()
Definition: CGTKNativeDialog.m:71
CGTKNativeDialog
Definition: CGTKNativeDialog.h:34
-[CGTKNativeDialog hide]
void hide()
Definition: CGTKNativeDialog.m:66
-[CGTKNativeDialog getVisible]
BOOL getVisible()
Definition: CGTKNativeDialog.m:61
-[CGTKNativeDialog NATIVEDIALOG]
GtkNativeDialog * NATIVEDIALOG()
Definition: CGTKNativeDialog.m:36