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

CGTKAboutDialog.m
1 /*
2 * CGTKAboutDialog.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/CGTKAboutDialog.h"
33
34 @implementation CGTKAboutDialog
35
36 -(id)init
37 {
38 self = [super initWithGObject:(GObject *)gtk_about_dialog_new()];
39
40 if(self)
41 {
42 //Do nothing
43 }
44
45 return self;
46 }
47
48 -(GtkAboutDialog*)ABOUTDIALOG
49 {
50 return GTK_ABOUT_DIALOG([self GOBJECT]);
51 }
52
53 -(void)addCreditSectionWithSectionName:(NSString*) sectionName andPeople:(gchar**) people
54 {
55 gtk_about_dialog_add_credit_section(GTK_ABOUT_DIALOG([self GOBJECT]), [sectionName UTF8String], people);
56 }
57
58 -(gchar**)getArtists
59 {
60 return gtk_about_dialog_get_artists(GTK_ABOUT_DIALOG([self GOBJECT]));
61 }
62
63 -(gchar**)getAuthors
64 {
65 return gtk_about_dialog_get_authors(GTK_ABOUT_DIALOG([self GOBJECT]));
66 }
67
68 -(NSString*)getComments
69 {
70 return [NSString stringWithUTF8String:gtk_about_dialog_get_comments(GTK_ABOUT_DIALOG([self GOBJECT]))];
71 }
72
73 -(NSString*)getCopyright
74 {
75 return [NSString stringWithUTF8String:gtk_about_dialog_get_copyright(GTK_ABOUT_DIALOG([self GOBJECT]))];
76 }
77
78 -(gchar**)getDocumenters
79 {
80 return gtk_about_dialog_get_documenters(GTK_ABOUT_DIALOG([self GOBJECT]));
81 }
82
83 -(NSString*)getLicense
84 {
85 return [NSString stringWithUTF8String:gtk_about_dialog_get_license(GTK_ABOUT_DIALOG([self GOBJECT]))];
86 }
87
88 -(GtkLicense)getLicenseType
89 {
90 return gtk_about_dialog_get_license_type(GTK_ABOUT_DIALOG([self GOBJECT]));
91 }
92
93 -(GdkPixbuf*)getLogo
94 {
95 return gtk_about_dialog_get_logo(GTK_ABOUT_DIALOG([self GOBJECT]));
96 }
97
98 -(NSString*)getLogoIconName
99 {
100 return [NSString stringWithUTF8String:gtk_about_dialog_get_logo_icon_name(GTK_ABOUT_DIALOG([self GOBJECT]))];
101 }
102
103 -(NSString*)getProgramName
104 {
105 return [NSString stringWithUTF8String:gtk_about_dialog_get_program_name(GTK_ABOUT_DIALOG([self GOBJECT]))];
106 }
107
108 -(NSString*)getTranslatorCredits
109 {
110 return [NSString stringWithUTF8String:gtk_about_dialog_get_translator_credits(GTK_ABOUT_DIALOG([self GOBJECT]))];
111 }
112
113 -(NSString*)getVersion
114 {
115 return [NSString stringWithUTF8String:gtk_about_dialog_get_version(GTK_ABOUT_DIALOG([self GOBJECT]))];
116 }
117
118 -(NSString*)getWebsite
119 {
120 return [NSString stringWithUTF8String:gtk_about_dialog_get_website(GTK_ABOUT_DIALOG([self GOBJECT]))];
121 }
122
123 -(NSString*)getWebsiteLabel
124 {
125 return [NSString stringWithUTF8String:gtk_about_dialog_get_website_label(GTK_ABOUT_DIALOG([self GOBJECT]))];
126 }
127
128 -(BOOL)getWrapLicense
129 {
130 return (gtk_about_dialog_get_wrap_license(GTK_ABOUT_DIALOG([self GOBJECT])) ? YES : NO);
131 }
132
133 -(void)setArtists:(gchar**) artists
134 {
135 gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG([self GOBJECT]), artists);
136 }
137
138 -(void)setAuthors:(gchar**) authors
139 {
140 gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG([self GOBJECT]), authors);
141 }
142
143 -(void)setComments:(NSString*) comments
144 {
145 gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG([self GOBJECT]), [comments UTF8String]);
146 }
147
148 -(void)setCopyright:(NSString*) copyright
149 {
150 gtk_about_dialog_set_copyright(GTK_ABOUT_DIALOG([self GOBJECT]), [copyright UTF8String]);
151 }
152
153 -(void)setDocumenters:(gchar**) documenters
154 {
155 gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG([self GOBJECT]), documenters);
156 }
157
158 -(void)setLicense:(NSString*) license
159 {
160 gtk_about_dialog_set_license(GTK_ABOUT_DIALOG([self GOBJECT]), [license UTF8String]);
161 }
162
163 -(void)setLicenseType:(GtkLicense) licenseType
164 {
165 gtk_about_dialog_set_license_type(GTK_ABOUT_DIALOG([self GOBJECT]), licenseType);
166 }
167
168 -(void)setLogo:(GdkPixbuf*) logo
169 {
170 gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG([self GOBJECT]), logo);
171 }
172
173 -(void)setLogoIconName:(NSString*) iconName
174 {
175 gtk_about_dialog_set_logo_icon_name(GTK_ABOUT_DIALOG([self GOBJECT]), [iconName UTF8String]);
176 }
177
178 -(void)setProgramName:(NSString*) name
179 {
180 gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG([self GOBJECT]), [name UTF8String]);
181 }
182
183 -(void)setTranslatorCredits:(NSString*) translatorCredits
184 {
185 gtk_about_dialog_set_translator_credits(GTK_ABOUT_DIALOG([self GOBJECT]), [translatorCredits UTF8String]);
186 }
187
188 -(void)setVersion:(NSString*) version
189 {
190 gtk_about_dialog_set_version(GTK_ABOUT_DIALOG([self GOBJECT]), [version UTF8String]);
191 }
192
193 -(void)setWebsite:(NSString*) website
194 {
195 gtk_about_dialog_set_website(GTK_ABOUT_DIALOG([self GOBJECT]), [website UTF8String]);
196 }
197
198 -(void)setWebsiteLabel:(NSString*) websiteLabel
199 {
200 gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG([self GOBJECT]), [websiteLabel UTF8String]);
201 }
202
203 -(void)setWrapLicense:(BOOL) wrapLicense
204 {
205 gtk_about_dialog_set_wrap_license(GTK_ABOUT_DIALOG([self GOBJECT]), (wrapLicense ? TRUE : FALSE));
206 }
207
208
209 @end
-[CGTKBase GOBJECT]
GObject * GOBJECT()
Definition: CGTKBase.m:82
-[CGTKAboutDialog getLogoIconName]
NSString * getLogoIconName()
Definition: CGTKAboutDialog.m:98
-[CGTKAboutDialog getArtists]
gchar ** getArtists()
Definition: CGTKAboutDialog.m:58
-[CGTKBase initWithGObject:]
id initWithGObject:(GObject *obj)
Definition: CGTKBase.m:48
-[CGTKAboutDialog ABOUTDIALOG]
GtkAboutDialog * ABOUTDIALOG()
Definition: CGTKAboutDialog.m:48
-[CGTKAboutDialog getVersion]
NSString * getVersion()
Definition: CGTKAboutDialog.m:113
-[CGTKAboutDialog getDocumenters]
gchar ** getDocumenters()
Definition: CGTKAboutDialog.m:78
-[CGTKAboutDialog init]
id init()
Definition: CGTKAboutDialog.m:36
-[CGTKAboutDialog getCopyright]
NSString * getCopyright()
Definition: CGTKAboutDialog.m:73
-[CGTKAboutDialog getProgramName]
NSString * getProgramName()
Definition: CGTKAboutDialog.m:103
-[CGTKAboutDialog getTranslatorCredits]
NSString * getTranslatorCredits()
Definition: CGTKAboutDialog.m:108
-[CGTKAboutDialog getWebsiteLabel]
NSString * getWebsiteLabel()
Definition: CGTKAboutDialog.m:123
-[CGTKAboutDialog getComments]
NSString * getComments()
Definition: CGTKAboutDialog.m:68
-[CGTKAboutDialog getLicense]
NSString * getLicense()
Definition: CGTKAboutDialog.m:83
-[CGTKAboutDialog getWebsite]
NSString * getWebsite()
Definition: CGTKAboutDialog.m:118
-[CGTKAboutDialog getWrapLicense]
BOOL getWrapLicense()
Definition: CGTKAboutDialog.m:128
-[CGTKAboutDialog getAuthors]
gchar ** getAuthors()
Definition: CGTKAboutDialog.m:63
-[CGTKAboutDialog getLicenseType]
GtkLicense getLicenseType()
Definition: CGTKAboutDialog.m:88
-[CGTKAboutDialog getLogo]
GdkPixbuf * getLogo()
Definition: CGTKAboutDialog.m:93
CGTKAboutDialog
Definition: CGTKAboutDialog.h:34