亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? hc-objectargs.html

?? gtk_text program sample&eg
?? HTML
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>  <head>    <title>      Object Arguments    </title>    <meta name="GENERATOR" content=    "Modular DocBook HTML Stylesheet Version 1.45">    <link rel="HOME" title="GTK+ / Gnome Application Development"    href="ggad.html">    <link rel="UP" title="The GTK+ Object and Type System" href=     "cha-objects.html">    <link rel="PREVIOUS" title="GtkArg and the Type System" href=     "sec-gtkarg.html">    <link rel="NEXT" title="Signals" href="z109.html">  </head>  <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink=   "#840084" alink="#0000FF">    <div class="NAVHEADER">      <table width="100%" border="0" bgcolor="#ffffff" cellpadding=       "1" cellspacing="0">        <tr>          <th colspan="4" align="center">            <font color="#000000" size="2">GTK+ / Gnome Application            Development</font>          </th>        </tr>        <tr>          <td width="25%" bgcolor="#ffffff" align="left">            <a href="sec-gtkarg.html"><font color="#0000ff" size=            "2"><b>&lt;&lt;&lt; Previous</b></font></a>          </td>          <td width="25%" colspan="2" bgcolor="#ffffff" align=           "center">            <font color="#0000ff" size="2"><b><a href="ggad.html">            <font color="#0000ff" size="2"><b>            Home</b></font></a></b></font>          </td>          <td width="25%" bgcolor="#ffffff" align="right">            <a href="z109.html"><font color="#0000ff" size="2"><b>            Next &gt;&gt;&gt;</b></font></a>          </td>        </tr>      </table>    </div>    <div class="SECT1">      <h1 class="SECT1">        <a name="HC-OBJECTARGS">Object Arguments</a>      </h1>      <p>        <i class="FIRSTTERM">Arguments</i> are one of the most        interesting features of <span class="STRUCTNAME">        GtkObject</span>. Arguments are a mechanism for handling        what CORBA's Interface Definition Language (IDL) calls an        <i class="FIRSTTERM">attribute</i>: a value with a "getter"        and a "setter." In concrete terms, object arguments pair a        key (which is a string) with a value (represented as a        <span class="STRUCTNAME">GtkArg</span>). Each <span class=         "STRUCTNAME">GtkObject</span> subclass can register        permissible keys and the <span class="STRUCTNAME">        GtkType</span>s of their associated values.      </p>      <p>        Using object arguments, one can discover at runtime what        attributes an object has, and then get or set their values.        This is very useful for people implementing GUI builders,        since some of the widget configuration dialogs can be        automated. Similarly, it makes it much easier to write GTK+        bindings for scripting languages. It can also be convenient        for programmers, since they can avoid writing all the        get/set functions---the <tt class="CLASSNAME">        GnomeCanvas</tt>, for example, uses object arguments for        almost all of its API. Finally, object arguments may be        configurable via the <tt class="FILENAME">gtkrc</tt>        configuration mechanism in a future version of GTK+, making        it possible for users to extensively customize GTK+        software.      </p>      <div class="SECT2">        <h2 class="SECT2">          <a name="Z106">Setting Object Arguments</a>        </h2>        <p>          Most commonly, arguments are used as an API to set          attributes of widgets. However, not all of the GTK+ API          has been exported via arguments, so it is not always          possible.        </p>        <p>          To set widget attributes, the most convenient interface          is <tt class="FUNCTION">gtk_object_set()</tt>. Here's an          example:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;   gtk_object_set(GTK_OBJECT(vbox),                   "GtkContainer::border_width", (gulong) 10,                  NULL);&#13;</pre>            </td>          </tr>        </table>        <p>          The above code is identical in effect to:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;   gtk_container_set_border_width(GTK_CONTAINER(vbox), 10);&#13;</pre>            </td>          </tr>        </table>        <p>          It's up to you which to use; it depends on the context.          Typically, you would use the argument mechanism if you          have a reason to, i.e. if you are using its dynamic,          runtime-oriented features. However, if you are setting          several attributes, it may be easier to type and read.        </p>        <p>          <tt class="FUNCTION">gtk_object_set()</tt> takes a <span          class="STRUCTNAME">GtkObject</span> as the first          argument, followed by any number of key-value pairs. If a          key is not defined for the object you pass in, a runtime          error will be triggered. The list of key-value pairs must          be terminated with a <span class="STRUCTNAME">NULL</span>          key. When a <span class="STRUCTNAME">GtkObject</span>          registers itself with GTK+, it tells GTK+ what type of          value to expect after each key. For the aggregate          fundamental types <tt class="FUNCTION">          gtk_object_set()</tt> will expect more than one C          function argument after the key. For example, first a          signal function and then a user data pointer will be          expected after <span class="STRUCTNAME">          GTK_TYPE_SIGNAL</span> arguments. (<a href=           "sec-gtkarg.html#TABLE-FUNDTYPES">Table 1 in the section          called <i><span class="STRUCTNAME">GtkArg</span> and the          Type System</i></a> gives the types of the expected          arguments.)        </p>        <p>          It is permissible to leave off the object class portion          of an argument name---<span class=          "STRUCTNAME">"GtkContainer::border_width"</span> can be          simply <span class="STRUCTNAME">"border_width"</span>:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;   gtk_object_set(GTK_OBJECT(vbox),                   "border_width", (gulong) 10,                  NULL);&#13;</pre>            </td>          </tr>        </table>        <p>          If you do not specify the class name as part of the          argument name, GTK+ will start with the real type of the          object and look up the argument name in the argument          table for each superclass until it finds the right one          (<tt class="CLASSNAME">GtkContainer</tt> in this case).          If you do specify the class name, GTK+ will only look for          the argument in the specified class's argument table.        </p>        <p>          Since <tt class="FUNCTION">gtk_object_set()</tt> uses C          variable argument lists, it has limited type safety. This          can be a real problem in your code. You may have noticed          the cast to <span class="STRUCTNAME">gulong</span> in the          sample call to <tt class="FUNCTION">          gtk_object_set()</tt>. The argument <span class=           "STRUCTNAME">GtkContainer::border_width</span> has type          <span class="STRUCTNAME">GTK_TYPE_ULONG</span>. GTK+ will          extract <span class="STRUCTNAME">sizeof(gulong)</span>          bytes from the argument list when it encounters this          argument. If you leave out the cast, C will probably pass          only <span class="STRUCTNAME">sizeof(gint)</span> bytes          to the function. As you might imagine, this causes memory          corruption on many platforms. A similar problem arises          with arguments of type <span class="STRUCTNAME">          GTK_TYPE_DOUBLE</span>; if you type <span class=           "STRUCTNAME">5</span> instead of <span class=          "STRUCTNAME">5.0</span>, C will pass an integer to <tt          class="FUNCTION">gtk_object_set()</tt>. These bugs are          very hard to find, once you introduce them.        </p>        <p>          <tt class="FUNCTION">gtk_object_set()</tt> is syntactic          sugar for a more fundamental function call, <tt class=           "FUNCTION">gtk_object_setv()</tt>. <tt class="FUNCTION">          gtk_object_setv()</tt> takes a vector of <span class=           "STRUCTNAME">GtkArg</span> (<tt class=          "FUNCTION">gtk_object_set()</tt> converts each key-value          pair in its argument list to <span class="STRUCTNAME">          GtkArg</span> internally).        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;   GtkArg args[1];   args[0].name = "GtkContainer::border_width";   args[0].type = GTK_TYPE_ULONG;   GTK_VALUE_ULONG(args[0]) = 10;   gtk_object_setv(GTK_OBJECT(button),                    1,                   args);&#13;</pre>            </td>          </tr>        </table>        <p>          The second argument to <tt class="FUNCTION">          gtk_object_setv()</tt> is the length of the array of          <span class="STRUCTNAME">GtkArg</span>. <tt class=           "FUNCTION">gtk_object_set()</tt> is plainly easier to use          when you are typing the code in manually, but <tt class=           "FUNCTION">gtk_object_setv()</tt> can be passed a          dynamically-constructed argument array---which is          convenient if you're exporting GTK+ functionality to an          interpreted environment.        </p>        <p>          It is also possible to set object arguments when objects          are created. You can create most objects using the <tt          class="FUNCTION">gtk_object_new()</tt> function, and most          widgets with the <tt class="FUNCTION">          gtk_widget_new()</tt> function. The routines take a <span          class="STRUCTNAME">GtkType</span> as their first          argument, and create an object or widget of that type.          They then take a list of argument-value pairs, just as          <tt class="FUNCTION">gtk_object_set()</tt> does. There          are also <tt class="FUNCTION">gtk_object_newv()</tt> and          <tt class="FUNCTION">gtk_widget_newv()</tt> variants.        </p>      </div>      <div class="SECT2">        <h2 class="SECT2">          <a name="Z107">Reading Object Arguments</a>        </h2>        <p>          To get the value of one or more arguments, you simply          create an array of <span class="STRUCTNAME">          GtkArg</span>, filling in the <span class="STRUCTNAME">          name</span> field of each <span class="STRUCTNAME">          GtkArg</span>. <tt class="FUNCTION">          gtk_object_getv()</tt> fills in the <span class=           "STRUCTNAME">type</span> fields and the argument values.          If an error occurs, the <span class="STRUCTNAME">          type</span> field is set to <span class="STRUCTNAME">          GTK_TYPE_INVALID</span>. If the fundamental type of the          returned value is <span class="STRUCTNAME">          GTK_TYPE_STRING</span>, <span class="STRUCTNAME">          GTK_TYPE_BOXED</span>, or <span class="STRUCTNAME">          GTK_TYPE_ARGS</span>, you are responsible for freeing it.        </p>        <p>          Here's a simple example:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;  GtkArg args[2];      args[0].name = "GtkContainer::border_width";  args[1].name = "GtkContainer::resize_mode";  gtk_object_getv(GTK_OBJECT(button),                   2,                   args);  g_assert(args[0].type == GTK_TYPE_ULONG);  g_assert(args[1].type == GTK_TYPE_RESIZE_MODE);  g_assert(GTK_FUNDAMENTAL_TYPE(args[1].type) == GTK_TYPE_ENUM);  printf("Border width: %lu Resize mode: %d\n",          GTK_VALUE_ULONG(args[0]), GTK_VALUE_ENUM(args[1]));&#13;</pre>            </td>          </tr>        </table>      </div>      <div class="SECT2">        <h2 class="SECT2">          <a name="SEC-GETSETARG">Using Object Arguments in Your          Own <span class="STRUCTNAME">GtkObject</span>          Subclass</a>        </h2>        <p>          If you're writing a custom <span class="STRUCTNAME">          GtkObject</span> or a custom subclass of some existing          object, you can register your own object arguments in the          class initialization function, at the same time you          register your object's signals. To do this, call <tt          class="FUNCTION">gtk_object_add_arg_type()</tt>---here's          an example from <tt class="CLASSNAME">GtkContainer</tt>:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;    gtk_object_add_arg_type("GtkContainer::border_width",                             GTK_TYPE_ULONG,                             GTK_ARG_READWRITE,                             ARG_BORDER_WIDTH);  </pre>            </td>          </tr>        </table>        <p>          The first argument must be a static string constant,          because GTK+ does not copy it. It must also begin with          the name of your new class, separated from the name of          the argument by two colons (reminiscent of the C++ scope          operator). The second argument should be the type of the          argument; this can be any <span class="STRUCTNAME">          GtkType</span> GTK+ knows about.        </p>        <p>          The third argument contains one or more flags, defined in          <tt class="FILENAME">gtk/gtkobject.h</tt>. The available          flags are:        </p>        <ul>          <li>            <p>              <span class="STRUCTNAME">GTK_ARG_READABLE</span>              means the argument's value can be read, using <tt              class="FUNCTION">gtk_object_getv()</tt>.&#13;            </p>          </li>          <li>            <p>              <span class="STRUCTNAME">GTK_ARG_WRITABLE</span>              means the argument's value can be written, using <tt              class="FUNCTION">gtk_object_set()</tt> or <tt class=               "FUNCTION">gtk_object_setv()</tt>&#13;            </p>          </li>          <li>            <p>              <span class="STRUCTNAME">GTK_ARG_CONSTRUCT</span>              means the argument should be initialized with a              default value. This applies to numeric and pointer              types; they are set to <span class="STRUCTNAME">              0</span> or <span class="STRUCTNAME">NULL</span>,              respectively. (This happens within <tt class=              "FUNCTION">gtk_object_new()</tt> or <tt class=               "FUNCTION">gtk_widget_new()</tt>, which call <tt              class="FUNCTION">              gtk_object_default_construct()</tt>.) &#13;            </p>          </li>          <li>            <p>              <span class="STRUCTNAME">              GTK_ARG_CONSTRUCT_ONLY</span> means the argument is              <i class="EMPHASIS">only</i> used for object              construction; it cannot be read or written later.              That is, you can't use these arguments with <tt              class="FUNCTION">gtk_object_set()</tt>. &#13;            </p>          </li>          <li>            <p>              <span class="STRUCTNAME">GTK_ARG_CHILD_ARG</span> is              used by subclasses of <tt class="CLASSNAME">              GtkContainer</tt>; <tt class="CLASSNAME">              GtkContainer</tt> implements a specialized variation              on the argument system to permit setting the              attributes of child-container pairs (such as packing              flags for <tt class="CLASSNAME">GtkBox</tt>---the              flags are not a property of the child or the              container, but of the pair). You will only use this              flag if you're writing a new type of container, or              some other kind of object with similar semantics.              &#13;            </p>          </li>          <li>            <p>              <span class="STRUCTNAME">GTK_ARG_READWRITE</span> is

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品三级av| 久久国产婷婷国产香蕉| 国产精品三级av在线播放| 久久久天堂av| 久久精品这里都是精品| 久久久久久久久久久黄色| 精品成人免费观看| 久久精品一区二区三区不卡牛牛| 精品国产精品网麻豆系列| 2022国产精品视频| 久久九九全国免费| 国产精品热久久久久夜色精品三区 | 亚洲aⅴ怡春院| 日韩vs国产vs欧美| 蜜臀久久99精品久久久久久9| 麻豆免费精品视频| 国产乱子伦一区二区三区国色天香 | 韩国av一区二区三区四区| 国内精品自线一区二区三区视频| 国产麻豆欧美日韩一区| 成人激情综合网站| 欧美中文字幕久久 | 婷婷综合另类小说色区| 日韩国产欧美在线播放| 久久国产乱子精品免费女| 国产在线不卡一卡二卡三卡四卡| 国产精品一二一区| 日本精品视频一区二区| 欧美喷潮久久久xxxxx| 欧美mv日韩mv国产网站| 国产色一区二区| 一区二区成人在线| 久久国产尿小便嘘嘘| 国产精品亚洲人在线观看| 96av麻豆蜜桃一区二区| 69av一区二区三区| 久久久久久久久久美女| 亚洲欧洲精品天堂一级| 亚洲国产cao| 久久99久久久欧美国产| 99久久精品国产网站| 7777精品伊人久久久大香线蕉的 | 欧美国产1区2区| 亚洲午夜羞羞片| 国产精品资源在线| 在线免费观看成人短视频| 日韩区在线观看| 国产精品丝袜久久久久久app| 亚洲一区二区三区四区中文字幕| 麻豆专区一区二区三区四区五区| av在线一区二区| 日韩美女一区二区三区| 亚洲男女一区二区三区| 久久精品国产亚洲5555| 91久久线看在观草草青青| 欧美xxxxxxxxx| 亚洲人成网站精品片在线观看| 免费日韩伦理电影| 91麻豆福利精品推荐| 精品1区2区在线观看| 亚洲最大成人网4388xx| 国产不卡视频在线观看| 91精品国产欧美一区二区| 国产精品灌醉下药二区| 激情深爱一区二区| 欧美日韩一区高清| 中文字幕中文字幕中文字幕亚洲无线| 免费看欧美美女黄的网站| 91麻豆精品秘密| 国产欧美一区二区精品性色超碰| 日韩—二三区免费观看av| 91香蕉视频mp4| 国产日韩精品一区二区三区| 日本欧洲一区二区| 欧美亚日韩国产aⅴ精品中极品| 欧美国产精品久久| 国内成+人亚洲+欧美+综合在线| 亚洲国产精品久久久久秋霞影院| 国产精品羞羞答答xxdd| 日韩一区二区三| 亚洲成a人片综合在线| 99re成人精品视频| 中文字幕第一区二区| 国产美女久久久久| 精品国产一区二区三区四区四| 亚洲成a人片在线观看中文| 91亚洲男人天堂| 国产精品人人做人人爽人人添| 国产精品亚洲成人| 久久久久免费观看| 国产精品影视网| 久久久亚洲国产美女国产盗摄| 蜜桃久久久久久| 日韩欧美你懂的| 美女视频黄久久| 日韩欧美综合在线| 狂野欧美性猛交blacked| 欧美一区二区三区的| 午夜视黄欧洲亚洲| 91麻豆精品国产无毒不卡在线观看| 亚洲一区二区精品3399| 欧美视频精品在线观看| 亚洲成人你懂的| 欧美日韩在线一区二区| 香蕉久久一区二区不卡无毒影院| 在线观看欧美日本| 性做久久久久久免费观看| 在线播放/欧美激情| 日韩国产在线观看| 日韩精品最新网址| 国产乱人伦精品一区二区在线观看 | 另类综合日韩欧美亚洲| 日韩一区二区影院| 麻豆精品精品国产自在97香蕉| 欧美一区2区视频在线观看| 日韩精品亚洲专区| 奇米精品一区二区三区在线观看 | 国产一区二区影院| 国产日韩影视精品| 99精品桃花视频在线观看| 亚洲欧洲无码一区二区三区| 99久久99久久久精品齐齐| 一区二区三区**美女毛片| 精品视频免费在线| 免费精品视频在线| 国产日本一区二区| 99re视频这里只有精品| 亚洲国产裸拍裸体视频在线观看乱了| 欧美专区日韩专区| 日韩国产欧美在线播放| 久久久久久久免费视频了| www.一区二区| 亚洲成a人v欧美综合天堂下载| 欧美大胆一级视频| 91在线观看污| 日韩在线观看一区二区| 久久亚洲精品国产精品紫薇| 99精品欧美一区| 丝袜诱惑亚洲看片| 国产日韩三级在线| 欧美亚洲国产一区在线观看网站| 免费国产亚洲视频| 中文字幕亚洲一区二区va在线| 欧美亚洲高清一区二区三区不卡| 久久aⅴ国产欧美74aaa| 亚洲视频中文字幕| 日韩一区二区精品葵司在线| 国产91丝袜在线18| 亚洲超碰97人人做人人爱| 久久中文字幕电影| 在线观看av一区| 国产乱人伦偷精品视频不卡| 亚洲综合偷拍欧美一区色| 久久久亚洲国产美女国产盗摄| 欧美中文字幕久久| 国产a级毛片一区| 婷婷六月综合网| 国产精品理伦片| 日韩一区二区三区观看| 色婷婷综合视频在线观看| 狂野欧美性猛交blacked| 亚洲精品视频在线| 2023国产一二三区日本精品2022| 欧美色窝79yyyycom| 国产91富婆露脸刺激对白| 日韩国产欧美在线视频| 亚洲视频在线一区| 久久久久国产精品麻豆ai换脸| 欧美日韩国产精选| 91免费精品国自产拍在线不卡| 九色|91porny| 亚洲第一成年网| 国产精品久久福利| 精品国产一区二区三区久久影院 | 一本一道综合狠狠老| 精品在线亚洲视频| 亚洲国产精品久久人人爱 | 国产成人精品亚洲777人妖| 天堂在线一区二区| 亚洲女厕所小便bbb| 久久久国产精品不卡| 日韩欧美国产一区在线观看| 欧美在线观看一区| 91论坛在线播放| www.99精品| 成人福利在线看| 国产成人在线免费观看| 精品一区二区影视| 视频一区在线视频| 亚洲国产日韩综合久久精品| 亚洲免费在线观看视频| 国产精品久久久久影视| 久久久精品一品道一区| 久久女同精品一区二区| 日韩亚洲欧美在线| 欧美一区二区三区免费在线看| 欧美日本国产视频| 欧美日韩五月天| 欧美三级一区二区| 精品视频在线看|