Markdown使用 帮助


匿名

在山的那边,海的那边,有一群蓝精灵。
mTJbpiryZ
QlXiOuzrvaZfj

匿名

我有一头小毛驴,我从来也不骑。
oYuRnqLTGeDwVQz
LWAlgENTJMs

匿名

今天的风儿甚为喧嚣呢。

匿名

https://blog.csdn.net/weixin_30247781/article/details/97468244

匿名

在山的那边,海的那边,有一群蓝精灵。

匿名

我有一头小毛驴,我从来也不骑。

匿名

好!顶!赞!

匿名

https://gitlab.deepin.io/songwentai/dde-backend-ifc-docs/merge_requests/37

匿名

deb [allow-insecure=yes] http://pools.corp.deepin.com/desktop-professional eagle main contrib non-free

deb [allow-insecure=yes] http://pools.corp.deepin.com/ppa/dde-eagle eagle/sp2 main contrib non-free

deb [by-hash=force trusted=yes] http://10.0.32.52:5002/public-repos/eagle-sp2/release eagle-sp2 main

deb [by-hash=force trusted=yes] http://10.0.32.52:5002/public-repos/nonfree-eagle-sp2/release nonfree-eagle-sp2 main

匿名

```cpp
#include <Tsuki/Tsuki.h>
#include <Box2D/Box2D.h>
#include <list>
#include <vector>

using namespace Tsuki;

#define PI 3.1415926f

struct Polygon {
    uint8_t hsv_h;
    Body body;

    Polygon(World& world, float x, float y, float w, int edge, float angle, uint8_t hsv_h, Body::Type type=Body::Type::Dynamic) :
        hsv_h(hsv_h),
        body(world, type)
    {
        float n = 2.0f / edge;
        std::vector<Vec2> points;
        for(int i = 0; i < edge; i++)
        {
            points.push_back({w * sin(PI * n * (i+0.5f)), w * cos(PI * n * (i+0.5f))});
        }

        body.setVertex(points);
        body.setPosition({x, y});
        body.setRestitution(0.5f);        
    }

    void update()
    {
    }

    void draw(Renderer& renderer)
    {
        std::vector<Vec2> points;
        body.getVertex(points);
        if(points.size() < 3)
            return;

        std::vector<Point> p;
        for(size_t i = 0; i < points.size(); i++)
        {
            p.push_back({
                static_cast<int>(points[i].x * 100), 
                static_cast<int>(points[i].y * 100)
            });
        }
        renderer.setHSVColor({hsv_h, 255, 255, 0x55});
        renderer.fillShape(p);
        renderer.setHSVColor({hsv_h, 255, 255, 0xff});
        renderer.drawShape(p);
    }
};

int main()
{
    // 初始化Tsuki
    srand(time(nullptr));
    TsukiInit();
    Window window{"Box2D Demo", 800, 600};
    
    Renderer renderer{window, Renderer::RenderBy::CPU};
    renderer.setBlendMode(BlendMode::Blend);
    
    // 初始化Box2D的世界        
    World world({0.0f, 9.8f});

    // 创建物体
    std::list<Polygon> bodys;
    bodys.emplace_back(world, 4.0f, 10.0f, 6.0, 4, 0, rand()%180, Body::Type::Static);

    Timer timer("create-box");
    timer.setInterval(500);
    
    Event event;
    bool isRunning = true;

    event.setHandler(Event::Type::Quit, [&](Event&){
        if(MessageBox::Button::Yes == window.messageBox("Close", "确定退出吗?", MessageBox::Type::Warning))
            isRunning = false;
    });

    event.setHandler(Event::Type::MouseButtonDown, [&](Event& e){
        int x, y;
        Event::MouseButton(e).point(x, y);
        bodys.emplace_back(world, x/100.0f, y/100.0f, 0.3, rand()%5+3, 0, rand()%180);
    });

    event.setHandler(Event::Type::Timer, [&](Event& e){
        Event::User::push(0);
    });

    event.setHandler(Event::Type::User, [&](Event& e){
        Event::MouseButton::push(Event::MouseButton::Button::Left, Event::MouseButton::State::Down, 400, 80);
    });

    timer.launch();
    char title[128];
    while(isRunning)
    {
        event.solve();
        renderer.setColor(0);
        renderer.clear();

        world.update(1.0f / 120.0f);
        for(auto & body : bodys)
        {
            body.update();
            body.draw(renderer);
        }
        renderer.present();
        float fps = timer.delayFps(120.0f);
        snprintf(title, 128, "Tsuki demo %f fps", fps);
        window.setTitle(title);
    }

    TsukiQuit();
}
```

匿名

```
<node><interface name="com.deepin.daemon.InputDevice.Mouse"><method name="Reset"></method><property name="MiddleButtonEmulation" type="b" access="readwrite"></property><property name="MotionAcceleration" type="d" access="readwrite"></property><property name="DoubleClick" type="i" access="readwrite"></property><property name="DeviceList" type="s" access="read"></property><property name="LeftHanded" type="b" access="readwrite"></property><property name="DisableTpad" type="b" access="readwrite"></property><property name="NaturalScroll" type="b" access="readwrite"></property><property name="AdaptiveAccelProfile" type="b" access="readwrite"></property><property name="MotionThreshold" type="d" access="readwrite"></property><property name="MotionScaling" type="d" access="readwrite"></property><property name="DragThreshold" type="i" access="readwrite"></property><property name="Exist" type="b" access="read"></property></interface><interface name="com.deepin.daemon.InputDevice.TrackPoint"><method name="Reset"></method><property name="MiddleButtonTimeout" type="i" access="readwrite"></property><property name="MotionAcceleration" type="d" access="readwrite"></property><property name="MotionThreshold" type="d" access="readwrite"></property><property name="DeviceList" type="s" access="read"></property><property name="Exist" type="b" access="read"></property><property name="MiddleButtonEnabled" type="b" access="readwrite"></property><property name="WheelEmulation" type="b" access="readwrite"></property><property name="WheelHorizScroll" type="b" access="readwrite"></property><property name="MotionScaling" type="d" access="readwrite"></property><property name="WheelEmulationButton" type="i" access="readwrite"></property><property name="WheelEmulationTimeout" type="i" access="readwrite"></property><property name="LeftHanded" type="b" access="readwrite"></property></interface><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="out" type="s" direction="out"></arg></method></interface><interface name="org.freedesktop.DBus.Properties"><method name="Get"><arg name="interface" type="s" direction="in"></arg><arg name="property" type="s" direction="in"></arg><arg name="value" type="v" direction="out"></arg></method><method name="GetAll"><arg name="interface" type="s" direction="in"></arg><arg name="props" type="a{sv}" direction="out"></arg></method><method name="Set"><arg name="interface" type="s" direction="in"></arg><arg name="property" type="s" direction="in"></arg><arg name="value" type="v" direction="in"></arg></method><signal name="PropertiesChanged"><arg name="interface" type="s" direction="out"></arg><arg name="changed_properties" type="a{sv}" direction="out"></arg><arg name="invalidates_properties" type="as" direction="out"></arg></signal></interface><interface name="org.freedesktop.DBus.Peer"><method name="Ping"></method><method name="GetMachineId"><arg name="machine_uuid" type="s" direction="out"></arg></method></interface></node>
```

匿名

```xml
<node>
<interface name="com.deepin.daemon.InputDevice.Wacom">
<method name="Reset"/>
<property name="DeviceList" type="s" access="read"/>
<property name="LeftHanded" type="b" access="readwrite"/>
<property name="StylusThreshold" type="u" access="readwrite"/>
<property name="EraserThreshold" type="u" access="readwrite"/>
<property name="ForceProportions" type="b" access="readwrite"/>
<property name="KeyDownAction" type="s" access="readwrite"/>
<property name="Suppress" type="u" access="readwrite"/>
<property name="EraserRawSample" type="u" access="readwrite"/>
<property name="Exist" type="b" access="read"/>
<property name="KeyUpAction" type="s" access="readwrite"/>
<property name="StylusRawSample" type="u" access="readwrite"/>
<property name="ActionInfos" type="a(ss)" access="read"/>
<property name="MapOutput" type="s" access="read"/>
<property name="CursorMode" type="b" access="readwrite"/>
<property name="StylusPressureSensitive" type="u" access="readwrite"/>
<property name="EraserPressureSensitive" type="u" access="readwrite"/>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="out" type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface" type="s" direction="in"/>
<arg name="property" type="s" direction="in"/>
<arg name="value" type="v" direction="out"/>
</method>
<method name="GetAll">
<arg name="interface" type="s" direction="in"/>
<arg name="props" type="a{sv}" direction="out"/>
</method>
<method name="Set">
<arg name="interface" type="s" direction="in"/>
<arg name="property" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<signal name="PropertiesChanged">
<arg name="interface" type="s" direction="out"/>
<arg name="changed_properties" type="a{sv}" direction="out"/>
<arg name="invalidates_properties" type="as" direction="out"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping"/>
<method name="GetMachineId">
<arg name="machine_uuid" type="s" direction="out"/>
</method>
</interface>
</node>
```

匿名

```xml
<node>
<interface name="com.deepin.daemon.InputDevice.TouchPad">
<method name="Reset"/>
<property name="DisableIfTyping" type="b" access="readwrite"/>
<property name="MotionAcceleration" type="d" access="readwrite"/>
<property name="MotionThreshold" type="d" access="readwrite"/>
<property name="MotionScaling" type="d" access="readwrite"/>
<property name="DeltaScroll" type="i" access="readwrite"/>
<property name="NaturalScroll" type="b" access="readwrite"/>
<property name="HorizScroll" type="b" access="readwrite"/>
<property name="VertScroll" type="b" access="readwrite"/>
<property name="DragThreshold" type="i" access="readwrite"/>
<property name="PalmMinWidth" type="i" access="readwrite"/>
<property name="Exist" type="b" access="read"/>
<property name="TPadEnable" type="b" access="readwrite"/>
<property name="TapClick" type="b" access="readwrite"/>
<property name="PalmDetect" type="b" access="readwrite"/>
<property name="DoubleClick" type="i" access="readwrite"/>
<property name="PalmMinZ" type="i" access="readwrite"/>
<property name="DeviceList" type="s" access="read"/>
<property name="LeftHanded" type="b" access="readwrite"/>
<property name="EdgeScroll" type="b" access="readwrite"/>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="out" type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface" type="s" direction="in"/>
<arg name="property" type="s" direction="in"/>
<arg name="value" type="v" direction="out"/>
</method>
<method name="GetAll">
<arg name="interface" type="s" direction="in"/>
<arg name="props" type="a{sv}" direction="out"/>
</method>
<method name="Set">
<arg name="interface" type="s" direction="in"/>
<arg name="property" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<signal name="PropertiesChanged">
<arg name="interface" type="s" direction="out"/>
<arg name="changed_properties" type="a{sv}" direction="out"/>
<arg name="invalidates_properties" type="as" direction="out"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping"/>
<method name="GetMachineId">
<arg name="machine_uuid" type="s" direction="out"/>
</method>
</interface>
</node>
```

匿名

```xml
<node>
<interface name="com.deepin.daemon.InputDevice.Mouse">
<method name="Reset"/>
<property name="DragThreshold" type="i" access="readwrite"/>
<property name="Exist" type="b" access="read"/>
<property name="DisableTpad" type="b" access="readwrite"/>
<property name="AdaptiveAccelProfile" type="b" access="readwrite"/>
<property name="MotionAcceleration" type="d" access="readwrite"/>
<property name="MotionThreshold" type="d" access="readwrite"/>
<property name="MotionScaling" type="d" access="readwrite"/>
<property name="DeviceList" type="s" access="read"/>
<property name="LeftHanded" type="b" access="readwrite"/>
<property name="NaturalScroll" type="b" access="readwrite"/>
<property name="MiddleButtonEmulation" type="b" access="readwrite"/>
<property name="DoubleClick" type="i" access="readwrite"/>
</interface>
<interface name="com.deepin.daemon.InputDevice.TrackPoint">
<method name="Reset"/>
<property name="LeftHanded" type="b" access="readwrite"/>
<property name="DeviceList" type="s" access="read"/>
<property name="MiddleButtonEnabled" type="b" access="readwrite"/>
<property name="WheelHorizScroll" type="b" access="readwrite"/>
<property name="MiddleButtonTimeout" type="i" access="readwrite"/>
<property name="MotionThreshold" type="d" access="readwrite"/>
<property name="MotionScaling" type="d" access="readwrite"/>
<property name="Exist" type="b" access="read"/>
<property name="WheelEmulation" type="b" access="readwrite"/>
<property name="WheelEmulationButton" type="i" access="readwrite"/>
<property name="WheelEmulationTimeout" type="i" access="readwrite"/>
<property name="MotionAcceleration" type="d" access="readwrite"/>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="out" type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface" type="s" direction="in"/>
<arg name="property" type="s" direction="in"/>
<arg name="value" type="v" direction="out"/>
</method>
<method name="GetAll">
<arg name="interface" type="s" direction="in"/>
<arg name="props" type="a{sv}" direction="out"/>
</method>
<method name="Set">
<arg name="interface" type="s" direction="in"/>
<arg name="property" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<signal name="PropertiesChanged">
<arg name="interface" type="s" direction="out"/>
<arg name="changed_properties" type="a{sv}" direction="out"/>
<arg name="invalidates_properties" type="as" direction="out"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping"/>
<method name="GetMachineId">
<arg name="machine_uuid" type="s" direction="out"/>
</method>
</interface>
</node>
```

匿名

```xml
<node>
<interface name="com.deepin.daemon.InputDevice.Keyboard">
<method name="AddLayoutOption">
<arg name="option" type="s" direction="in"/>
</method>
<method name="AddUserLayout">
<arg name="layout" type="s" direction="in"/>
</method>
<method name="ClearLayoutOption"/>
<method name="DeleteLayoutOption">
<arg name="option" type="s" direction="in"/>
</method>
<method name="DeleteUserLayout">
<arg name="layout" type="s" direction="in"/>
</method>
<method name="GetLayoutDesc">
<arg name="layout" type="s" direction="in"/>
<arg name="description" type="s" direction="out"/>
</method>
<method name="LayoutList">
<arg name="layout_list" type="a{ss}" direction="out"/>
</method>
<method name="Reset"/>
<property name="CursorBlink" type="i" access="readwrite"/>
<property name="RepeatInterval" type="u" access="readwrite"/>
<property name="UserOptionList" type="as" access="read"/>
<property name="LayoutScope" type="i" access="readwrite"/>
<property name="UserLayoutList" type="as" access="read"/>
<property name="RepeatEnabled" type="b" access="readwrite"/>
<property name="CurrentLayout" type="s" access="readwrite"/>
<property name="CapslockToggle" type="b" access="readwrite"/>
<property name="RepeatDelay" type="u" access="readwrite"/>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="out" type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface" type="s" direction="in"/>
<arg name="property" type="s" direction="in"/>
<arg name="value" type="v" direction="out"/>
</method>
<method name="GetAll">
<arg name="interface" type="s" direction="in"/>
<arg name="props" type="a{sv}" direction="out"/>
</method>
<method name="Set">
<arg name="interface" type="s" direction="in"/>
<arg name="property" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<signal name="PropertiesChanged">
<arg name="interface" type="s" direction="out"/>
<arg name="changed_properties" type="a{sv}" direction="out"/>
<arg name="invalidates_properties" type="as" direction="out"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping"/>
<method name="GetMachineId">
<arg name="machine_uuid" type="s" direction="out"/>
</method>
</interface>
</node>
```

匿名

```xml
<node>
<interface name="com.deepin.daemon.InputDevices">
<property name="Infos" type="a(ss)" access="read"/>
<property name="WheelSpeed" type="u" access="readwrite"/>
</interface>
<interface name="com.deepin.sync.Config">
<method name="Get">
<arg name="data" type="ay" direction="out"/>
</method>
<method name="Set">
<arg name="data" type="ay" direction="in"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="out" type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface" type="s" direction="in"/>
<arg name="property" type="s" direction="in"/>
<arg name="value" type="v" direction="out"/>
</method>
<method name="GetAll">
<arg name="interface" type="s" direction="in"/>
<arg name="props" type="a{sv}" direction="out"/>
</method>
<method name="Set">
<arg name="interface" type="s" direction="in"/>
<arg name="property" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<signal name="PropertiesChanged">
<arg name="interface" type="s" direction="out"/>
<arg name="changed_properties" type="a{sv}" direction="out"/>
<arg name="invalidates_properties" type="as" direction="out"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping"/>
<method name="GetMachineId">
<arg name="machine_uuid" type="s" direction="out"/>
</method>
</interface>
</node>
```