File: c.page

package info (click to toggle)
gnome-devel-docs 40.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 79,188 kB
  • sloc: javascript: 2,514; xml: 2,407; ansic: 2,229; python: 1,854; makefile: 805; sh: 499; cpp: 131
file content (140 lines) | stat: -rw-r--r-- 5,913 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" xmlns:ui="http://projectmallard.org/experimental/ui/" type="guide" id="c" xml:lang="sv">

  <info>
    <!-- The text title is used on the help.gnome.org -->
    <title type="link">C</title>
    <link type="guide" xref="index#tutorials"/>
    <revision version="3.4" date="2012-04-28" status="stub"/>

    <credit type="editor">
      <name>Tiffany Antopolski</name>
      <email its:translate="no">tiffany.antopolski@gmail.com</email>
    </credit>
    <credit type="editor">
      <name>Bastian Ilsø</name>
      <email its:translate="no">bastianilso@gnome.org</email>
    </credit>

    <include xmlns="http://www.w3.org/2001/XInclude" href="legal.xml"/>

    <desc>Handledningar och kodexempel i C.</desc>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Sebastian Rasmussen</mal:name>
      <mal:email>sebras@gmail.com</mal:email>
      <mal:years>2019</mal:years>
    </mal:credit>
  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Anders Jonsson</mal:name>
      <mal:email>anders.jonsson@norsjovallen.se</mal:email>
      <mal:years>2021</mal:years>
    </mal:credit>
  </info>

  <title>Plattformsdemonstrationer i C</title>

  <section id="prerequisites">

    <title>Förutsättningar</title>

    <p>För att kompilera dessa plattformsdemonstrationer kommer du behöva en C-kompilator, till exempel <link href="https://gcc.gnu.org/">gcc</link>. Du kommer också behöva GTK+ 3 med headerfiler och pkg-config-filer. Linuxdistributioner abstraherar vanligen GTK+ 3-headerfiler och pkg-config-filer till separata paket som heter <em>gtk3-devel</em>, <em>gtk3-dev</em> eller liknande.</p>

  </section>

  <section id="for-beginners" ui:expanded="false">

    <title>Riktlinjer för nya utvecklare</title>

    <p>Förutom förutsättningarna som nämnts ovan har flera verktyg utvecklats för att hjälpa dig vidare i att utveckla ditt GNOME-program. GNOME rekommenderar även en specifik kodstil och konventioner som detta avsnitt kommer gå in närmare på.</p>

    <section id="recommended-tools">
      <title>Rekommenderade verktyg</title>

      <list>
        <item>
          <p><link href="https://wiki.gnome.org/Apps/Devhelp">DevHelp</link>: En API-dokumentationsbläddrare för GNOME.</p>
        </item>
        <item>
          <p>Ett GNOME-IDE (Integrated Development Environment, Integrerad utvecklingsmiljö). Ett IDE kan hjälpa dig med att skriva och felsöka C-kod, till exempel <link href="https://wiki.gnome.org/Apps/Builder">Builder</link> eller <link href="https://wiki.gnome.org/Apps/Anjuta">Anjuta</link>.</p>
        </item>
        <item>
          <p><link href="http://glade.gnome.org/">Glade</link>: En användargränssnittsdesigner för GTK+-program.</p>
        </item>
        <item>
          <p>En IRC-klient, till exempel <link href="https://wiki.gnome.org/Apps/Polari">Polari</link> eller <link href="https://wiki.gnome.org/Apps/Empathy">Empathy</link>. Om du stöter på problem medan du följer nybörjarhandledningarna kan du gå in i #gnome på <em>irc.gnome.org</em>.</p>
        </item>
      </list>
    </section>

    <section id="coding-style">
      <title>Kodstil</title>

      <p>De flesta program i GNOME-projektet är skrivna i <link href="http://en.wikipedia.org/wiki/Indent_style#GNU_style">GNU-stilen</link> för indentering. Handledningarna och kodexemplen som presenteras följer denna konvention och du rekommenderas att också göra det.</p>
    </section>

    <section id="executing-code">
      <title>Köra kod</title>

      <p>För att köra kodexemplen:</p>

      <steps>
        <item>
          <p>Kopiera och klistra in koden i <var>filnamn</var>.c</p>
        </item>
        <item>
          <p>Skriv följande i terminalen:</p>
          <screen>gcc <var>filnamn</var>.c `pkg-config --cflags --libs gtk+-3.0` -o <var>filnamn</var></screen>
          <screen>./<var>filnamn</var></screen>
        </item>
      </steps>

      <note>
        <p>För mer information om att kompilera GTK+-program, se <link href="http://developer.gnome.org/gtk3/3.4/gtk-compiling.html">Kompilera GTK+-program i UNIX</link>.</p>
      </note>
    </section>

  </section>

  <section id="examples">
    <title>Handledningar</title>
  </section>

<section id="samples">
<title>Kodexempel för gränssnittskomponenter</title>
 <section id="windows" style="2column"><title>Fönster</title>
    <p/>
  </section>
  <section id="display-widgets" style="2column"><title>Visningskomponenter</title>
  </section>
  <section id="buttons" style="2column"><title>Knappar och brytare</title>
  </section>
  <section id="entry" style="2column"><title>Inmatning av numeriska data och text</title>
  </section>
  <section id="multiline" style="2column"><title>Textredigerare med flera rader</title>
  </section>
  <section id="menu-combo-toolbar" style="2column"><title>Komponenter för meny, kombinationsruta och verktygsfält</title>
  </section>
  <section id="treeview" style="2column"><title>TreeView-komponent</title>
  </section>
  <section id="selectors"><title>Väljare</title>
    <section id="file-selectors" style="2column"><title>Filväljare</title>
    </section>
    <section id="font-selectors" style="2column"><title>Typsnittsväljare</title>
    </section>
    <section id="color-selectors" style="2column"><title>Färgväljare</title>
    </section>
  </section>
  <section id="layout" style="2column"><title>Layoutbehållare</title>
  </section>
  <section id="ornaments" style="2column"><title>Ornamentering</title>
  </section>
  <section id="scrolling" style="2column"><title>Rullning</title>
  </section>
  <section id="misc" style="2column"><title>Diverse</title>
  </section>

</section>

</page>