aboutsummaryrefslogtreecommitdiffstats
path: root/java/org
diff options
context:
space:
mode:
authorPo Lu2023-01-08 15:39:28 +0800
committerPo Lu2023-01-08 15:39:28 +0800
commit86fe89312893bbc8aa47605afbf8da8cd5a12faf (patch)
tree4dfc7e9cca88a193e6c5c809daa57be6f0f1e75e /java/org
parent695e26079eb60d10ffe25bb8ae91ebc6131fb27d (diff)
downloademacs-86fe89312893bbc8aa47605afbf8da8cd5a12faf.tar.gz
emacs-86fe89312893bbc8aa47605afbf8da8cd5a12faf.zip
Delete unused files
* java/org/gnu/emacs/EmacsPaintQueue.java * java/org/gnu/emacs/EmacsPaintReq.java: Remove files.
Diffstat (limited to 'java/org')
-rw-r--r--java/org/gnu/emacs/EmacsPaintQueue.java124
-rw-r--r--java/org/gnu/emacs/EmacsPaintReq.java33
2 files changed, 0 insertions, 157 deletions
diff --git a/java/org/gnu/emacs/EmacsPaintQueue.java b/java/org/gnu/emacs/EmacsPaintQueue.java
deleted file mode 100644
index f4840dbf5ae..00000000000
--- a/java/org/gnu/emacs/EmacsPaintQueue.java
+++ /dev/null
@@ -1,124 +0,0 @@
1/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
2
3Copyright (C) 2023 Free Software Foundation, Inc.
4
5This file is part of GNU Emacs.
6
7GNU Emacs is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 3 of the License, or (at
10your option) any later version.
11
12GNU Emacs is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
19
20package org.gnu.emacs;
21
22import java.util.LinkedList;
23import java.util.List;
24
25import android.graphics.Canvas;
26import android.graphics.Paint;
27import android.graphics.Rect;
28
29public class EmacsPaintQueue
30{
31 /* Queue of paint operations. This is modified from the Emacs
32 thread, and entire paint queues are periodically flushed to the
33 application thread where it is executed. */
34 private List<EmacsPaintReq> paintOperations;
35
36 /* Number of operations in this queue. */
37 public int numRequests;
38
39 public
40 EmacsPaintQueue ()
41 {
42 paintOperations = new LinkedList<EmacsPaintReq> ();
43 }
44
45 public void
46 run ()
47 {
48 EmacsDrawable drawable, last;
49 Canvas canvas;
50 EmacsGC gc;
51 int i;
52 Paint paint;
53 Rect rect, offsetRect, copyRect;
54
55 canvas = null;
56 last = null;
57 gc = null;
58 paint = new Paint ();
59
60 for (EmacsPaintReq req : paintOperations)
61 {
62 drawable = req.getDrawable ();
63 canvas = drawable.lockCanvas ();
64
65 if (canvas == null)
66 /* No canvas is currently available. */
67 continue;
68
69 gc = req.getGC ();
70 rect = req.getRect ();
71
72 drawable.damageRect (rect);
73
74 if (gc.clip_rects == null)
75 {
76 /* No clipping is applied. Just draw and continue. */
77 req.paintTo (canvas, paint, gc);
78 continue;
79 }
80
81 if (gc.clip_rects != null && gc.clip_rects.length > 0)
82 {
83 if (gc.clip_rects.length == 1)
84 {
85 /* There is only a single clip rect, which is simple
86 enough. */
87 canvas.save ();
88 canvas.clipRect (gc.clip_rects[0]);
89 req.paintTo (canvas, paint, gc);
90 canvas.restore ();
91 }
92 else
93 {
94 /* There are multiple clip rects. Android doesn't let
95 programs use RegionOp.UNION on the clip rectangle,
96 so Emacs must iterate over each intersection and
97 paint it manually. This seems inefficient but
98 thankfully Emacs never seems to use more than one
99 clip rect. */
100
101 for (i = 0; i < gc.clip_rects.length; ++i)
102 {
103 copyRect = new Rect (gc.clip_rects[i]);
104
105 if (copyRect.intersect (rect))
106 {
107 canvas.save ();
108 canvas.clipRect (copyRect);
109 req.paintTo (canvas, paint, gc);
110 canvas.restore ();
111 }
112 }
113 }
114 }
115 }
116 }
117
118 public void
119 appendPaintOperation (EmacsPaintReq req)
120 {
121 paintOperations.add (req);
122 numRequests++;
123 }
124};
diff --git a/java/org/gnu/emacs/EmacsPaintReq.java b/java/org/gnu/emacs/EmacsPaintReq.java
deleted file mode 100644
index 5b14b005093..00000000000
--- a/java/org/gnu/emacs/EmacsPaintReq.java
+++ /dev/null
@@ -1,33 +0,0 @@
1/* Communication module for Android terminals. -*- c-file-style: "GNU" -*-
2
3Copyright (C) 2023 Free Software Foundation, Inc.
4
5This file is part of GNU Emacs.
6
7GNU Emacs is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 3 of the License, or (at
10your option) any later version.
11
12GNU Emacs is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
19
20package org.gnu.emacs;
21
22import android.graphics.Canvas;
23import android.graphics.Paint;
24import android.graphics.Rect;
25
26public interface EmacsPaintReq
27{
28 public EmacsDrawable getDrawable ();
29 public EmacsGC getGC ();
30 public void paintTo (Canvas canvas, Paint paint,
31 EmacsGC immutableGC);
32 public Rect getRect ();
33};