summaryrefslogtreecommitdiff
path: root/android/experimental/LOAndroid3/src/java/org/libreoffice/LOEventFactory.java
blob: 90a358212f58b4d5094562762c43f7ec873c5627 (plain)
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
package org.libreoffice;

import android.graphics.Rect;

import org.mozilla.gecko.gfx.ImmutableViewportMetrics;
import org.mozilla.gecko.gfx.IntSize;


public class LOEventFactory {
    public static LOEvent draw(Rect rect) {
        return new LOEvent(LOEvent.DRAW, rect);
    }

    public static LOEvent sizeChanged(int widthPixels, int heightPixels) {
        return new LOEvent(LOEvent.SIZE_CHANGED, widthPixels, heightPixels);
    }

    public static LOEvent tileSize(IntSize tileSize) {
        return new LOEvent(LOEvent.TILE_SIZE, tileSize);
    }

    public static LOEvent viewport(ImmutableViewportMetrics viewportMetrics) {
        return new LOEvent(LOEvent.VIEWPORT, viewportMetrics);
    }

    public static LOEvent changePart(int part) {
        return new LOEvent(LOEvent.CHANGE_PART, part);
    }

    public static LOEvent load(String inputFile) {
        return new LOEvent(LOEvent.LOAD, inputFile);
    }

    public static LOEvent redraw() {
        return new LOEvent(LOEvent.REDRAW);
    }
}